dotfiles

configuration files for shell, text editor, graphical environment, etc.
git clone git://src.adamsgaard.dk/dotfiles
Log | Files | Refs | README | LICENSE Back to index

commit 3cc2776ea2ce3a65b7212a7c2cf3ef424c648d18
parent d8192d5491bea7655bf773df27cfdb07466cfb3e
Author: Anders Damsgaard <anders@adamsgaard.dk>
Date:   Sat, 15 Dec 2018 11:55:48 +0100

Update status bar

Diffstat:
Mlinks/.config/i3/config | 2++
Mlinks/.config/i3/i3blocks | 16++++++++--------
Mlinks/.config/i3/i3scripts/i3cpu | 3++-
Mlinks/.config/i3/i3scripts/i3internet | 2+-
Mlinks/bin/wallpaper.sh | 19++++++++++++-------
5 files changed, 25 insertions(+), 17 deletions(-)

diff --git a/links/.config/i3/config b/links/.config/i3/config @@ -58,11 +58,13 @@ bindsym Control+Shift+s exec --no-startup-id mpc -h localhost stop && pkill -RTM # configure displays bindsym $mod+Shift+d exec --no-startup-id bash /home/ad/code/dotfiles/bin/xrandr-auto.sh +bindsym XF86Display exec --no-startup-id bash /home/ad/code/dotfiles/bin/xrandr-auto.sh bindsym $mod+Shift+a exec --no-startup-id bash /home/ad/bin/wallpaper.sh && xrandr --auto # screen lock bindsym $mod+z exec /home/ad/bin/zzz bindsym $mod+x exec /home/ad/bin/xlock +bindsym XF86ScreenSaver exec /home/ad/bin/xlock # kill focused window bindsym $mod+Shift+q kill diff --git a/links/.config/i3/i3blocks b/links/.config/i3/i3blocks @@ -72,14 +72,14 @@ signal=5 # interval=30 # signal=7 -[wireless] -label=W -#instance=wlan0 -instance=wlp3s0 -command=/usr/lib/i3blocks/wifi -color=#00FF00 -interval=10 -signal=8 +# [wireless] +# label=W +# #instance=wlan0 +# instance=wlp3s0 +# command=/usr/lib/i3blocks/wifi +# color=#00FF00 +# interval=10 +# signal=8 [ethernet] label=E diff --git a/links/.config/i3/i3scripts/i3cpu b/links/.config/i3/i3scripts/i3cpu @@ -9,4 +9,5 @@ $(ps axch -o cmd:15,%cpu --sort=-%cpu | head)" ;; - % is of single core." ;; esac -sensors | awk '/^temp1/ {print $2}' +echo -n $(sensors | awk '/^temp1/ {print $2}') +cat /proc/loadavg | awk '{print " ยท " $1}' diff --git a/links/.config/i3/i3scripts/i3internet b/links/.config/i3/i3scripts/i3internet @@ -13,6 +13,6 @@ esac [ "$(cat /sys/class/net/w*/operstate)" = 'down' ] && wifiicon="๐Ÿ“ก" -[ ! -n "${wifiicon+var}" ] && wifiicon=$(grep "^\s*w" /proc/net/wireless | awk '{ print "๐Ÿ“ถ", int($3 * 100 / 70) "%" }') +[ ! -n "${wifiicon+var}" ] && wifiicon=$(grep "^\s*w" /proc/net/wireless | awk '{ print "๐Ÿ“ถ", int($3 * 100 / 70) "% " }') printf "%s%s" "$wifiicon" "$(cat /sys/class/net/e*/operstate | sed "s/down/โŽ/;s/up/๐ŸŒ/")" diff --git a/links/bin/wallpaper.sh b/links/bin/wallpaper.sh @@ -4,16 +4,21 @@ #hsetroot -fill ~/wallpapers/polygon-art-17498.jpg #hsetroot -fill ~/photos/wallpapers/current_wallpapers/overdeepenings-Edit-Edit.jpg +statusfile=~/.wallpaper + function set_wallpaper { feh --bg-scale "$1" - echo "$1" > ~/.wallpaper + echo "$1" > $statusfile } -function get_next_wallpaper_in_dir { - wallpapers="ls '$1'/*.{jpg,JPG,jpeg,JPEG,png,PNG}" - return wallpapers[1] +function get_wallpapers_in_dir { + wallpapers=$(find $1/*.{jpg,JPG,jpeg,JPEG,png,PNG,tif,TIF,tiff,TIFF} -type f) + echo $wallpapers } -dir="~/photos/wallpapers/google_earth" -wallpaper=get_next_wallpaper_in_dir "$dir" -set_wallpaper= +dir="$HOME/photos/wallpapers/google_earth/" +current_wallpaper=$(cat $statusfile) +get_wallpapers_in_dir "$dir" +#wallpaper=$(get_next_wallpaper_in_dir "$dir") +#wallpaper=get_next_wallpaper_in_dir "$dir" +set_wallpaper $wallpaper