Cursor Themes: Difference between revisions
imported>Erikarvstedt the topic of cursor themes is severely underdocumented, now we have at least something to start with. |
imported>WhiteBlackGoose Added getting cursor theme from URL via HM |
||
(2 intermediate revisions by one other user not shown) | |||
Line 1: | Line 1: | ||
To install the DMZ white cursor theme with [https://github.com/rycee/home-manager home-manager], add this to your home-manager config: | |||
<code> | |||
home.file.".icons/default".source = "${pkgs.vanilla-dmz}/share/icons/Vanilla-DMZ"; | home.file.".icons/default".source = "${pkgs.vanilla-dmz}/share/icons/Vanilla-DMZ"; | ||
</code> | |||
For a more fine-grained configuration, check the option <code>xsession.pointerCursor</code>. | |||
== Cursor Theme with Home Manager == | |||
Here's an example how you can get a cursor theme from a url and assign it to HM's pointerCursor: | |||
<syntaxHighlight lang=nix> | |||
home.pointerCursor = | |||
let | |||
getFrom = url: hash: name: { | |||
gtk.enable = true; | |||
x11.enable = true; | |||
name = name; | |||
size = 48; | |||
package = | |||
pkgs.runCommand "moveUp" {} '' | |||
mkdir -p $out/share/icons | |||
ln -s ${pkgs.fetchzip { | |||
url = url; | |||
hash = hash; | |||
}} $out/share/icons/${name} | |||
''; | |||
}; | |||
in | |||
getFrom | |||
"https://github.com/ful1e5/fuchsia-cursor/releases/download/v2.0.0/Fuchsia-Pop.tar.gz" | |||
"sha256-BvVE9qupMjw7JRqFUj1J0a4ys6kc9fOLBPx2bGaapTk=" | |||
"Fuchsia-Pop"; | |||
</syntaxHighlight> |
Latest revision as of 09:18, 27 May 2023
To install the DMZ white cursor theme with home-manager, add this to your home-manager config:
home.file.".icons/default".source = "${pkgs.vanilla-dmz}/share/icons/Vanilla-DMZ";
For a more fine-grained configuration, check the option xsession.pointerCursor
.
Cursor Theme with Home Manager
Here's an example how you can get a cursor theme from a url and assign it to HM's pointerCursor:
home.pointerCursor =
let
getFrom = url: hash: name: {
gtk.enable = true;
x11.enable = true;
name = name;
size = 48;
package =
pkgs.runCommand "moveUp" {} ''
mkdir -p $out/share/icons
ln -s ${pkgs.fetchzip {
url = url;
hash = hash;
}} $out/share/icons/${name}
'';
};
in
getFrom
"https://github.com/ful1e5/fuchsia-cursor/releases/download/v2.0.0/Fuchsia-Pop.tar.gz"
"sha256-BvVE9qupMjw7JRqFUj1J0a4ys6kc9fOLBPx2bGaapTk="
"Fuchsia-Pop";