From ceeaa25f0aecc24e1bb476e00dd639e0ca671c54 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Thu, 10 Jul 2025 15:30:38 -0700 Subject: [PATCH] Expose all application starter bindings for easy overwriting --- config/hypr/hyprland.conf | 38 ++++++---- default/hypr/bindings.conf | 107 ++------------------------- default/hypr/bindings/media.conf | 13 ++++ default/hypr/bindings/tiling.conf | 58 +++++++++++++++ default/hypr/bindings/utilities.conf | 32 ++++++++ 5 files changed, 131 insertions(+), 117 deletions(-) create mode 100644 default/hypr/bindings/media.conf create mode 100644 default/hypr/bindings/tiling.conf create mode 100644 default/hypr/bindings/utilities.conf diff --git a/config/hypr/hyprland.conf b/config/hypr/hyprland.conf index fe07406..37223da 100644 --- a/config/hypr/hyprland.conf +++ b/config/hypr/hyprland.conf @@ -3,31 +3,33 @@ # Change your personal monitor setup in here to keep the main config portable source = ~/.config/hypr/monitors.conf -# Default applications -$terminal = alacritty -$fileManager = nautilus --new-window -$browser = chromium --new-window --ozone-platform=wayland -$music = spotify -$passwordManager = 1password -$messenger = signal-desktop -$webapp = $browser --app - # Use defaults Omarchy defaults source = ~/.local/share/omarchy/default/hypr/autostart.conf -source = ~/.local/share/omarchy/default/hypr/bindings.conf +source = ~/.local/share/omarchy/default/hypr/bindings/media.conf +source = ~/.local/share/omarchy/default/hypr/bindings/tiling.conf +source = ~/.local/share/omarchy/default/hypr/bindings/utilities.conf source = ~/.local/share/omarchy/default/hypr/envs.conf source = ~/.local/share/omarchy/default/hypr/looknfeel.conf source = ~/.local/share/omarchy/default/hypr/input.conf source = ~/.local/share/omarchy/default/hypr/windows.conf source = ~/.config/omarchy/current/theme/hyprland.conf -# Extra autostart processes (uncomment to run Dropbox) -# exec-once = dropbox-cli start +# Application bindings +$terminal = alacritty +$browser = chromium --new-window --ozone-platform=wayland +$webapp = $browser --app -# Extra env variables -# env = MY_GLOBAL_ENV,setting +bind = SUPER, return, exec, $terminal +bind = SUPER, F, exec, nautilus --new-window +bind = SUPER, B, exec, $browser +bind = SUPER, M, exec, spotify +bind = SUPER, N, exec, $terminal -e nvim +bind = SUPER, T, exec, $terminal -e btop +bind = SUPER, D, exec, $terminal -e lazydocker +bind = SUPER, G, exec, signal-desktop +bind = SUPER, O, exec, obsidian -disable-gpu +bind = SUPER, slash, exec, 1password -# Extra bindings (overwrite existing binding with: unbind = SUPER, O) bind = SUPER, A, exec, $webapp="https://chatgpt.com" bind = SUPER SHIFT, A, exec, $webapp="https://grok.com" bind = SUPER, C, exec, $webapp="https://app.hey.com/calendar/weeks/" @@ -38,6 +40,12 @@ bind = SUPER ALT, G, exec, $webapp="https://messages.google.com/web/conversation bind = SUPER, X, exec, $webapp="https://x.com/" bind = SUPER SHIFT, X, exec, $webapp="https://x.com/compose/post" +# Extra autostart processes +# exec-once = dropbox-cli start + +# Extra env variables +# env = MY_GLOBAL_ENV,setting + # Control your input devices # See https://wiki.hypr.land/Configuring/Variables/#input input { diff --git a/default/hypr/bindings.conf b/default/hypr/bindings.conf index 6f22bc0..15bfb20 100644 --- a/default/hypr/bindings.conf +++ b/default/hypr/bindings.conf @@ -1,4 +1,5 @@ -# Start default apps +# Deprecated bindings file. New installations include everything directly. + bind = SUPER, return, exec, $terminal bind = SUPER, F, exec, $fileManager bind = SUPER, B, exec, $browser @@ -10,104 +11,6 @@ bind = SUPER, G, exec, $messenger bind = SUPER, O, exec, obsidian -disable-gpu bind = SUPER, slash, exec, $passwordManager -bind = SUPER, space, exec, pkill wofi || wofi --show drun --sort-order=alphabetical --style="$HOME/.local/share/omarchy/default/wofi/search.css" - -bind = SUPER SHIFT, SPACE, exec, pkill -SIGUSR1 waybar -bind = SUPER CTRL, SPACE, exec, ~/.local/share/omarchy/bin/swaybg-next -bind = SUPER SHIFT CTRL, SPACE, exec, ~/.local/share/omarchy/bin/omarchy-theme-next -bind = SUPER, K, exec, ~/.local/share/omarchy/bin/omarchy-show-keybindings - -# Notifications -bind = SUPER, comma, exec, makoctl dismiss -bind = SUPER SHIFT, comma, exec, makoctl dismiss --all -bind = SUPER CTRL, comma, exec, makoctl mode -t do-not-disturb && makoctl mode | grep -q 'do-not-disturb' && notify-send "Silenced notifications" || notify-send "Enabled notifications" - -bind = SUPER, W, killactive, - -# Power menu controls lock, suspend, relaunch, restart, shutdown -bind = SUPER, ESCAPE, exec, ~/.local/share/omarchy/bin/omarchy-power-menu - -# Toggle idling -bind = SUPER CTRL, I, exec, ~/.local/share/omarchy/bin/omarchy-toggle-idle - -# Control tiling -bind = SUPER, J, togglesplit, # dwindle -bind = SUPER, P, pseudo, # dwindle -bind = SUPER, V, togglefloating, - -# Move focus with mainMod + arrow keys -bind = SUPER, left, movefocus, l -bind = SUPER, right, movefocus, r -bind = SUPER, up, movefocus, u -bind = SUPER, down, movefocus, d - -# Switch workspaces with mainMod + [0-9] -bind = SUPER, code:10, workspace, 1 -bind = SUPER, code:11, workspace, 2 -bind = SUPER, code:12, workspace, 3 -bind = SUPER, code:13, workspace, 4 -bind = SUPER, code:14, workspace, 5 -bind = SUPER, code:15, workspace, 6 -bind = SUPER, code:16, workspace, 7 -bind = SUPER, code:17, workspace, 8 -bind = SUPER, code:18, workspace, 9 -bind = SUPER, code:19, workspace, 10 - -# Move active window to a workspace with mainMod + SHIFT + [0-9] -bind = SUPER SHIFT, code:10, movetoworkspace, 1 -bind = SUPER SHIFT, code:11, movetoworkspace, 2 -bind = SUPER SHIFT, code:12, movetoworkspace, 3 -bind = SUPER SHIFT, code:13, movetoworkspace, 4 -bind = SUPER SHIFT, code:14, movetoworkspace, 5 -bind = SUPER SHIFT, code:15, movetoworkspace, 6 -bind = SUPER SHIFT, code:16, movetoworkspace, 7 -bind = SUPER SHIFT, code:17, movetoworkspace, 8 -bind = SUPER SHIFT, code:18, movetoworkspace, 9 -bind = SUPER SHIFT, code:19, movetoworkspace, 10 - -# Swap active window with the one next to it with mainMod + SHIFT + arrow keys -bind = SUPER SHIFT, left, swapwindow, l -bind = SUPER SHIFT, right, swapwindow, r -bind = SUPER SHIFT, up, swapwindow, u -bind = SUPER SHIFT, down, swapwindow, d - -# Resize active window -bind = SUPER, minus, resizeactive, -100 0 -bind = SUPER, equal, resizeactive, 100 0 -bind = SUPER SHIFT, minus, resizeactive, 0 -100 -bind = SUPER SHIFT, equal, resizeactive, 0 100 - -# Scroll through existing workspaces with mainMod + scroll -bind = SUPER, mouse_down, workspace, e+1 -bind = SUPER, mouse_up, workspace, e-1 - -# Move/resize windows with mainMod + LMB/RMB and dragging -bindm = SUPER, mouse:272, movewindow -bindm = SUPER, mouse:273, resizewindow - -# Laptop multimedia keys for volume and LCD brightness -bindel = ,XF86AudioRaiseVolume, exec, wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 5%+ -bindel = ,XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%- -bindel = ,XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle -bindel = ,XF86AudioMicMute, exec, wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle -bindel = ,XF86MonBrightnessUp, exec, brightnessctl -e4 -n2 set 5%+ -bindel = ,XF86MonBrightnessDown, exec, brightnessctl -e4 -n2 set 5%- - -# Control Apple Display brightness -bind = CTRL, F1, exec, ~/.local/share/omarchy/bin/apple-display-brightness -5000 -bind = CTRL, F2, exec, ~/.local/share/omarchy/bin/apple-display-brightness +5000 -bind = SHIFT CTRL, F2, exec, ~/.local/share/omarchy/bin/apple-display-brightness +60000 - -# Requires playerctl -bindl = , XF86AudioNext, exec, playerctl next -bindl = , XF86AudioPause, exec, playerctl play-pause -bindl = , XF86AudioPlay, exec, playerctl play-pause -bindl = , XF86AudioPrev, exec, playerctl previous - -# Screenshots -bind = , PRINT, exec, hyprshot -m region -bind = SHIFT, PRINT, exec, hyprshot -m window -bind = CTRL, PRINT, exec, hyprshot -m output - -# Color picker -bind = SUPER, PRINT, exec, hyprpicker -a +source = ~/.local/share/omarchy/default/hypr/bindings/media.conf +source = ~/.local/share/omarchy/default/hypr/bindings/tiling.conf +source = ~/.local/share/omarchy/default/hypr/bindings/utilities.conf diff --git a/default/hypr/bindings/media.conf b/default/hypr/bindings/media.conf new file mode 100644 index 0000000..a70d8d6 --- /dev/null +++ b/default/hypr/bindings/media.conf @@ -0,0 +1,13 @@ +# Laptop multimedia keys for volume and LCD brightness +bindel = ,XF86AudioRaiseVolume, exec, wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 5%+ +bindel = ,XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%- +bindel = ,XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle +bindel = ,XF86AudioMicMute, exec, wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle +bindel = ,XF86MonBrightnessUp, exec, brightnessctl -e4 -n2 set 5%+ +bindel = ,XF86MonBrightnessDown, exec, brightnessctl -e4 -n2 set 5%- + +# Requires playerctl +bindl = , XF86AudioNext, exec, playerctl next +bindl = , XF86AudioPause, exec, playerctl play-pause +bindl = , XF86AudioPlay, exec, playerctl play-pause +bindl = , XF86AudioPrev, exec, playerctl previous diff --git a/default/hypr/bindings/tiling.conf b/default/hypr/bindings/tiling.conf new file mode 100644 index 0000000..6dcc37a --- /dev/null +++ b/default/hypr/bindings/tiling.conf @@ -0,0 +1,58 @@ +# Close window +bind = SUPER, W, killactive, + +# Control tiling +bind = SUPER, J, togglesplit, # dwindle +bind = SUPER, P, pseudo, # dwindle +bind = SUPER, V, togglefloating, + +# Move focus with mainMod + arrow keys +bind = SUPER, left, movefocus, l +bind = SUPER, right, movefocus, r +bind = SUPER, up, movefocus, u +bind = SUPER, down, movefocus, d + +# Switch workspaces with mainMod + [0-9] +bind = SUPER, code:10, workspace, 1 +bind = SUPER, code:11, workspace, 2 +bind = SUPER, code:12, workspace, 3 +bind = SUPER, code:13, workspace, 4 +bind = SUPER, code:14, workspace, 5 +bind = SUPER, code:15, workspace, 6 +bind = SUPER, code:16, workspace, 7 +bind = SUPER, code:17, workspace, 8 +bind = SUPER, code:18, workspace, 9 +bind = SUPER, code:19, workspace, 10 + +# Move active window to a workspace with mainMod + SHIFT + [0-9] +bind = SUPER SHIFT, code:10, movetoworkspace, 1 +bind = SUPER SHIFT, code:11, movetoworkspace, 2 +bind = SUPER SHIFT, code:12, movetoworkspace, 3 +bind = SUPER SHIFT, code:13, movetoworkspace, 4 +bind = SUPER SHIFT, code:14, movetoworkspace, 5 +bind = SUPER SHIFT, code:15, movetoworkspace, 6 +bind = SUPER SHIFT, code:16, movetoworkspace, 7 +bind = SUPER SHIFT, code:17, movetoworkspace, 8 +bind = SUPER SHIFT, code:18, movetoworkspace, 9 +bind = SUPER SHIFT, code:19, movetoworkspace, 10 + +# Swap active window with the one next to it with mainMod + SHIFT + arrow keys +bind = SUPER SHIFT, left, swapwindow, l +bind = SUPER SHIFT, right, swapwindow, r +bind = SUPER SHIFT, up, swapwindow, u +bind = SUPER SHIFT, down, swapwindow, d + +# Resize active window +bind = SUPER, minus, resizeactive, -100 0 +bind = SUPER, equal, resizeactive, 100 0 +bind = SUPER SHIFT, minus, resizeactive, 0 -100 +bind = SUPER SHIFT, equal, resizeactive, 0 100 + +# Scroll through existing workspaces with mainMod + scroll +bind = SUPER, mouse_down, workspace, e+1 +bind = SUPER, mouse_up, workspace, e-1 + +# Move/resize windows with mainMod + LMB/RMB and dragging +bindm = SUPER, mouse:272, movewindow +bindm = SUPER, mouse:273, resizewindow + diff --git a/default/hypr/bindings/utilities.conf b/default/hypr/bindings/utilities.conf new file mode 100644 index 0000000..0e6b1b7 --- /dev/null +++ b/default/hypr/bindings/utilities.conf @@ -0,0 +1,32 @@ +# Launching +bind = SUPER, space, exec, pkill wofi || wofi --show drun --sort-order=alphabetical --style="$HOME/.local/share/omarchy/default/wofi/search.css" +bind = SUPER, K, exec, ~/.local/share/omarchy/bin/omarchy-show-keybindings + +# Aesthetics +bind = SUPER SHIFT, SPACE, exec, pkill -SIGUSR1 waybar +bind = SUPER CTRL, SPACE, exec, ~/.local/share/omarchy/bin/swaybg-next +bind = SUPER SHIFT CTRL, SPACE, exec, ~/.local/share/omarchy/bin/omarchy-theme-next + +# Notifications +bind = SUPER, comma, exec, makoctl dismiss +bind = SUPER SHIFT, comma, exec, makoctl dismiss --all +bind = SUPER CTRL, comma, exec, makoctl mode -t do-not-disturb && makoctl mode | grep -q 'do-not-disturb' && notify-send "Silenced notifications" || notify-send "Enabled notifications" + +# Power menu controls lock, suspend, relaunch, restart, shutdown +bind = SUPER, ESCAPE, exec, ~/.local/share/omarchy/bin/omarchy-power-menu + +# Toggle idling +bind = SUPER CTRL, I, exec, ~/.local/share/omarchy/bin/omarchy-toggle-idle + +# Control Apple Display brightness +bind = CTRL, F1, exec, ~/.local/share/omarchy/bin/apple-display-brightness -5000 +bind = CTRL, F2, exec, ~/.local/share/omarchy/bin/apple-display-brightness +5000 +bind = SHIFT CTRL, F2, exec, ~/.local/share/omarchy/bin/apple-display-brightness +60000 + +# Screenshots +bind = , PRINT, exec, hyprshot -m region +bind = SHIFT, PRINT, exec, hyprshot -m window +bind = CTRL, PRINT, exec, hyprshot -m output + +# Color picker +bind = SUPER, PRINT, exec, hyprpicker -a