mirror of
https://github.com/CoolnsX/hyprdots.git
synced 2025-12-20 07:15:23 +05:30
...
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
#!/bin/sh
|
||||
|
||||
remind() {
|
||||
notify-send -i "$icon_dir/battery-010.svg" -h "string:x-canonical-private-synchronous:${0##*/}" "$1 % Battery $2, Please Plugin Charger!!" -u "$2"
|
||||
notify-send -e -i "$icon_dir/battery-010.svg" -h "string:x-canonical-private-synchronous:${0##*/}" "$1 % Battery $2, Please Plugin Charger!!" -u "$2"
|
||||
}
|
||||
|
||||
print_sleep() {
|
||||
|
||||
@@ -5,7 +5,7 @@ menu() {
|
||||
}
|
||||
|
||||
notify() {
|
||||
notify-send "$1" -h "string:x-canonical-private-synchronous:${0##*/}" -i "$2" -u "${3:-normal}"
|
||||
notify-send -e "$1" -h "string:x-canonical-private-synchronous:${0##*/}" -i "$2" -u "${3:-normal}"
|
||||
}
|
||||
|
||||
download_emoji_file(){
|
||||
|
||||
12
hypr/bkmark
12
hypr/bkmark
@@ -14,22 +14,22 @@ menu() {
|
||||
case $1 in
|
||||
add)
|
||||
if [ -z "$data" ]; then
|
||||
notify-send "Please select anything to bookmark"
|
||||
notify-send -e "Please select anything to bookmark"
|
||||
elif grep -q "${data}" "$file"; then
|
||||
notify-send -i "bookmark-missing" "Already bookmarked"
|
||||
notify-send -e -i "bookmark-missing" "Already bookmarked"
|
||||
else
|
||||
printf "%s" "$data" >>"$file"
|
||||
notify-send -i "user-bookmarks" "Bookmarked" "$data"
|
||||
notify-send -e -i "user-bookmarks" "Bookmarked" "$data"
|
||||
fi
|
||||
;;
|
||||
rm)
|
||||
data="$(sed '/^$/d' "$file" | nl -n'ln')"
|
||||
[ -z "$data" ] && notify-send "Bookmark is empty" && exit 0
|
||||
[ -z "$data" ] && notify-send -e "Bookmark is empty" && exit 0
|
||||
del=$(printf "%s" "$data" | menu "delete-bookmark :" | cut -f1)
|
||||
[ -z "$del" ] || (sed -i "${del}d" "$file" && notify-send -i "bookmark-missing" "Bookmark deleted" -u critical)
|
||||
[ -z "$del" ] || (sed -i "${del}d" "$file" && notify-send -e -i "bookmark-missing" "Bookmark deleted" -u critical)
|
||||
;;
|
||||
copy)
|
||||
sed '/^$/d' "$file" "$oshi_file" | sed -E 's/.*DL: ([^|]*).*/\1/g' | menu "COPY-bookmark :" | tr '\`' '\n' | wl-copy && notify-send "Copied to clipboard" -i "com.github.davidmhewitt.clipped"
|
||||
sed '/^$/d' "$file" "$oshi_file" | sed -E 's/.*DL: ([^|]*).*/\1/g' | menu "COPY-bookmark :" | tr '\`' '\n' | wl-copy && notify-send -e "Copied to clipboard" -i "com.github.davidmhewitt.clipped"
|
||||
;;
|
||||
*)
|
||||
result="$(sed '/^$/d' "$file" "$oshi_file" | sed -E 's/.*DL: ([^|]*).*/\1/g' | menu "Put-bookmark :" | tr '\`' '\n')"
|
||||
|
||||
@@ -36,7 +36,7 @@ increment=${2:-5} # [ default:5, optional] "around 2% brightness"
|
||||
[ "$opr" = "s" ] && printf "%s" "$((${current}00/${max}))" && exit 0
|
||||
|
||||
#validation
|
||||
(! printf '%s' "$opr" | grep -qE '[+-]') && notify-send -u critical "Unknown Operator, use only + or -" && exit 1
|
||||
(! printf '%s' "$opr" | grep -qE '[+-]') && notify-send -e -u critical "Unknown Operator, use only + or -" && exit 1
|
||||
|
||||
#shellcheck disable=SC2086,SC1102
|
||||
new="$(( $current $opr $increment ))"
|
||||
@@ -49,4 +49,4 @@ new="$(( $current $opr $increment ))"
|
||||
printf '%s' "$new" > "$brightness_file"
|
||||
|
||||
#shellcheck disable=SC2004
|
||||
notify-send -i "lol" "☀️ $((${new}00/${max}))" -t 1000 -h "string:x-canonical-private-synchronous:${0##*/}"
|
||||
notify-send -e -i "lol" "☀️ $((${new}00/${max}))" -t 1000 -h "string:x-canonical-private-synchronous:${0##*/}"
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
i=5
|
||||
while [ $i -gt 0 ]; do
|
||||
notify-send -i "/usr/share/icons/Papirus/16x16/panel/clockify-blue.svg" "$(date)" -h "string:x-canonical-private-synchronous:${0##*/}" -t 1200 &
|
||||
notify-send -e -i "/usr/share/icons/Papirus/16x16/panel/clockify-blue.svg" "$(date)" -h "string:x-canonical-private-synchronous:${0##*/}" -t 1200 &
|
||||
sleep 1
|
||||
: $((i -= 1))
|
||||
done
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
# See https://wiki.hyprland.org/Configuring/Monitors/
|
||||
monitor=,highrr,auto,1.5,bitdepth,10
|
||||
#monitor=,2880x1800@120.000999,auto,1.5,bitdepth,10
|
||||
monitor=HDMI-A-1,3840x2160,auto,2,bitdepth,10
|
||||
|
||||
$hypr_dir="$HOME/.config/hypr"
|
||||
$accent=D81860
|
||||
#$browser=google-chrome-stable
|
||||
$browser=firefox
|
||||
$accent=6FAAFF
|
||||
$browser=google-chrome-stable
|
||||
#$browser=firefox
|
||||
|
||||
#envs
|
||||
env = BROWSER,$browser
|
||||
@@ -219,7 +219,7 @@ exec-once=dbus-update-activation-environment --systemd --all
|
||||
exec-once=ssh-agent
|
||||
exec-once=/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1
|
||||
exec-once=node $HOME/github/arrpc/src > /tmp/arrpc-log
|
||||
exec-once=swaybg -i $HOME/.config/wall/4.png -m fill
|
||||
exec-once=swaybg -i $HOME/.config/wall/3.png -m fill
|
||||
exec-once=sleep 5 && xrdb -merge $HOME/.config/.Xresource
|
||||
exec-once=$hypr_dir/workspace 'focus'
|
||||
exec-once=$hypr_dir/battery
|
||||
|
||||
@@ -14,6 +14,6 @@ top -ibn5 -d1 | while read -r line;do
|
||||
charge=$(cat /sys/class/power_supply/BAT0/capacity)
|
||||
[ "$bat_stats" = "Discharging" ] && { [ "$charge" -lt 20 ] && bat_icon=🪫 || bat_icon=🔋 ;} || bat_icon=🔌
|
||||
[ "$vol_stats" = "muted" ] && vol_icon=🔇 || vol_icon=🔊
|
||||
notify-send -i "lol" "<----------(STATS)---------->" "🧠 CPU usage : $cpu\n🌡️ Cpu Temp : $temp °C\n🔳 RAM : $mem\n$bat_icon Battery : $charge (${bat_stats})\n☀️ Brightness : $("$(dirname "$0")"/brightness s)%\n$vol_icon Volume : $vol_stats\n🎵 $(cut -d ">" -f1 /tmp/yt-music/current 2>/dev/null | cut -d":" -f2)" -h "string:x-canonical-private-synchronous:${0##*/}" -t 1500 &
|
||||
notify-send -e -i "lol" "<----------(STATS)---------->" "🧠 CPU usage : $cpu\n🌡️ Cpu Temp : $temp °C\n🔳 RAM : $mem\n$bat_icon Battery : $charge (${bat_stats})\n☀️ Brightness : $("$(dirname "$0")"/brightness s)%\n$vol_icon Volume : $vol_stats\n🎵 $(cut -d ">" -f1 /tmp/yt-music/current 2>/dev/null | cut -d":" -f2)" -h "string:x-canonical-private-synchronous:${0##*/}" -t 1500 &
|
||||
fi
|
||||
done
|
||||
|
||||
@@ -4,15 +4,15 @@ gamedir="$HOME/games"
|
||||
|
||||
games=$(find "$gamedir" -maxdepth 2 -type f -name '*.exe' -executable | sed "s|$gamedir/||g;/[U|u]nin.*/d")
|
||||
|
||||
[ -z "$games" ] && notify-send -u critical "No games installed" && exit 1
|
||||
[ -z "$games" ] && notify-send -e -u critical "No games installed" && exit 1
|
||||
game=$(printf '%s\n' "$games" | bemenu --fn 'JetBrainsMono Nerd Font 15' -i -c -W 0.5 -B 3 -p "PLAY GAME: " -l 15 -P ">> " --bdr="#$GLOBAL_ACCENT" --tf="#$GLOBAL_ACCENT" --hf="#$GLOBAL_ACCENT")
|
||||
|
||||
[ -z "$game" ] && notify-send -h "string:x-canonical-private-synchronous:${0##*/}" -u critical "No game selected" && exit 1
|
||||
[ -z "$game" ] && notify-send -e -h "string:x-canonical-private-synchronous:${0##*/}" -u critical "No game selected" && exit 1
|
||||
|
||||
cd "$(dirname "$gamedir"/"$game")" || (notify-send -h "string:x-canonical-private-synchronous:${0##*/}" -u critical "Directory Not found" && exit 1)
|
||||
cd "$(dirname "$gamedir"/"$game")" || (notify-send -e -h "string:x-canonical-private-synchronous:${0##*/}" -u critical "Directory Not found" && exit 1)
|
||||
|
||||
gamename=$(basename "$game")
|
||||
|
||||
notify-send -h "string:x-canonical-private-synchronous:${0##*/}" -i "wine" "Launching $gamename"
|
||||
notify-send -e -h "string:x-canonical-private-synchronous:${0##*/}" -i "wine" "Launching $gamename"
|
||||
|
||||
WINEFSYNC=1 WINEESYNC=1 MANGOHUD=1 gamemoderun wine "$gamename"
|
||||
|
||||
@@ -2,6 +2,6 @@
|
||||
|
||||
icon="/usr/share/icons/Papirus/16x16/apps/applets-screenshooter.svg"
|
||||
killall grim slurp
|
||||
[ "$*" = "fullclip" ] && grim - | wl-copy -t image/png && notify-send -i "$icon" "Screenshot copied to clipboard"
|
||||
[ "$*" = "fullsave" ] && grim "$HOME/Pictures/$(date -u "+%Y-%m-%d_%H-%M-%S").png" && notify-send -i "$icon" "Screenshot saved"
|
||||
[ "$*" = "selclip" ] && grim -g "$(slurp)" - | wl-copy -t image/png && notify-send -i "$icon" "Screenshot copied to clipboard"
|
||||
[ "$*" = "fullclip" ] && grim - | wl-copy -t image/png && notify-send -e -i "$icon" "Screenshot copied to clipboard"
|
||||
[ "$*" = "fullsave" ] && grim "$HOME/Pictures/$(date -u "+%Y-%m-%d_%H-%M-%S").png" && notify-send -e -i "$icon" "Screenshot saved"
|
||||
[ "$*" = "selclip" ] && grim -g "$(slurp)" - | wl-copy -t image/png && notify-send -e -i "$icon" "Screenshot copied to clipboard"
|
||||
|
||||
@@ -6,4 +6,4 @@ vol_icon="low"
|
||||
[ "$vol_int" -gt 33 ] && vol_icon="medium"
|
||||
[ "$vol_int" -gt 66 ] && vol_icon="high"
|
||||
pamixer --get-mute | sh && vol_icon="muted"
|
||||
notify-send -i "/usr/share/icons/Papirus/16x16/panel/audio-volume-$vol_icon.svg" "$vol_int %" -h "string:x-canonical-private-synchronous:${0##*/}" -t 1000
|
||||
notify-send -e -i "/usr/share/icons/Papirus/16x16/panel/audio-volume-$vol_icon.svg" "$vol_int %" -h "string:x-canonical-private-synchronous:${0##*/}" -t 1000
|
||||
|
||||
@@ -6,4 +6,4 @@ else
|
||||
nmcli radio wifi on
|
||||
wifi_icon="acquiring"
|
||||
fi
|
||||
notify-send -i "/usr/share/icons/Papirus/16x16/panel/network-wireless-$wifi_icon.svg" "wifi $(nmcli radio wifi)" -h "string:x-canonical-private-synchronous:${0##*/}"
|
||||
notify-send -e -i "/usr/share/icons/Papirus/16x16/panel/network-wireless-$wifi_icon.svg" "wifi $(nmcli radio wifi)" -h "string:x-canonical-private-synchronous:${0##*/}"
|
||||
|
||||
@@ -4,7 +4,7 @@ setup_dual_monitor() {
|
||||
sed -i "s/monitor=,1920x1080,0x0,1,mirror,eDP-1/monitor=,highrr,auto,1/g" "$HOME/.config/hypr/hyprland.conf"
|
||||
sleep 2
|
||||
if hyprctl monitors | grep -q "HDMI-A-1"; then
|
||||
notify-send "Setting up dual monitor workflow"
|
||||
notify-send -e "Setting up dual monitor workflow"
|
||||
hyprctl dispatch moveworkspacetomonitor "1 0"
|
||||
hyprctl dispatch moveworkspacetomonitor "2 0"
|
||||
hyprctl dispatch moveworkspacetomonitor "3 0"
|
||||
@@ -15,10 +15,10 @@ setup_dual_monitor() {
|
||||
}
|
||||
|
||||
handle_it() {
|
||||
[ -z "$1" ] || notify-send "$1"
|
||||
[ -z "$1" ] || notify-send -e "$1"
|
||||
choice=$(printf "Mirror\nExtend" | bemenu --fn 'Roboto 15' -i -c -W 0.2 -B 3 -l 20 -p "what to do??: " -m 1 --bdr="#$GLOBAL_ACCENT" --tf="#$GLOBAL_ACCENT" --hf="#$GLOBAL_ACCENT")
|
||||
[ -z "$choice" ] && return 0
|
||||
notify-send "${choice}ing screen"
|
||||
notify-send -e "${choice}ing screen"
|
||||
if [ "$choice" = "Extend" ]; then
|
||||
setup_dual_monitor
|
||||
else
|
||||
@@ -31,7 +31,7 @@ case $1 in
|
||||
#only lists the open applications with their workspace number so u can safely close them
|
||||
i=4
|
||||
while [ $i -gt 0 ]; do
|
||||
notify-send -i "lol" "Running Apps" "$(hyprctl clients | tr '\n' ',' | sed 's|,,|\n|g' | sed -nE 's|.*workspace: ([0-9]).*class: ([^,]*).*xwayland: ([^,]).*|workspace \1: \2 (xway: \3)|p')" -h "string:x-canonical-private-synchronous:${0##*/}" -t 1500
|
||||
notify-send -e -i "lol" "Running Apps" "$(hyprctl clients | tr '\n' ',' | sed 's|,,|\n|g' | sed -nE 's|.*workspace: ([0-9]).*class: ([^,]*).*xwayland: ([^,]).*|workspace \1: \2 (xway: \3)|p')" -h "string:x-canonical-private-synchronous:${0##*/}" -t 1500
|
||||
: $((i -= 1))
|
||||
sleep 1
|
||||
done
|
||||
@@ -47,7 +47,7 @@ case $1 in
|
||||
cat /tmp/workcurr >/tmp/workprev
|
||||
printf "%s" "$current" >/tmp/workcurr
|
||||
fi
|
||||
notify-send -i "lol" "$(printf "%s" "$line" | sed -nE 's_^(workspace)>>([^ ]*)_\1 \2_p')" -h "string:x-canonical-private-synchronous:monitor" -t 700 2>/dev/null
|
||||
notify-send -e -i "lol" "$(printf "%s" "$line" | sed -nE 's_^(workspace)>>([^ ]*)_\1 \2_p')" -h "string:x-canonical-private-synchronous:monitor" -t 700 2>/dev/null
|
||||
done
|
||||
;;
|
||||
toggle)
|
||||
|
||||
Reference in New Issue
Block a user