diff options
| author | Josh Rahm <joshuarahm@gmail.com> | 2022-03-18 21:23:28 -0600 |
|---|---|---|
| committer | Josh Rahm <joshuarahm@gmail.com> | 2022-03-18 21:23:28 -0600 |
| commit | 9118fc86df893f92a14d5ec4d82d052253a450b0 (patch) | |
| tree | ad1277c42eef73aaf6208713520b52e332fb29ab /extras | |
| parent | d3354e4a7099bd7b70973a66b836ba4f63b60bd6 (diff) | |
| parent | a87cbc7357566b26c7dca7538d4b03da5f8b999a (diff) | |
| download | rde-9118fc86df893f92a14d5ec4d82d052253a450b0.tar.gz rde-9118fc86df893f92a14d5ec4d82d052253a450b0.tar.bz2 rde-9118fc86df893f92a14d5ec4d82d052253a450b0.zip | |
Merge branch 'v017' of josher.dev:rde into v017
Diffstat (limited to 'extras')
| -rwxr-xr-x | extras/HOME/.local/bin/emoticon-select.sh | 3 | ||||
| -rwxr-xr-x | extras/HOME/.local/bin/library-view.sh | 7 | ||||
| -rw-r--r-- | extras/HOME/.xmobarrc | 10 | ||||
| -rw-r--r-- | extras/HOME/.xmonad/emoticons.txt | 1 | ||||
| -rwxr-xr-x | extras/HOME/.xmonad/xmobar-bluetooth | 24 | ||||
| -rwxr-xr-x | extras/HOME/.xmonad/xmobar-media | 9 | ||||
| -rwxr-xr-x | extras/HOME/.xmonad/xmobar-weather | 46 |
7 files changed, 54 insertions, 46 deletions
diff --git a/extras/HOME/.local/bin/emoticon-select.sh b/extras/HOME/.local/bin/emoticon-select.sh index e1637d1..5674e44 100755 --- a/extras/HOME/.local/bin/emoticon-select.sh +++ b/extras/HOME/.local/bin/emoticon-select.sh @@ -11,7 +11,6 @@ else fi -selection="$("${menu[@]}" < $HOME/.xmonad/emoticons.txt)" -emoticon="$(echo ${selection/*-})" +emoticon="$("${menu[@]}" < $HOME/.xmonad/emoticons.txt | sed 's#^[^-]*-\s*##')" echo "$emoticon" | xclip -selection clipboard diff --git a/extras/HOME/.local/bin/library-view.sh b/extras/HOME/.local/bin/library-view.sh index 29925a8..b2c5dd5 100755 --- a/extras/HOME/.local/bin/library-view.sh +++ b/extras/HOME/.local/bin/library-view.sh @@ -13,10 +13,9 @@ fi cd ~/Library -files=(*.pdf) - -file_with_title="$(for file in "${files[@]}" ; do - echo "$file| $(echo "$file" | sed 's#\(^\|_\|\s\)\([a-z]\)#\1\U\2#g' | tr '_' ' ' | sed 's/.[^.]*$//')" +file_with_title="$(find . -name '*.pdf' | while read file ; do + echo "$file| $(echo "$file" | sed \ + 's#\(^\|_\|\s\)\([a-z]\)#\1\U\2#g;s/\.[^.]*$//;s#^\(.*\)/\([^/]*\)$#\2 (\1)#' | tr '_' ' ')" done)" selected=$(echo "$file_with_title" | (while read file ; do diff --git a/extras/HOME/.xmobarrc b/extras/HOME/.xmobarrc index cef2154..7461de8 100644 --- a/extras/HOME/.xmobarrc +++ b/extras/HOME/.xmobarrc @@ -29,16 +29,14 @@ Config , alignSep = "}{" , template = " %logo% <fc=#a0a0a0><fn=3>%uname%</fn></fc><fc=#404040> │\ - \</fc><fc=#a0a0a0> %date%</fc><fc=#404040> │ \ \</fc>%StdinReader%}\ \{ %cpu% %memory% <fc=#404040>\ \│</fc> %weather% <fc=#404040>│\ - \</fc> <fc=#a0a0a0>%mpris2%</fc> <fc=#404040>│ \ + \</fc> <fc=#a0a0a0>%media%</fc> <fc=#404040>│ \ \</fc>%bluetooth%%bat% <fc=#404040>│</fc> <fn=2><fc=#606060>%time%</fc></fn> " , commands = [ Run StdinReader, - Run Date "%H:%M:%S" "time" 10, - Run Date "<fn=3>%m/%d</fn>" "date" 10, + Run Date "%m/%d %H:%M:%S" "time" 10, Run Cpu [ "-t", "<fn=3><fc=#000000><bar></fc></fn>", "-L", "3", @@ -57,9 +55,7 @@ Config "--normal", "#88ff88", "--high", "#ff8888" ] 10, - Run Mpris2 "spotifyd" [ - "-t", "<fc=#1aa54b></fc> <fn=3><title></fn>", - "--nastring", "<fc=#404040> </fc>"] 20, + Run Com ".xmonad/xmobar-media" [] "media" 20, Run Com ".xmonad/xmobar-weather" [] "weather" 9000, Run Com ".xmonad/xmobar-logo" [] "logo" 0, Run Com "uname" ["-r"] "uname" 0, diff --git a/extras/HOME/.xmonad/emoticons.txt b/extras/HOME/.xmonad/emoticons.txt index 65289c4..f919a81 100644 --- a/extras/HOME/.xmonad/emoticons.txt +++ b/extras/HOME/.xmonad/emoticons.txt @@ -1,5 +1,6 @@ Bear - (''')(0.0)(''') Cry - ಥ_ಥ +Cry - ಥ︵ಥ Deal with it - (•_•) ( •_•)>⌐■-■ (⌐■_■) Deal with it. - (▀̿Ĺ̯▀̿ ̿) Disapprove - ಠ_ಠ diff --git a/extras/HOME/.xmonad/xmobar-bluetooth b/extras/HOME/.xmonad/xmobar-bluetooth index 9b4f5cc..16a6d70 100755 --- a/extras/HOME/.xmonad/xmobar-bluetooth +++ b/extras/HOME/.xmonad/xmobar-bluetooth @@ -2,17 +2,21 @@ cur="" -bluetoothctl -- info | while read line ; do - key=${line%%: *} - value=${line//*: } +if [ -d /sys/class/bluetooth ] ; then - if [ "$key" == "Name" ] ; then - cur="$value" - fi + bluetoothctl -- info | while read line ; do + key=${line%%: *} + value=${line//*: } - if [ "$key" == "Connected" -a "$value" == "yes" ] ; then - exec echo "<fc=#4287f5></fc> <fc=#a0a0a0><fn=3>$cur</fn></fc> <fc=#404040>│</fc> " - fi -done + if [ "$key" == "Name" ] ; then + cur="$value" + fi + + if [ "$key" == "Connected" -a "$value" == "yes" ] ; then + exec echo "<fc=#4287f5></fc> <fc=#a0a0a0><fn=3>$cur</fn></fc> <fc=#404040>│</fc> " + fi + done + +fi exec echo "<fc=#404040></fc> <fc=#404040>│</fc> " diff --git a/extras/HOME/.xmonad/xmobar-media b/extras/HOME/.xmonad/xmobar-media new file mode 100755 index 0000000..7232900 --- /dev/null +++ b/extras/HOME/.xmonad/xmobar-media @@ -0,0 +1,9 @@ +#!/bin/bash + +title="$(spotify-control getTitle)" + +if [[ "$?" -eq 0 ]] ; then + echo "<fc=#1aa54b></fc> <fn=3>$title</fn>" +else + echo "<fc=#404040> </fc>" +fi diff --git a/extras/HOME/.xmonad/xmobar-weather b/extras/HOME/.xmonad/xmobar-weather index 6b5c409..0fee524 100755 --- a/extras/HOME/.xmonad/xmobar-weather +++ b/extras/HOME/.xmonad/xmobar-weather @@ -69,30 +69,30 @@ if ($current_str gt $sunrise_str and $current_str lt $sunset_str) { $dir=%directions{$wind_direction}; %conditions_day = ( - clear => "<fc=#ddcf04>", - sunny => "<fc=#ddcf04>", - mostly_clear => "<fc=#00a3c4>", - mostly_sunny => "<fc=#ddcf04>", - partly_sunny => "<fc=#ddcf04>", - fair => "<fc=#a0a0a0>🌑", - cloudy =>"<fc=#a0a0a0>摒", - overcast =>"<fc=#808080>", - partly_cloudy => "<fc=#a0a0a0>杖", - mostly_cloudy => "<fc=#808080>", - considerable_cloudiness => "<fc=#a0a0a0>ﭽ" ); + clear => "<fc=#ddcf04></fc>", + sunny => "<fc=#ddcf04></fc>", + mostly_clear => "<fc=#00a3c4></fc>", + mostly_sunny => "<fc=#ddcf04></fc>", + partly_sunny => "<fc=#ddcf04></fc>", + fair => "<fc=#a0a0a0>🌑</fc>", + cloudy =>"<fc=#a0a0a0>摒</fc>", + overcast =>"<fc=#808080></fc>", + partly_cloudy => "<fc=#a0a0a0>杖</fc>", + mostly_cloudy => "<fc=#808080></fc>", + considerable_cloudiness => "<fc=#a0a0a0>ﭽ</fc>" ); %conditions_night = ( - clear => "<fc=#00a3c4>", - sunny => "<fc=#00a3c4>", - mostly_clear => "<fc=#00a3c4>", - mostly_sunny => "<fc=#00a3c4>", - partly_sunny => "<fc=#00a3c4>", - fair => "<fc=#808080>🌑", - cloudy =>"<fc=#808080>摒", - overcast =>"<fc=#404040>", - partly_cloudy => "<fc=#a0a0a0>", - mostly_cloudy => "<fc=#808080>", - considerable_cloudiness => "<fc=#a0a0a0>ﭽ" ); + clear => "<fc=#00a3c4></fc>", + sunny => "<fc=#00a3c4></fc>", + mostly_clear => "<fc=#00a3c4></fc>", + mostly_sunny => "<fc=#00a3c4></fc>", + partly_sunny => "<fc=#00a3c4></fc>", + fair => "<fc=#808080>🌑</fc>", + cloudy =>"<fc=#808080>摒</fc>", + overcast =>"<fc=#404040></fc>", + partly_cloudy => "<fc=#a0a0a0></fc>", + mostly_cloudy => "<fc=#808080></fc>", + considerable_cloudiness => "<fc=#a0a0a0>ﭽ</fc>" ); if ($is_day) { $conditions = %conditions_day{$sky_conditions}; @@ -100,4 +100,4 @@ if ($is_day) { $conditions = %conditions_night{$sky_conditions}; } -printf("<fc=#a0a0a0><fn=3>$city</fn> <fn=3>$dir</fn> <fn=3>${wind_speed}</fn></fc> $conditions</fc><fn=3> <fc=#a0a0a0>%.0f°F</fc></fn>\n", $temp); +printf("<fc=#a0a0a0><fn=3>$city</fn> <fn=3>$dir</fn> <fn=3>${wind_speed}</fn></fc> $conditions<fn=3> <fc=#a0a0a0>%.0f°F</fc></fn>\n", $temp); |