diff options
| author | Sebastiano Tronto <sebastiano@tronto.net> | 2023-06-19 08:25:41 +0200 |
|---|---|---|
| committer | Sebastiano Tronto <sebastiano@tronto.net> | 2023-06-19 08:25:41 +0200 |
| commit | dc98cba24cb5f1f3e260c49fc61add4a113a1df0 (patch) | |
| tree | 2f5b996f57a2e332884849e7d29fdadf5c698382 | |
| parent | af05c6c366ce928818848a3d8c897e7c52ae9d0f (diff) | |
| download | scripts-dc98cba24cb5f1f3e260c49fc61add4a113a1df0.tar.gz scripts-dc98cba24cb5f1f3e260c49fc61add4a113a1df0.zip | |
Update to status (now I use a statusbar)
| -rw-r--r-- | Makefile | 5 | ||||
| -rwxr-xr-x | old/brightness (renamed from brightness) | 0 | ||||
| -rwxr-xr-x | old/notify-status (renamed from notify-status) | 0 | ||||
| -rwxr-xr-x | old/togglemute (renamed from togglemute) | 0 | ||||
| -rwxr-xr-x | old/volume (renamed from volume) | 0 | ||||
| -rwxr-xr-x | status | 10 | ||||
| -rwxr-xr-x | xroot-update | 8 |
7 files changed, 17 insertions, 6 deletions
| @@ -3,7 +3,6 @@ PREFIX = /usr/local | |||
| 3 | SCRIPTS = addressgrep \ | 3 | SCRIPTS = addressgrep \ |
| 4 | battery-checknow \ | 4 | battery-checknow \ |
| 5 | battery-status \ | 5 | battery-status \ |
| 6 | brightness \ | ||
| 7 | clip \ | 6 | clip \ |
| 8 | config-backup \ | 7 | config-backup \ |
| 9 | cth \ | 8 | cth \ |
| @@ -19,7 +18,6 @@ SCRIPTS = addressgrep \ | |||
| 19 | ffmpeg-facecam \ | 18 | ffmpeg-facecam \ |
| 20 | mail-compose \ | 19 | mail-compose \ |
| 21 | mergepdf \ | 20 | mergepdf \ |
| 22 | notify-status \ | ||
| 23 | open-file \ | 21 | open-file \ |
| 24 | open-stdin \ | 22 | open-stdin \ |
| 25 | open-url \ | 23 | open-url \ |
| @@ -35,17 +33,16 @@ SCRIPTS = addressgrep \ | |||
| 35 | templess \ | 33 | templess \ |
| 36 | terminal \ | 34 | terminal \ |
| 37 | theme \ | 35 | theme \ |
| 38 | togglemute \ | ||
| 39 | translate \ | 36 | translate \ |
| 40 | trash \ | 37 | trash \ |
| 41 | urlgrep \ | 38 | urlgrep \ |
| 42 | virename \ | 39 | virename \ |
| 43 | volume \ | ||
| 44 | websearch \ | 40 | websearch \ |
| 45 | xedit \ | 41 | xedit \ |
| 46 | xedit-filter \ | 42 | xedit-filter \ |
| 47 | xplumb \ | 43 | xplumb \ |
| 48 | xprop-active-window-id \ | 44 | xprop-active-window-id \ |
| 45 | xroot-update \ | ||
| 49 | xwallpaper-random-notify | 46 | xwallpaper-random-notify |
| 50 | 47 | ||
| 51 | all: install | 48 | all: install |
diff --git a/brightness b/old/brightness index a7294fb..a7294fb 100755 --- a/brightness +++ b/old/brightness | |||
diff --git a/notify-status b/old/notify-status index 73a9435..73a9435 100755 --- a/notify-status +++ b/old/notify-status | |||
diff --git a/togglemute b/old/togglemute index b799b02..b799b02 100755 --- a/togglemute +++ b/old/togglemute | |||
| @@ -10,9 +10,15 @@ | |||
| 10 | 10 | ||
| 11 | sep=${1:-" | "} | 11 | sep=${1:-" | "} |
| 12 | 12 | ||
| 13 | time=$(date +"%H:%M:%S") | 13 | time=$(date +"%H:%M") |
| 14 | date=$(date +"%d %B %Y, %A") | 14 | date=$(date +"%d %B %Y, %A") |
| 15 | 15 | ||
| 16 | if [ "$(pulsemixer --get-mute)" -eq 1 ]; then | ||
| 17 | volume="Audio muted" | ||
| 18 | else | ||
| 19 | volume="Volume: $(pulsemixer --get-volume | awk '{print $1}')%%" | ||
| 20 | fi | ||
| 21 | |||
| 16 | bat="/sys/class/power_supply/BAT0" | 22 | bat="/sys/class/power_supply/BAT0" |
| 17 | if [ -d $bat ]; then | 23 | if [ -d $bat ]; then |
| 18 | battery="Battery: $(cat $bat/capacity)%% $(cat $bat/status)" | 24 | battery="Battery: $(cat $bat/capacity)%% $(cat $bat/status)" |
| @@ -28,6 +34,6 @@ network="Network: $(nmcli device status | head -n 2 | tail -n 1 | sed 's/ *$//' | |||
| 28 | 34 | ||
| 29 | events=$(sdep-list past | wc -l) | 35 | events=$(sdep-list past | wc -l) |
| 30 | 36 | ||
| 31 | printf "$time$sep$date$sep$battery$sep$network" | 37 | printf "$network$sep$volume$sep$battery$sep$date$sep$time" |
| 32 | [ "$events" != "0" ] && printf "$sep$events TODO task(s)" | 38 | [ "$events" != "0" ] && printf "$sep$events TODO task(s)" |
| 33 | printf "\n" | 39 | printf "\n" |
diff --git a/xroot-update b/xroot-update new file mode 100755 index 0000000..44ab6c1 --- /dev/null +++ b/xroot-update | |||
| @@ -0,0 +1,8 @@ | |||
| 1 | #!/bin/sh | ||
| 2 | |||
| 3 | # Updates the xroot window with info from status | ||
| 4 | # Requires: status | ||
| 5 | |||
| 6 | # Usage: xroot-update | ||
| 7 | |||
| 8 | xsetroot -name " $(status) " | ||
