Muh dotfiles
This commit is contained in:
8
.config/hypr/scripts/check_displays.sh
Executable file
8
.config/hypr/scripts/check_displays.sh
Executable file
@ -0,0 +1,8 @@
|
||||
#!/usr/bin/bash
|
||||
|
||||
while [ 1 ]; do
|
||||
if [[ $(hyprctl monitors) = *HEADLESS* ]]; then
|
||||
~/.config/hypr/scripts/displays.sh eDP-1 ''
|
||||
fi
|
||||
sleep 1
|
||||
done
|
27
.config/hypr/scripts/displays.sh
Executable file
27
.config/hypr/scripts/displays.sh
Executable file
@ -0,0 +1,27 @@
|
||||
#!/usr/bin/bash
|
||||
|
||||
for MON in "$@";
|
||||
do
|
||||
if [[ ${MON::1} == '-' ]]; then
|
||||
STR+="monitor =${MON:1}, disable\n"
|
||||
else
|
||||
hyprctl keyword "monitor $MON,prefferred,auto,1"
|
||||
STR+="monitor = $MON, preferred, auto, 1\n"
|
||||
fi
|
||||
done
|
||||
if [[ $1 ]]; then STR=${STR/auto/0x0}; fi
|
||||
|
||||
|
||||
sleep 2
|
||||
printf "$STR" > ~/.config/hypr/displays.conf
|
||||
|
||||
if [[ $(hyprctl getoption misc:disable_autoreload) =~ int:\ 1 ]];
|
||||
then hyprctl reload; fi
|
||||
|
||||
# Restart programs that have issues
|
||||
sleep 2
|
||||
hyprctl dispatch -- exec "killall gammastep && gammastep -m wayland -PO 4000"
|
||||
hyprctl dispatch -- exec "killall hyprpaper && hyprpaper"
|
||||
hyprctl dispatch -- exec "killall waybar && waybar"
|
||||
|
||||
hyprctl notify 5 1500 "rgb(aa44ff)" " displays"
|
11
.config/hypr/scripts/screenshot.sh
Executable file
11
.config/hypr/scripts/screenshot.sh
Executable file
@ -0,0 +1,11 @@
|
||||
#!/usr/bin/bash
|
||||
# I have no idea what is this script
|
||||
|
||||
grim -s1 -t png -l0 -o "$(hyprctl activeworkspace | grep -Po '(?<=\d\) on monitor ).*?(?=:)')" /tmp/screenshot.png
|
||||
hyprctl dispatch workspace 11
|
||||
swayimg -n /tmp/screenshot.png &
|
||||
IMG_PID=$!
|
||||
sleep 0.2; hyprctl dispatch fullscreen
|
||||
convert -crop $(slurp -odw 2 -B 00000000 -b 00000000 -s 00000000 -c 88CCFF -f "%wx%h+%X+%Y") /tmp/screenshot.png - | wl-copy -t image/png
|
||||
hyprctl dispatch workspace previous
|
||||
kill $IMG_PID
|
11
.config/hypr/scripts/xdph.sh
Executable file
11
.config/hypr/scripts/xdph.sh
Executable file
@ -0,0 +1,11 @@
|
||||
#!/usr/bin/bash
|
||||
|
||||
sleep 1
|
||||
killall -e xdg-desktop-portal-hyprland
|
||||
killall -e xdg-desktop-portal-wlr
|
||||
killall xdg-desktop-portal
|
||||
/usr/lib/xdg-desktop-portal-hyprland &
|
||||
hyprctl notify -1 2000 "rgb(00ffff)" "XDPH"
|
||||
sleep 2
|
||||
/usr/lib/xdg-desktop-portal &
|
||||
hyprctl notify -1 1000 "rgb(00ffff)" "XDP"
|
Reference in New Issue
Block a user