summaryrefslogtreecommitdiff
path: root/nixos
diff options
context:
space:
mode:
authorcaley <u65487754@gmail.com>2026-05-28 14:22:04 +0200
committerGitHub <noreply@github.com>2026-05-28 14:22:04 +0200
commit6316cec6f30c2d51d93d48be49b99325fe7ea3b9 (patch)
tree216399b393b8a09b117481159882f5fa5c5ec99a /nixos
parent6cae76fd25c96d1c040138289acc49e38812a0a4 (diff)
Update cat.nix
Diffstat (limited to 'nixos')
-rw-r--r--nixos/cat.nix18
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
'')
];