KDE: Difference between revisions
imported>Fadenb Created page with "== KDE System Settings == Nixpkgs now provides the GTK configuration module for KDE system settings, which you can install with: <pre>$ nix-env -i kde-gtk-config</pre> You..." |
imported>Fadenb m Syntax highlighting |
||
Line 3: | Line 3: | ||
Nixpkgs now provides the GTK configuration module for KDE system settings, which you can install with: | Nixpkgs now provides the GTK configuration module for KDE system settings, which you can install with: | ||
< | <syntaxhighlight lang="console">$ nix-env -i kde-gtk-config</syntaxhighlight> | ||
You should also install any GTK themes you like. You can choose a GTK theme and set related options in <code>System Settings > Application Appearance > GTK</code>. | You should also install any GTK themes you like. You can choose a GTK theme and set related options in <code>System Settings > Application Appearance > GTK</code>. | ||
Line 10: | Line 10: | ||
As a normal nix user you can install the Oxygen GTK theme: | As a normal nix user you can install the Oxygen GTK theme: | ||
< | <syntaxhighlight lang="console">$ nix-env -i oxygen-gtk</syntaxhighlight> | ||
KDE will run any scripts you place in ~/.kde/env on startup so this is a good place to set the GTK_PATH so that applications can find the theme engine. If the path is wrong/unset you will see errors like this: | KDE will run any scripts you place in ~/.kde/env on startup so this is a good place to set the GTK_PATH so that applications can find the theme engine. If the path is wrong/unset you will see errors like this: | ||
< | <code>Gtk-WARNING **: Unable to locate theme engine in module_path</code> | ||
To set Oxygen-GTK as the gtk theme create the following file and make it executable: ~/.kde/env/set-gtk-theme.sh | To set Oxygen-GTK as the gtk theme create the following file and make it executable: ~/.kde/env/set-gtk-theme.sh | ||
< | <syntaxhighlight lang="bash"> | ||
#!/bin/sh | #!/bin/sh | ||
export GTK_PATH=$GTK_PATH:~/.nix-profile/lib/gtk-2.0 | export GTK_PATH=$GTK_PATH:~/.nix-profile/lib/gtk-2.0 | ||
export GTK2_RC_FILES=$GTK2_RC_FILES:~/.nix-profile/share/themes/oxygen-gtk/gtk-2.0/gtkrc | export GTK2_RC_FILES=$GTK2_RC_FILES:~/.nix-profile/share/themes/oxygen-gtk/gtk-2.0/gtkrc | ||
</ | </syntaxhighlight> | ||
Alternatively, on NixOS: | Alternatively, on NixOS: | ||
< | <syntaxhighlight lang="nix"> | ||
environment = { | |||
systemPackages = [ pkgs.oxygen_gtk ]; | |||
shellInit = '' | |||
export GTK_PATH=$GTK_PATH:${pkgs.oxygen_gtk}/lib/gtk-2.0 | |||
export GTK2_RC_FILES=$GTK2_RC_FILES:${pkgs.oxygen_gtk}/share/themes/oxygen-gtk/gtk-2.0/gtkrc | |||
''; | |||
}; | |||
</ | </syntaxhighlight> | ||
Or alternatively, copy the themes folder in the home directory | Or alternatively, copy the themes folder in the home directory | ||
< | <syntaxhighlight lang="console"> | ||
$ cp -R ~/.nix-profile/share/themes/ ~/.themes | $ cp -R ~/.nix-profile/share/themes/ ~/.themes | ||
</ | </syntaxhighlight> |
Revision as of 16:07, 27 August 2017
KDE System Settings
Nixpkgs now provides the GTK configuration module for KDE system settings, which you can install with:
$ nix-env -i kde-gtk-config
You should also install any GTK themes you like. You can choose a GTK theme and set related options in System Settings > Application Appearance > GTK
.
Manually
As a normal nix user you can install the Oxygen GTK theme:
$ nix-env -i oxygen-gtk
KDE will run any scripts you place in ~/.kde/env on startup so this is a good place to set the GTK_PATH so that applications can find the theme engine. If the path is wrong/unset you will see errors like this:
Gtk-WARNING **: Unable to locate theme engine in module_path
To set Oxygen-GTK as the gtk theme create the following file and make it executable: ~/.kde/env/set-gtk-theme.sh
#!/bin/sh
export GTK_PATH=$GTK_PATH:~/.nix-profile/lib/gtk-2.0
export GTK2_RC_FILES=$GTK2_RC_FILES:~/.nix-profile/share/themes/oxygen-gtk/gtk-2.0/gtkrc
Alternatively, on NixOS:
environment = {
systemPackages = [ pkgs.oxygen_gtk ];
shellInit = ''
export GTK_PATH=$GTK_PATH:${pkgs.oxygen_gtk}/lib/gtk-2.0
export GTK2_RC_FILES=$GTK2_RC_FILES:${pkgs.oxygen_gtk}/share/themes/oxygen-gtk/gtk-2.0/gtkrc
'';
};
Or alternatively, copy the themes folder in the home directory
$ cp -R ~/.nix-profile/share/themes/ ~/.themes