mirror of
https://github.com/szymon-jozef/superior_dotfiles.git
synced 2026-09-07 12:10:38 +02:00
Remove .config/yazi/theme.toml
Change attributes of .local/bin/old/brightness.sh Change attributes of .local/bin/old/change_colors.sh Change attributes of .local/bin/old/random_wallpaper.sh Change attributes of .local/bin/old/screenshots_overcomplified.sh Change attributes of .local/bin/brightness.sh Change attributes of .local/bin/change_colors.sh Change attributes of .local/bin/change_wallpaper.sh Change attributes of .local/bin/check-do-not-disturb.sh Change attributes of .local/bin/check-if-muted.sh Change attributes of .local/bin/home_backup.sh Change attributes of .local/bin/random_wallpaper.sh Change attributes of .local/bin/restart_waybar.sh Change attributes of .local/bin/screenshot.sh Change attributes of .local/bin/screenshots.sh Change attributes of .local/bin/sekirofpsunlock Change attributes of .local/bin/start_coding.sh Change attributes of .local/bin/system_setup.sh Change attributes of .local/bin/wp-vol.sh Change attributes of .local/bin/steamtinkerlaunch
This commit is contained in:
@@ -1,9 +0,0 @@
|
||||
#!/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
|
||||
@@ -1,61 +0,0 @@
|
||||
#!/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
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
case $1 in
|
||||
"sfw")
|
||||
wallpaper=$(find ~/Obrazy/tapety/sfw/ -type f | wofi --dmenu)
|
||||
;;
|
||||
"nsfw")
|
||||
wallpaper=$(find ~/Obrazy/tapety/nsfw/ -type f | wofi --dmenu)
|
||||
;;
|
||||
*)
|
||||
echo "Please choose nsfw or sfw"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
if [[ -n $wallpaper ]];then
|
||||
hyprctl hyprpaper reload ,$wallpaper
|
||||
fi
|
||||
@@ -1,28 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
disturbed=$(makoctl mode | grep -i do-not-disturb) > /dev/null
|
||||
mute_icon=""
|
||||
unmute_icon="🕭"
|
||||
|
||||
case $1 in
|
||||
"show")
|
||||
if [[ $disturbed == "" ]]; then
|
||||
echo "$unmute_icon"
|
||||
else
|
||||
echo "$mute_icon"
|
||||
fi
|
||||
;;
|
||||
"change")
|
||||
if [[ $disturbed == "" ]]; then
|
||||
makoctl mode -a do-not-disturb > /dev/null
|
||||
echo "$unmute_icon"
|
||||
else
|
||||
makoctl mode -r do-not-disturb > /dev/null
|
||||
echo "$mute_icon"
|
||||
fi
|
||||
pkill -SIGRTMIN+2 waybar
|
||||
;;
|
||||
*)
|
||||
echo "Arguments are: show, change"
|
||||
;;
|
||||
esac
|
||||
@@ -1,9 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
MUTED=$(wpctl get-volume @DEFAULT_AUDIO_SINK@ | grep -iq muted; echo $?)
|
||||
|
||||
if [[ $MUTED -eq 0 ]]; then
|
||||
notify-send "Audio muted" -a 'wp-vol' -t 1000
|
||||
else
|
||||
notify-send "Audio unmuted" -a 'wp-vol' -t 1000
|
||||
fi
|
||||
@@ -1,5 +0,0 @@
|
||||
#!/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/
|
||||
@@ -1,20 +0,0 @@
|
||||
#!/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"
|
||||
@@ -1,5 +0,0 @@
|
||||
killall -q waybar
|
||||
|
||||
while pgrep -x waybar >/dev/null; do sleep 1; done
|
||||
|
||||
uwsm app waybar
|
||||
@@ -1,50 +0,0 @@
|
||||
#!/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"
|
||||
|
||||
|
||||
# validate input
|
||||
case "$1" in
|
||||
"fullscreen" | "window" | "region")
|
||||
type=$1
|
||||
;;
|
||||
*)
|
||||
echo "$error_wrong_type"
|
||||
exit
|
||||
;;
|
||||
esac
|
||||
|
||||
notification() {
|
||||
notify-send -i "$target_path" -u low -a "Screenshot" "Screenshot $type" "$notification_succes"
|
||||
}
|
||||
|
||||
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
|
||||
@@ -1,123 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
### DEPENDENCIES:
|
||||
## libnotify
|
||||
## feh
|
||||
## grim
|
||||
## slurp
|
||||
## satty
|
||||
## wl-clipboard
|
||||
|
||||
dir_target="$HOME/Obrazy/zrzuty" # where your screenshots are stored
|
||||
file_name="zrzut_$(date +'%H-%M-%S_%d-%m-%Y').png" # name of your screenshot
|
||||
file_path="$dir_target/$file_name" # full path combined of the above
|
||||
tmp_path="/tmp/$file_name" # path of temporary file
|
||||
|
||||
# flags
|
||||
edit=false # edit after screenshotting
|
||||
save=false # save to the disk
|
||||
copy=false # copy to clipboard
|
||||
|
||||
# messages
|
||||
|
||||
error_message="No argument provided. Use -h or --help for help message."
|
||||
help_message="\nUsage: screenShot [flags] [type-of-screen-shot / color (for color picker)\n\nFlags:\n\t-c | --copy \t Copies to clipboard\n\t-s | --save \t Saves to $dir_target\n\t-e | --edit \t Edit screenshot with swappy\n\nTypes:\n\tfullscreen\n\twindow\n\tregion\n"
|
||||
|
||||
# don't go crazy when directory doesn't exist
|
||||
|
||||
if [[ ! -d $dir_target ]]; then
|
||||
echo "Target directory does not exist. Creating..."
|
||||
notify-send "Screenshot" "Target directory does not exist. Creating..."
|
||||
mkdir -p $dir_target
|
||||
fi
|
||||
|
||||
# handle flags
|
||||
while [[ $# -gt 0 ]]; do
|
||||
case "$1" in
|
||||
-c | --copy)
|
||||
copy=true
|
||||
;;
|
||||
-s | --save)
|
||||
save=true
|
||||
;;
|
||||
-e | --edit)
|
||||
edit=true
|
||||
;;
|
||||
-h | --help)
|
||||
echo -e "$help_message"
|
||||
exit 0
|
||||
;;
|
||||
fullscreen | window | region | color)
|
||||
type_of_screenshot="$1"
|
||||
;;
|
||||
*)
|
||||
echo "$error_message"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
# actually screenshot
|
||||
case "$type_of_screenshot" in
|
||||
fullscreen)
|
||||
grim -o $(hyprctl monitors -j | jq -r '.[] | select(.focused == true) | .name') "$tmp_path"
|
||||
;;
|
||||
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}" "$tmp_path"
|
||||
;;
|
||||
region)
|
||||
grim -o $(hyprctl monitors -j | jq -r '.[] | select(.focused == true) | .name') "$tmp_path" && feh --title screenshot --fullscreen "$tmp_path" &
|
||||
sleep 0.5
|
||||
feh_pid=$(pgrep feh)
|
||||
grim -g "$(slurp)" "$tmp_path"
|
||||
echo "Killing feh…"
|
||||
kill -9 "$feh_pid"
|
||||
;;
|
||||
color)
|
||||
grim -o $(hyprctl monitors -j | jq -r '.[] | select(.focused == true) | .name') "$tmp_path" && feh --title screenshot --fullscreen "$tmp_path" &
|
||||
sleep 0.5
|
||||
feh_pid=$(pgrep feh)
|
||||
position=$(slurp -p)
|
||||
sleep 1.0
|
||||
color_hex=$(grim -g "$position" -t ppm - | magick convert - -format '%[pixel:p{0,0}]' txt:- | sed -n '2p' | awk '{print $3}')
|
||||
wl-copy $color_hex
|
||||
notify-send "Color picker" "Copied $color_hex to clipboard"
|
||||
kill -9 "$feh_pid"
|
||||
exit 0
|
||||
;;
|
||||
|
||||
esac
|
||||
|
||||
case "$copy-$save" in
|
||||
"true-true")
|
||||
cp "$tmp_path" "$file_path"
|
||||
wl-copy <"$tmp_path"
|
||||
notify-send -i "$tmp_path" "Screenshot" "Copied and saved to $file_path"
|
||||
;;
|
||||
"false-true")
|
||||
cp "$tmp_path" "$file_path"
|
||||
notify-send -i "$tmp_path" "Screenshot" "Saved screenshot to $file_path"
|
||||
;;
|
||||
"true-false")
|
||||
wl-copy <"$tmp_path"
|
||||
notify-send -i "$tmp_path" "Screenshot" "Copied screenshot"
|
||||
;;
|
||||
"false-false")
|
||||
if [ "$edit" = "true" ]; then
|
||||
satty -f "$tmp_path"
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
rm $tmp_path
|
||||
|
||||
exit 0
|
||||
Binary file not shown.
@@ -1,13 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
dir=$(find ~/Dokumenty/kodowanie/ -maxdepth 2 -type d ! -name '.*' | fzf)
|
||||
export EDITOR="nvim"
|
||||
|
||||
if [[ -n $dir ]]; then
|
||||
echo "You choose $dir"
|
||||
hyprctl dispatch exec [workspace 5] kitty $dir
|
||||
hyprctl dispatch exec [workspace 5] kitty yazi $dir
|
||||
hyprctl dispatch exec [workspace 5] kitty $dir
|
||||
else
|
||||
echo "No reasonable directory selected, bye bye :P"
|
||||
fi
|
||||
@@ -1,152 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# colors
|
||||
RED='\033[0;31m'
|
||||
GREEN='\033[0;32m'
|
||||
BOLD='\033[1m'
|
||||
RESET='\033[0m'
|
||||
|
||||
# functions
|
||||
function install_yay() {
|
||||
echo "Yay is not installed, installing..."
|
||||
sudo pacman -S --needed git base-devel
|
||||
tmpdir="$(mktemp -d)"
|
||||
git clone https://aur.archlinux.org/yay.git "$tmpdir"
|
||||
cd "$tmpdir"
|
||||
makepkg -si
|
||||
cd -
|
||||
rm -rf "$tmpdir"
|
||||
}
|
||||
# pkgs lists
|
||||
HYPR_PKGS="
|
||||
hyprcursor
|
||||
hyprgraphics
|
||||
hypridle
|
||||
hyprland
|
||||
hyprland-qt-support
|
||||
hyprland-qtutils
|
||||
hyprlang
|
||||
hyprlock
|
||||
hyprpaper
|
||||
hyprpolkitagent
|
||||
hyprsunset
|
||||
hyprutils
|
||||
hyprwayland-scanner
|
||||
xdg-desktop-portal-hyprland
|
||||
xdg-desktop-portal-gtk
|
||||
mako
|
||||
libnotify
|
||||
"
|
||||
|
||||
SOUND_PKGS="
|
||||
pipewire
|
||||
wireplumber
|
||||
pipewire-audio
|
||||
pipewire-alsa
|
||||
pipewire-pulse
|
||||
pavucontrol
|
||||
"
|
||||
UTIL_PKGS="
|
||||
fish
|
||||
neovim
|
||||
uwsm
|
||||
python3
|
||||
util-linux
|
||||
libnewt
|
||||
wofi
|
||||
kitty
|
||||
yazi
|
||||
playerctl
|
||||
flatpak
|
||||
wl-clipboard
|
||||
scx-scheds
|
||||
man-db
|
||||
fastfetch
|
||||
btop
|
||||
file
|
||||
nerd-fonts
|
||||
ffmpeg
|
||||
7zip
|
||||
jq
|
||||
poppler
|
||||
fd
|
||||
ripgrep
|
||||
fzf
|
||||
zoxide
|
||||
imagemagick
|
||||
bat
|
||||
eza
|
||||
npm
|
||||
bc
|
||||
chezmoi
|
||||
github-cli
|
||||
openssh
|
||||
socat
|
||||
otf-font-awesome
|
||||
papirus-icon-theme
|
||||
hicolor-icon-theme
|
||||
noto-fonts-emoji
|
||||
cliphist
|
||||
"
|
||||
|
||||
GUI_PKGS="
|
||||
zen-browser-bin
|
||||
vesktop
|
||||
mangohud
|
||||
goverlay
|
||||
steam
|
||||
gimp
|
||||
gamescope
|
||||
gamemode
|
||||
bluez
|
||||
bluez-utils
|
||||
blueman
|
||||
heroic-games-launcher
|
||||
feh
|
||||
slurp
|
||||
grim
|
||||
"
|
||||
|
||||
PRINT_PKGS="
|
||||
cups
|
||||
cups-browsed
|
||||
"
|
||||
|
||||
THEME_PKGS="
|
||||
catppuccin-gtk-theme-latte
|
||||
"
|
||||
|
||||
PKGS=( $HYPR_PKGS $SOUND_PKGS $UTIL_PKGS $GUI_PKGS $PRINT_PKGS $THEME_PKGS )
|
||||
|
||||
echo "Downloading packages..."
|
||||
sudo pacman -Syu --needed "${PKGS[@]}"
|
||||
|
||||
if ! groups "$USER" | grep -qw "gamemode"; then
|
||||
sudo usermod -aG gamemode "$USER"
|
||||
fi
|
||||
|
||||
if ! echo $PATH | grep -q "$HOME/.local/bin"; then
|
||||
fish -c "fish_add_path \"$HOME/.local/bin\""
|
||||
fi
|
||||
|
||||
if ! echo $SHELL | grep -qw "/usr/bin/fish"; then
|
||||
chsh -s "$(command -v fish)"
|
||||
fi
|
||||
|
||||
if ! pacman -Q yay &>/dev/null; then
|
||||
install_yay
|
||||
else
|
||||
echo "Yay is installed..."
|
||||
fi
|
||||
|
||||
echo "Flatpak install..."
|
||||
|
||||
flatpak update --noninteractive
|
||||
flatpak install --noninteractive com.github.tchx84.Flatseal com.spotify.Client
|
||||
|
||||
echo "Services setup..."
|
||||
|
||||
systemctl --user enable hypridle hyprpolkitagent pipewire-pulse
|
||||
sudo systemctl enable bluetooth cups
|
||||
|
||||
echo -e "${BOLD}${GREEN}All done!${RESET}"
|
||||
@@ -1,8 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Get the volume level and convert it to a percentage
|
||||
volume=$(wpctl get-volume @DEFAULT_SINK@)
|
||||
volume=$(echo "$volume" | awk '{print $2}')
|
||||
volume=$(echo "( $volume * 100 ) / 1" | bc)
|
||||
|
||||
notify-send -t 1000 -a 'wp-vol' -h int:value:$volume "Volume: ${volume}%"
|
||||
@@ -1,9 +0,0 @@
|
||||
#!/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
|
||||
@@ -1,61 +0,0 @@
|
||||
#!/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
|
||||
|
||||
@@ -1,20 +0,0 @@
|
||||
#!/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"
|
||||
@@ -1,123 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
### DEPENDENCIES:
|
||||
## libnotify
|
||||
## feh
|
||||
## grim
|
||||
## slurp
|
||||
## satty
|
||||
## wl-clipboard
|
||||
|
||||
dir_target="$HOME/Obrazy/zrzuty" # where your screenshots are stored
|
||||
file_name="zrzut_$(date +'%H-%M-%S_%d-%m-%Y').png" # name of your screenshot
|
||||
file_path="$dir_target/$file_name" # full path combined of the above
|
||||
tmp_path="/tmp/$file_name" # path of temporary file
|
||||
|
||||
# flags
|
||||
edit=false # edit after screenshotting
|
||||
save=false # save to the disk
|
||||
copy=false # copy to clipboard
|
||||
|
||||
# messages
|
||||
|
||||
error_message="No argument provided. Use -h or --help for help message."
|
||||
help_message="\nUsage: screenShot [flags] [type-of-screen-shot / color (for color picker)\n\nFlags:\n\t-c | --copy \t Copies to clipboard\n\t-s | --save \t Saves to $dir_target\n\t-e | --edit \t Edit screenshot with swappy\n\nTypes:\n\tfullscreen\n\twindow\n\tregion\n"
|
||||
|
||||
# don't go crazy when directory doesn't exist
|
||||
|
||||
if [[ ! -d $dir_target ]]; then
|
||||
echo "Target directory does not exist. Creating..."
|
||||
notify-send "Screenshot" "Target directory does not exist. Creating..."
|
||||
mkdir -p $dir_target
|
||||
fi
|
||||
|
||||
# handle flags
|
||||
while [[ $# -gt 0 ]]; do
|
||||
case "$1" in
|
||||
-c | --copy)
|
||||
copy=true
|
||||
;;
|
||||
-s | --save)
|
||||
save=true
|
||||
;;
|
||||
-e | --edit)
|
||||
edit=true
|
||||
;;
|
||||
-h | --help)
|
||||
echo -e "$help_message"
|
||||
exit 0
|
||||
;;
|
||||
fullscreen | window | region | color)
|
||||
type_of_screenshot="$1"
|
||||
;;
|
||||
*)
|
||||
echo "$error_message"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
# actually screenshot
|
||||
case "$type_of_screenshot" in
|
||||
fullscreen)
|
||||
grim -o $(hyprctl monitors -j | jq -r '.[] | select(.focused == true) | .name') "$tmp_path"
|
||||
;;
|
||||
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}" "$tmp_path"
|
||||
;;
|
||||
region)
|
||||
grim -o $(hyprctl monitors -j | jq -r '.[] | select(.focused == true) | .name') "$tmp_path" && feh --title screenshot --fullscreen "$tmp_path" &
|
||||
sleep 0.5
|
||||
feh_pid=$(pgrep feh)
|
||||
grim -g "$(slurp)" "$tmp_path"
|
||||
echo "Killing feh…"
|
||||
kill -9 "$feh_pid"
|
||||
;;
|
||||
color)
|
||||
grim -o $(hyprctl monitors -j | jq -r '.[] | select(.focused == true) | .name') "$tmp_path" && feh --title screenshot --fullscreen "$tmp_path" &
|
||||
sleep 0.5
|
||||
feh_pid=$(pgrep feh)
|
||||
position=$(slurp -p)
|
||||
sleep 1.0
|
||||
color_hex=$(grim -g "$position" -t ppm - | magick convert - -format '%[pixel:p{0,0}]' txt:- | sed -n '2p' | awk '{print $3}')
|
||||
wl-copy $color_hex
|
||||
notify-send "Color picker" "Copied $color_hex to clipboard"
|
||||
kill -9 "$feh_pid"
|
||||
exit 0
|
||||
;;
|
||||
|
||||
esac
|
||||
|
||||
case "$copy-$save" in
|
||||
"true-true")
|
||||
cp "$tmp_path" "$file_path"
|
||||
wl-copy <"$tmp_path"
|
||||
notify-send -i "$tmp_path" "Screenshot" "Copied and saved to $file_path"
|
||||
;;
|
||||
"false-true")
|
||||
cp "$tmp_path" "$file_path"
|
||||
notify-send -i "$tmp_path" "Screenshot" "Saved screenshot to $file_path"
|
||||
;;
|
||||
"true-false")
|
||||
wl-copy <"$tmp_path"
|
||||
notify-send -i "$tmp_path" "Screenshot" "Copied screenshot"
|
||||
;;
|
||||
"false-false")
|
||||
if [ "$edit" = "true" ]; then
|
||||
satty -f "$tmp_path"
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
rm $tmp_path
|
||||
|
||||
exit 0
|
||||
@@ -1 +0,0 @@
|
||||
/home/szymon/.local/share/steamtinkerlaunch/steamtinkerlaunch
|
||||
Reference in New Issue
Block a user