gnome shortcuts for rofi run
This commit is contained in:
parent
e60a3d3fc5
commit
5a106d056f
2 changed files with 42 additions and 0 deletions
|
|
@ -31,4 +31,45 @@ in
|
||||||
home = {
|
home = {
|
||||||
packages = defaultPkgs ++ gnomePkgs;
|
packages = defaultPkgs ++ gnomePkgs;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
dconf.settings =
|
||||||
|
let
|
||||||
|
inherit (builtins) length head tail listToAttrs genList;
|
||||||
|
range = a: b: if a < b then [ a ] ++ range (a + 1) b else [ ];
|
||||||
|
globalPath = "org/gnome/settings-daemon/plugins/media-keys";
|
||||||
|
path = "${globalPath}/custom-keybindings";
|
||||||
|
mkPath = id: "${globalPath}/custom${toString id}";
|
||||||
|
isEmpty = list: length list == 0;
|
||||||
|
mkSettings = settings:
|
||||||
|
let
|
||||||
|
checkSettings = { name, command, binding }@this: this;
|
||||||
|
aux = i: list:
|
||||||
|
if isEmpty list then [ ] else
|
||||||
|
let
|
||||||
|
hd = head list;
|
||||||
|
tl = tail list;
|
||||||
|
name = mkPath i;
|
||||||
|
in
|
||||||
|
aux (i + 1) tl ++ [{
|
||||||
|
name = mkPath i;
|
||||||
|
value = checkSettings hd;
|
||||||
|
}];
|
||||||
|
settingsList = (aux 0 settings);
|
||||||
|
in
|
||||||
|
listToAttrs (settingsList ++ [
|
||||||
|
{
|
||||||
|
name = globalPath;
|
||||||
|
value = {
|
||||||
|
custom-keybindings = genList (i: "/${mkPath i}/") (length settingsList);
|
||||||
|
};
|
||||||
|
}
|
||||||
|
]);
|
||||||
|
in
|
||||||
|
mkSettings [
|
||||||
|
{
|
||||||
|
name = "rofi-run";
|
||||||
|
command = "rofi -show run -normal-window";
|
||||||
|
binding = "<Primary>d";
|
||||||
|
}
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -88,6 +88,7 @@
|
||||||
programs.adb.enable = true;
|
programs.adb.enable = true;
|
||||||
|
|
||||||
# List services that you want to enable:
|
# List services that you want to enable:
|
||||||
|
services.dbus.packages = with pkgs; [ dconf ];
|
||||||
|
|
||||||
# Enable fingerprint reading
|
# Enable fingerprint reading
|
||||||
services.fprintd.enable = true;
|
services.fprintd.enable = true;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue