change scripts

This commit is contained in:
Frost-Phoenix 2023-11-13 00:16:48 +01:00
parent be42d058cb
commit 27e0c22bae
10 changed files with 86 additions and 72 deletions

View file

@ -0,0 +1,10 @@
#!/usr/bin/env bash
git_directory=$PWD/.git
if [[ -d $git_directory ]];then
git add .
read -p "Enter commit name: " commit_name
git commit -m "$commit_name"
else
echo "Git wasn't initialized here."
fi

View file

@ -0,0 +1,10 @@
#!/usr/bin/env bash
git_directory=$PWD/.git
if [[ -d $git_directory ]];then
git add .
read -p "Enter commit name: " commit_name
git commit -m "$commit_name"
else
echo "Git wasn't initialized here."
fi

View file

@ -0,0 +1,7 @@
#!/usr/bin/env bash
if [ "$#" -eq 1 ]; then
du -hs $1
else
echo "[ERROR] => Wrong number of parameters"
fi

View file

@ -0,0 +1,12 @@
#!/usr/bin/env bash
if [[ $# == 0 ]]; then
hyprctl dispatch exec "[workspace 8 silent] audacious -t"
sleep 0.5
audtool playlist-repeat-status |grep "on" || audtool playlist-repeat-toggle
audtool playlist-shuffle-status|grep "on" || audtool playlist-shuffle-toggle
elif [[ $1 == -s ]]; then
pkill audacious
else
echo "[ERROR] => Wrong argument..."
fi

View file

@ -0,0 +1,11 @@
#!/usr/bin/env bash
git_directory=$PWD/.git
if [[ -d $git_directory ]];then
git add .
read -p "Enter commit name: " commit_name
git commit -m "$commit_name"
git push
else
echo "Git wasn't initialized here."
fi

View file

@ -0,0 +1,16 @@
#!/usr/bin/env bash
[ $# -eq 0 ] && { # $# is number of args
echo "$(basename $0): missing command" >&2
exit 1
}
prog="$(which "$1")" # see below
[ -z "$prog" ] && {
echo "$(basename $0): unknown command: $1" >&2
exit 1
}
shift # remove $1, now $prog, from args
tty -s && exec </dev/null # if stdin is a terminal, redirect from null
tty -s <&1 && exec >/dev/null # if stdout is a terminal, redirect to null
tty -s <&2 && exec 2>&1 # stderr to stdout (which might not be null)
"$prog" "$@" & # $@ is all args

View file

@ -0,0 +1,7 @@
#!/usr/bin/env bash
if hyprctl getoption decoration:blur:enabled | grep "int: 1" >/dev/null ; then
hyprctl keyword decoration:blur:enabled false >/dev/null
else
hyprctl keyword decoration:blur:enabled true >/dev/null
fi

View file

@ -0,0 +1,9 @@
#!/usr/bin/env bash
if hyprctl getoption decoration:active_opacity | grep "float: 1" >/dev/null ; then
hyprctl keyword decoration:active_opacity 0.85 >/dev/null
hyprctl keyword decoration:inactive_opacity 0.85 >/dev/null
else
hyprctl keyword decoration:active_opacity 1 >/dev/null
hyprctl keyword decoration:inactive_opacity 1 >/dev/null
fi

View file

@ -0,0 +1,11 @@
#!/usr/bin/env bash
wallpaper_folder=$HOME/Pictures/wallpapers
wallpaper_location="$(ls $wallpaper_folder | wofi -n --show dmenu)"
if [[ -d $wallpaper_folder/$wallpaper_location ]]; then
wallpaper_temp="$wallpaper_location"
elif [[ -f $wallpaper_folder/$wallpaper_location ]]; then
wall-change $wallpaper_folder/$wallpaper_temp/$wallpaper_location
else
exit 1
fi