delete extension names of scripts

This commit is contained in:
2025-09-24 18:33:20 +02:00
parent eccc63e44a
commit 5aec24f542
24 changed files with 44 additions and 38 deletions

View File

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

View File

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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