-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinit.conf
More file actions
209 lines (189 loc) · 8.67 KB
/
init.conf
File metadata and controls
209 lines (189 loc) · 8.67 KB
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
# hypr/.config/hypr/hyprvim/init.conf
#
# ██╗ ██╗██╗ ██╗██████╗ ██████╗ ██╗ ██╗██╗███╗ ███╗
# ██║ ██║╚██╗ ██╔╝██╔══██╗██╔══██╗██║ ██║██║████╗ ████║
# ███████║ ╚████╔╝ ██████╔╝██████╔╝██║ ██║██║██╔████╔██║
# ██╔══██║ ╚██╔╝ ██╔═══╝ ██╔══██╗╚██╗ ██╔╝██║██║╚██╔╝██║
# ██║ ██║ ██║ ██║ ██║ ██║ ╚████╔╝ ██║██║ ╚═╝ ██║
# ╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═══╝ ╚═╝╚═╝ ╚═╝
#
#
################################################################################
# HYPRVIM - VIM-STYLE KEYBINDINGS FOR HYPRLAND
################################################################################
#
# A comprehensive vim-style navigation and text editing system for Hyprland.
# Uses submaps in conjunction with keybindings and shell scripts to achieve a
# a vim-like experience globally acroos across all applications in your Wayland
# session, allowing you to navigate and edit text with familiar vim motions. Think
# of this as a "lightweight" version of vim to bridge the gaps. Also features
# Hyprland specific workflows thus: "HyprVim".
#
################################################################################
################################################################################
# DEFAULT SETTINGS
################################################################################
# Each default setting below can be customized and overriden in `./settings.conf`.
# See `./settings.conf.example` for details on how to edit.
#
# LEADER KEY
# ----------
# Leader and Activate key combo for vim mode (default: SUPER/Windows key)
# Set these to your preferred activation key combo in `settings.conf`
$HYPRVIM_LEADER = SUPER
$HYPRVIM_ACTIVATE = ESCAPE
#
# PROMPT
# ----------
# Prompt input tool for user input
# Auto-detects available tools in order: rofi, wofi, tofi, fuzzel, dmenu, zenity, kdialog
# Set to your preferred tool or leave empty string for auto-detection.
$HYPRVIM_PROMPT =
#
# NOTIFICATIONS
# ----------
# Mark notifications (1 = show notifications when jumping/setting marks, empty = disable)
$HYPRVIM_MARK_NOTIFY =
#
# ----------
# TERMINAL
# ----------
# Terminal used to display the help viewer for keybinds.
# Default uses kitty with a class that matches the floating window rule below.
# Examples:
# $HYPRVIM_TERMINAL = ghostty --class floating-help -e
# $HYPRVIM_TERMINAL = wezterm start --class floating-help --
# $HYPRVIM_TERMINAL = alacritty --class floating-help -e
# $HYPRVIM_TERMINAL = foot --app-id floating-help -e
$HYPRVIM_TERMINAL = kitty --class floating-help -e
#
# ----------
# EDITOR
# ----------
# Editor for vim-open-editor feature (nvim or vim)
# Default is nvim, set to 'vim' if you prefer classic vim
$HYPRVIM_EDITOR = nvim
#
# ----------
# LOCK COMMAND
# ----------
# Command to execute when locking the screen
# Default is hyprlock, but you can use any lock command (swaylock, gtklock, etc.)
$HYPRVIM_LOCK = hyprlock
#
# ----------
# DEBUG
# ----------
# Debug mode for scripts that support it (1 = enable debug logging)
$HYPRVIM_DEBUG =
#
# ----------
# WHICH-KEY
# ----------
# Show which-key style HUD when entering a submap to see all keybindings (1 = enable, empty = disable)
# Requires eww and socat — disabled by default; set to 1 in settings.conf to enable
# Position Options: bottom-right, bottom-center, top-center, bottom-left, top-right, top-left
$HYPRVIM_WHICH_KEY_ENABLED =
$HYPRVIM_WHICH_KEY_POSITION = bottom-right
#
# Auto-show policy (comma-separated submap names)
# DENY: these submaps never auto-show (highest priority)
$HYPRVIM_WHICHKEY_AUTO_SHOW_DENY = NORMAL,VISUAL,V-LINE
# ALLOW: these submaps always auto-show (e.g. force-show NORMAL)
$HYPRVIM_WHICHKEY_AUTO_SHOW_ALLOW =
#
################################################################################
# ----------------------------------------------------------------------------- #
# !-- DEPENDENCIES
# ----------------------------------------------------------------------------- #
# Shell scripts
$HYPRVIM_MOTION = ~/.config/hypr/hyprvim/scripts/vim-motion.sh
$HYPRVIM_OPERATOR_MOTION = ~/.config/hypr/hyprvim/scripts/vim-operator-motion.sh
$HYPRVIM_LINE_MOTION = ~/.config/hypr/hyprvim/scripts/vim-line-motion.sh
$HYPRVIM_COUNT = ~/.config/hypr/hyprvim/scripts/vim-count.sh
$HYPRVIM_HELP = ~/.config/hypr/hyprvim/scripts/vim-help.sh
$HYPRVIM_MARKS = HYPRVIM_MARK_NOTIFY=$HYPRVIM_MARK_NOTIFY ~/.config/hypr/hyprvim/scripts/vim-marks.sh
$HYPRVIM_REGISTERS = HYPRVIM_DEBUG=$HYPRVIM_DEBUG ~/.config/hypr/hyprvim/scripts/vim-registers.sh
$HYPRVIM_FIND = HYPRVIM_PROMPT=$HYPRVIM_PROMPT HYPRVIM_DEBUG=$HYPRVIM_DEBUG ~/.config/hypr/hyprvim/scripts/vim-find.sh
$HYPRVIM_REPLACE = HYPRVIM_PROMPT=$HYPRVIM_PROMPT ~/.config/hypr/hyprvim/scripts/vim-replace.sh
$HYPRVIM_REPLACE_CHAR = ~/.config/hypr/hyprvim/scripts/vim-replace-char.sh
$HYPRVIM_OPEN_VIM = HYPRVIM_EDITOR=$HYPRVIM_EDITOR HYPRVIM_PROMPT=$HYPRVIM_PROMPT ~/.config/hypr/hyprvim/scripts/vim-open-editor.sh
$HYPRVIM_COMMAND = HYPRVIM_PROMPT=$HYPRVIM_PROMPT HYPRVIM_DEBUG=$HYPRVIM_DEBUG HYPRVIM_LOCK=$HYPRVIM_LOCK HYPRVIM_HELP_TERMINAL="$HYPRVIM_TERMINAL" ~/.config/hypr/hyprvim/scripts/vim-command.sh
$HYPRVIM_SURROUND = HYPRVIM_PROMPT=$HYPRVIM_PROMPT HYPRVIM_DEBUG=$HYPRVIM_DEBUG ~/.config/hypr/hyprvim/scripts/vim-surround.sh
$HYPRVIM_WHICH_KEY_LISTENER = HYPRVIM_WHICHKEY_AUTO_SHOW_ALLOW=$HYPRVIM_WHICHKEY_AUTO_SHOW_ALLOW HYPRVIM_WHICHKEY_AUTO_SHOW_DENY=$HYPRVIM_WHICHKEY_AUTO_SHOW_DENY ~/.config/hypr/hyprvim/scripts/whichkey-listen.sh
$HYPRVIM_WHICH_KEY = ~/.config/hypr/hyprvim/scripts/whichkey-render.sh
# Initialize register state directory
exec-once = mkdir -p ${XDG_RUNTIME_DIR:-/tmp}/hyprvim/registers
# Apply theme colors to eww which-key HUD (re-runs on hyprctl reload)
exec = ~/.config/hypr/hyprvim/scripts/apply-theme.sh
# Start which-key listener (eww-based which-key HUD)
exec = $HYPRVIM_WHICH_KEY_LISTENER
# ----------------------------------------------------------------------------- #
# !-- LAYER RULES
# ----------------------------------------------------------------------------- #
# Which-key layers
# layerrule = no_anim on, match:class hyprvim-whichkey
layerrule = animation slide, match:namespace hyprvim-whichkey
# ----------------------------------------------------------------------------- #
# !-- WINDOW RULES
# ----------------------------------------------------------------------------- #
# Floating help (match the class/app-id set by $HYPRVIM_TERMINAL)
windowrule {
name = hyprvim-help-viewer
float = on
size = (monitor_w*0.8) (monitor_h*0.8)
center = on
match:class = ^(floating-help)$
}
# Find prompt (hyprvim-find class/app-id)
windowrule {
name = hyprvim-find-prompt
float = on
size = 600 80
move = (monitor_w/2-300) (monitor_h*0.1)
match:class = ^(hyprvim-find)$
}
# Command prompt (hyprvim-command class/app-id)
windowrule {
name = hyprvim-command-prompt
float = on
size = 600 80
move = (monitor_w/2-300) (monitor_h*0.1)
match:class = ^(hyprvim-command)$
}
# Confirm dialog (hyprvim-confirm class/app-id)
windowrule {
name = hyprvim-confirm-dialog
float = on
size = 400 200
center = on
match:class = ^(hyprvim-confirm)$
}
# Open vim anywhere (hyprvim-open-vim class/app-id)
windowrule {
name = hyprvim-open-vim
float = on
size = (monitor_w*0.6) (monitor_h*0.6)
center = on
match:class = ^(hyprvim-open-vim)$
}
# ----------------------------------------------------------------------------- #
# !-- SOURCE CONFIGURATION
# ----------------------------------------------------------------------------- #
# User Config
# hyprlang noerror true
source = ~/.config/hypr/hyprvim/settings.conf
# hyprlang noerror false
# Vim Submaps
source = ~/.config/hypr/hyprvim/submaps/vim-modes.conf
source = ~/.config/hypr/hyprvim/submaps/vim-operators.conf
source = ~/.config/hypr/hyprvim/submaps/vim-marks.conf
source = ~/.config/hypr/hyprvim/submaps/vim-registers.conf
source = ~/.config/hypr/hyprvim/submaps/vim-replace-char.conf
# ----------------------------------------------------------------------------- #
# !-- HYPRVIM ACTIVATION / EXIT KEYBINDS
# ----------------------------------------------------------------------------- #
# HyprVim Activation Keybind
bind = $HYPRVIM_LEADER, $HYPRVIM_ACTIVATE, submap, NORMAL
# Emergency exit from any vim submap - this is available globally
bindu = ALT, ESCAPE, submap, reset