From 7aa670b28fe4aca8a932dbdf244e6ac8310f2e83 Mon Sep 17 00:00:00 2001 From: Daniele Pintore Date: Fri, 31 Jan 2025 09:03:11 +0100 Subject: [PATCH] Add uwsm to manage hyprland and startup services (still need some thinkering but works) --- .config/hypr/hyprland.conf | 33 +++++++++++++++++---------------- .config/zsh/.zprofile | 5 +++++ 2 files changed, 22 insertions(+), 16 deletions(-) diff --git a/.config/hypr/hyprland.conf b/.config/hypr/hyprland.conf index 61d07cb..466cdcc 100644 --- a/.config/hypr/hyprland.conf +++ b/.config/hypr/hyprland.conf @@ -18,18 +18,19 @@ monitor=eDP-1,1920x1200,auto,1.25 # See https://wiki.hyprland.org/Configuring/Keywords/ for more # Execute your favorite apps at launch -exec-once = hyprlock -exec-once = waybar -exec-once=/usr/lib/polkit-kde-authentication-agent-1 +#exec-once = uwsm app -- hyprlock +exec-once = uwsm app -- waybar +exec-once= uwsm app -- /usr/lib/polkit-kde-authentication-agent-1 # Select random wallpaper from wallpaper folder -exec-once = ~/.config/hypr/change_wallpaper.sh -exec-once = dunst -exec-once = batsignal -b -e -w 30 -c 20 -d 10 -f 100 -exec-once = nm-applet -exec-once = sleep 1 && blueman-applet -exec-once = hypridle -exec-once = sleep 2 && udiskie --tray # automount external hdds or usbs -exec-once = xwaylandvideobridge +exec-once = uwsm app -- swaybg -i ~/.config/hypr/wallpapers/hello-Purple-2-dragged.jpg +#exec-once = ~/.config/hypr/change_wallpaper.sh +exec-once = uwsm app -- dunst +exec-once = uwsm app -- batsignal -b -e -w 30 -c 20 -d 10 -f 100 +exec-once = uwsm app -- nm-applet +exec-once = uwsm app -- sleep 1 && blueman-applet +exec-once = uwsm app -- hypridle +exec-once = uwsm app -- sleep 2 && udiskie --tray # automount external hdds or usbs +exec-once = uwsm app -- xwaylandvideobridge # Source a file (multi-file configs) # source = ~/.config/hypr/myColors.conf @@ -142,16 +143,16 @@ source = ~/.config/hypr/shaders/shader.conf $mainMod = SUPER # Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more -bind = $mainMod, Q, exec, kitty -bind = $mainMod SHIFT, Q, exec, kitty -o background=##03045e -o foreground=##ffffff -d $(pwd) ssh ctf-vm +bind = $mainMod, Q, exec, uwsm app -- kitty +bind = $mainMod SHIFT, Q, exec, uwsm app -- kitty -o background=##03045e -o foreground=##ffffff -d $(pwd) ssh ctf-vm bind = $mainMod, C, killactive, bind = $mainMod, M, exit, -bind = $mainMod, E, exec, nemo -bind = $mainMod, W, exec, firefox +bind = $mainMod, E, exec, uwsm app -- nemo +bind = $mainMod, W, exec, uwsm app -- firefox bind = $mainMod, T, togglefloating, bind = $mainMod, S, exec, IMG=$(xdg-user-dir PICTURES)/Screenshots/$(date +'%s_grim.png') && grim $IMG && wl-copy < $IMG # screenshot bind = $mainMod SHIFT, S, exec, IMG=$(xdg-user-dir PICTURES)/Screenshots/$(date +'%s_grim.png') && grim -g "$(slurp)" $IMG && wl-copy < $IMG # screenshot only a part of the screen -bind = $mainMod, R, exec, rofi -show drun +bind = $mainMod, R, exec, uwsm app -- rofi -run-command='nemo .; {cmd}' -show drun bind = $mainMod, P, pseudo, # dwindle bind = $mainMod, J, togglesplit, # dwindle bind = $mainMod, F, fullscreen, diff --git a/.config/zsh/.zprofile b/.config/zsh/.zprofile index 3954358..ba87b56 100644 --- a/.config/zsh/.zprofile +++ b/.config/zsh/.zprofile @@ -8,3 +8,8 @@ export PATH="$PATH:/home/daniele/go/bin/" export PATH="$PATH:$HOME/.local/scripts/" export CAPACITOR_ANDROID_STUDIO_PATH="/home/daniele/.local/share/JetBrains/Toolbox/apps/android-studio/bin/studio.sh" + +# Launch Hyprland via uwsm +if uwsm check may-start; then + exec uwsm start hyprland.desktop +fi