diff options
author | pryazha <pryadeiniv@mail.ru> | 2025-01-01 21:33:20 +0500 |
---|---|---|
committer | pryazha <pryadeiniv@mail.ru> | 2025-01-01 21:33:20 +0500 |
commit | bf962aa998b7cebe52ea94141690475f4fdc1fe0 (patch) | |
tree | b16151214341b04d10b38b5c3566f26dd583c4fd /scripts |
initial commit
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/cpufreqchange | 3 | ||||
-rwxr-xr-x | scripts/gen_passwords | 5 | ||||
-rwxr-xr-x | scripts/maim_screenshot | 2 | ||||
-rwxr-xr-x | scripts/startdwm | 13 | ||||
-rwxr-xr-x | scripts/status-bar/sb-battery | 34 | ||||
-rwxr-xr-x | scripts/status-bar/sb-cpu | 7 | ||||
-rwxr-xr-x | scripts/status-bar/sb-date | 3 | ||||
-rwxr-xr-x | scripts/status-bar/sb-memory | 6 | ||||
-rwxr-xr-x | scripts/status-bar/sb-volume | 7 | ||||
-rwxr-xr-x | scripts/void_startdwm | 21 |
10 files changed, 101 insertions, 0 deletions
diff --git a/scripts/cpufreqchange b/scripts/cpufreqchange new file mode 100755 index 0000000..5945487 --- /dev/null +++ b/scripts/cpufreqchange @@ -0,0 +1,3 @@ +#!/bin/sh +sudo cpupower frequency-set -g performance +sudo cpupower frequency-set -u 1.40GHz diff --git a/scripts/gen_passwords b/scripts/gen_passwords new file mode 100755 index 0000000..bb7f016 --- /dev/null +++ b/scripts/gen_passwords @@ -0,0 +1,5 @@ +#!/bin/sh + +for count in 0 1 2 3 4 ; do + echo $(tr -dc 'a-zA-Z0-9_' </dev/urandom | head -c 16) +done diff --git a/scripts/maim_screenshot b/scripts/maim_screenshot new file mode 100755 index 0000000..87b1c38 --- /dev/null +++ b/scripts/maim_screenshot @@ -0,0 +1,2 @@ +#!/bin/bash +maim -s | xclip -selection clipboard -t image/png diff --git a/scripts/startdwm b/scripts/startdwm new file mode 100755 index 0000000..42b9a78 --- /dev/null +++ b/scripts/startdwm @@ -0,0 +1,13 @@ +#!/bin/sh +#feh --bg-scale /home/pryazha/pictures/wallpapers/cat_sleep.jpg +feh --bg-scale /home/pryazha/pictures/wallpapers/cowboy_bebop.png +xinput set-prop "Logitech G102 LIGHTSYNC Gaming Mouse" "libinput Accel Profile Enabled" 0 1 0 +xinput set-prop "ELAN071A:00 04F3:30FD Touchpad" "libinput Tapping Enabled" 1 +xinput set-prop "ELAN071A:00 04F3:30FD Touchpad" "libinput Natural Scrolling Enabled" 1 +setxkbmap us,ru -option "grp:lctrl_lwin_toggle" +setxkbmap -option "caps:ctrl_modifier" +xset r rate 200 25 +dunst & +dwmblocks & + +dwm 2> ~/.dwm.log diff --git a/scripts/status-bar/sb-battery b/scripts/status-bar/sb-battery new file mode 100755 index 0000000..ae59416 --- /dev/null +++ b/scripts/status-bar/sb-battery @@ -0,0 +1,34 @@ +#!/bin/sh + +for battery in /sys/class/power_supply/BAT?*; do + # If non-first battery, print a space separator. + [ -n "${capacity+x}" ] && printf " " + + capacity="$(cat "$battery/capacity" 2>&1)" + if [ "$capacity" -gt 90 ]; then + status=" " + elif [ "$capacity" -gt 60 ]; then + status=" " + elif [ "$capacity" -gt 40 ]; then + status=" " + elif [ "$capacity" -gt 10 ]; then + status=" " + else + status=" " + fi + + case "$(cat "$battery/status" 2>&1)" in + Full) status=" " ;; + Discharging) + if [ "$capacity" -le 20 ]; then + status="$status" + fi + ;; + Charging) status="$status" ;; + "Not charging") status=" " ;; + Unknown) status="? $status" ;; + *) exit 1 ;; + esac + + echo "$status$capacity%" +done diff --git a/scripts/status-bar/sb-cpu b/scripts/status-bar/sb-cpu new file mode 100755 index 0000000..a83b541 --- /dev/null +++ b/scripts/status-bar/sb-cpu @@ -0,0 +1,7 @@ +#!/bin/sh + +case "$BLOCK_BUTTON" in + 1) setsid --fork cpupower-gui ;; +esac + +echo " $(cat /sys/class/thermal/thermal_zone0/temp | cut -b 1,2)" diff --git a/scripts/status-bar/sb-date b/scripts/status-bar/sb-date new file mode 100755 index 0000000..0420109 --- /dev/null +++ b/scripts/status-bar/sb-date @@ -0,0 +1,3 @@ +#!/bin/sh + +echo " $(date '+%H:%M')" diff --git a/scripts/status-bar/sb-memory b/scripts/status-bar/sb-memory new file mode 100755 index 0000000..e45325e --- /dev/null +++ b/scripts/status-bar/sb-memory @@ -0,0 +1,6 @@ +#!/bin/sh + +free_mib="$(free --mebi | grep '^Mem:' | tr -s ' ' | cut -d' ' -f3)" +free_gib="$(echo "scale=2; $free_mib / 1024" | bc)" + +echo " $(printf "%.2f" "$free_gib")G" diff --git a/scripts/status-bar/sb-volume b/scripts/status-bar/sb-volume new file mode 100755 index 0000000..2bd20ba --- /dev/null +++ b/scripts/status-bar/sb-volume @@ -0,0 +1,7 @@ +#!/bin/sh + +case "$BLOCK_BUTTON" in + 1) setsid --fork pavucontrol ;; +esac + +echo $(awk '{ print $2 }' <(wpctl get-volume @DEFAULT_AUDIO_SINK@) | cut -c 3,4)% diff --git a/scripts/void_startdwm b/scripts/void_startdwm new file mode 100755 index 0000000..b16fc7f --- /dev/null +++ b/scripts/void_startdwm @@ -0,0 +1,21 @@ +#!/bin/sh +xrandr --output eDP --mode 1920x1080 --primary --output HDMI-A-0 --mode 1920x1080 --left-of eDP +feh --bg-scale /home/pryazha/pictures/wallpapers/purple_miku.png +xinput set-prop "Logitech G102 LIGHTSYNC Gaming Mouse" "libinput Accel Profile Enabled" 0 1 0 +setxkbmap us,ru -option "grp:lctrl_lwin_toggle" +setxkbmap -option "caps:ctrl_modifier" +xset r rate 200 25 + +dunst & +# dwmblocks & +slstatus & + +pkill pipewire +pkill pipewire-pulse + +pipewire & +pipewire-pulse & + +wireplumber & + +dbus-run-session dwm 2> ~/.dwm.log |