From 6177a70f9b9486cbce2b4778323d55c8134f4453 Mon Sep 17 00:00:00 2001 From: Andre Ramnitz Date: Wed, 25 Jun 2025 21:54:30 +0200 Subject: [PATCH] hypr: full-scale config maintenance --- dot-config/hypr/fragments/env.conf | 8 +- dot-config/hypr/fragments/keybinds.conf | 136 ++++++------ dot-config/hypr/fragments/windowrules.conf | 54 ++--- dot-config/hypr/fragments/workspacerules.conf | 14 +- dot-config/hypr/hypridle.conf | 8 +- dot-config/hypr/hyprland.conf | 203 +++++------------- dot-config/hypr/hyprlock.conf | 50 +++-- dot-config/hypr/hyprpaper.conf | 12 +- dot-config/hypr/scripts/powermenu.sh | 40 +++- dot-config/hypr/scripts/startup.sh | 7 +- .../hypr/scripts/terminal-color-picker.sh | 14 -- dot-config/hypr/scripts/windowswitch-rg.sh | 2 +- dot-config/hypr/scripts/workspace.sh | 51 +++++ 13 files changed, 300 insertions(+), 299 deletions(-) delete mode 100644 dot-config/hypr/scripts/terminal-color-picker.sh create mode 100755 dot-config/hypr/scripts/workspace.sh diff --git a/dot-config/hypr/fragments/env.conf b/dot-config/hypr/fragments/env.conf index efc6c275..478e5f5a 100644 --- a/dot-config/hypr/fragments/env.conf +++ b/dot-config/hypr/fragments/env.conf @@ -18,13 +18,13 @@ env = SWWW_TRANSITION_FPS,60 env = SWWW_TRANSITION_STEP,2 # necessary for hi-dpi displays: -#env = GDK_SCALE=1 # scaling XWayland clients -#env = QT_AUTO_SCREEN_SCALE_FACTOR,1 +# env = GDK_SCALE=1 # scaling XWayland clients +# env = QT_AUTO_SCREEN_SCALE_FACTOR,1 # set cursor -env = XCURSOR_THEME,Bibata_Spirit +env = XCURSOR_THEME,Bibata-Original-Ice env = XCURSOR_SIZE,40 -env = HYPRCURSOR_THEME,Bibata_Spirit +env = HYPRCURSOR_THEME,Bibata-Original-Ice env = HYPRCURSOR_SIZE,40 diff --git a/dot-config/hypr/fragments/keybinds.conf b/dot-config/hypr/fragments/keybinds.conf index 77cea2aa..721c517b 100644 --- a/dot-config/hypr/fragments/keybinds.conf +++ b/dot-config/hypr/fragments/keybinds.conf @@ -28,8 +28,8 @@ bind = $mainmod CTRL, G, denywindowfromgroup, toggle bind = $mainmod ALT, G, moveoutofgroup, active bind = $mainmod, W, exec, $HOME/.local/bin/wb hide bind = $mainmod SHIFT, W, exec, $HOME/.local/bin/wb reload -bind = $mainmod, TAB, exec, ~/.config/hypr/scripts/windowswitch-rg.sh bind = $mainmod, grave, exec, ~/.config/hypr/scripts/RofiEmoji.sh +bind = $mainmod, Z, overview:toggle # scratchpad bind = $mainmod, I, togglespecialworkspace, overlay @@ -41,25 +41,30 @@ bind = $mainmod SHIFT, I, movetoworkspace, special:overlay bind = $suremod, M, exit, bind = $suremod, Return, exec, konsole # backup terminal app bind = $suremod, G, exec, ~/.config/hypr/scripts/gamemode.sh - +bind = $suremod, L, exec, ~/.config/hypr/scripts/powermenu.sh # misc keys (mostly redundant, but some habits die hard) # ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── -bind = ALT, TAB, focuscurrentorlast -bind = ALT SHIFT, F12, exec, ~/.config/hypr/scripts/gamemode.sh bind = $mainmod, Print, exec, hyprshot -m output -m active -o /home/andy/Bilder/Screenshots -bind = $mainmod SHIFT, Print, exec, hyprshot -m window -m active -o /home/andy/Bilder/Screenshots -bind = $mainmod CTRL, Print, exec, hyprshot -z -m region -o /home/andy/Bilder/Screenshots +bind = SHIFT, Print, exec, hyprshot -m window -m active -o /home/andy/Bilder/Screenshots +bind = CTRL, Print, exec, hyprshot -z -m region -o /home/andy/Bilder/Screenshots +bind = ALT SHIFT, F12, exec, ~/.config/hypr/scripts/gamemode.sh +bind = ALT CTRL, L, exec, hyprlock # media keys -bindl = , XF86AudioRaiseVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+ -bindl = , XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%- +# ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── +bindl = , XF86AudioRaiseVolume, exec, wp+ +bindl = , XF86AudioLowerVolume, exec, wp- bindl = , XF86AudioMute, exec, ~/.config/hypr/scripts/muteorunmute.sh bindl = , XF86AudioPlay, exec, playerctl play-pause bindl = , XF86AudioNext, exec, playerctl next bindl = , XF86AudioPrev, exec, playerctl previous bindl = , XF86audiostop, exec, playerctl stop +# disabled because hyprshell +# ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── +bind = $mainmod, TAB, exec, ~/.config/hypr/scripts/windowswitch-rg.sh +bind = ALT, TAB, focuscurrentorlast # movement # ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── @@ -98,10 +103,6 @@ bind = ALT CTRL, left, layoutmsg, preselect l bind = ALT CTRL, right, layoutmsg, preselect r bind = ALT CTRL, up, layoutmsg, preselect u bind = ALT CTRL, down, layoutmsg, preselect d -bind = ALT CTRL, H, layoutmsg, preselect l -bind = ALT CTRL, L, layoutmsg, preselect r -bind = ALT CTRL, K, layoutmsg, preselect u -bind = ALT CTRL, J, layoutmsg, preselect d # move through group windows bind = $mainmod, O, changegroupactive, f @@ -122,45 +123,74 @@ bind = $mainmod ALT, J, moveactive, 0 40 # workspaces # ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── + +# Roll between workspaces +bind = $mainmod, PLUS, exec, ~/.config/hypr/scripts/workspace.sh + +bind = $mainmod, MINUS, exec, ~/.config/hypr/scripts/workspace.sh - +bind = $mainmod SHIFT, PLUS, exec, ~/.config/hypr/scripts/workspace.sh + mv +bind = $mainmod SHIFT, MINUS, exec, ~/.config/hypr/scripts/workspace.sh - mv + # Switch workspaces with mainMod + [0-9] -bind = $mainmod, 1, workspace, 1 -bind = $mainmod, 2, workspace, 2 -bind = $mainmod, 3, workspace, 3 -bind = $mainmod, 4, workspace, 4 -bind = $mainmod, 5, workspace, 5 -bind = $mainmod, 6, workspace, 6 -bind = $mainmod, 7, workspace, 7 -bind = $mainmod, 8, workspace, 8 -bind = $mainmod, 9, workspace, 9 -bind = $mainmod, 0, workspace, 10 +bind = $mainmod, 1, exec, ~/.config/hypr/scripts/workspace.sh 1 +bind = $mainmod, 2, exec, ~/.config/hypr/scripts/workspace.sh 2 +bind = $mainmod, 3, exec, ~/.config/hypr/scripts/workspace.sh 3 +bind = $mainmod, 4, exec, ~/.config/hypr/scripts/workspace.sh 4 +bind = $mainmod, 5, exec, ~/.config/hypr/scripts/workspace.sh 5 +bind = $mainmod, 6, exec, ~/.config/hypr/scripts/workspace.sh 6 +bind = $mainmod, 7, exec, ~/.config/hypr/scripts/workspace.sh 7 +bind = $mainmod, 8, exec, ~/.config/hypr/scripts/workspace.sh 8 +bind = $mainmod, 9, exec, ~/.config/hypr/scripts/workspace.sh 9 +bind = $mainmod, 0, exec, ~/.config/hypr/scripts/workspace.sh 10 # Move active window to a workspace with mainMod + SHIFT + [0-9] -bind = $mainmod SHIFT, 1, movetoworkspace, 1 -bind = $mainmod SHIFT, 2, movetoworkspace, 2 -bind = $mainmod SHIFT, 3, movetoworkspace, 3 -bind = $mainmod SHIFT, 4, movetoworkspace, 4 -bind = $mainmod SHIFT, 5, movetoworkspace, 5 -bind = $mainmod SHIFT, 6, movetoworkspace, 6 -bind = $mainmod SHIFT, 7, movetoworkspace, 7 -bind = $mainmod SHIFT, 8, movetoworkspace, 8 -bind = $mainmod SHIFT, 9, movetoworkspace, 9 -bind = $mainmod SHIFT, 0, movetoworkspace, 10 +bind = $mainmod SHIFT, 1, exec, ~/.config/hypr/scripts/workspace.sh 1 mv +bind = $mainmod SHIFT, 2, exec, ~/.config/hypr/scripts/workspace.sh 2 mv +bind = $mainmod SHIFT, 3, exec, ~/.config/hypr/scripts/workspace.sh 3 mv +bind = $mainmod SHIFT, 4, exec, ~/.config/hypr/scripts/workspace.sh 4 mv +bind = $mainmod SHIFT, 5, exec, ~/.config/hypr/scripts/workspace.sh 5 mv +bind = $mainmod SHIFT, 6, exec, ~/.config/hypr/scripts/workspace.sh 6 mv +bind = $mainmod SHIFT, 7, exec, ~/.config/hypr/scripts/workspace.sh 7 mv +bind = $mainmod SHIFT, 8, exec, ~/.config/hypr/scripts/workspace.sh 8 mv +bind = $mainmod SHIFT, 9, exec, ~/.config/hypr/scripts/workspace.sh 9 mv +bind = $mainmod SHIFT, 0, exec, ~/.config/hypr/scripts/workspace.sh 10 mv # Move active window in the background to a workspace with mainMod + CRTL + [0-9] -bind = $mainmod CTRL, 1, movetoworkspacesilent, 1 -bind = $mainmod CTRL, 2, movetoworkspacesilent, 2 -bind = $mainmod CTRL, 3, movetoworkspacesilent, 3 -bind = $mainmod CTRL, 4, movetoworkspacesilent, 4 -bind = $mainmod CTRL, 5, movetoworkspacesilent, 5 -bind = $mainmod CTRL, 6, movetoworkspacesilent, 6 -bind = $mainmod CTRL, 7, movetoworkspacesilent, 7 -bind = $mainmod CTRL, 8, movetoworkspacesilent, 8 -bind = $mainmod CTRL, 9, movetoworkspacesilent, 9 -bind = $mainmod CTRL, 0, movetoworkspacesilent, 10 - -# Scroll through existing workspaces with mainMod + scroll -bind = $mainmod, mouse_down, workspace, e+1 -bind = $mainmod, mouse_up, workspace, e-1 +bind = $mainmod CTRL, 1, exec, ~/.config/hypr/scripts/workspace.sh 1 mv s +bind = $mainmod CTRL, 2, exec, ~/.config/hypr/scripts/workspace.sh 2 mv s +bind = $mainmod CTRL, 3, exec, ~/.config/hypr/scripts/workspace.sh 3 mv s +bind = $mainmod CTRL, 4, exec, ~/.config/hypr/scripts/workspace.sh 4 mv s +bind = $mainmod CTRL, 5, exec, ~/.config/hypr/scripts/workspace.sh 5 mv s +bind = $mainmod CTRL, 6, exec, ~/.config/hypr/scripts/workspace.sh 6 mv s +bind = $mainmod CTRL, 7, exec, ~/.config/hypr/scripts/workspace.sh 7 mv s +bind = $mainmod CTRL, 8, exec, ~/.config/hypr/scripts/workspace.sh 8 mv s +bind = $mainmod CTRL, 9, exec, ~/.config/hypr/scripts/workspace.sh 9 mv s +bind = $mainmod CTRL, 0, exec, ~/.config/hypr/scripts/workspace.sh 10 mv s + + +# mouse binds +# ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── +binds { + drag_threshold = 150 + scroll_event_delay = 40 +} +input { + scroll_points = 3 +} + +# LMB = 272 // RMB = 273 + +bind = $mainmod, mouse_down, exec, ~/.config/hypr/scripts/workspace.sh - +bind = $mainmod, mouse_up, exec, ~/.config/hypr/scripts/workspace.sh + +bind = $mainmod, mouse_left, exec, ~/.config/hypr/scripts/workspace.sh - mv +bind = $mainmod, mouse_right, exec, ~/.config/hypr/scripts/workspace.sh + mv +bind = $mainmod, mouse_left, exec, ~/.config/hypr/scripts/workspace.sh - mv s +bind = $mainmod, mouse_right, exec, ~/.config/hypr/scripts/workspace.sh + mv s + +# Move/resize windows with mainMod + LMB/RMB and dragging +bindm = $mainmod, mouse:272, movewindow +bindm = $mainmod, mouse:273, resizewindow +bind = $mainmod SHIFT, mouse_down, exec, hyprctl -q keyword cursor:zoom_factor $(hyprctl getoption cursor:zoom_factor | awk '/^float.*/ {print $2 * 1.25}') +bind = $mainmod SHIFT, mouse_up, exec, hyprctl -q keyword cursor:zoom_factor $(hyprctl getoption cursor:zoom_factor | awk '/^float.*/ {print $2 * 0.75}') # submaps @@ -209,17 +239,3 @@ bind = , catchall, submap, reset # will reset the submap, which will return to the global submap submap = reset - -# mouse binds -# ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── -# Move/resize windows with mainMod + LMB/RMB and dragging -bindm = $mainmod, mouse:272, movewindow -bindm = $mainmod, mouse:273, resizewindow -bind = $mainmod, mouse_up, workspace, m-1 -bind = $mainmod, mouse_down, workspace, m+1 -bind = $mainmod, mouse_left, workspace, r-1 -bind = $mainmod, mouse_right, workspace, r+1 -bind = $mainmod SHIFT, mouse_down, exec, hyprctl -q keyword cursor:zoom_factor $(hyprctl getoption cursor:zoom_factor | awk '/^float.*/ {print $2 * 1.25}') -bind = $mainmod SHIFT, mouse_up, exec, hyprctl -q keyword cursor:zoom_factor $(hyprctl getoption cursor:zoom_factor | awk '/^float.*/ {print $2 * 0.75}') -binds:scroll_event_delay = 25 - diff --git a/dot-config/hypr/fragments/windowrules.conf b/dot-config/hypr/fragments/windowrules.conf index 610e2493..b60df68a 100644 --- a/dot-config/hypr/fragments/windowrules.conf +++ b/dot-config/hypr/fragments/windowrules.conf @@ -5,30 +5,6 @@ # See https://wiki.hyprland.org/Configuring/Window-Rules/ for more # more windowrules -# handle steam client -windowrule = float, class:^(steam)$ -windowrule = suppressevent activatefocus, class:^(steam)$ -# windowrule = float, title:^(Steam)$ -# windowrule = float, title:^(Freundesliste)$ -# windowrule = stayfocused, title:^()$, class:^(steam)$ -windowrule = minsize 1 1, title:^()$, class:^(steam)$ -windowrule = noanim 1, class:^(steam)$ -windowrule = noblur 1, class:^(steam)$ -windowrule = norounding 1, class:^(steam)$ -windowrule = nodim 1, class:^(steam)$ -windowrule = decorate 0, class:^(steam)$ -windowrule = plugin:hyprbars:nobar,class:^(steam)$ -windowrule = plugin:hyprbars:nobar,title:^(Steam)$ -windowrule = plugin:hyprbars:nobar,title:^(Freundesliste)$ - -# handle wine/proton games -$GAMES = ^(steam_app_.*|steam_proton|streaming_client|gamescope)$ -windowrule = noanim, class:$GAMES -windowrule = fullscreenstate 2 2, class:$GAMES -windowrule = fullscreen, class:$GAMES -windowrule = idleinhibit always, class:$GAMES -windowrule = immediate, class:$GAMES - # hide hyprbars on non-floating windows windowrule = plugin:hyprbars:nobar, ^floating:0 @@ -73,6 +49,7 @@ windowrule = float, stayfocused, center, opacity 1.0 override, class:^(kakpopup) # handle other clients windowrule = float, class:^(discord.*)$ +windowrule = workspace 3, class:^(discord.*)$ windowrule = float, class:^(openrgb)$ windowrule = float, class:^(org.corectrl.CoreCtrl)$ windowrule = float, class:^(pavucontrol.*)$ @@ -94,9 +71,34 @@ windowrule = group deny, class:^(ueberzugpp.*)$ windowrule = float, class:^(org.freedesktop.impl.portal.desktop.kde)$ windowrule = stayfocused, class:^(org.freedesktop.impl.portal.desktop.kde)$ -# handle games +# handle steam client +windowrule = float, class:^(steam)$ +windowrule = suppressevent activatefocus, class:^(steam)$ +# windowrule = float, title:^(Steam)$ +# windowrule = float, title:^(Freundesliste)$ +# windowrule = stayfocused, title:^()$, class:^(steam)$ +windowrule = minsize 1 1, title:^()$, class:^(steam)$ +windowrule = noanim 1, class:^(steam)$ +windowrule = noblur 1, class:^(steam)$ +windowrule = norounding 1, class:^(steam)$ +windowrule = nodim 1, class:^(steam)$ +windowrule = decorate 0, class:^(steam)$ +windowrule = plugin:hyprbars:nobar,class:^(steam)$ +windowrule = plugin:hyprbars:nobar,title:^(Steam)$ +windowrule = plugin:hyprbars:nobar,title:^(Freundesliste)$ + +# handle wine/proton games +$GAMES = ^(steam_app_.*|steam_proton|streaming_client|gamescope)$ +windowrule = noanim, class:$GAMES +windowrule = fullscreenstate 2 2, class:$GAMES +windowrule = fullscreen, class:$GAMES +windowrule = idleinhibit always, class:$GAMES +# windowrule = immediate, class:$GAMES #experimental +windowrule = plugin:hyprbars:nobar,class:$GAMES + +# tags for games windowrule = tag +game, class:^(.*)exe$ -windowrule = tag +game, initialClass:^(gamescope)$ +windowrule = tag +game, class:$GAMES # handle TAGS (always handle tags last) windowrule = nodim 1, tag:neverdim diff --git a/dot-config/hypr/fragments/workspacerules.conf b/dot-config/hypr/fragments/workspacerules.conf index 814a8dd5..7674d172 100644 --- a/dot-config/hypr/fragments/workspacerules.conf +++ b/dot-config/hypr/fragments/workspacerules.conf @@ -1,12 +1,8 @@ # workspace rules -# workspace = 1, monitor:DP-1, default:true, on-created-empty: ~/.config/hypr/scripts/checknetandbrowse -workspace = 1, monitor:DP-1, default:true -workspace = 2, monitor:DP-2 + +workspace = 1, monitor:DP-1, default:true #, on-created-empty: hyprctl hyprpaper wallpaper DP-1, "/home/andy/Bilder/Wallpapers-simple/pulppixel22.png" +workspace = 2, monitor:DP-1 workspace = 3, monitor:DP-1 -workspace = 4, monitor:DP-2 +workspace = 4, monitor:DP-1 workspace = 5, monitor:DP-1 -workspace = 6, monitor:DP-2 -workspace = 7, monitor:DP-1 -workspace = 8, monitor:DP-2 -workspace = 9, monitor:DP-1 -workspace = 0, monitor:DP-2 +workspace = 6, monitor:DP-1 diff --git a/dot-config/hypr/hypridle.conf b/dot-config/hypr/hypridle.conf index bdd3275a..aa16163f 100644 --- a/dot-config/hypr/hypridle.conf +++ b/dot-config/hypr/hypridle.conf @@ -18,18 +18,18 @@ general { # } listener { - timeout = 1200 # 20min + timeout = 1200 # 20min on-timeout = loginctl lock-session # lock screen when timeout has passed } listener { - timeout = 1800 # 30min + timeout = 2400 # 45min on-timeout = hyprctl dispatch dpms off # screen off when timeout has passed on-resume = hyprctl dispatch dpms on # screen on when activity is detected after timeout has fired. } listener { - timeout = 3600 # 60min - on-timeout = loginctl suspend # suspend pc + timeout = 3600 # 90min + on-timeout = loginctl suspend # suspend pc } diff --git a/dot-config/hypr/hyprland.conf b/dot-config/hypr/hyprland.conf index 731d3d08..e3cf609d 100644 --- a/dot-config/hypr/hyprland.conf +++ b/dot-config/hypr/hyprland.conf @@ -26,9 +26,8 @@ exec-once = sunsetr # Execute your favorite apps at launch exec-once = ~/.config/hypr/scripts/startup.sh exec-once = hypridle -exec-once = hyprpm enable hyprbars +exec-once = hyprpm reload exec-once = hyprpaper -exec-once = flatpak run org.openrgb.OpenRGB --startminimized -p sunset exec-once = flatpak run ch.threema.threema-desktop # For all categories, see https://wiki.hyprland.org/Configuring/Variables/ @@ -49,6 +48,11 @@ input { sensitivity = 0 # -1.0 - 1.0, 0 means no modification. } +cursor { + enable_hyprcursor = 1 + no_hardware_cursors = 2 +} + permission = /usr/(lib|libexec|lib64)/xdg-desktop-portal-hyprland, screencopy, allow general { @@ -60,10 +64,11 @@ general { border_size = 2 gaps_in = 5 gaps_out = 10 - col.active_border = 0xee$base0D - col.inactive_border = 0xee$base02 + # col.active_border = rgba(33ccffee) rgba(00ff99ee) 45deg + col.active_border = 0xfa$base0C 0xff$base0B 45deg + col.inactive_border = 0xfa$base02 col.nogroup_border_active = 0xff$base0E - col.nogroup_border = 0x33$base0E + col.nogroup_border = 0xfa$base02 layout = dwindle @@ -115,7 +120,7 @@ decoration { } shadow { enabled = true - range = 8 + range = 4 render_power = 2 sharp = false ignore_window = true @@ -162,29 +167,37 @@ device { group { merge_groups_on_drag = 0 - insert_after_current = 0 - col.border_locked_active = 0xEE$base0D - col.border_locked_inactive = 0xEE$base04 - col.border_active = 0xEE$base0A - col.border_inactive = 0xEE$base02 + insert_after_current = 1 + col.border_locked_active = 0xfa$base0E + col.border_locked_inactive = 0xfa$base02 + col.border_active = 0xEE$base0C + col.border_inactive = 0xfa$base02 groupbar { enabled = 1 - height = 20 + font_family = ZedMono NFP + font_weight_active = bold + font_weight_inactive = normal + #text_color_active = 0xff$base01 + #text_color_inactive = 0xff$base01 + height = 20 + indicator_gap = 0 indicator_height = 0 priority = 3 - font_size = 16 + font_size = 16 text_color = 0xFF$base00 - stacked = false gradients = true scrolling = false - col.locked_active = 0xEE$base0D - col.locked_inactive = 0x88$base0D - col.active = 0xEE$base0A - col.inactive = 0x88$base0A - rounding = 1 - gradient_rounding = 5 + col.locked_active = 0xfa$base0E 0x8a$base0E 45deg + col.locked_inactive = 0xfa$base04 0x8a$base04 45deg + col.active = 0xfa$base0C 0xfa$base0D 45deg + col.inactive = 0xfa$base04 0xaa$base04 45deg + rounding = 4 + gradient_rounding = 4 gradient_round_only_edges = true stacked = false + gaps_in = 2 + gaps_out = 2 + keep_upper_gap = false } } @@ -198,147 +211,29 @@ plugin { bar_part_of_window = 1 bar_precedence_over_border = 1 # hyprbars-button = color, size, icon, on-click - dynamic-cursors { - - # enables the plugin - enabled = true - - # sets the cursor behaviour, supports these values: - # tilt - tilt the cursor based on x-velocity - # rotate - rotate the cursor based on movement direction - # stretch - stretch the cursor shape based on direction and velocity - # none - do not change the cursors behaviour - mode = none - - # minimum angle difference in degrees after which the shape is changed - # smaller values are smoother, but more expensive for hw cursors - threshold = 2 - - # override the mode behaviour per shape - # this is a keyword and can be repeated many times - # by default, there are no rules added - # see the dedicated `shape rules` section below! - # shaperule = , (optional), : , ... - # shaperule = , (optional), : , ... - - # for mode = rotate - rotate { - - # length in px of the simulated stick used to rotate the cursor - # most realistic if this is your actual cursor size - length = 20 - - # clockwise offset applied to the angle in degrees - # this will apply to ALL shapes - offset = 0.0 - } - - # for mode = tilt - tilt { - - # controls how powerful the tilt is, the lower, the more power - # this value controls at which speed (px/s) the full tilt is reached - limit = 5000 - - # relationship between speed and tilt, supports these values: - # linear - a linear function is used - # quadratic - a quadratic function is used (most realistic to actual air drag) - # negative_quadratic - negative version of the quadratic one, feels more aggressive - function = negative_quadratic - } - - # for mode = stretch - stretch { - - # controls how much the cursor is stretched - # this value controls at which speed (px/s) the full stretch is reached - limit = 3000 - - # relationship between speed and stretch amount, supports these values: - # linear - a linear function is used - # quadratic - a quadratic function is used - # negative_quadratic - negative version of the quadratic one, feels more aggressive - function = quadratic - } - - # configure shake to find - # magnifies the cursor if its is being shaken - shake { - - # enables shake to find - enabled = true - - # use nearest-neighbour (pixelated) scaling when shaking - # may look weird when effects are enabled - nearest = true - - # controls how soon a shake is detected - # lower values mean sooner - threshold = 4.0 - - # magnification level immediately after shake start - base = 4.0 - # magnification increase per second when continuing to shake - speed = 2.0 - # how much the speed is influenced by the current shake intensitiy - influence = 0.0 - - # maximal magnification the cursor can reach - # values below 1 disable the limit (e.g. 0) - limit = 10.0 - - # time in millseconds the cursor will stay magnified after a shake has ended - timeout = 2000 - - # show cursor behaviour `tilt`, `rotate`, etc. while shaking - effects = false - - # enable ipc events for shake - # see the `ipc` section below - ipc = false - } - - # use hyprcursor to get a higher resolution texture when the cursor is magnified - # see the `hyprcursor` section below - hyprcursor { - - # use nearest-neighbour (pixelated) scaling when magnifing beyond texture size - # this will also have effect without hyprcursor support being enabled - # 0 / false - never use pixelated scaling - # 1 / true - use pixelated when no highres image - # 2 - always use pixleated scaling - nearest = true - - # enable dedicated hyprcursor support - enabled = true - - # resolution in pixels to load the magnified shapes at - # be warned that loading a very high-resolution image will take a long time and might impact memory consumption - # -1 means we use [normal cursor size] * [shake:base option] - resolution = -1 - - # shape to use when clientside cursors are being magnified - # see the shape-name property of shape rules for possible names - # specifying clientside will use the actual shape, but will be pixelated - fallback = clientside - } - } - - hyprbars-button = 0xaa$base08, 20, 󰖭, hyprctl dispatch killactive + hyprbars-button = 0xaa$base08, 20, 󰖭, hyprctl dispatch killactive hyprbars-button = 0xaa$base0A, 20, 󰁌, hyprctl dispatch fullscreen 1 - } - hyprexpo { - columns = 3 - gap_size = 5 - bg_col = 0xEE$base00 - workspace_method = center current + hyprbars-button = 0xaa$base0B, 20, , hyprctl dispatch pin active + } + + overview { + panelHeight = 200 + panelColor = 0xcc$base03 + panelBorderWidth = 1 + panelBorderColor = 0xee$base03 + workspaceActiveBorder = 0xee$base0D + workspaceInactiveBorder = 0xee$base02 + workspaceBorderSize = 2 + } + hyprwinwrap { + class = foot-bg } } source=./fragments/animations.conf source=./fragments/env.conf -source=./fragments/keybinds.conf source=./fragments/windowrules.conf source=./fragments/workspacerules.conf +source=./fragments/keybinds.conf diff --git a/dot-config/hypr/hyprlock.conf b/dot-config/hypr/hyprlock.conf index 94377eaf..ca499fb1 100644 --- a/dot-config/hypr/hyprlock.conf +++ b/dot-config/hypr/hyprlock.conf @@ -1,28 +1,32 @@ source=./base16-colors.conf +$font = ZedMono NFP + general { + hide_cursor = false ignore_empty_input = 1 - pam_module = hyprlock +} + +animations { + enabled = true } background { - monitor = - # path = /home/andy/Bilder/Wallpapers/51240-aerjl345234.webp # supports png, jpg, webp (no animations, though) + monitor = + path = ~/Bilder/Wallpapers-simple/atmosphere.png color = 0xdd$base00 - - # all these options are taken from hyprland, see https://wiki.hyprland.org/Configuring/Variables/#blur for explanations - blur_passes = 3 # 0 disables blurring + blur_passes = 2 blur_size = 7 noise = 0.0117 contrast = 0.8916 brightness = 0.8172 vibrancy = 0.1696 - vibrancy_darkness = 0.0 + vibrancy_darkness = 0.05 } image { path = /home/andy/Bilder/avatar.jpg - size = 150 + size = 200 rounding = -1 # negative values mean circle border_size = 4 border_color = 0xff$base05 @@ -30,46 +34,67 @@ image { reload_time = -1 # seconds between reloading, 0 to reload with SIGUSR2 reload_cmd = # command to get new path. if empty, old path will be used. don't run "follow" commands like tail -F - position = 0, 200 + position = 0, 180 halign = center valign = center + shadow_passes = 3 + shadow_size = 8 } +shape { + size = 300, 20 + color = 0xff$base0C + rounding = 8 + border_size = 2 + border_color = 0xffbase01 + xray = false + shadow_passes = 3 + shadow_size = 8 + position = 0, 333 + halign = center + valign = center + zindex = 0 +} label { text = $TIME text_align = right font_size = 64 - font_family = IosevkaTerm Nerd Font Mono + font_family = $font color = 0xff$base05 position = 0, 360 halign = center valign = center + shadow_passes = 3 + shadow_size = 4 + zindex = 10 } label { text = xkb: $LAYOUT text_align = right font_size = 15 - font_family = IosevkaTerm Nerd Font Mono + font_family = $font color = 0xff$base05 position = -10, -5 halign = right valign = top + zindex = 10 } label { text = cmd[update:1000] echo "load avg:$(uptime | cut -f5 -d':') " text_align = right font_size = 15 - font_family = IosevkaTerm Nerd Font Mono + font_family = $font color = 0xff$base05 position = 10, -5 halign = left valign = top + zindex = 10 } input-field { @@ -101,4 +126,5 @@ input-field { position = 0, -20 halign = center valign = center + zindex = 10 } diff --git a/dot-config/hypr/hyprpaper.conf b/dot-config/hypr/hyprpaper.conf index ee5f281e..a0ee6a85 100644 --- a/dot-config/hypr/hyprpaper.conf +++ b/dot-config/hypr/hyprpaper.conf @@ -1,9 +1,11 @@ -preload = ~/Bilder/Wallpapers-simple/AtariTimes.png -preload = ~/Bilder/Wallpapers-simple/atmosphere.png +preload = ~/Bilder/Wallpapers-simple/beach.png +preload = ~/Bilder/Wallpapers-simple/pulppixel22.png preload = ~/Bilder/Wallpapers-simple/WP.jpg -preload = ~/Bilder/Wallpapers-simple/cubechaos2.png -preload = ~/Bilder/Wallpapers-simple/mario.jpg -wallpaper = , ~/Bilder/Wallpapers-simple/cubechaos2.png +preload = ~/Bilder/Wallpapers-simple/SweetSpot.png +preload = ~/Bilder/Wallpapers-simple/ContentoCustomBackground.png +preload = ~/Bilder/Wallpapers-simple/AtariTimes.png +preload = ~/Bilder/Wallpapers-simple/TronLightCycle1.png +wallpaper = , ~/Bilder/Wallpapers-simple/beach.png ipc = on splash = 0 diff --git a/dot-config/hypr/scripts/powermenu.sh b/dot-config/hypr/scripts/powermenu.sh index 54b995f6..fa15564e 100755 --- a/dot-config/hypr/scripts/powermenu.sh +++ b/dot-config/hypr/scripts/powermenu.sh @@ -1,19 +1,43 @@ #!/bin/bash -# shamelessly stolen from https://github.com/luispabon/sway-dotfiles +# original version shamelessly stolen from https://github.com/luispabon/sway-dotfiles -entries="♲ Reload\n⇠ Logout\n⏾ Suspend\n⭮ Reboot\n⏻ Shutdown" +entries=" Lock\n♲ Upgrayyedd\n⇠ Logout\n⏾ Suspend\n⭮ Reboot\n⏻ Shutdown" selected=$(echo -e "$entries"|fuzzel --config="$HOME"/.config/fuzzel/fuzzel-powermenu.ini --dmenu | awk '{print tolower($2)}') + +# Ask for confirmation +confirm_exit() { + echo -e "yes\nno" | fuzzel --config "$HOME"/.config/fuzzel/fuzzel-confirmbox.ini -d +} + +# wrap critical commands +wrap_cmd() { + confirmation="$(confirm_exit)" + if [[ "$confirmation" == "yes" ]]; then + if [[ "$1" == '--logout' ]]; then + sync && exec hyprctl dispatch exit + elif [[ "$1" == '--reboot' ]]; then + sync && exec loginctl reboot + elif [[ "$1" == '--poweroff' ]]; then + sync && exec loginctl poweroff + fi + else + exit 0 + fi +} + case $selected in - reload) - waybar_reload.sh &;; - logout) - "$HOME"/.config/hypr/scripts/shutdown.sh && hyprctl dispatch exit;; + lock) + exec hyprlock;; + upgrayyedd) + exec ~/.local/bin/kupgrayyedd;; suspend) sync && exec loginctl suspend;; + logout) + wrap_cmd --logout;; reboot) - sync && exec loginctl reboot;; + wrap_cmd --reboot;; shutdown) - sync && exec loginctl poweroff -i;; + wrap_cmd --poweroff;; esac diff --git a/dot-config/hypr/scripts/startup.sh b/dot-config/hypr/scripts/startup.sh index 65fefc28..250bac02 100755 --- a/dot-config/hypr/scripts/startup.sh +++ b/dot-config/hypr/scripts/startup.sh @@ -55,17 +55,20 @@ pidof mpd-mpris && pkill mpd-mpris || mpd-mpris > /dev/null 2>&1 & logger 'mpd-mpris is running' pidof waybar && pkill waybar || waybar > /dev/null 2>&1 & +sleep 1 logger 'waybar started' -pidof swaync && pkill swaync || swaync > /dev/null 2>&1 & +pidof mako && pkill mako || mako > /dev/null 2>&1 & pidof kwalletd6 && ~/.config/hypr/scripts/nextcloud.sh > /dev/null 2>&1 & pidof kwalletd6 && nextcloud --background & pidof xembedsniproxy && pkill xembedsniproxy || xembedsniproxy > /dev/null 2>&1 & # xembedsniproxy needs plasma-workspace pidof udiskie && pkill udiskie || udiskie --no-automount --no-notify --tray > /dev/null 2>&1 & +openrgb --startminimized -p sunset > /dev/null 2>&1 & + # ! pidof swww-daemon && nohup /usr/bin/swww-daemon > /dev/null 2>&1 # sleep 0.5 && ~/.local/bin/rndwallpaper swww -sleep 0.5 && ~/.local/bin/rndhyprpaper +# sleep 0.5 && ~/.local/bin/rndhyprpaper pidof wl-paste && pkill wl-paste || true wl-paste --type text --watch cliphist store & diff --git a/dot-config/hypr/scripts/terminal-color-picker.sh b/dot-config/hypr/scripts/terminal-color-picker.sh deleted file mode 100644 index 8ee8ac50..00000000 --- a/dot-config/hypr/scripts/terminal-color-picker.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/bash - -# Get the gdbus output -output=$(gdbus call --session --dest org.gnome.Shell.Screenshot --object-path /org/gnome/Shell/Screenshot --method org.gnome.Shell.Screenshot.PickColor) -colors=($(echo $output | command grep -o "[0-9\.]*")) - -# Convert to 255-based RGB format -for ((i = 0; i < ${#colors[@]}; i++)); do - colors[$i]=$(printf '%.0f' $(echo "${colors[$i]} * 255" | bc)) -done - -echo "RGB: ${colors[0]} ${colors[1]} ${colors[2]}" -printf "HEX: #%02x%02x%02x\n" "${colors[0]}" "${colors[1]}" "${colors[2]}" - diff --git a/dot-config/hypr/scripts/windowswitch-rg.sh b/dot-config/hypr/scripts/windowswitch-rg.sh index d61c1cc2..565a4a36 100755 --- a/dot-config/hypr/scripts/windowswitch-rg.sh +++ b/dot-config/hypr/scripts/windowswitch-rg.sh @@ -4,4 +4,4 @@ # xargs -I{} hyprctl dispatcher focuswindow "address:0x{}" # from https://www.reddit.com/r/hyprland/comments/113ofeq/comment/msnbom6/?utm_source=share&utm_medium=web3x&utm_name=web3xcss&utm_term=1&utm_content=share_button -hyprctl -j clients | jq -r '.[] | [([.workspace.name, .class, .title] | join(" => ")), .address] | @tsv ' | fuzzel --config="$HOME/.config/fuzzel/fuzzel-centered.ini" --dmenu --with-nth=1 --accept-nth=2 --width=128 | xargs -I{} hyprctl dispatch focuswindow "address:{}" +hyprctl -j clients | jq -r '.[] | [([.workspace.name, .class, .title] | join(" => ")), .address] | @tsv ' | sort -n | fuzzel --config="$HOME/.config/fuzzel/fuzzel-centered.ini" --dmenu --with-nth=1 --accept-nth=2 --width=128 | xargs -I{} hyprctl dispatch focuswindow "address:{}" diff --git a/dot-config/hypr/scripts/workspace.sh b/dot-config/hypr/scripts/workspace.sh new file mode 100755 index 00000000..4c2e3774 --- /dev/null +++ b/dot-config/hypr/scripts/workspace.sh @@ -0,0 +1,51 @@ +#!/bin/bash + +FOCUSED_MONITOR=$(hyprctl monitors -j | jq -r '.[] | select(.focused) | .name') + +ACTIVE_WORKSPACE=$(hyprctl activeworkspace -j | jq '.id') + +if [[ "$1" == '-' ]]; then + REQUESTED_WORKSPACE="$((--ACTIVE_WORKSPACE))" +elif [[ "$1" == '+' ]]; then + REQUESTED_WORKSPACE="$((++ACTIVE_WORKSPACE))" +else + REQUESTED_WORKSPACE="$1" +fi + +if [[ "$2" == 'mv' ]]; then + PRECMD='moveto' +else + PRECMD='' +fi + +if [[ "$3" == 's' ]]; then + POSTCMD='silent' +else + POSTCMD='' +fi + + +case "$REQUESTED_WORKSPACE" in + 1) + hyprctl dispatch "$PRECMD"workspace"$POSTCMD" "$REQUESTED_WORKSPACE"; hyprctl hyprpaper wallpaper "$FOCUSED_MONITOR, ~/Bilder/Wallpapers-simple/beach.png" + ;; + 2) + hyprctl dispatch "$PRECMD"workspace"$POSTCMD" "$REQUESTED_WORKSPACE"; hyprctl hyprpaper wallpaper "$FOCUSED_MONITOR, ~/Bilder/Wallpapers-simple/pulppixel22.png" + ;; + 3) + hyprctl dispatch "$PRECMD"workspace"$POSTCMD" "$REQUESTED_WORKSPACE"; hyprctl hyprpaper wallpaper "$FOCUSED_MONITOR, ~/Bilder/Wallpapers-simple/WP.jpg" + ;; + 4) + hyprctl dispatch "$PRECMD"workspace"$POSTCMD" "$REQUESTED_WORKSPACE"; hyprctl hyprpaper wallpaper "$FOCUSED_MONITOR, ~/Bilder/Wallpapers-simple/SweetSpot.png" + ;; + 5) + hyprctl dispatch "$PRECMD"workspace"$POSTCMD" "$REQUESTED_WORKSPACE"; hyprctl hyprpaper wallpaper "$FOCUSED_MONITOR, ~/Bilder/Wallpapers-simple/ContentoCustomBackground.png" + ;; + 6) + hyprctl dispatch "$PRECMD"workspace"$POSTCMD" "$REQUESTED_WORKSPACE"; hyprctl hyprpaper wallpaper "$FOCUSED_MONITOR, ~/Bilder/Wallpapers-simple/AtariTimes.png" + ;; + *) + hyprctl dispatch "$PRECMD"workspace"$POSTCMD" "$REQUESTED_WORKSPACE"; hyprctl hyprpaper wallpaper "$FOCUSED_MONITOR, ~/Bilder/Wallpapers-simple/TronLightCycle1.png" + ;; +esac + -- 2.51.2