Moves scripts to own folder

This commit is contained in:
Michel Fedde 2025-06-07 20:47:27 +02:00
parent 36dbfbc689
commit bcb83fb7be
32 changed files with 69 additions and 645 deletions

View file

@ -1,15 +1,14 @@
$mainMod = SUPER
# Default
$scriptsDir = $HOME/.config/hypr/scripts
$scriptsDir = $HOME/.config/scripts
$configs = $HOME/.config/hypr/configs
$files = hyprdrop ghostty --identifier yazi_hyprdrop --args="yazi" --env="PWD=~/"
$term = ghostty
$scriptsDir = $HOME/.config/hypr/scripts
$appLauncher = anyrun
bind = $mainMod, Q, killactive,
bind = $mainMod SHIFT, Q, exec, $scriptsDir/KillActiveProcess.sh
# Special Keys / Hot Keys
bindel = , xf86audioraisevolume, exec, $scriptsDir/Volume.sh --inc # volume up
@ -92,12 +91,11 @@ bindm = $mainMod SHIFT, mouse:272, movewindow
bindm = $mainMod SHIFT, mouse:273, resizewindow
# Stuff
bind = $mainMod SHIFT, C, exec, $scriptsDir/Refresh.sh # Refresh waybar, swaync, rofi
bind = $mainMod, N, exec, $scriptsDir/LockScreen.sh # screen lock
bind = , Print, exec, $scriptsDir/ScreenShot.sh --area # screenshot (area)
bind = , F12, exec, $scriptsDir/ScreenShot.sh --active # screenshot (active window only)
bind = $mainMod SHIFT, N, exec, $scriptsDir/Toolkit.sh # swayNC notification panel
bind = $mainMod SHIFT, N, exec, $scriptsDir/anyrun/Toolkit.sh # swayNC notification panel
bind = $mainMod SHIFT, L, movecurrentworkspacetomonitor, r
@ -110,7 +108,7 @@ bind = $mainMod, Space, fullscreen, 0
# rofi App launcher
#bind = $mainMod, Tab, exec, nwg-drawer -pbexit "wayland-logout" -pbpoweroff "systemctl poweroff" -pbreboot "systemctl reboot"
bind = $mainMod, Tab, exec, anyrun
bind = $mainMod, Tab, exec, $appLauncher
bind = ALT, Tab, exec, hyprswitch gui --mod-key alt --key tab
bind = $mainMod, Return, exec, $term
@ -118,7 +116,7 @@ bind = $mainMod Shift, Return, exec, hyprdrop ghostty --identifier term_hyprdrop
bind = $mainMod, T, exec, $files
bind = $mainMod, R, focusurgentorlast
bind = $mainMod, P, exec, $scriptsDir/Bitwarden.sh
bind = $mainMod, P, exec, $scriptsDir/anyrun/Bitwarden.sh
# Master Layout Keybinds
bind = $mainMod, A, layoutmsg,swapwithmaster master

View file

@ -2,7 +2,6 @@
#Commands & Apps to be executed at launch
$scriptsDir = $HOME/.config/hypr/scripts
$UserScripts = $HOME/.config/hypr/UserScripts
# wallpaper stuff / More wallpaper options below
exec-once = swww-daemon --format xrgb
@ -11,9 +10,6 @@ exec-once = swww-daemon --format xrgb
exec-once = dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP
exec-once = systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP
# Polkit (Polkit Gnome / KDE)
exec-once = $scriptsDir/Polkit.sh
# starup apps
exec-once = waybar &
exec-once = nm-applet --indicator &

View file

@ -5,7 +5,6 @@
general {
lock_cmd = pidof hyprlock || hyprlock # runs hyprlock if it is not already running (this is always run when "loginctl lock-session" is called)
# unlock_cmd = killall hyprlock # kills hyprlock when unlocking (this is always run when "loginctl unlock-session" is called)
before_sleep_cmd = loginctl lock-session # ensures that the session is locked before going to sleep
after_sleep_cmd = hyprctl dispatch dpms on # turn of screen after sleep (not strictly necessary, but just in case)
ignore_dbus_inhibit = false # whether to ignore dbus-sent idle-inhibit requests (used by e.g. firefox or steam)
@ -13,11 +12,11 @@ general {
# turn off screen faster if session is already locked
# (disabled by default)
# listener {
# timeout = 30 # 30 seconds
# on-timeout = pidof hyprlock && hyprctl dispatch dpms off # turns off the screen if hyprlock is active
# on-resume = pidof hyprlock && hyprctl dispatch dpms on # command to run when activity is detected after timeout has fired.
# }
listener {
timeout = 30 # 30 seconds
on-timeout = pidof hyprlock && hyprctl dispatch dpms off # turns off the screen if hyprlock is active
on-resume = pidof hyprlock && hyprctl dispatch dpms on # command to run when activity is detected after timeout has fired.
}
# Warn
listener {
@ -40,10 +39,3 @@ listener {
# on-timeout = hyprctl dispatch dpms off # command to run when timeout has passed
# on-resume = hyprctl dispatch dpms on # command to run when activity is detected after timeout has fired.
# }
# Suspend # disabled by default
# listener {
# timeout = 1200 # 20 min
# on-timeout = systemctl suspend # command to run when timeout has passed
# on-resume = notify-send "Welcome back to your desktop!" # command to run when activity is detected after timeout has fired.
# }

View file

@ -1,161 +0,0 @@
# /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ #
# Hyprlock config for => 2k monitor resolutions
# Original config submitted by https://github.com/SherLock707
# Sourcing colors generated by wallust
source = $HOME/.config/hypr/wallust/wallust-hyprland.conf
$Scripts = $HOME/.config/hypr/scripts
general {
grace = 1
}
background {
monitor =
# NOTE: use only 1 path
#path = screenshot # screenshot of your desktop
path = $HOME/.config/hypr/wallpaper_effects/.wallpaper_modified # NOTE only png supported for now
#path = $HOME/.config/hypr/wallpaper_effects/.wallpaper_current # current wallpaper
#color = $color7
# all these options are taken from hyprland, see https://wiki.hyprland.org/Configuring/Variables/#blur for explanations
blur_size = 2
blur_passes = 1 # 0 disables blurring
noise = 0.0117
contrast = 1.3000 # Vibrant!!!
brightness = 0.8000
vibrancy = 0.2100
vibrancy_darkness = 0.0
}
# Date
label {
monitor =
text = cmd[update:18000000] echo "<b> "$(date +'%A, %-d %B')" </b>"
color = $color12
font_size = 24
font_family = JetBrainsMono Nerd Font ExtraBold
position = 0, -100
halign = center
valign = top
}
# Hour-Time
label {
monitor =
text = cmd[update:1000] echo "$(date +"%H")"
# text = cmd[update:1000] echo "$(date +"%I")" #AM/PM
#color = rgba(255, 185, 0, .8)
color = $color13
font_size = 200
font_family = JetBrainsMono Nerd Font ExtraBold
position = 0, -150
halign = center
valign = top
}
# Minute-Time
label {
monitor =
text = cmd[update:1000] echo "$(date +"%M")"
#color = rgba(15, 10, 222, .8)
color = $color12
font_size = 200
font_family = JetBrainsMono Nerd Font ExtraBold
position = 0, -475
halign = center
valign = top
}
# Seconds-Time
label {
monitor =
text = cmd[update:1000] echo "$(date +"%S")"
# text = cmd[update:1000] echo "$(date +"%S %p")" #AM/PM
color = $color11
font_size = 40
font_family = JetBrainsMono Nerd Font ExtraBold
position = 0, -460
halign = center
valign = top
}
# Put a picture of choice here. Default is the current wallpaper
image {
monitor =
path = $HOME/.config/hypr/wallpaper_effects/.wallpaper_current
size = 160
rounding = -1
border_size = 0
border_color = $color11
rotate = 0
reload_time = -1
position = 0, 400
halign = center
valign = bottom
}
# USER
label {
monitor =
text =  $USER
color = $color13
outline_thickness = 2
dots_size = 0.2 # Scale of input-field height, 0.2 - 0.8
dots_spacing = 0.2 # Scale of dots' absolute size, 0.0 - 1.0
dots_center = true
font_size = 24
font_family = JetBrainsMono Nerd Font ExtraBold
position = 0, 150
halign = center
valign = bottom
}
# INPUT FIELD
input-field {
monitor =
size = 300, 60
outline_thickness = 2
dots_size = 0.2 # Scale of input-field height, 0.2 - 0.8
dots_spacing = 0.2 # Scale of dots' absolute size, 0.0 - 1.0
dots_center = true
outer_color = rgba(0, 0, 0, 0)
inner_color = rgba(255, 255, 255, 0.1)
font_color = $color11
fade_on_empty = false
font_family = JetBrainsMono Nerd Font ExtraBold
placeholder_text = <i><span foreground="##ffffff99">🔒 Type Password</span></i>
hide_input = false
position = 0, 250
halign = center
valign = bottom
}
# uptime
label {
monitor =
text = cmd[update:60000] echo "<b> "$(uptime -p || $Scripts/UptimeNixOS.sh)" </b>"
color = $color13
font_size = 18
font_family = JetBrainsMono Nerd Font ExtraBold
position = 0, 0
halign = right
valign = bottom
}
# weather edit the scripts for locations
# weather scripts are located in ~/.config/hypr/UserScripts Weather.sh and/or Weather.py
# see https://github.com/JaKooLit/Hyprland-Dots/wiki/TIPS#%EF%B8%8F-weather-app-related-for-waybar-and-hyprlock
label {
monitor =
text = cmd[update:3600000] [ -f ~/.cache/.weather_cache ] && cat ~/.cache/.weather_cache
color = $color13
font_size = 18
font_family = JetBrainsMono Nerd Font ExtraBold
position = 50, 0
halign = left
valign = bottom
}

View file

@ -1,12 +0,0 @@
[pyprland]
plugins = [
"scratchpads",
"magnify",
]
[scratchpads.term]
animation = "fromTop"
command = "kitty --class kitty-dropterm"
class = "kitty-dropterm"
size = "75% 60%"

View file

@ -1,42 +0,0 @@
#!/bin/env sh
declare -A actions
actions['Sync']="sync"
actions["Logout"]="logout"
actions["Lock"]="lock"
printSelection() {
echo "$1"
for key in "${!fruits[@]}"
do
echo "Action: $key"
done
}
formattedIDs=$(echo "format:[NAME] ([USERNAME])" | nc -U /tmp/bitwarden-daemon.sock)
selectionList=$(echo "$formattedIDs" | jq 'keys | map("\(.)\n") | add' -r)
actionSelectionList=$(printf "Actions: %s\n" ${!actions[@]})
selection=$(printf "%s\n" "$selectionList" "$actionSelectionList" | anyrun --plugins libstdin.so)
echo "$selection"
if [[ $selection == '' ]]; then
exit 0
fi
if [[ $selection == Actions:* ]]; then
actionKey="${selection:9}"
action="${actions[$actionKey]}"
echo "Performing: $action"
echo "$action:" | nc -U /tmp/bitwarden-daemon.sock
else
id=$(echo "$formattedIDs" | jq ".[\"${selection}\"]" -r)
echo "lookupPassword:$id" | nc -U /tmp/bitwarden-daemon.sock | wl-copy
notify-send "Password copied" "Copied password for '$selection' to clipboard."
fi
exit 0;

View file

@ -1,23 +0,0 @@
#!/bin/bash
# /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ##
# This is for custom version of waybar idle_inhibitor which activates / deactivates hypridle instead
PROCESS="hypridle"
if [[ "$1" == "status" ]]; then
sleep 1
if pgrep -x "$PROCESS" >/dev/null; then
echo '{"text": "RUNNING", "class": "active", "tooltip": "idle_inhibitor NOT ACTIVE\nLeft Click: Activate\nRight Click: Lock Screen"}'
else
echo '{"text": "NOT RUNNING", "class": "notactive", "tooltip": "idle_inhibitor is ACTIVE\nLeft Click: Deactivate\nRight Click: Lock Screen"}'
fi
elif [[ "$1" == "toggle" ]]; then
if pgrep -x "$PROCESS" >/dev/null; then
pkill "$PROCESS"
else
"$PROCESS"
fi
else
echo "Usage: $0 {status|toggle}"
exit 1
fi

View file

@ -1,11 +0,0 @@
#!/bin/bash
# /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ##
# Copied from Discord post. Thanks to @Zorg
# Get id of an active window
active_pid=$(hyprctl activewindow | grep -o 'pid: [0-9]*' | cut -d' ' -f2)
# Close active window
kill $active_pid

View file

@ -1,7 +0,0 @@
#!/bin/bash
# /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ##
# For Hyprlock
pidof hyprlock || hyprlock -q

View file

@ -1,86 +0,0 @@
#!/bin/bash
# /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ##
# Playerctl
iconPath="/usr/share/icons/Qogir/24/actions"
nextIcon="$iconPath/gtk-media-next-ltr.svg"
previousIcon="$iconPath/gtk-media-previous-ltr.svg"
stopIcon="$iconPath/gtk-media-stop.svg"
playIcon="$iconPath/gtk-media-play-ltr.svg"
pauseIcon="$iconPath/gtk-media-pause.svg"
# Play the next track
play_next() {
playerctl next
show_music_notification next
}
# Play the previous track
play_previous() {
playerctl previous
show_music_notification previous
}
# Toggle play/pause
toggle_play_pause() {
playerctl play-pause
show_music_notification toggle
}
# Stop playback
stop_playback() {
playerctl stop
notify-send -e -u low -i $stopIcon " Playback:" " Stopped"
}
# Display notification with song information
show_music_notification() {
sleep 0.5s
status=$(playerctl status)
icon=""
case "$1" in
"next")
icon=$nextIcon
;;
"previous")
icon=$previousIcon
;;
"toggle")
if [[ "$status" == "Paused" ]]; then
icon=$pauseIcon
else
icon=$playIcon
fi
;;
esac
if [[ "$status" == "Playing" ]]; then
song_title=$(playerctl metadata title)
song_artist=$(playerctl metadata artist)
notify-send -e -u low -i $icon "Now Playing:" "$song_title by $song_artist"
elif [[ "$status" == "Paused" ]]; then
notify-send -e -u low -i $icon " Playback:" " Paused"
fi
}
# Get media control action from command line argument
case "$1" in
"--nxt")
play_next
;;
"--prv")
play_previous
;;
"--pause")
toggle_play_pause
;;
"--stop")
stop_playback
;;
*)
echo "Usage: $0 [--nxt|--prv|--pause|--stop]"
exit 1
;;
esac

View file

@ -1,16 +0,0 @@
#!/bin/bash
# /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ##
# For manually starting xdg-desktop-portal-hyprland
sleep 1
killall xdg-desktop-portal-hyprland
killall xdg-desktop-portal-wlr
killall xdg-desktop-portal-gnome
killall xdg-desktop-portal
sleep 1
/usr/lib/xdg-desktop-portal-hyprland &
/usr/libexec/xdg-desktop-portal-hyprland &
sleep 2
/usr/lib/xdg-desktop-portal &
/usr/libexec/xdg-desktop-portal &

View file

@ -1,57 +0,0 @@
#!/bin/bash
# /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ##
# Scripts for refreshing ags, waybar, rofi, swaync, wallust
SCRIPTSDIR=$HOME/.config/hypr/scripts
UserScripts=$HOME/.config/hypr/UserScripts
# Define file_exists function
file_exists() {
if [ -e "$1" ]; then
return 0 # File exists
else
return 1 # File does not exist
fi
}
# Kill already running processes
_ps=(waybar rofi swaync ags)
for _prs in "${_ps[@]}"; do
if pidof "${_prs}" >/dev/null; then
pkill "${_prs}"
fi
done
killall -SIGUSR2 waybar # added since wallust sometimes not applying
# quit ags
ags -q
# relaunch ags
ags &
# Kill waybar & swaync (yet again) # added since wallust sometimes not applying
_ps2=(waybar swaync)
for _prs2 in "${_ps2[@]}"; do
if pidof "${_prs2}" >/dev/null; then
killall "${_prs2}"
fi
done
# relaunch swaync
sleep 0.5
swaync > /dev/null 2>&1 &
#Restart waybar
sleep 1
waybar &
# Relaunching rainbow borders if the script exists
sleep 1
if file_exists "${UserScripts}/RainbowBorders.sh"; then
${UserScripts}/RainbowBorders.sh &
fi
exit 0

View file

@ -1,41 +0,0 @@
#!/bin/bash
# /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ##
# Modified version of Refresh.sh but waybar wont refresh
# Used by automatic wallpaper change
# Modified inorder to refresh rofi background, Wallust, SwayNC only
SCRIPTSDIR=$HOME/.config/hypr/scripts
UserScripts=$HOME/.config/hypr/UserScripts
# Define file_exists function
file_exists() {
if [ -e "$1" ]; then
return 0 # File exists
else
return 1 # File does not exist
fi
}
# Kill already running processes
_ps=(rofi)
for _prs in "${_ps[@]}"; do
if pidof "${_prs}" >/dev/null; then
pkill "${_prs}"
fi
done
# quit ags
ags -q
# Wallust refresh
${SCRIPTSDIR}/WallustSwww.sh &
# Relaunching rainbow borders if the script exists
sleep 1
if file_exists "${UserScripts}/RainbowBorders.sh"; then
${UserScripts}/RainbowBorders.sh &
fi
exit 0

View file

@ -1,148 +0,0 @@
#!/bin/bash
# /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ##
# Screenshots scripts
time=$(date "+%d-%b_%H-%M-%S")
dir="$(xdg-user-dir)/Pictures/Screenshots"
file="Screenshot_${time}_${RANDOM}.png"
active_window_class=$(hyprctl -j activewindow | jq -r '(.class)')
active_window_file="Screenshot_${time}_${active_window_class}.png"
active_window_path="${dir}/${active_window_file}"
notify_cmd_base="notify-send -t 10000 -A action1=Open -A action2=Delete -h string:x-canonical-private-synchronous:shot-notify"
#notify_swappy="notify-send -h string:x-canonical-private-synchronous:shot-notify -u low -i ${iDIR}/picture.png"
notify_cmd_shot="${notify_cmd_base}"
notify_cmd_shot_win="${notify_cmd_base}"
# notify and view screenshot
notify_view() {
if [[ "$1" == "active" ]]; then
if [[ -e "${active_window_path}" ]]; then
resp=$(timeout 5 ${notify_cmd_shot_win} " Screenshot of:" " ${active_window_class} Saved.")
case "$resp" in
action1)
xdg-open "${active_window_path}" &
;;
action2)
rm "${active_window_path}" &
;;
esac
else
${notify_cmd_shot} " Screenshot of:" " ${active_window_class} NOT Saved."
"${sDIR}/Sounds.sh" --error
fi
elif [[ "$1" == "swappy" ]]; then
resp=$(${notify_cmd_shot} " Screenshot:" " Captured by Swappy")
case "$resp" in
action1)
swappy -f - <"$tmpfile"
;;
action2)
rm "$tmpfile"
;;
esac
else
local check_file="${dir}/${file}"
if [[ -e "$check_file" ]]; then
resp=$(timeout 5 ${notify_cmd_shot} " Screenshot" " Saved")
case "$resp" in
action1)
xdg-open "${check_file}" &
;;
action2)
rm "${check_file}" &
;;
esac
else
${notify_cmd_shot} " Screenshot" " NOT Saved"
"${sDIR}/Sounds.sh" --error
fi
fi
}
# countdown
countdown() {
for sec in $(seq $1 -1 1); do
notify-send -h string:x-canonical-private-synchronous:shot-notify -t 1000 -i "$iDIR"/timer.png " Taking shot" " in: $sec secs"
sleep 1
done
}
# take shots
shotnow() {
cd ${dir} && grim - | tee "$file" | wl-copy
sleep 2
notify_view
}
shot5() {
countdown '5'
sleep 1 && cd ${dir} && grim - | tee "$file" | wl-copy
sleep 1
notify_view
}
shot10() {
countdown '10'
sleep 1 && cd ${dir} && grim - | tee "$file" | wl-copy
notify_view
}
shotwin() {
w_pos=$(hyprctl activewindow | grep 'at:' | cut -d':' -f2 | tr -d ' ' | tail -n1)
w_size=$(hyprctl activewindow | grep 'size:' | cut -d':' -f2 | tr -d ' ' | tail -n1 | sed s/,/x/g)
cd ${dir} && grim -g "$w_pos $w_size" - | tee "$file" | wl-copy
notify_view
}
shotarea() {
tmpfile=$(mktemp)
grim -g "$(slurp)" - >"$tmpfile"
if [[ -s "$tmpfile" ]]; then
wl-copy <"$tmpfile"
mv "$tmpfile" "$dir/$file"
fi
notify_view
}
shotactive() {
active_window_class=$(hyprctl -j activewindow | jq -r '(.class)')
active_window_file="Screenshot_${time}_${active_window_class}.png"
active_window_path="${dir}/${active_window_file}"
hyprctl -j activewindow | jq -r '"\(.at[0]),\(.at[1]) \(.size[0])x\(.size[1])"' | grim -g - "${active_window_path}"
sleep 1
notify_view "active"
}
shotswappy() {
tmpfile=$(mktemp)
grim -g "$(slurp)" - >"$tmpfile" && notify_view "swappy"
}
if [[ ! -d "$dir" ]]; then
mkdir -p "$dir"
fi
if [[ "$1" == "--now" ]]; then
shotnow
elif [[ "$1" == "--in5" ]]; then
shot5
elif [[ "$1" == "--in10" ]]; then
shot10
elif [[ "$1" == "--win" ]]; then
shotwin
elif [[ "$1" == "--area" ]]; then
shotarea
elif [[ "$1" == "--active" ]]; then
shotactive
elif [[ "$1" == "--swappy" ]]; then
shotswappy
else
echo -e "Available Options : --now --in5 --in10 --win --area --active --swappy"
fi
exit 0

View file

@ -1,15 +0,0 @@
#!/bin/env sh
SCRIPTS_DIR="$HOME/.config/hypr/scripts"
declare -A scripts
scripts["Shutdown"]="systemctl poweroff"
scripts["Reboot"]="systemctl reboot"
scripts["Logout"]="logout terminate-user $USER"
scripts["Lock"]="$SCRIPTS_DIR/LockScreen.sh"
scripts["Notification Center (SwayNC)"]="swaync-client -t -sw"
selected=$(printf "%s\n" "${!scripts[@]}" | anyrun --plugins libstdin.so)
command="${scripts[$selected]}"
$command

View file

@ -1,143 +0,0 @@
#!/bin/bash
# /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ##
# Scripts for volume controls for audio and mic
iDIR="/usr/share/icons/Qogir/24/actions"
sDIR="$HOME/.config/hypr/scripts"
# Get Volume
get_volume() {
volume=$(pamixer --get-volume)
if [[ "$volume" -eq "0" ]]; then
echo "Muted"
else
echo "$volume %"
fi
}
# Get icons
get_icon() {
current=$(get_volume)
if [[ "$current" == "Muted" ]]; then
echo "$iDIR/audio-volume-muted.svg"
elif [[ "${current%\%}" -le 30 ]]; then
echo "$iDIR/audio-volume-low.svg"
elif [[ "${current%\%}" -le 60 ]]; then
echo "$iDIR/audio-volume-medium.svg"
else
echo "$iDIR/audio-volume-high.svg"
fi
}
# Notify
notify_user() {
if [[ "$(get_volume)" == "Muted" ]]; then
notify-send -e -h string:x-canonical-private-synchronous:volume_notif -u low -i "$(get_icon)" " Volume:" " Muted"
else
notify-send -e -h int:value:"$(get_volume | sed 's/%//')" -h string:x-canonical-private-synchronous:volume_notif -u low -i "$(get_icon)" " Volume Level:" " $(get_volume)" &&
"$sDIR/Sounds.sh" --volume
fi
}
# Increase Volume
inc_volume() {
if [ "$(pamixer --get-mute)" == "true" ]; then
toggle_mute
else
pamixer -i 5 --allow-boost --set-limit 150 && notify_user
fi
}
# Decrease Volume
dec_volume() {
if [ "$(pamixer --get-mute)" == "true" ]; then
toggle_mute
else
pamixer -d 5 && notify_user
fi
}
# Toggle Mute
toggle_mute() {
if [ "$(pamixer --get-mute)" == "false" ]; then
pamixer -m && notify-send -e -u low -i "$iDIR/audio-volume-muted.svg" " Mute"
elif [ "$(pamixer --get-mute)" == "true" ]; then
pamixer -u && notify-send -e -u low -i "$(get_icon)" " Volume:" " Switched ON"
fi
}
# Toggle Mic
toggle_mic() {
if [ "$(pamixer --default-source --get-mute)" == "false" ]; then
pamixer --default-source -m && notify-send -e -u low -i "$iDIR/microphone-mute.png" " Microphone:" " Switched OFF"
elif [ "$(pamixer --default-source --get-mute)" == "true" ]; then
pamixer -u --default-source u && notify-send -e -u low -i "$iDIR/microphone.png" " Microphone:" " Switched ON"
fi
}
# Get Mic Icon
get_mic_icon() {
current=$(pamixer --default-source --get-volume)
if [[ "$current" -eq "0" ]]; then
echo "$iDIR/microphone-mute.png"
else
echo "$iDIR/microphone.png"
fi
}
# Get Microphone Volume
get_mic_volume() {
volume=$(pamixer --default-source --get-volume)
if [[ "$volume" -eq "0" ]]; then
echo "Muted"
else
echo "$volume %"
fi
}
# Notify for Microphone
notify_mic_user() {
volume=$(get_mic_volume)
icon=$(get_mic_icon)
notify-send -e -h int:value:"$volume" -h "string:x-canonical-private-synchronous:volume_notif" -u low -i "$icon" " Mic Level:" " $volume"
}
# Increase MIC Volume
inc_mic_volume() {
if [ "$(pamixer --default-source --get-mute)" == "true" ]; then
toggle_mic
else
pamixer --default-source -i 5 && notify_mic_user
fi
}
# Decrease MIC Volume
dec_mic_volume() {
if [ "$(pamixer --default-source --get-mute)" == "true" ]; then
toggle-mic
else
pamixer --default-source -d 5 && notify_mic_user
fi
}
# Execute accordingly
if [[ "$1" == "--get" ]]; then
get_volume
elif [[ "$1" == "--inc" ]]; then
inc_volume
elif [[ "$1" == "--dec" ]]; then
dec_volume
elif [[ "$1" == "--toggle" ]]; then
toggle_mute
elif [[ "$1" == "--toggle-mic" ]]; then
toggle_mic
elif [[ "$1" == "--get-icon" ]]; then
get_icon
elif [[ "$1" == "--get-mic-icon" ]]; then
get_mic_icon
elif [[ "$1" == "--mic-inc" ]]; then
inc_mic_volume
elif [[ "$1" == "--mic-dec" ]]; then
dec_mic_volume
else
get_volume
fi

View file

@ -1,39 +0,0 @@
#!/bin/bash
# /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ##
# Wallust Colors for current wallpaper
# Define the path to the swww cache directory
cache_dir="$HOME/.cache/swww/"
# Get a list of monitor outputs
monitor_outputs=($(ls "$cache_dir"))
# Initialize a flag to determine if the ln command was executed
ln_success=false
# Get current focused monitor
current_monitor=$(hyprctl monitors | awk '/^Monitor/{name=$2} /focused: yes/{print name}')
echo $current_monitor
# Construct the full path to the cache file
cache_file="$cache_dir$current_monitor"
echo $cache_file
# Check if the cache file exists for the current monitor output
if [ -f "$cache_file" ]; then
# Get the wallpaper path from the cache file
wallpaper_path=$(grep -v 'Lanczos3' "$cache_file" | head -n 1)
echo $wallpaper_path
# symlink the wallpaper to the location Rofi can access
if ln -sf "$wallpaper_path" "$HOME/.config/rofi/.current_wallpaper"; then
ln_success=true # Set the flag to true upon successful execution
fi
# copy the wallpaper for wallpaper effects
cp -r "$wallpaper_path" "$HOME/.config/hypr/wallpaper_effects/.wallpaper_current"
fi
# Check the flag before executing further commands
if [ "$ln_success" = true ]; then
# execute wallust
echo 'about to execute wallust'
# execute wallust skipping tty and terminal changes
wallust run "$wallpaper_path" -s &
fi

View file

@ -1,38 +0,0 @@
#!/bin/bash
# /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ##
# Not my own work. This was added through Github PR. Credit to original author
#----- Optimized bars animation without much CPU usage increase --------
bar="▁▂▃▄▅▆▇█"
dict="s/;//g"
# Calculate the length of the bar outside the loop
bar_length=${#bar}
# Create dictionary to replace char with bar
for ((i = 0; i < bar_length; i++)); do
dict+=";s/$i/${bar:$i:1}/g"
done
# Create cava config
config_file="/tmp/bar_cava_config"
cat >"$config_file" <<EOF
[general]
bars = 10
[input]
method = pulse
source = auto
[output]
method = raw
raw_target = /dev/stdout
data_format = ascii
ascii_max_range = 7
EOF
# Kill cava if it's already running
pkill -f "cava -p $config_file"
# Read stdout from cava and perform substitution in a single sed command
cava -p "$config_file" | sed -u "$dict"

View file

@ -1,138 +0,0 @@
#!/usr/bin/env python3
# /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ #
# weather using python
import subprocess
from pyquery import PyQuery # install using `pip install pyquery`
import json
import os
# original code https://gist.github.com/Surendrajat/ff3876fd2166dd86fb71180f4e9342d7
# weather icons
weather_icons = {
"sunnyDay": "󰖙",
"clearNight": "󰖔",
"cloudyFoggyDay": "",
"cloudyFoggyNight": "",
"rainyDay": "",
"rainyNight": "",
"snowyIcyDay": "",
"snowyIcyNight": "",
"severe": "",
"default": "",
}
# get location_id
# to get your own location_id, go to https://weather.com & search your location.
# once you choose your location, you can see the location_id in the URL(64 chars long hex string)
# like this: https://weather.com/en-PH/weather/today/l/bca47d1099e762a012b9a139c36f30a0b1e647f69c0c4ac28b537e7ae9c1c200
location_id = "bca47d1099e762a012b9a139c36f30a0b1e647f69c0c4ac28b537e7ae9c1c200" # TODO
# NOTE to change to deg F, change the URL to your preffered location after weather.com
# Default is English-Philippines with Busan, South Korea as location_id
# get html page
url = "https://weather.com/en-PH/weather/today/l/" + location_id
html_data = PyQuery(url=url)
# current temperature
temp = html_data("span[data-testid='TemperatureValue']").eq(0).text()
# print(temp)
# current status phrase
status = html_data("div[data-testid='wxPhrase']").text()
status = f"{status[:16]}.." if len(status) > 17 else status
# print(status)
# status code
status_code = html_data("#regionHeader").attr("class").split(" ")[2].split("-")[2]
# print(status_code)
# status icon
icon = (
weather_icons[status_code]
if status_code in weather_icons
else weather_icons["default"]
)
# print(icon)
# temperature feels like
temp_feel = html_data(
"div[data-testid='FeelsLikeSection'] > span > span[data-testid='TemperatureValue']"
).text()
temp_feel_text = f"Feels like {temp_feel}c"
# print(temp_feel_text)
# min-max temperature
temp_min = (
html_data("div[data-testid='wxData'] > span[data-testid='TemperatureValue']")
.eq(1)
.text()
)
temp_max = (
html_data("div[data-testid='wxData'] > span[data-testid='TemperatureValue']")
.eq(0)
.text()
)
temp_min_max = f"{temp_min}\t\t{temp_max}"
# print(temp_min_max)
# wind speed
wind_speed = html_data("span[data-testid='Wind']").text().split("\n")[1]
wind_text = f"{wind_speed}"
# print(wind_text)
# humidity
humidity = html_data("span[data-testid='PercentageValue']").text()
humidity_text = f"{humidity}"
# print(humidity_text)
# visibility
visbility = html_data("span[data-testid='VisibilityValue']").text()
visbility_text = f"{visbility}"
# print(visbility_text)
# air quality index
air_quality_index = html_data("text[data-testid='DonutChartValue']").text()
# print(air_quality_index)
# hourly rain prediction
prediction = html_data("section[aria-label='Hourly Forecast']")(
"div[data-testid='SegmentPrecipPercentage'] > span"
).text()
prediction = prediction.replace("Chance of Rain", "")
prediction = f"\n\n (hourly) {prediction}" if len(prediction) > 0 else prediction
# print(prediction)
# tooltip text
tooltip_text = str.format(
"\t\t{}\t\t\n{}\n{}\n{}\n\n{}\n{}\n{}{}",
f'<span size="xx-large">{temp}</span>',
f"<big> {icon}</big>",
f"<b>{status}</b>",
f"<small>{temp_feel_text}</small>",
f"<b>{temp_min_max}</b>",
f"{wind_text}\t{humidity_text}",
f"{visbility_text}\tAQI {air_quality_index}",
f"<i> {prediction}</i>",
)
# print waybar module data
out_data = {
"text": f"{icon} {temp}",
"alt": status,
"tooltip": tooltip_text,
"class": status_code,
}
print(json.dumps(out_data))
simple_weather =f"{icon} {status}\n" + \
f"{temp} ({temp_feel_text})\n" + \
f"{wind_text} \n" + \
f"{humidity_text} \n" + \
f"{visbility_text} AQI{air_quality_index}\n"
try:
with open(os.path.expanduser("~/.cache/.weather_cache"), "w") as file:
file.write(simple_weather)
except:
pass

View file

@ -1,88 +0,0 @@
#!/bin/bash
# /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ##
# weather info from wttr. https://github.com/chubin/wttr.in
# Remember to add city
city=
cachedir=~/.cache/rbn
cachefile=${0##*/}-$1
if [ ! -d $cachedir ]; then
mkdir -p $cachedir
fi
if [ ! -f $cachedir/$cachefile ]; then
touch $cachedir/$cachefile
fi
# Save current IFS
SAVEIFS=$IFS
# Change IFS to new line.
IFS=$'\n'
cacheage=$(($(date +%s) - $(stat -c '%Y' "$cachedir/$cachefile")))
if [ $cacheage -gt 1740 ] || [ ! -s $cachedir/$cachefile ]; then
data=($(curl -s https://en.wttr.in/"$city"$1\?0qnT 2>&1))
echo ${data[0]} | cut -f1 -d, >$cachedir/$cachefile
echo ${data[1]} | sed -E 's/^.{15}//' >>$cachedir/$cachefile
echo ${data[2]} | sed -E 's/^.{15}//' >>$cachedir/$cachefile
fi
weather=($(cat $cachedir/$cachefile))
# Restore IFSClear
IFS=$SAVEIFS
temperature=$(echo ${weather[2]} | sed -E 's/([[:digit:]]+)\.\./\1 to /g')
#echo ${weather[1]##*,}
# https://fontawesome.com/icons?s=solid&c=weather
case $(echo ${weather[1]##*,} | tr '[:upper:]' '[:lower:]') in
"clear" | "sunny")
condition=""
;;
"partly cloudy")
condition="󰖕"
;;
"cloudy")
condition=""
;;
"overcast")
condition=""
;;
"fog" | "freezing fog")
condition=""
;;
"patchy rain possible" | "patchy light drizzle" | "light drizzle" | "patchy light rain" | "light rain" | "light rain shower" | "mist" | "rain")
condition="󰼳"
;;
"moderate rain at times" | "moderate rain" | "heavy rain at times" | "heavy rain" | "moderate or heavy rain shower" | "torrential rain shower" | "rain shower")
condition=""
;;
"patchy snow possible" | "patchy sleet possible" | "patchy freezing drizzle possible" | "freezing drizzle" | "heavy freezing drizzle" | "light freezing rain" | "moderate or heavy freezing rain" | "light sleet" | "ice pellets" | "light sleet showers" | "moderate or heavy sleet showers")
condition="󰼴"
;;
"blowing snow" | "moderate or heavy sleet" | "patchy light snow" | "light snow" | "light snow showers")
condition="󰙿"
;;
"blizzard" | "patchy moderate snow" | "moderate snow" | "patchy heavy snow" | "heavy snow" | "moderate or heavy snow with thunder" | "moderate or heavy snow showers")
condition=""
;;
"thundery outbreaks possible" | "patchy light rain with thunder" | "moderate or heavy rain with thunder" | "patchy light snow with thunder")
condition=""
;;
*)
condition=""
echo -e "{\"text\":\""$condition"\", \"alt\":\""${weather[0]}"\", \"tooltip\":\""${weather[0]}: $temperature ${weather[1]}"\"}"
;;
esac
#echo $temp $condition
echo -e "{\"text\":\""$temperature $condition"\", \"alt\":\""${weather[0]}"\", \"tooltip\":\""${weather[0]}: $temperature ${weather[1]}"\"}"
cached_weather="$temperature \n$condition ${weather[1]}"
echo -e $cached_weather >~/.cache/.weather_cache

View file

@ -1,57 +0,0 @@
#!/bin/bash
# /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ##
# wlogout (Power, Screen Lock, Suspend, etc)
# Set variables for parameters. First numbers corresponts to Monitor Resolution
# i.e 2160 means 2160p
A_2160=700
B_2160=700
A_1600=650
B_1600=650
A_1440=450
B_1440=450
A_1080=350
B_1080=350
A_720=50
B_720=50
# Check if wlogout is already running
if pgrep -x "wlogout" > /dev/null; then
pkill -x "wlogout"
exit 0
fi
# Detect monitor resolution and scaling factor
resolution=$(hyprctl -j monitors | jq -r '.[] | select(.focused==true) | .height / .scale' | awk -F'.' '{print $1}')
hypr_scale=$(hyprctl -j monitors | jq -r '.[] | select(.focused==true) | .scale')
# Set parameters based on screen resolution and scaling factor
if ((resolution >= 2160)); then
T_val=$(awk "BEGIN {printf \"%.0f\", $A_2160 * 2160 * $hypr_scale / $resolution}")
B_val=$(awk "BEGIN {printf \"%.0f\", $B_2160 * 2160 * $hypr_scale / $resolution}")
echo "Setting parameters for resolution >= 4k"
wlogout --protocol layer-shell -b 6 -T $T_val -B $B_val &
elif ((resolution >= 1600 && resolution < 2160)); then
T_val=$(awk "BEGIN {printf \"%.0f\", $A_1600 * 1600 * $hypr_scale / $resolution}")
B_val=$(awk "BEGIN {printf \"%.0f\", $B_1600 * 1600 * $hypr_scale / $resolution}")
echo "Setting parameters for resolution >= 2.5k and < 4k"
wlogout --protocol layer-shell -b 6 -T $T_val -B $B_val &
elif ((resolution >= 1440 && resolution < 1600)); then
T_val=$(awk "BEGIN {printf \"%.0f\", $A_1440 * 1440 * $hypr_scale / $resolution}")
B_val=$(awk "BEGIN {printf \"%.0f\", $B_1440 * 1440 * $hypr_scale / $resolution}")
echo "Setting parameters for resolution >= 2k and < 2.5k"
wlogout --protocol layer-shell -b 6 -T $T_val -B $B_val &
elif ((resolution >= 1080 && resolution < 1440)); then
T_val=$(awk "BEGIN {printf \"%.0f\", $A_1080 * 1080 * $hypr_scale / $resolution}")
B_val=$(awk "BEGIN {printf \"%.0f\", $B_1080 * 1080 * $hypr_scale / $resolution}")
echo "Setting parameters for resolution >= 1080p and < 2k"
wlogout --protocol layer-shell -b 6 -T $T_val -B $B_val &
elif ((resolution >= 720 && resolution < 1080)); then
T_val=$(awk "BEGIN {printf \"%.0f\", $A_720 * 720 * $hypr_scale / $resolution}")
B_val=$(awk "BEGIN {printf \"%.0f\", $B_720 * 720 * $hypr_scale / $resolution}")
echo "Setting parameters for resolution >= 720p and < 1080p"
wlogout --protocol layer-shell -b 3 -T $T_val -B $B_val &
else
echo "Setting default parameters"
wlogout &
fi

View file

@ -1,5 +0,0 @@
### https://github.com/JaKooLit ###
## https://github.com/JaKooLit/Hyprland-Dots
## This is to have a reference of which version would be
## note that this will always be higher than the released versions

View file

@ -1,21 +0,0 @@
# /* ---- 💫 https://github.com/JaKooLit 💫 ---- */
# /* wallust template - colors-hyprland */
$background = rgb(26272C)
$foreground = rgb(F5F3F2)
$color0 = rgb(4B4C52)
$color1 = rgb(5B4438)
$color2 = rgb(604A3F)
$color3 = rgb(515870)
$color4 = rgb(82756D)
$color5 = rgb(A0865E)
$color6 = rgb(A9A6A3)
$color7 = rgb(E8E5E3)
$color8 = rgb(A2A19F)
$color9 = rgb(7A5A4B)
$color10 = rgb(806254)
$color11 = rgb(6C7596)
$color12 = rgb(AE9B92)
$color13 = rgb(D6B27D)
$color14 = rgb(E2DDD9)
$color15 = rgb(E8E5E3)