Tried my first script but it failed... #866
Unanswered
marcchabot
asked this question in
Q&A
Replies: 2 comments 1 reply
-
Try with full path so instead of |
Beta Was this translation helpful? Give feedback.
0 replies
-
I forgot to mention that I tried it too with same results. It's so weird...
Marc
Le jeu. 17 avr. 2025, 01 h 10, ArekKubinski ***@***.***> a
écrit :
… Try with full path so instead of ~/.config/hypr/scripts/toggle-res.sh ->
/home/marc/.config/hypr/scripts/toggle-res.sh
—
Reply to this email directly, view it on GitHub
<#866 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABDGHOOPGXNFXCZF2XKDS332Z4ZU7AVCNFSM6AAAAAB3JTFP46VHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTEOBWGI2TMNI>
.
You are receiving this because you authored the thread.Message ID:
***@***.***
com>
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi guys,
I wrote a script to easily toggle between 2 screen resolutions that I<d tried to bind to SUPER+R but I'm getting "Config error in file /home/marc/dotfiles/.config/hypr/hyprland.conf at line 72: Config error in file /home/marc/.config/conf/custom.conf at line 29: Invalid dispatcher, requested "~/.config/hypr/scripts/toggle-res.sh" does not exist
The this is that the file is there and I made sure to make it executable by doing "sudo chmod +x toggle-res.sh"
What did I miss?
here is my scripts:
#!/bin/bash
HYPRCTL="hyprctl"
MONITOR="HDMI-A-1" # Replace with your monitor's name
RES1="1920x1080@240" # Resolution 1
RES2="3840X2160@240" # Resolution 2
CURRENT_RES="$("$HYPRCTL" getoption monitor."$MONITOR".resolution -j | jq -r '.str')"
if [[ "$CURRENT_RES" == "$RES1" ]]; then
NEW_RES="$RES2"
else
NEW_RES="$RES1"
fi
$HYPRCTL keyword monitor,"$MONITOR","$NEW_RES",0
notify-send "Hyprland Resolution" "$MONITOR: $NEW_RES"
Thanks for your help
Beta Was this translation helpful? Give feedback.
All reactions