Add .local/bin/home_backup.sh

Add .local/bin/screenshot.sh
Update .local/bin/screenshots.sh
Add .local/bin/sekirofpsunlock
Add .local/bin/old/brightness.sh
Add .local/bin/old/change_colors.sh
Add .local/bin/old/random_wallpaper.sh
Add .local/bin/steamtinkerlaunch
This commit is contained in:
2025-09-25 13:18:39 +02:00
parent 207cd27a9a
commit bc3706fd06
8 changed files with 146 additions and 1 deletions

View File

@@ -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/

View File

@@ -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

View File

@@ -5,7 +5,7 @@
## feh ## feh
## grim ## grim
## slurp ## slurp
## swappy ## satty
## wl-clipboard ## wl-clipboard
dir_target="$HOME/Obrazy/zrzuty" # where your screenshots are stored dir_target="$HOME/Obrazy/zrzuty" # where your screenshots are stored

Binary file not shown.

View File

@@ -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

View File

@@ -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

View File

@@ -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"

View File

@@ -0,0 +1 @@
/home/szymon/.local/share/steamtinkerlaunch/steamtinkerlaunch