swaydots

my dotfiles
git clone https://git.awy.one/swaydots.git
Log | Files | Refs | README | LICENSE

commit 26403d14c8230fbdf0c583b22aabab71fa8a711d
parent aa68ad136fa621009588ed986df8479254f947b7
Author: awy <awy@awy.one>
Date:   Sat, 26 Jul 2025 00:05:32 +0300

tidy & indent

Diffstat:
M.config/mako/config | 2--
M.config/mpd/mpd.conf | 12++++++------
M.config/pipewire/pipewire.conf.d/user-session.conf | 4++--
M.config/sway/config | 23+++++++++--------------
M.config/swayimg/key-handler | 60++++++++++++++++++++++++++++++------------------------------
M.config/zsh/.zshrc | 29++++++++++++++---------------
6 files changed, 61 insertions(+), 69 deletions(-)

diff --git a/.config/mako/config b/.config/mako/config @@ -27,13 +27,11 @@ text-color=#d8dee9 border-color=#5e81ac default-timeout=10000 - [urgency=normal] text-color=#d8dee9 border-color=#5e81ac default-timeout=10000 - [urgency=critical] text-color=#d8dee9 border-color=#5e81ac diff --git a/.config/mpd/mpd.conf b/.config/mpd/mpd.conf @@ -7,13 +7,13 @@ restore_paused "yes" max_output_buffer_size "16384" audio_output { - type "pipewire" - name "PipeWire Sound Server" + type "pipewire" + name "PipeWire Sound Server" } audio_output { - type "fifo" - name "Visualizer feed" - path "/tmp/mpd.fifo" - format "44100:16:2" + type "fifo" + name "Visualizer feed" + path "/tmp/mpd.fifo" + format "44100:16:2" } diff --git a/.config/pipewire/pipewire.conf.d/user-session.conf b/.config/pipewire/pipewire.conf.d/user-session.conf @@ -1,4 +1,4 @@ context.exec = [ - { path = "/usr/bin/wireplumber" args = "" condition = [ { exec.session-manager = null } { exec.session-manager = true } ] } - { path = "/usr/bin/pipewire" args = "-c pipewire-pulse.conf" condition = [ { exec.pipewire-pulse = null } { exec.pipewire-pulse = true } ] } + { path = "/usr/bin/wireplumber" args = "" condition = [ { exec.session-manager = null } { exec.session-manager = true } ] } + { path = "/usr/bin/pipewire" args = "-c pipewire-pulse.conf" condition = [ { exec.pipewire-pulse = null } { exec.pipewire-pulse = true } ] } ] diff --git a/.config/sway/config b/.config/sway/config @@ -168,27 +168,22 @@ bindsym $mod+Shift+0 move container to workspace number 10 bindsym $mod+q kill - -# INPUT input * { - xkb_layout "us,ru" - xkb_options "grp:win_space_toggle,caps:escape" - accel_profile flat + xkb_layout "us,ru" + xkb_options "grp:win_space_toggle,caps:escape" + accel_profile flat } input "type:keyboard" { -repeat_rate 45 -repeat_delay 300 + repeat_rate 45 + repeat_delay 300 } -# BAR bar { - position top - output DP-2 - # swaybar_command waybar - status_command i3blocks - - separator_symbol " " + position top + output DP-2 + status_command i3blocks + separator_symbol " " colors { statusline #d8dee9 diff --git a/.config/swayimg/key-handler b/.config/swayimg/key-handler @@ -3,33 +3,33 @@ file=$1 [ -z "$selection" ] && selection=$(printf "w - Set as wallpaper\nc - Copy to dir\nm - Move to dir\nr - Rotate 90°\nR - Rotate -90°\nf - Flip horizontal\ny - Copy filename to clipboard\nY - Copy full path to clipboard\nd - Delete\ng - Open in GIMP\ni - Show media info" | mew -i -l 12 -p "Choose action for selected files:") action=$(printf "%s" "$selection" | cut -d'-' -f1 | tr -d ' ') - case "$action" in - "w") setbg "$file" & ;; - "c") - [ -z "$destdir" ] && destdir="$(sed "s/#.*$//;/^\s*$/d" ${XDG_CONFIG_HOME:-$HOME/.config}/shell/bm-dirs | awk '{print $2}' | mew -l 20 -i -p "Copy file(s) to where?" | sed "s|~|$HOME|g")" - [ ! -d "$destdir" ] && notify-send "$destdir is not a directory, cancelled." && exit - cp "$file" "$destdir" && notify-send -i "$(readlink -f "$file")" "$file copied to $destdir." & - ;; - "m") - [ -z "$destdir" ] && destdir="$(sed "s/#.*$//;/^\s*$/d" ${XDG_CONFIG_HOME:-$HOME/.config}/shell/bm-dirs | awk '{print $2}' | mew -l 20 -i -p "Move file(s) to where?" | sed "s|~|$HOME|g")" - [ ! -d "$destdir" ] && notify-send "$destdir is not a directory, cancelled." && exit - mv "$file" "$destdir" && notify-send -i "$(readlink -f "$file")" "$file moved to $destdir." & - ;; - "r") - magick "$file" -rotate 90 "$file" ;; - "R") - magick "$file" -rotate -90 "$file" ;; - "f") - magick "$file" -flop "$file" ;; - "y") - printf "%s" "$file" | tr -d '\n' | wl-copy && - notify-send "$file copied to clipboard" & ;; - "Y") - readlink -f "$file" | tr -d '\n' | wl-copy && - notify-send "$(readlink -f "$file") copied to clipboard" & ;; - "d") - [ "$(printf "No\\nYes" | mew -i -p "Really delete $file?")" = "Yes" ] && rm "$file" && notify-send "$file deleted." ;; - "g") ifinstalled gimp && setsid -f gimp "$file" ;; - "i") notify-send "File information" "$(mediainfo "$file" | sed "s/[ ]\+:/:/g;s/: /: <b>/;s/$/<\/b>/" | rg "<b>")" ;; - *) notify-send "No keybind for that key" ;; - esac + case "$action" in + "w") setbg "$file" & ;; + "c") + [ -z "$destdir" ] && destdir="$(sed "s/#.*$//;/^\s*$/d" ${XDG_CONFIG_HOME:-$HOME/.config}/shell/bm-dirs | awk '{print $2}' | mew -l 20 -i -p "Copy file(s) to where?" | sed "s|~|$HOME|g")" + [ ! -d "$destdir" ] && notify-send "$destdir is not a directory, cancelled." && exit + cp "$file" "$destdir" && notify-send -i "$(readlink -f "$file")" "$file copied to $destdir." & + ;; + "m") + [ -z "$destdir" ] && destdir="$(sed "s/#.*$//;/^\s*$/d" ${XDG_CONFIG_HOME:-$HOME/.config}/shell/bm-dirs | awk '{print $2}' | mew -l 20 -i -p "Move file(s) to where?" | sed "s|~|$HOME|g")" + [ ! -d "$destdir" ] && notify-send "$destdir is not a directory, cancelled." && exit + mv "$file" "$destdir" && notify-send -i "$(readlink -f "$file")" "$file moved to $destdir." & + ;; + "r") + magick "$file" -rotate 90 "$file" ;; + "R") + magick "$file" -rotate -90 "$file" ;; + "f") + magick "$file" -flop "$file" ;; + "y") + printf "%s" "$file" | tr -d '\n' | wl-copy && + notify-send "$file copied to clipboard" & ;; + "Y") + readlink -f "$file" | tr -d '\n' | wl-copy && + notify-send "$(readlink -f "$file") copied to clipboard" & ;; + "d") + [ "$(printf "No\\nYes" | mew -i -p "Really delete $file?")" = "Yes" ] && rm "$file" && notify-send "$file deleted." ;; + "g") ifinstalled gimp && setsid -f gimp "$file" ;; + "i") notify-send "File information" "$(mediainfo "$file" | sed "s/[ ]\+:/:/g;s/: /: <b>/;s/$/<\/b>/" | rg "<b>")" ;; + *) notify-send "No keybind for that key" ;; + esac diff --git a/.config/zsh/.zshrc b/.config/zsh/.zshrc @@ -1,5 +1,3 @@ -# Luke's config for the Zoomer Shell - # Enable colors and change prompt: autoload -U colors && colors # Load colors PS1='%{$fg[white]%}%n%{$fg[white]%}@%{$fg[white]%}%M %{$fg[yellow]%}%~%{$reset_color%}%b${vcs_info_msg_0_} $ ' @@ -43,31 +41,32 @@ bindkey -v '^?' backward-delete-char # Change cursor shape for different vi modes. function zle-keymap-select () { - case $KEYMAP in - vicmd) echo -ne '\e[1 q';; # block - viins|main) echo -ne '\033[0 q';; # beam - esac + case $KEYMAP in + vicmd) echo -ne '\e[1 q';; # block + viins|main) echo -ne '\033[0 q';; # beam + esac } zle -N zle-keymap-select zle-line-init() { - zle -K viins # initiate `vi insert` as keymap (can be removed if `bindkey -V` has been set elsewhere) - echo -ne '\033[0 q' + zle -K viins # initiate `vi insert` as keymap (can be removed if `bindkey -V` has been set elsewhere) + echo -ne '\033[0 q' } zle -N zle-line-init function preexec { - print -Pn "\e]0;${(q)1}\e\\" + print -Pn "\e]0;${(q)1}\e\\" } # Use yazi to switch directories and bind it to ctrl-o function y() { - local tmp="$(mktemp -t "yazi-cwd.XXXXXX")" cwd - yazi "$@" --cwd-file="$tmp" - if cwd="$(command cat -- "$tmp")" && [ -n "$cwd" ] && [ "$cwd" != "$PWD" ]; then - builtin cd -- "$cwd" - fi - rm -f -- "$tmp" > /dev/null + local tmp="$(mktemp -t "yazi-cwd.XXXXXX")" cwd + yazi "$@" --cwd-file="$tmp" + if cwd="$(command cat -- "$tmp")" && [ -n "$cwd" ] && [ "$cwd" != "$PWD" ]; then + builtin cd -- "$cwd" + fi + rm -f -- "$tmp" > /dev/null } + bindkey -s '^o' '^uy\n' bindkey -s '^a' '^ubc -lq\n'