aboutsummaryrefslogtreecommitdiffstats
path: root/config/hypr/scripts/KeyHints.sh
blob: 13d4f1e60d790d3711979343108a815290305f99 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
#!/bin/bash
# /* ---- 💫 https://github.com/JaKooLit 💫 ---- */  ##
# Keyhints. Idea got from Garuda Hyprland

# Detect monitor resolution and scale
x_mon=$(hyprctl -j monitors | jq '.[] | select(.focused==true) | .width')
y_mon=$(hyprctl -j monitors | jq '.[] | select(.focused==true) | .height')
hypr_scale=$(hyprctl -j monitors | jq '.[] | select (.focused == true) | .scale' | sed 's/\.//')

# Calculate width and height based on percentages and monitor resolution
width=$((x_mon * hypr_scale / 100))
height=$((y_mon * hypr_scale / 100))

# Set maximum width and height
max_width=1200
max_height=1000

# Set percentage of screen size for dynamic adjustment
percentage_width=70
percentage_height=70

# Calculate dynamic width and height
dynamic_width=$((width * percentage_width / 100))
dynamic_height=$((height * percentage_height / 100))

# Limit width and height to maximum values
dynamic_width=$(($dynamic_width > $max_width ? $max_width : $dynamic_width))
dynamic_height=$(($dynamic_height > $max_height ? $max_height : $dynamic_height))

# Launch yad with calculated width and height
yad --width=$dynamic_width --height=$dynamic_height \
    --center \
    --title="Keybindings" \
    --no-buttons \
    --list \
    --column=Key: \
    --column=Description: \
    --column=Command: \
    --timeout-indicator=bottom \
    "ESC" "close this app" "" "=" "SUPER KEY (Windows Key)" "(SUPER KEY)" \
    " enter" "Terminal" "(kitty)" \
    " or  D" "App Launcher" "(rofi)" \
    " S" "Google Search" "(rofi)" \
    " T" "Open File Manager" "(Thunar)" \
    " Q" "close active window" "(not kill)" \
    " Shift Q " "closes a specified window" "(window)" \
    " Alt V" "Clipboard Manager" "(cliphist)" \
    " W" "Choose wallpaper" "(Wallpaper Menu)" \
    "CTRL ALT W" "Random wallpaper" "(via swww)" \
    " B" "Hide/UnHide Waybar" "waybar" \
    " CTRL B" "Choose waybar styles" "(waybar styles)" \
    " ALT B" "Choose waybar layout" "(waybar layout)" \
    " ALT R" "Reload Waybar swaync Rofi" "CHECK NOTIFICATION FIRST!!!" \
    " SHIFT N" "Launch Notification Panel" "swaync Notification Center" \
    " Print" "screenshot" "(grim)" \
    " Shift Print" "screenshot region" "(grim + slurp)" \
    " Shift S" "screenshot region" "(swappy)" \
    "ALT Print" "Screenshot active window" "active window only" \
    "CTRL ALT P" "power-menu" "(wlogout)" \
    "CTRL ALT L" "screen lock" "(swaylock)" \
    "CTRL ALT Del" "Hyprland Exit" "(SAVE YOUR WORK!!!)" \
    " F" "Fullscreen" "Toggles to full screen" \
    " ALT L" "Toggle Dwindle | Master Layout" "Hyprland Layout" \
    " Shift F" "Toggle float" "single window" \
    " ALT F" "Toggle all windows to float" "all windows" \
    " Shift B" "Toggle Blur" "normal or less blur" \
    " SHIFT G" "Gamemode! All animations OFF or ON" "toggle" \
    " H" "Launch this app" "" \
    " E" "View or EDIT Keybinds, Settings, Monitor" "" \
    "" "" "" \
    "More tips:" "https://github.com/JaKooLit/Hyprland-Dots/wiki" ""
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage