Skip to content

Commit 2c411ba

Browse files
committed
adding the Keyhint back
1 parent 60dd9b5 commit 2c411ba

File tree

2 files changed

+75
-5
lines changed

2 files changed

+75
-5
lines changed

config/hypr/scripts/KeyHints.sh

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
#!/bin/bash
2+
## /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ##
3+
# Keyhints. Idea got from Garuda Hyprland
4+
5+
# Detect monitor resolution and scale
6+
x_mon=$(hyprctl -j monitors | jq '.[] | select(.focused==true) | .width')
7+
y_mon=$(hyprctl -j monitors | jq '.[] | select(.focused==true) | .height')
8+
hypr_scale=$(hyprctl -j monitors | jq '.[] | select (.focused == true) | .scale' | sed 's/\.//')
9+
10+
# Calculate width and height based on percentages and monitor resolution
11+
width=$((x_mon * hypr_scale / 100))
12+
height=$((y_mon * hypr_scale / 100))
13+
14+
# Set maximum width and height
15+
max_width=1200
16+
max_height=1000
17+
18+
# Set percentage of screen size for dynamic adjustment
19+
percentage_width=70
20+
percentage_height=70
21+
22+
# Calculate dynamic width and height
23+
dynamic_width=$((width * percentage_width / 100))
24+
dynamic_height=$((height * percentage_height / 100))
25+
26+
# Limit width and height to maximum values
27+
dynamic_width=$(($dynamic_width > $max_width ? $max_width : $dynamic_width))
28+
dynamic_height=$(($dynamic_height > $max_height ? $max_height : $dynamic_height))
29+
30+
# Launch yad with calculated width and height
31+
yad --width=$dynamic_width --height=$dynamic_height \
32+
--center \
33+
--title="Keybindings" \
34+
--no-buttons \
35+
--list \
36+
--column=Key: \
37+
--column=Description: \
38+
--column=Command: \
39+
--timeout-indicator=bottom \
40+
"ESC" "close this app" "" "=" "SUPER KEY (Windows Key)" "(SUPER KEY)" \
41+
" enter" "Terminal" "(alacritty)" \
42+
" or  D" "App Launcher" "(AGS)" \
43+
" T" "Open File Manager" "(Nautilus)" \
44+
" Q" "close active window" "(not kill)" \
45+
" Shift Q " "closes a specified window" "(window)" \
46+
" Alt V" "Clipboard Manager" "(cliphist)" \
47+
" ALT R" "Reload Hyprland" "CHECK NOTIFICATION FIRST!!!" \
48+
" Print" "screenshot" "(grim)" \
49+
" Shift Print" "screenshot region" "(grim + slurp)" \
50+
" Shift S" "screenshot region" "(swappy)" \
51+
"ALT Print" "Screenshot active window" "active window only" \
52+
"CTRL ALT P" "power-menu" "(AGS)" \
53+
"CTRL ALT L" "screen lock" "(Hyprlock)" \
54+
"CTRL ALT Del" "Hyprland Exit" "(SAVE YOUR WORK!!!)" \
55+
" F" "Fullscreen" "Toggles to full screen" \
56+
" ALT L" "Toggle Dwindle | Master Layout" "Hyprland Layout" \
57+
" Shift F" "Toggle float" "single window" \
58+
" ALT F" "Toggle all windows to float" "all windows" \
59+
" Shift B" "Toggle Blur" "normal or less blur" \
60+
" SHIFT G" "Gamemode! All animations OFF or ON" "toggle" \
61+
" H" "Launch this app" "" \
62+
" E" "View or EDIT Keybinds, Settings, Monitor" "" \
63+
"" "" "" \
64+
"More tips:" "https://github.com/JaKooLit/Hyprland-Dots/wiki" ""\
65+
66+
67+

config/hypr/scripts/RefreshNoWaybar.sh

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,16 @@ done
2828
# Pywal refresh
2929
${SCRIPTSDIR}/PywalSwww.sh &
3030

31+
# Hyprland Reload
32+
hyprctl reload
33+
killall swaync
3134
# Relaunching rainbow borders if the script exists
32-
sleep 1
33-
if file_exists "${UserScripts}/RainbowBorders.sh"; then
34-
${UserScripts}/RainbowBorders.sh &
35-
fi
35+
#sleep 1
36+
#if file_exists "${UserScripts}/RainbowBorders.sh"; then
37+
# ${UserScripts}/RainbowBorders.sh &
38+
#fi
3639

3740
# for cava-pywal (note, need to manually restart cava once wallpaper changes)
3841
ln -sf "$HOME/.cache/wal/cava-colors" "$HOME/.config/cava/config" || true
3942

40-
exit 0
43+
exit 0

0 commit comments

Comments
 (0)