diff --git a/options/custom/desktops/hyprland/binds.nix b/options/custom/desktops/hyprland/binds.nix index d38c5bb..6fe438b 100644 --- a/options/custom/desktops/hyprland/binds.nix +++ b/options/custom/desktops/hyprland/binds.nix @@ -153,6 +153,8 @@ in { (key "Return" "Super+Shift" "fullscreen" "0") # Fullscreen (key "Right" "Super" "movewindow" "r") (key "Right" "Super+Shift" "movewindoworgroup" "r") + (key "Semicolon" "Super" "exec" "${hyprpicker} --autocopy") + (key "Semicolon" "Super+Shift" "exec" "${hyprpicker} --autocopy --format rgb") (key "Slash" "Super" "exec" vrr) (key "Space" "Ctrl" "exec" (concatStringsSep " " [ "${toggle}" @@ -225,8 +227,9 @@ in { (key "O" "Super" "togglespecialworkspace" "office") (key "O" "Super+Ctrl" "exec" "${onlyoffice}") (key "O" "Super+Shift" "movetoworkspacesilent" "special:office") - (key "P" "Super" "exec" "${hyprpicker} --autocopy") - (key "P" "Super+Shift" "exec" "${hyprpicker} --autocopy --format rgb") + (key "P" "Ctrl+Alt" "exec" "${pkill} 1password") + (key "P" "Super" "togglespecialworkspace" "password") + (key "P" "Super+Shift" "movetoworkspacesilent" "special:password") (key "Q" "Ctrl+Alt" "exec" "${kill} -9 $(${hyprctl} -j activewindow | ${jq} .pid)") (key "Q" "Ctrl+Alt+Shift" "exec" "close") # Quit all windows (key "Q" "Super" "killactive" null) diff --git a/options/custom/desktops/hyprland/rules.nix b/options/custom/desktops/hyprland/rules.nix index e2814b9..baf0947 100644 --- a/options/custom/desktops/hyprland/rules.nix +++ b/options/custom/desktops/hyprland/rules.nix @@ -5,6 +5,7 @@ ... }: with lib; let + _1password = "${config.programs._1password-gui.package}/bin/1password"; gamescope = "${config.programs.gamescope.package}/bin/gamescope"; hyprctl = "${config.programs.hyprland.package}/bin/hyprctl"; kitty = "${config.home-manager.users.${config.custom.username}.programs.kitty.package}/bin/kitty"; @@ -171,6 +172,10 @@ in { (class "libreoffice.+" rules) (class "ONLYOFFICE Desktop Editors" rules) ]; + password = rules: [ + (class "1Password" rules) + (class "Bitwarden" rules) + ]; pip = rules: [ (title "Picture.in.[Pp]icture" rules) ]; @@ -214,6 +219,7 @@ in { (tag.game ["fullscreen" "group barred" "idleinhibit always" "noborder" "noshadow" "renderunfocused" "workspace name:game"]) (tag.music ["tile" "workspace special:music"]) (tag.office ["workspace special:office"]) + (tag.password ["center" "workspace special:password"]) (tag.pip ["keepaspectratio" "move ${pip.x} ${pip.y}" "pin" "size ${pip.w} ${pip.h}"]) (tag.social ["group" "tile"]) (tag.steam ["workspace special:steam"]) @@ -226,10 +232,6 @@ in { (class "Tap Wizard 2.x86_64" ["workspace 0"]) #!! Expressions are not wrapped in ^$ - (fields { - class = "^1Password$"; - title = "^1Password$"; - } ["center"]) (fields { class = "^com\\.github\\.wwmm\\.easyeffects$"; title = "^Easy Effects$"; # Main window diff --git a/options/custom/desktops/hyprland/settings.nix b/options/custom/desktops/hyprland/settings.nix index f41c8b7..9a72f7f 100644 --- a/options/custom/desktops/hyprland/settings.nix +++ b/options/custom/desktops/hyprland/settings.nix @@ -5,6 +5,7 @@ ... }: with lib; let + _1password = "${config.programs._1password-gui.package}/bin/1password"; clipse = "${pkgs.clipse}/bin/clipse"; firefox-esr = "${ config.home-manager.users.${config.custom.username}.programs.firefox.finalPackage @@ -73,6 +74,7 @@ in { sway-audio-idle-inhibit # Inhibit idle while audio is playing "${clipse} --clear" # Clear clipboard history "${clipse} --listen" # Monitor clipboard + "${_1password} --silent" # Launch password manager in background "[group new lock; tile] ${firefox-esr}" ]; diff --git a/options/custom/programs/1password.nix b/options/custom/programs/1password.nix index 2349752..df55e6c 100644 --- a/options/custom/programs/1password.nix +++ b/options/custom/programs/1password.nix @@ -5,9 +5,9 @@ ... }: with lib; let - cfg = config.custom.programs."1password"; + cfg = config.custom.programs._1password; in { - options.custom.programs."1password".enable = mkOption {default = false;}; + options.custom.programs._1password.enable = mkOption {default = false;}; config = mkIf cfg.enable { programs = { diff --git a/options/custom/programs/default.nix b/options/custom/programs/default.nix index f14c0b3..93d810d 100644 --- a/options/custom/programs/default.nix +++ b/options/custom/programs/default.nix @@ -37,7 +37,7 @@ with lib; { }) (mkIf config.custom.full { - "1password".enable = true; + _1password.enable = true; adb.enable = true; ags.enable = true; #// anyrun.enable = true; diff --git a/options/custom/programs/ssh.nix b/options/custom/programs/ssh.nix index 00330f6..19ab510 100644 --- a/options/custom/programs/ssh.nix +++ b/options/custom/programs/ssh.nix @@ -14,5 +14,14 @@ in { programs.ssh.extraConfig = '' StrictHostKeyChecking no ''; + + home-manager.users.${config.custom.username}.programs.ssh = { + enable = true; + + extraConfig = '' + Host * + IdentityAgent ~/.1password/agent.sock + ''; + }; }; } diff --git a/options/custom/programs/waybar/default.nix b/options/custom/programs/waybar/default.nix index e62fc2b..b7e6b7c 100644 --- a/options/custom/programs/waybar/default.nix +++ b/options/custom/programs/waybar/default.nix @@ -170,6 +170,7 @@ in { game = "󰊴"; music = "󰝚"; office = "󰈙"; + password = "󰌾"; pip = "󰹙"; scratchpad = ""; steam = "󰓓";