From 2ee0b0614366cb0877e6f136a5fcc06c73d32034 Mon Sep 17 00:00:00 2001 From: Kevin Mok Date: Sun, 13 Jan 2019 14:14:36 -0500 Subject: [PATCH] Added random for bg-chooser when non-editing --- aliases/zsh_aliases | 2 +- configs/ranger/rc.conf | 8 ++++---- scripts/bg-chooser | 8 +++++++- txt/key_dirs.txt | 3 ++- 4 files changed, 14 insertions(+), 7 deletions(-) diff --git a/aliases/zsh_aliases b/aliases/zsh_aliases index f29bd2b..b0b26b1 100644 --- a/aliases/zsh_aliases +++ b/aliases/zsh_aliases @@ -382,7 +382,7 @@ alias hs="$spv_dir/src/update-history.sh && hlg" # function svm() { mv $1 ~/.local/share/Steam/steamapps/common/Stardew\ Valley/Mods ; } # # }}} -alias sc="cs && shellcheck" +alias sc="shellcheck" alias pdl="pdflatex" alias tcl="tex-clean" diff --git a/configs/ranger/rc.conf b/configs/ranger/rc.conf index 65205fc..f3dfbfb 100644 --- a/configs/ranger/rc.conf +++ b/configs/ranger/rc.conf @@ -674,11 +674,11 @@ map rr source ~/.config/ranger/rc.conf # backgrounds map w shell /usr/bin/wal -i %f -map bdc shell mv %f dim/editing +map bde shell mv %f dim/editing map bdn shell mv %f dim/non-editing -# map bbc shell mv %f bright/editing -# map bbn shell mv %f bright/non-editing -map bc shell mv %f editing +map bbe shell mv %f bright/editing +map bbn shell mv %f bright/non-editing +map be shell mv %f editing map bn shell mv %f non-editing # bulk rename diff --git a/scripts/bg-chooser b/scripts/bg-chooser index 4bc4fa0..6f3f93e 100755 --- a/scripts/bg-chooser +++ b/scripts/bg-chooser @@ -3,8 +3,14 @@ base_bg_path="/home/kevin/Pictures/Backgrounds" brightness_choice=$(echo -e "dim\nbright" | dmenu -i) -editing_choice=$(echo -e "editing\nnon-editing" | dmenu -i) +EDITING_CHOICES=("editing" "non-editing") +editing_choice=$(echo -e "${EDITING_CHOICES[0]}\n${EDITING_CHOICES[1]}" | dmenu -i) +if [[ "$editing_choice" = "${EDITING_CHOICES[1]}" ]]; then + rand=$(( RANDOM % 2 )) + editing_choice=${EDITING_CHOICES[$rand]} +fi bg_path="$base_bg_path/$brightness_choice/$editing_choice" wal_cmd="wal -i $bg_path" eval "$wal_cmd" +# echo "$wal_cmd" diff --git a/txt/key_dirs.txt b/txt/key_dirs.txt index e0a6611..3c25bee 100644 --- a/txt/key_dirs.txt +++ b/txt/key_dirs.txt @@ -33,7 +33,8 @@ wo /home/kevin/Documents/workout-logs/11 # sch {{{ * sc /home/kevin/school -2 /home/kevin/school/236 +8a /home/kevin/school/latex-notes/318 +8r /home/kevin/school/318 lt /home/kevin/school/latex-notes # }}} sch *