diff options
Diffstat (limited to 'users')
| -rw-r--r-- | users/kassouni/home.nix | 4 | ||||
| -rw-r--r-- | users/kassouni/palette/bluetooth.nix | 2 | ||||
| -rw-r--r-- | users/kassouni/palette/default.nix | 20 | ||||
| -rw-r--r-- | users/kassouni/palette/kbd-backlight.nix | 20 |
4 files changed, 12 insertions, 34 deletions
diff --git a/users/kassouni/home.nix b/users/kassouni/home.nix index 6242863..9268980 100644 --- a/users/kassouni/home.nix +++ b/users/kassouni/home.nix @@ -26,6 +26,8 @@ ./palette ]; + home.username = "kassouni"; + xmonad-config = { launcher = "rofi -show drun -show-icons"; terminal = "ghostty"; @@ -68,7 +70,7 @@ enable = true; # modesetting has no TearFree option, so the compositor has to do the # syncing. home-manager defaults vSync to false, which tears. - backend = "glx"; + backend = "egl"; vSync = true; }; diff --git a/users/kassouni/palette/bluetooth.nix b/users/kassouni/palette/bluetooth.nix index 58cdf2f..71e1aaf 100644 --- a/users/kassouni/palette/bluetooth.nix +++ b/users/kassouni/palette/bluetooth.nix @@ -3,7 +3,7 @@ kassouni.palette.commands = [ { - name = "toggle bluetooth device"; + name = "bluetooth"; icon = ""; # `jc --bluetoothctl` turns `bluetoothctl devices` into JSON, so the menu is # built from parsed records rather than by splitting "Device <addr> <name>" diff --git a/users/kassouni/palette/default.nix b/users/kassouni/palette/default.nix index 7e9eec4..403aa60 100644 --- a/users/kassouni/palette/default.nix +++ b/users/kassouni/palette/default.nix @@ -6,18 +6,15 @@ }: let cfg = config.kassouni.palette; - - # Every sibling .nix file is an ordinary home-manager module that appends to - # kassouni.palette.commands, so dropping a file in here adds an entry. - commandModules = map (file: ./. + "/${file}") ( - lib.attrNames ( - lib.filterAttrs (name: type: type == "regular" && name != "default.nix" && lib.hasSuffix ".nix" name) - (builtins.readDir ./.) - ) - ); in { - imports = commandModules; + imports = [ + ./bluetooth.nix + ./reboot.nix + ./rebuild.nix + ./screenshot.nix + ./shutdown.nix + ]; options.kassouni.palette.commands = lib.mkOption { type = lib.types.listOf ( @@ -40,8 +37,7 @@ in ); default = [ ]; description = '' - Entries shown in the rofi command palette. Menu order follows module - import order, which is alphabetical by filename. + Entries shown in the rofi command palette. ''; }; diff --git a/users/kassouni/palette/kbd-backlight.nix b/users/kassouni/palette/kbd-backlight.nix deleted file mode 100644 index 9da0fb9..0000000 --- a/users/kassouni/palette/kbd-backlight.nix +++ /dev/null @@ -1,20 +0,0 @@ -{ pkgs, ... }: -{ - kassouni.palette.commands = [ - { - name = "toggle keyboard backlight"; - icon = ""; - # The leds sysfs node is group-writable by `video`, which kassouni is in, so - # this needs no root. Toggle between off and full rather than cycling levels. - exe = pkgs.writers.writeBash "kbd-backlight" '' - set -eu - dev=framework_laptop::kbd_backlight - if [ "$(${pkgs.brightnessctl}/bin/brightnessctl -d "$dev" get)" -gt 0 ]; then - ${pkgs.brightnessctl}/bin/brightnessctl -d "$dev" set 0 - else - ${pkgs.brightnessctl}/bin/brightnessctl -d "$dev" set 100% - fi - ''; - } - ]; -} |
