Add Hyprland, attempt generalization
This commit is contained in:
parent
590430f296
commit
a0cc623c4b
57 changed files with 634 additions and 385 deletions
|
@ -1,6 +1,7 @@
|
|||
{ ... }:
|
||||
{
|
||||
imports = [
|
||||
./hyprland
|
||||
./niri
|
||||
./programs
|
||||
./sway
|
||||
|
|
26
modules/home/wms/hyprland/autostart/default.nix
Normal file
26
modules/home/wms/hyprland/autostart/default.nix
Normal file
|
@ -0,0 +1,26 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
wayland.windowManager.hyprland.settings.exec-once = [
|
||||
"waybar"
|
||||
|
||||
# Scratchpads
|
||||
"foot -a btop -T Gotop btop"
|
||||
"foot -a music -T Music ncmpcpp"
|
||||
"foot -a sound -T Sound pulsemixer"
|
||||
|
||||
# Deamons and tray
|
||||
"hyprpaper"
|
||||
"wl-paste -t text --watch clipman store -P"
|
||||
"wl-copy"
|
||||
"mako"
|
||||
"sunshine"
|
||||
"${pkgs.mate.mate-polkit}/libexec/polkit-mate-authentication-agent-1"
|
||||
|
||||
# Foreground
|
||||
"librewolf -P Misc --name=MiscBrowser"
|
||||
"thunderbird"
|
||||
"vesktop"
|
||||
"fractal"
|
||||
"telegram-desktop"
|
||||
];
|
||||
}
|
18
modules/home/wms/hyprland/default.nix
Normal file
18
modules/home/wms/hyprland/default.nix
Normal file
|
@ -0,0 +1,18 @@
|
|||
{ config, pkgs, ... }:
|
||||
{
|
||||
imports = [
|
||||
./autostart
|
||||
./hotkeys
|
||||
./inputs
|
||||
./outputs
|
||||
./plugins
|
||||
./programs
|
||||
./rules
|
||||
./theme
|
||||
];
|
||||
|
||||
wayland.windowManager.hyprland = {
|
||||
enable = true;
|
||||
plugins = with pkgs.hyprlandPlugins; [ hy3 ];
|
||||
};
|
||||
}
|
84
modules/home/wms/hyprland/hotkeys/README.md
Normal file
84
modules/home/wms/hyprland/hotkeys/README.md
Normal file
|
@ -0,0 +1,84 @@
|
|||
# Sway Window Manager Hotkeys
|
||||
|
||||
## Application Launchers
|
||||
| Key Combination | Action |
|
||||
|----------------------|-------------------------------------------|
|
||||
| Win + F1 | Launch **LibreWolf** (Jim profile) |
|
||||
| Win + F2 | Launch **LibreWolf** (Alt profile) |
|
||||
| Win + F3 | Launch **LibreWolf** (Misc profile) |
|
||||
| Win + F4 | Launch **Discord** |
|
||||
| Win + F5 | Launch **Steam** |
|
||||
| Win + F6 | Launch **Heroic Games** |
|
||||
| Win + F7 | Launch **Looking Glass** VM Client |
|
||||
| Win + F10 | Launch **Virt-Manager** |
|
||||
| Win + F11 | Open **Rofi Scratchpads** |
|
||||
| Win + F12 | Open **NixOS Configuration Files** |
|
||||
|
||||
## Window Management
|
||||
| Key Combination | Action |
|
||||
|----------------------|-------------------------------------------|
|
||||
| Win + Arrows | Focus in the specified direction |
|
||||
| Win + Shift + Arrows | Move window in the specified direction |
|
||||
| Win + Shift + Space | Toggle window floating |
|
||||
| Win + Space | Switch focus between floating/tiled |
|
||||
| Win + Shift + {1-9} | Move window to a workspace and focus |
|
||||
| Win + {1-9} | Switch to specified workspace |
|
||||
| Win + 0 | Pin window and toggle border |
|
||||
| Win + F | Toggle fullscreen |
|
||||
| Win + Shift + R | Reload configuration |
|
||||
| Win + Q | Close the current window |
|
||||
|
||||
## Layout Management
|
||||
| Key Combination | Action |
|
||||
|----------------------|-------------------------------------------|
|
||||
| Win + W | Toggle split layout |
|
||||
| Win + E | Toggle tabbed/stacking layout |
|
||||
| Win + H/V | Split window horizontally/vertically |
|
||||
| Win + A/D | Focus parent/child container |
|
||||
|
||||
## Volume and Media Controls
|
||||
| Key Combination | Action |
|
||||
|----------------------|-------------------------------------------|
|
||||
| XF86AudioRaiseVolume | Raise system volume |
|
||||
| XF86AudioLowerVolume | Lower system volume |
|
||||
| XF86AudioMute | Mute/unmute audio |
|
||||
| XF86AudioPlay | Toggle media playback |
|
||||
| XF86AudioNext | Skip to the next track |
|
||||
| XF86AudioPrev | Go to the previous track |
|
||||
|
||||
## Screenshot and Brightness Controls
|
||||
| Key Combination | Action |
|
||||
|----------------------|-------------------------------------------|
|
||||
| Print | Take a screenshot |
|
||||
| Shift + Print | Screenshot of the current window |
|
||||
| Brightness Up + Down | Change screen brightness |
|
||||
|
||||
## Scratchpads
|
||||
| Key Combination | Action |
|
||||
|----------------------|-------------------------------------------|
|
||||
| Ctrl + Shift + Escape | Open **Gotop** (monitoring) |
|
||||
| Win + Shift + M | Open **Music** scratchpad |
|
||||
| Win + Shift + V | Open **Sound Settings** scratchpad |
|
||||
| Win + Shift + Backslash | Open **EasyEffects** scratchpad |
|
||||
|
||||
## Special Sway Tools
|
||||
| Key Combination | Action |
|
||||
|----------------------|-------------------------------------------|
|
||||
| Win + Escape | **Kill** selected window |
|
||||
| Win + Ctrl + X | **Inspect** window properties |
|
||||
| Win + Ctrl + Prior/Next | Switch OBS scene to **Main**/**Guest** |
|
||||
|
||||
## Miscellaneous
|
||||
| Key Combination | Action |
|
||||
|----------------------|-------------------------------------------|
|
||||
| Win + Return | Open **Foot terminal** |
|
||||
| Win + S | Open **Rofi (run commands)** |
|
||||
| Win + C | Open **Clipman (clipboard manager)** |
|
||||
| Win + X | Open **Power Menu** |
|
||||
| Win + B | Show/Hide **Waybar** |
|
||||
|
||||
## Workspaces (Alternate)
|
||||
| Key Combination | Action |
|
||||
|----------------------|-------------------------------------------|
|
||||
| Alt + F1-F9 | Switch to alternate workspace |
|
||||
| Alt + Shift + F1-F9 | Move window to alt workspace and focus |
|
166
modules/home/wms/hyprland/hotkeys/default.nix
Normal file
166
modules/home/wms/hyprland/hotkeys/default.nix
Normal file
|
@ -0,0 +1,166 @@
|
|||
{ pkgs, config, ... }:
|
||||
{
|
||||
wayland.windowManager.hyprland.settings = let
|
||||
# Set default modifier and variables
|
||||
primeMod = "Super";
|
||||
secMod = "Alt";
|
||||
resizeAmount = "55";
|
||||
in {
|
||||
bind = [
|
||||
## Launchers
|
||||
|
||||
# Browser
|
||||
''${primeMod}, F1, exec, librewolf -p Main --name MainBrowser | notify-send "Main Browser"''
|
||||
''${primeMod}, F2, exec, librewolf -p Alt --name AltBrowser | notify-send "Alternate Browser"''
|
||||
''${primeMod}, F3, exec, librewolf -p Misc --name MiscBrowser | notify-send "Miscellaneous Browser"''
|
||||
|
||||
# Virtual machines
|
||||
''${primeMod}, F4, exec, virt-manager | notify-send "Virtual Machines"''
|
||||
''${primeMod}, F5, exec, looking-glass-client input:rawMouse=yes | notify-send "Looking Glass"''
|
||||
|
||||
# Prime + key
|
||||
"${primeMod}, s, exec, rofi -show run -p Command"
|
||||
"${primeMod}, c, exec, clipman pick -t rofi"
|
||||
"${primeMod}, x, exec, rofiscripts --power"
|
||||
"${primeMod}, b, exec, pkill -USR1 waybar"
|
||||
"${primeMod}, Return, exec, foot"
|
||||
|
||||
# Prime + shift + key
|
||||
"${primeMod} Shift, s, exec, rofi -show drun -modi drun -drun-display-format {name} -show-icons -disable-history"
|
||||
"${primeMod} Shift, t, exec, pcmanfm"
|
||||
"${primeMod} Shift, e, exec, bemoji -n -P 0"
|
||||
"${primeMod} Shift, b, exec, rofi-bluetooth"
|
||||
"${primeMod} Shift, Return, exec, foot ranger"
|
||||
|
||||
# Prime + ctrl + key
|
||||
"${primeMod} Ctrl, s, exec, rofiscripts --scratchpads"
|
||||
''${primeMod} Ctrl, c, exec, wlpicker && notify-send "Color copied to clipboard"''
|
||||
|
||||
## Media
|
||||
|
||||
# Volume
|
||||
"${secMod}, j, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-"
|
||||
"${secMod}, k, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+"
|
||||
|
||||
# MPD
|
||||
"${primeMod}, Backslash, exec, mpc toggle"
|
||||
"${secMod} Shift, h, exec, mpc prev"
|
||||
"${secMod} Shift, j, exec, mpc volume -3"
|
||||
"${secMod} Shift, k, exec, mpc volume +3"
|
||||
"${secMod} Shift, l, exec, mpc next"
|
||||
|
||||
## Miscellaneous
|
||||
|
||||
# Notifications
|
||||
"${primeMod}, n, exec, makotoggle"
|
||||
"${primeMod} Shift, n, exec, makoctl restore"
|
||||
"${primeMod} Ctrl, n, exec, makoctl dismiss -a"
|
||||
|
||||
# Screenshots
|
||||
''${secMod}, f, exec, XDG_SCREENSHOTS_DIR="$HOME/Pictures/Screenshots" SLURP_ARGS="-w 3 -c 3823C4 -B 00000066 -b 00000099" grimblast --freeze --notify copysave area''
|
||||
"${secMod} Shift, f, exec, grimblast --notify copysave output"
|
||||
"${secMod} Ctrl, f, exec, grimblast --notify copysave active"
|
||||
|
||||
# Screenshots
|
||||
|
||||
# Display and keyboard brightness
|
||||
"${primeMod}, equal, exec, light -A 5"
|
||||
"${primeMod}, minus, exec, light -U 5"
|
||||
"${primeMod} Shift, equal, exec, light -A 1"
|
||||
"${primeMod} Shift, minus, exec, light -U 1"
|
||||
",XF86KbdBrightnessUp, exec, light -s sysfs/leds/smc::kbd_backlight -A 5"
|
||||
",XF86KbdBrightnessDown, exec, light -s sysfs/leds/smc::kbd_backlight -U 5"
|
||||
|
||||
## Window manager
|
||||
"${primeMod}, q, killactive,"
|
||||
|
||||
# Switch to workspaces
|
||||
"${primeMod}, grave, workspace, name:0"
|
||||
"${primeMod}, 1, workspace, name:${config.ws.w1}"
|
||||
"${primeMod}, 2, workspace, name:${config.ws.w2}"
|
||||
"${primeMod}, 3, workspace, name:${config.ws.w3}"
|
||||
"${primeMod}, 4, workspace, name:${config.ws.w4}"
|
||||
"${primeMod}, 5, workspace, name:${config.ws.w5}"
|
||||
"${primeMod}, 6, workspace, name:${config.ws.w6}"
|
||||
"${primeMod}, 7, workspace, name:${config.ws.w7}"
|
||||
"${primeMod}, 8, workspace, name:${config.ws.w8}"
|
||||
"${primeMod}, 9, workspace, name:${config.ws.w9}"
|
||||
|
||||
# Switch to alternate workspaces
|
||||
"${secMod}, F1, workspace, name:${config.ws.w1a}"
|
||||
"${secMod}, F2, workspace, name:${config.ws.w2a}"
|
||||
"${secMod}, F3, workspace, name:${config.ws.w3a}"
|
||||
"${secMod}, F4, workspace, name:${config.ws.w4a}"
|
||||
"${secMod}, F5, workspace, name:${config.ws.w5a}"
|
||||
"${secMod}, F6, workspace, name:${config.ws.w6a}"
|
||||
"${secMod}, F7, workspace, name:${config.ws.w7a}"
|
||||
"${secMod}, F8, workspace, name:${config.ws.w8a}"
|
||||
"${secMod}, F9, workspace, name:${config.ws.w9a}"
|
||||
|
||||
# Move window to and focus workspace
|
||||
"${primeMod} Shift, grave, movetoworkspace, name:${config.ws.w0}"
|
||||
"${primeMod} Shift, 1, movetoworkspace, name:${config.ws.w1}"
|
||||
"${primeMod} Shift, 2, movetoworkspace, name:${config.ws.w2}"
|
||||
"${primeMod} Shift, 3, movetoworkspace, name:${config.ws.w3}"
|
||||
"${primeMod} Shift, 4, movetoworkspace, name:${config.ws.w4}"
|
||||
"${primeMod} Shift, 5, movetoworkspace, name:${config.ws.w5}"
|
||||
"${primeMod} Shift, 6, movetoworkspace, name:${config.ws.w6}"
|
||||
"${primeMod} Shift, 7, movetoworkspace, name:${config.ws.w7}"
|
||||
"${primeMod} Shift, 8, movetoworkspace, name:${config.ws.w8}"
|
||||
"${primeMod} Shift, 9, movetoworkspace, name:${config.ws.w9}"
|
||||
|
||||
# Move window to and focus alternate workspace
|
||||
"${secMod} Shift, F1, movetoworkspace, name:${config.ws.w1a}"
|
||||
"${secMod} Shift, F2, movetoworkspace, name:${config.ws.w2a}"
|
||||
"${secMod} Shift, F3, movetoworkspace, name:${config.ws.w3a}"
|
||||
"${secMod} Shift, F4, movetoworkspace, name:${config.ws.w4a}"
|
||||
"${secMod} Shift, F5, movetoworkspace, name:${config.ws.w5a}"
|
||||
"${secMod} Shift, F6, movetoworkspace, name:${config.ws.w6a}"
|
||||
"${secMod} Shift, F7, movetoworkspace, name:${config.ws.w7a}"
|
||||
"${secMod} Shift, F8, movetoworkspace, name:${config.ws.w8a}"
|
||||
"${secMod} Shift, F9, movetoworkspace, name:${config.ws.w9a}"
|
||||
|
||||
# Change focused window
|
||||
"${primeMod}, h, hy3:movefocus, l"
|
||||
"${primeMod}, j, hy3:movefocus, d"
|
||||
"${primeMod}, k, hy3:movefocus, u"
|
||||
"${primeMod}, l, hy3:movefocus, r"
|
||||
|
||||
# Move focused window
|
||||
"${primeMod} Shift, h, hy3:movewindow, l"
|
||||
"${primeMod} Shift, j, hy3:movewindow, d"
|
||||
"${primeMod} Shift, k, hy3:movewindow, u"
|
||||
"${primeMod} Shift, l, hy3:movewindow, r"
|
||||
|
||||
# Resize window
|
||||
"${primeMod} ${secMod}, h, resizeactive, -${resizeAmount} 0"
|
||||
"${primeMod} ${secMod}, j, resizeactive, 0 -${resizeAmount}"
|
||||
"${primeMod} ${secMod}, k, resizeactive, 0 ${resizeAmount}"
|
||||
"${primeMod} ${secMod}, l, resizeactive, ${resizeAmount} 0"
|
||||
|
||||
# Floating
|
||||
"${primeMod}, Space, hy3:togglefocuslayer"
|
||||
"${primeMod} Shift, Space, togglefloating"
|
||||
|
||||
# Change layout
|
||||
"${primeMod}, f, fullscreen"
|
||||
"${primeMod}, w, hy3:changegroup, opposite"
|
||||
"${primeMod}, v, hy3:makegroup, v"
|
||||
"${primeMod}, e, hy3:changegroup, toggletab"
|
||||
|
||||
## Scratchpads
|
||||
"${primeMod} Shift, Backslash, togglespecialworkspace, btop"
|
||||
"${primeMod} Shift, m, togglespecialworkspace, music"
|
||||
"${primeMod} Shift, v, togglespecialworkspace, sound"
|
||||
];
|
||||
|
||||
# Mouse
|
||||
bindm = [
|
||||
"${primeMod}, mouse:272, movewindow"
|
||||
"${primeMod}, mouse:273, resizewindow"
|
||||
];
|
||||
bindn = [
|
||||
",mouse:272, hy3:focustab, mouse"
|
||||
];
|
||||
};
|
||||
}
|
16
modules/home/wms/hyprland/inputs/default.nix
Normal file
16
modules/home/wms/hyprland/inputs/default.nix
Normal file
|
@ -0,0 +1,16 @@
|
|||
{ config, ... }:
|
||||
{
|
||||
wayland.windowManager.hyprland.settings = {
|
||||
input = {
|
||||
follow_mouse = 1;
|
||||
accel_profile = "flat";
|
||||
scroll_factor = 0.8;
|
||||
touchpad.natural_scroll = false;
|
||||
};
|
||||
gestures.workspace_swipe = false;
|
||||
device = {
|
||||
name = "sinowealth-game-mouse";
|
||||
sensitivity = "-0.9";
|
||||
};
|
||||
};
|
||||
}
|
36
modules/home/wms/hyprland/outputs/default.nix
Normal file
36
modules/home/wms/hyprland/outputs/default.nix
Normal file
|
@ -0,0 +1,36 @@
|
|||
{ config, ... }:
|
||||
{
|
||||
# Monitors
|
||||
wayland.windowManager.hyprland.settings = {
|
||||
monitor = [
|
||||
"${config.displays.d1},1920x1080@143.980, 3840x405, 1"
|
||||
"${config.displays.d2},1920x1080@60, 1920x405, 1"
|
||||
"${config.displays.d3},1680x1050@59.883, 5760x0, 1, transform, 1"
|
||||
"${config.displays.d4},1920x1080@60, 0x405, 1"
|
||||
];
|
||||
|
||||
workspace = [
|
||||
"name:${config.ws.w1}, monitor:${config.displays.d1}, default:true"
|
||||
"name:${config.ws.w2}, monitor:${config.displays.d1}"
|
||||
"name:${config.ws.w3}, monitor:${config.displays.d1}"
|
||||
"name:${config.ws.w1a}, monitor:${config.displays.d1}"
|
||||
"name:${config.ws.w2a}, monitor:${config.displays.d1}"
|
||||
"name:${config.ws.w3a}, monitor:${config.displays.d1}"
|
||||
|
||||
"name:${config.ws.w4}, monitor:${config.displays.d2}, default:true"
|
||||
"name:${config.ws.w5}, monitor:${config.displays.d2}"
|
||||
"name:${config.ws.w6}, monitor:${config.displays.d2}"
|
||||
"name:${config.ws.w4a}, monitor:${config.displays.d2}"
|
||||
"name:${config.ws.w5a}, monitor:${config.displays.d2}"
|
||||
|
||||
"name:${config.ws.w7}, monitor:${config.displays.d3}, default:true"
|
||||
"name:${config.ws.w8}, monitor:${config.displays.d3}"
|
||||
"name:${config.ws.w9}, monitor:${config.displays.d3}"
|
||||
"name:${config.ws.w7a}, monitor:${config.displays.d3}"
|
||||
"name:${config.ws.w8a}, monitor:${config.displays.d3}"
|
||||
|
||||
"name:${config.ws.w6a}, monitor:${config.displays.d4}, default:true"
|
||||
"name:${config.ws.w9a}, monitor:${config.displays.d4}"
|
||||
];
|
||||
};
|
||||
}
|
22
modules/home/wms/hyprland/plugins/default.nix
Normal file
22
modules/home/wms/hyprland/plugins/default.nix
Normal file
|
@ -0,0 +1,22 @@
|
|||
{ config, ... }:
|
||||
{
|
||||
wayland.windowManager.hyprland.settings.plugin = {
|
||||
hy3 = {
|
||||
no_gaps_when_only = 0;
|
||||
node_collapse_policy = 0;
|
||||
group_inset = 5;
|
||||
tabs = {
|
||||
text_font = config.look.fonts.main;
|
||||
text_height = 10;
|
||||
height = 17;
|
||||
padding = 0;
|
||||
rounding = 0;
|
||||
"col.active" = "rgba(${config.look.colors.prime}FF)";
|
||||
"col.inactive" = "rgba(${config.look.colors.split}FF)";
|
||||
"col.urgent" = "rgba(${config.look.colors.urgent}FF)";
|
||||
"col.text.active" = "rgba(${config.look.colors.text}FF)";
|
||||
"col.text.inactive" = "rgba(${config.look.colors.text}FF)";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
5
modules/home/wms/hyprland/programs/default.nix
Normal file
5
modules/home/wms/hyprland/programs/default.nix
Normal file
|
@ -0,0 +1,5 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
imports = [
|
||||
];
|
||||
}
|
37
modules/home/wms/hyprland/rules/default.nix
Normal file
37
modules/home/wms/hyprland/rules/default.nix
Normal file
|
@ -0,0 +1,37 @@
|
|||
{ config, ... }:
|
||||
{
|
||||
wayland.windowManager.hyprland.settings = {
|
||||
windowrulev2 = [
|
||||
# Scratchpads
|
||||
"workspace special:btop silent, class:^(btop)$"
|
||||
"workspace special:music silent, class:^(music)$"
|
||||
"workspace special:sound silent, class:^(sound)$"
|
||||
|
||||
# Browsers
|
||||
"workspace name:${config.ws.w1} silent, class:(MainBrowser)"
|
||||
"workspace name:${config.ws.w1a} silent, class:(AltBrowser)"
|
||||
|
||||
# Communication
|
||||
"workspace name:${config.ws.w7} silent, class:(MiscBrowser)"
|
||||
"workspace name:${config.ws.w7} silent, class:(vesktop)"
|
||||
"workspace name:${config.ws.w8} silent, class:(org.gnome.Fractal)"
|
||||
"workspace name:${config.ws.w8} silent, class:(org.telegram.desktop)"
|
||||
"workspace name:${config.ws.w9} silent, class:(thunderbird)"
|
||||
|
||||
# Etc
|
||||
"workspace name:${config.ws.w2} silent, class:(steam)"
|
||||
"workspace name:${config.ws.w2} silent, class:(heroic)"
|
||||
"workspace name:${config.ws.w2a} silent, class:(looking-glass-client)"
|
||||
"workspace name:${config.ws.w4a} silent, class:(com.obsproject.Studio)"
|
||||
|
||||
# Borderless single window part 1
|
||||
"bordersize 0, floating:0, onworkspace:w[tv1]"
|
||||
];
|
||||
|
||||
# Borderless on single window part 2
|
||||
workspace = [ "w[tv1], gapsout:0, gapsin:0" ];
|
||||
|
||||
# Borderless screenshots
|
||||
layerrule = "noanim, selection";
|
||||
};
|
||||
}
|
51
modules/home/wms/hyprland/theme/default.nix
Normal file
51
modules/home/wms/hyprland/theme/default.nix
Normal file
|
@ -0,0 +1,51 @@
|
|||
{ config, ... }:
|
||||
{
|
||||
wayland.windowManager.hyprland.settings = {
|
||||
general = {
|
||||
"col.active_border" = "rgba(${config.look.colors.prime}FF)";
|
||||
"col.inactive_border" = "rgba(${config.look.colors.split}FF)";
|
||||
gaps_in = 4;
|
||||
gaps_out = 10;
|
||||
border_size = config.look.border.string;
|
||||
allow_tearing = true;
|
||||
layout = "hy3";
|
||||
};
|
||||
|
||||
misc = {
|
||||
disable_hyprland_logo = true;
|
||||
font_family = config.look.fonts.main;
|
||||
middle_click_paste = false;
|
||||
vrr = 2;
|
||||
};
|
||||
|
||||
decoration.blur.enabled = false;
|
||||
|
||||
animations = {
|
||||
bezier = [
|
||||
"easeOutQuint,0.23,1,0.32,1"
|
||||
"easeInOutCubic,0.65,0.05,0.36,1"
|
||||
"linear,0,0,1,1"
|
||||
"almostLinear,0.5,0.5,0.75,1.0"
|
||||
"quick,0.15,0,0.1,1"
|
||||
];
|
||||
animation = [
|
||||
"global, 1, 10, default"
|
||||
"border, 1, 5.39, easeOutQuint"
|
||||
"windows, 1, 4.79, easeOutQuint"
|
||||
"windowsIn, 1, 4.1, easeOutQuint, popin 87%"
|
||||
"windowsOut, 1, 1.49, linear, popin 87%"
|
||||
"fadeIn, 1, 1.73, almostLinear"
|
||||
"fadeOut, 1, 1.46, almostLinear"
|
||||
"fade, 1, 3.03, quick"
|
||||
"layers, 1, 3.81, easeOutQuint"
|
||||
"layersIn, 1, 4, easeOutQuint, fade"
|
||||
"layersOut, 1, 1.5, linear, fade"
|
||||
"fadeLayersIn, 1, 1.79, almostLinear"
|
||||
"fadeLayersOut, 1, 1.39, almostLinear"
|
||||
"workspaces, 1, 1.94, almostLinear, fade"
|
||||
"workspacesIn, 1, 1.21, almostLinear, fade"
|
||||
"workspacesOut, 1, 1.94, almostLinear, fade"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,23 +1,22 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
config.home.niri.settings.autostart = pkgs.writeText "autostart" ''
|
||||
// Everpresent bar
|
||||
spawn-at-startup "waybar"
|
||||
|
||||
// Daemons and tray apps
|
||||
// Daemons and tray
|
||||
spawn-at-startup "hyprpaper"
|
||||
spawn-at-startup "wl-paste" "-t" "text" "--watch" "clipman" "store" "-P"
|
||||
spawn-at-startup "wl-copy"
|
||||
spawn-at-startup "mako"
|
||||
spawn-at-startup "sunshine"
|
||||
spawn-at-startup "xwayland-satellite"
|
||||
spawn-at-startup "${pkgs.mate.mate-polkit}/libexec/polkit-mate-authentication-agent-1"
|
||||
spawn-at-startup "${pkgs.xwayland-satellite}/bin/xwayland-satellite"
|
||||
|
||||
// Foreground apps
|
||||
// Foreground
|
||||
spawn-at-startup "librewolf" "-p" "Misc" "--name" "MiscBrowser"
|
||||
spawn-at-startup "thunderbird"
|
||||
spawn-at-startup "vesktop"
|
||||
spawn-at-startup "fractal"
|
||||
spawn-at-startup "telegram-desktop"
|
||||
spawn-at-startup "thunderbird"
|
||||
'';
|
||||
}
|
||||
|
|
|
@ -17,21 +17,21 @@
|
|||
${primeMod}+F4 { spawn "sh" "-c" "virt-manager | notify-send \"Virtual Machines\""; }
|
||||
${primeMod}+F5 { spawn "sh" "-c" "looking-glass-client input:rawMouse=yes | notify-send \"Looking Glass\""; }
|
||||
|
||||
// ${primeMod} + key
|
||||
// Prime + key
|
||||
${primeMod}+s { spawn "sh" "-c" "rofi -show run -p Command"; }
|
||||
${primeMod}+c { spawn "sh" "-c" "clipman pick -t rofi"; }
|
||||
${primeMod}+x { spawn "sh" "-c" "rofiscripts --power"; }
|
||||
${primeMod}+b { spawn "sh" "-c" "pkill -USR1 waybar"; }
|
||||
${primeMod}+Return { spawn "sh" "-c" "foot"; }
|
||||
|
||||
// ${primeMod} + shift + key
|
||||
// Prime + shift + key
|
||||
${primeMod}+Shift+s { spawn "sh" "-c" "rofi -show drun -modi drun -drun-display-format {name} -show-icons -disable-history"; }
|
||||
${primeMod}+Shift+t { spawn "sh" "-c" "pcmanfm"; }
|
||||
${primeMod}+Shift+e { spawn "sh" "-c" "bemoji -n -P 0"; }
|
||||
${primeMod}+Shift+b { spawn "sh" "-c" "rofi-bluetooth"; }
|
||||
${primeMod}+Shift+Return { spawn "sh" "-c" "foot ranger"; }
|
||||
|
||||
// ${primeMod} + ctrl + key
|
||||
// Prime + ctrl + key
|
||||
${primeMod}+Ctrl+s { spawn "sh" "-c" "rofiscripts --scratchpads"; }
|
||||
${primeMod}+Ctrl+c { spawn "sh" "-c" "wlpicker && notify-send \"Color copied to clipboard\""; }
|
||||
|
||||
|
|
|
@ -12,11 +12,9 @@
|
|||
clipman
|
||||
hyprpicker
|
||||
libnotify
|
||||
grim
|
||||
slurp
|
||||
grimblast
|
||||
wl-clipboard
|
||||
wdisplays
|
||||
xwayland-satellite
|
||||
jq
|
||||
];
|
||||
}
|
||||
|
|
|
@ -11,10 +11,10 @@
|
|||
if [[ "$mode_line" == "do-not-disturb" ]]; then
|
||||
# Notifications are disabled, so we enable them
|
||||
makoctl mode -r do-not-disturb
|
||||
notify-send --expire-time=1500 'Notifications Enabled'
|
||||
notify-send 'Notifications Enabled'
|
||||
else
|
||||
# Notifications are enabled, so we disable them
|
||||
notify-send --expire-time=1500 'Notifications Disabled'
|
||||
notify-send 'Notifications Disabled'
|
||||
sleep 2
|
||||
makoctl mode -a do-not-disturb
|
||||
fi
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
disable-scroll-wraparound = true;
|
||||
};
|
||||
|
||||
swayWindowsModule = {
|
||||
windowModule = {
|
||||
icon = true;
|
||||
icon-size = 15;
|
||||
all-outputs = true;
|
||||
|
@ -219,6 +219,8 @@
|
|||
"sway/window"
|
||||
"niri/workspaces"
|
||||
"niri/window"
|
||||
"hyprland/workspaces"
|
||||
"hyprland/window"
|
||||
];
|
||||
modules-right = [
|
||||
"pulseaudio"
|
||||
|
@ -234,8 +236,9 @@
|
|||
"network"
|
||||
];
|
||||
"sway/workspaces" = swayWorkspaceModule;
|
||||
"sway/window" = swayWindowsModule;
|
||||
"niri/window" = swayWindowsModule;
|
||||
"sway/window" = windowModule;
|
||||
"niri/window" = windowModule;
|
||||
"hyprland/window" = windowModule;
|
||||
"pulseaudio" = pulseModule;
|
||||
"cpu" = cpuModule;
|
||||
"memory" = ramModule;
|
||||
|
@ -259,6 +262,8 @@
|
|||
"sway/window"
|
||||
"niri/workspaces"
|
||||
"niri/window"
|
||||
"hyprland/workspaces"
|
||||
"hyprland/window"
|
||||
];
|
||||
modules-right = [
|
||||
"pulseaudio"
|
||||
|
@ -270,8 +275,9 @@
|
|||
"custom/clock-long"
|
||||
];
|
||||
"sway/workspaces" = swayWorkspaceModule;
|
||||
"sway/window" = swayWindowsModule;
|
||||
"niri/window" = swayWindowsModule;
|
||||
"sway/window" = windowModule;
|
||||
"niri/window" = windowModule;
|
||||
"hyprland/window" = windowModule;
|
||||
"pulseaudio" = pulseModule;
|
||||
"mpd" = mediaModule;
|
||||
"custom/notifs" = notificationModule;
|
||||
|
@ -291,6 +297,8 @@
|
|||
"sway/window"
|
||||
"niri/workspaces"
|
||||
"niri/window"
|
||||
"hyprland/workspaces"
|
||||
"hyprland/window"
|
||||
];
|
||||
modules-right = [
|
||||
"pulseaudio"
|
||||
|
@ -301,8 +309,9 @@
|
|||
"custom/clock-short"
|
||||
];
|
||||
"sway/workspaces" = swayWorkspaceModule;
|
||||
"sway/window" = swayWindowsModule;
|
||||
"niri/window" = swayWindowsModule;
|
||||
"sway/window" = windowModule;
|
||||
"niri/window" = windowModule;
|
||||
"hyprland/window" = windowModule;
|
||||
"pulseaudio" = pulseModule;
|
||||
"custom/weather" = weatherModule;
|
||||
"cpu" = cpuModule;
|
||||
|
@ -325,6 +334,8 @@
|
|||
"sway/window"
|
||||
"niri/workspaces"
|
||||
"niri/window"
|
||||
"hyprland/workspaces"
|
||||
"hyprland/window"
|
||||
];
|
||||
modules-right = [
|
||||
"pulseaudio"
|
||||
|
@ -344,8 +355,9 @@
|
|||
"network"
|
||||
];
|
||||
"sway/workspaces" = swayWorkspaceModule;
|
||||
"sway/window" = swayWindowsModule;
|
||||
"niri/window" = swayWindowsModule;
|
||||
"sway/window" = windowModule;
|
||||
"niri/window" = windowModule;
|
||||
"hyprland/window" = windowModule;
|
||||
"pulseaudio" = pulseModule;
|
||||
"mpd" = mediaModule;
|
||||
"custom/notifs" = notificationModule;
|
||||
|
|
|
@ -9,21 +9,20 @@
|
|||
{ command = "foot -a music -T Music ncmpcpp"; }
|
||||
{ command = "foot -a sound -T Sound pulsemixer"; }
|
||||
|
||||
# Daemons and tray apps
|
||||
# Daemons and tray
|
||||
{ command = "hyprpaper"; }
|
||||
{ command = "wl-paste -t text --watch clipman store -P"; }
|
||||
{ command = "wl-copy"; }
|
||||
{ command = "mako"; }
|
||||
{ command = "sunshine"; }
|
||||
{ command = "xwayland-satellite"; }
|
||||
{ command = "${pkgs.mate.mate-polkit}/libexec/polkit-mate-authentication-agent-1"; }
|
||||
|
||||
# Foreground apps
|
||||
# Foreground
|
||||
{ command = "librewolf -P Misc --name=MiscBrowser"; }
|
||||
{ command = "thunderbird"; }
|
||||
{ command = "vesktop"; }
|
||||
{ command = "fractal"; }
|
||||
{ command = "telegram-desktop"; }
|
||||
{ command = "thunderbird"; }
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -21,12 +21,6 @@
|
|||
titlebar_padding 10 1
|
||||
primary_selection disabled
|
||||
mouse_warping container
|
||||
|
||||
# Include extra window icons
|
||||
include ${pkgs.fetchurl {
|
||||
url = "https://raw.githubusercontent.com/iguanajuice/sway-font-awesome/6b7a9d08974eea1b9cddb8d444e1c89d6837083a/icons";
|
||||
sha256 = "09ki5qw1h91kd33k3fwzq7cb6ck8sq4haswgizrsy387sfr2a75x";
|
||||
}}
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
|
|
@ -20,23 +20,22 @@
|
|||
"${primeMod}+F4" = ''exec virt-manager | notify-send "Virtual Machines"'';
|
||||
"${primeMod}+F5" = ''exec looking-glass-client input:rawMouse=yes | notify-send "Looking Glass"'';
|
||||
|
||||
# Mod + key
|
||||
# Prime + key
|
||||
"${primeMod}+s" = ''exec rofi -show run -p Command'';
|
||||
"${primeMod}+c" = ''exec clipman pick -t rofi'';
|
||||
"${primeMod}+x" = ''exec rofiscripts --power'';
|
||||
"${primeMod}+b" = ''exec pkill -USR1 waybar'';
|
||||
"${primeMod}+Return" = ''exec foot'';
|
||||
"${primeMod}+Escape" = ''exec tools-sway --kill'';
|
||||
|
||||
# Mod + shift + key
|
||||
# Prime + shift + key
|
||||
"${primeMod}+Shift+s" = ''exec rofi -show drun -modi drun -drun-display-format {name} -show-icons -disable-history'';
|
||||
"${primeMod}+Shift+t" = ''exec pcmanfm'';
|
||||
"${primeMod}+Shift+e" = ''exec bemoji -n -P 0'';
|
||||
"${primeMod}+Shift+b" = ''exec rofi-bluetooth'';
|
||||
"${primeMod}+Shift+Return" = ''exec foot ranger'';
|
||||
|
||||
# Mod + ctrl + key
|
||||
"${primeMod}+Ctrl+x" = ''exec tools-sway --prop'';
|
||||
# Prime + ctrl + key
|
||||
"${primeMod}+Ctrl+x" = ''exec prop-sway'';
|
||||
"${primeMod}+Ctrl+s" = ''exec rofiscripts --scratchpads'';
|
||||
"${primeMod}+Ctrl+c" = ''exec wlpicker && notify-send "Color copied to clipboard"'';
|
||||
|
||||
|
@ -61,8 +60,8 @@
|
|||
"${primeMod}+Ctrl+n" = ''exec makoctl dismiss -a'';
|
||||
|
||||
# Screenshots
|
||||
"${secMod}+f" = ''exec screen-sway --swappy'';
|
||||
"${secMod}+Shift+f" = ''exec screen-sway --screen'';
|
||||
"${secMod}+f" = ''exec shot-sway --swappy'';
|
||||
"${secMod}+Shift+f" = ''exec shot-sway --screen'';
|
||||
|
||||
# Display and keyboard brightness
|
||||
"${primeMod}+equal" = ''exec light -A 5'';
|
||||
|
@ -140,20 +139,15 @@
|
|||
"${primeMod}+${secMod}+k" = ''resize grow height ${resizeAmount} px or 5 ppt'';
|
||||
"${primeMod}+${secMod}+l" = ''resize grow width ${resizeAmount} px or 5 ppt'';
|
||||
|
||||
# Change focus between floating/tiled, toggle floating
|
||||
# Floating
|
||||
"${primeMod}+space" = ''focus mode_toggle'';
|
||||
"${primeMod}+Shift+space" = ''floating toggle'';
|
||||
|
||||
# Toggle fullscreen
|
||||
# Change layout
|
||||
"${primeMod}+f" = ''fullscreen toggle'';
|
||||
"${primeMod}+${secMod}+Ctrl+f" = ''fullscreen toggle global'';
|
||||
|
||||
# Change container layout
|
||||
"${primeMod}+w" = ''layout toggle split'';
|
||||
"${primeMod}+e" = ''layout toggle tabbed stacking'';
|
||||
|
||||
# Change split direction
|
||||
"${primeMod}+v" = ''split v'';
|
||||
"${primeMod}+e" = ''layout toggle tabbed stacking'';
|
||||
|
||||
# Focus parent / child
|
||||
"${primeMod}+a" = ''focus parent'';
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
imports = [
|
||||
./screen-sway
|
||||
./prop-sway
|
||||
./sleep-sway
|
||||
./tools-sway
|
||||
];
|
||||
}
|
||||
|
|
13
modules/home/wms/sway/programs/prop-sway/default.nix
Normal file
13
modules/home/wms/sway/programs/prop-sway/default.nix
Normal file
|
@ -0,0 +1,13 @@
|
|||
{ pkgs, config, ... }:
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
(pkgs.writeScriptBin "prop-sway" ''
|
||||
selected_window=$(swaymsg -t get_tree | jq -r '.. | select(.pid? and .visible?) | "\(.rect.x),\(.rect.y) \(.rect.width)x\(.rect.height)"' | ${pkgs.slurp}/bin/slurp -r -c ${config.look.colors.prime} -B 00000066 -b 00000000)
|
||||
if [ -n "$selected_window" ]; then
|
||||
app_id=$(swaymsg -t get_tree | jq -r '.. | select(.pid? and .visible?) | select("\(.rect.x),\(.rect.y) \(.rect.width)x\(.rect.height)" == "'"$selected_window"'") | .app_id')
|
||||
system=$(sed 's/xdg_shell/Wayland/g; s/xwayland/Xorg/g' < <(swaymsg -t get_tree | jq -r '.. | select(.pid? and .visible?) | select("\(.rect.x),\(.rect.y) \(.rect.width)x\(.rect.height)" == "'"$selected_window"'") | .shell'))
|
||||
notify-send "$(echo -e "Window's app_id: $app_id\nWindow System: $system")"
|
||||
fi
|
||||
'')
|
||||
];
|
||||
}
|
|
@ -1,44 +0,0 @@
|
|||
{ pkgs, config, ... }:
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
(pkgs.writeScriptBin "screen-sway" ''
|
||||
swappy() {
|
||||
# Create an imv window to act as a static screen
|
||||
grim -t jpeg -q 90 - | imv -w "GlobalShot" - & imv_pid=$!
|
||||
|
||||
# Capture the screenshot of the selected area and save to a temporary file
|
||||
selected_area=$(swaymsg -t get_tree | jq -r '.. | select(.pid? and .visible?) | .rect | "\(.x),\(.y) \(.width)x\(.height)"'\
|
||||
| XCURSOR_SIZE=40 slurp -w ${config.look.border.string} -c ${config.look.colors.prime} -B 00000066 -b 00000099)
|
||||
temp_file=$(mktemp -u).png
|
||||
grim -g "$selected_area" "$temp_file"
|
||||
kill $imv_pid
|
||||
|
||||
# Copy the screenshot to the clipboard and clear the temp
|
||||
${pkgs.swappy}/bin/swappy -f - < "$temp_file"
|
||||
rm "$temp_file"
|
||||
}
|
||||
|
||||
screen() {
|
||||
temp_file=$(mktemp -u).png
|
||||
grim -o $(swaymsg -t get_outputs | jq -r '.[] | select(.focused) | .name') "$temp_file"
|
||||
|
||||
# Check if the screenshot was successfully taken
|
||||
if [ $? -eq 0 ]; then
|
||||
wl-copy < "$temp_file"
|
||||
notify-send -i "$temp_file" "Current screen copied."
|
||||
rm "$temp_file"
|
||||
else
|
||||
notify-send "Error: Unable to capture screenshot."
|
||||
fi
|
||||
}
|
||||
|
||||
if [ "$1" == "--swappy" ]; then
|
||||
swappy
|
||||
elif [ "$1" == "--screen" ]; then
|
||||
screen
|
||||
else
|
||||
echo "Please use the arguments --swappy or --screen."
|
||||
fi
|
||||
'')
|
||||
];
|
||||
}
|
|
@ -1,33 +0,0 @@
|
|||
{ pkgs, config, ... }:
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
(pkgs.writeScriptBin "tools-sway" ''
|
||||
# List the app name and whether or not it uses wayland
|
||||
prop() {
|
||||
selected_window=$(swaymsg -t get_tree | jq -r '.. | select(.pid? and .visible?) | "\(.rect.x),\(.rect.y) \(.rect.width)x\(.rect.height)"' | slurp -r -c ${config.look.colors.prime} -B 00000066 -b 00000000)
|
||||
if [ -n "$selected_window" ]; then
|
||||
app_id=$(swaymsg -t get_tree | jq -r '.. | select(.pid? and .visible?) | select("\(.rect.x),\(.rect.y) \(.rect.width)x\(.rect.height)" == "'"$selected_window"'") | .app_id')
|
||||
system=$(sed 's/xdg_shell/Wayland/g; s/xwayland/Xorg/g' < <(swaymsg -t get_tree | jq -r '.. | select(.pid? and .visible?) | select("\(.rect.x),\(.rect.y) \(.rect.width)x\(.rect.height)" == "'"$selected_window"'") | .shell'))
|
||||
notify-send "$(echo -e "Window's app_id: $app_id\nWindow System: $system")"
|
||||
fi
|
||||
}
|
||||
|
||||
# Kill a selected window
|
||||
kill() {
|
||||
selected_window=$(swaymsg -t get_tree | jq -r '.. | select(.pid? and .visible?) | "\(.rect.x),\(.rect.y) \(.rect.width)x\(.rect.height)"' | slurp -r -c ${config.look.colors.prime} -B 00000066 -b 00000000)
|
||||
if [ -n "$selected_window" ]; then
|
||||
pid=$(swaymsg -t get_tree | jq -r '.. | select(.pid? and .visible?) | select("\(.rect.x),\(.rect.y) \(.rect.width)x\(.rect.height)" == "'"$selected_window"'") | .pid')
|
||||
kill -9 "$pid"
|
||||
fi
|
||||
}
|
||||
|
||||
if [ "$1" == "--prop" ]; then
|
||||
prop
|
||||
elif [ "$1" == "--kill" ]; then
|
||||
kill
|
||||
else
|
||||
echo "Please use the arguments --prop or --kill."
|
||||
fi
|
||||
'')
|
||||
];
|
||||
}
|
|
@ -67,7 +67,6 @@
|
|||
"7:${config.ws.w7}" = [
|
||||
{ app_id = "MiscBrowser"; }
|
||||
{ app_id = "vesktop"; }
|
||||
{ class = "vesktop"; }
|
||||
];
|
||||
"8:${config.ws.w8}" = [
|
||||
{ app_id = "org.gnome.Fractal"; }
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
};
|
||||
};
|
||||
fonts = {
|
||||
names = ["${config.look.fonts.main}"];
|
||||
names = [ config.look.fonts.main ];
|
||||
size = 10.5;
|
||||
};
|
||||
gaps = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue