diff --git a/scripts/status/battery.sh b/scripts/status/battery.sh deleted file mode 100755 index 9d9a2ea..0000000 --- a/scripts/status/battery.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -# Prints all batteries, their percentage remaining and an emoji corresponding -# to charge status (🔌 for plugged up, 🔋 for discharging on battery, etc.). - -case $BUTTON in - 3) notify-send "🔋 Battery module" "🔋: discharging -🛑: not charging -♻: stagnant charge -🔌: charging -⚡: charged -❗: battery very low! -- Scroll to change adjust xbacklight." ;; - 6) "$TERMINAL" -e "$EDITOR" "$0" ;; -esac - -# acpi alternative -# acpi | sed "s/Battery [0-9]: //;s/[Dd]ischarging, /🔋/;s/[Nn]ot charging, /🛑/;s/[Cc]harging, /🔌/;s/[Uu]nknown, /♻️/;s/[Ff]ull, /⚡/;s/ \(remaining\|until charged\)//"; exit - -# Loop through all attached batteries. -for battery in /sys/class/power_supply/BAT? -do - # Get its remaining capacity and charge status. - capacity=$(cat "$battery"/capacity 2>/dev/null) || break - status=$(sed "s/[Dd]ischarging/🔋/;s/[Nn]ot charging/🛑/;s/[Cc]harging/🔌/;s/[Uu]nknown/♻️/;s/[Ff]ull/⚡/" "$battery"/status) - - # If it is discharging and 25% or less, we will add a ❗ as a warning. - [ "$capacity" -le 25 ] && [ "$status" = "🔋" ] && warn="❗" - - printf "%s%s%s%% " "$status" "$warn" "$capacity" - unset warn -done | sed 's/ *$//' diff --git a/scripts/status/clock.sh b/scripts/status/clock.sh deleted file mode 100755 index 420f3b8..0000000 --- a/scripts/status/clock.sh +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/sh - -clock=$(date '+%I') - -case "$clock" in - "00") icon="🕛" ;; - "01") icon="🕐" ;; - "02") icon="🕑" ;; - "03") icon="🕒" ;; - "04") icon="🕓" ;; - "05") icon="🕔" ;; - "06") icon="🕕" ;; - "07") icon="🕖" ;; - "08") icon="🕗" ;; - "09") icon="🕘" ;; - "10") icon="🕙" ;; - "11") icon="🕚" ;; - "12") icon="🕛" ;; -esac - -case $BUTTON in - 1) notify-send "This Month" "$(cal --color=always | sed "s/..7m//;s/..27m/<\/span><\/b>/")" && notify-send "Appointments" "$(calcurse -d3)" ;; - 2) setsid -f st -e calcurse ;; - 3) notify-send "📅 Time/date module" "\- Left click to show upcoming appointments for the next three days via \`calcurse -d3\` and show the month via \`cal\` -- Middle click opens calcurse if installed" ;; - 6) st -e nvim "$0" ;; -esac - -date "+%Y %b %d (%a) $icon%I:%M%p" diff --git a/scripts/status/internet.sh b/scripts/status/internet.sh deleted file mode 100755 index 842ad2a..0000000 --- a/scripts/status/internet.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/sh - -case $BUTTON in - 1) st -e nmtui;; - 3) notify-send "Internet module" "\- Click to connect -n: no wifi connection -w: wifi connection with quality -n: no ethernet -e: ethernet working -🔒: vpn is active -" ;; - 6) st -e nvim "$0" ;; -esac - -case "$(cat /sys/class/net/w*/operstate 2>/dev/null)" in - down) wifiicon="" ;; - up) wifiicon="$(awk '/^\s*w/ { print "", int($3 * 100 / 70) "% " }' /proc/net/wireless)" ;; -esac - -printf "%s%s%s\n" "$wifiicon" "$(sed "s/down//;s/up//" /sys/class/net/e*/operstate 2>/dev/null)" "$(sed "s/.*/🔒/" /sys/class/net/tun*/operstate 2>/dev/null)" diff --git a/scripts/status/volume.sh b/scripts/status/volume.sh deleted file mode 100755 index 59304aa..0000000 --- a/scripts/status/volume.sh +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/sh - -# Prints the current volume or 🔇 if muted. - -case $BUTTON in - 1) setsid -f st -e pulsemixer ;; - 2) pamixer -t ;; - 4) pamixer --allow-boost -i 1 ;; - 5) pamixer --allow-boost -d 1 ;; - 3) notify-send "📢 Volume module" "\- Shows volume 🔊, 🔇 if muted. -- Middle click to mute. -- Scroll to change." ;; - 6) st -e nvim "$0" ;; -esac - -[ $(pamixer --get-mute) = true ] && echo 🔇 && exit - -vol="$(pamixer --get-volume)" - -if [ "$vol" -gt "70" ]; then - icon="🔊" -elif [ "$vol" -lt "30" ]; then - icon="🔈" -else - icon="🔉" -fi - -echo "$icon$vol%" - diff --git a/scripts/xinit.sh b/scripts/xinit.sh index b6633f4..323a7f4 100755 --- a/scripts/xinit.sh +++ b/scripts/xinit.sh @@ -1,11 +1,21 @@ #!/bin/sh +lxpolkit & slstatus & dunst & setxkbmap -layout us,ru -option grp:alt_shift_toggle & xbanish & xrdb ~/.Xresources & -feh --bg-scale ~/walls/collections/wallhaven-wyrqg7.png & +wmname LG3D & +feh --bg-fill ~/walls/current.png & picom --experimental-backends & xautolock -time 5 -locker slock.sh & brightnessctl set 100% & +wmname LG3D & +emacs --daemon & +eval $(gnome-keyring-daemon --start) & +export SSH_AUTH_SOCK & +#killall pulseaudio +~/scripts/start-jack.sh & +cadence & +mount ~/nextcloud &