diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md old mode 100644 new mode 100755 diff --git a/LICENSE b/LICENSE old mode 100644 new mode 100755 diff --git a/README.md b/README.md old mode 100644 new mode 100755 diff --git a/bin/backlight.sh b/bin/backlight.sh deleted file mode 100755 index 8d9e35f..0000000 --- a/bin/backlight.sh +++ /dev/null @@ -1,52 +0,0 @@ -# #!/bin/bash -# # I copied this script from JaKooLit. https://github.com/JaKooLit. Because I do not have any laptop to test these kinds of features. - -iDIR="$HOME/.config/dunst/icons/brightness" -notification_timeout=1000 - -# Get brightness -get_backlight() { - echo $(brightnessctl -m | cut -d, -f4) -} - -# Get icons -get_icon() { - current=$(get_backlight | sed 's/%//') - if [ "$current" -le "20" ]; then - icon="$iDIR/brightness-20.png" - elif [ "$current" -le "40" ]; then - icon="$iDIR/brightness-40.png" - elif [ "$current" -le "60" ]; then - icon="$iDIR/brightness-60.png" - elif [ "$current" -le "80" ]; then - icon="$iDIR/brightness-80.png" - else - icon="$iDIR/brightness-100.png" - fi -} - -# Notify -notify_user() { - notify-send -e -h string:x-canonical-private-synchronous:brightness_notif -h int:value:$current -u low -i "$icon" "Brightness : $current%" -} - -# Change brightness -change_backlight() { - brightnessctl set "$1" -n && get_icon && notify_user -} - -# Execute accordingly -case "$1" in - "--get") - get_backlight - ;; - "up") - change_backlight "+10%" - ;; - "down") - change_backlight "10%-" - ;; - *) - get_backlight - ;; -esac diff --git a/bin/volume_bak.sh b/bin/volume_bak.sh deleted file mode 100755 index 01093a5..0000000 --- a/bin/volume_bak.sh +++ /dev/null @@ -1,55 +0,0 @@ -#!/bin/sh - - -case $1 in - up) - wpctl set-mute @DEFAULT_AUDIO_SINK@ 0 - wpctl set-volume -l 2.0 @DEFAULT_AUDIO_SINK@ 2%+ - ;; - down) - wpctl set-mute @DEFAULT_AUDIO_SINK@ 0 - wpctl set-volume -l 2.0 @DEFAULT_AUDIO_SINK@ 2%- - ;; - mute) - wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle - ;; - *) - echo "Usage: $0 {up|down|mute}" - exit 1 - ;; -esac - -VOLUME=$(wpctl get-volume @DEFAULT_AUDIO_SINK@ | awk '{print int($2 * 100)}') - -NORMALIZED_VOLUME=$((VOLUME / 2)) - -send_notification() { - # if [ "$1" = "mute" ]; then - # ICON='' # Mute icon - # MSG="Muted" - # elif [ "$NORMALIZED_VOLUME" -lt 50 ]; then - # ICON='' # Low volume icon - # MSG="Volume: $NORMALIZED_VOLUME%" - # elif [ "$NORMALIZED_VOLUME" -lt 90 ]; then - # ICON='' # Medium volume icon - # MSG="Volume: $NORMALIZED_VOLUME%" - # else - # ICON='' # High volume icon - # MSG="Volume: $NORMALIZED_VOLUME%" - # fi - - dunstify -u normal -h "int:value:$NORMALIZED_VOLUME" -a "Volume" "Volume" -t 2000 -} - -case $1 in - mute) - if wpctl get-volume @DEFAULT_AUDIO_SINK@ | grep -q "MUTED"; then - send_notification mute - else - send_notification - fi - ;; - *) - send_notification - ;; -esac \ No newline at end of file diff --git a/setup.sh b/setup.sh new file mode 100755 index 0000000..51a9972 --- /dev/null +++ b/setup.sh @@ -0,0 +1,22 @@ +#!/bin/bash + + +echo "Copying config files..." +cp -r cava dunst fastfetch gtk-3.0 gtk-4.0 hypr hypridle rofi starship tmux waybar yazi ~/.config/ + +cp -r bin ~/.local/bin/ + +echo "Copying .zshrc..." +cp zsh/.zshrc ~/.zshrc + +echo "Cloning dotsh repo..." +mkdir -p ~/SideProjects/ +git clone https://github.com/ad1822/dotsh ~/SideProjects/dotsh + +cd ~/SideProjects/dotsh || exit + +echo "Making scripts executable..." +chmod +x * + +echo "Setup complete!" +