diff options
Diffstat (limited to 'nixos/cat.nix')
| -rw-r--r-- | nixos/cat.nix | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/nixos/cat.nix b/nixos/cat.nix index 29bb2ea..9ffe6a6 100644 --- a/nixos/cat.nix +++ b/nixos/cat.nix @@ -193,11 +193,25 @@ home.packages = with pkgs; [ *config*) exec "config" ;; *settings*) exec "settings" ;; *wallpaper*) exec "wallpaper" ;; - *ssh*) exec "ssh" ;; *power*) exec "power" ;; esac '') + (writeShellScriptBin "config" '' + options="nix\ncat\nhypr\nvim\nrofi\nzed\ncsgo\ncs2" + choice=$(echo -e "$options" | ${pkgs.rofi}/bin/rofi -dmenu -i -p ">") + + case "$choice" in + *nix*) kitty sudo nvim "/etc/nixos/configuration.nix" ;; + *cat*) kitty sudo nvim "/etc/nixos/cat.nix" ;; + *hypr*) kitty sudo nvim "/etc/nixos/hypr.nix" ;; + *vim*) kitty sudo nvim "/etc/nixos/vim.nix" ;; + *rofi*) ${pkgs.zed-editor}/bin/zeditor "$HOME/.config/rofi/" ;; + *zed*) ${pkgs.zed-editor}/bin/zeditor "$HOME/.config/zed/settings.json" ;; + *csgo*) ${pkgs.zed-editor}/bin/zeditor "$HOME/.local/share/Steam/steamapps/common/csgo legacy/csgo/cfg/autoexec.cfg" ;; + *cs2*) ${pkgs.zed-editor}/bin/zeditor "$HOME/.local/share/Steam/steamapps/common/Counter-Strike Global Offensive/game/csgo/cfg/autoexec.cfg" ;; + esac + (writeShellScriptBin "power" '' options="lock\nlogout\nshutdown\nreboot" choice=$(echo -e "$options" | ${pkgs.rofi}/bin/rofi -dmenu -i -p ">") @@ -205,8 +219,8 @@ home.packages = with pkgs; [ case "$choice" in *lock*) ${pkgs.hyprlock}/bin/hyprlock ;; *logout*) hyprctl dispatch exit ;; - *shutdown*) systemctl poweroff ;; *reboot*) systemctl reboot ;; + *shutdown*) systemctl poweroff ;; esac '') ]; |
