From 251b8fd0fcc4c9944bba73a61872c3ae4dabff4a Mon Sep 17 00:00:00 2001 From: Nico Date: Sat, 21 Jun 2025 18:52:30 +1000 Subject: [PATCH 1/6] hyprland: update window rules for the firefox picture in picture window to match bar commit 0bf183ffeeb0fd77be1f6e519bb7faea99078ef2 makes the waybar vertical, making it so the location for the firefox picture in picture window need to be updated to match. --- stow/.config/hypr/hyprland.conf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stow/.config/hypr/hyprland.conf b/stow/.config/hypr/hyprland.conf index f0ef64d..074b935 100755 --- a/stow/.config/hypr/hyprland.conf +++ b/stow/.config/hypr/hyprland.conf @@ -260,8 +260,8 @@ windowrulev2 = float,initialTitle:(^flameshot$) windowrulev2 = float, initialTitle:(^Picture-in-Picture$), initialClass:(^firefox$) windowrulev2 = pin, initialTitle:(^Picture-in-Picture$), initialClass:(^firefox$) windowrulev2 = noinitialfocus, initialTitle:(^Picture-in-Picture$), initialClass:(^firefox$) -windowrulev2 = size 502 286, initialTitle:(^Picture-in-Picture$), initialClass:(^firefox$) -windowrulev2 = move 72% 6%, initialTitle:(^Picture-in-Picture$), initialClass:(^firefox$) +windowrulev2 = size 20%, initialTitle:(^Picture-in-Picture$), initialClass:(^firefox$) +windowrulev2 = move 76% 0.5%, initialTitle:(^Picture-in-Picture$), initialClass:(^firefox$) windowrulev2 = keepaspectratio, initialTitle:(^Picture-in-Picture$), initialClass:(^firefox$) windowrulev2 = move -100% -100%, initialClass:(^xwaylandvideobridge$) From a4d80e2ebc100a260b1b307b0e062e4e86c859ea Mon Sep 17 00:00:00 2001 From: Nico Date: Sat, 21 Jun 2025 18:55:41 +1000 Subject: [PATCH 2/6] hyprland: automatically start 1password --- stow/.config/hypr/hyprland.conf | 1 + 1 file changed, 1 insertion(+) diff --git a/stow/.config/hypr/hyprland.conf b/stow/.config/hypr/hyprland.conf index 074b935..0106617 100755 --- a/stow/.config/hypr/hyprland.conf +++ b/stow/.config/hypr/hyprland.conf @@ -23,6 +23,7 @@ exec-once = opensnitch-ui exec-once = systemctl status --user polkit-gnome-authentication-agent-1.service exec-once = steam -silent & +exec-once = 1password --silent & ############################# ### ENVIRONMENT VARIABLES ### From 4699ff68e04c9d1e3a1cfff28fb56750531ed6a1 Mon Sep 17 00:00:00 2001 From: Nico Date: Sat, 21 Jun 2025 19:06:38 +1000 Subject: [PATCH 3/6] hyprland: set a bind for 1password quick access --- stow/.config/hypr/hyprland.conf | 3 +++ 1 file changed, 3 insertions(+) diff --git a/stow/.config/hypr/hyprland.conf b/stow/.config/hypr/hyprland.conf index 0106617..0c0d583 100755 --- a/stow/.config/hypr/hyprland.conf +++ b/stow/.config/hypr/hyprland.conf @@ -168,6 +168,7 @@ $mainMod = SUPER # Sets "Windows" key as main modifier bind = $mainMod, Q, exec, ghostty bind = $mainMod, B, exec, firefox bind = $mainMod, D, exec, walker +bind = $mainMod shift, D, exec, 1password --quick-access bind = $mainMod, S, exec, hyprshot -z --clipboard-only -m region bind = $mainMod shift, S, exec, hyprshot -z --clipboard-only -m window bind = $mainMod control, S, exec, hyprshot -z --clipboard-only -m active @@ -255,6 +256,8 @@ windowrulev2 = noshadow,initialClass:ulauncher windowrulev2 = float,initialTitle:(^KeePassXC - Browser Access Request$) +windowrulev2 = stayfocused,initialTitle:(^Quick Access — 1Password$) + windowrulev2 = noanim,initialTitle:(^flameshot$) windowrulev2 = float,initialTitle:(^flameshot$) From eda1f4129cab262a552b19e8ed9e6e74526a9fed Mon Sep 17 00:00:00 2001 From: Nico Date: Sat, 21 Jun 2025 19:07:00 +1000 Subject: [PATCH 4/6] hyprland: fix starting gnome polkit agent uhhhhh... it was status instead of start. oopsies --- stow/.config/hypr/hyprland.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stow/.config/hypr/hyprland.conf b/stow/.config/hypr/hyprland.conf index 0c0d583..bad31d8 100755 --- a/stow/.config/hypr/hyprland.conf +++ b/stow/.config/hypr/hyprland.conf @@ -20,7 +20,7 @@ exec-once = hyprshade auto & exec-once = walker --gapplication-service exec-once = opensnitch-ui -exec-once = systemctl status --user polkit-gnome-authentication-agent-1.service +exec-once = systemctl start --user polkit-gnome-authentication-agent-1.service exec-once = steam -silent & exec-once = 1password --silent & From 69ceb5dcc526b6ddaad97d481e56f2f27669b931 Mon Sep 17 00:00:00 2001 From: Nico Date: Sat, 21 Jun 2025 20:10:57 +1000 Subject: [PATCH 5/6] fish: init --- modules/shell.nix | 4 + modules/users/nico.nix | 2 +- stow/.config/fish/config.fish | 22 +++++ stow/.config/fish/fish_variables | 97 +++++++++++++++++++ stow/.config/fish/functions/0x0.fish | 9 ++ stow/.config/fish/functions/cat.fish | 4 + stow/.config/fish/functions/la.fish | 4 + stow/.config/fish/functions/ll.fish | 4 + stow/.config/fish/functions/ls.fish | 4 + stow/.config/fish/functions/posix-source.fish | 6 ++ stow/.config/fish/functions/rm.fish | 4 + stow/.config/fish/functions/v.fish | 4 + stow/.config/fish/functions/vi.fish | 4 + stow/.config/fish/functions/vim.fish | 4 + 14 files changed, 171 insertions(+), 1 deletion(-) create mode 100644 stow/.config/fish/config.fish create mode 100644 stow/.config/fish/fish_variables create mode 100644 stow/.config/fish/functions/0x0.fish create mode 100644 stow/.config/fish/functions/cat.fish create mode 100644 stow/.config/fish/functions/la.fish create mode 100644 stow/.config/fish/functions/ll.fish create mode 100644 stow/.config/fish/functions/ls.fish create mode 100644 stow/.config/fish/functions/posix-source.fish create mode 100644 stow/.config/fish/functions/rm.fish create mode 100644 stow/.config/fish/functions/v.fish create mode 100644 stow/.config/fish/functions/vi.fish create mode 100644 stow/.config/fish/functions/vim.fish diff --git a/modules/shell.nix b/modules/shell.nix index 91cbc83..2d0a94c 100644 --- a/modules/shell.nix +++ b/modules/shell.nix @@ -4,6 +4,8 @@ programs.zsh.enable = true; programs.zsh.promptInit = ( builtins.readFile ../stow/.zshrc ); + programs.fish.enable = true; + environment.systemPackages = with pkgs; [ neovim git @@ -26,6 +28,8 @@ ffmpeg imagemagick + ] ++ lib.optionals config.programs.fish.enable [ + pkgs.fishPlugins.pure ] ++ lib.optionals pkgs.stdenv.isLinux [ pkgs.trash-cli ]; programs.tmux.enable = true; diff --git a/modules/users/nico.nix b/modules/users/nico.nix index bbe4da7..317b762 100644 --- a/modules/users/nico.nix +++ b/modules/users/nico.nix @@ -4,7 +4,7 @@ users.users.nico = { isNormalUser = true; extraGroups = [ "wheel" ]; - shell = pkgs.zsh; + shell = pkgs.fish; }; users.users.nico.openssh.authorizedKeys.keys = [ diff --git a/stow/.config/fish/config.fish b/stow/.config/fish/config.fish new file mode 100644 index 0000000..e977293 --- /dev/null +++ b/stow/.config/fish/config.fish @@ -0,0 +1,22 @@ +if status is-interactive + # Commands to run in interactive sessions can go here + + # match prompt symbol to OS logo + if test -e /System + set pure_symbol_prompt "" + else + posix-source /etc/os-release + if [ "$ID" = "nixos" ] + set pure_symbol_prompt "" + else if [ "$ID" = "debian" ] + set pure_symbol_prompt "" + else if [ "$ID" = "fedora" ] + set pure_symbol_prompt "" + else if [ "$ID" = "arch" ] + set pure_symbol_prompt "󰣇" + end + end + + set pure_enable_single_line_prompt true + zoxide init fish | source +end diff --git a/stow/.config/fish/fish_variables b/stow/.config/fish/fish_variables new file mode 100644 index 0000000..1725016 --- /dev/null +++ b/stow/.config/fish/fish_variables @@ -0,0 +1,97 @@ +# This file contains fish universal variable definitions. +# VERSION: 3.0 +SETUVAR __fish_initialized:3800 +SETUVAR fish_color_autosuggestion:brblack +SETUVAR fish_color_cancel:\x2dr +SETUVAR fish_color_command:normal +SETUVAR fish_color_comment:red +SETUVAR fish_color_cwd:green +SETUVAR fish_color_cwd_root:red +SETUVAR fish_color_end:green +SETUVAR fish_color_error:brred +SETUVAR fish_color_escape:brcyan +SETUVAR fish_color_history_current:\x2d\x2dbold +SETUVAR fish_color_host:normal +SETUVAR fish_color_host_remote:yellow +SETUVAR fish_color_normal:normal +SETUVAR fish_color_operator:brcyan +SETUVAR fish_color_param:cyan +SETUVAR fish_color_quote:yellow +SETUVAR fish_color_redirection:cyan\x1e\x2d\x2dbold +SETUVAR fish_color_search_match:white\x1e\x2d\x2dbackground\x3dbrblack +SETUVAR fish_color_selection:white\x1e\x2d\x2dbold\x1e\x2d\x2dbackground\x3dbrblack +SETUVAR fish_color_status:red +SETUVAR fish_color_user:brgreen +SETUVAR fish_color_valid_path:\x2d\x2dunderline +SETUVAR fish_key_bindings:fish_default_key_bindings +SETUVAR fish_pager_color_completion:normal +SETUVAR fish_pager_color_description:yellow\x1e\x2di +SETUVAR fish_pager_color_prefix:normal\x1e\x2d\x2dbold\x1e\x2d\x2dunderline +SETUVAR fish_pager_color_progress:brwhite\x1e\x2d\x2dbackground\x3dcyan +SETUVAR fish_pager_color_selected_background:\x2dr +SETUVAR pure_begin_prompt_with_current_directory:true +SETUVAR pure_check_for_new_release:false +SETUVAR pure_color_at_sign:pure_color_mute +SETUVAR pure_color_aws_profile:pure_color_warning +SETUVAR pure_color_command_duration:pure_color_warning +SETUVAR pure_color_current_directory:pure_color_primary +SETUVAR pure_color_danger:red +SETUVAR pure_color_dark:black +SETUVAR pure_color_git_branch:pure_color_mute +SETUVAR pure_color_git_dirty:pure_color_mute +SETUVAR pure_color_git_stash:pure_color_info +SETUVAR pure_color_git_unpulled_commits:pure_color_info +SETUVAR pure_color_git_unpushed_commits:pure_color_info +SETUVAR pure_color_hostname:pure_color_mute +SETUVAR pure_color_info:cyan +SETUVAR pure_color_jobs:pure_color_normal +SETUVAR pure_color_k8s_context:pure_color_success +SETUVAR pure_color_k8s_namespace:pure_color_primary +SETUVAR pure_color_k8s_prefix:pure_color_info +SETUVAR pure_color_light:white +SETUVAR pure_color_mute:brblack +SETUVAR pure_color_nixdevshell_prefix:pure_color_info +SETUVAR pure_color_nixdevshell_symbol:pure_color_mute +SETUVAR pure_color_normal:normal +SETUVAR pure_color_prefix_root_prompt:pure_color_danger +SETUVAR pure_color_primary:blue +SETUVAR pure_color_prompt_on_error:pure_color_danger +SETUVAR pure_color_prompt_on_success:pure_color_success +SETUVAR pure_color_success:magenta +SETUVAR pure_color_system_time:pure_color_mute +SETUVAR pure_color_username_normal:pure_color_mute +SETUVAR pure_color_username_root:pure_color_light +SETUVAR pure_color_virtualenv:pure_color_mute +SETUVAR pure_color_warning:yellow +SETUVAR pure_enable_aws_profile:true +SETUVAR pure_enable_container_detection:true +SETUVAR pure_enable_git:true +SETUVAR pure_enable_k8s:false +SETUVAR pure_enable_nixdevshell:false +SETUVAR pure_enable_single_line_prompt:true +SETUVAR pure_enable_virtualenv:true +SETUVAR pure_reverse_prompt_symbol_in_vimode:true +SETUVAR pure_separate_prompt_on_error:false +SETUVAR pure_shorten_prompt_current_directory_length:0 +SETUVAR pure_shorten_window_title_current_directory_length:0 +SETUVAR pure_show_jobs:false +SETUVAR pure_show_prefix_root_prompt:false +SETUVAR pure_show_subsecond_command_duration:false +SETUVAR pure_show_system_time:false +SETUVAR pure_symbol_aws_profile_prefix: +SETUVAR pure_symbol_container_prefix: +SETUVAR pure_symbol_git_dirty:\x2a +SETUVAR pure_symbol_git_stash:\u2261 +SETUVAR pure_symbol_git_unpulled_commits:\u21e3 +SETUVAR pure_symbol_git_unpushed_commits:\u21e1 +SETUVAR pure_symbol_k8s_prefix:\u2638 +SETUVAR pure_symbol_nixdevshell_prefix:\u2744\ufe0f +SETUVAR pure_symbol_prefix_root_prompt:\x23 +SETUVAR pure_symbol_prompt:\ue843 +SETUVAR pure_symbol_reverse_prompt:\u276e +SETUVAR pure_symbol_ssh_prefix: +SETUVAR pure_symbol_title_bar_separator:\x2d +SETUVAR pure_symbol_virtualenv_prefix: +SETUVAR pure_threshold_command_duration:5 +SETUVAR pure_truncate_prompt_current_directory_keeps:\x2d1 +SETUVAR pure_truncate_window_title_current_directory_keeps:\x2d1 diff --git a/stow/.config/fish/functions/0x0.fish b/stow/.config/fish/functions/0x0.fish new file mode 100644 index 0000000..195318b --- /dev/null +++ b/stow/.config/fish/functions/0x0.fish @@ -0,0 +1,9 @@ +function 0x0 --description 'Uploads a file or folder to 0x0.st' + if test -d "$argv" + set TMPFILE "$(mktemp --suffix '.tar')" + tar cf "$TMPFILE" "$argv" + curl -F file="@$TMPFILE" -F expires=24 https://0x0.st + else + curl -F file=@"$argv" -F expires=24 https://0x0.st + end +end diff --git a/stow/.config/fish/functions/cat.fish b/stow/.config/fish/functions/cat.fish new file mode 100644 index 0000000..abbc480 --- /dev/null +++ b/stow/.config/fish/functions/cat.fish @@ -0,0 +1,4 @@ +function cat --wraps=bat --description 'alias cat bat' + bat $argv + +end diff --git a/stow/.config/fish/functions/la.fish b/stow/.config/fish/functions/la.fish new file mode 100644 index 0000000..d33eb8f --- /dev/null +++ b/stow/.config/fish/functions/la.fish @@ -0,0 +1,4 @@ +function la --wraps='ls -ah --color=auto' --description 'alias la=ls -ah --color=auto' + ls -ah --color=auto $argv + +end diff --git a/stow/.config/fish/functions/ll.fish b/stow/.config/fish/functions/ll.fish new file mode 100644 index 0000000..874614f --- /dev/null +++ b/stow/.config/fish/functions/ll.fish @@ -0,0 +1,4 @@ +function ll --wraps='ls -l' --wraps='ls -ahl --color=auto' --description 'alias ll=ls -ahl --color=auto' + ls -ahl --color=auto $argv + +end diff --git a/stow/.config/fish/functions/ls.fish b/stow/.config/fish/functions/ls.fish new file mode 100644 index 0000000..eaf48c8 --- /dev/null +++ b/stow/.config/fish/functions/ls.fish @@ -0,0 +1,4 @@ +function ls --description 'alias ls=ls -h --color=auto' + command ls -h --color=auto $argv + +end diff --git a/stow/.config/fish/functions/posix-source.fish b/stow/.config/fish/functions/posix-source.fish new file mode 100644 index 0000000..5147014 --- /dev/null +++ b/stow/.config/fish/functions/posix-source.fish @@ -0,0 +1,6 @@ +function posix-source + for i in (cat $argv) + set arr (echo $i |tr = \n) + set -gx $arr[1] $arr[2] + end +end diff --git a/stow/.config/fish/functions/rm.fish b/stow/.config/fish/functions/rm.fish new file mode 100644 index 0000000..5d4ae5f --- /dev/null +++ b/stow/.config/fish/functions/rm.fish @@ -0,0 +1,4 @@ +function rm --wraps=trash --description 'alias rm trash' + trash $argv + +end diff --git a/stow/.config/fish/functions/v.fish b/stow/.config/fish/functions/v.fish new file mode 100644 index 0000000..c4c8a12 --- /dev/null +++ b/stow/.config/fish/functions/v.fish @@ -0,0 +1,4 @@ +function v --wraps=nvim --description 'alias v nvim' + nvim $argv + +end diff --git a/stow/.config/fish/functions/vi.fish b/stow/.config/fish/functions/vi.fish new file mode 100644 index 0000000..1f236aa --- /dev/null +++ b/stow/.config/fish/functions/vi.fish @@ -0,0 +1,4 @@ +function vi --wraps=nvim --description 'alias vi nvim' + nvim $argv + +end diff --git a/stow/.config/fish/functions/vim.fish b/stow/.config/fish/functions/vim.fish new file mode 100644 index 0000000..67df688 --- /dev/null +++ b/stow/.config/fish/functions/vim.fish @@ -0,0 +1,4 @@ +function vim --wraps=nvim --description 'alias vim nvim' + nvim $argv + +end From 6812a7f968f261ab6aa58d980b81b9f85888fe06 Mon Sep 17 00:00:00 2001 From: Nico Date: Sat, 21 Jun 2025 20:12:14 +1000 Subject: [PATCH 6/6] kita: add user configuration --- flake.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/flake.nix b/flake.nix index b9c10f2..757e07b 100644 --- a/flake.nix +++ b/flake.nix @@ -92,6 +92,7 @@ ./modules/nix/darwin.nix ./modules/network/vpn/tailscale-darwin.nix + ./modules/users/nico.nix ./hosts/kita/conf.nix ]; };