mirror of
https://github.com/tiyn/dotfiles.git
synced 2025-03-25 12:37:46 +01:00
dwmblocks/statusbar: starting to add clickable buttons
LukeSmith made a guide on how to set this up. I did it analog to him. - clock shows the calendar - internet shows nmtui
This commit is contained in:
parent
105a379ebd
commit
354c6da1b8
@ -1,8 +1,5 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
# Give a battery name (e.g. BAT0) as an argument.
|
||||
# by lukesmithxyz, checkout github.com/lukesmithxyz/voidrice
|
||||
|
||||
capacity=$(cat /sys/class/power_supply/"$1"/capacity) || exit
|
||||
time=$(acpi | awk '{ print $5 }')
|
||||
status=$(cat /sys/class/power_supply/"$1"/status)
|
||||
|
@ -1,5 +1,7 @@
|
||||
#!/bin/sh
|
||||
|
||||
# by lukesmithxyz, checkout github.com/lukesmithxyz/voidrice
|
||||
|
||||
date +" %d %b %H:%M"
|
||||
|
||||
case $BLOCK_BUTTON in
|
||||
1) notify-send "This Month" "$(cal --color=always | sed "s/..7m/<b><span color=\"red\">/;s/..27m/<\/span><\/b>/")" ;;
|
||||
esac
|
||||
|
@ -1,5 +1,3 @@
|
||||
#!/bin/sh
|
||||
|
||||
# by lukesmithxyz, checkout github.com/lukesmithxyz/voidrice
|
||||
|
||||
sensors | awk '/Core 0/ {print " " $3}'
|
||||
|
@ -2,13 +2,10 @@
|
||||
|
||||
# Status bar module for disk space
|
||||
# $1 should be drive mountpoint
|
||||
# $2 is optional icon, otherwise mountpoint will displayed
|
||||
# by lukesmithxyz, checkout github.com/lukesmithxyz/voidrice
|
||||
|
||||
disk="/"
|
||||
[ ! -z "$1" ] && disk="$1"
|
||||
|
||||
icon="$2"
|
||||
[ -z "$2" ] && icon="$disk"
|
||||
icon="$disk"
|
||||
|
||||
printf " %s %s\n" "$icon" "$(df -h "$disk" | awk ' /[0-9]/ {print $3 "/" $2}')"
|
||||
|
@ -1,9 +1,11 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
# by lukesmithxyz, checkout github.com/lukesmithxyz/voidrice
|
||||
|
||||
[ "$(cat /sys/class/net/w*/operstate)" = 'down' ] && wifiicon=""
|
||||
|
||||
[ ! -n "${wifiicon+var}" ] && wifiicon=$(grep "^\s*w" /proc/net/wireless | awk '{ print "", int($3 * 100 / 70) "%" }')
|
||||
|
||||
printf "%s %s\n" "$(cat /sys/class/net/e*/operstate | sed "s/down//;s/up//")" "$wifiicon"
|
||||
|
||||
case $BLOCK_BUTTON in
|
||||
1) $TERMINAL -e "nmtui" ;;
|
||||
esac
|
||||
|
@ -1,5 +1,3 @@
|
||||
#!/bin/sh
|
||||
|
||||
# by lukesmithxyz, checkout github.com/lukesmithxyz/voidrice
|
||||
|
||||
free -h | awk '/^Mem:/ {print " " $3 "/" $2}'
|
||||
|
@ -1,7 +1,5 @@
|
||||
#!/bin/sh
|
||||
|
||||
# by lukesmithxyz, checkout github.com/lukesmithxyz/voidrice
|
||||
|
||||
[ "$(pulsemixer --get-mute)" = "1" ] && printf "\\n" && exit
|
||||
|
||||
vol=$(pulsemixer --get-volume | awk '{print $1}')
|
||||
|
Loading…
x
Reference in New Issue
Block a user