summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkrolyxon <krolyxon@tutanota.com>2023-03-21 21:47:27 +0530
committerkrolyxon <krolyxon@tutanota.com>2023-03-21 21:47:27 +0530
commitc866ba828c2b65feec1a05863682dd78bf5d5af7 (patch)
tree187b8dafd6312959e5f2fece7b03c8a5086eef9b
parent88bcaeb8b87ec78953c0633a5519dfd2e50af8aa (diff)
switch to dwmblocks
-rw-r--r--.config/x11/xinitrc4
-rwxr-xr-x.local/bin/sb-music19
-rwxr-xr-x.local/bin/sbar84
-rwxr-xr-x.local/bin/statusbar/sb-clock2
-rwxr-xr-x.local/bin/statusbar/sb-memory2
-rwxr-xr-x.local/bin/statusbar/sb-mpdup (renamed from .local/bin/sb-mpdup)2
-rwxr-xr-x.local/bin/statusbar/sb-music11
-rwxr-xr-x.local/bin/statusbar/sb-volume2
-rw-r--r--.local/share/vocab/words.txt12
9 files changed, 31 insertions, 107 deletions
diff --git a/.config/x11/xinitrc b/.config/x11/xinitrc
index cfe01da..d68b371 100644
--- a/.config/x11/xinitrc
+++ b/.config/x11/xinitrc
@@ -5,7 +5,7 @@ xwallpaper --zoom ~/.local/share/wallpaper.jpg &
xcompmgr &
xset r rate 300 50
unclutter &
-sbar &
+dwmblocks &
dunst &
-# exec dwm > /dev/null 2>&1
+# exec dwm > /dev/null 2>&1
while type dwm > /dev/null ; do dwm && continue || break ; done
diff --git a/.local/bin/sb-music b/.local/bin/sb-music
deleted file mode 100755
index 7ea7032..0000000
--- a/.local/bin/sb-music
+++ /dev/null
@@ -1,19 +0,0 @@
-#!/bin/sh
-
-filter() { mpc | sed "/^volume:/d;s/\\&/&amp;/g;s/\\[paused\\].*/⏸/g;/\\[playing\\].*/d;/^ERROR/Q" | paste -sd ' ' -;}
-
-pidof -x sb-mpdup >/dev/null 2>&1 || sb-mpdup >/dev/null 2>&1 &
-
-case $BLOCK_BUTTON in
- 1) mpc status | filter ; setsid -f "$TERMINAL" -e ncmpcpp ;; # right click, pause/unpause
- 2) mpc toggle | filter ;; # right click, pause/unpause
- 3) mpc status | filter ; notify-send "🎵 Music module" "\- Shows mpd song playing.
-- ⏸ when paused.
-- Left click opens ncmpcpp.
-- Middle click pauses.
-- Scroll changes track.";; # right click, pause/unpause
- 4) mpc prev | filter ;; # scroll up, previous
- 5) mpc next | filter ;; # scroll down, next
- 6) mpc status | filter ; "$TERMINAL" -e "$EDITOR" "$0" ;;
- *) mpc status | filter ;;
-esac
diff --git a/.local/bin/sbar b/.local/bin/sbar
deleted file mode 100755
index cd32308..0000000
--- a/.local/bin/sbar
+++ /dev/null
@@ -1,84 +0,0 @@
-#!/bin/env sh
-
-# INIT
-printf "$$" > ~/.cache/pidofbar
-sec=0
-
-# MODULES
-update_cpu () {
- cpu=" $(grep -o "^[^ ]*" /proc/loadavg )"
-}
-
-update_memory () {
- memory=" $(free -h --si | sed -n "2s/\([^ ]* *\)\{2\}\([^ ]*\).*/\2/p")"
-}
-
-update_time () {
- time="$(date "+[  %a %d %b ] [  %I:%M %P ]")"
-}
-
-update_music () {
- # music="[ $(sb-music) ] "
- if [ -z "$(sb-music)" ]; then
- music=""
- else
- music="[ $(sb-music) ] "
- fi
-}
-
-# update_bat () {
-# # you might need to change the path depending on your device
-# read -r bat_status </sys/class/power_supply/BAT1/status
-# read -r bat_capacity </sys/class/power_supply/BAT1/capacity
-# bat="$bat_status $bat_capacity%"
-# }
-
-update_vol () {
- vol="$([ "$(pamixer --get-mute)" = "false" ] && printf ' ' || printf ' ')$(pamixer --get-volume)%"
-}
-
-# For calcurse users, refer https://github.com/pystardust/automeet
-#update_event () {
-# event="$(calcurse -n | sed 1d | \
-# sed -E "s_^ *\[(.*):(.*)\] ([^\t]*)\t?.*_[\1h \2m->\3]_")"
-# [ "[]" = "$event" ] && event=""
-#}
-
-
-# modules that don't update on their own need to be run at the start for getting their initial value
-# update_vol
-
-display () {
- #printf "%s\n" " $event [$memory $cpu] [$bat] [$backlight] [$vol] $time "
- xsetroot -name "$music[ $vol ] [ $memory $cpu ] $time "
-}
-
-# SIGNALLING
-# trap "<function>;display" "RTMIN+n"
-trap "update_vol;display" "RTMIN"
-trap "update_music;display" "RTMIN+10"
-# trap "update_bat;display" "RTMIN+2"
-# to update it from external commands
-## kill -m "$(cat ~/.cache/pidofbar)"
-# where m = 34 + n
-
-while true
-do
- sleep 1 & wait && {
- # to update item ever n seconds with a offset of m
- ## [ $((sec % n)) -eq m ] && udpate_item
- [ $((sec % 5 )) -eq 0 ] && update_time # update time every 5 seconds
- [ $((sec % 5 )) -eq 0 ] && update_vol # update vol every 5 seconds
- [ $((sec % 5 )) -eq 0 ] && update_music # update music every 5 seconds
- [ $((sec % 5)) -eq 0 ] && update_cpu # update cpu every 15 seconds
- [ $((sec % 5)) -eq 0 ] && update_memory
- # [ $((sec % 60)) -eq 0 ] && update_bat
- #[ $((sec % 300)) -eq 1 ] && update_event
-
- # how often the display updates ( 5 seconds )
- [ $((sec % 5 )) -eq 0 ] && display
- sec=$((sec + 1))
- }
-done
-
-
diff --git a/.local/bin/statusbar/sb-clock b/.local/bin/statusbar/sb-clock
new file mode 100755
index 0000000..a7d7b0e
--- /dev/null
+++ b/.local/bin/statusbar/sb-clock
@@ -0,0 +1,2 @@
+#!/bin/sh
+echo "$(date "+[  %a %d %b ] [  %I:%M %P ]")"
diff --git a/.local/bin/statusbar/sb-memory b/.local/bin/statusbar/sb-memory
new file mode 100755
index 0000000..3e78a22
--- /dev/null
+++ b/.local/bin/statusbar/sb-memory
@@ -0,0 +1,2 @@
+#!/bin/sh
+echo "[  $(free --mebi | sed -n '2{p;q}' | awk '{printf ("%2.2fGiB", ( $3 / 1024), ($2 / 1024))}') $(sensors | awk '/Core 0/ {print " " $3}') ]"
diff --git a/.local/bin/sb-mpdup b/.local/bin/statusbar/sb-mpdup
index f67663a..770d44d 100755
--- a/.local/bin/sb-mpdup
+++ b/.local/bin/statusbar/sb-mpdup
@@ -4,5 +4,5 @@
# music player's status. mpd must be running on X's start for this to work.
while : ; do
- mpc idle >/dev/null && kill -44 $(cat ~/.cache/pidofbar) || break
+ mpc idle >/dev/null && kill -45 $(pidof dwmblocks) || break
done
diff --git a/.local/bin/statusbar/sb-music b/.local/bin/statusbar/sb-music
new file mode 100755
index 0000000..0a8e0ca
--- /dev/null
+++ b/.local/bin/statusbar/sb-music
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+filter() { mpc | sed "/^volume:/d;s/\\&/&amp;/g;s/\\[paused\\].*/⏸/g;/\\[playing\\].*/d;/^ERROR/Q" | paste -sd ' ' -;}
+
+pidof -x sb-mpdup >/dev/null 2>&1 || sb-mpdup >/dev/null 2>&1 &
+
+if [ -z "$(filter)" ]; then
+ echo ""
+else
+ echo "[ $(filter) ]"
+fi
diff --git a/.local/bin/statusbar/sb-volume b/.local/bin/statusbar/sb-volume
new file mode 100755
index 0000000..eefed94
--- /dev/null
+++ b/.local/bin/statusbar/sb-volume
@@ -0,0 +1,2 @@
+#!/bin/sh
+echo [ "$([ "$(pamixer --get-mute)" = "false" ] && printf ' ' || printf ' ')$(pamixer --get-volume)%" ]
diff --git a/.local/share/vocab/words.txt b/.local/share/vocab/words.txt
index 323d119..16ee378 100644
--- a/.local/share/vocab/words.txt
+++ b/.local/share/vocab/words.txt
@@ -91,7 +91,7 @@ eerie -> strange and frightening
prepend -> add (something) to the beginning of something else
notion -> a conception of or belief about something
robust -> strong and healthy
-mundane ->
+mundane ->
mundane -> lacking interest or excietement; dull.
inevitable -> certain to happen; unavoidable.
postulate -> suggest or assume the existence, fact, or truth of something as a basis for reasoning, discussion or belief.
@@ -103,3 +103,13 @@ ardent -> very enthusiastic or passionate.
absolute -> existing independently and not in relation to other things
reciprocal (mathematics) -> a multiplicative invers
intuitive -> easy to use and understand.
+ubiquitous -> found everywhere, present or appearing.
+poofta -> a man who is considered effiminate or homosexual
+camouflage -> it is the use of any combination of materials to either make objects hard to see or by disguising them as someting else.
+aisle -> a passage between rows of seats in a building such as a curch or theatre, an aircraft or train.
+ensemble -> a group of items viewed as a whole rather than individually.
+traverse -> travel across or through, "he traversed the forest"
+fiend -> an evil spirit or demon
+contiguous -> sharing a common border; touching.
+transgression -> an act that goes against a law, rule, or code of conduct.
+onosecond -> its the fraction of time before one realizes that they have made a crucial mistake after the mistake was made