diff options
| author | 2026-04-17 10:54:01 +0100 | |
|---|---|---|
| committer | 2026-04-17 10:54:01 +0100 | |
| commit | 5252d5e19e0397a93c9686698961c9e9754370fe (patch) | |
| tree | 160b98301d77852af60e6aff1986fb85c81646dd /home | |
| parent | 48121c013af862be9daca4757beb93f97e021163 (diff) | |
| download | dotfiles-5252d5e19e0397a93c9686698961c9e9754370fe.tar.gz dotfiles-5252d5e19e0397a93c9686698961c9e9754370fe.tar.bz2 dotfiles-5252d5e19e0397a93c9686698961c9e9754370fe.zip | |
chore: remove X11-only scripts replaced by sway/wayland
- input-setup: replaced by sway input blocks
- display-setup: replaced by sway output config + display-toggle.sh
- launch-polybar: replaced by waybar
- locknpause: replaced by swaylock
- vibe: removed (xclip + xdotool, no wayland use case)
- automute: removed (xdotool focus tracking, no wayland use case)
Diffstat (limited to 'home')
| -rwxr-xr-x | home/.local/bin/automute | 123 | ||||
| -rwxr-xr-x | home/.local/bin/display-setup | 22 | ||||
| -rwxr-xr-x | home/.local/bin/input-setup | 51 | ||||
| -rwxr-xr-x | home/.local/bin/launch-polybar | 17 | ||||
| -rwxr-xr-x | home/.local/bin/locknpause | 4 | ||||
| -rwxr-xr-x | home/.local/bin/vibe | 15 |
6 files changed, 0 insertions, 232 deletions
diff --git a/home/.local/bin/automute b/home/.local/bin/automute deleted file mode 100755 index 20b04f4..0000000 --- a/home/.local/bin/automute +++ /dev/null @@ -1,123 +0,0 @@ -#!/usr/bin/env sh - -pid_file="/tmp/automutepid" - -pid_exists() { - test -r "$pid_file" -} - -is_running() { - if pid_exists; then - ps "$(cat "$pid_file")" >/dev/null 2>&1 || return 1 - else - return 1 - fi -} - -mute() { - pw-cli set-param "$1" Props '{mute: true}' -} - -unmute() { - pw-cli set-param "$1" Props '{mute: false}' -} - -pid2index() { - pw-dump | jq --argjson targetid "$1" 'map(select(.info.props."application.process.id" == $targetid and .info.params.PropInfo != null)) | .[].id' -} - -list_sink_input_ids() { - pw-dump | jq 'map(select(.info.params.PropInfo != null and .info.params.PropInfo[].id=="mute" and .info.props."application.process.id" != null)) | .[].id' -} - -unmute_all() { - for i in $(list_sink_input_ids); do - unmute "$i" - done - exit -} - -trap unmute_all INT TERM - -mute_all() { - for i in $(list_sink_input_ids); do - mute "$i" - done -} - -do_automute() { - while :; do - focus_pid="$(xdotool getwindowfocus getwindowpid)" - if [ "$focus_pid" ] && [ "$unfocus_pid" != "$focus_pid" ]; then - focus_index=$(pid2index "$focus_pid") - if [ "$unfocus_pid" ]; then - unfocus_index=$(pid2index "$unfocus_pid") - fi - if [ "$focus_index" ]; then - if [ "$unfocus_index" ]; then - mute "$unfocus_index" - else - mute_all - fi - unmute "$focus_index" - unfocus_pid="$focus_pid" - fi - fi - sleep 0.25 - done -} - -start() { - do_automute & - echo "$!" >"$pid_file" - notify-send "Automute started!" -} - -stop() { - pid_exists || exit 1 - pid="$(cat "$pid_file")" - # kill with SIGTERM, allowing finishing touches. - kill "$pid" - # even after SIGTERM, ffmpeg may still run, so SIGKILL it. - sleep 3 - is_running && kill -9 "$pid" - rm -f "$pid_file" - notify-send "Automute stopped!" -} - -toggle() { - if is_running; then - echo "Stopping automute" - stop - else - echo "Starting automute" - start - fi - echo - status -} - -status() { - if is_running; then - echo "Automuting is running with PID $(cat "$pid_file")" - else - echo "Automute inactive" - fi -} -case "$1" in - start) - start - ;; - stop) - stop - ;; - toggle) - toggle - ;; - status) - status - ;; - *) - toggle - ;; -esac diff --git a/home/.local/bin/display-setup b/home/.local/bin/display-setup deleted file mode 100755 index d8e86d8..0000000 --- a/home/.local/bin/display-setup +++ /dev/null @@ -1,22 +0,0 @@ -#!/usr/bin/env sh - -if [ "$(uname -n)" = "hercules" ]; then - xrandr --setprovideroutputsource modesetting NVIDIA-G0 - nvidia-settings --load-config-only & - nvidia-settings -a '[gpu:0]/GPUPowerMizerMode=1' & -fi -xrandr --auto - -if [ "$(uname -n)" = "hercules" ] && xrandr --query | grep "HDMI-1 connected"; then - xrandr --output eDP-1 --off - xrandr --output HDMI-1 --primary --mode 1920x1080 --rate 144 - # xrandr --output HDMI-1 --primary --mode 1920x1080 - # xrandr --output HDMI-1 --primary --mode 2560x1080 --rate 75 - # xrandr --output HDMI-1 --primary --mode 3840x2160 - # xrandr --output HDMI-1 --mode 1920x1080 --sameas eDP-1 -elif [ "$(uname -n)" = "halley2" ] && xrandr --query | grep "HDMI-2 connected"; then - xrandr --output HDMI-2 --mode 1920x1080 --same-as eDP-1 -fi - -bspc wm -r -launch-polybar diff --git a/home/.local/bin/input-setup b/home/.local/bin/input-setup deleted file mode 100755 index d97f9c2..0000000 --- a/home/.local/bin/input-setup +++ /dev/null @@ -1,51 +0,0 @@ -#!/usr/bin/env sh - -[ -r ~/.config/X11/Xkeymap ] && xkbcomp ~/.config/X11/Xkeymap "$DISPLAY" - -setlayout() { - ids=$(xinput --list | sed -ne '/Virtual core keyboard/{:a' -e 'n;p;ba' -e '}' | grep "$1" | sed -n 's/.*id=\([0-9]\+\).*/\1/p') - for i in $ids; do - setxkbmap -device "$i" -layout "$2" - done -} - -setmodmap() { - kbds=$(xinput --list | sed -ne '/Virtual core keyboard/{:a' -e 'n;p;ba' -e '}' | grep "$1" | sed -n 's/.*id=\([0-9]\+\).*/\1/p') - if [ "$kbds" ]; then - xmodmap ~/.config/X11/Xmodmap - fi -} - -if [ "$(uname -n)" = "halley2" ]; then - setxkbmap -layout us -elif [ "$(uname -n)" = "hercules" ]; then - setxkbmap -layout es -fi - - -setlayout "Kingston HyperX Alloy FPS Pro Mechanical Gaming Keyboard" us -# setlayout "SONiX USB DEVICE" us - -setlayout "SEMITEK USB-HID Gaming Keyboard" us -# setmodmap "SEMITEK USB-HID Gaming Keyboard" - -setlayout "Dierya DK61 Keyboard" us -# setmodmap "Dierya DK61 Keyboard" - -setlayout "ZSA Technology Labs ErgoDox EZ" us - -setxkbmap -option "caps:escape" -xset r rate 250 30 -xmodmap ~/.config/X11/Xmodmap - -if [ "$(uname -n)" = "hercules" ]; then - xinput set-prop "ELAN1205:00 04F3:30E9 Touchpad" "libinput Tapping Enabled" 1 - xinput set-prop "ELAN1205:00 04F3:30E9 Touchpad" "libinput Natural Scrolling Enabled" 1 - ids=$(xinput --list | sed -ne '/Virtual core pointer/{:a' -e 'n;p;ba' -e '}' | grep "Kingsis Peripherals ZOWIE Gaming mouse" | sed -n 's/.*id=\([0-9]\+\).*/\1/p') - for i in $ids; do - xinput --set-prop "$i" 'libinput Accel Profile Enabled' 0, 1 - done -elif [ "$(uname -n)" = "halley2" ]; then - xinput set-prop "SynPS/2 Synaptics TouchPad" "libinput Tapping Enabled" 1 - xinput set-prop "SynPS/2 Synaptics TouchPad" "libinput Natural Scrolling Enabled" 1 -fi diff --git a/home/.local/bin/launch-polybar b/home/.local/bin/launch-polybar deleted file mode 100755 index c670e56..0000000 --- a/home/.local/bin/launch-polybar +++ /dev/null @@ -1,17 +0,0 @@ -#!/usr/bin/env sh -# shellcheck source=/dev/null -[ -r ~/.config/sh/envrc ] && . ~/.config/sh/envrc - -# Terminate already running bar instances -killall -q polybar -# If all your bars have ipc enabled, you can also use -# polybar-msg cmd quit - -# Launch bars -if command -v "xrandr" >/dev/null 2>&1; then - for m in $(xrandr --query | grep " connected" | cut -d" " -f1); do - MONITOR=$m polybar --reload mybar >>/tmp/polybar.log 2>&1 & - done -else - polybar --reload mybar & -fi diff --git a/home/.local/bin/locknpause b/home/.local/bin/locknpause deleted file mode 100755 index 0fa728e..0000000 --- a/home/.local/bin/locknpause +++ /dev/null @@ -1,4 +0,0 @@ -#!/usr/bin/env sh -playerctl pause -# i3lock-fancy -t "" -- scrot -z -o -i3lock-fancy-rapid 5 2 -e -f diff --git a/home/.local/bin/vibe b/home/.local/bin/vibe deleted file mode 100755 index b3bbd42..0000000 --- a/home/.local/bin/vibe +++ /dev/null @@ -1,15 +0,0 @@ -#!/usr/bin/env sh - -output_file=$(mktemp) -model_path="/usr/share/whisper.cpp-model-large-v3-turbo/ggml-large-v3-turbo.bin" -whisper-stream --model "$model_path" --threads 16 -f "$output_file" & -pid="$!" - -while [ ! -s "$FILE" ]; do - sleep 0.1 -done - -read -r line < "$output_file" -kill "$pid" -printf '%s' "$line" | xclip -selection clipboard -f -xdotool type "$line" |
