feat(keybinds): add options to specify keybinds

this adds two new options:
nixos95.keybinds.commands -> specify normal shortcuts
nixos95.keybinds.xfwm4    -> specify xfwm4 related shortcuts
This commit is contained in:
gytic 2025-07-28 15:24:12 +02:00
parent 4f5206479f
commit d5458a9fcf
4 changed files with 110 additions and 207 deletions

View file

@ -6,6 +6,7 @@
cfg = config.nixos95.taskbar;
user = config.nixos95.user;
t = lib.types;
slib = pkgs.callPackage ./util/lib.nix { };
in {
options.nixos95.taskbar = {
@ -108,14 +109,14 @@ in {
battery_xml = ifBattery '' <property name="plugin-7" type="string" value="battery" /> '';
applications_cfg = cfg.applications
|> lib.filter ( elm : !( lib.hasAttr "enable" elm) || elm.enable )
|> lib.filter slib.isEnable
|> lib.imap0 ( ptr : elm : rec {
# we start IDs in the 20 range to not get confilics with other plugins
plugin_id = "2" + builtins.toString ptr;
plugin_desktop = let
desc = if elm ? description then elm.description else "";
term = if elm ? term && elm.term then "true" else "false";
exec = if elm ? pkg then lib.getExe elm.pkg else elm.exe;
exec = slib.getExe elm;
in pkgs.writeTextFile {
name = "${elm.name}.desktop";
text = ''