From 943e2b61ad30f15b3c8070b507fbb5ae13e00faa Mon Sep 17 00:00:00 2001 From: foglar Date: Fri, 20 Dec 2024 16:18:36 +0100 Subject: [PATCH] hyprland update --- .gitignore | 2 ++ README.md | 4 ++++ nixos/home/desktop/hyprland/dependencies.nix | 8 +++---- nixos/home/desktop/hyprland/hyprland.nix | 24 ++++++++++---------- 4 files changed, 22 insertions(+), 16 deletions(-) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..53dd5c7 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ + +laptop.qcow2 diff --git a/README.md b/README.md index cc9de47..2271053 100644 --- a/README.md +++ b/README.md @@ -7,4 +7,8 @@ git clone https://git.foglar.tech/foglar/dotfiles.git $HOME/dotfiles --depth 1 sudo nixos-rebuild switch --flake ~/dotfiles#laptop ``` +```bash +nix run github:nix-community/nixos-generators -- -c ./flake.nix --flake '#leanix' -f vm --disk-size 20480 +``` + ## Features diff --git a/nixos/home/desktop/hyprland/dependencies.nix b/nixos/home/desktop/hyprland/dependencies.nix index f926304..2b7106e 100644 --- a/nixos/home/desktop/hyprland/dependencies.nix +++ b/nixos/home/desktop/hyprland/dependencies.nix @@ -27,7 +27,7 @@ cliphist (writeShellScriptBin "dontkillsteam" '' - if [[ $(hyprctl activewindow -j | jq -r ".class") == "Steam" ]]; then + if [[ $(hyprctl activewindow -j | ${pkgs.jq}/bin/jq -r ".class") == "Steam" ]]; then xdotool windowunmap $(xdotool getactivewindow) else hyprctl dispatch killactive "" @@ -37,14 +37,14 @@ (writeShellScriptBin "screenshot" '' restore_shader() { if [ -n "$shader" ]; then - hyprshade on "$shader" + ${pkgs.hyprshade}/bin/hyprshade on "$shader" fi } # Saves the current shader and turns it off save_shader() { shader=$(hyprshade current) - hyprshade off + ${pkgs.hyprshade}/bin/hyprshade off trap restore_shader EXIT } @@ -71,7 +71,7 @@ (writeShellScriptBin "keyboardswitch" '' hyprctl switchxkblayout all next - layMain=$(hyprctl -j devices | jq '.keyboards' | jq '.[] | select (.main == true)' | awk -F '"' '{if ($2=="active_keymap") print $4}') + layMain=$(hyprctl -j devices | ${pkgs.jq}/bin/jq '.keyboards' | ${pkgs.jq}/bin/jq '.[] | select (.main == true)' | awk -F '"' '{if ($2=="active_keymap") print $4}') ${libnotify}/bin/notify-send -a "t1" -r 91190 -t 800 "$layMain" -i ~/dotfiles/config/icons/keyboard.svg '') diff --git a/nixos/home/desktop/hyprland/hyprland.nix b/nixos/home/desktop/hyprland/hyprland.nix index c3736b2..8efee62 100644 --- a/nixos/home/desktop/hyprland/hyprland.nix +++ b/nixos/home/desktop/hyprland/hyprland.nix @@ -120,16 +120,16 @@ ]; exec-once = [ - "discord --start-minimized" - "vesktop --start-minimized" + #"discord --start-minimized" + "${pkgs.vesktop}/bin/vesktop --start-minimized" "${pkgs.ferdium}/bin/ferdium --minimized" "${pkgs.kdePackages.kdeconnect-kde}/bin/kdeconnect-indicator" "systemctl --user start hyprpolkitagent" #"swww-daemon --format xrgb" #"swww ../../aurora_borealis.png" - "hypridle" - "waybar" + "${pkgs.hypridle}/bin/hypridle" + "${pkgs.waybar}/bin/waybar" "swayosd-server" "blueman-applet" @@ -149,7 +149,7 @@ "$mod" = "SUPER"; "$term" = "${pkgs.kitty}/bin/kitty"; "$editor" = "${pkgs.vscode}/bin/code"; - "$file" = "nautilus"; + "$file" = "${pkgs.nautilus}/bin/nautilus"; "$browser" = "${pkgs.librewolf}/bin/librewolf"; animations = { @@ -226,21 +226,21 @@ "$mod, W, togglefloating" "$mod, G, togglegroup" "Alt, Return, fullscreen" - "$mod, Escape, exec, hyprlock" + "$mod, Escape, exec, ${pkgs.hyprlock}/bin/hyprlock" #"$mod+Shift,F, exec, windowpin.sh" - "$mod, Backspace, exec, wlogout -b 2" - "$Ctrl+Alt, W, exec, killall waybar || waybar" # toggle waybar + "$mod, Backspace, exec, ${pkgs.wlogout}/bin/wlogout -b 2" + "$Ctrl+Alt, W, exec, killall waybar || ${pkgs.waybar}/bin/waybar" # toggle waybar "$mod, T, exec, $term" "$mod, F, exec, $browser" "$mod, E, exec, $file" "$mod, C, exec, $editor" - "Ctrl+Shift, Escape, exec, btop" + "Ctrl+Shift, Escape, exec, ${pkgs.btop}/bin/btop" # Rofi - "$mod, A, exec, pkill -x rofi || rofi -show drun" - "$mod, Tab, exec, pkill -x rofi || rofi -show window" - "$mod+Shift, E, exec, pkill -x rofi || rofi -show emoji" + "$mod, A, exec, pkill -x rofi || ${pkgs.rofi-wayland}/bin/rofi -show drun" + "$mod, Tab, exec, pkill -x rofi || ${pkgs.rofi-wayland}/bin/rofi -show window" + "$mod+Shift, E, exec, pkill -x rofi || ${pkgs.rofi-wayland}/bin/rofi -show emoji" # Grouped Windows "$mod CTRL, H, changegroupactive, b"