diff --git a/.gitignore b/.gitignore index b5668e0..ca7c79b 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,3 @@ hypr/menu-*.list +hypr/hosts/* +!hpyr/hosts/example-host.conf diff --git a/README.md b/README.md index c3db46f..a4014db 100644 --- a/README.md +++ b/README.md @@ -48,13 +48,23 @@ cd ~/Projects/ git clone https://git.jeena.net/jeena/hypr-dotfiles.git ``` +The next step is to set up a hostname config where you can overwrite +hyprland configs for a specific host: + +``` +cd ~/Projects/hypr-dotfiles/hypr/hosts/ +touch $(hostname).conf +ln -s $(hostname).conf host.conf +``` + + Then you need to soft link the directories in this git repo to the `~/.config/` directory, make sure that those directories don't exist yet in your `~/.config`, you will need to delete or move them before. In our example it would be: ``` -cd ~/config +cd ~/.config ln -s ~/Projects/hypr-dotfiles/hypr hypr ln -s ~/Projects/hypr-dotfiles/waybar waybar ln -s ~/Projects/hypr-dotfiles/tofi tofi diff --git a/hypr/hyprland.conf b/hypr/hyprland.conf index 81b88fb..61b1a11 100644 --- a/hypr/hyprland.conf +++ b/hypr/hyprland.conf @@ -20,8 +20,8 @@ env = HYPRSHOT_DIR,Screenshots ################ # See https://wiki.hyprland.org/Configuring/Monitors/ -# monitor=,preferred,auto,auto -monitor=DP-1, 2560x1440@74.97Hz, 0x0, 1 +# Safe default for any machine +monitor = ,preferred,auto,1 ################### ### MY PROGRAMS ### @@ -298,14 +298,25 @@ bindl = , XF86AudioPrev, exec, playerctl previous # See https://wiki.hyprland.org/Configuring/Window-Rules/ for more # See https://wiki.hyprland.org/Configuring/Workspace-Rules/ for workspace rules -# Example windowrule -# windowrule = float,class:^(kitty)$,title:^(kitty)$ -# windowrule = float,class:org.keepassxc.KeePassXC +windowrule { + name = suppress-maximize + match:class = .* + suppress_event = maximize +} -# Ignore maximize requests from apps. You'll probably like this. -windowrulev2 = suppress_event maximize, match:class:.* +windowrule { + name = xwayland-nofocus-fix + match:class = ^$ + match:title = ^$ + match:xwayland = 1 + match:float = 1 + match:fullscreen = 0 + match:pin = 0 -# Fix some dragging issues with XWayland -windowrulev2 = nofocus, class:^$, title:^$, xwayland:1, floating:1, fullscreen:0, pinned:0 + no_focus = on +} source = ~/.config/hypr/windowrule.conf + +# Host overrides +source = ~/.config/hypr/hosts/host.conf diff --git a/hypr/windowrule.conf b/hypr/windowrule.conf index 72f72e6..7af0edb 100644 --- a/hypr/windowrule.conf +++ b/hypr/windowrule.conf @@ -1,9 +1,31 @@ -# Librewolf Picture-in-Picture -windowrulev2 = float, class:($browser),title:(Picture-in-Picture) -windowrulev2 = pin, class:($browser),title:(Picture-in-Picture) -windowrulev2 = opacity 1.0 override 1.0 override, match:class:($browser), match:title:(Picture-in-Picture) +# LibreWolf Picture-in-Picture +windowrule { + name = librewolf-pip + match:class = ($browser) + match:title = (Picture-in-Picture) + + float = on + pin = on + opacity = 1.0 override 1.0 override +} # Cheatsheet -windowrulev2 = float, class:net.jeena.Cheatsheet -windowrulev2 = center, class:net.jeena.Cheatsheet -windowrulev2 = stayfocused, class:net.jeena.Cheatsheet +windowrule { + name = cheatsheet-window + match:class = net.jeena.Cheatsheet + + float = on + center = on +} + +windowrule { + name = chromium-ws3 + match:class = chromium + workspace = 3 silent +} + +windowrule { + name = keepassxc-magic + match:class = org.keepassxc.KeePassXC + workspace = special:magic silent +}