Start Hyprland using uwsm

Still a few broken bits to get working again (1Password on startup,
hyprsunset control), but the important stuff is functional
This commit is contained in:
Michael Bradley 2025-03-25 00:32:06 -04:00
parent 66c5bad209
commit dcc74af714
Signed by: MichaelBradley
SSH key fingerprint: SHA256:cj/YZ5VT+QOKncqSkx+ibKTIn0Obg7OIzwzl9BL8EO8
14 changed files with 92 additions and 90 deletions

View file

@ -7,8 +7,6 @@ The dotfiles are managed with [TOML Bombadil](https://github.com/oknozor/toml-bo
## TODO
* Hyprland
* Start with `uwsm`?
* hyprsunset
* Ramp throughout day
* Wallpaper

View file

@ -18,10 +18,11 @@ discord = { source = "config/electron-flags.conf", target = ".config/discord-fla
git = { source = "git/config", target = ".config/git/config" }
# Also needs a `systemctl --user enable --now ip-geolocation.service` and `systemctl --user enable --now sunset.timer`
# Also needs a `systemctl --user enable --now eww-daemon.service eww-bars.service ip-geolocation.service swww-daemon.service'
eww-daemon = { source = "systemd/eww-daemon.service", target = ".config/systemd/user/eww-daemon.service" }
eww-bars = { source = "systemd/eww-bars.service", target = ".config/systemd/user/eww-bars.service" }
ip-geolocation = { source = "systemd/ip-geolocation.service", target = ".config/systemd/user/ip-geolocation.service" }
sunset-timer = { source = "systemd/sunset.timer", target = ".config/systemd/user/sunset.timer" }
sunset-service = { source = "systemd/sunset.service", target = ".config/systemd/user/sunset.service" }
swww-daemon = { source = "systemd/swww-daemon.service", target = ".config/systemd/user/swww-daemon.service" }
btop = { source = "btop", target = ".config/btop" }
dunst = { source = "dunst", target = ".config/dunst" }
@ -39,6 +40,7 @@ lvim = { source = "lvim/config.lua", target = ".config/lvim/config.lua" }
rofi = { source = "rofi", target = ".config/rofi" }
steam = { source = "steam/steam_dev.cfg", target = ".steam/steam/steam_dev.cfg" }
swaylock = { source = "swaylock", target = ".config/swaylock" }
uwsm = { source = "uwsm", target = ".config/uwsm" }
vim = { source = "vim/vimrc", target = ".config/vim/vimrc" }
yazi = { source = "yazi", target = ".config/yazi" }
zsh = { source = "zsh", target = ".config/zsh" }

View file

@ -1,12 +0,0 @@
#!/bin/env sh
source ~/scripts/env_vars.sh
eww daemon
if [ "$(uname -n)" = "chonk" ]; then
eww open-many left right
else
eww open laptop
fi

View file

@ -1,5 +1,5 @@
monitor=DP-1,1920x1080@165,1920x0,1
monitor=DP-2,1920x1080@165,0x0,1
monitor = DP-1, 1920x1080@165, 1920x0, 1
monitor = DP-2, 1920x1080@165, 0x0, 1
decoration {
blur {

View file

@ -1,12 +1,4 @@
monitor=eDP-1,1920x1080@60,0x0,1
env = GBM_BACKEND,nvidia-drm
env = __GLX_VENDOR_LIBRARY_NAME,nvidia
env = LIBVA_DRIVER_NAME,nvidia
env = __GL_VRR_ALLOWED,0
env = WLR_NO_HARDWARE_CURSORS,1
env = NVD_BACKEND,direct
monitor = eDP-1, 1920x1080@60, 0x0, 1
decoration {
blur {

View file

@ -4,28 +4,11 @@ source = ~/.config/hypr/chonk.conf
source = ~/.config/hypr/hpomen.conf
{% endif %}
monitor=,preferred,auto,1
monitor = , preferred, auto, 1
# Set programs that you use
$terminal = kitty
$menu = /home/mbradley/.config/rofi/launch.sh
env = XCURSOR_SIZE,24
env = GDK_BACKEND,wayland,x11,*
env = SDL_VIDEODRIVER,wayland
env = CLUTTER_BACKEND,wayland
env = XDG_CURRENT_DESKTOP,Hyprland
env = XDG_SESSION_TYPE,wayland
env = XDG_SESSION_DESKTOP,Hyprland
env = QT_AUTO_SCREEN_SCALE_FACTOR,1
env = QT_QPA_PLATFORM,wayland;xcb
env = QT_WAYLAND_DISABLE_WINDOWDECORATION,1
env = QT_QPA_PLATFORMTHEME,qt6ct
env = ELECTRON_OZONE_PLATFORM_HINT,wayland
$terminal = uwsm-app -- kitty
$menu = uwsm-app -- env sh ~/.config/rofi/launch.sh
input {
kb_layout = us
@ -112,9 +95,9 @@ $mainMod = SUPER
bind = SUPER, RETURN, exec, $terminal
bind = SUPER SHIFT, Q, killactive,
bind = SUPER SHIFT, S, exec, ~/scripts/screenshot.sh
bind = SUPER SHIFT, C, exec, hyprpicker -a
bind = SUPER SHIFT, L, exec, swaylock
bind = SUPER SHIFT, S, exec, uwsm-app -- env sh ~/scripts/screenshot.sh
bind = SUPER SHIFT, C, exec, uwsm-app -- hyprpicker -a
bind = SUPER SHIFT, L, exec, uwsm-app -- swaylock
bind = SUPER, F, togglefloating,
@ -159,16 +142,16 @@ bind = $mainMod SHIFT, 0, movetoworkspace, 10
bindm = $mainMod, mouse:272, movewindow
bindm = $mainMod, mouse:273, resizewindow
bind = , XF86AudioRaiseVolume, exec, pactl set-sink-volume @DEFAULT_SINK@ +5%
bind = , XF86AudioLowerVolume, exec, pactl set-sink-volume @DEFAULT_SINK@ -5%
bind = , XF86AudioMute, exec, pactl set-sink-mute @DEFAULT_SINK@ toggle
bind = , XF86AudioMicMute, exec, pactl set-source-mute @DEFAULT_SOURCE@ toggle
bind = , XF86AudioRaiseVolume, exec, uwsm-app -- pactl set-sink-volume @DEFAULT_SINK@ +5%
bind = , XF86AudioLowerVolume, exec, uwsm-app -- pactl set-sink-volume @DEFAULT_SINK@ -5%
bind = , XF86AudioMute, exec, uwsm-app -- pactl set-sink-mute @DEFAULT_SINK@ toggle
bind = , XF86AudioMicMute, exec, uwsm-app -- pactl set-source-mute @DEFAULT_SOURCE@ toggle
bind = , XF86MonBrightnessUp, exec, brightnessctl s +5%
bind = , XF86MonBrightnessDown, exec, brightnessctl s 5%-
bind = , XF86MonBrightnessUp, exec, uwsm-app -- brightnessctl s +5%
bind = , XF86MonBrightnessDown, exec, uwsm-app -- brightnessctl s 5%-
bind = , xf86KbdBrightnessUp, exec, brightnessctl -d *::kbd_backlight set +33%
bind = , xf86KbdBrightnessDown, exec, brightnessctl -d *::kbd_backlight set 33%-
bind = , xf86KbdBrightnessUp, exec, uwsm-app -- brightnessctl -d *::kbd_backlight set +33%
bind = , xf86KbdBrightnessDown, exec, uwsm-app -- brightnessctl -d *::kbd_backlight set 33%-
bind=SUPER,R,submap,resize
submap=resize
@ -180,16 +163,5 @@ bind=,escape,submap,reset
bind=SUPER,R,submap,reset
submap=reset
exec-once = ~/.config/eww/startup.sh
exec-once = swww-daemon
exec-once = ydotoold
exec-once = dunst
exec-once = /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1
exec-once = 1password --silent
exec = ~/scripts/swww_set.py
exec = dunstctl reload
exec-once = dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP HYPRLAND_INSTANCE_SIGNATURE
exec-once = systemctl --user import-environment
exec-once = /usr/bin/dex -a
exec-once = uwsm-app -- systemctl --user import-environment

2
rofi/config.rasi Executable file → Normal file
View file

@ -1,7 +1,7 @@
@theme "arthuredit"
configuration {
modi: "drun,calc,emoji:/usr/bin/rofimoji -a copy -f emojis math,audio:/home/mbradley/dev/rofi-audio/rofi-audio.py";
combi-modi: "drun,filebrowser,emoji";
icon-theme: "Papirus";
show-icons: true;
run-command: "uwsm-app -- {cmd}";
}

View file

@ -1,6 +1,6 @@
#!/bin/env sh
hyprctl keyword unbind CONTROL,TAB
rofi -show drun file-browser-extended calc emoji
rofi -show
#rofi -show drun file-browser-extended calc emoji
hyprctl keyword bind 'CONTROL,TAB,exec,/home/mbradley/.config/rofi/launch.sh'

19
systemd/eww-bars.service Normal file
View file

@ -0,0 +1,19 @@
[Unit]
Description=My custom status bar(s)
After=graphical-session.target
After=swww-daemon.service
Requires=eww-daemon.service
[Service]
Type=exec
{% if host.name == "chonk" %}
ExecStart=eww open-many left right
{% else %}
ExecStart=eww open laptop
{% endif %}
ExecCondition=/lib/systemd/systemd-xdg-autostart-condition "Hyprland" ""
Restart=on-failure
Slice=background-graphical.slice
[Install]
WantedBy=graphical-session.target

View file

@ -0,0 +1,12 @@
[Unit]
Description=Daemon for my custom status bar(s)
After=graphical-session.target
[Service]
Type=exec
ExecStart=eww daemon --no-daemonize
Restart=on-failure
Slice=background-graphical.slice
[Install]
WantedBy=graphical-session.target

View file

@ -1,6 +0,0 @@
[Unit]
Description=Reduces blue light
[Service]
Type=oneshot
ExecStart=hyprsunset -t 3600

View file

@ -1,10 +0,0 @@
[Unit]
Description=Blue light reduction at night
After=graphical.target
[Timer]
OnCalendar=*-*-* 22:00:00
Persistent=true
[Install]
WantedBy=timers.target

View file

@ -0,0 +1,12 @@
[Unit]
Description=Daemon to display desktop wallpapers
After=graphical-session.target
[Service]
Type=exec
ExecStart=swww-daemon
Restart=on-failure
Slice=background-graphical.slice
[Install]
WantedBy=graphical-session.target

23
uwsm/env Normal file
View file

@ -0,0 +1,23 @@
export GTK_THEME=Adwaita:dark
export XCURSOR_SIZE=24
export GDK_BACKEND=wayland,x11,*
export SDL_VIDEODRIVER,wayland
export CLUTTER_BACKEND,wayland
export QT_AUTO_SCREEN_SCALE_FACTOR=1
export QT_QPA_PLATFORM=wayland;xcb
export QT_WAYLAND_DISABLE_WINDOWDECORATION=1
export QT_QPA_PLATFORMTHEME=qt6ct
export ELECTRON_OZONE_PLATFORM_HINT=wayland
{% if host.name == "hpomen" %}
export GBM_BACKEND=nvidia-drm
export __GLX_VENDOR_LIBRARY_NAME=nvidia
export LIBVA_DRIVER_NAME=nvidia
export __GL_VRR_ALLOWED=0
export WLR_NO_HARDWARE_CURSORS=1
export NVD_BACKEND=direct
{% endif %}