-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
419 additions
and
271 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,123 @@ | ||
let | ||
# binds $mod + [shift +] {1..10} to [move to] workspace {1..10} | ||
workspaces = builtins.concatLists (builtins.genList ( | ||
x: let | ||
ws = let | ||
c = (x + 1) / 10; | ||
in | ||
builtins.toString (x + 1 - (c * 10)); | ||
in [ | ||
"$mod, ${ws}, workspace, ${toString (x + 1)}" | ||
"$mod SHIFT, ${ws}, movetoworkspace, ${toString (x + 1)}" | ||
] | ||
) | ||
10); | ||
|
||
toggle = program: let | ||
prog = builtins.substring 0 14 program; | ||
in "pkill ${prog} || uwsm app -- ${program}"; | ||
|
||
runOnce = program: "pgrep ${program} || uwsm app -- ${program}"; | ||
in { | ||
wayland.windowManager.hyprland.settings = { | ||
# mouse movements | ||
bindm = [ | ||
"$mod, mouse:272, movewindow" | ||
"$mod, mouse:273, resizewindow" | ||
"$mod ALT, mouse:272, resizewindow" | ||
]; | ||
|
||
# binds | ||
bind = | ||
[ | ||
# compositor commands | ||
"$mod SHIFT, E, exec, pkill Hyprland" | ||
"$mod, Q, killactive," | ||
"$mod, F, fullscreen," | ||
"$mod, G, togglegroup," | ||
"$mod SHIFT, N, changegroupactive, f" | ||
"$mod SHIFT, P, changegroupactive, b" | ||
"$mod, R, togglesplit," | ||
"$mod, T, togglefloating," | ||
"$mod, P, pseudo," | ||
"$mod ALT, ,resizeactive," | ||
|
||
# utility | ||
# terminal | ||
"$mod, Return, exec, uwsm app -- foot" | ||
# logout menu | ||
"$mod, Escape, exec, ${toggle "wlogout"} -p layer-shell" | ||
# lock screen | ||
"$mod, L, exec, ${runOnce "hyprlock"}" | ||
# lock screen, to be used with the special key Fn+F10 on my keyboard | ||
"$mod, I, exec, ${runOnce "hyprlock"}" | ||
# select area to perform OCR on | ||
"$mod, O, exec, ${runOnce "wl-ocr"}" | ||
", XF86Favorites, exec, ${runOnce "wl-ocr"}" | ||
# open settings | ||
# "$mod, U, exec, XDG_CURRENT_DESKTOP=gnome ${runOnce "gnome-control-center"}" | ||
|
||
# move focus | ||
"$mod, left, movefocus, l" | ||
"$mod, right, movefocus, r" | ||
"$mod, up, movefocus, u" | ||
"$mod, down, movefocus, d" | ||
|
||
# screenshot | ||
# area | ||
", Print, exec, ${runOnce "grimblast"} --notify copysave area" | ||
"$mod SHIFT, R, exec, ${runOnce "grimblast"} --notify copysave area" | ||
|
||
# current screen | ||
"CTRL, Print, exec, ${runOnce "grimblast"} --notify --cursor copysave output" | ||
"$mod SHIFT CTRL, R, exec, ${runOnce "grimblast"} --notify --cursor copysave output" | ||
|
||
# all screens | ||
"ALT, Print, exec, ${runOnce "grimblast"} --notify --cursor copysave screen" | ||
"$mod SHIFT ALT, R, exec, ${runOnce "grimblast"} --notify --cursor copysave screen" | ||
|
||
# special workspace | ||
"$mod SHIFT, grave, movetoworkspace, special" | ||
"$mod, grave, togglespecialworkspace, eDP-1" | ||
|
||
# cycle workspaces | ||
"$mod, bracketleft, workspace, m-1" | ||
"$mod, bracketright, workspace, m+1" | ||
|
||
# cycle monitors | ||
"$mod SHIFT, bracketleft, focusmonitor, l" | ||
"$mod SHIFT, bracketright, focusmonitor, r" | ||
|
||
# send focused workspace to left/right monitors | ||
"$mod SHIFT ALT, bracketleft, movecurrentworkspacetomonitor, l" | ||
"$mod SHIFT ALT, bracketright, movecurrentworkspacetomonitor, r" | ||
] | ||
++ workspaces; | ||
|
||
bindr = [ | ||
# launcher | ||
#"$mod, SUPER_L, exec, ${toggle "anyrun"}" | ||
]; | ||
|
||
bindl = [ | ||
# media controls | ||
", XF86AudioPlay, exec, playerctl play-pause" | ||
", XF86AudioPrev, exec, playerctl previous" | ||
", XF86AudioNext, exec, playerctl next" | ||
|
||
# volume | ||
", XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle" | ||
", XF86AudioMicMute, exec, wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle" | ||
]; | ||
|
||
bindle = [ | ||
# volume | ||
", XF86AudioRaiseVolume, exec, wpctl set-volume -l '1.0' @DEFAULT_AUDIO_SINK@ 6%+" | ||
", XF86AudioLowerVolume, exec, wpctl set-volume -l '1.0' @DEFAULT_AUDIO_SINK@ 6%-" | ||
|
||
# backlight | ||
", XF86MonBrightnessUp, exec, brillo -q -u 300000 -A 5" | ||
", XF86MonBrightnessDown, exec, brillo -q -u 300000 -U 5" | ||
]; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
{lib, ...}: { | ||
wayland.windowManager.hyprland.settings = { | ||
# layer rules | ||
layerrule = let | ||
toRegex = list: let | ||
elements = lib.concatStringsSep "|" list; | ||
in "^(${elements})$"; | ||
|
||
lowopacity = [ | ||
"bar" | ||
"calendar" | ||
"notifications" | ||
"system-menu" | ||
]; | ||
|
||
highopacity = [ | ||
"anyrun" | ||
"osd" | ||
"logout_dialog" | ||
]; | ||
|
||
blurred = lib.concatLists [ | ||
lowopacity | ||
highopacity | ||
]; | ||
in [ | ||
"blur, ${toRegex blurred}" | ||
"xray 1, ${toRegex ["bar"]}" | ||
"ignorealpha 0.5, ${toRegex (highopacity ++ ["music"])}" | ||
"ignorealpha 0.2, ${toRegex lowopacity}" | ||
]; | ||
|
||
# window rules | ||
windowrulev2 = [ | ||
# telegram media viewer | ||
"float, title:^(Media viewer)$" | ||
|
||
# Bitwarden extension | ||
"float, title:^(.*Bitwarden Password Manager.*)$" | ||
|
||
# gnome calculator | ||
"float, class:^(org.gnome.Calculator)$" | ||
"size 360 490, class:^(org.gnome.Calculator)$" | ||
|
||
# allow tearing in games | ||
"immediate, class:^(osu\!|cs2)$" | ||
|
||
# make Firefox/Zen PiP window floating and sticky | ||
"float, title:^(Picture-in-Picture)$" | ||
"pin, title:^(Picture-in-Picture)$" | ||
|
||
# throw sharing indicators away | ||
"workspace special silent, title:^(Firefox — Sharing Indicator)$" | ||
"workspace special silent, title:^(Zen — Sharing Indicator)$" | ||
"workspace special silent, title:^(.*is sharing (your screen|a window)\.)$" | ||
|
||
# start spotify in ws9 | ||
"workspace 9 silent, title:^(Spotify( Premium)?)$" | ||
|
||
# idle inhibit while watching videos | ||
"idleinhibit focus, class:^(mpv|.+exe|celluloid)$" | ||
"idleinhibit focus, class:^(zen)$, title:^(.*YouTube.*)$" | ||
"idleinhibit fullscreen, class:^(zen)$" | ||
|
||
"dimaround, class:^(gcr-prompter)$" | ||
"dimaround, class:^(xdg-desktop-portal-gtk)$" | ||
"dimaround, class:^(polkit-gnome-authentication-agent-1)$" | ||
|
||
# fix xwayland apps | ||
"rounding 0, xwayland:1" | ||
"center, class:^(.*jetbrains.*)$, title:^(Confirm Exit|Open Project|win424|win201|splash)$" | ||
"size 640 400, class:^(.*jetbrains.*)$, title:^(splash)$" | ||
|
||
# don't render hyprbars on tiling windows | ||
"plugin:hyprbars:nobar, floating:0" | ||
]; | ||
}; | ||
} |
Oops, something went wrong.