diff --git a/appearance.conf b/appearance.conf index 23f8447..f266364 100644 --- a/appearance.conf +++ b/appearance.conf @@ -12,7 +12,7 @@ general { border_size = 2 # https://wiki.hyprland.org/Configuring/Variables/#variable-types for info about colors - col.active_border = rgba(ffd7afaa) + col.active_border = rgba(fabd2f99) col.inactive_border = rgba(595959aa) # Set to true enable resizing windows by clicking and dragging on borders and gaps @@ -92,7 +92,7 @@ animations { # See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more dwindle { - pseudotile = true # Master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below + #pseudotile = true # Master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below preserve_split = true # You probably want this } @@ -103,7 +103,7 @@ master { # https://wiki.hyprland.org/Configuring/Variables/#misc misc { - new_window_takes_over_fullscreen = 1 + on_focus_under_fullscreen = 1 force_default_wallpaper = 0 # Set to 0 or 1 to disable the anime mascot wallpapers disable_hyprland_logo = true # If true disables the random hyprland logo / anime girl background. :( } diff --git a/autostart.conf b/autostart.conf index 8c54c27..5702780 100644 --- a/autostart.conf +++ b/autostart.conf @@ -1,27 +1,49 @@ -# Hyprland exosystem stuff +# Run XDG autostart files (for GNOME Keyring, etc.) +#exec-once = uwsm-app -s s -- dbus-update-activation-environment --systemd --all +#exec-once = xdg-desktop-portal-hyprland +#exec-once = xdg-desktop-portal +#exec-once = dex --autostart --environment Hyprland +#exec-once = uwsm-app -s s -- gnome-keyring-daemon --start --components=ssh,secrets,pkcs11 +#exec-once = ~/.config/hypr/scripts/gnome-keyring.sh +#exec-once = ~/.config/hypr/scripts/startup.zsh + +# env setup +exec-once = dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP +# monitor profiles (Kanshi) +exec-once = uwsm-app -- kanshi + +# Hyprland ecosystem stuff exec-once = hyprpolkitagent -exec-once = hypridle -exec-once = hyprpaper -exec-once = tmux setenv -g HYPRLAND_INSTANCE_SIGNATURE "${HYPRLAND_INSTANCE_SIGNATURE}" +exec-once = uwsm app -- hypridle +exec-once = uwsm app -- hyprpaper + + +# status bar +#exec-once = eww daemon && eww open bar +#exec-once = uwsm-app -- eww daemon +exec-once = uwsm app -- waybar +#exec-once = ~/.config/hypr/scripts/setup-monitors.zsh + +# espanso (text expander0 +exec-once = uwsm app -- espanso start # notification daemon -exec-once = dunst +exec-once = uwsm app -- dunst # systray apps exec-once = nm-applet exec-once = signal-desktop -exec-once = sleep 15 && hp-systray -exec-once = sleep 15 && blueman-applet - -# status bar -exec-once = eww daemon && eww open bar +exec-once = hp-systray +exec-once = blueman-applet +#exec-once = syncthingtray-qt6 --wait # clipboard exec-once = wl-paste --watch cliphist store exec-once = wl-clip-persist --clipboard regular -# GUI apps to launch +#exec-once = tmux setenv -g HYPRLAND_INSTANCE_SIGNATURE "${HYPRLAND_INSTANCE_SIGNATURE}" + +# apps to launch exec-once = qutebrowser exec-once = vivaldi-stable -exec-once = slack -exec-once = sleep 10 && alacritty +exec-once = alacritty diff --git a/env.conf b/env.conf index c76728e..1d9dc73 100644 --- a/env.conf +++ b/env.conf @@ -2,7 +2,8 @@ env = GDK_BACKEND,wayland,x11,* env = GUI_ENABLE_WAYLAND,1 env = HYPRCURSOR_SIZE,18 env = QT_QPA_PLATFORM,wayland;xcb -env = QT_QPA_PLATFORMTHEME,gtk3 +#env = QT_QPA_PLATFORMTHEME,gtk3 +env = QT_QPA_PLATFORMTHEME,qt6ct env = QT_AUTO_SCREEN_SCALE_FACTOR,1 env = QT_WAYLAND_DISABLE_WINDOWDECORATION,1 env = XCURSOR_SIZE,18 diff --git a/hypridle.conf b/hypridle.conf index 9439d03..1a329b2 100644 --- a/hypridle.conf +++ b/hypridle.conf @@ -17,9 +17,17 @@ listener { on-resume = brightnessctl -rd rgb:kbd_backlight # turn on keyboard backlight. } +#listener { +# timeout = 300 # 5min +# on-timeout = loginctl lock-session # lock screen when timeout has passed +#} + listener { - timeout = 300 # 5min - on-timeout = loginctl lock-session # lock screen when timeout has passed + timeout = 300 + # 1. Lock the vault via DBus, 2. Start the lock screen + on-timeout = busctl --user call org.freedesktop.secrets /org/freedesktop/secrets org.freedesktop.Secret.Service Lock "as" 1 "/org/freedesktop/secrets/aliases/default" && hyprlock + # When hyprlock exits (via fingerprint or password), instantly run the unlock script + on-resume = ~/.local/bin/unlock-ring.sh } listener { diff --git a/hyprland.conf b/hyprland.conf index 31bf95c..6f6e176 100644 --- a/hyprland.conf +++ b/hyprland.conf @@ -1,3 +1,9 @@ +############# +### DEBUG ### +############# +# comment out to disable debug +source = ~/.config/hypr/debug.conf + ################ ### MONITORS ### ################ @@ -12,7 +18,7 @@ source = ~/.config/hypr/variables.conf ############################# ### ENVIRONMENT VARIABLES ### ############################# -source = ~/.config/hypr/env.conf +# source = ~/.config/hypr/env.conf # these need to be loaded by uwsm ##################### ### LOOK AND FEEL ### @@ -47,4 +53,6 @@ source = ~/.config/hypr/macros.conf ################# ### AUTOSTART ### ################# -source = ~/.config/hypr/autostart.conf +#source = ~/.config/hypr/autostart.conf +exec-once = ~/.config/hypr/scripts/startup.zsh + diff --git a/hyprlock.conf b/hyprlock.conf index 18916d8..5cdb30d 100644 --- a/hyprlock.conf +++ b/hyprlock.conf @@ -6,7 +6,7 @@ auth { background { # path = screenshot - color = rgb(282828) + color = rgb(000000) } input-field { @@ -56,4 +56,15 @@ label { valign = center } +listener { + timeout = 300 # 5 minutes + on-timeout = sleep 60 && busctl --user call org.freedesktop.secrets /org/freedesktop/secrets org.freedesktop.Secret.Service Lock "as" 1 "/org/freedesktop/secrets/aliases/default" && hyprlock +} + +listener { + timeout = 330 # 5.5 minutes + on-timeout = hyprctl dispatch dpms off # screen off + on-resume = hyprctl dispatch dpms on # screen on +} + # vim:ft=hyprlang diff --git a/hyprpaper.conf b/hyprpaper.conf index c2cd48b..0691458 100644 --- a/hyprpaper.conf +++ b/hyprpaper.conf @@ -1,2 +1,25 @@ -preload = ~/images/black.png -wallpaper = , ~/images/black.png +splash = false +wallpaper { + monitor = eDP-1 + path = /home/trey/images/black.png + fit_mode = cover +} + +wallpaper { + monitor = DP-7 + path = /home/trey/images/Seven Beats Music/2024-09-16.jpg + fit_mode = cover +} + +wallpaper { + monitor = DP-8 + path = /home/trey/images/Seven Beats Music/2024-10-14.jpg + fit_mode = cover +} + +wallpaper { + monitor = + path = /home/trey/images/black.png + fit_mode = cover +} + diff --git a/input.conf b/input.conf index 8742fa0..5d4c765 100644 --- a/input.conf +++ b/input.conf @@ -4,11 +4,10 @@ # https://wiki.hyprland.org/Configuring/Variables/#input input { - kb_layout = us - kb_variant = - kb_model = - kb_options = compose:ralt - kb_rules = + resolve_binds_by_sym = 1 + kb_layout = us, us + kb_variant = colemak, + kb_options = ctrl:nocaps, compose:ralt, grp:ctrls_toggle follow_mouse = 1 @@ -20,9 +19,9 @@ input { } # https://wiki.hyprland.org/Configuring/Variables/#gestures -gestures { - workspace_swipe = false -} +#gestures { +# workspace_swipe = false +#} # Example per-device config # See https://wiki.hyprland.org/Configuring/Keywords/#per-device-input-configs for more diff --git a/keybindings.conf b/keybindings.conf index 1a4631d..fe82d11 100644 --- a/keybindings.conf +++ b/keybindings.conf @@ -1,16 +1,32 @@ # Hyprland bind = SUPER, Q, exec, hyprctl reload -bind = SUPER SHIFT, Q, exec, $kill_hp_systray -bind = SUPER SHIFT, Q, exit +#bind = SUPER SHIFT, Q, exec, $kill_hp_systray +#bind = SUPER SHIFT, Q, exec, $kill_hp_systray +#bind = SUPER SHIFT, Q, exec, eww kill +#bind = SUPER SHIFT, Q, exit +bind = SUPER SHIFT, Q, exec, tmux kill-server +bind = SUPER SHIFT, Q, exec, uwsm stop +#bind = SUPER SHIFT, Q, exec, loginctl terminate-user "" bind = SUPER, L, exec, hyprlock +bind = , switch:Lid Switch, exec, hyprlock + +# fullscreen screenshot +bind = CTRL SHIFT, 3, exec, $screenshot + +# region screenshot +bind = CTRL SHIFT, 4, exec, $screenshot_region # app launchers -bind = SUPER, V, exec, $app "alacritty" "Alacritty" -bind = SUPER, return, exec, $app "alacritty" "Alacritty" -bind = SUPER ALT, H, exec, $app "qutebrowser" "org.qutebrowser.qutebrowser" -bind = SUPER, A, exec, $app "slack" "Slack" "Slack" -bind = SUPER, G, exec, $app "vivaldi-stable" "Vivaldi-stable" "Vivaldi-stable"j: +bind = SUPER, return, exec, $app $alacritty +bind = SUPER, A, exec, $app $slack +bind = SUPER, D, exec, $app $dictionary +bind = SUPER, G, exec, $app $vivaldi +bind = SUPER ALT, H, exec, $app $qutebrowser bind = SUPER, P, exec, $launcher +# espanso-wayland needs a lot of work, sync tool window seems to have no purpose right now +#bind = SUPER, S, exec, $es stop && $app $pavucontrol && $es start && $app $pavucontrol +bind = SUPER, S, exec, $app $pavucontrol +bind = SUPER, V, exec, $app $alacritty # window control @@ -18,9 +34,14 @@ bind = SUPER, C, killactive, bind = SUPER, T, togglefloating bind = SUPER, space, fullscreen, 1 # dwindle bind = SUPER, H, movefocus, l -bind = SUPER, L, movefocus, r +bind = SUPER, H, fullscreen, 1 +#bind = SUPER, H, fullscreen, 1 bind = SUPER, K, movefocus, u +bind = SUPER, K, fullscreen, 1 +#bind = SUPER, K, fullscreen, 1 bind = SUPER, J, movefocus, d +bind = SUPER, J, fullscreen, 1 +#bind = SUPER, J, fullscreen, 1 # bind = SUPER, X, exec, dunstctl close @@ -31,6 +52,12 @@ bind = SUPER, right, exec, $next_ws bind = SUPER, left, exec, $prev_ws bind = SUPER SHIFT, H, exec, $prev_ws bind = SUPER SHIFT, L, exec, $next_ws +bind = SUPER SHIFT, M, exec, $move_window_to_ws +bind = SUPER SHIFT, N, exec, $create_ws +bind = SUPER SHIFT, X, exec, $del_ws +# Create "ProjectX" after the CURRENT workspace +# Usage: You hit the bind, type "ProjectX", and it inserts it after the current one. +bind = SUPER SHIFT, Z, exec, $create_ws $($active_ws) # cliphist bind = ALT, V, exec, cliphist list | rofi -dmenu -p 'paste' | cliphist decode | $copy && $paste diff --git a/macros.conf b/macros.conf index cc1d442..5a9a71e 100644 --- a/macros.conf +++ b/macros.conf @@ -1,9 +1,11 @@ # date/time related macros -bind = SUPER CTRL, D, exec, $today | $copy && $paste +bind = SUPER CTRL, S, exec, $today | $copy && $paste bind = SUPER CTRL, N, exec, $now | $copy && $paste bind = SUPER CTRL, Y, exec, $yesterday | $copy && $paste bind = SUPER CTRL, T, exec, $tomorrow | $copy && $paste +# timetracker (see https://git.eldon.me/pindrop/timetracker) +bind = CTRL SHIFT, S, exec, $timetracker_prompt | $selection | $timetracker_print # password related macros -bind = SUPER CTRL, 1, exec, $bw | $copy && $paste && $newline && $clear -bind = SUPER CTRL, 2, exec, $op | $copy && $paste && $newline && $clear +bind = SUPER CTRL, 1, exec, bash -c 'secret-tool lookup app bw | cliphist store && wtype -M ctrl -k v -m ctrl ' + diff --git a/monitors.conf b/monitors.conf index acca5b7..55518ca 100644 --- a/monitors.conf +++ b/monitors.conf @@ -1 +1,4 @@ monitor=,preferred,auto,auto +monitor=desc:Samsung Display Corp. 0x4193,preferred,auto,auto +monitor=desc:Ancor Communications Inc ASUS VS228 E3LMTF071438,preferred,-1920x0,auto +monitor=desc:Stargate Technology FHD,preferred,auto,auto diff --git a/variables.conf b/variables.conf index 1a9a537..bcb70ee 100644 --- a/variables.conf +++ b/variables.conf @@ -5,13 +5,32 @@ # application related scripts and commands $app = ~/.config/hypr/scripts/focusOrLaunch $launcher = rofi -show run -p "launch" +$timetracker_prompt = ~/.config/hypr/scripts/timetracker-log-prompt +$timetracker_print = ~/.config/hypr/scripts/timetracker-log-print +$selection = rofi -dmenu -theme-str 'inputbar {enabled: false;}' -i -matching prefix -auto-select -l 2 $kill_hp_systray = ~/.config/hypr/scripts/kill-hp-systray +$screenshot = grim "$(date +%FT%H%M%S_screenshot.png)" && paplay ~/wav/camera.wav +$screenshot_region = ~/.config/hypr/scripts/screenshot_region.zsh + +# specific application strings +$alacritty = "alacritty" "Alacritty" +$dictionary = "gnome-dictionary" "org.gnome.Dictionary" "org.gnome.Dictionary" +$pavucontrol = "pavucontrol" "org.pulseaudio.pavucontrol" "org.pulseaudio.pavucontrol" +$qutebrowser = "qutebrowser" "org.qutebrowser.qutebrowser" +$slack = "slack" "Slack" "Slack" +$vivaldi = "vivaldi-stable" "vivaldi-stable" "vivaldi-stable" # workspace related scripts $cycle_ws = ~/.config/hypr/scripts/cycleWorkspace $next_ws = $cycle_ws next $prev_ws = $cycle_ws prev +$active_ws = ~/.config/hypr/scripts/get-active-workspace $create_ws = ~/.config/hypr/scripts/createWorkspace +$del_ws = ~/.config/hypr/scripts/deleteWorkspace +$active_mon = "/usr/bin/hyprctl monitors -j | jq '.[] | select(.focused == true) | .id)" +$mon_count = "/usr/bin/hyprctl monitors -j | jq length" +# for silent moving of windowr to workfpases; comment out if not desired +$move_window_to_ws = "~/.config/hypr/scripts/mv2workspace" # date related scripts $date = ~/.config/hypr/pastes/date @@ -26,14 +45,18 @@ $nextyear = ~/.config/hypr/pastes/nextyear # clipboard related commands and scripts $copy = wl-copy --trim-newline -$paste = hyprctl dispatch sendshortcut "CTRL, V," +#$paste = hyprctl dispatch sendshortcut "CTRL, V," +$paste = wl-paste $clear = cliphist list | head -n1 | cliphist delete # password manager master passwords (stored in GNOME keychain; `secret-tool` is # the CLI tool to store and retrieve such secure items $bw = secret-tool lookup app bw -$op = secret-tool lookup app 1password # various keyboard shortcuts that can be reused $newline = hyprctl dispatch sendshortcut ", Return," $escape = hyprctl dispatch sendshortcut ", Escape," + +# espanso shortcut +$es = espanso + diff --git a/windowrules.conf b/windowrules.conf index 594e128..d2b1d6d 100644 --- a/windowrules.conf +++ b/windowrules.conf @@ -1,21 +1,86 @@ # XWayland dragging stuff -windowrulev2 = nofocus,class:^$,title:^$,xwayland:1,floating:1,fullscreen:0,pinned:0 +windowrule { + name = xwayland-dragging + match:xwayland = true + match:float = true + match:fullscreen = false + match:pin = false + + no_focus = true +} # window classes that should be floating -$float_regex = (gcr-prompter|qt5ct|qt6ct|simple-scan) -windowrulev2 = float,class:$float_regex +$float_class_regex = (gcr-prompter|qt5ct|qt6ct|simple-scan|espanso|nm-applet) +$float_title_regex = ("HP Device Manager - Plug-in Installer") +$float_regex = ($float_class_regex|$float_title_regex) +windowrule { + name = float-class-regex + match:class = $float_class_regex + + float = true +} +windowrule { + name = float-title-regex + match:title = $float_title_regex + + float = true +} + +# window classes that should be pinned +$pin_regex = (gcr-prompter|nm-applet) +windowrule { + name = pin-regex + match:class = $pin_regex + + pin = true +} # maiximize eveyrthing else -windowrulev2 = maximize,class:negative:$float_regex +windowrule { + name = maximize-evrerything + match:class = negative:$fioat_regex + + maximize = true +} # espanso -windowrulev2 = workspace special,title:(Espanso Sync Tool) +windowrule { + name = espanso-on-special + match:title = "Espanso Sync Tool" + + workspace = special +} # workspace binds for windows $browsers = (.*qutebrowser.*|.*[Ff]irefox.*) -$work = (.*[Ss]lack|.*[Vv]ivaldi.*) +$work = (.*[Ss]lack) +$jobs = (.*.*[Vv]ivaldi.*) $meeting = (.*[Zz]oom.*) -windowrulev2 = workspace name:shell,class:(.*[Aa]lacritty.*) -windowrulev2 = workspace name:browser,class:$browsers -windowrulev2 = workspace name:work,class:$work -windowrulev2 = workspace name:meeting,class:$meeting +windowrule { + name = alacritty-on-shell + match:class = .*[Aa]lacritty.* + + workspace = name:shell +} + +windowrule { + name = browser-rule + match:class = $browsers + + workspace = name:browser silent +} + +windowrule { + name = jobs-rule + match:class = .*[Vv]ivaldi-stable.* + + workspace = name:jobs silent +} + +windowrule { + name = meeting-rule + match:class = $meeting + + workspace = name:meeting silent +} + diff --git a/workspaces.conf b/workspaces.conf index 3ca64cb..910409c 100644 --- a/workspaces.conf +++ b/workspaces.conf @@ -1,4 +1,7 @@ -workspace = 1, defaultName:shell, monitor:eDP-1, default:true, persistent:true -workspace = 2, defaultName:browser, monitor:eDP-1, persistent:true -workspace = 3, defaultName:work, monitor:eDP-1, persistent:true -workspace = 4, defaultName:meeting, monitor:eDP-1, persistent:true +workspace = 1, defaultName:shell, monitor:DP-8, persistent:true, default:true +workspace = 3, defaultName:browser, monitor:DP-8, persistent:true, default:true +workspace = 4, defaultName:work, monitor:DP-7, persistent:true, default:true +workspace = 5, defaultName:jobs, monitor:DP-7, persistent:true, default:true +workspace = 6, defaultName:meeting, monitor:eDP-1, persistent:true, default:true +workspace = 7, defaultName:monitoring, monitor:eDP-1, persistent:true, default:true +workspace = 8, defaultName:ai, monitor:eDP-1, persistent:true, default:true