diff --git a/private_dot_local/bin/executable_home_backup.sh b/private_dot_local/bin/executable_home_backup.sh new file mode 100644 index 0000000..bdb812e --- /dev/null +++ b/private_dot_local/bin/executable_home_backup.sh @@ -0,0 +1,5 @@ +#!/bin/bash +set -e + +rsync -avh --no-links --delete --exclude=.* --exclude=dyski /home/szymon/ /mnt/backup/home/szymon/ +rsync -avh --no-links --delete --exclude=.* --exclude=dyski /home/szymon/ /mnt/backup_wd/home/szymon/ diff --git a/private_dot_local/bin/executable_screenshot.sh b/private_dot_local/bin/executable_screenshot.sh new file mode 100644 index 0000000..f7bd09b --- /dev/null +++ b/private_dot_local/bin/executable_screenshot.sh @@ -0,0 +1,49 @@ +#!/bin/env bash + +# variables +## path vars +date="$(date +'%d-%m-%Y_%H:%M:%S')" +fname="$date.png" +target_path="$HOME/Obrazy/zrzuty/$fname" +## stdout +error_wrong_type="The first argument needs to be \"fullscreen\", \"window\" or \"region\". Exiting..." +notification_succes="$target_path saved and copied" + +notification() { + notify-send -i "$target_path" -u low -a "Screenshot" "Screenshot" "$notification_succes" +} + +# validate input +case "$1" in + "fullscreen" | "window" | "region") + type=$1 + ;; + *) + echo "$error_wrong_type" + exit + ;; +esac + +case $type in + "fullscreen") + grim -o $(hyprctl monitors -j | jq -r '.[] | select(.focused == true) | .name') "$target_path" + wl-copy < "$target_path" + notification + ;; + "window") + active_window_position="$(hyprctl clients -j | jq -r '.[] | select(.focusHistoryID == 0) | .at')" + active_window_size="$(hyprctl clients -j | jq -r '.[] | select(.focusHistoryID == 0) | .size')" + + x=$(echo "$active_window_position" | jq '.[0]') + y=$(echo "$active_window_position" | jq '.[1]') + width=$(echo "$active_window_size" | jq '.[0]') + height=$(echo "$active_window_size" | jq '.[1]') + + grim -g "${x},${y} ${width}x${height}" "$target_path" + wl-copy < "$target_path" + notification + ;; + "region") + grim -o $(hyprctl monitors -j | jq -r '.[] | select(.focused == true) | .name') - | satty -f - + ;; +esac diff --git a/private_dot_local/bin/executable_screenshots.sh b/private_dot_local/bin/executable_screenshots.sh index d85e351..60ac390 100644 --- a/private_dot_local/bin/executable_screenshots.sh +++ b/private_dot_local/bin/executable_screenshots.sh @@ -5,7 +5,7 @@ ## feh ## grim ## slurp -## swappy +## satty ## wl-clipboard dir_target="$HOME/Obrazy/zrzuty" # where your screenshots are stored diff --git a/private_dot_local/bin/executable_sekirofpsunlock b/private_dot_local/bin/executable_sekirofpsunlock new file mode 100644 index 0000000..6499d99 Binary files /dev/null and b/private_dot_local/bin/executable_sekirofpsunlock differ diff --git a/private_dot_local/bin/old/executable_brightness.sh b/private_dot_local/bin/old/executable_brightness.sh new file mode 100644 index 0000000..2b78a41 --- /dev/null +++ b/private_dot_local/bin/old/executable_brightness.sh @@ -0,0 +1,9 @@ +#!/usr/bin/bash + +if [[ $1 == "up" ]]; then + ddcutil -d 1 setvcp 10 100 && ddcutil -d 2 setvcp 10 100 +elif [[ $1 == "down" ]]; then + ddcutil -d 1 setvcp 10 30 && ddcutil -d 2 setvcp 10 0 +else + echo "Usage: brightness.sh [up/down]" +fi diff --git a/private_dot_local/bin/old/executable_change_colors.sh b/private_dot_local/bin/old/executable_change_colors.sh new file mode 100644 index 0000000..88890f8 --- /dev/null +++ b/private_dot_local/bin/old/executable_change_colors.sh @@ -0,0 +1,61 @@ +#!/bin/bash + +declare -A blue +blue[background]="rgba(36, 158, 202, 0.20)" +blue[foreground]="rgba(36, 158, 202, 0.30)" +blue[font-color]="#499DA9" +blue[wallpaper]="~/Obrazy/tapety/niebieski.jpg" + +declare -A red +red[background]="rgba(202, 36, 36, 0.20)" +red[foreground]="rgba(202, 36, 36, 0.30)" +red[font-color]="#A94949" +red[wallpaper]="~/Obrazy/tapety/czerwony.jpg" + +declare -A gray +gray[background]="rgba(169, 169, 169, 0.20)" +gray[foreground]="rgba(169, 169, 169, 0.30)" +gray[font-color]="#A9A9A9" +gray[wallpaper]="~/Obrazy/tapety/szary.jpg" + +choosen_color=$1 +if [[ -z $choosen_color ]]; then + choosen_color=$(echo -e "blue\nred\ngray\n" | wofi --show dmenu --prompt "Choose your theme") +fi + +echo "You choose: $(choosen_color)" + +if [[ $choosen_color == "blue" ]]; then + waybar_colors="@define-color background ${blue[background]};\n@define-color foreground ${blue[foreground]};\n@define-color font-color ${blue[font-color]};" + mako_colors="blue" + wofi_colors="#249ECA\n#499DA9" + rivalcfg --strip-top-color "#249ECA" --strip-middle-color "#249ECA" --strip-bottom-color "#249ECA" -c "#249ECA" + hyprctl hyprpaper reload ,${blue[wallpaper]} + echo -e "preload = ${blue[wallpaper]}\nwallpaper = ,${blue[wallpaper]}\nsplash = off\nipc = on" > ~/.config/hypr/hyprpaper.conf +elif [[ $choosen_color == "red" ]]; then + waybar_colors="@define-color background ${red[background]};\n@define-color foreground ${red[foreground]};\n@define-color font-color ${red[font-color]};" + mako_colors="red" + wofi_colors="#CA2424\n#A94949" + rivalcfg --strip-top-color "#CA2424" --strip-middle-color "#CA2424" --strip-bottom-color "#CA2424" -c "#CA2424" + hyprctl hyprpaper reload ,${red[wallpaper]} + echo -e "preload = ${red[wallpaper]}\nwallpaper = ,${red[wallpaper]}\nsplash = off\nipc = on" > ~/.config/hypr/hyprpaper.conf +elif [[ $choosen_color == "gray" ]]; then + waybar_colors="@define-color background ${gray[background]};\n@define-color foreground ${gray[foreground]};\n@define-color font-color ${gray[font-color]};" + mako_colors="gray" + wofi_colors="#A9A9A9\n#A9A9A9" + rivalcfg --strip-top-color "#A9A9A9" --strip-middle-color "#A9A9A9" --strip-bottom-color "#A9A9A9" -c "#A9A9A9" + hyprctl hyprpaper reload ,${gray[wallpaper]} + echo -e "preload = ${gray[wallpaper]}\nwallpaper = ,${gray[wallpaper]}\nsplash = off\nipc = on" > ~/.config/hypr/hyprpaper.conf +fi + + +echo -e "$waybar_colors" > ~/.config/waybar/colors.css +~/.local/bin/restart_waybar.sh & + +# killall mako +cat ~/.config/mako/$mako_colors > ~/.config/mako/config +makoctl reload +# mako --config ~/.config/mako/$mako_colors & + +echo -e $wofi_colors > ~/.config/wofi/colors + diff --git a/private_dot_local/bin/old/executable_random_wallpaper.sh b/private_dot_local/bin/old/executable_random_wallpaper.sh new file mode 100644 index 0000000..395f25f --- /dev/null +++ b/private_dot_local/bin/old/executable_random_wallpaper.sh @@ -0,0 +1,20 @@ +#!/usr/bin/env bash + +case $1 in + "nsfw") + WALLPAPER_DIR="$HOME/Obrazy/tapety/nsfw/" + ;; + "sfw") + WALLPAPER_DIR="$HOME/Obrazy/tapety/sfw/" + ;; + *) + echo "Please choose nsfw or sfw" + exit 1 +esac +CURRENT_WALL=$(hyprctl hyprpaper listloaded) + +# Get a random wallpaper that is not the current one +WALLPAPER=$(find "$WALLPAPER_DIR" -type f ! -name "$(basename "$CURRENT_WALL")" | shuf -n 1) + +# Apply the selected wallpaper +hyprctl hyprpaper reload ,"$WALLPAPER" diff --git a/private_dot_local/bin/symlink_steamtinkerlaunch b/private_dot_local/bin/symlink_steamtinkerlaunch new file mode 100644 index 0000000..de5a9d3 --- /dev/null +++ b/private_dot_local/bin/symlink_steamtinkerlaunch @@ -0,0 +1 @@ +/home/szymon/.local/share/steamtinkerlaunch/steamtinkerlaunch