REALLY FUCKING FIXED

This commit is contained in:
coolnsx
2022-12-09 13:39:06 +05:30
parent 251f5340dd
commit fcd970e366
15 changed files with 112 additions and 80 deletions

View File

@@ -1,6 +1,6 @@
#!/bin/sh
for i in $(seq 5);do
notify-send "$(date)" -r 3 -t 1200 &
notify-send -i "/usr/share/icons/Papirus/16x16/panel/clockify-blue.svg" "$(date)" -r 3 -t 1200 &
sleep 1
done

View File

@@ -1,5 +1,6 @@
# See https://wiki.hyprland.org/Configuring/Monitors/
monitor=,preferred,auto,1
$hypr_dir="$HOME/.config/hypr"
# See https://wiki.hyprland.org/Configuring/Keywords/ for more
# For all categories, see https://wiki.hyprland.org/Configuring/Variables/
@@ -25,7 +26,7 @@ general {
gaps_in = 2
gaps_out = 4
border_size = 3
col.active_border = rgba(1affffee)
col.active_border = rgba(D81860FF)
col.inactive_border = rgba(595959aa)
layout = dwindle
@@ -125,7 +126,7 @@ bindm = $mainMod, mouse:273, resizewindow
#applications shortcuts
bind = $mainMod, F4, exec, $HOME/repos_scripts/ani-new
bind = $mainMod, F5, exec, $HOME/.config/hypr/wifi
bind = $mainMod, F5, exec, $hypr_dir/wifi
bind = $mainMod, return, exec, foot
#bind = $mainMod, Q, exec, wofi --show drun
bind = $mainMod, Q, exec, dmenu_run_history
@@ -136,23 +137,25 @@ bind = $mainMod, B, exec, $HOME/repos_scripts/bkmark "add"
bind = $mainMod, I, exec, $HOME/repos_scripts/bkmark
bind = $mainMod SHIFT, B, exec, $HOME/repos_scripts/bkmark "rm"
#bind = $mainMod, S, exec, skypeforlinux
#bind = SUPER_L, P, exec, $HOME/.config/hypr/workspace
bind = $mainMod, F11, exec, $HOME/.config/hypr/info
bind = $mainMod, F10, exec, $HOME/.config/hypr/bluetooth
bind = $mainMod, F6, exec, $HOME/.config/hypr/workspace
bind = $mainMod SHIFT, F6, exec, $HOME/.config/hypr/workspace "toggle"
bind = $mainMod, F1, exec, $HOME/.config/hypr/screenshot 'selclip'
bind = $mainMod SHIFT, F1, exec, $HOME/.config/hypr/screenshot 'fullclip'
bind = ,Print, exec, $HOME/.config/hypr/screenshot 'fullsave'
bind = $mainMod, F12, exec, $HOME/.config/hypr/date
bind = $mainMod, Delete, exec, $HOME/.config/hypr/workspace 'list'
bind = $mainMod, F11, exec, $hypr_dir/info
bind = $mainMod, F10, exec, $hypr_dir/bluetooth
bind = $mainMod, F6, exec, $hypr_dir/workspace
bind = $mainMod SHIFT, F6, exec, $hypr_dir/workspace "toggle"
bind = $mainMod, F1, exec, $hypr_dir/screenshot 'selclip'
bind = $mainMod SHIFT, F1, exec, $hypr_dir/screenshot 'fullclip'
bind = ,Print, exec, $hypr_dir/screenshot 'fullsave'
bind = $mainMod, F12, exec, $hypr_dir/date
bind = $mainMod, Delete, exec, $hypr_dir/workspace 'list'
#media keys
binde=, XF86AudioRaiseVolume, exec, pamixer -i 2 && $HOME/.config/hypr/volume
binde=$mainMod, F2, exec, pamixer -d 2 && $HOME/.config/hypr/volume #my XF86AudioLowerVolume doesn't work
binde=$mainMod, F9, exec, playerctl play-pause
binde=, XF86MonBrightnessDown, exec, light -U 5 && notify-send -h int:value:$(light -G | cut -d'.' -f1) "☀️ " -t 1000 -r 1
binde=, XF86MonBrightnessUp, exec, light -A 5 && notify-send -h int:value:$(light -G | cut -d'.' -f1) "☀️ " -t 1000 -r 1
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, 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 5 && notify-send -i "lol" "☀️ $(light -G | cut -d'.' -f1)" -t 1000 -r 1
binde=, XF86MonBrightnessUp, exec, light -A 5 && notify-send -i "lol" "☀️ $(light -G | cut -d'.' -f1)" -t 1000 -r 1
#windows rules
windowrulev2=workspace 1,class:^(google-chrome)$
@@ -167,8 +170,9 @@ windowrulev2=workspace 4,class:^(pavucontrol)$
#startup applications
exec-once=dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP
exec-once=ssh-agent
exec-once=swaybg -i ~/wall/8.png
exec-once=$HOME/.config/hypr/workspace 'focus'
exec-once=sleep 5 && $HOME/.config/hypr/workspace
exec-once=$HOME/repos_scripts/yt-music loop
exec-once=swaybg -i ~/wall/9.png
exec-once=$hypr_dir/workspace 'focus'
exec-once=sleep 5 && $hypr_dir/workspace
#exec-once=skypeforlinux
exec-once=google-chrome-stable 'https://web.skype.com/?openPstnPage=true'
exec-once=sleep 2 && google-chrome-stable 'https://web.skype.com/?openPstnPage=true'

View File

@@ -10,7 +10,7 @@ while [ $i -le "5" ];do
vol_stats=$(pamixer --get-mute)
[ "$bat_stats" = "Discharging" ] && bat_icon=🔋 || bat_icon=🔌
[ "$vol_stats" = "true" ] && vol_icon=🔇 || vol_icon=🔊
notify-send "<------------(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)" -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🎵 $(cut -d ">" -f1 $HOME/.cache/yt-music/current | cut -d":" -f2)" -r 2 -t 1500 &
: $((i+=1))
sleep 1
done

View File

@@ -1,8 +1,7 @@
#!/bin/sh
x="Screenshot copied to clipboard"
[ "$*" = "fullclip" ] && grim - | wl-copy -t image/png
[ "$*" = "fullsave" ] && grim && x="Screenshot saved"
[ "$*" = "selclip" ] && grim -g "$(slurp)" - | wl-copy -t image/png
notify-send "$x"
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 && notify-send -i "$icon" "Screenshot saved"
[ "$*" = "selclip" ] && grim -g "$(slurp)" - | wl-copy -t image/png && notify-send -i "$icon" "Screenshot copied to clipboard"

View File

@@ -1,5 +1,8 @@
#!/bin/sh
vol_icon=🔊
pamixer --get-mute | sh && vol_icon=🔇
notify-send -h int:value:$(pamixer --get-volume) "$vol_icon" -t 1000 -r 1
vol_int=$(pamixer --get-volume)
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 %" -t 1000 -r 1

View File

@@ -1,7 +1,9 @@
#!/bin/bash
if nmcli radio wifi | grep -q 'enabled' ; then
nmcli radio wifi off
wifi_icon="offline"
else
nmcli radio wifi on
wifi_icon="acquiring"
fi
notify-send "wifi $(nmcli radio wifi)" -r 1
notify-send -i "/usr/share/icons/Papirus/16x16/panel/network-wireless-$wifi_icon.svg" "wifi $(nmcli radio wifi)" -r 1

View File

@@ -1,7 +1,7 @@
#!/bin/sh
setup_dual_monitor(){
sed -i "s/monitor=,preferred,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=,preferred,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"
@@ -11,7 +11,6 @@ setup_dual_monitor(){
done
hyprctl dispatch moveworkspacetomonitor "4 1"
fi
notify-send "done"
}
handle_it(){
@@ -21,7 +20,7 @@ handle_it(){
if [ "$choice" = "Extend" ];then
setup_dual_monitor
else
sed -i "s/monitor=,preferred,auto,1/monitor=,preferred,0x0,1,mirror,eDP-1/g" $HOME/.config/hypr/hyprland.conf
sed -i "s/monitor=,preferred,auto,1/monitor=,1920x1080,0x0,1,mirror,eDP-1/g" $HOME/.config/hypr/hyprland.conf
fi
}
@@ -29,15 +28,15 @@ 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 "$(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/ /')" -r 3 -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 line;do
printf "%s" "$line" | grep -q "monitoradded" && handle_it "$line"
printf "%s" "$line" | grep -q "monitorremoved" && sed -i "s/monitor=,preferred,0x0,1,mirror,eDP-1/monitor=,preferred,auto,1/g" $HOME/.config/hypr/hyprland.conf
notify-send "$(printf "$line" | sed -nE 's_^(workspace)>>([^ ]*)_\1 \2_p')" -r 1 -t 700 2>/dev/null
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
notify-send -i "lol" "$(printf "$line" | sed -nE 's_^(workspace)>>([^ ]*)_\1 \2_p')" -r 1 -t 700 2>/dev/null
done ;;
toggle)
#toggle between mirror and extend setup. this function should be keybinded