home
/
code
/
khome.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
55b6848
)
Centralize wallpaper-related filenames in lib/login_variables.sh
author
Siraaj Khandkar
<siraaj@khandkar.net>
Sun, 23 Jan 2022 21:11:39 +0000
(16:11 -0500)
committer
Siraaj Khandkar
<siraaj@khandkar.net>
Sun, 23 Jan 2022 21:11:39 +0000
(16:11 -0500)
home/.xlaunch.d/background
patch
|
blob
|
blame
|
history
home/bin/wallpaper_fav
patch
|
blob
|
blame
|
history
home/bin/wallpaper_select
patch
|
blob
|
blame
|
history
home/lib/login_variables.sh
patch
|
blob
|
blame
|
history
diff --git
a/home/.xlaunch.d/background
b/home/.xlaunch.d/background
index
629c4cd
..
ab4c301
100755
(executable)
--- a/
home/.xlaunch.d/background
+++ b/
home/.xlaunch.d/background
@@
-2,10
+2,8
@@
set -e
set -e
-WALL_FILE=~/wallpaper.txt
-
BG_COLOR='#b2b2a0'
BG_COLOR='#b2b2a0'
-BG_IMAGE=$(< "$
WALL_FILE
")
+BG_IMAGE=$(< "$
FILE_WALLPAPER_CURR
")
#xsetroot -solid "$BG_COLOR"
hsetroot -solid "$BG_COLOR" # Because xsetroot is incompatible with compton.
#xsetroot -solid "$BG_COLOR"
hsetroot -solid "$BG_COLOR" # Because xsetroot is incompatible with compton.
diff --git
a/home/bin/wallpaper_fav
b/home/bin/wallpaper_fav
index
e2de403
..
702cd9f
100755
(executable)
--- a/
home/bin/wallpaper_fav
+++ b/
home/bin/wallpaper_fav
@@
-2,7
+2,5
@@
set -e
set -e
-FAVS_FILE=~/fav-wallpapers.txt
-
-awk 'NR == 2 {sub("^" $1 " +" $2 " +" $3 " +", ""); print}' ~/.fehbg | xargs sha256sum >> "$FAVS_FILE"
-sort -u "$FAVS_FILE" | sponge "$FAVS_FILE"
+awk 'NR == 2 {sub("^" $1 " +" $2 " +" $3 " +", ""); print}' ~/.fehbg | xargs sha256sum >> "$FILE_WALLPAPER_FAVS"
+sort -u "$FILE_WALLPAPER_FAVS" | sponge "$FILE_WALLPAPER_FAVS"
diff --git
a/home/bin/wallpaper_select
b/home/bin/wallpaper_select
index
40bb4ca
..
257fd9f
100755
(executable)
--- a/
home/bin/wallpaper_select
+++ b/
home/bin/wallpaper_select
@@
-2,8
+2,5
@@
set -euo pipefail
set -euo pipefail
-WALL_FILE=~/wallpaper.txt
-FAVS_FILE=~/wallpaper_favs.txt # TODO Centralize in lib/vars
-
-sort -k 2 "$FAVS_FILE" | khomenu -l 50 | awk '{sub("^" $1 " +", ""); print}' > "$WALL_FILE"
+sort -k 2 "$FILE_WALLPAPER_FAVS" | khomenu -l 50 | awk '{sub("^" $1 " +", ""); print}' > "$FILE_WALLPAPER_CURR"
~/.xlaunch.d/background
~/.xlaunch.d/background
diff --git
a/home/lib/login_variables.sh
b/home/lib/login_variables.sh
index
fe0d1cf
..
9abb8af
100644
(file)
--- a/
home/lib/login_variables.sh
+++ b/
home/lib/login_variables.sh
@@
-19,6
+19,8
@@
env | grep ^DIR_ | awk -F= '{print $2}' | xargs -I% mkdir -p '%'
### FILEs ###
export FILE_LOG_MPD="$DIR_LOG_MPD/mpd.log"
export FILE_VIDEO_CATALOG="$DIR_VIDEO/catalog"
### FILEs ###
export FILE_LOG_MPD="$DIR_LOG_MPD/mpd.log"
export FILE_VIDEO_CATALOG="$DIR_VIDEO/catalog"
+export FILE_WALLPAPER_CURR="$HOME/wallpaper_curr.txt"
+export FILE_WALLPAPER_FAVS="$HOME/wallpaper_favs.txt"
# .Net Core
#DOTNET_ROOT_path=$(which dotnet)
# .Net Core
#DOTNET_ROOT_path=$(which dotnet)
This page took
0.034908 seconds
and
4
git commands to generate.