Dev
This commit is contained in:
@@ -1,12 +0,0 @@
|
||||
#!/bin/bash
|
||||
# _ _ _
|
||||
# / \ _ __ _ __ | | __ _ _ _ _ __ ___| |__ ___ _ __
|
||||
# / _ \ | '_ \| '_ \ | | / _` | | | | '_ \ / __| '_ \ / _ \ '__|
|
||||
# / ___ \| |_) | |_) | | |__| (_| | |_| | | | | (__| | | | __/ |
|
||||
# /_/ \_\ .__/| .__/ |_____\__,_|\__,_|_| |_|\___|_| |_|\___|_|
|
||||
# |_| |_|
|
||||
#
|
||||
# by Stephan Raabe (2023)
|
||||
# -----------------------------------------------------
|
||||
|
||||
rofi -show drun
|
||||
@@ -1,3 +1,14 @@
|
||||
#!/bin/bash
|
||||
# _
|
||||
# ___| | ___ __ _ _ __ _ _ _ __
|
||||
# / __| |/ _ \/ _` | '_ \ | | | | '_ \
|
||||
# | (__| | __/ (_| | | | | | |_| | |_) |
|
||||
# \___|_|\___|\__,_|_| |_| \__,_| .__/
|
||||
# |_|
|
||||
#
|
||||
# by Stephan Raabe (2023)
|
||||
# -----------------------------------------------------
|
||||
|
||||
yay -Scc
|
||||
su -c 'pacman -Qtdq | pacman -Rns -'
|
||||
su -c 'pacman -Qqd | pacman -Rsu -'
|
||||
|
||||
@@ -1,23 +1,30 @@
|
||||
#!/bin/bash
|
||||
# _____ _ _ _
|
||||
# | ___(_) __ _| | ___| |_
|
||||
# | |_ | |/ _` | |/ _ \ __|
|
||||
# | _| | | (_| | | __/ |_
|
||||
# |_| |_|\__, |_|\___|\__|
|
||||
# |___/
|
||||
#
|
||||
# by Stephan Raabe (2023)
|
||||
cat <<"EOF"
|
||||
_____ _ _ _
|
||||
| ___(_) __ _| | ___| |_
|
||||
| |_ | |/ _` | |/ _ \ __|
|
||||
| _| | | (_| | | __/ |_
|
||||
|_| |_|\__, |_|\___|\__|
|
||||
|___/
|
||||
|
||||
EOF
|
||||
|
||||
# -----------------------------------------------------
|
||||
# Script to create ascii font based header on user input
|
||||
# and copy the result to the clipboard
|
||||
# -----------------------------------------------------
|
||||
|
||||
read -p "Enter the text for ascii encoding: " mytext
|
||||
figlet "$mytext" > ~/figlet.txt
|
||||
|
||||
if [ -f ~/figlet.txt ]; then
|
||||
touch ~/figlet.txt
|
||||
fi
|
||||
|
||||
echo "cat <<\"EOF\"" > ~/figlet.txt
|
||||
figlet "$mytext" >> ~/figlet.txt
|
||||
echo "" >> ~/figlet.txt
|
||||
echo "by Stephan Raabe (2023)" >> ~/figlet.txt
|
||||
echo "-----------------------------------------------------" >> ~/figlet.txt
|
||||
sed -i 's/^/# /; s/$/ /' ~/figlet.txt
|
||||
echo "EOF" >> ~/figlet.txt
|
||||
|
||||
lines=$( cat ~/figlet.txt )
|
||||
wl-copy "$lines"
|
||||
xclip -sel clip ~/figlet.txt
|
||||
|
||||
@@ -9,5 +9,4 @@
|
||||
# by Stephan Raabe (2023)
|
||||
# -----------------------------------------------------
|
||||
|
||||
thunar
|
||||
|
||||
thunar
|
||||
@@ -1,34 +0,0 @@
|
||||
#!/bin/bash
|
||||
# ____ _ _
|
||||
# / ___| ___ _ __ ___ ___ _ __ ___| |__ ___ | |_
|
||||
# \___ \ / __| '__/ _ \/ _ \ '_ \/ __| '_ \ / _ \| __|
|
||||
# ___) | (__| | | __/ __/ | | \__ \ | | | (_) | |_
|
||||
# |____/ \___|_| \___|\___|_| |_|___/_| |_|\___/ \__|
|
||||
#
|
||||
#
|
||||
# by Stephan Raabe (2023)
|
||||
# -----------------------------------------------------
|
||||
|
||||
DIR="$HOME/Pictures/screenshots/"
|
||||
NAME="screenshot_$(date +%d%m%Y_%H%M%S).png"
|
||||
|
||||
option2="Selected area"
|
||||
option3="Fullscreen (delay 3 sec)"
|
||||
|
||||
options="$option2\n$option3"
|
||||
|
||||
choice=$(echo -e "$options" | rofi -dmenu -config ~/dotfiles/rofi/config-screenshot.rasi -i -no-show-icons -l 4 -width 30 -p "Take Screenshot")
|
||||
|
||||
case $choice in
|
||||
$option2)
|
||||
grim -g "$(slurp)" - | swappy -f -
|
||||
# grim -g "$(slurp)" $(xdg-user-dir PICTURES)/screenshots/$(date +'%s_grim.png')
|
||||
notify-send "Screenshot created" "Mode: Selected area"
|
||||
;;
|
||||
$option3)
|
||||
sleep 3
|
||||
grim - | swappy -f -
|
||||
# grim $(xdg-user-dir PICTURES)/screenshots/$(date +'%s_grim.png')
|
||||
notify-send "Screenshot created" "Mode: Fullscreen"
|
||||
;;
|
||||
esac
|
||||
@@ -11,7 +11,7 @@
|
||||
# -----------------------------------------------------
|
||||
|
||||
sleep 1
|
||||
source ~/dotfiles/scripts/library.sh
|
||||
source ~/dotfiles/.install/library.sh
|
||||
clear
|
||||
|
||||
# ------------------------------------------------------
|
||||
|
||||
@@ -1,128 +0,0 @@
|
||||
#!/bin/bash
|
||||
# _ _ _
|
||||
# | | (_) |__ _ __ __ _ _ __ _ _
|
||||
# | | | | '_ \| '__/ _` | '__| | | |
|
||||
# | |___| | |_) | | | (_| | | | |_| |
|
||||
# |_____|_|_.__/|_| \__,_|_| \__, |
|
||||
# |___/
|
||||
#
|
||||
# by Stephan Raabe (2023)
|
||||
# -----------------------------------------------------
|
||||
|
||||
# ------------------------------------------------------
|
||||
# Function: Is package installed
|
||||
# ------------------------------------------------------
|
||||
_isInstalledPacman() {
|
||||
package="$1";
|
||||
check="$(sudo pacman -Qs --color always "${package}" | grep "local" | grep "${package} ")";
|
||||
if [ -n "${check}" ] ; then
|
||||
echo 0; #'0' means 'true' in Bash
|
||||
return; #true
|
||||
fi;
|
||||
echo 1; #'1' means 'false' in Bash
|
||||
return; #false
|
||||
}
|
||||
|
||||
_isInstalledYay() {
|
||||
package="$1";
|
||||
check="$(yay -Qs --color always "${package}" | grep "local" | grep "${package} ")";
|
||||
if [ -n "${check}" ] ; then
|
||||
echo 0; #'0' means 'true' in Bash
|
||||
return; #true
|
||||
fi;
|
||||
echo 1; #'1' means 'false' in Bash
|
||||
return; #false
|
||||
}
|
||||
|
||||
# ------------------------------------------------------
|
||||
# Function Install all package if not installed
|
||||
# ------------------------------------------------------
|
||||
_installPackagesPacman() {
|
||||
toInstall=();
|
||||
|
||||
for pkg; do
|
||||
if [[ $(_isInstalledPacman "${pkg}") == 0 ]]; then
|
||||
echo "${pkg} is already installed.";
|
||||
continue;
|
||||
fi;
|
||||
|
||||
toInstall+=("${pkg}");
|
||||
done;
|
||||
|
||||
if [[ "${toInstall[@]}" == "" ]] ; then
|
||||
# echo "All pacman packages are already installed.";
|
||||
return;
|
||||
fi;
|
||||
|
||||
printf "Packages not installed:\n%s\n" "${toInstall[@]}";
|
||||
sudo pacman --noconfirm -S "${toInstall[@]}";
|
||||
}
|
||||
|
||||
_installPackagesYay() {
|
||||
toInstall=();
|
||||
|
||||
for pkg; do
|
||||
if [[ $(_isInstalledYay "${pkg}") == 0 ]]; then
|
||||
echo "${pkg} is already installed.";
|
||||
continue;
|
||||
fi;
|
||||
|
||||
toInstall+=("${pkg}");
|
||||
done;
|
||||
|
||||
if [[ "${toInstall[@]}" == "" ]] ; then
|
||||
# echo "All packages are already installed.";
|
||||
return;
|
||||
fi;
|
||||
|
||||
printf "AUR ackages not installed:\n%s\n" "${toInstall[@]}";
|
||||
yay --noconfirm -S "${toInstall[@]}";
|
||||
}
|
||||
|
||||
|
||||
# ------------------------------------------------------
|
||||
# Create symbolic links
|
||||
# ------------------------------------------------------
|
||||
_installSymLink() {
|
||||
name="$1"
|
||||
symlink="$2";
|
||||
linksource="$3";
|
||||
linktarget="$4";
|
||||
|
||||
while true; do
|
||||
read -p "DO YOU WANT TO INSTALL ${name}? (Existing dotfiles will be removed!) (Yy/Nn): " yn
|
||||
case $yn in
|
||||
[Yy]* )
|
||||
if [ -L "${symlink}" ]; then
|
||||
rm ${symlink}
|
||||
ln -s ${linksource} ${linktarget}
|
||||
echo "Symlink ${linksource} -> ${linktarget} created."
|
||||
echo ""
|
||||
else
|
||||
if [ -d ${symlink} ]; then
|
||||
rm -rf ${symlink}/
|
||||
ln -s ${linksource} ${linktarget}
|
||||
echo "Symlink for directory ${linksource} -> ${linktarget} created."
|
||||
echo ""
|
||||
else
|
||||
if [ -f ${symlink} ]; then
|
||||
rm ${symlink}
|
||||
ln -s ${linksource} ${linktarget}
|
||||
echo "Symlink to file ${linksource} -> ${linktarget} created."
|
||||
echo ""
|
||||
else
|
||||
ln -s ${linksource} ${linktarget}
|
||||
echo "New symlink ${linksource} -> ${linktarget} created."
|
||||
echo ""
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
break;;
|
||||
[Nn]* )
|
||||
echo ""
|
||||
# exit;
|
||||
break;;
|
||||
* ) echo "Please answer yes or no.";;
|
||||
esac
|
||||
done
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
#/bin/sh
|
||||
# ___ _ _ _ _
|
||||
# |_ _|__| | | ___| |_(_)_ __ ___ ___
|
||||
# | |/ _` | |/ _ \ __| | '_ ` _ \ / _ \
|
||||
# | | (_| | | __/ |_| | | | | | | __/
|
||||
# |___\__,_|_|\___|\__|_|_| |_| |_|\___|
|
||||
#
|
||||
#
|
||||
# by Stephan Raabe (2023)
|
||||
# -----------------------------------------------------
|
||||
|
||||
timeswaylock=600
|
||||
timeoff=660
|
||||
|
||||
if [ -f "/usr/bin/swayidle" ]; then
|
||||
echo "swayidle is installed."
|
||||
swayidle -w timeout $timeswaylock 'swaylock -f' timeout $timeoff 'hyprctl dispatch dpms off' resume 'hyprctl dispatch dpms on'
|
||||
else
|
||||
echo "swayidle not installed."
|
||||
fi;
|
||||
@@ -1,34 +0,0 @@
|
||||
#!/bin/bash
|
||||
# ____
|
||||
# | _ \ _____ _____ _ __ _ __ ___ ___ _ __ _ _
|
||||
# | |_) / _ \ \ /\ / / _ \ '__| '_ ` _ \ / _ \ '_ \| | | |
|
||||
# | __/ (_) \ V V / __/ | | | | | | | __/ | | | |_| |
|
||||
# |_| \___/ \_/\_/ \___|_| |_| |_| |_|\___|_| |_|\__,_|
|
||||
#
|
||||
#
|
||||
# by Stephan Raabe (2023)
|
||||
# -----------------------------------------------------
|
||||
|
||||
option1=" lock"
|
||||
option2=" logout"
|
||||
option3=" reboot"
|
||||
option4=" power off"
|
||||
|
||||
options="$option1\n"
|
||||
options="$options$option2\n"
|
||||
options="$options$option3\n$option4"
|
||||
|
||||
choice=$(echo -e "$options" | rofi -dmenu -i -no-show-icons -l 4 -width 30 -p "Powermenu")
|
||||
|
||||
case $choice in
|
||||
$option1)
|
||||
swaylock ;;
|
||||
$option2)
|
||||
# loginctl terminate-user $USER # For command line based login
|
||||
hyprctl dispatch exit ;; # For display manager login
|
||||
$option3)
|
||||
systemctl reboot ;;
|
||||
$option4)
|
||||
systemctl poweroff ;;
|
||||
esac
|
||||
|
||||
@@ -1,33 +0,0 @@
|
||||
#!/bin/bash
|
||||
# ____
|
||||
# | _ \ _____ _____ _ __ _ __ ___ ___ _ __ _ _
|
||||
# | |_) / _ \ \ /\ / / _ \ '__| '_ ` _ \ / _ \ '_ \| | | |
|
||||
# | __/ (_) \ V V / __/ | | | | | | | __/ | | | |_| |
|
||||
# |_| \___/ \_/\_/ \___|_| |_| |_| |_|\___|_| |_|\__,_|
|
||||
#
|
||||
#
|
||||
# by Stephan Raabe (2023)
|
||||
# -----------------------------------------------------
|
||||
|
||||
option1=" lock"
|
||||
option2=" logout"
|
||||
option3=" reboot"
|
||||
option4=" power off"
|
||||
|
||||
options="$option1\n"
|
||||
options="$options$option2\n"
|
||||
options="$options$option3\n$option4"
|
||||
|
||||
choice=$(echo -e "$options" | rofi -dmenu -config ~/dotfiles/rofi/config-power.rasi -i -no-show-icons -l 4 -width 30 -p "Powermenu")
|
||||
|
||||
case $choice in
|
||||
$option1)
|
||||
slock ;;
|
||||
$option2)
|
||||
qtile cmd-obj -o cmd -f shutdown ;;
|
||||
$option3)
|
||||
systemctl reboot ;;
|
||||
$option4)
|
||||
systemctl poweroff ;;
|
||||
esac
|
||||
|
||||
@@ -1,36 +0,0 @@
|
||||
#!/bin/bash
|
||||
# ____ _ _
|
||||
# / ___| ___ _ __ ___ ___ _ __ ___| |__ ___ | |_
|
||||
# \___ \ / __| '__/ _ \/ _ \ '_ \/ __| '_ \ / _ \| __|
|
||||
# ___) | (__| | | __/ __/ | | \__ \ | | | (_) | |_
|
||||
# |____/ \___|_| \___|\___|_| |_|___/_| |_|\___/ \__|
|
||||
#
|
||||
#
|
||||
# by Stephan Raabe (2023)
|
||||
# -----------------------------------------------------
|
||||
|
||||
DIR="$HOME/Pictures/screenshots/"
|
||||
NAME="screenshot_$(date +%d%m%Y_%H%M%S).png"
|
||||
|
||||
option1="Selected window (delay 3 sec)"
|
||||
option2="Selected area"
|
||||
option3="Fullscreen (delay 3 sec)"
|
||||
|
||||
options="$option2\n$option3\n$option1"
|
||||
|
||||
choice=$(echo -e "$options" | rofi -i -dmenu -config ~/dotfiles/rofi/config-screenshot.rasi -width 30 -p "Take Screenshot")
|
||||
|
||||
case $choice in
|
||||
$option1)
|
||||
scrot $DIR$NAME -d 3 -e 'xclip -selection clipboard -t image/png -i $f' -c -z -u
|
||||
notify-send "Screenshot created" "Mode: Selected window"
|
||||
;;
|
||||
$option2)
|
||||
scrot $DIR$NAME -s -e 'xclip -selection clipboard -t image/png -i $f'
|
||||
notify-send "Screenshot created" "Mode: Selected area"
|
||||
;;
|
||||
$option3)
|
||||
scrot $DIR$NAME -d 3 -e 'xclip -selection clipboard -t image/png -i $f'
|
||||
notify-send "Screenshot created" "Mode: Fullscreen"
|
||||
;;
|
||||
esac
|
||||
@@ -1,50 +0,0 @@
|
||||
#!/bin/bash
|
||||
# _____ _ ______ ____ ____ __
|
||||
# |_ _| |__ ___ _ __ ___ ___ / ___\ \ / /\ \ / /\ \ / /
|
||||
# | | | '_ \ / _ \ '_ ` _ \ / _ \ \___ \\ \ /\ / / \ \ /\ / / \ \ /\ / /
|
||||
# | | | | | | __/ | | | | | __/ ___) |\ V V / \ V V / \ V V /
|
||||
# |_| |_| |_|\___|_| |_| |_|\___| |____/ \_/\_/ \_/\_/ \_/\_/
|
||||
#
|
||||
#
|
||||
# by Stephan Raabe (2023)
|
||||
# -----------------------------------------------------
|
||||
|
||||
# -----------------------------------------------------
|
||||
# Select random wallpaper and create color scheme
|
||||
# -----------------------------------------------------
|
||||
wal -q -i ~/wallpaper/
|
||||
|
||||
# -----------------------------------------------------
|
||||
# Load current pywal color scheme
|
||||
# -----------------------------------------------------
|
||||
source "$HOME/.cache/wal/colors.sh"
|
||||
|
||||
# -----------------------------------------------------
|
||||
# Copy selected wallpaper into .cache folder
|
||||
# -----------------------------------------------------
|
||||
cp $wallpaper ~/.cache/current_wallpaper.jpg
|
||||
|
||||
# -----------------------------------------------------
|
||||
# get wallpaper iamge name
|
||||
# -----------------------------------------------------
|
||||
newwall=$(echo $wallpaper | sed "s|$HOME/wallpaper/||g")
|
||||
|
||||
# -----------------------------------------------------
|
||||
# Set the new wallpaper
|
||||
# -----------------------------------------------------
|
||||
swww img $wallpaper \
|
||||
--transition-bezier .43,1.19,1,.4 \
|
||||
--transition-fps=60 \
|
||||
--transition-type="random" \
|
||||
--transition-duration=0.7 \
|
||||
--transition-pos "$( hyprctl cursorpos )"
|
||||
|
||||
~/dotfiles/waybar/launch.sh
|
||||
sleep 1
|
||||
|
||||
# -----------------------------------------------------
|
||||
# Send notification
|
||||
# -----------------------------------------------------
|
||||
notify-send "Colors and Wallpaper updated" "with image $newwall"
|
||||
|
||||
echo "DONE!"
|
||||
@@ -1,47 +0,0 @@
|
||||
#!/bin/bash
|
||||
# ____ _ _____ _
|
||||
# / ___| |__ __ _ _ __ __ _ ___ |_ _| |__ ___ _ __ ___ ___
|
||||
# | | | '_ \ / _` | '_ \ / _` |/ _ \ | | | '_ \ / _ \ '_ ` _ \ / _ \
|
||||
# | |___| | | | (_| | | | | (_| | __/ | | | | | | __/ | | | | | __/
|
||||
# \____|_| |_|\__,_|_| |_|\__, |\___| |_| |_| |_|\___|_| |_| |_|\___|
|
||||
# |___/
|
||||
#
|
||||
# by Stephan Raabe (2023)
|
||||
# -----------------------------------------------------
|
||||
|
||||
echo "Changing theme..."
|
||||
|
||||
# -----------------------------------------------------
|
||||
# Update Wallpaper with pywal
|
||||
# -----------------------------------------------------
|
||||
wal -q -i ~/wallpaper/
|
||||
|
||||
# -----------------------------------------------------
|
||||
# Wait for 1 sec
|
||||
# -----------------------------------------------------
|
||||
sleep 1
|
||||
|
||||
# -----------------------------------------------------
|
||||
# Reload qtile to color bar
|
||||
# -----------------------------------------------------
|
||||
qtile cmd-obj -o cmd -f reload_config
|
||||
|
||||
# -----------------------------------------------------
|
||||
# Get new theme
|
||||
# -----------------------------------------------------
|
||||
source "$HOME/.cache/wal/colors.sh"
|
||||
newwall=$(echo $wallpaper | sed "s|$HOME/wallpaper/||g")
|
||||
|
||||
# -----------------------------------------------------
|
||||
# Copy selected wallpaper into .cache folder
|
||||
# -----------------------------------------------------
|
||||
cp $wallpaper ~/.cache/current_wallpaper.jpg
|
||||
|
||||
sleep 1
|
||||
|
||||
# -----------------------------------------------------
|
||||
# Send notification
|
||||
# -----------------------------------------------------
|
||||
notify-send "Colors and Wallpaper updated" "with image $newwall"
|
||||
|
||||
echo "Done."
|
||||
@@ -1,3 +0,0 @@
|
||||
wal -q -i ~/wallpaper/
|
||||
|
||||
exit
|
||||
@@ -1,56 +0,0 @@
|
||||
#!/bin/bash
|
||||
# __ __ _ _
|
||||
# \ \ / /_ _| | |_ __ __ _ _ __ ___ _ __
|
||||
# \ \ /\ / / _` | | | '_ \ / _` | '_ \ / _ \ '__|
|
||||
# \ V V / (_| | | | |_) | (_| | |_) | __/ |
|
||||
# \_/\_/ \__,_|_|_| .__/ \__,_| .__/ \___|_|
|
||||
# |_| |_|
|
||||
#
|
||||
# by Stephan Raabe (2023)
|
||||
# -----------------------------------------------------
|
||||
|
||||
# -----------------------------------------------------
|
||||
# Select wallpaper
|
||||
# -----------------------------------------------------
|
||||
selected=$(ls -1 ~/wallpaper | grep "jpg" | rofi -dmenu -config ~/dotfiles/rofi/config-wallpaper.rasi)
|
||||
|
||||
if [ "$selected" ]; then
|
||||
|
||||
echo "Changing theme..."
|
||||
# -----------------------------------------------------
|
||||
# Update wallpaper with pywal
|
||||
# -----------------------------------------------------
|
||||
wal -q -i ~/wallpaper/$selected
|
||||
|
||||
# -----------------------------------------------------
|
||||
# Get new theme
|
||||
# -----------------------------------------------------
|
||||
source "$HOME/.cache/wal/colors.sh"
|
||||
|
||||
# -----------------------------------------------------
|
||||
# Copy selected wallpaper into .cache folder
|
||||
# -----------------------------------------------------
|
||||
cp $wallpaper ~/.cache/current_wallpaper.jpg
|
||||
|
||||
newwall=$(echo $wallpaper | sed "s|$HOME/wallpaper/||g")
|
||||
|
||||
# -----------------------------------------------------
|
||||
# Set the new wallpaper
|
||||
# -----------------------------------------------------
|
||||
swww img $wallpaper \
|
||||
--transition-bezier .43,1.19,1,.4 \
|
||||
--transition-fps=60 \
|
||||
--transition-type="random" \
|
||||
--transition-duration=0.7 \
|
||||
--transition-pos "$( hyprctl cursorpos )"
|
||||
|
||||
~/dotfiles/waybar/launch.sh
|
||||
sleep 1
|
||||
|
||||
# -----------------------------------------------------
|
||||
# Send notification
|
||||
# -----------------------------------------------------
|
||||
notify-send "Colors and Wallpaper updated" "with image $newwall"
|
||||
|
||||
echo "Done."
|
||||
fi
|
||||
@@ -1,43 +0,0 @@
|
||||
#!/bin/bash
|
||||
# __ __ _ _
|
||||
# \ \ / /_ _| | |_ __ __ _ _ __ ___ _ __
|
||||
# \ \ /\ / / _` | | | '_ \ / _` | '_ \ / _ \ '__|
|
||||
# \ V V / (_| | | | |_) | (_| | |_) | __/ |
|
||||
# \_/\_/ \__,_|_|_| .__/ \__,_| .__/ \___|_|
|
||||
# |_| |_|
|
||||
#
|
||||
# by Stephan Raabe (2023)
|
||||
# -----------------------------------------------------
|
||||
|
||||
# Select wallpaper
|
||||
selected=$(ls -1 ~/wallpaper | grep "jpg" | rofi -dmenu -config ~/dotfiles/rofi/config-wallpaper.rasi -p "Wallpapers")
|
||||
|
||||
if [ "$selected" ]; then
|
||||
|
||||
echo "Changing theme..."
|
||||
# Update wallpaper with pywal
|
||||
wal -q -i ~/wallpaper/$selected
|
||||
|
||||
# Wait for 1 sec
|
||||
sleep 1
|
||||
|
||||
# Reload qtile to color bar
|
||||
qtile cmd-obj -o cmd -f reload_config
|
||||
|
||||
# Get new theme
|
||||
source "$HOME/.cache/wal/colors.sh"
|
||||
|
||||
newwall=$(echo $wallpaper | sed "s|$HOME/wallpaper/||g")
|
||||
|
||||
# -----------------------------------------------------
|
||||
# Copy selected wallpaper into .cache folder
|
||||
# -----------------------------------------------------
|
||||
cp $wallpaper ~/.cache/current_wallpaper.jpg
|
||||
|
||||
sleep 1
|
||||
|
||||
# Send notification
|
||||
notify-send "Colors and Wallpaper updated" "with image $newwall"
|
||||
|
||||
echo "Done."
|
||||
fi
|
||||
Reference in New Issue
Block a user