hyprland update

This commit is contained in:
foglar 2024-12-20 16:18:36 +01:00
parent 71b6966f2b
commit 943e2b61ad
4 changed files with 22 additions and 16 deletions

2
.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
laptop.qcow2

View File

@ -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

View File

@ -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
'')

View File

@ -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"