diff --git a/configs/niri/config.kdl b/configs/niri/config.kdl index e5ddaba..27e8ced 100644 --- a/configs/niri/config.kdl +++ b/configs/niri/config.kdl @@ -1,181 +1,16 @@ +// ========================= +// DMS Auto-Generated Includes +// ========================= include "dms/binds.kdl" include "dms/outputs.kdl" include "dms/cursor.kdl" -include "configs/window-rules.kdl" - -// https://github.com/YaLTeR/niri/wiki/Configuration:-Input -input { - touchpad { - tap - natural-scroll - } -} -overview { - backdrop-color "#777777" -} -cursor { - // xcursor-theme "breeze_cursors" - xcursor-size 48 - hide-when-typing -} - -environment { - QT_QPA_PLATFORM "wayland" - QT_WAYLAND_DISABLE_WINDOWDECORATION "1" - NIXOS_OZONE_WL "1" - DISPLAY ":0" - ELECTRON_OZONE_PLATFORM_HINT "auto" -} - - -// spawn-at-startup "/run/current-system/sw/bin/tailscale" "systray" - +include "dms/layout.kdl" +include "dms/colors.kdl" +include "dms/wpblur.kdl" +include "dms/alttab.kdl" +include "dms/windowrules.kdl" // ========================= -// General layout +// User Configuration // ========================= -layout { - gaps 8 - center-focused-column "never" - tab-indicator { - width 8 - gap 8 - length total-proportion=1.0 - hide-when-single-tab - position "top" - place-within-column - } - shadow {} - preset-column-widths { - proportion 0.33333 - proportion 0.5 - proportion 0.66667 - } - default-column-width { proportion 0.5; } - focus-ring { - width 4 - active-gradient from="#ff06" to="#af0f" angle=45 in="oklch longer hue" - inactive-color "#505050" - } - // border { - // off - // } - insert-hint { - color "#ffc87f80" - gradient from="#ffbb6680" to="#ffc88080" angle=45 relative-to="workspace-view" - } -} -prefer-no-csd -window-rule { - geometry-corner-radius 6 - tiled-state true -} -animations { - window-movement { - duration-ms 250 - } - workspace-switch { - duration-ms 250 - } - horizontal-view-movement { - duration-ms 250 - } -} - -// ========================= -// Screen Shots -// ========================= -screenshot-path "~/Pictures/Screenshots/Screenshot from %Y-%m-%d %H-%M-%S.png" - -// ========================= -// General Stuff -// ========================= -switch-events { - lid-close { spawn "notify-send" "The laptop lid is closed!"; } - lid-open { spawn "notify-send" "The laptop lid is open!"; } -} -hotkey-overlay { - skip-at-startup -} - -// ========================= -// General binds -// ========================= -binds { - Mod+Shift+H { show-hotkey-overlay; } - Mod+T { spawn "ghostty"; } - Mod+Space { spawn "dms" "ipc" "spotlight" "toggle"; } - Mod+Z { spawn "flatpak" "run" "app.zen_browser.zen"; } - Mod+B { spawn "chromium"; } - Mod+E { spawn "wofi-emoji"; } - - Mod+Left { focus-column-left; } - Mod+Down { focus-workspace-down; } - Mod+Up { focus-workspace-up; } - Mod+Right { focus-column-right; } - - Mod+Tab { toggle-overview; } - Mod+Shift+Tab { focus-monitor-next; } - - Mod+Ctrl+Right { swap-window-right; } - Mod+Ctrl+Left { swap-window-left; } - Mod+Ctrl+Up { move-window-to-workspace-up; } - Mod+Ctrl+Down { move-window-to-workspace-down; } - - Mod+W { toggle-column-tabbed-display; } - Mod+F { maximize-column; } - Mod+Shift+F { fullscreen-window; } - Mod+Ctrl+F { reset-window-height; } - Mod+V { toggle-window-floating; } - - Mod+C { center-column; } - - Mod+Minus { set-column-width "-10%"; } - Mod+Equal { set-column-width "+10%"; } - - Mod+Shift+Minus { set-window-height "-10%"; } - Mod+Shift+Equal { set-window-height "+10%"; } - - Mod+Escape allow-inhibiting=false { toggle-keyboard-shortcuts-inhibit; } - // Print { spawn "sh" "-c" "grim -g \"$(slurp)\" - | satty -f -"; } - // Mod+P { spawn "sh" "-c" "grim -g \"$(slurp)\" - | satty -f -"; } - Print { spawn "sh" "-c" "dms screenshot --stdout | satty -f -"; } - Mod+P { spawn "sh" "-c" "dms screenshot --stdout | satty -f -"; } - - Mod+R { spawn "/home/ari/.config/niri/screen-record.sh"; } - - Mod+Q { close-window; } -} - - - -recent-windows { - // off - debounce-ms 750 - - open-delay-ms 150 - - highlight { - active-color "#999999ff" - urgent-color "#ff9999ff" - padding 30 - corner-radius 0 - } - - previews { - max-height 480 - max-scale 0.5 - } - - binds { - Alt+Tab { next-window; } - Alt+Shift+Tab { previous-window; } - Alt+grave { next-window filter="app-id"; } - Alt+Shift+grave { previous-window filter="app-id"; } - - Mod+Tab { next-window; } - Mod+Shift+Tab { previous-window; } - Mod+grave { next-window filter="app-id"; } - Mod+Shift+grave { previous-window filter="app-id"; } - } -} +include "configs/user.kdl" diff --git a/configs/niri/config.kdl.backup1777323853 b/configs/niri/config.kdl.backup1777323853 new file mode 100644 index 0000000..e5ddaba --- /dev/null +++ b/configs/niri/config.kdl.backup1777323853 @@ -0,0 +1,181 @@ +include "dms/binds.kdl" +include "dms/outputs.kdl" +include "dms/cursor.kdl" +include "configs/window-rules.kdl" + +// https://github.com/YaLTeR/niri/wiki/Configuration:-Input +input { + touchpad { + tap + natural-scroll + } +} +overview { + backdrop-color "#777777" +} +cursor { + // xcursor-theme "breeze_cursors" + xcursor-size 48 + hide-when-typing +} + +environment { + QT_QPA_PLATFORM "wayland" + QT_WAYLAND_DISABLE_WINDOWDECORATION "1" + NIXOS_OZONE_WL "1" + DISPLAY ":0" + ELECTRON_OZONE_PLATFORM_HINT "auto" +} + + +// spawn-at-startup "/run/current-system/sw/bin/tailscale" "systray" + + +// ========================= +// General layout +// ========================= +layout { + gaps 8 + center-focused-column "never" + tab-indicator { + width 8 + gap 8 + length total-proportion=1.0 + hide-when-single-tab + position "top" + place-within-column + } + shadow {} + preset-column-widths { + proportion 0.33333 + proportion 0.5 + proportion 0.66667 + } + default-column-width { proportion 0.5; } + focus-ring { + width 4 + active-gradient from="#ff06" to="#af0f" angle=45 in="oklch longer hue" + inactive-color "#505050" + } + // border { + // off + // } + insert-hint { + color "#ffc87f80" + gradient from="#ffbb6680" to="#ffc88080" angle=45 relative-to="workspace-view" + } +} +prefer-no-csd +window-rule { + geometry-corner-radius 6 + tiled-state true +} +animations { + window-movement { + duration-ms 250 + } + workspace-switch { + duration-ms 250 + } + horizontal-view-movement { + duration-ms 250 + } +} + +// ========================= +// Screen Shots +// ========================= +screenshot-path "~/Pictures/Screenshots/Screenshot from %Y-%m-%d %H-%M-%S.png" + +// ========================= +// General Stuff +// ========================= +switch-events { + lid-close { spawn "notify-send" "The laptop lid is closed!"; } + lid-open { spawn "notify-send" "The laptop lid is open!"; } +} +hotkey-overlay { + skip-at-startup +} + +// ========================= +// General binds +// ========================= +binds { + Mod+Shift+H { show-hotkey-overlay; } + Mod+T { spawn "ghostty"; } + Mod+Space { spawn "dms" "ipc" "spotlight" "toggle"; } + Mod+Z { spawn "flatpak" "run" "app.zen_browser.zen"; } + Mod+B { spawn "chromium"; } + Mod+E { spawn "wofi-emoji"; } + + Mod+Left { focus-column-left; } + Mod+Down { focus-workspace-down; } + Mod+Up { focus-workspace-up; } + Mod+Right { focus-column-right; } + + Mod+Tab { toggle-overview; } + Mod+Shift+Tab { focus-monitor-next; } + + Mod+Ctrl+Right { swap-window-right; } + Mod+Ctrl+Left { swap-window-left; } + Mod+Ctrl+Up { move-window-to-workspace-up; } + Mod+Ctrl+Down { move-window-to-workspace-down; } + + Mod+W { toggle-column-tabbed-display; } + Mod+F { maximize-column; } + Mod+Shift+F { fullscreen-window; } + Mod+Ctrl+F { reset-window-height; } + Mod+V { toggle-window-floating; } + + Mod+C { center-column; } + + Mod+Minus { set-column-width "-10%"; } + Mod+Equal { set-column-width "+10%"; } + + Mod+Shift+Minus { set-window-height "-10%"; } + Mod+Shift+Equal { set-window-height "+10%"; } + + Mod+Escape allow-inhibiting=false { toggle-keyboard-shortcuts-inhibit; } + // Print { spawn "sh" "-c" "grim -g \"$(slurp)\" - | satty -f -"; } + // Mod+P { spawn "sh" "-c" "grim -g \"$(slurp)\" - | satty -f -"; } + Print { spawn "sh" "-c" "dms screenshot --stdout | satty -f -"; } + Mod+P { spawn "sh" "-c" "dms screenshot --stdout | satty -f -"; } + + Mod+R { spawn "/home/ari/.config/niri/screen-record.sh"; } + + Mod+Q { close-window; } +} + + + +recent-windows { + // off + debounce-ms 750 + + open-delay-ms 150 + + highlight { + active-color "#999999ff" + urgent-color "#ff9999ff" + padding 30 + corner-radius 0 + } + + previews { + max-height 480 + max-scale 0.5 + } + + binds { + Alt+Tab { next-window; } + Alt+Shift+Tab { previous-window; } + Alt+grave { next-window filter="app-id"; } + Alt+Shift+grave { previous-window filter="app-id"; } + + Mod+Tab { next-window; } + Mod+Shift+Tab { previous-window; } + Mod+grave { next-window filter="app-id"; } + Mod+Shift+grave { previous-window filter="app-id"; } + } +} diff --git a/configs/niri/configs/user.kdl b/configs/niri/configs/user.kdl new file mode 100644 index 0000000..d66d206 --- /dev/null +++ b/configs/niri/configs/user.kdl @@ -0,0 +1,157 @@ +// ========================= +// User Configuration +// ========================= +// This file contains user-specific settings that won't be overwritten by DMS. +// Edit this file freely to customize your niri experience. + +// https://github.com/YaLTeR/niri/wiki/Configuration:-Input +input { + touchpad { + tap + natural-scroll + } +} + +overview { + backdrop-color "#777777" +} + +environment { + QT_QPA_PLATFORM "wayland" + QT_WAYLAND_DISABLE_WINDOWDECORATION "1" + NIXOS_OZONE_WL "1" + DISPLAY ":0" + ELECTRON_OZONE_PLATFORM_HINT "auto" +} + +// ========================= +// Layout Overrides +// ========================= +layout { + center-focused-column "never" + tab-indicator { + width 8 + gap 8 + length total-proportion=1.0 + hide-when-single-tab + position "top" + place-within-column + } + shadow {} + preset-column-widths { + proportion 0.33333 + proportion 0.5 + proportion 0.66667 + } + default-column-width { proportion 0.5; } +} + +prefer-no-csd + +animations { + window-movement { + duration-ms 250 + } + workspace-switch { + duration-ms 250 + } + horizontal-view-movement { + duration-ms 250 + } +} + +// ========================= +// Screenshots +// ========================= +screenshot-path "~/Pictures/Screenshots/Screenshot from %Y-%m-%d %H-%M-%S.png" + +// ========================= +// System Events +// ========================= +switch-events { + lid-close { spawn "notify-send" "The laptop lid is closed!"; } + lid-open { spawn "notify-send" "The laptop lid is open!"; } +} + +hotkey-overlay { + skip-at-startup +} + +// ========================= +// User Keybindings +// ========================= +binds { + Mod+Shift+H { show-hotkey-overlay; } + Mod+T { spawn "ghostty"; } + Mod+Space { spawn "dms" "ipc" "spotlight" "toggle"; } + Mod+Z { spawn "flatpak" "run" "app.zen_browser.zen"; } + Mod+B { spawn "chromium"; } + Mod+E { spawn "wofi-emoji"; } + + Mod+Left { focus-column-left; } + Mod+Down { focus-workspace-down; } + Mod+Up { focus-workspace-up; } + Mod+Right { focus-column-right; } + + Mod+Tab { toggle-overview; } + Mod+Shift+Tab { focus-monitor-next; } + + Mod+Ctrl+Right { swap-window-right; } + Mod+Ctrl+Left { swap-window-left; } + Mod+Ctrl+Up { move-window-to-workspace-up; } + Mod+Ctrl+Down { move-window-to-workspace-down; } + + Mod+W { toggle-column-tabbed-display; } + Mod+F { maximize-column; } + Mod+Shift+F { fullscreen-window; } + Mod+Ctrl+F { reset-window-height; } + Mod+V { toggle-window-floating; } + + Mod+C { center-column; } + + Mod+Minus { set-column-width "-10%"; } + Mod+Equal { set-column-width "+10%"; } + + Mod+Shift+Minus { set-window-height "-10%"; } + Mod+Shift+Equal { set-window-height "+10%"; } + + Mod+Escape allow-inhibiting=false { toggle-keyboard-shortcuts-inhibit; } + Print { spawn "sh" "-c" "dms screenshot --stdout | satty -f -"; } + Mod+P { spawn "sh" "-c" "dms screenshot --stdout | satty -f -"; } + + Mod+R { spawn "/home/ari/.config/niri/screen-record.sh"; } + + Mod+Q { close-window; } +} + +// ========================= +// Recent Windows (Alt-Tab) +// ========================= +recent-windows { + debounce-ms 750 + open-delay-ms 150 + + highlight { + active-color "#999999ff" + urgent-color "#ff9999ff" + padding 30 + corner-radius 0 + } + + previews { + max-height 480 + max-scale 0.5 + } + + binds { + Alt+Tab { next-window; } + Alt+Shift+Tab { previous-window; } + Alt+grave { next-window filter="app-id"; } + Alt+Shift+grave { previous-window filter="app-id"; } + + Mod+Tab { next-window; } + Mod+Shift+Tab { previous-window; } + Mod+grave { next-window filter="app-id"; } + Mod+Shift+grave { previous-window filter="app-id"; } + } +} diff --git a/configs/niri/configs/window-rules.kdl b/configs/niri/configs/window-rules.kdl index 6d08801..e69de29 100644 --- a/configs/niri/configs/window-rules.kdl +++ b/configs/niri/configs/window-rules.kdl @@ -1,105 +0,0 @@ -window-rule { - match app-id=r#"^Slack$"# - match app-id=r#"^signal$"# - open-focused true -} - -// Open the Firefox picture-in-picture player as floating by default. -window-rule { - match app-id="org.pipewire.Helvum" - - open-focused true - open-floating true - default-floating-position x=0 y=25 relative-to="top" - default-window-height { proportion 0.8; } - default-column-width { proportion 0.75; } -} -window-rule { - match app-id=r#"firefox$"# title="^Picture-in-Picture$" - match app-id="org.pulseaudio.pavucontrol" - match app-id="Rofi" - match app-id="nm-connection-editor" - match app-id=".blueman-manager-wrapped" - match app-id=r#"^org.gnome.Calendar$"# - match app-id=r#"^gcr-prompter$"# - match app-id=r#"^xdg-desktop-portal-gnome$"# - match app-id=r#"^nm-applet$"# - match app-id=r#"^chrome-.*"# - match app-id="waypaper" - match title="$Huddle:.*" app-id="Slack" - - open-focused true - open-floating true - default-floating-position x=0 y=25 relative-to="top" - default-window-height { proportion 0.5; } - default-column-width { proportion 0.25; } -} -window-rule { - match app-id="remote-viewer" - open-fullscreen true - open-maximized true - open-focused true -} -window-rule { - match is-active=false - opacity 0.85 -} -window-rule { - match is-urgent=true - open-focused true -} -window-rule { - match app-id="satty" - open-focused true - open-floating true - min-width 800 - min-height 400 - default-floating-position x=-200 y=200 relative-to="top" - - default-window-height { proportion 0.75; } - default-column-width { proportion 0.75; } -} -window-rule { - match app-id="code" - match app-id="org.shotcut.Shotcut" - exclude app-id=r#"^code$"# title=r#"^Visual Studio Code$"# - - open-fullscreen false - open-floating false - open-maximized true - open-focused true - opacity 0.95 -} -window-rule { -// match app-id=r"Bitwarden" - match app-id="Sparrow" -// match title="Bitwarden" - block-out-from "screen-capture" - // opacity 1 - shadow { - on - } - focus-ring { - width 4 - active-color "#f00f" - inactive-color "#f00f" - } -} -window-rule { - match app-id="Bitwarden" is-focused=false - match app-id="Sparrow" is-focused=false - match title="Bitwarden" is-focused=false - opacity 0.45 -} - - -window-rule { - match app-id=r#"^com.slack.Slack$"# - clip-to-geometry true - border { - on - width 1 - active-color "#0f0f" - inactive-color "#0f0a" - } -} diff --git a/configs/niri/dms/windowrules.kdl b/configs/niri/dms/windowrules.kdl index e69de29..6d08801 100644 --- a/configs/niri/dms/windowrules.kdl +++ b/configs/niri/dms/windowrules.kdl @@ -0,0 +1,105 @@ +window-rule { + match app-id=r#"^Slack$"# + match app-id=r#"^signal$"# + open-focused true +} + +// Open the Firefox picture-in-picture player as floating by default. +window-rule { + match app-id="org.pipewire.Helvum" + + open-focused true + open-floating true + default-floating-position x=0 y=25 relative-to="top" + default-window-height { proportion 0.8; } + default-column-width { proportion 0.75; } +} +window-rule { + match app-id=r#"firefox$"# title="^Picture-in-Picture$" + match app-id="org.pulseaudio.pavucontrol" + match app-id="Rofi" + match app-id="nm-connection-editor" + match app-id=".blueman-manager-wrapped" + match app-id=r#"^org.gnome.Calendar$"# + match app-id=r#"^gcr-prompter$"# + match app-id=r#"^xdg-desktop-portal-gnome$"# + match app-id=r#"^nm-applet$"# + match app-id=r#"^chrome-.*"# + match app-id="waypaper" + match title="$Huddle:.*" app-id="Slack" + + open-focused true + open-floating true + default-floating-position x=0 y=25 relative-to="top" + default-window-height { proportion 0.5; } + default-column-width { proportion 0.25; } +} +window-rule { + match app-id="remote-viewer" + open-fullscreen true + open-maximized true + open-focused true +} +window-rule { + match is-active=false + opacity 0.85 +} +window-rule { + match is-urgent=true + open-focused true +} +window-rule { + match app-id="satty" + open-focused true + open-floating true + min-width 800 + min-height 400 + default-floating-position x=-200 y=200 relative-to="top" + + default-window-height { proportion 0.75; } + default-column-width { proportion 0.75; } +} +window-rule { + match app-id="code" + match app-id="org.shotcut.Shotcut" + exclude app-id=r#"^code$"# title=r#"^Visual Studio Code$"# + + open-fullscreen false + open-floating false + open-maximized true + open-focused true + opacity 0.95 +} +window-rule { +// match app-id=r"Bitwarden" + match app-id="Sparrow" +// match title="Bitwarden" + block-out-from "screen-capture" + // opacity 1 + shadow { + on + } + focus-ring { + width 4 + active-color "#f00f" + inactive-color "#f00f" + } +} +window-rule { + match app-id="Bitwarden" is-focused=false + match app-id="Sparrow" is-focused=false + match title="Bitwarden" is-focused=false + opacity 0.45 +} + + +window-rule { + match app-id=r#"^com.slack.Slack$"# + clip-to-geometry true + border { + on + width 1 + active-color "#0f0f" + inactive-color "#0f0a" + } +}