From 6316cec6f30c2d51d93d48be49b99325fe7ea3b9 Mon Sep 17 00:00:00 2001 From: caley Date: Thu, 28 May 2026 14:22:04 +0200 Subject: Update cat.nix --- nixos/cat.nix | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) (limited to 'nixos') 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 '') ]; -- cgit v1.3.1