mirror of
https://github.com/CoolnsX/hyprdots.git
synced 2025-12-20 07:15:23 +05:30
It's time to go home
This commit is contained in:
@@ -28,7 +28,12 @@ case $1 in
|
||||
sed '/^$/d' "$file" "$oshi_file" | sed -E 's/.*DL: ([^|]*).*/\1/g' | bemenu --fn 'Roboto 15' -i -c -W 0.6 -B 3 -l 30 -p "Put-bookmark :" | tr '\`' '\n' | wl-copy && notify-send "Copied to clipboard" -i "com.github.davidmhewitt.clipped"
|
||||
;;
|
||||
*)
|
||||
wtype -d 10 "$(sed '/^$/d' "$file" "$oshi_file" | sed -E 's/.*DL: ([^|]*).*/\1/g' | bemenu --fn 'Roboto 15' -i -c -W 0.6 -B 3 -l 30 -p "Put-bookmark :" | tr '\`' '\n')"
|
||||
result="$(sed '/^$/d' "$file" "$oshi_file" | sed -E 's/.*DL: ([^|]*).*/\1/g' | bemenu --fn 'Roboto 15' -i -c -W 0.6 -B 3 -l 30 -p "Put-bookmark :" | tr '\`' '\n')"
|
||||
if printf '%s' "$result" | grep -q 'B>';then
|
||||
google-chrome-stable "$(printf '%s' "$result" | cut -d'>' -f2- | tr -d '\n ')"
|
||||
else
|
||||
wtype -d 10 "$result"
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
#!/bin/sh
|
||||
|
||||
for i in $(seq 5);do
|
||||
notify-send -i "/usr/share/icons/Papirus/16x16/panel/clockify-blue.svg" "$(date)" -r 3 -t 1200 &
|
||||
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:date" -t 1200 &
|
||||
sleep 1
|
||||
: $((i-=1))
|
||||
done
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# See https://wiki.hyprland.org/Configuring/Monitors/
|
||||
monitor=,preferred,auto,1
|
||||
monitor=,highres,auto,1
|
||||
$hypr_dir="$HOME/.config/hypr"
|
||||
|
||||
# See https://wiki.hyprland.org/Configuring/Keywords/ for more
|
||||
@@ -149,14 +149,16 @@ bind = $mainMod, F12, exec, $hypr_dir/date
|
||||
bind = $mainMod, Delete, exec, $hypr_dir/workspace 'list'
|
||||
|
||||
#media keys
|
||||
binde=, XF86AudioRaiseVolume, exec, pamixer -i 2 && $hypr_dir/volume
|
||||
#binde=, XF86AudioRaiseVolume, exec, pamixer -i 2 && $hypr_dir/volume
|
||||
binde=$mainMod, F2, exec, pamixer -d 2 && $hypr_dir/volume #my XF86AudioLowerVolume doesn't work
|
||||
binde=$mainMod, F3, exec, pamixer -i 2 && $hypr_dir/volume #my XF86AudioLowerVolume doesn't work,So I don't use XF86AudioRaiseVolume, gives me confusion
|
||||
#binde=, XF86AudioMute, exec, pamixer -t && $hypr_dir/volume #doesn't work either
|
||||
binde=$mainMod, F8, exec, echo cycle pause | socat - "/tmp/mpvsocket"
|
||||
binde=$mainMod SHIFT, F8, exec, $HOME/repos_scripts/yt-music search_play
|
||||
binde=$mainMod, F9, exec, $HOME/repos_scripts/yt-music play_next
|
||||
binde=$mainMod SHIFT, F9, exec, $HOME/repos_scripts/yt-music play_next menu
|
||||
binde=, XF86MonBrightnessDown, exec, light -U 2 && notify-send -i "lol" "☀️ $(light -G | cut -d'.' -f1)" -t 1000 -r 1
|
||||
binde=, XF86MonBrightnessUp, exec, light -A 2 && notify-send -i "lol" "☀️ $(light -G | cut -d'.' -f1)" -t 1000 -r 1
|
||||
binde=, XF86MonBrightnessDown, exec, light -U 2 && notify-send -i "lol" "☀️ $(light -G | cut -d'.' -f1)" -t 1000 -h "string:x-canonical-private-synchronous:brightness"
|
||||
binde=, XF86MonBrightnessUp, exec, light -A 2 && notify-send -i "lol" "☀️ $(light -G | cut -d'.' -f1)" -t 1000 -h "string:x-canonical-private-synchronous:brightness"
|
||||
|
||||
#windows rules
|
||||
windowrulev2=workspace 1,class:^(google-chrome)$
|
||||
|
||||
@@ -1,17 +1,16 @@
|
||||
#!/bin/sh
|
||||
|
||||
i=1
|
||||
while [ $i -le "5" ];do
|
||||
while [ $i -le 5 ];do
|
||||
mem=$(sed -nE 's_.*MemAvailable:[[:space:]]*(.*) kB_\1_p' /proc/meminfo)
|
||||
mem=$(((7919488 - mem)/1000))
|
||||
mem="$(((7919488 - mem)/1000))"
|
||||
temp=$(cat /sys/class/thermal/thermal_zone0/temp)
|
||||
temp=$((temp / 1000))
|
||||
bat_stats=$(cat /sys/class/power_supply/BAT*/status)
|
||||
vol_stats=$(pamixer --get-mute)
|
||||
[ "$bat_stats" = "Discharging" ] && bat_icon=🔋 || bat_icon=🔌
|
||||
[ "$vol_stats" = "true" ] && vol_icon=🔇 || vol_icon=🔊
|
||||
notify-send -i "lol" "<----------(STATS)---------->" "🧠 CPU usage : $(top -ibn1 | sed -nE 's_%Cpu\(s\):(.*)us.*_\1_p' | cut -d' ' -f2-3) %\n🌡️ Cpu Temp : $temp °C\n🔳 RAM : $mem MB / 7733 MB\n$bat_icon Battery : $(cat /sys/class/power_supply/BAT*/capacity) (${bat_stats})\n☀️ Brightness : $(light -G | cut -d'.' -f1)%\n$vol_icon Volume : $(pamixer --get-volume-human)\n🎵 $(pgrep -af mpvsocket >/dev/null && cut -d ">" -f1 /tmp/yt-music/current | cut -d":" -f2)" -r 2 -t 1500 &
|
||||
notify-send -i "lol" "<----------(STATS)---------->" "🧠 CPU usage : $(top -ibn1 | sed -nE 's_%Cpu\(s\):(.*)us.*_\1_p' | cut -d' ' -f2-3) %\n🌡️ Cpu Temp : $temp °C\n🔳 RAM : $mem MB / 7733 MB\n$bat_icon Battery : $(cat /sys/class/power_supply/BAT*/capacity) (${bat_stats})\n☀️ Brightness : $(light -G | cut -d'.' -f1)%\n$vol_icon Volume : $(pamixer --get-volume-human)\n🎵 $(pgrep -af mpvsocket >/dev/null && cut -d ">" -f1 /tmp/yt-music/current | cut -d":" -f2)" -h "string:x-canonical-private-synchronous:stats" -t 1500 &
|
||||
: $((i+=1))
|
||||
sleep 1
|
||||
done
|
||||
|
||||
|
||||
@@ -2,7 +2,8 @@
|
||||
|
||||
vol_int=$(pamixer --get-volume)
|
||||
vol_icon="low"
|
||||
[ "$vol_int" -gt 0 ] && pamixer -u || pamixer -m
|
||||
[ "$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 %" -t 1000 -r 1
|
||||
notify-send -i "/usr/share/icons/Papirus/16x16/panel/audio-volume-$vol_icon.svg" "$vol_int %" -h "string:x-canonical-private-synchronous:volume" -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)" -r 1
|
||||
notify-send -i "/usr/share/icons/Papirus/16x16/panel/network-wireless-$wifi_icon.svg" "wifi $(nmcli radio wifi)" -h "string:x-canonical-private-synchronous:wifi"
|
||||
|
||||
@@ -1,11 +1,10 @@
|
||||
#!/bin/sh
|
||||
|
||||
setup_dual_monitor(){
|
||||
sed -i "s/monitor=,1920x1080,0x0,1,mirror,eDP-1/monitor=,preferred,auto,1/g" "$HOME/.config/hypr/hyprland.conf"
|
||||
sed -i "s/monitor=,1920x1080,0x0,1,mirror,eDP-1/monitor=,highres,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"
|
||||
wlr-randr --output 'HDMI-A-1' --custom-mode '1900x1080@60'
|
||||
for i in $(seq 2 4);do
|
||||
hyprctl dispatch moveworkspacetomonitor "$i 0"
|
||||
done
|
||||
@@ -23,7 +22,7 @@ handle_it(){
|
||||
if [ "$choice" = "Extend" ];then
|
||||
setup_dual_monitor
|
||||
else
|
||||
sed -i "s/monitor=,preferred,auto,1/monitor=,1920x1080,0x0,1,mirror,eDP-1/g" "$HOME/.config/hypr/hyprland.conf"
|
||||
sed -i "s/monitor=,highres,auto,1/monitor=,1920x1080,0x0,1,mirror,eDP-1/g" "$HOME/.config/hypr/hyprland.conf"
|
||||
fi
|
||||
}
|
||||
|
||||
@@ -31,21 +30,21 @@ case $1 in
|
||||
list)
|
||||
#only lists the open applications with their workspace number so u can safely close them
|
||||
for i in $(seq 4);do
|
||||
notify-send -i "lol" "$(hyprctl clients | sed -nE 's_.*class: ([^ ]*).*_\1_p;s_.*workspace: ([^ ]*).*_workspace \1 : _p' | sed 'N;s/\n/ /')" -r 3 -t 1500
|
||||
notify-send -i "lol" "$(hyprctl clients | sed -nE 's_.*class: ([^ ]*).*_\1_p;s_.*workspace: ([^ ]*).*_workspace \1 : _p' | sed 'N;s/\n/ /')" -h "string:x-canonical-private-synchronous:workspace" -t 1500
|
||||
sleep 1
|
||||
done ;;
|
||||
focus)
|
||||
#shows the workspace number as notification whenever u switch workspaces and also handles the dual monitor setup on the fly(perfect for laptop users)
|
||||
socat - "UNIX-CONNECT:/tmp/hypr/$HYPRLAND_INSTANCE_SIGNATURE/.socket2.sock" | while read -r line;do
|
||||
printf "%s" "$line" | grep -q "monitoradded" && handle_it "$line"
|
||||
printf "%s" "$line" | grep -q "monitorremoved" && sed -i "s/monitor=,1920x1080,0x0,1,mirror,eDP-1/monitor=,preferred,auto,1/g" "$HOME/.config/hypr/hyprland.conf" && eww kill && eww open_many time_0 music_0
|
||||
printf "%s" "$line" | grep -q "monitorremoved" && sed -i "s/monitor=,1920x1080,0x0,1,mirror,eDP-1/monitor=,highres,auto,1/g" "$HOME/.config/hypr/hyprland.conf" && eww kill && eww open_many time_0 music_0
|
||||
#recent workspace switcher
|
||||
current=$(printf "%s" "$line" | sed -nE 's_^(workspace)>>([^ ]*)_\1 \2_p')
|
||||
if [ -n "$current" ];then
|
||||
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')" -r 1 -t 700 2>/dev/null
|
||||
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
|
||||
done ;;
|
||||
toggle)
|
||||
#toggle between mirror and extend setup. this function should be keybinded
|
||||
|
||||
Reference in New Issue
Block a user