From 5aec24f5422a08d694a6c6bb30d485fc7f23a8f4 Mon Sep 17 00:00:00 2001 From: Uyanide Date: Wed, 24 Sep 2025 18:33:20 +0200 Subject: [PATCH] delete extension names of scripts --- ...change-colortheme.py => change-colortheme} | 0 .../{change-wallpaper.sh => change-wallpaper} | 4 ++-- .scripts/{fetch-weather.sh => fetch-weather} | 0 ...pr-sdrbrightness.py => hypr-sdrbrightness} | 0 .scripts/{issu.sh => issu} | 0 .../{lyrics-widgets.sh => lyrics-widgets} | 0 .../{pacman-reflector.sh => pacman-reflector} | 0 .scripts/{record-script.sh => record-script} | 0 .scripts/{screenshot.py => screenshot} | 9 ++++++- .scripts/{smb-mount.sh => smb-mount} | 4 +--- .scripts/{smb-unmount.sh => smb-unmount} | 0 .../{truecolor-test.sh => truecolor-test} | 0 .scripts/{waybar-toggle.sh => waybar-toggle} | 0 .../{waydroid-reload.sh => waydroid-reload} | 0 .scripts/{workspace-new.sh => workspace-new} | 0 .scripts/{wsl-mount.sh => wsl-mount} | 4 +--- .scripts/{wsl-unmount.sh => wsl-unmount} | 0 .scripts/{xdph-nuclear.sh => xdph-nuclear} | 0 eww/Lyrics/eww.yuck | 18 +++++++------- eww/Lyrics/scripts/lyric-clear.sh | 6 ++--- hypr/hyprland/execs.conf | 5 +++- hypr/hyprland/keybinds.conf | 24 +++++++++---------- hypr/hyprpaper.conf | 4 ++-- waybar/config.jsonc | 4 ++-- 24 files changed, 44 insertions(+), 38 deletions(-) rename .scripts/{change-colortheme.py => change-colortheme} (100%) rename .scripts/{change-wallpaper.sh => change-wallpaper} (88%) rename .scripts/{fetch-weather.sh => fetch-weather} (100%) rename .scripts/{hypr-sdrbrightness.py => hypr-sdrbrightness} (100%) rename .scripts/{issu.sh => issu} (100%) rename .scripts/{lyrics-widgets.sh => lyrics-widgets} (100%) rename .scripts/{pacman-reflector.sh => pacman-reflector} (100%) rename .scripts/{record-script.sh => record-script} (100%) rename .scripts/{screenshot.py => screenshot} (90%) rename .scripts/{smb-mount.sh => smb-mount} (92%) rename .scripts/{smb-unmount.sh => smb-unmount} (100%) rename .scripts/{truecolor-test.sh => truecolor-test} (100%) rename .scripts/{waybar-toggle.sh => waybar-toggle} (100%) rename .scripts/{waydroid-reload.sh => waydroid-reload} (100%) rename .scripts/{workspace-new.sh => workspace-new} (100%) rename .scripts/{wsl-mount.sh => wsl-mount} (91%) rename .scripts/{wsl-unmount.sh => wsl-unmount} (100%) rename .scripts/{xdph-nuclear.sh => xdph-nuclear} (100%) diff --git a/.scripts/change-colortheme.py b/.scripts/change-colortheme similarity index 100% rename from .scripts/change-colortheme.py rename to .scripts/change-colortheme diff --git a/.scripts/change-wallpaper.sh b/.scripts/change-wallpaper similarity index 88% rename from .scripts/change-wallpaper.sh rename to .scripts/change-wallpaper index cf7b071..64bc9aa 100755 --- a/.scripts/change-wallpaper.sh +++ b/.scripts/change-wallpaper @@ -9,7 +9,7 @@ fi [ -z "$image" ] && exit 1 ext=${image##*.} -current_dir="$HOME/.config/wallpaper_chooser/current" +current_dir="$HOME/.config/wallpaper-chooser/current" image_copied="$current_dir/wallpaper.$ext" temp_img=$(mktemp --suffix=.$ext) || exit 1 @@ -28,4 +28,4 @@ echo "wallpaper = , $image_copied" >>"$HOME/.config/hypr/hyprpaper.conf" notify-send "Wallpaper Changed" "$image" notify-send "Extracting colors from wallpaper" "This may take a few seconds..." -change-colortheme.py -i "$image_copied" || exit 1 +change-colortheme -i "$image_copied" || exit 1 diff --git a/.scripts/fetch-weather.sh b/.scripts/fetch-weather similarity index 100% rename from .scripts/fetch-weather.sh rename to .scripts/fetch-weather diff --git a/.scripts/hypr-sdrbrightness.py b/.scripts/hypr-sdrbrightness similarity index 100% rename from .scripts/hypr-sdrbrightness.py rename to .scripts/hypr-sdrbrightness diff --git a/.scripts/issu.sh b/.scripts/issu similarity index 100% rename from .scripts/issu.sh rename to .scripts/issu diff --git a/.scripts/lyrics-widgets.sh b/.scripts/lyrics-widgets similarity index 100% rename from .scripts/lyrics-widgets.sh rename to .scripts/lyrics-widgets diff --git a/.scripts/pacman-reflector.sh b/.scripts/pacman-reflector similarity index 100% rename from .scripts/pacman-reflector.sh rename to .scripts/pacman-reflector diff --git a/.scripts/record-script.sh b/.scripts/record-script similarity index 100% rename from .scripts/record-script.sh rename to .scripts/record-script diff --git a/.scripts/screenshot.py b/.scripts/screenshot similarity index 90% rename from .scripts/screenshot.py rename to .scripts/screenshot index 9a52e1f..eda139a 100755 --- a/.scripts/screenshot.py +++ b/.scripts/screenshot @@ -7,6 +7,7 @@ import os import gi gi.require_version("Notify", "0.7") from gi.repository import Notify, GLib +from datetime import datetime # autopep8: on SCREENSHOT_DIR = os.path.join( @@ -22,6 +23,12 @@ SCREENSHOT_CMDS = { # full cmd: {cmd}{filename} EDIT_CMD = f"gradia {SCREENSHOT_DIR}{os.sep}" + +def file_name(dir, prefix="screenshot", ext=".png"): + timestamp = datetime.now().strftime("%Y-%m-%d_%H-%M-%S") + return f"{prefix}_{timestamp}{ext}" + + if __name__ == "__main__": parser = argparse.ArgumentParser(description="Take screenshots with hyprshot.") parser.add_argument( @@ -33,7 +40,7 @@ if __name__ == "__main__": # file path os.makedirs(SCREENSHOT_DIR, exist_ok=True) - filename = f"screenshot_{args.type}_{int(os.times().elapsed * 1000)}.png" + filename = file_name(SCREENSHOT_DIR) filepath = os.path.join(SCREENSHOT_DIR, filename) # take screenshot diff --git a/.scripts/smb-mount.sh b/.scripts/smb-mount similarity index 92% rename from .scripts/smb-mount.sh rename to .scripts/smb-mount index cc29157..d0e145b 100755 --- a/.scripts/smb-mount.sh +++ b/.scripts/smb-mount @@ -1,8 +1,6 @@ #!/bin/sh -path="$(dirname "$(realpath "$0")")" - -"$path/issu.sh" && { +"issu" && { echo "Do not run this script in sudo mode." exit 1 } diff --git a/.scripts/smb-unmount.sh b/.scripts/smb-unmount similarity index 100% rename from .scripts/smb-unmount.sh rename to .scripts/smb-unmount diff --git a/.scripts/truecolor-test.sh b/.scripts/truecolor-test similarity index 100% rename from .scripts/truecolor-test.sh rename to .scripts/truecolor-test diff --git a/.scripts/waybar-toggle.sh b/.scripts/waybar-toggle similarity index 100% rename from .scripts/waybar-toggle.sh rename to .scripts/waybar-toggle diff --git a/.scripts/waydroid-reload.sh b/.scripts/waydroid-reload similarity index 100% rename from .scripts/waydroid-reload.sh rename to .scripts/waydroid-reload diff --git a/.scripts/workspace-new.sh b/.scripts/workspace-new similarity index 100% rename from .scripts/workspace-new.sh rename to .scripts/workspace-new diff --git a/.scripts/wsl-mount.sh b/.scripts/wsl-mount similarity index 91% rename from .scripts/wsl-mount.sh rename to .scripts/wsl-mount index 249291c..4c2981e 100755 --- a/.scripts/wsl-mount.sh +++ b/.scripts/wsl-mount @@ -1,8 +1,6 @@ #!/bin/sh -path="$(dirname "$(realpath "$0")")" - -"$path/issu.sh" && { +"issu" && { echo "Do not run this script in sudo mode." exit 1 } diff --git a/.scripts/wsl-unmount.sh b/.scripts/wsl-unmount similarity index 100% rename from .scripts/wsl-unmount.sh rename to .scripts/wsl-unmount diff --git a/.scripts/xdph-nuclear.sh b/.scripts/xdph-nuclear similarity index 100% rename from .scripts/xdph-nuclear.sh rename to .scripts/xdph-nuclear diff --git a/eww/Lyrics/eww.yuck b/eww/Lyrics/eww.yuck index d68f673..190c5a5 100644 --- a/eww/Lyrics/eww.yuck +++ b/eww/Lyrics/eww.yuck @@ -1,9 +1,9 @@ -(defpoll lyriclines :interval "500ms" "~/.local/bin/spotify-lyrics print -l 3 -a 1 -f \"$HOME/.local/state/eww/lyrics/offset\" | Lyrics/scripts/colorize.sh 2") -(deflisten lyricline "~/.local/bin/spotify-lyrics listen -l 1 -f \"$HOME/.local/state/eww/lyrics/offset\"") -(defpoll position :interval "1s" "~/.local/bin/spotify-lyrics position") -(defpoll length :interval "1s" "~/.local/bin/spotify-lyrics length") +(defpoll lyriclines :interval "500ms" "spotify-lyrics print -l 3 -a 1 -f \"$HOME/.local/state/eww/lyrics/offset\" | Lyrics/scripts/colorize.sh 2") +(deflisten lyricline "spotify-lyrics listen -l 1 -f \"$HOME/.local/state/eww/lyrics/offset\"") +(defpoll position :interval "1s" "spotify-lyrics position") +(defpoll length :interval "1s" "spotify-lyrics length") (defpoll offset :interval "1s" "cat $HOME/.local/state/eww/lyrics/offset") -(defpoll play-button :interval "1s" "if ~/.local/bin/spotify-lyrics status; then echo \"󰏤\"; else echo \"󰐊\"; fi") +(defpoll play-button :interval "1s" "if spotify-lyrics status; then echo \"󰏤\"; else echo \"󰐊\"; fi") (defvar hover false) (defwidget lyrics [] @@ -24,7 +24,7 @@ ) (box :class "control-row-1" :space-evenly "false" :orientation "h" (button :class "offset-reset" :onclick "Lyrics/scripts/lyric-offset.py" "󰾅") - (button :class "offset-clear" :onclick "Lyrics/scripts/lyric-clear.sh $(~/.local/bin/spotify-lyrics trackid)" "󰑙") + (button :class "offset-clear" :onclick "Lyrics/scripts/lyric-clear.sh $(spotify-lyrics trackid)" "󰑙") ) ) ) @@ -37,7 +37,7 @@ :space-evenly "false" (scale :orientation "h" :class "player-music-slider" :min 0 :max length :value position - :onchange { hover ? "~/.local/bin/spotify-lyrics set-position {}" : "" }) + :onchange { hover ? "spotify-lyrics set-position {}" : "" }) ) ) (box :class "player-controls-box" @@ -45,7 +45,7 @@ (button :class "player-prev" :onclick "playerctl previous --player=spotify" "󰒮") (button :class "player-pp" :onclick "playerctl play-pause --player=spotify" "${play-button}") (button :class "player-next" :onclick "playerctl next --player=spotify" "󰒭") - (button :class "lyrics-info" :onclick "ghostty -e '\"$HOME/.local/bin/spotify-lyrics\" fetch | less' &" "") + (button :class "lyrics-info" :onclick "ghostty -e '\"spotify-lyrics\" fetch | less' &" "") ) (box :class "offset-box" :vexpand "false" :hexpand "true" :valign "center" :halign "center" :space-evenly "false" :orientation "h" @@ -69,7 +69,7 @@ ) (box :class "control-box-single" :vexpand "false" :hexpand "false" :space-evenly "true" :orientation "v" (box :class "control-row-1-single" :space-evenly "false" :orientation "h" - (button :class "info-single" :onclick "ghostty -e '\"$HOME/.local/bin/spotify-lyrics\" fetch | less' &" "") + (button :class "info-single" :onclick "ghostty -e '\"spotify-lyrics\" fetch | less' &" "") (button :class "offset-plus-single" :onclick "Lyrics/scripts/lyric-offset.py +500" "󰾆") (button :class "offset-reset-single" :onclick "Lyrics/scripts/lyric-offset.py" "󰾅") (button :class "offset-minus-single" :onclick "Lyrics/scripts/lyric-offset.py -500" "󰓅") diff --git a/eww/Lyrics/scripts/lyric-clear.sh b/eww/Lyrics/scripts/lyric-clear.sh index d52a575..75d6e97 100755 --- a/eww/Lyrics/scripts/lyric-clear.sh +++ b/eww/Lyrics/scripts/lyric-clear.sh @@ -1,9 +1,9 @@ #!/bin/sh -if [ -z $1 ]; then - "$HOME/.local/bin/spotify-lyrics" clear +if [ -z "$1" ]; then + "spotify-lyrics" clear notify-send -a "spotify-lyrics" "Cache Cleared" "Lyrics cache have been cleared." else - "$HOME/.local/bin/spotify-lyrics" clear "$1" + "spotify-lyrics" clear "$1" notify-send -a "spotify-lyrics" "Cache Cleared" "Lyrics cache for track $1 have been cleared." fi \ No newline at end of file diff --git a/hypr/hyprland/execs.conf b/hypr/hyprland/execs.conf index f95ce86..2d9381e 100755 --- a/hypr/hyprland/execs.conf +++ b/hypr/hyprland/execs.conf @@ -35,7 +35,10 @@ exec-once = hyprctl plugin load "/usr/lib/libhyprexpo.so" # exec-once = nwg-dock-hyprland -d -i 32 -c "fuzzel" -ico "$HOME/.config/nwg-dock-hyprland/archlinux.png" # Logitech Mouse -exec-once = solaar -w hide 2>&1 >/home/kolkas/solaar.log +exec-once = solaar -w hide # Applications associations exec-once = kbuildsycoca6 + +# Sunshine +exec-once = sunshine diff --git a/hypr/hyprland/keybinds.conf b/hypr/hyprland/keybinds.conf index afa9a0a..be62a80 100755 --- a/hypr/hyprland/keybinds.conf +++ b/hypr/hyprland/keybinds.conf @@ -10,9 +10,9 @@ bind = Super, X, exec, gnome-text-editor # Launch Text Editor bind = Super, B, exec, killall btop || ghostty -e btop # Launch btop (system monitor) bind = Super, Space, exec, eww open main --toggle # Launch dashboard (eww) bind = Super+Shift, V, exec, pavucontrol # Launch pavucontrol (volume mixer) -bind = Super+Shift, K, exec, waybar-toggle.sh close || waybar-toggle.sh open # Toggle waybar -bind = Super+Shift, L, exec, ~/.scripts/lyrics-widgets.sh # Toggle lyrics player -bind = Super+Shift, F, exec, ~/.local/bin/coin # Flip a coin +bind = Super+Shift, K, exec, waybar-toggle close || waybar-toggle open # Toggle waybar +bind = Super+Shift, L, exec, lyrics-widgets # Toggle lyrics player +bind = Super+Shift, F, exec, coin # Flip a coin #! ##! Essentials @@ -27,22 +27,22 @@ bind = , mouse:277, exec, killall rofi || rofi -show drun ##! Actions # Screenshot, Record, OCR, Color picker, Clipboard history bind = Super, V, exec, pkill rofi || cliphist list | rofi -dmenu -config ~/.config/rofi/dmenu.rasi -display-columns 2 -i | cliphist decode | wl-copy # Clipboard history >> clipboard -bind = Super, Period, exec, pkill rofi || ~/.scripts/rofi-emoji # Pick emoji >> clipboard +bind = Super, Period, exec, pkill rofi || rofi-emoji # Pick emoji >> clipboard bind = Ctrl+Alt, Delete, exec, pkill wlogout || wlogout -p layer-shell # [hidden] -bind = Super+Shift, S, exec, screenshot.py area # Screen snip -bind = Super+Ctrl+Shift, S, exec, screenshot.py window # Screen snip (window) -bind = , Print, exec, screenshot.py full # Screen snip (whole screen) +bind = Super+Shift, S, exec, screenshot area # Screen snip +bind = Super+Ctrl+Shift, S, exec, screenshot window # Screen snip (window) +bind = , Print, exec, screenshot full # Screen snip (whole screen) # Color picker bind = Super+Shift, C, exec, hyprpicker -a # Pick color (Hex) >> clipboard # Fullscreen screenshot # bindl=,Print,exec,grim - | wl-copy # Screenshot >> clipboard # bindl= Ctrl,Print, exec, mkdir -p ~/Pictures/Screenshots && ~/.config/ags/scripts/grimblast.sh copysave screen ~/Pictures/Screenshots/Screenshot_"$(date '+%Y-%m-%d_%H.%M.%S')".png # Screenshot >> clipboard & file # Recording stuff -# bind = Super+Alt, R, exec, ~/.config/ags/scripts/record-script.sh # Record region (no sound) -# bind = Ctrl+Alt, R, exec, ~/.config/ags/scripts/record-script.sh --fullscreen # [hidden] Record screen (no sound) -bind = Super+Alt, R, exec, ~/.scripts/record-script.sh --fullscreen-sound # Record screen (with sound) +# bind = Super+Alt, R, exec, ~/.config/ags/scripts/record-script # Record region (no sound) +# bind = Ctrl+Alt, R, exec, ~/.config/ags/scripts/record-script --fullscreen # [hidden] Record screen (no sound) +bind = Super+Alt, R, exec, record-script --fullscreen-sound # Record screen (with sound) # wallpaper -bind = Super+Shift, W, exec, ~/.local/bin/wallpaper_chooser # Launch wallpaper chooser +bind = Super+Shift, W, exec, wallpaper-chooser # Launch wallpaper chooser ##! Session # bind = Ctrl+Super, L, exec, ags run-js 'lock.lock()' # [hidden] @@ -168,6 +168,6 @@ bind = Super+Alt, S, movetoworkspacesilent, special:s bind = Super, P, pin bind = Alt, Tab, cyclenext bind = Super, Tab, hyprexpo:expo, toggle # can be: toggle, select, off/disable or on/enable -bind = Super+Ctrl, T, exec, ~/.scripts/workspace-new.sh # Create new workspace +bind = Super+Ctrl, T, exec, workspace-new # Create new workspace bind = Super, M, exit diff --git a/hypr/hyprpaper.conf b/hypr/hyprpaper.conf index 44d8d38..a871222 100644 --- a/hypr/hyprpaper.conf +++ b/hypr/hyprpaper.conf @@ -1,2 +1,2 @@ -preload = /home/kolkas/.config/wallpaper_chooser/current/wallpaper.png -wallpaper = , /home/kolkas/.config/wallpaper_chooser/current/wallpaper.png +preload = /home/kolkas/.config/wallpaper-chooser/current/wallpaper.png +wallpaper = , /home/kolkas/.config/wallpaper-chooser/current/wallpaper.png diff --git a/waybar/config.jsonc b/waybar/config.jsonc index 0be966e..d8cdfe3 100644 --- a/waybar/config.jsonc +++ b/waybar/config.jsonc @@ -205,7 +205,7 @@ "custom/workspacenew": { "format": "+", "tooltip": false, - "on-click": "~/.scripts/workspace-new.sh" + "on-click": "workspace-new" }, "hyprland/window": { "format": "", @@ -222,7 +222,7 @@ "escape": true, "exec": "$HOME/.config/waybar/modules/mediaplayer.py 2> /dev/null", "on-click": "playerctl play-pause", - "on-click-right": "~/.scripts/lyrics-widgets.sh", + "on-click-right": "lyrics-widgets", "on-scroll-up": "playerctl next", "on-scroll-down": "playerctl previous" },