diff options
| author | bozo.kopic <bozo@kopic.xyz> | 2026-10-23 23:45:35 +0200 |
|---|---|---|
| committer | bozo.kopic <bozo@kopic.xyz> | 2026-10-23 23:45:35 +0200 |
| commit | 7ba2f3494fbf93c06364858d6bddd4aefc9924c7 (patch) | |
| tree | 16c66392edef4b2625a7f93c81b180d38e047270 | |
| parent | bb2dae2aaafab0bb7f1c1d03dc6ebe10deee0b24 (diff) | |
.
| -rw-r--r-- | git/.gitconfig | 2 | ||||
| -rwxr-xr-x | install.sh | 4 | ||||
| -rw-r--r-- | kanshi/config | 14 | ||||
| -rwxr-xr-x | kanshi/dual.sh | 45 | ||||
| -rwxr-xr-x | kanshi/home_tv.sh | 30 | ||||
| -rwxr-xr-x | kanshi/single.sh | 19 | ||||
| -rwxr-xr-x | kanshi/work.sh | 32 | ||||
| -rw-r--r-- | niri/config.kdl | 180 | ||||
| -rwxr-xr-x | niri/init.sh | 28 | ||||
| -rwxr-xr-x | niri/run-niri.sh | 15 | ||||
| -rwxr-xr-x | niri/swayidle.sh | 3 | ||||
| -rwxr-xr-x | niri/terminal.sh | 25 | ||||
| -rw-r--r-- | numen/phrases/main.phrases | 4 | ||||
| -rw-r--r-- | shell/.profile | 2 | ||||
| -rw-r--r-- | sublime-text/Preferences.sublime-settings | 3 | ||||
| -rwxr-xr-x | sway/init.sh | 3 | ||||
| -rwxr-xr-x | sway/run-sway.sh | 4 | ||||
| -rw-r--r-- | waybar/default.conf | 34 | ||||
| -rw-r--r-- | waybar/niri.conf | 19 | ||||
| -rw-r--r-- | waybar/sway.conf | 30 |
20 files changed, 367 insertions, 129 deletions
diff --git a/git/.gitconfig b/git/.gitconfig index 7abe96e..5b6b114 100644 --- a/git/.gitconfig +++ b/git/.gitconfig @@ -3,7 +3,7 @@ email = bozo@kopic.xyz signingkey = 1E5A7C9229CE0BEE9488499B61E770F9ED93DF2A [http] - sslVerify = false + sslVerify = true [branch] autosetuprebase = always [core] @@ -95,6 +95,10 @@ symlink $DOTFILES_DIR/neomutt $CONFIG_DIR/neomutt # neovide symlink $DOTFILES_DIR/neovide $CONFIG_DIR/neovide +# niri +symlink $DOTFILES_DIR/niri $CONFIG_DIR/niri +symlink $DOTFILES_DIR/niri/run-niri.sh $BIN_DIR/run-niri + # numen symlink $DOTFILES_DIR/numen $CONFIG_DIR/numen diff --git a/kanshi/config b/kanshi/config index 3876217..7e79f7c 100644 --- a/kanshi/config +++ b/kanshi/config @@ -9,17 +9,3 @@ profile dual { output * exec ~/.config/kanshi/dual.sh } - -profile work { - output eDP-1 - output 'Dell Inc. DELL U2722DE HFMKDH3' - output 'Dell Inc. DELL U2722D 3ZS8XN3' - exec ~/.config/kanshi/work.sh -} - -profile home_tv { - output eDP-1 - output 'AOC Q2770 FSUE7HA007776' - output 'LG Electronics LG TV 0x01010101' - exec ~/.config/kanshi/home_tv.sh -} diff --git a/kanshi/dual.sh b/kanshi/dual.sh index b9c08cf..bda0ff0 100755 --- a/kanshi/dual.sh +++ b/kanshi/dual.sh @@ -4,18 +4,39 @@ secondary=$(display_names ".name != \"$primary\"") -swaymsg -q reload +wlr-randr --output $primary --pos 0,0 +wlr-randr --output $secondary --right-of $primary -swaymsg -q output $primary pos 0 0 \ - res $primary_res \ - bg $bg1 stretch -swaymsg -q output $secondary pos $primary_width 0 \ - bg $bg2 stretch +killall swaybg >/dev/null +swaybg -o $primary -i $bg1 \ + -o $secondary -i $bg2 & -for workspace in 1:1 2:2 3:3 4:4; do - swaymsg -q workspace $workspace output $primary -done +if [ "$XDG_CURRENT_DESKTOP" = "sway" ]; then + for workspace in 1:1 2:2 3:3 4:4; do + swaymsg -q workspace $workspace output $primary + done + + for workspace in 5:a 6:s 7:d 8:f; do + swaymsg -q workspace $workspace output $secondary + done + +elif [ "$XDG_CURRENT_DESKTOP" = "niri" ]; then + for workspace in 1:1 2:2 3:3 4:4; do + niri msg action move-workspace-to-monitor --reference $workspace $primary + done + + for workspace in 5:a 6:s 7:d 8:f; do + niri msg action move-workspace-to-monitor --reference $workspace $secondary + done + + niri msg action move-workspace-to-index --reference 1:1 1 + niri msg action move-workspace-to-index --reference 2:2 2 + niri msg action move-workspace-to-index --reference 3:3 3 + niri msg action move-workspace-to-index --reference 4:4 4 + + niri msg action move-workspace-to-index --reference 5:a 1 + niri msg action move-workspace-to-index --reference 6:s 2 + niri msg action move-workspace-to-index --reference 7:d 3 + niri msg action move-workspace-to-index --reference 8:f 4 +fi -for workspace in 5:a 6:s 7:d 8:f; do - swaymsg -q workspace $workspace output $secondary -done diff --git a/kanshi/home_tv.sh b/kanshi/home_tv.sh deleted file mode 100755 index f54128b..0000000 --- a/kanshi/home_tv.sh +++ /dev/null @@ -1,30 +0,0 @@ -#!/bin/sh - -. $(dirname "$(realpath "$0")")/env.sh - -tv=$(display_names '.model == "LG TV"') -secondary=$(display_names ".name != \"$primary\" and .name != \"$tv\"") -secondary_width=$(display_widths ".name == \"$secondary\"") - -swaymsg -q reload - -swaymsg -q output $primary pos 0 0 \ - res $primary_res \ - bg $bg1 stretch -swaymsg -q output $secondary pos $primary_width 0 \ - bg $bg2 stretch - -swaymsg -q output $tv pos $(($primary_width + $secondary_width)) 0 \ - bg $bg1 stretch - -for workspace in 1:1 2:2 3:3; do - swaymsg -q workspace $workspace output $primary -done - -for workspace in 5:a 6:s 7:d 8:f; do - swaymsg -q workspace $workspace output $secondary -done - -for workspace in 4:4; do - swaymsg -q workspace $workspace output $tv -done diff --git a/kanshi/single.sh b/kanshi/single.sh index 5a335af..015c22d 100755 --- a/kanshi/single.sh +++ b/kanshi/single.sh @@ -2,12 +2,17 @@ . $(dirname "$(realpath "$0")")/env.sh -swaymsg -q reload +killall swaybg +swaybg -o $primary -i $bg1 & -swaymsg -q output $primary pos 0 0 \ - res $primary_res \ - bg $bg1 stretch +if [ "$XDG_CURRENT_DESKTOP" = "sway" ]; then + for workspace in 1:1 2:2 3:3 4:4 5:a 6:s 7:d 8:f; do + swaymsg -q workspace $workspace output $primary + done + +elif [ "$XDG_CURRENT_DESKTOP" = "niri" ]; then + for workspace in 1 2 3 4 a s d f; do + niri msg action move-workspace-to-monitor --reference $workspace $primary + done +fi -for workspace in 1:1 2:2 3:3 4:4 5:a 6:s 7:d 8:f; do - swaymsg -q workspace $workspace output $primary -done diff --git a/kanshi/work.sh b/kanshi/work.sh deleted file mode 100755 index efc86f8..0000000 --- a/kanshi/work.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -. $(dirname "$(realpath "$0")")/env.sh - -display_width=2560 -display_height=1440 -display_res=${display_width}x${display_height} - -display1=$(display_names '.model == "DELL U2722DE"') -display2=$(display_names '.model == "DELL U2722D"') - -swaymsg reload - -swaymsg -q output $primary pos 0 1440 \ - res $primary_res \ - bg $bg1 stretch -swaymsg -q output $display1 pos 0 0 \ - res $display_res \ - bg $bg1 stretch -swaymsg -q output $display2 pos $display_width 0 \ - res $display_res \ - bg $bg2 stretch - -swaymsg -q workspace 1:1 output $primary - -for workspace in 2:2 3:3 4:4; do - swaymsg -q workspace $workspace output $display1 -done - -for workspace in 5:a 6:s 7:d 8:f; do - swaymsg -q workspace $workspace output $display2 -done diff --git a/niri/config.kdl b/niri/config.kdl new file mode 100644 index 0000000..aa67b93 --- /dev/null +++ b/niri/config.kdl @@ -0,0 +1,180 @@ +input { + keyboard { + numlock + } + + touchpad { + tap + natural-scroll + } + + warp-mouse-to-focus + focus-follows-mouse max-scroll-amount="0%" +} + +cursor { + xcursor-theme "default" + xcursor-size 32 +} + +layout { + gaps 0 + + default-column-width { + proportion 0.5 + } + + preset-column-widths { + proportion 0.33333 + proportion 0.5 + proportion 0.66667 + proportion 1.0 + } + + focus-ring { + off + } + + border { + on + width 4 + active-color "#ffc87f" + inactive-color "#505050" + urgent-color "#9b0000" + } +} + +prefer-no-csd + +animations { + workspace-switch { + off + } +} + +hotkey-overlay { + skip-at-startup +} + +screenshot-path "~/Pictures/Screenshots/Screenshot from %Y-%m-%d %H-%M-%S.png" + +workspace "1:1" +workspace "2:2" +workspace "3:3" +workspace "4:4" +workspace "5:a" +workspace "6:s" +workspace "7:d" +workspace "8:f" +workspace "9:term" + +window-rule { + match app-id="tmux_term" + + open-on-workspace "9:term" + open-maximized-to-edges true + open-focused true +} + +spawn-sh-at-startup "~/.config/niri/init.sh" + +binds { + XF86MonBrightnessUp allow-when-locked=true { spawn "brightnessctl" "--class=backlight" "set" "+10%"; } + XF86MonBrightnessDown allow-when-locked=true { spawn "brightnessctl" "--class=backlight" "set" "10%-"; } + + Print { screenshot; } + Ctrl+Print { screenshot-screen; } + Alt+Print { screenshot-window; } + + F12 { spawn "~/.config/niri/terminal.sh"; } + + Mod+Return { spawn "foot"; } + Mod+Space { spawn "wofi"; } + + Mod+Tab { toggle-column-tabbed-display; } + + Mod+Shift+Q repeat=false { close-window; } + Mod+Shift+E { quit; } + Mod+Shift+Space { toggle-window-floating; } + Mod+Shift+Return { fullscreen-window; } + + Mod+H { focus-column-left; } + Mod+J { focus-window-down; } + Mod+K { focus-window-up; } + Mod+L { focus-column-right; } + Mod+Left { focus-column-left; } + Mod+Down { focus-window-down; } + Mod+Up { focus-window-up; } + Mod+Right { focus-column-right; } + + Mod+Shift+H { move-column-left; } + Mod+Shift+J { move-window-down; } + Mod+Shift+K { move-window-up; } + Mod+Shift+L { move-column-right; } + Mod+Shift+Left { move-column-left; } + Mod+Shift+Down { move-window-down; } + Mod+Shift+Up { move-window-up; } + Mod+Shift+Right { move-column-right; } + + Mod+Slash { consume-or-expel-window-left; } + + Mod+1 { focus-workspace "1:1"; } + Mod+2 { focus-workspace "2:2"; } + Mod+3 { focus-workspace "3:3"; } + Mod+4 { focus-workspace "4:4"; } + Mod+A { focus-workspace "5:a"; } + Mod+S { focus-workspace "6:s"; } + Mod+D { focus-workspace "7:d"; } + Mod+F { focus-workspace "8:f"; } + + Mod+Shift+1 { move-column-to-workspace "1:1" focus=false; } + Mod+Shift+2 { move-column-to-workspace "2:2" focus=false; } + Mod+Shift+3 { move-column-to-workspace "3:3" focus=false; } + Mod+Shift+4 { move-column-to-workspace "4:4" focus=false; } + Mod+Shift+A { move-column-to-workspace "5:a" focus=false; } + Mod+Shift+S { move-column-to-workspace "6:s" focus=false; } + Mod+Shift+D { move-column-to-workspace "7:d" focus=false; } + Mod+Shift+F { move-column-to-workspace "8:f" focus=false; } + + Mod+Ctrl+H { focus-monitor-left; } + Mod+Ctrl+J { focus-monitor-down; } + Mod+Ctrl+K { focus-monitor-up; } + Mod+Ctrl+L { focus-monitor-right; } + Mod+Ctrl+Left { focus-monitor-left; } + Mod+Ctrl+Down { focus-monitor-down; } + Mod+Ctrl+Up { focus-monitor-up; } + Mod+Ctrl+Right { focus-monitor-right; } + + Mod+Ctrl+Shift+H { move-column-to-monitor-left; } + Mod+Ctrl+Shift+J { move-column-to-monitor-down; } + Mod+Ctrl+Shift+K { move-column-to-monitor-up; } + Mod+Ctrl+Shift+L { move-column-to-monitor-right; } + Mod+Ctrl+Shift+Left { move-column-to-monitor-left; } + Mod+Ctrl+Shift+Down { move-column-to-monitor-down; } + Mod+Ctrl+Shift+Up { move-column-to-monitor-up; } + Mod+Ctrl+Shift+Right { move-column-to-monitor-right; } + + Mod+R { switch-preset-column-width; } + Mod+Minus { set-column-width "-10%"; } + Mod+Equal { set-column-width "+10%"; } + Mod+BracketLeft { consume-or-expel-window-left; } + Mod+BracketRight { consume-or-expel-window-right; } + Mod+C { center-column; } + Mod+M { maximize-window-to-edges; } + Mod+W { toggle-column-tabbed-display; } + + Mod+O repeat=false { toggle-overview; } + + Mod+Escape allow-inhibiting=false { toggle-keyboard-shortcuts-inhibit; } + + Mod+Home { focus-column-first; } + Mod+End { focus-column-last; } + Mod+Ctrl+Home { move-column-to-first; } + Mod+Ctrl+End { move-column-to-last; } + + Mod+WheelScrollUp { focus-column-right; } + Mod+WheelScrollDown { focus-column-left; } + + Mod+Shift+WheelScrollUp { move-column-right; } + Mod+Shift+WheelScrollLeft { move-column-left; } +} diff --git a/niri/init.sh b/niri/init.sh new file mode 100755 index 0000000..acbb88a --- /dev/null +++ b/niri/init.sh @@ -0,0 +1,28 @@ +#!/bin/sh + +if command -v gsettings >/dev/null; then + gsettings set org.gnome.desktop.interface scaling-factor 1 + gsettings set org.gnome.desktop.interface text-scaling-factor 1 + gsettings set org.gnome.desktop.interface cursor-size 32 +fi + +os_id=$(. /etc/os-release && echo $ID) + +if command -v systemctl >/dev/null; then + systemctl --user restart plasma-kactivitymanagerd + +else + dbus-update-activation-environment WAYLAND_DISPLAY \ + XDG_CURRENT_DESKTOP + + if [ "$os_id" = "alpine" ]; then + /usr/libexec/pipewire-launcher & + + elif [ "$os_id" = "void" ]; then + pipewire & + fi +fi + +~/.config/niri/swayidle.sh & +kanshi & +waybar -c ~/.config/waybar/niri.conf & diff --git a/niri/run-niri.sh b/niri/run-niri.sh new file mode 100755 index 0000000..eae7cec --- /dev/null +++ b/niri/run-niri.sh @@ -0,0 +1,15 @@ +#!/bin/sh + +exec >~/.niri.log 2>&1 + +export QT_QPA_PLATFORM=wayland + +if ( command -v systemctl && systemctl --user is-system-running ) >/dev/null; then + exec niri-session + +elif pgrep -U $(id -u) dbus-daemon >/dev/null; then + exec niri --session + +else + exec dbus-run-session -- niri --session +fi diff --git a/niri/swayidle.sh b/niri/swayidle.sh new file mode 100755 index 0000000..caa96f0 --- /dev/null +++ b/niri/swayidle.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +exec swayidle -w timeout 600 'niri msg action power-off-monitors' diff --git a/niri/terminal.sh b/niri/terminal.sh new file mode 100755 index 0000000..ba34d5f --- /dev/null +++ b/niri/terminal.sh @@ -0,0 +1,25 @@ +#!/bin/sh + +term_workspace=9:term +term_app_id=tmux_term + +focused_output=$(niri msg -j workspaces | + jq -r '.[] | select(.is_focused == true) | .output') +focused_workspace=$(niri msg -j workspaces | + jq -r '.[] | select(.is_focused == true) | .name') + +if [ "$focused_workspace" = "$term_workspace" ]; then + niri msg action focus-workspace-previous + +else + niri msg action focus-workspace $term_workspace + niri msg action move-workspace-to-monitor $focused_output + niri msg action focus-workspace $term_workspace + + if ! (niri msg -j windows | + jq -e ".[] | select(.app_id == \"$term_app_id\")" > /dev/null); then + + exec foot --app-id $term_app_id \ + tmux new-session -A -s default + fi +fi diff --git a/numen/phrases/main.phrases b/numen/phrases/main.phrases index 6fe7668..9db3fc1 100644 --- a/numen/phrases/main.phrases +++ b/numen/phrases/main.phrases @@ -1,8 +1,8 @@ lisa exit please: run killall numen -lisa desk stand please: run ~/.local/opt/venvs/python311/bin/idasen stand -lisa desk sit please: run ~/.local/opt/venvs/python311/bin/idasen sit +lisa desk stand please: run idasen stand +lisa desk sit please: run idasen sit lisa volume mute please: run pulsemixer --mute lisa volume un mute please: run pulsemixer --unmute diff --git a/shell/.profile b/shell/.profile index 7dc1338..c61733f 100644 --- a/shell/.profile +++ b/shell/.profile @@ -63,4 +63,4 @@ fi # [ -e $nix_profile_sh ] && . $nix_profile_sh # export LOCALE_ARCHIVE=~/.nix-profile/lib/locale/locale-archive -export NUMEN_MODEL=~/.local/share/vosk-models/small-en-us +export NUMEN_MODEL=~/.local/share/vosk-models/vosk-model-small-en-us-0.15 diff --git a/sublime-text/Preferences.sublime-settings b/sublime-text/Preferences.sublime-settings index 5d202d1..544300e 100644 --- a/sublime-text/Preferences.sublime-settings +++ b/sublime-text/Preferences.sublime-settings @@ -44,7 +44,7 @@ [ ], "font_face": "monospace", - "font_size": 11, + "font_size": 13, "highlight_line": true, "highlight_modified_tabs": true, "ignored_packages": @@ -71,4 +71,5 @@ "sublime_merge_path": null, "show_panel_on_build": false, "index_files": false, + "file_icon_theme": "A File Icon.sublime-file-icons", } diff --git a/sway/init.sh b/sway/init.sh index 903d4ea..856a234 100755 --- a/sway/init.sh +++ b/sway/init.sh @@ -7,9 +7,6 @@ if command -v gsettings >/dev/null; then gsettings set org.gnome.desktop.interface cursor-size 32 fi -export QT_QPA_PLATFORM=wayland -export XDG_CURRENT_DESKTOP=sway - os_id=$(. /etc/os-release && echo $ID) if command -v systemctl >/dev/null; then diff --git a/sway/run-sway.sh b/sway/run-sway.sh index 9141b8e..3b7b01b 100755 --- a/sway/run-sway.sh +++ b/sway/run-sway.sh @@ -2,9 +2,13 @@ exec >~/.sway.log 2>&1 +export QT_QPA_PLATFORM=wayland +export XDG_CURRENT_DESKTOP=sway + if ( ( command -v systemctl && systemctl --user is-system-running ) || pgrep -U $(id -u) dbus-daemon ) >/dev/null; then exec sway + else exec dbus-run-session -- sway fi diff --git a/waybar/default.conf b/waybar/default.conf new file mode 100644 index 0000000..9889747 --- /dev/null +++ b/waybar/default.conf @@ -0,0 +1,34 @@ +{ + "network": { + "format-wifi": " {essid}", + "format-ethernet": "󰛳 {ifname}", + "format-disconnected": "󰲛 disconnected", + "on-click": "connman-gtk" + }, + + "pulseaudio": { + "format": "󰕾 {volume:3}%", + "format-muted": "󰝟 mute", + "scroll-step": 5, + "on-click": "pavucontrol", + "on-click-right": "pulsemixer --toggle-mute", + "ignored-sinks": ["Built-in Audio Digital Stereo (HDMI)", + "Built-in Audio Digital Stereo (HDMI 2)"] + }, + + "battery": { + "format": "{icon} {capacity:3}%", + "format-icons": { + "default": ["󰂎", "󰁺", "󰁻", "󰁼", + "󰁽", "󰁾", "󰁿", "󰂀", + "󰂁", "󰂂", "󰁹"], + "charging": ["󰢟", "󰢜", "󰂆", "󰂇", + "󰂈", "󰢝", "󰂉", "󰢞", + "󰂊", "󰂋", "󰂅"] + } + }, + + "clock": { + "format": "󰃰 {:%Y-%m-%d %H:%M}" + } +} diff --git a/waybar/niri.conf b/waybar/niri.conf new file mode 100644 index 0000000..fe92e60 --- /dev/null +++ b/waybar/niri.conf @@ -0,0 +1,19 @@ +{ + "position": "top", + "modules-left": ["niri/workspaces"], + "modules-center": ["niri/window"], + "modules-right": ["network", "pulseaudio", "battery", "clock", "tray"], + + "niri/workspaces": { + "sort-by-name": true, + "display-condition": "only-populated" + }, + + "niri/window": { + "separate-outputs": true + }, + + "include": [ + "~/.config/waybar/default.conf" + ] +} diff --git a/waybar/sway.conf b/waybar/sway.conf index d117f96..2ed14ef 100644 --- a/waybar/sway.conf +++ b/waybar/sway.conf @@ -4,33 +4,11 @@ "modules-center": ["sway/window"], "modules-right": ["network", "pulseaudio", "battery", "clock", "tray"], - "sway/workspaces" : { + "sway/workspaces": { "format": "{name}" }, - "network": { - "format-wifi": " {essid}", - "format-ethernet": "󰛳 {ifname}", - "format-disconnected": "󰲛 disconnected", - "on-click": "connman-gtk" - }, - - "pulseaudio": { - "format": "󰕾 {volume:3}%", - "format-muted": "󰝟 mute", - "scroll-step": 5, - "on-click": "pavucontrol", - "on-click-right": "pulsemixer --toggle-mute", - "ignored-sinks": ["Built-in Audio Digital Stereo (HDMI)", - "Built-in Audio Digital Stereo (HDMI 2)"] - }, - - "battery": { - "format": "{icon} {capacity:3}%", - "format-icons": ["", "", "", "", ""] - }, - - "clock": { - "format": "󰃰 {:%Y-%m-%d %H:%M}" - } + "include": [ + "~/.config/waybar/default.conf" + ] } |
