Skip to content

Commit e125db1

Browse files
hypr: add example key mappings
1 parent ef13861 commit e125db1

File tree

2 files changed

+174
-0
lines changed

2 files changed

+174
-0
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
3030
- dev: `mkdocs-debug` make task for verbose output to debug issues
3131
- cli: starship.rs cross-shell prompt with customised Catppuccin Mocka theme
3232
- zsh: launch starship.rs shell prompt
33+
- cli: sharship.rs cross-shell prompt with customised Catppuccin Mocka theme
34+
- hypr: add example key mappings
3335

3436
### Changed
3537
- git: restructure multiple configs, using relative include file paths

hypr/keybindings.conf

Lines changed: 172 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,172 @@
1+
# █▄▀ █▀▀ █▄█ █▄▄ █ █▄░█ █▀▄ █ █▄░█ █▀▀ █▀
2+
# █░█ ██▄ ░█░ █▄█ █ █░▀█ █▄▀ █ █░▀█ █▄█ ▄█
3+
4+
# See https://wiki.hyprland.org/Configuring/Keywords/
5+
# & https://wiki.hyprland.org/Configuring/Binds/
6+
7+
# Main modifier
8+
$mainMod = Super # super / meta / windows key
9+
10+
# Assign apps
11+
$term = kitty
12+
$editor = nvim
13+
# $file = dolphin
14+
$file = nautilus
15+
$browser = firefox
16+
17+
# Window/Session actions
18+
bindd = $mainMod+Shift, P,Color Picker , exec, hyprpicker -a # Pick color (Hex) >> clipboard#
19+
bind = $mainMod, Q, exec, $scrPath/dontkillsteam.sh # close focused window
20+
bind = Alt, F4, exec, $scrPath/dontkillsteam.sh # close focused window
21+
bind = $mainMod, Delete, exit, # kill hyprland session
22+
bind = $mainMod, W, togglefloating, # toggle the window between focus and float
23+
bind = $mainMod, G, togglegroup, # toggle the window between focus and group
24+
bind = Alt, Return, fullscreen, # toggle the window between focus and fullscreen
25+
bind = $mainMod, L, exec, swaylock # launch lock screen
26+
bind = $mainMod+Shift, F, exec, $scrPath/windowpin.sh # toggle pin on focused window
27+
bind = $mainMod, Backspace, exec, $scrPath/logoutlaunch.sh # launch logout menu
28+
bind = Ctrl+Alt, W, exec, killall waybar || (env reload_flag=1 $scrPath/wbarconfgen.sh) # toggle waybar and reload config
29+
#bind = Ctrl+Alt, W, exec, killall waybar || waybar # toggle waybar without reloading, this is faster
30+
31+
# Application shortcuts
32+
bind = $mainMod, return, exec, $term # launch terminal emulator
33+
bind = $mainMod, E, exec, $file # launch file manager
34+
bind = $mainMod, C, exec, $editor # launch text editor
35+
bind = $mainMod, B, exec, $browser # launch web browser
36+
# bind = Ctrl+Shift, Escape, exec, $scrPath/sysmonlaunch.sh # launch system monitor (htop/btop or fallback to top)
37+
bind = $mainMod, M, exec, $scrPath/sysmonlaunch.sh # launch system monitor (htop/btop or fallback to top)
38+
39+
# Rofi menus
40+
bind = $mainMod, space, exec, pkill -x rofi || $scrPath/rofilaunch.sh d # launch application launcher
41+
bind = $mainMod, Tab, exec, pkill -x rofi || $scrPath/rofilaunch.sh w # launch window switcher
42+
bind = $mainMod+Shift, E, exec, pkill -x rofi || $scrPath/rofilaunch.sh f # launch file explorer
43+
44+
# Audio control
45+
bindl = , F10, exec, $scrPath/volumecontrol.sh -o m # toggle audio mute
46+
bindel = , F11, exec, $scrPath/volumecontrol.sh -o d # decrease volume
47+
bindel = , F12, exec, $scrPath/volumecontrol.sh -o i # increase volume
48+
bindl = , XF86AudioMute, exec, $scrPath/volumecontrol.sh -o m # toggle audio mute
49+
bindl = , XF86AudioMicMute, exec, $scrPath/volumecontrol.sh -i m # toggle microphone mute
50+
bindel = , XF86AudioLowerVolume, exec, $scrPath/volumecontrol.sh -o d # decrease volume
51+
bindel = , XF86AudioRaiseVolume, exec, $scrPath/volumecontrol.sh -o i # increase volume
52+
53+
# Media control
54+
bindl = , XF86AudioPlay, exec, playerctl play-pause # toggle between media play and pause
55+
bindl = , XF86AudioPause, exec, playerctl play-pause # toggle between media play and pause
56+
bindl = , XF86AudioNext, exec, playerctl next # media next
57+
bindl = , XF86AudioPrev, exec, playerctl previous # media previous
58+
59+
# Brightness control
60+
bindel = , XF86MonBrightnessUp, exec, $scrPath/brightnesscontrol.sh i # increase brightness
61+
bindel = , XF86MonBrightnessDown, exec, $scrPath/brightnesscontrol.sh d # decrease brightness
62+
63+
# Move between grouped windows
64+
bind = $mainMod CTRL , H, changegroupactive, b
65+
bind = $mainMod CTRL , L, changegroupactive, f
66+
67+
# Screenshot/Screencapture
68+
bind = $mainMod, P, exec, $scrPath/screenshot.sh s # partial screenshot capture
69+
bind = $mainMod+Ctrl, P, exec, $scrPath/screenshot.sh sf # partial screenshot capture (frozen screen)
70+
bind = $mainMod+Alt, P, exec, $scrPath/screenshot.sh m # monitor screenshot capture
71+
bind = , Print, exec, $scrPath/screenshot.sh p # all monitors screenshot capture
72+
73+
# Custom scripts
74+
bind = $mainMod+Alt, G, exec, $scrPath/gamemode.sh # disable hypr effects for gamemode
75+
bind = $mainMod+Alt, Right, exec, $scrPath/swwwallpaper.sh -n # next wallpaper
76+
bind = $mainMod+Alt, Left, exec, $scrPath/swwwallpaper.sh -p # previous wallpaper
77+
bind = $mainMod+Alt, Up, exec, $scrPath/wbarconfgen.sh n # next waybar mode
78+
bind = $mainMod+Alt, Down, exec, $scrPath/wbarconfgen.sh p # previous waybar mode
79+
bind = $mainMod+Shift, R, exec, pkill -x rofi || $scrPath/wallbashtoggle.sh -m # launch wallbash mode select menu
80+
bind = $mainMod+Shift, T, exec, pkill -x rofi || $scrPath/themeselect.sh # launch theme select menu
81+
bind = $mainMod+Shift, A, exec, pkill -x rofi || $scrPath/rofiselect.sh # launch select menu
82+
bind = $mainMod+Shift, X, exec, pkill -x rofi || $scrPath/themestyle.sh # launch theme style select menu
83+
bind = $mainMod+Shift, W, exec, pkill -x rofi || $scrPath/swwwallselect.sh # launch wallpaper select menu
84+
bind = $mainMod, V, exec, pkill -x rofi || $scrPath/cliphist.sh c # launch clipboard
85+
bind = $mainMod+Shift, V, exec, pkill -x rofi || $scrPath/cliphist.sh # launch clipboard Manager
86+
bind = $mainMod, K, exec, $scrPath/keyboardswitch.sh # switch keyboard layout
87+
bind = $mainMod, slash, exec, pkill -x rofi || $scrPath/keybinds_hint.sh c # launch keybinds hint
88+
bind = $mainMod+Alt, A, exec, pkill -x rofi || $scrPath/animations.sh # launch animations Manager
89+
90+
# Move/Change window focus
91+
bind = $mainMod, Left, movefocus, l
92+
bind = $mainMod, Right, movefocus, r
93+
bind = $mainMod, Up, movefocus, u
94+
bind = $mainMod, Down, movefocus, d
95+
bind = Alt, Tab, movefocus, d
96+
97+
# Switch workspaces
98+
bind = $mainMod, 1, workspace, 1
99+
bind = $mainMod, 2, workspace, 2
100+
bind = $mainMod, 3, workspace, 3
101+
bind = $mainMod, 4, workspace, 4
102+
bind = $mainMod, 5, workspace, 5
103+
bind = $mainMod, 6, workspace, 6
104+
bind = $mainMod, 7, workspace, 7
105+
bind = $mainMod, 8, workspace, 8
106+
bind = $mainMod, 9, workspace, 9
107+
bind = $mainMod, 0, workspace, 10
108+
109+
# Switch workspaces to a relative workspace
110+
bind = $mainMod+Ctrl, Right, workspace, r+1
111+
bind = $mainMod+Ctrl, Left, workspace, r-1
112+
113+
# Move to the first empty workspace
114+
bind = $mainMod+Ctrl, Down, workspace, empty
115+
116+
# Resize windows
117+
binde = $mainMod+Shift, Right, resizeactive, 30 0
118+
binde = $mainMod+Shift, Left, resizeactive, -30 0
119+
binde = $mainMod+Shift, Up, resizeactive, 0 -30
120+
binde = $mainMod+Shift, Down, resizeactive, 0 30
121+
122+
# Move focused window to a workspace
123+
bind = $mainMod+Shift, 1, movetoworkspace, 1
124+
bind = $mainMod+Shift, 2, movetoworkspace, 2
125+
bind = $mainMod+Shift, 3, movetoworkspace, 3
126+
bind = $mainMod+Shift, 4, movetoworkspace, 4
127+
bind = $mainMod+Shift, 5, movetoworkspace, 5
128+
bind = $mainMod+Shift, 6, movetoworkspace, 6
129+
bind = $mainMod+Shift, 7, movetoworkspace, 7
130+
bind = $mainMod+Shift, 8, movetoworkspace, 8
131+
bind = $mainMod+Shift, 9, movetoworkspace, 9
132+
bind = $mainMod+Shift, 0, movetoworkspace, 10
133+
134+
# Move focused window to a relative workspace
135+
bind = $mainMod+Ctrl+Alt, Right, movetoworkspace, r+1
136+
bind = $mainMod+Ctrl+Alt, Left, movetoworkspace, r-1
137+
138+
# Move active window around current workspace with mainMod + SHIFT + CTRL [←→↑↓]
139+
$moveactivewindow=grep -q "true" <<< $(hyprctl activewindow -j | jq -r .floating) && hyprctl dispatch moveactive
140+
binded = $mainMod SHIFT $CONTROL, left, Move activewindow left, exec, $moveactivewindow -30 0 || hyprctl dispatch movewindow l
141+
binded = $mainMod SHIFT $CONTROL, right, Move activewindow right, exec, $moveactivewindow 30 0 || hyprctl dispatch movewindow r
142+
binded = $mainMod SHIFT $CONTROL, up, Move activewindow up, exec, $moveactivewindow 0 -30 || hyprctl dispatch movewindow u
143+
binded = $mainMod SHIFT $CONTROL, down, Move activewindow down, exec, $moveactivewindow 0 30 || hyprctl dispatch movewindow d
144+
145+
# Scroll through existing workspaces
146+
bind = $mainMod, mouse_down, workspace, e+1
147+
bind = $mainMod, mouse_up, workspace, e-1
148+
149+
# Move/Resize focused window
150+
bindm = $mainMod, mouse:272, movewindow
151+
bindm = $mainMod, mouse:273, resizewindow
152+
bindm = $mainMod, Z, movewindow
153+
bindm = $mainMod, X, resizewindow
154+
155+
# Move/Switch to special workspace (scratchpad)
156+
bind = $mainMod+Alt, S, movetoworkspacesilent, special
157+
bind = $mainMod, S, togglespecialworkspace,
158+
159+
# Toggle focused window split
160+
bind = $mainMod, J, togglesplit
161+
162+
# Move focused window to a workspace silently
163+
bind = $mainMod+Alt, 1, movetoworkspacesilent, 1
164+
bind = $mainMod+Alt, 2, movetoworkspacesilent, 2
165+
bind = $mainMod+Alt, 3, movetoworkspacesilent, 3
166+
bind = $mainMod+Alt, 4, movetoworkspacesilent, 4
167+
bind = $mainMod+Alt, 5, movetoworkspacesilent, 5
168+
bind = $mainMod+Alt, 6, movetoworkspacesilent, 6
169+
bind = $mainMod+Alt, 7, movetoworkspacesilent, 7
170+
bind = $mainMod+Alt, 8, movetoworkspacesilent, 8
171+
bind = $mainMod+Alt, 9, movetoworkspacesilent, 9
172+
bind = $mainMod+Alt, 0, movetoworkspacesilent, 10

0 commit comments

Comments
 (0)