diff --git a/flake.lock b/flake.lock index 4de7295..37776b3 100644 --- a/flake.lock +++ b/flake.lock @@ -673,11 +673,11 @@ }, "unstable": { "locked": { - "lastModified": 1766651565, - "narHash": "sha256-QEhk0eXgyIqTpJ/ehZKg9IKS7EtlWxF3N7DXy42zPfU=", + "lastModified": 1768564909, + "narHash": "sha256-Kell/SpJYVkHWMvnhqJz/8DqQg2b6PguxVWOuadbHCc=", "owner": "nixos", "repo": "nixpkgs", - "rev": "3e2499d5539c16d0d173ba53552a4ff8547f4539", + "rev": "e4bae1bd10c9c57b2cf517953ab70060a828ee6f", "type": "github" }, "original": { diff --git a/home/common/optional/desktop/hyprland/hyprland.nix b/home/common/optional/desktop/hyprland/hyprland.nix index 7c5b498..c8511a6 100644 --- a/home/common/optional/desktop/hyprland/hyprland.nix +++ b/home/common/optional/desktop/hyprland/hyprland.nix @@ -59,7 +59,7 @@ "col.inactive_border" = "rgba(595959aa)"; # Set to true enable resizing windows by clicking and dragging on borders and gaps - resize_on_border = false; + resize_on_border = true; # Please see https://wiki.hyprland.org/Configuring/Tearing/ before you turn this on allow_tearing = false; @@ -192,7 +192,7 @@ "$mainMod, F, fullscreen" # bind = $mainMod, J, togglesplit, # dwindle - "$mainMod SHIFT, L, exec, ${scripts.lock}" + "$mainMod SHIFT, Q, exec, ${scripts.lock}" # Move focus with mainMod + arrow keys "$mainMod, H, movefocus, l" @@ -200,6 +200,12 @@ "$mainMod, K, movefocus, u" "$mainMod, J, movefocus, d" + # Swap window with mainMod + shift + arrow keys + "$mainMod SHIFT, H, swapwindow, l" + "$mainMod SHIFT, L, swapwindow, r" + "$mainMod SHIFT, K, swapwindow, u" + "$mainMod SHIFT, J, swapwindow, d" + # Switch workspaces with mainMod + [0-9] "$mainMod, 1, workspace, 1" "$mainMod, 2, workspace, 2" diff --git a/home/common/optional/desktop/hyprland/waybar/config.jsonc b/home/common/optional/desktop/hyprland/waybar/config.jsonc index 229e7dc..812fb43 100644 --- a/home/common/optional/desktop/hyprland/waybar/config.jsonc +++ b/home/common/optional/desktop/hyprland/waybar/config.jsonc @@ -11,7 +11,6 @@ "bluetooth", "network", "pulseaudio", - "cpu", "battery" ], "hyprland/workspaces": { @@ -29,14 +28,13 @@ "8": "8", "9": "9", "10": "0", - "active": "󱓻" + "active": "" }, "persistent-workspaces": { "1": [], "2": [], "3": [], - "4": [], - "5": [] + "4": [] } }, "custom/logo": { @@ -45,12 +43,6 @@ "on-click-right": "xdg-terminal-exec", "tooltip-format": "" }, - "cpu": { - "interval": 5, - "format": "󰍛", - "on-click": "omarchy-launch-or-focus-tui btop", - "on-click-right": "alacritty" - }, "clock": { "format": "{:L%A %I:%M}", "format-alt": "{:L%d %B W%V %Y}", diff --git a/host/common/optional/desktop/cosmic.nix b/host/common/optional/desktop/cosmic.nix new file mode 100644 index 0000000..7103716 --- /dev/null +++ b/host/common/optional/desktop/cosmic.nix @@ -0,0 +1,6 @@ +{ ... }: +{ + services.displayManager.cosmic-greeter.enable = true; + + services.desktopManager.cosmic.enable = true; +} diff --git a/host/common/optional/desktop/hyprland.nix b/host/common/optional/desktop/hyprland.nix index 6edae96..ccb09ba 100644 --- a/host/common/optional/desktop/hyprland.nix +++ b/host/common/optional/desktop/hyprland.nix @@ -1,7 +1,6 @@ { ... }: { imports = [ - ./hyprland/font.nix ./hyprland/cursor.nix ./hyprland/packages.nix ./hyprland/greeter.nix diff --git a/host/common/optional/desktop/hyprland/font.nix b/host/common/optional/font.nix similarity index 100% rename from host/common/optional/desktop/hyprland/font.nix rename to host/common/optional/font.nix diff --git a/host/max/default.nix b/host/max/default.nix index 730fb59..a5f7d9b 100644 --- a/host/max/default.nix +++ b/host/max/default.nix @@ -8,6 +8,8 @@ ./sops.nix ../common/optional/desktop/hyprland.nix + # ../common/optional/desktop/cosmic.nix + ../common/optional/font.nix ../common/optional/yubikey.nix @@ -33,6 +35,15 @@ }; }; + hardware.opengl = { + enable = true; + extraPackages = with pkgs; [ + mesa.opencl + ]; + }; + + services.upower.enable = true; + networking.networkmanager.enable = true; hardware.bluetooth = { @@ -61,11 +72,12 @@ just # mpc - gurk-rs libreoffice-qt # ncmpcpp pkgs-unstable.signal-desktop-bin + pkgs-unstable.gurk-rs + gnupg (pass.withExtensions (exts: [ exts.pass-otp ])) @@ -112,6 +124,14 @@ ${mpg123}/bin/mpg123 "$url" fi '') + + (pkgs.writeShellScriptBin "battery-graph" '' + ${pkgs.coreutils}/bin/tail -n 20 /var/lib/upower/history-charge-bq40z651-69-F8Y3262H468Q1LTA1.dat | ${pkgs.coreutils}/bin/cut -f1,2 | RUBYOPT='-W0' ${pkgs.youplot}/bin/uplot line -w 70 + '') + + (pkgs.writeShellScriptBin "ocr-clip" '' + ${pkgs.grimblast}/bin/grimblast -f save area - | ${pkgs.tesseract}/bin/tesseract stdin stdout | ${pkgs.wl-clipboard}/bin/wl-copy + '') ]; programs.zsh.enable = true; diff --git a/host/max/home/nvim.nix b/host/max/home/nvim.nix index 0691826..cd10676 100644 --- a/host/max/home/nvim.nix +++ b/host/max/home/nvim.nix @@ -20,6 +20,9 @@ cursorline = true; number = true; + tabstop = 2; + expandtab = true; + signcolumn = "yes"; updatetime = 250; @@ -107,7 +110,6 @@ gitsigns.enable = true; highlight-colors.enable = true; todo-comments.enable = true; - # smear-cursor.enable = true; goyo.enable = true; treesitter = { @@ -241,6 +243,7 @@ neo-tree = { enable = true; settings = { + window.width = 25; filesystem = { filtered_items = { visible = true; @@ -273,15 +276,6 @@ extraPlugins = with pkgs.vimPlugins; [ stay-centered-nvim mini-ai - (pkgs.vimUtils.buildVimPlugin { - name = "neominimap"; - src = pkgs.fetchFromGitHub { - owner = "Isrothy"; - repo = "neominimap.nvim"; - rev = "c827a43e5cad146e007c8b1f2a9744798d029e6f"; - hash = "sha256-MQxeYIm0QLS2HROvGLD6Rc21Hqx3USF9OXcw1shNTWg="; - }; - }) ]; }; diff --git a/host/max/home/terminal.nix b/host/max/home/terminal.nix index 21a740e..474f94a 100644 --- a/host/max/home/terminal.nix +++ b/host/max/home/terminal.nix @@ -61,16 +61,22 @@ bindkey '^G' fzf-project fzf-files() { - selected=$(rg --files | fzf) + local selected + selected=$(${pkgs.ripgrep}/bin/rg --files | ${pkgs.fzf}/bin/fzf) || return + if [[ -n $selected ]]; then - xargs $EDITOR $selected - zle reset-prompt + BUFFER="v $selected" + print -s -- "$BUFFER" + zle accept-line fi - zle redisplay } zle -N fzf-files - bindkey -M viins '^F' fzf-files + bindkey '^V' fzf-files + ''; + + envExtra = '' + export PER_DIRECTORY_HISTORY_TOGGLE="^H" ''; shellAliases = { @@ -100,6 +106,15 @@ src = pkgs.zsh-vi-mode; file = "share/zsh-vi-mode/zsh-vi-mode.plugin.zsh"; } + { + name = "per-directory-history"; + src = pkgs.fetchFromGitHub { + owner = "jimhester"; + repo = "per-directory-history"; + rev = "95f06973e9f2ff0ff75f3cebd0a2ee5485e27834"; + sha256 = "sha256-EV9QPBndwAWzdOcghDXrIIgP0oagVMOTyXzoyt8tXRo="; + }; + } ]; }; diff --git a/justfile b/justfile index a5d0930..f99f688 100644 --- a/justfile +++ b/justfile @@ -13,6 +13,12 @@ rebuild: git add . sudo nixos-rebuild switch --flake '.?submodules=1#max' +rebuild-boot: + just add-secrets + + git add . + sudo nixos-rebuild boot --flake '.?submodules=1#max' + rebuild-offline: just add-secrets diff --git a/secrets b/secrets index 1fd5856..7bf9979 160000 --- a/secrets +++ b/secrets @@ -1 +1 @@ -Subproject commit 1fd5856d0bf1e1b7eccfbbae1edc44df38a752c7 +Subproject commit 7bf9979dacb92902fef2b6849b83edcb35b64bbd