mirror of
https://github.com/ItsDrike/nixdots
synced 2024-11-15 01:57:16 +00:00
Compare commits
No commits in common. "aa8cc541404eb4ef0670f468860f57f4d32947be" and "c5074480ecc6c661897b8fdf1071115123b289be" have entirely different histories.
aa8cc54140
...
c5074480ec
|
@ -1,6 +1,5 @@
|
||||||
_: {
|
_: {
|
||||||
imports = [
|
imports = [
|
||||||
./shared.nix
|
./shared.nix
|
||||||
./desktop.nix
|
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,18 +0,0 @@
|
||||||
{
|
|
||||||
osConfig,
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}: let
|
|
||||||
inherit (lib) mkIf;
|
|
||||||
|
|
||||||
devType = osConfig.myOptions.device.roles.type;
|
|
||||||
acceptedTypes = [ "laptop" "desktop" ];
|
|
||||||
in {
|
|
||||||
config = mkIf (builtins.elem devType acceptedTypes) {
|
|
||||||
home.packages = with pkgs; [
|
|
||||||
trash-cli
|
|
||||||
bitwarden-cli
|
|
||||||
];
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,257 +1,174 @@
|
||||||
{
|
{
|
||||||
wayland.windowManager.hyprland = {
|
wayland.windowManager.hyprland.settings = {
|
||||||
settings = {
|
"$MOUSE_LMB" = "mouse:272";
|
||||||
"$MOUSE_LMB" = "mouse:272";
|
"$MOUSE_RMB" = "mouse:273";
|
||||||
"$MOUSE_RMB" = "mouse:273";
|
"$MOUSE_MMB" = "mouse:274";
|
||||||
"$MOUSE_MMB" = "mouse:274";
|
"$MOUSE_EX1" = "mouse:275";
|
||||||
"$MOUSE_EX1" = "mouse:275";
|
"$MOUSE_EX2" = "mouse:276";
|
||||||
"$MOUSE_EX2" = "mouse:276";
|
|
||||||
|
|
||||||
"$XF86Favorites" = "164";
|
"$XF86Favorites" = "164";
|
||||||
|
|
||||||
bind = [
|
bind = [
|
||||||
#
|
#
|
||||||
# Active window
|
# Active window
|
||||||
#
|
#
|
||||||
"SUPER, W, killactive,"
|
"SUPER, W, killactive,"
|
||||||
"SUPER, F, togglefloating,"
|
"SUPER, F, togglefloating,"
|
||||||
"SUPER, Space, fullscreen, 0"
|
"SUPER, Space, fullscreen, 0"
|
||||||
"SUPER, Space, fullscreen, 1" # maximize
|
"SUPER, Space, fullscreen, 1" # maximize
|
||||||
"SUPER_SHIFT, S, layoutmsg, togglesplit"
|
"SUPER_SHIFT, S, layoutmsg, togglesplit"
|
||||||
|
|
||||||
#
|
#
|
||||||
# Programs
|
# Programs
|
||||||
#
|
#
|
||||||
"SUPER, Return, exec, kitty"
|
"SUPER, Return, exec, kitty"
|
||||||
# TODO: requires programs
|
# TODO: requires programs
|
||||||
|
|
||||||
#
|
#
|
||||||
# DE/WM Control programs
|
# DE/WM Control programs
|
||||||
#
|
#
|
||||||
# TODO: Requires programs
|
# TODO: Requires programs
|
||||||
"SUPER_SHIFT, L, exec, wlogout -p layer-shell"
|
"SUPER_SHIFT, L, exec, wlogout -p layer-shell"
|
||||||
"SUPER_CTRL, L, exec, loginctl lock-session"
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Screenshots
|
# Screenshots
|
||||||
#
|
#
|
||||||
# TODO: requires script
|
# TODO: requires script
|
||||||
|
|
||||||
#
|
#
|
||||||
# Brightness control
|
# Brightness control
|
||||||
#
|
#
|
||||||
"SUPER, Right, exec, brightness 5%+"
|
# TODO: requires script
|
||||||
"SUPER, Left, exec, brightness 5%-"
|
|
||||||
", XF86MonBrightnessUp, exec, brightness 5%+"
|
|
||||||
", XF86MonBrightnessDown, exec, brightness 5%-"
|
|
||||||
|
|
||||||
#
|
|
||||||
# Audio/Volume control
|
|
||||||
#
|
|
||||||
", XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"
|
|
||||||
", XF86AudioMicMute, exec, wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle"
|
|
||||||
# (rest in binde section)
|
|
||||||
|
|
||||||
#
|
|
||||||
# Notifications
|
|
||||||
#
|
|
||||||
# TODO: Requires notification daemon (dunst?)
|
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Window groups
|
# Audio/Volume control
|
||||||
#
|
#
|
||||||
"SUPER, G, togglegroup,"
|
"SUPER, Down, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.05-"
|
||||||
"ALT, tab, changegroupactive, f"
|
"SUPER, Up, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.05+"
|
||||||
"ALT, grave, changegroupactive, b"
|
", XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.05-"
|
||||||
|
", XF86AudioRaiseVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.05+"
|
||||||
|
", XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"
|
||||||
|
", XF86AudioMicMute, exec, wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle"
|
||||||
|
|
||||||
#
|
#
|
||||||
# Special workspace (scratchpad)
|
# Notifications
|
||||||
#
|
#
|
||||||
"ALT, grave, movetoworkspace, special"
|
# TODO: Requires notification daemon (dunst?)
|
||||||
"SUPER, grave, togglespecialworkspace,"
|
|
||||||
|
|
||||||
#
|
|
||||||
# Move window focus
|
|
||||||
#
|
|
||||||
"SUPER, h, movefocus, l"
|
|
||||||
"SUPER, l, movefocus, r"
|
|
||||||
"SUPER, k, movefocus, u"
|
|
||||||
"SUPER, j, movefocus, d"
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Move active window in direction
|
# Window groups
|
||||||
#
|
#
|
||||||
"SUPER_ALT, h, movewindow, l"
|
"SUPER, G, togglegroup,"
|
||||||
"SUPER_ALT, l, movewindow, r"
|
"ALT, tab, changegroupactive, f"
|
||||||
"SUPER_ALT, k, movewindow, u"
|
"ALT, grave, changegroupactive, b"
|
||||||
"SUPER_ALT, j, movewindow, d"
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Move floating windows
|
# Special workspace (scratchpad)
|
||||||
#
|
#
|
||||||
"SUPER_ALT, left, exec, hyprland-move-window 100 l"
|
"ALT, grave, movetoworkspace, special"
|
||||||
"SUPER_ALT, right, exec, hyprland-move-window 100 r"
|
"SUPER, grave, togglespecialworkspace,"
|
||||||
"SUPER_ALT, up, exec, hyprland-move-window 100 u"
|
|
||||||
"SUPER_ALT, down, exec, hyprland-move-window 100 d"
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Override split direction for next window (manual tiling)
|
# Move window focus
|
||||||
#
|
#
|
||||||
"SUPER_ALT, left, layoutmsg, preselect l"
|
"SUPER, h, movefocus, l"
|
||||||
"SUPER_ALT, right, layoutmsg, preselect r"
|
"SUPER, l, movefocus, r"
|
||||||
"SUPER_ALT, up, layoutmsg, preselect u"
|
"SUPER, k, movefocus, u"
|
||||||
"SUPER_ALT, down, layoutmsg, preselect d"
|
"SUPER, j, movefocus, d"
|
||||||
|
|
||||||
#
|
#
|
||||||
# Switch workspace (swapping to current monitor)
|
# Move active window in direction
|
||||||
#
|
#
|
||||||
"SUPER, 1, exec, hyprland-swap-workspace 1"
|
"SUPER_ALT, h, movewindow, l"
|
||||||
"SUPER, 2, exec, hyprland-swap-workspace 2"
|
"SUPER_ALT, l, movewindow, r"
|
||||||
"SUPER, 3, exec, hyprland-swap-workspace 3"
|
"SUPER_ALT, k, movewindow, u"
|
||||||
"SUPER, 4, exec, hyprland-swap-workspace 4"
|
"SUPER_ALT, j, movewindow, d"
|
||||||
"SUPER, 5, exec, hyprland-swap-workspace 5"
|
|
||||||
"SUPER, 6, exec, hyprland-swap-workspace 6"
|
|
||||||
"SUPER, 7, exec, hyprland-swap-workspace 7"
|
|
||||||
"SUPER, 8, exec, hyprland-swap-workspace 8"
|
|
||||||
"SUPER, 9, exec, hyprland-swap-workspace 9"
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Move window to workspace
|
# Move floating windows
|
||||||
#
|
#
|
||||||
"SUPER_SHIFT, 1, movetoworkspacesilent, 1"
|
# TODO: requires script (move-window.sh)
|
||||||
"SUPER_SHIFT, 2, movetoworkspacesilent, 2"
|
|
||||||
"SUPER_SHIFT, 3, movetoworkspacesilent, 3"
|
|
||||||
"SUPER_SHIFT, 4, movetoworkspacesilent, 4"
|
|
||||||
"SUPER_SHIFT, 5, movetoworkspacesilent, 5"
|
|
||||||
"SUPER_SHIFT, 6, movetoworkspacesilent, 6"
|
|
||||||
"SUPER_SHIFT, 7, movetoworkspacesilent, 7"
|
|
||||||
"SUPER_SHIFT, 8, movetoworkspacesilent, 8"
|
|
||||||
"SUPER_SHIFT, 9, movetoworkspacesilent, 9"
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Move window to workspace + focus it
|
# Override split direction for next window (manual tiling)
|
||||||
#
|
#
|
||||||
"ALT, 1, movetoworkspace, 1"
|
"SUPER_ALT, left, layoutmsg, preselect l"
|
||||||
"ALT, 2, movetoworkspace, 2"
|
"SUPER_ALT, right, layoutmsg, preselect r"
|
||||||
"ALT, 3, movetoworkspace, 3"
|
"SUPER_ALT, up, layoutmsg, preselect u"
|
||||||
"ALT, 4, movetoworkspace, 4"
|
"SUPER_ALT, down, layoutmsg, preselect d"
|
||||||
"ALT, 5, movetoworkspace, 5"
|
|
||||||
"ALT, 6, movetoworkspace, 6"
|
|
||||||
"ALT, 7, movetoworkspace, 7"
|
|
||||||
"ALT, 8, movetoworkspace, 8"
|
|
||||||
"ALT, 9, movetoworkspace, 9"
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Cycle workspaces (relative movement)
|
# Switch workspace (swapping to current monitor)
|
||||||
#
|
#
|
||||||
"SUPER, mouse_down, workspace, +1"
|
"SUPER, 1, exec, hyprland-swap-workspace 1"
|
||||||
"SUPER, mouse_up, workspace, -1"
|
"SUPER, 2, exec, hyprland-swap-workspace 2"
|
||||||
"SUPER, bracketright, workspace, +1"
|
"SUPER, 3, exec, hyprland-swap-workspace 3"
|
||||||
"SUPER, bracketleft, workspace, -1"
|
"SUPER, 4, exec, hyprland-swap-workspace 4"
|
||||||
|
"SUPER, 5, exec, hyprland-swap-workspace 5"
|
||||||
|
"SUPER, 6, exec, hyprland-swap-workspace 6"
|
||||||
|
"SUPER, 7, exec, hyprland-swap-workspace 7"
|
||||||
|
"SUPER, 8, exec, hyprland-swap-workspace 8"
|
||||||
|
"SUPER, 9, exec, hyprland-swap-workspace 9"
|
||||||
|
|
||||||
#
|
#
|
||||||
# Cycle monitors (relative movement)
|
# Move window to workspace
|
||||||
#
|
#
|
||||||
"SUPER_SHIFT, mouse_down, focusmonitor, +1"
|
"SUPER_SHIFT, 1, movetoworkspacesilent, 1"
|
||||||
"SUPER_SHIFT, mouse_up, focusmonitor, -1"
|
"SUPER_SHIFT, 2, movetoworkspacesilent, 2"
|
||||||
"SUPER_SHIFT, bracketright, focusmonitor, +1"
|
"SUPER_SHIFT, 3, movetoworkspacesilent, 3"
|
||||||
"SUPER_SHIFT, bracketleft, focusmonitor, -1"
|
"SUPER_SHIFT, 4, movetoworkspacesilent, 4"
|
||||||
];
|
"SUPER_SHIFT, 5, movetoworkspacesilent, 5"
|
||||||
|
"SUPER_SHIFT, 6, movetoworkspacesilent, 6"
|
||||||
|
"SUPER_SHIFT, 7, movetoworkspacesilent, 7"
|
||||||
|
"SUPER_SHIFT, 8, movetoworkspacesilent, 8"
|
||||||
|
"SUPER_SHIFT, 9, movetoworkspacesilent, 9"
|
||||||
|
|
||||||
# Mouse bindings
|
#
|
||||||
bindm = [
|
# Move window to workspace + focus it
|
||||||
#
|
#
|
||||||
# Mouse window resizing
|
"ALT, 1, movetoworkspace, 1"
|
||||||
#
|
"ALT, 2, movetoworkspace, 2"
|
||||||
"SUPER, $MOUSE_LMB, movewindow"
|
"ALT, 3, movetoworkspace, 3"
|
||||||
"SUPER, $MOUSE_RMB, resizewindow"
|
"ALT, 4, movetoworkspace, 4"
|
||||||
];
|
"ALT, 5, movetoworkspace, 5"
|
||||||
|
"ALT, 6, movetoworkspace, 6"
|
||||||
|
"ALT, 7, movetoworkspace, 7"
|
||||||
|
"ALT, 8, movetoworkspace, 8"
|
||||||
|
"ALT, 9, movetoworkspace, 9"
|
||||||
|
|
||||||
# Repeat bindings
|
#
|
||||||
binde = [
|
# Cycle workspaces (relative movement)
|
||||||
#
|
#
|
||||||
# Audio/Volume control
|
"SUPER, mouse_down, workspace, +1"
|
||||||
#
|
"SUPER, mouse_up, workspace, -1"
|
||||||
"SUPER, Down, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.05-"
|
"SUPER, bracketright, workspace, +1"
|
||||||
"SUPER, Up, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.05+"
|
"SUPER, bracketleft, workspace, -1"
|
||||||
", XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.05-"
|
|
||||||
", XF86AudioRaiseVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.05+"
|
|
||||||
# (rest in bind section)
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Window resizing
|
# Cycle monitors (relative movement)
|
||||||
#
|
#
|
||||||
"ALT, right, resizeactive, 10 0"
|
"SUPER_SHIFT, mouse_down, focusmonitor, +1"
|
||||||
"ALT, left, resizeactive, -10 0"
|
"SUPER_SHIFT, mouse_up, focusmonitor, -1"
|
||||||
"ALT, up, resizeactive, 0 -10"
|
"SUPER_SHIFT, bracketright, focusmonitor, +1"
|
||||||
"ALT, down, resizeactive, 0 10 "
|
"SUPER_SHIFT, bracketleft, focusmonitor, -1"
|
||||||
"ALT, H, resizeactive, -10 0"
|
|
||||||
"ALT, K, resizeactive, 0 -10"
|
#
|
||||||
"ALT, J, resizeactive, 0 10"
|
# Window resizing
|
||||||
"ALT, L, resizeactive, 10 0"
|
#
|
||||||
];
|
# TODO: Submaps + binde
|
||||||
};
|
|
||||||
|
|
||||||
# Used for submaps, which don't support `settings`
|
|
||||||
extraConfig = ''
|
|
||||||
#
|
#
|
||||||
# Isolation group
|
# Isolation group
|
||||||
#
|
#
|
||||||
|
# TODO: Submaps
|
||||||
|
];
|
||||||
|
|
||||||
# Useful to prevent keybind capturing (for games, etc)
|
bindm = [
|
||||||
# SUPER + Fn + F12 (Favorites)
|
# Mouse window resizing
|
||||||
bind = SUPER, XF86Favorites, exec, hyprctl dispatch submap isolate && notify-send "Keybind isolation" "Keybind isolation on"
|
"SUPER, $MOUSE_LMB, movewindow"
|
||||||
submap = isolate
|
"SUPER, $MOUSE_RMB, resizewindow"
|
||||||
bind = SUPER, XF86Favorites, exec, hyprctl dispatch submap reset && notify-send "Keybind isolation" "Keybind isolation off"
|
];
|
||||||
submap = reset
|
|
||||||
|
|
||||||
#
|
|
||||||
# Precise keyboard window resizing
|
|
||||||
#
|
|
||||||
|
|
||||||
bind = SUPER, slash, submap, resize
|
|
||||||
submap = resize
|
|
||||||
|
|
||||||
binde = , right, resizeactive, 10 0
|
|
||||||
binde = , left, resizeactive, -10 0
|
|
||||||
binde = , up, resizeactive, 0 -10
|
|
||||||
binde = , down, resizeactive, 0 10
|
|
||||||
|
|
||||||
binde = SUPER, right, resizeactive, 30 0
|
|
||||||
binde = SUPER, left, resizeactive, -30 0
|
|
||||||
binde = SUPER, up, resizeactive, 0 -30
|
|
||||||
binde = SUPER, down, resizeactive, 0 30
|
|
||||||
|
|
||||||
binde = SHIFT, right, resizeactive, 1 0
|
|
||||||
binde = SHIFT, left, resizeactive, -1 0
|
|
||||||
binde = SHIFT, up, resizeactive, 0 -1
|
|
||||||
binde = SHIFT, down, resizeactive, 0 1
|
|
||||||
|
|
||||||
binde = , H, resizeactive, -10 0
|
|
||||||
binde = , K, resizeactive, 0 -10
|
|
||||||
binde = , J, resizeactive, 0 10
|
|
||||||
binde = , L, resizeactive, 10 0
|
|
||||||
|
|
||||||
binde = , right, resizeactive, 10 0
|
|
||||||
binde = , left, resizeactive, -10 0
|
|
||||||
binde = , up, resizeactive, 0 -10
|
|
||||||
binde = , down, resizeactive, 0 10
|
|
||||||
|
|
||||||
binde = SUPER, H, resizeactive, -30 0
|
|
||||||
binde = SUPER, K, resizeactive, 0 -30
|
|
||||||
binde = SUPER, J, resizeactive, 0 30
|
|
||||||
binde = SUPER, L, resizeactive, 30 0
|
|
||||||
|
|
||||||
binde = SHIFT, H, resizeactive, -1 0
|
|
||||||
binde = SHIFT, K, resizeactive, 0 -1
|
|
||||||
binde = SHIFT, J, resizeactive, 0 1
|
|
||||||
binde = SHIFT, L, resizeactive, 1 0
|
|
||||||
|
|
||||||
bind = , escape, submap, reset
|
|
||||||
bind = , return, submap, reset
|
|
||||||
bind = SUPER, slash, submap, reset
|
|
||||||
submap = reset
|
|
||||||
'';
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,101 +1,7 @@
|
||||||
{
|
{
|
||||||
wayland.windowManager.hyprland.settings = {
|
wayland.windowManager.hyprland.settings = {
|
||||||
windowrulev2 = [
|
windowrulev2 = [
|
||||||
#
|
# TODO: Add these
|
||||||
# Assigned workspaces
|
|
||||||
#
|
|
||||||
"workspace, 2, class:^(firefox)$"
|
|
||||||
"workspace 4, class:^(discord)$"
|
|
||||||
"workspace 4, class:^(vesktop)$"
|
|
||||||
"workspace 4, class:^(WebCord)$"
|
|
||||||
"workspace 5, class:^(Spotify)$"
|
|
||||||
"workspace 6, class:^(Stremio)$"
|
|
||||||
"workspace 6, class:^(com.stremio.stremio)$"
|
|
||||||
|
|
||||||
#
|
|
||||||
# Idle inhibition
|
|
||||||
#
|
|
||||||
"idleinhibit focus, class:^(Stremio)$"
|
|
||||||
"idleinhibit focus, class:^(com.stremio.stremio)$"
|
|
||||||
"idleinhibit focus, class:^(mpv)$"
|
|
||||||
"idleinhibit focus, class:^(firefox)$,title:^(.+ - YouTube — Mozilla Firefox)$"
|
|
||||||
"idleinhibit focus, class:^(firefox)$,title:^(Picture-in-Picture)$"
|
|
||||||
|
|
||||||
#
|
|
||||||
# Correct size / Auto tile
|
|
||||||
#
|
|
||||||
"size 800 550, class:^(qalculate-gtk)$"
|
|
||||||
"tile, class:^(Spotify)$"
|
|
||||||
|
|
||||||
#
|
|
||||||
# Auto float
|
|
||||||
#
|
|
||||||
"float, class:^(Lxappearance)$"
|
|
||||||
"float, class:^(Rofi)$"
|
|
||||||
"float, class:^(feh)$"
|
|
||||||
"float, class:^(pavucontrol-qt)$"
|
|
||||||
"float, class:^(pavucontrol)$"
|
|
||||||
"float, class:^(file-roller)$"
|
|
||||||
"float, class:^(qalculate-gtk)$"
|
|
||||||
"float, class:^(com.github.wwmm.easyeffects)"
|
|
||||||
"float, class:^(opensnitch_ui)$"
|
|
||||||
"float, class:^(Brave-browser)$,title:^(_crx_.+)$"
|
|
||||||
"float, class:^(hyprland-share-picker)$"
|
|
||||||
"float,class:^(floating)$"
|
|
||||||
|
|
||||||
"center, class:^(hyprland-share-picker)$"
|
|
||||||
"animation slide, class:^(hyprland-share-picker)$"
|
|
||||||
|
|
||||||
# Float firefox windows (like bookmark menus, or some extension windows)
|
|
||||||
"float, class:^(firefox)$,title:^(Revert Bookmarks)$"
|
|
||||||
"float, class:^(firefox)$,title:^(Library)$"
|
|
||||||
"float, class:^(firefox)$,title:^(Extension: \(uBlock Origin\))"
|
|
||||||
"float, class:^(firefox)$,title:^(Firefox — Sharing Indicator)$"
|
|
||||||
"float, class:^(firefox)$,title:^(Opening .+)$"
|
|
||||||
"float, class:^(firefox)$,title:^$"
|
|
||||||
|
|
||||||
# Float some pcmanfm windows
|
|
||||||
"float, class:^(pcmanfm-qt)$,title:^(Mount)$"
|
|
||||||
"float, class:^(pcmanfm-qt)$,title:^(Preferences)$"
|
|
||||||
"float, class:^(pcmanfm-qt)$,title:^(Move files)$"
|
|
||||||
"float, class:^(pcmanfm-qt)$,title:^(Search Files)$"
|
|
||||||
"float, class:^(pcmanfm-qt)$,title:^(Copy Files)$"
|
|
||||||
"float, class:^(pcmanfm-qt)$,title:^(Confirm to replace files)$"
|
|
||||||
|
|
||||||
# Float some windows from other apps
|
|
||||||
"float, class:^(Spotify)$,title:^(Ozone X11)$"
|
|
||||||
"float, class:^(python3)$,title:^(Tor Browser Launcher Settings)$"
|
|
||||||
"float, class:^(python3)$,title:^(Tor Browser)$"
|
|
||||||
|
|
||||||
# General float rules
|
|
||||||
"float, class:^(file_progress)$"
|
|
||||||
"float, class:^(confirm)$"
|
|
||||||
"float, class:^(dialog)$"
|
|
||||||
"float, class:^(download)$"
|
|
||||||
"float, class:^(notification)$"
|
|
||||||
"float, class:^(error)$"
|
|
||||||
"float, class:^(splash)$"
|
|
||||||
"float, class:^(confirmreset)$"
|
|
||||||
|
|
||||||
#
|
|
||||||
# Fixes
|
|
||||||
#
|
|
||||||
|
|
||||||
# Jetbrains
|
|
||||||
"windowdance, class:^(jetbrains-.*)$,floating:1"
|
|
||||||
"center, class:^(jetbrains-.*)$,title:^(splash)$,floating:1"
|
|
||||||
"nofocus, class:^(jetbrains-.*)$,title:^(splash)$,floating:1"
|
|
||||||
"noborder, class:^(jetbrains-.*)$,title:^(splash)$,floating:1"
|
|
||||||
"center, class:^(jetbrains-.*)$,title:^( )$,floating:1"
|
|
||||||
"stayfocused, class:^(jetbrains-.*)$,title:^( )$,floating:1"
|
|
||||||
"noborder, class:^(jetbrains-.*)$,title:^( )$,floating:1"
|
|
||||||
"nofocus, class:^(jetbrains-.*)$,title:^(win.*)$,floating:1"
|
|
||||||
"noinitialfocus, class:^(jetbrains-.*)$,title:^(win.*)$"
|
|
||||||
];
|
|
||||||
|
|
||||||
layerrule = [
|
|
||||||
# Don't add borders to grim selections when taking screenshots
|
|
||||||
"noanim, ^(selection)$"
|
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
}: let
|
}: let
|
||||||
inherit (lib) mkIf;
|
inherit (lib) mkIf;
|
||||||
|
|
||||||
hyprPkgs = (import ./packages {inherit pkgs;});
|
inherit (import ./packages {inherit pkgs;}) hyprland-swap-workspace;
|
||||||
|
|
||||||
cfg = osConfig.myOptions.home-manager.wms.hyprland;
|
cfg = osConfig.myOptions.home-manager.wms.hyprland;
|
||||||
in {
|
in {
|
||||||
|
@ -15,11 +15,8 @@ in {
|
||||||
];
|
];
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
home.packages = [
|
home.packages = with pkgs; [
|
||||||
hyprPkgs.hyprland-swap-workspace
|
hyprland-swap-workspace
|
||||||
hyprPkgs.hyprland-move-window
|
|
||||||
pkgs.brightnessctl
|
|
||||||
hyprPkgs.brightness
|
|
||||||
];
|
];
|
||||||
|
|
||||||
wayland.windowManager.hyprland = {
|
wayland.windowManager.hyprland = {
|
||||||
|
|
|
@ -1,22 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
# This is mainly a wrapper, acting as just: `brightnessctl s $1`
|
|
||||||
# However, in addition, this will also produce a notification with
|
|
||||||
# the brightness level shown as a progress bar.
|
|
||||||
|
|
||||||
# Send brightness level desktop notification, showing the given brightness level
|
|
||||||
# as progress bar, along with given message.
|
|
||||||
# $1 - brightness level (number 0-100)
|
|
||||||
send_brightness_notify() {
|
|
||||||
percent_brightness="$1"
|
|
||||||
|
|
||||||
notify-send \
|
|
||||||
--app-name="brightness" \
|
|
||||||
--urgency="normal" \
|
|
||||||
-h int:value:$percent_brightness \
|
|
||||||
-h string:synchronous:brightness \
|
|
||||||
"brightness" "Level: $percent_brightness"
|
|
||||||
}
|
|
||||||
|
|
||||||
out="$(brightnessctl s "$1")"
|
|
||||||
cur_percent="$(echo "$out" | grep "Current" | grep -oP '\(\d+%' | tr -d '()%')"
|
|
||||||
send_brightness_notify "$cur_percent"
|
|
|
@ -1,4 +0,0 @@
|
||||||
{pkgs, ...}:
|
|
||||||
pkgs.writeShellScriptBin "brightness" ''
|
|
||||||
${builtins.readFile ./brightness.sh}
|
|
||||||
''
|
|
|
@ -3,9 +3,7 @@
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
packages = {
|
packages = {
|
||||||
hyprland-swap-workspace = pkgs.callPackage ./hyprland-swap-workspace {};
|
hyprland-swap-workspace = pkgs.callPackage ./hyprland-swap-workspace.nix {};
|
||||||
hyprland-move-window = pkgs.callPackage ./hyprland-move-window {};
|
|
||||||
brightness = pkgs.callPackage ./brightness {};
|
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
packages
|
packages
|
||||||
|
|
|
@ -1,5 +0,0 @@
|
||||||
{pkgs, ...}:
|
|
||||||
pkgs.writeShellScriptBin "hyprland-move-window" ''
|
|
||||||
${builtins.readFile ./hyprland-move-window.sh}
|
|
||||||
''
|
|
||||||
|
|
|
@ -1,35 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
RESIZE_SIZE=${1:?Missing resize size}
|
|
||||||
|
|
||||||
RESIZE_PARAMS_X=0
|
|
||||||
RESIZE_PARAMS_Y=0
|
|
||||||
|
|
||||||
DIRECTION=${2:?Missing move direction}
|
|
||||||
case $DIRECTION in
|
|
||||||
l)
|
|
||||||
RESIZE_PARAMS_X=-$RESIZE_SIZE
|
|
||||||
;;
|
|
||||||
r)
|
|
||||||
RESIZE_PARAMS_X=$RESIZE_SIZE
|
|
||||||
;;
|
|
||||||
u)
|
|
||||||
RESIZE_PARAMS_Y=-$RESIZE_SIZE
|
|
||||||
;;
|
|
||||||
d)
|
|
||||||
RESIZE_PARAMS_Y=$RESIZE_SIZE
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
echo "kbye"
|
|
||||||
return 1
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
ACTIVE_WINDOW=$(hyprctl activewindow -j)
|
|
||||||
IS_FLOATING=$(echo "$ACTIVE_WINDOW" | jq .floating)
|
|
||||||
|
|
||||||
if [ "$IS_FLOATING" = "true" ]; then
|
|
||||||
hyprctl dispatch moveactive "$RESIZE_PARAMS_X" "$RESIZE_PARAMS_Y"
|
|
||||||
else
|
|
||||||
hyprctl dispatch movewindow "$DIRECTION"
|
|
||||||
fi
|
|
Loading…
Reference in a new issue