diff --git a/README.md b/README.md index ded37c7..d15dc3d 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/bombadil.toml b/bombadil.toml index 4834417..2588359 100644 --- a/bombadil.toml +++ b/bombadil.toml @@ -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" } diff --git a/eww/startup.sh b/eww/startup.sh deleted file mode 100755 index 9706527..0000000 --- a/eww/startup.sh +++ /dev/null @@ -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 - diff --git a/hypr/chonk.conf b/hypr/chonk.conf index 97942d5..9d2bd7c 100644 --- a/hypr/chonk.conf +++ b/hypr/chonk.conf @@ -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 { diff --git a/hypr/hpomen.conf b/hypr/hpomen.conf index 56a1894..8a072ce 100644 --- a/hypr/hpomen.conf +++ b/hypr/hpomen.conf @@ -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 { diff --git a/hypr/hyprland.conf b/hypr/hyprland.conf index b24a0af..d5d3d9c 100644 --- a/hypr/hyprland.conf +++ b/hypr/hyprland.conf @@ -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 diff --git a/rofi/config.rasi b/rofi/config.rasi old mode 100755 new mode 100644 index 42dd79d..3c63950 --- a/rofi/config.rasi +++ b/rofi/config.rasi @@ -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}"; } diff --git a/rofi/launch.sh b/rofi/launch.sh index 193e2be..5a4bff3 100755 --- a/rofi/launch.sh +++ b/rofi/launch.sh @@ -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' - diff --git a/systemd/eww-bars.service b/systemd/eww-bars.service new file mode 100644 index 0000000..e959396 --- /dev/null +++ b/systemd/eww-bars.service @@ -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 diff --git a/systemd/eww-daemon.service b/systemd/eww-daemon.service new file mode 100644 index 0000000..f66d8ac --- /dev/null +++ b/systemd/eww-daemon.service @@ -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 diff --git a/systemd/sunset.service b/systemd/sunset.service deleted file mode 100644 index 5579286..0000000 --- a/systemd/sunset.service +++ /dev/null @@ -1,6 +0,0 @@ -[Unit] -Description=Reduces blue light - -[Service] -Type=oneshot -ExecStart=hyprsunset -t 3600 diff --git a/systemd/sunset.timer b/systemd/sunset.timer deleted file mode 100644 index bb1b7af..0000000 --- a/systemd/sunset.timer +++ /dev/null @@ -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 diff --git a/systemd/swww-daemon.service b/systemd/swww-daemon.service new file mode 100644 index 0000000..3a3af73 --- /dev/null +++ b/systemd/swww-daemon.service @@ -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 diff --git a/uwsm/env b/uwsm/env new file mode 100644 index 0000000..3037bf3 --- /dev/null +++ b/uwsm/env @@ -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 %}