Added the local scripts/binaries directory
This commit is contained in:
parent
8c8dcd73a2
commit
dcca852a05
17
.local/bin/codium-patch.sh
Executable file
17
.local/bin/codium-patch.sh
Executable file
|
@ -0,0 +1,17 @@
|
|||
#!/bin/sh
|
||||
|
||||
if [ $(whoami) != root ]; then
|
||||
echo "- Please run this script as root"
|
||||
echo "sudo $0"
|
||||
echo
|
||||
sudo $0
|
||||
exit $?
|
||||
fi
|
||||
|
||||
apps_path=/usr/share/applications
|
||||
|
||||
rm $apps_path/codium.desktop
|
||||
sed -i "s/Name=VSCodium - Wayland/Name=VSCodium/g" $apps_path/codium-wayland.desktop
|
||||
|
||||
echo "- Done"
|
||||
exit 0
|
29
.local/bin/set-wallpaper
Executable file
29
.local/bin/set-wallpaper
Executable file
|
@ -0,0 +1,29 @@
|
|||
#!/bin/sh
|
||||
|
||||
# Check if file exists
|
||||
if [ -e $1 ]; then
|
||||
|
||||
# Variables declaration
|
||||
wallpaper_config=~/.config/hypr/hyprpaper.conf
|
||||
wallpaper_path=~/.config/hypr/images/wallpaper # Doesn't contain file extension
|
||||
file_extension="${1##*.}"
|
||||
|
||||
# Remove old wallpaper
|
||||
rm $wallpaper_path*
|
||||
|
||||
# Copy file
|
||||
cp $1 "${wallpaper_path}.${file_extension}"
|
||||
|
||||
# Update config
|
||||
sed -i "s/wallpaper\.[^[:space:]]*/wallpaper.$file_extension/g" $wallpaper_config # Replace current extension by new extension
|
||||
|
||||
# Reload Hyprpaper
|
||||
pkill hyprpaper
|
||||
nohup hyprpaper </dev/null >/dev/null 2>&1 &
|
||||
|
||||
echo "Done"
|
||||
exit 0
|
||||
else
|
||||
echo "Couldn't find '${1}': No such file or directory"
|
||||
exit 1
|
||||
fi
|
Loading…
Reference in a new issue