mirror of
https://github.com/sahinakkaya/dotfiles.git
synced 2025-07-04 19:19:41 +03:00
Back up the old config
This commit is contained in:
@ -1,8 +1,12 @@
|
||||
#!/bin/bash
|
||||
|
||||
# get todays md5sum and extract first 2 chars then convert it to base 10
|
||||
todays_hash=$(date +%x | md5sum | cut -c 1-2)
|
||||
base10=$(echo "ibase=16;$todays_hash" | bc)
|
||||
randomizer=$(cat ~/.wallpaper_randomizer)
|
||||
today=$(date +%x)
|
||||
todays_hash=$(echo "$randomizer $today" | md5sum | cut -c 1-2)
|
||||
base10=$(echo $((0x$todays_hash)) | bc)
|
||||
|
||||
echo "base 10 ${base10}"
|
||||
|
||||
# calculate the index for the wallpaper set: base10 % num_of_dirs
|
||||
dirs=$(find ~/Pictures/Wallpapers/time-based/* -maxdepth 1 -type d)
|
||||
@ -32,5 +36,5 @@ set_wallpaper() {
|
||||
|
||||
}
|
||||
# if the current wallpaper is different than the previous one, set it
|
||||
[[ $(< ~/.last_wallpaper_path) != "$actual_file" ]] && set_wallpaper $actual_file
|
||||
[[ $(< ~/.last_wallpaper_path) != "$actual_file" || $1 ]] && set_wallpaper $actual_file
|
||||
echo "$actual_file" > ~/.last_wallpaper_path
|
||||
|
@ -22,6 +22,6 @@ charging=$(acpi | cut -d ' ' -f 3 | tr -d ',| ')
|
||||
# fi
|
||||
|
||||
if [[ "$batteryLevel" -le "$batteryLimit" ]] && [[ "$charging" == "Discharging" ]]; then
|
||||
/usr/bin/notify-send -a "Battery Warning" --urgency critical "Battery level at ${batteryLevel}%" -i abrt
|
||||
/usr/bin/notify-send -a "Battery Warning" --urgency critical "Battery level at ${batteryLevel}%" -i abrt -t 10000
|
||||
/usr/bin/paplay /usr/share/sounds/Oxygen-K3B-Finish-Error.ogg
|
||||
fi
|
||||
|
@ -33,7 +33,6 @@ i3lock \
|
||||
--keyhl-color=$W \
|
||||
--bshl-color=$W \
|
||||
\
|
||||
--screen 1 \
|
||||
--blur 5 \
|
||||
--clock \
|
||||
--indicator \
|
||||
|
Reference in New Issue
Block a user