From 2c73e48172249172a6d08425f05915cc0f4b0054 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Tue, 5 Aug 2025 12:17:37 +0200 Subject: [PATCH] Split up the default .config/hypr/hyprland.conf to be easier to tailor with less risk of overwritting --- bin/omarchy-refresh-hyprland | 4 ++ config/hypr/autostart.conf | 2 + config/hypr/bindings.conf | 25 ++++++++++++ config/hypr/envs.conf | 3 ++ config/hypr/hyprland.conf | 76 ++++-------------------------------- config/hypr/input.conf | 28 +++++++++++++ 6 files changed, 69 insertions(+), 69 deletions(-) create mode 100644 config/hypr/autostart.conf create mode 100644 config/hypr/bindings.conf create mode 100644 config/hypr/envs.conf create mode 100644 config/hypr/input.conf diff --git a/bin/omarchy-refresh-hyprland b/bin/omarchy-refresh-hyprland index 72f06435..e62134cf 100755 --- a/bin/omarchy-refresh-hyprland +++ b/bin/omarchy-refresh-hyprland @@ -1,3 +1,7 @@ #!/bin/bash +~/.local/share/omarchy/bin/omarchy-refresh-config hypr/autostart.conf +~/.local/share/omarchy/bin/omarchy-refresh-config hypr/bindings.conf +~/.local/share/omarchy/bin/omarchy-refresh-config hypr/envs.conf +~/.local/share/omarchy/bin/omarchy-refresh-config hypr/input.conf ~/.local/share/omarchy/bin/omarchy-refresh-config hypr/hyprland.conf diff --git a/config/hypr/autostart.conf b/config/hypr/autostart.conf new file mode 100644 index 00000000..3b7c62d2 --- /dev/null +++ b/config/hypr/autostart.conf @@ -0,0 +1,2 @@ +# Extra autostart processes +# exec-once = uwsm app -- my-service diff --git a/config/hypr/bindings.conf b/config/hypr/bindings.conf new file mode 100644 index 00000000..eb018e19 --- /dev/null +++ b/config/hypr/bindings.conf @@ -0,0 +1,25 @@ +# Application bindings +$terminal = uwsm app -- alacritty +$browser = uwsm app -- chromium --new-window --ozone-platform=wayland +$webapp = $browser --app + +bind = SUPER, return, exec, $terminal +bind = SUPER, F, exec, uwsm app -- nautilus --new-window +bind = SUPER, B, exec, $browser +bind = SUPER, M, exec, uwsm app -- 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, uwsm app -- signal-desktop +bind = SUPER, O, exec, uwsm app -- obsidian -disable-gpu +bind = SUPER, slash, exec, uwsm app -- 1password + +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/" +bind = SUPER, E, exec, $webapp="https://app.hey.com" +bind = SUPER, Y, exec, $webapp="https://youtube.com/" +bind = SUPER SHIFT, G, exec, $webapp="https://web.whatsapp.com/" +bind = SUPER ALT, G, exec, $webapp="https://messages.google.com/web/conversations" +bind = SUPER, X, exec, $webapp="https://x.com/" +bind = SUPER SHIFT, X, exec, $webapp="https://x.com/compose/post" diff --git a/config/hypr/envs.conf b/config/hypr/envs.conf new file mode 100644 index 00000000..53e0825c --- /dev/null +++ b/config/hypr/envs.conf @@ -0,0 +1,3 @@ +# Extra env variables +# Note: You must relaunch Hyprland after changing envs (use Super+Esc, then Relaunch) +# env = MY_GLOBAL_ENV,setting diff --git a/config/hypr/hyprland.conf b/config/hypr/hyprland.conf index 619ecaa8..e03c3005 100644 --- a/config/hypr/hyprland.conf +++ b/config/hypr/hyprland.conf @@ -1,13 +1,6 @@ # Learn how to configure Hyprland: https://wiki.hyprland.org/Configuring/ -# You're encouraged to tailor your Hyprland config in this file by adding or overwriting any settings. -# But don't change anything that lives in ~/.local/share/omarchy, if you can help it! -# Those files are overwritten when Omarchy is updated. - -# Change your personal monitor setup in here to keep the main config portable -source = ~/.config/hypr/monitors.conf - -# Use defaults Omarchy defaults +# Use defaults Omarchy defaults (but don't edit these directly!) source = ~/.local/share/omarchy/default/hypr/autostart.conf source = ~/.local/share/omarchy/default/hypr/bindings/media.conf source = ~/.local/share/omarchy/default/hypr/bindings/tiling.conf @@ -18,64 +11,9 @@ source = ~/.local/share/omarchy/default/hypr/input.conf source = ~/.local/share/omarchy/default/hypr/windows.conf source = ~/.config/omarchy/current/theme/hyprland.conf -# Application bindings -$terminal = uwsm app -- alacritty -$browser = uwsm app -- chromium --new-window --ozone-platform=wayland -$webapp = $browser --app - -bindd = SUPER, return, Terminal, exec, $terminal -bindd = SUPER, F, File manager, exec, uwsm app -- nautilus --new-window -bindd = SUPER, B, Browser, exec, $browser -bindd = SUPER, M, Music, exec, uwsm app -- spotify -bindd = SUPER, N, Neovim, exec, $terminal -e nvim -bindd = SUPER, T, Activity, exec, $terminal -e btop -bindd = SUPER, D, Docker, exec, $terminal -e lazydocker -bindd = SUPER, G, Signal, exec, uwsm app -- signal-desktop -bindd = SUPER, O, Obsidian, exec, uwsm app -- obsidian -disable-gpu -bindd = SUPER, slash, Passwords, exec, uwsm app -- 1password - -bindd = SUPER, A, ChatGPT, exec, $webapp="https://chatgpt.com" -bindd = SUPER SHIFT, A, Grok, exec, $webapp="https://grok.com" -bindd = SUPER, C, Calendar, exec, $webapp="https://app.hey.com/calendar/weeks/" -bindd = SUPER, E, Email, exec, $webapp="https://app.hey.com" -bindd = SUPER, Y, YouTube, exec, $webapp="https://youtube.com/" -bindd = SUPER SHIFT, G, WhatsApp, exec, $webapp="https://web.whatsapp.com/" -bindd = SUPER ALT, G, Google Messages, exec, $webapp="https://messages.google.com/web/conversations" -bindd = SUPER, X, X, exec, $webapp="https://x.com/" -bindd = SUPER SHIFT, X, X Post, exec, $webapp="https://x.com/compose/post" - -# Extra autostart processes -# exec-once = uwsm app -- my-service - -# Extra env variables -# Note: You must relaunch Hyprland after changing envs (use Super+Esc, then Relaunch) -# env = MY_GLOBAL_ENV,setting - -# Control your input devices -# See https://wiki.hypr.land/Configuring/Variables/#input -input { - # Use multiple keyboard layouts and switch between them with Alt + Space - # kb_layout = us,dk - kb_options = compose:caps # ,grp:alt_space_toggle - - # Change speed of keyboard repeat - repeat_rate = 40 - repeat_delay = 600 - - # Increase sensitity for mouse/trackpack (default: 0) - # sensitivity = 0.35 - - touchpad { - # Use natural (inverse) scrolling - # natural_scroll = true - - # Use two-finger clicks for right-click instead of lower-right corner - # clickfinger_behavior = true - - # Control the speed of your scrolling - scroll_factor = 0.4 - } -} - -# Scroll faster in the terminal -windowrule = scrolltouchpad 1.5, class:Alacritty +# Change your own setup in these files (and overwrite any settings from defaults!) +source = ~/.config/hypr/monitors.conf +source = ~/.config/hypr/input.conf +source = ~/.config/hypr/bindings.conf +source = ~/.config/hypr/envs.conf +source = ~/.config/hypr/autostart.conf diff --git a/config/hypr/input.conf b/config/hypr/input.conf new file mode 100644 index 00000000..274d80d9 --- /dev/null +++ b/config/hypr/input.conf @@ -0,0 +1,28 @@ +# Control your input devices +# See https://wiki.hypr.land/Configuring/Variables/#input +input { + # Use multiple keyboard layouts and switch between them with Alt + Space + # kb_layout = us,dk + kb_options = compose:caps # ,grp:alt_space_toggle + + # Change speed of keyboard repeat + repeat_rate = 40 + repeat_delay = 600 + + # Increase sensitity for mouse/trackpack (default: 0) + # sensitivity = 0.35 + + touchpad { + # Use natural (inverse) scrolling + # natural_scroll = true + + # Use two-finger clicks for right-click instead of lower-right corner + # clickfinger_behavior = true + + # Control the speed of your scrolling + scroll_factor = 0.4 + } +} + +# Scroll faster in the terminal +windowrule = scrolltouchpad 1.5, class:Alacritty