Skip to content

Instantly share code, notes, and snippets.

@EastArctica
Last active August 5, 2024 17:49
Show Gist options
  • Save EastArctica/7d8e80cf57dbf7ec97bffd5ee7a835b8 to your computer and use it in GitHub Desktop.
Save EastArctica/7d8e80cf57dbf7ec97bffd5ee7a835b8 to your computer and use it in GitHub Desktop.
GlazeWM v3.1.0 Hyprland config
# The goal for this GlazeWM v3.1.0 config is to match Hyprland's default config as best as possible
# Hyprland sets the $mainMod to SUPER by default, we can't use the SUPER key in windows very easily
# as it causes lots of issues. Instead we bind everything to F24 and then bind the windows key to F24
# using PowerToys' Keyboard Manager.
# Please note that many things are not supported, the bottom of the file contains everything which either
# I couldn't figure out or isn't possible in GlazeWM
general:
# Commands to run when the WM has started (e.g. to run a script or launch
# another application). Here we are running a batch script to start Zebar.
startup_commands: ['shell-exec %userprofile%/.glzr/zebar/start.bat']
# Auto start browser
# Whether to automatically focus windows underneath the cursor.
focus_follows_cursor: true
# Whether to switch back and forth between the previously focused
# workspace when focusing the current workspace.
toggle_workspace_on_refocus: true
cursor_jump:
# Whether to automatically move the cursor on the specified trigger.
enabled: true
# Trigger for cursor jump:
# - 'monitor_focus': Jump when focus changes between monitors.
# - 'window_focus': Jump when focus changes between windows.
trigger: 'window_focus'
gaps:
# Gap between adjacent windows.
inner_gap: '5px'
# Gap between windows and the screen edge.
outer_gap:
top: '50px'
right: '20px'
bottom: '20px'
left: '20px'
window_effects:
# Visual effects to apply to the focused window.
focused_window:
# Highlight the window with a colored border.
# ** Exclusive to Windows 11 due to API limitations.
border:
enabled: true
# TODO: Gradient of #33ccffee to #00ff99ee @ 45deg
color: '#1ae6ccee'
# Visual effects to apply to non-focused windows.
other_windows:
border:
enabled: true
color: '#595959aa'
window_behavior:
# New windows are created in this state whenever possible.
# Allowed values: 'tiling', 'floating'.
initial_state: 'tiling'
# Sets the default options for when a new window is created. This also
# changes the defaults for when the state change commands, like
# `set-floating`, are used without any flags.
state_defaults:
floating:
# Whether to center floating windows by default.
centered: true
# Whether to show floating windows as always on top.
shown_on_top: true
fullscreen:
# Maximize the window if possible. If the window doesn't have a
# maximize button, then it'll be fullscreen'ed normally instead.
maximized: false
# Whether to show fullscreen windows as always on top.
shown_on_top: false
workspaces:
- name: '1'
- name: '2'
- name: '3'
- name: '4'
- name: '5'
- name: '6'
- name: '7'
- name: '8'
- name: '9'
- name: '10'
binding_modes:
window_rules:
- commands: ['ignore']
match:
# Ignores any Zebar windows.
- window_process: { equals: 'zebar' }
# Ignores picture-in-picture windows for browsers.
- window_title: { regex: '[Pp]icture.in.[Pp]icture' }
window_class: { regex: 'Chrome_WidgetWin_1|MozillaDialogClass' }
# Ignore rules for various 3rd-party apps.
- window_process: { equals: 'PowerToys.PowerAccent' }
- window_process: { equals: 'Lively' }
window_class: { regex: 'HwndWrapper*' }
keybindings:
# Shift focus in a given direction.
- commands: ['focus --direction left']
bindings: ['f24+left']
- commands: ['focus --direction right']
bindings: ['f24+right']
- commands: ['focus --direction up']
bindings: ['f24+up']
- commands: ['focus --direction down']
bindings: ['f24+down']
# Move focused window in a given direction.
- commands: ['move --direction left']
bindings: ['f24+shift+left']
- commands: ['move --direction right']
bindings: ['f24+shift+right']
- commands: ['move --direction up']
bindings: ['f24+shift+up']
- commands: ['move --direction down']
bindings: ['f24+shift+down']
# Change the focused window to be floating.
- commands: ['toggle-floating']
bindings: ['f24+v']
# Close focused window.
- commands: ['close']
bindings: ['f24+c']
# Kill GlazeWM process safely.
- commands: ['wm-exit']
bindings: ['f24+m']
# Re-evaluate configuration file.
- commands: ['wm-reload-config']
bindings: ['f24+shift+r']
# Redraw all windows.
- commands: ['wm-redraw']
bindings: ['f24+shift+w']
# Launch CMD terminal. Alternatively, use `shell-exec wt` or
# `shell-exec %ProgramFiles%/Git/git-bash.exe` to start Windows
# Terminal and Git Bash respectively.
- commands: ['shell-exec wt']
bindings: ['f24+q']
# Launch file explorer
- commands: ['exec explorer']
bindings: ['f24+e']
# Retain windows run dialog
- commands: ['shell-exec explorer.exe Shell:::{2559A1F3-21D7-11D4-BDAF-00C04F60B9F0}']
bindings: ['f24+r']
# Focus the next/previous workspace defined in `workspaces` config.
- commands: ['focus --next-workspace']
bindings: ['f24+shift+right']
- commands: ['focus --prev-workspace']
bindings: ['f24+shift+left']
# Change focus to a workspace defined in `workspaces` config.
- commands: ['focus --workspace 1']
bindings: ['f24+1']
- commands: ['focus --workspace 2']
bindings: ['f24+2']
- commands: ['focus --workspace 3']
bindings: ['f24+3']
- commands: ['focus --workspace 4']
bindings: ['f24+4']
- commands: ['focus --workspace 5']
bindings: ['f24+5']
- commands: ['focus --workspace 6']
bindings: ['f24+6']
- commands: ['focus --workspace 7']
bindings: ['f24+7']
- commands: ['focus --workspace 8']
bindings: ['f24+8']
- commands: ['focus --workspace 9']
bindings: ['f24+9']
- commands: ['focus --workspace 10']
bindings: ['f24+0']
# Move focused window to a workspace defined in `workspaces` config.
- commands: ['move --workspace 1', 'focus --workspace 1']
bindings: ['f24+shift+1']
- commands: ['move --workspace 2', 'focus --workspace 2']
bindings: ['f24+shift+2']
- commands: ['move --workspace 3', 'focus --workspace 3']
bindings: ['f24+shift+3']
- commands: ['move --workspace 4', 'focus --workspace 4']
bindings: ['f24+shift+4']
- commands: ['move --workspace 5', 'focus --workspace 5']
bindings: ['f24+shift+5']
- commands: ['move --workspace 6', 'focus --workspace 6']
bindings: ['f24+shift+6']
- commands: ['move --workspace 7', 'focus --workspace 7']
bindings: ['f24+shift+7']
- commands: ['move --workspace 8', 'focus --workspace 8']
bindings: ['f24+shift+8']
- commands: ['move --workspace 9', 'focus --workspace 9']
bindings: ['f24+shift+9']
- commands: ['move --workspace 10', 'focus --workspace 10']
bindings: ['f24+shift+0']
# general.border_size: Not supported according to glzr-io/glazewm#507
# general.resize_on_border: Enabled by default, unsure if it can be disabled
# general.layout: Custom layouts are not natively supported in GlazeWM, See "How can I create <insert layout>?" in https://github.com/glzr-io/glazewm#faq
# decoration.rounding: Minimally supported as shown in https://learn.microsoft.com/en-us/windows/apps/desktop/modernize/apply-rounded-corners
# decoration.active_opacity: Not currently supported as shown in packages/wm/src/common/commands/platform_sync.rs#apply_window_effects
# decoration.inactive_opacity: Not currently supported as shown in packages/wm/src/common/commands/platform_sync.rs#apply_window_effects
# decoration.*shadow*: I have no clue if this is existent at all.
# decoration.blur: Blur is managed by individual apps and does not have a "global" application. Acrylic effects *could* be automatically applied to all apps but large bugs would likely occur.
# animations.*: GlazeWM has no concept of animations.
# dwindle.*: GlazeWM has no concept of layouts.
# master.*: GlazeWM has no concept of layouts.
# misc.*: These are all specific to hyprland or implementation details of the WM
# input.*: GlazeWM does not manage input.
# gestures.*: GlazeWM does not manage input.
# device.*: GlazeWM does not manage input.
#TODO: glazewm has no concept of special workspaces
#TODO: Scroll up and down dont exist for f24+scrolling to change workspaces
#TODO: Moving and resizing windows with the mouse and windows key is not supported
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment