Esempio n. 1
0
        private void Initalize()
        {
            ThemeOutput = Bash(@"
                        for f in ~/.themes/*
                        do
                            if [[ -d ""$f/gtk-3.0"" ]]
                            then
                                        echo $(basename -- ""$f"")
                            fi
                        done ") +
                          Bash(@"
                        for f in /usr/share/themes/*
                        do
                            if [[ -d ""$f/gtk-3.0"" ]]
                            then
                                        echo $(basename -- ""$f"")
                            fi
                        done");
            IconOutput = Bash(@"for f in /usr/share/icons/*
                        do
                            if [[ -f ""$f/index.theme""     ]]
                            then
                                        echo $(basename -- ""$f"")
                            fi
                        done ")
                         + Bash(@"for f in ~/.local/share/icons/*
                        do
                            if [[ -f ""$f/index.theme""  ]]
                            then
                                        echo $(basename -- ""$f"")
                            fi
                        done ")
                         + Bash(@"for f in ~/.icons/*
                        do
                            if [[ -f ""$f/index.theme""  ]]
                            then
                                        echo $(basename -- ""$f"")
                            fi
                        done ");

            CursorOutput = Bash(@"for f in /usr/share/icons/*
                        do
                            if [[ -f ""$f/index.theme""  &&    -d ""$f/cursors"" ]]
                            then
                                        echo $(basename -- ""$f"")
                            fi
                        done ")
                           + Bash(@"for f in ~/.local/share/icons/*
                       do
                            if [[ -f ""$f/index.theme""  &&    -d ""$f/cursors"" ]]
                            then
                                        echo $(basename -- ""$f"")
                            fi
                        done ")
                           + Bash(@"for f in ~/.icons/*
                       do
                            if [[ -f ""$f/index.theme""  &&    -d ""$f/cursors"" ]]
                            then
                                        echo $(basename -- ""$f"")
                            fi
                        done ");



            ShellOutput = Bash(@"
                        for f in /usr/share/themes/*
                        do
                            if [[ -d ""$f/gnome-shell"" ]]
                                    then
                                        
                                        echo $(basename -- ""$f"")
                                        fi
                                    done") + Bash(@"
                        for f in ~/.themes/*
                        do
                            if [[ -d ""$f/gnome-shell"" ]]
                                    then
                                        echo $(basename -- ""$f"")
                                        fi
                                    done");

            Box box = new Box(Orientation.Vertical, 6);

            ThemeList = ThemeOutput.Split("\n").ToList();
            ThemeList.RemoveAll(s => string.IsNullOrWhiteSpace(s));
            // ThemeList.ForEach(s=>Console.Write(s+"\n"));
            ThemeList = ThemeList.Distinct().ToList();
            ThemeList.Sort();

            IconList = IconOutput.Split("\n").ToList();
            IconList.RemoveAll(s => string.IsNullOrWhiteSpace(s));
            // IconList.ForEach(s=>Console.Write(s+"\n"));
            IconList = IconList.Distinct().ToList();
            IconList.Sort();

            ShellList = ShellOutput.Split("\n").ToList();
            ShellList.RemoveAll(s => string.IsNullOrWhiteSpace(s));
            // iconList.ForEach(s=>Console.Write(s+"\n"));
            ShellList = ShellList.Distinct().ToList();
            ShellList.Sort();

            CursorList = CursorOutput.Split("\n").ToList();
            CursorList.RemoveAll(s => string.IsNullOrWhiteSpace(s));
            CursorList = CursorList.Distinct().ToList();
            CursorList.Sort();
            UserThemeExtensionExists = CheckUserThemeExtExists();
        }