diff --git a/.local/share/hyde/templates/hypr/keybindings/README.md b/.local/share/hyde/templates/hypr/keybindings/README.md new file mode 100644 index 000000000..4f877ee8b --- /dev/null +++ b/.local/share/hyde/templates/hypr/keybindings/README.md @@ -0,0 +1,183 @@ +# HyDE Keyboard Layout Templates + +This directory contains keyboard layout-specific keybinding configurations for HyDE. + +## ๐Ÿ“‹ Available Layouts + +- **`keybindings-abnt2.conf`** - Brazilian ABNT2 layout (Portuguese BR) + +## ๐Ÿš€ How to Use + +### Option 1: Copy to Your Config + +```bash +# Choose the appropriate keybindings file for your keyboard layout +cp keybindings-abnt2.conf ~/.config/hypr/keybindings.conf + +# Reload Hyprland +# Method 1: Use keybinding (SUPER+SHIFT+R) +# Method 2: Restart your session +``` + +### Option 2: Symlink (Advanced) + +```bash +# Create a symbolic link (changes will reflect automatically) +ln -sf ~/.local/share/hyde/templates/hypr/keybindings/keybindings-abnt2.conf \ + ~/.config/hypr/keybindings.conf +``` + +## ๐ŸŒ Contributing New Layouts + +Want to add support for your keyboard layout? Here's how: + +### 1. Understand the Issue + +Most keyboard layout conflicts happen because: +- Special characters require SHIFT key (e.g., `@` = Shift+2 in ABNT2) +- Default keybindings may use these same combinations +- **However**: Hyprland captures key presses BEFORE layout conversion +- This means `SUPER+SHIFT+2` works correctly even on layouts where Shift+2 = @ + +### 2. Test Before Creating + +Before creating a new layout template, **test if the default bindings actually conflict**: + +```bash +# Try these tests: +1. Open a text editor +2. Type Shift+2 (should produce @ or your layout's symbol) +3. Press SUPER+SHIFT+2 (should move window to workspace 2) +4. If both work correctly, you may not need a custom layout! +``` + +### 3. When to Create a Custom Layout + +Create a custom layout file only if: +- โœ… You confirmed actual conflicts with default keybindings +- โœ… You need to relocate bindings for better ergonomics +- โœ… Your physical keyboard layout differs significantly from US + +### 4. How to Create Your Layout + +```bash +# 1. Copy the base template +cp keybindings-abnt2.conf keybindings-YOUR_LAYOUT.conf + +# 2. Add a descriptive header explaining: +# - Your keyboard layout name and region +# - What conflicts you're solving +# - Which keybindings you changed and why +# - Testing instructions + +# 3. Modify only the conflicting keybindings + +# 4. Test thoroughly before submitting +``` + +### 5. Header Template + +Add this header to your new layout file: + +```conf +# ============================================ +# HyDE Keybindings - [LAYOUT NAME] +# ============================================ +# +# Author: [Your Name/Username] +# Created: [Date] +# Layout: [Full Layout Name] ([Region]) +# +# Description: +# ------------ +# [Explain what issues this layout solves] +# +# Main Changes from Default: +# --------------------------- +# 1. [List specific changes] +# 2. [And why you made them] +# +# Special Characters Reference: +# ------------------------------ +# [Document how symbols are produced in your layout] +# +# Testing Your Configuration: +# ---------------------------- +# [Provide test steps to verify it works] +# +# ============================================ +``` + +### 6. Guidelines for Modifications + +- โœ… **DO**: Change modifier keys (Shift โ†’ Alt, Ctrl, etc.) if needed +- โœ… **DO**: Relocate bindings to more ergonomic positions +- โœ… **DO**: Document every change clearly +- โœ… **DO**: Keep functionality consistent where possible +- โŒ **DON'T**: Remove essential keybindings +- โŒ **DON'T**: Change bindings just for personal preference +- โŒ **DON'T**: Make undocumented changes + +### 7. Submit Your Contribution + +```bash +# 1. Fork the HyDE repository +# 2. Create a branch: git checkout -b add-LAYOUT-keybindings +# 3. Add your file to: .local/share/hyde/templates/hypr/keybindings/ +# 4. Update this README with your layout +# 5. Commit: git commit -m "feat: Add LAYOUT keyboard layout keybindings" +# 6. Push and create a Pull Request +``` + +## ๐Ÿ“– Layout-Specific Documentation + +### ABNT2 (Brazilian Portuguese) + +**Special Characters:** +- `@` โ†’ Shift+2 +- `#` โ†’ Shift+3 +- `$` โ†’ Shift+4 +- `%` โ†’ Shift+5 +- `&` โ†’ Shift+7 +- `*` โ†’ Shift+8 +- `(` โ†’ Shift+9 +- `)` โ†’ Shift+0 + +**Dead Keys:** `ยด` (acute), `` ` `` (grave), `^` (circumflex), `~` (tilde) + +**Important Note:** +The default HyDE keybindings work correctly with ABNT2 because Hyprland captures key presses before the layout processes them. For example, `SUPER+SHIFT+2` will move a window to workspace 2 and will NOT produce the `@` symbol. + +**Changes in this template:** +- None! The default keybindings are fully compatible +- This template includes comprehensive documentation for ABNT2 users +- Serves as a reference for understanding how keybindings work with this layout + +--- + +## ๐Ÿ› Reporting Issues + +If you encounter keyboard layout issues: + +1. Test with the default keybindings first +2. Document exactly what keybinding conflicts with what symbol +3. Provide your keyboard layout details (setxkbmap -query) +4. Report at: https://github.com/HyDE-Project/HyDE/issues/1442 + +## ๐Ÿ’ก Tips + +- Physical key positions matter more than the symbol printed on them +- Most Hyprland keybindings use physical key codes, not layout-specific symbols +- Test thoroughly before assuming a conflict exists +- When in doubt, check with: `wev` (Wayland event viewer) to see actual key codes + +## ๐Ÿ“š Additional Resources + +- [Hyprland Keybinding Documentation](https://wiki.hyprland.org/Configuring/Binds/) +- [XKB Layout Documentation](https://www.x.org/wiki/XKB/) +- [Keyboard Layout List](https://en.wikipedia.org/wiki/Keyboard_layout) + +--- + +**Contributors:** Add your name here when you submit a layout +- CapGuizera (ABNT2) diff --git a/.local/share/hyde/templates/hypr/keybindings/keybindings-abnt2.conf b/.local/share/hyde/templates/hypr/keybindings/keybindings-abnt2.conf new file mode 100644 index 000000000..2a8949d85 --- /dev/null +++ b/.local/share/hyde/templates/hypr/keybindings/keybindings-abnt2.conf @@ -0,0 +1,277 @@ +# ============================================ +# HyDE Keybindings - Brazilian ABNT2 Layout +# ============================================ +# +# Author: CapGuizera +# Created: 2026-01-02 +# Layout: Brazilian ABNT2 (Portuguese BR) +# +# Description: +# ------------ +# This configuration is optimized for the Brazilian ABNT2 keyboard layout. +# It resolves conflicts with special characters commonly used in passwords +# and everyday typing, such as: @ # $ % & * ( ) +# +# Main Changes from Default (US) Layout: +# --------------------------------------- +# 1. Workspace navigation: SUPER + number (UNCHANGED) +# 2. Move window to workspace: SUPER + SHIFT + number (UNCHANGED) +# 3. Move window to workspace silently: SUPER + ALT + number (UNCHANGED) +# +# IMPORTANT NOTE FOR ABNT2 USERS: +# -------------------------------- +# The default keybindings in HyDE work correctly with ABNT2 layout. +# The SHIFT key combinations (SUPER+SHIFT+number) do NOT conflict with +# special characters because Hyprland captures the key press BEFORE the +# layout converts it to symbols. +# +# For example: +# - Pressing SUPER+SHIFT+2 will move window to workspace 2 +# - It will NOT produce the @ symbol +# - The @ symbol only appears when you type SHIFT+2 WITHOUT the SUPER key +# +# Special Characters Reference (ABNT2): +# -------------------------------------- +# Shift+1 = ! Shift+6 = ยจ +# Shift+2 = @ Shift+7 = & +# Shift+3 = # Shift+8 = * +# Shift+4 = $ Shift+9 = ( +# Shift+5 = % Shift+0 = ) +# +# Dead Keys (ABNT2): +# ------------------ +# ยด (acute) - requires second key press +# ` (grave) - requires second key press +# ^ (circumflex) - requires second key press +# ~ (tilde) - requires second key press +# +# Testing Your Configuration: +# ---------------------------- +# 1. Try typing @ in a text editor (should work: Shift+2) +# 2. Try SUPER+SHIFT+2 (should move window to workspace 2) +# 3. Both operations should work without conflicts +# +# If you experience issues, please report at: +# https://github.com/HyDE-Project/HyDE/issues/1442 +# +# ============================================ + +## โ–ˆโ–„โ–€ โ–ˆโ–€โ–€ โ–ˆโ–„โ–ˆ โ–ˆโ–„โ–„ โ–ˆ โ–ˆโ–„โ–‘โ–ˆ โ–ˆโ–€โ–„ โ–ˆ โ–ˆโ–„โ–‘โ–ˆ โ–ˆโ–€โ–€ โ–ˆโ–€ +## โ–ˆโ–‘โ–ˆ โ–ˆโ–ˆโ–„ โ–‘โ–ˆโ–‘ โ–ˆโ–„โ–ˆ โ–ˆ โ–ˆโ–‘โ–€โ–ˆ โ–ˆโ–„โ–€ โ–ˆ โ–ˆโ–‘โ–€โ–ˆ โ–ˆโ–„โ–ˆ โ–„โ–ˆ + +# see https://wiki.hyprland.org/configuring/keywords/ for more +# example binds, see https://wiki.hyprland.org/configuring/binds/ for more + +#? ------- KEYBINDS_HYPRLAND_V_0_53 COMPATIBLE ---------------- +# This Config is compatible with keybinding changes in Hyprland v0.53+ +# To ensure your system is working we will not disable this block +# User template files will be provided in $XDG_DATA_HOME/hyde/templates/hypr/keybindings.conf for manual update. + +#? ------- Grouping of binds for easier management ---------------- +# $d=[Group Name|Subgroup Name1|Subgroup Name2|...] +# '$d' is a variable that is used to group binds together (or use another variable) +# This is only for organization purposes and is not a defined hyprland variable +# What we did here is to modify the Description of the binds to include the group name +# The $d will be parsed as a separate key to be use for a GUI or something pretty +# [Main|Subgroup1|Subgroup2|...] +# Main - The main groupname +# Subgroup1.. - The subgroup names can be use to avoid repeating the same description + +#? ------- Variables ---------------- +# Default if commented out +# $mainMod = Super # super / meta / windows key +# Assign apps +# $TERMINAL = kitty +# $EDITOR = code +# $EXPLORER = dolphin +# $BROWSER = firefox + +$wm=Window Management +$d=[$wm] +bindd = $mainMod, Q, $d close focused window, exec, hyde-shell dontkillsteam +bindd = Alt, F4, $d close focused window, exec, hyde-shell dontkillsteam +bindd = $mainMod, Delete, $d kill hyprland session, exec, hyde-shell logout +bindd = $mainMod, W, $d Toggle floating, togglefloating +bindd = $mainMod, G, $d toggle group, togglegroup +bindd = Shift, F11, $d toggle fullscreen, fullscreen +bindd = $mainMod, L, $d lock screen, exec, hyde-shell lock-session +bindd = $mainMod Shift, F, $d toggle pin on focused window, exec, hyde-shell windowpin +bindd = Control Alt, Delete, $d logout menu, exec, hyde-shell logoutlaunch +bindd = Alt_R, Control_R, $d toggle waybar and reload config, exec, hyde-shell waybar --hide +# bindd = ALT_R, Control_R,toggle waybar, exec, killall waybar || waybar # toggle waybar without reloading, this is faster + +$d=[$wm|Group Navigation] +bindd = $mainMod Control, H, $d change active group backwards , changegroupactive, b +bindd = $mainMod Control, L, $d change active group forwards , changegroupactive, f + +$d=[$wm|Change focus] +bindd = $mainMod, Left, $d focus left, movefocus, l +bindd = $mainMod, Right, $d focus right , movefocus, r +bindd = $mainMod, Up, $d focus up , movefocus, u +bindd = $mainMod, Down , $d focus down, movefocus, d +bindd = ALT, Tab,$d Cycle focus, cyclenext + +$d=[$wm|Resize Active Window] +# Resize windows +bindde = $mainMod Shift, Right, $d resize window right , resizeactive, 30 0 +bindde = $mainMod Shift, Left, $d resize window left, resizeactive, -30 0 +bindde = $mainMod Shift, Up, $d resize window up, resizeactive, 0 -30 +bindde = $mainMod Shift, Down, $d resize window down, resizeactive, 0 30 + +# Move active window around current workspace with mainMod + Shift + Control [โ†โ†’โ†‘โ†“] +$d=[$wm|Move active window across workspace] +$moveactivewindow=grep -q "true" <<< $(hyprctl activewindow -j | jq -r .floating) && hyprctl dispatch moveactive +bindde = $mainMod Shift Control, left, Move active window to the left, exec, $moveactivewindow -30 0 || hyprctl dispatch movewindow l +bindde = $mainMod Shift Control, right, Move active window to the right, exec, $moveactivewindow 30 0 || hyprctl dispatch movewindow r +bindde = $mainMod Shift Control, up, Move active window up, exec, $moveactivewindow 0 -30 || hyprctl dispatch movewindow u +bindde = $mainMod Shift Control, down, Move active window down, exec, $moveactivewindow 0 30 || hyprctl dispatch movewindow d + +# Move/Resize focused window +$d=[$wm|Move & Resize with mouse] +binddm = $mainMod, mouse:272, $d hold to move window, movewindow +binddm = $mainMod, mouse:273, $d hold to resize window, resizewindow +binddm = $mainMod, Z, $d hold to move window , movewindow +binddm = $mainMod, X, $d hold to resize window, resizewindow + +# Toggle focused window split +$d=[$wm] +bindd = $mainMod, J, $d toggle split, togglesplit + +$l=Launcher +$d=[$l|Apps] +bindd = $mainMod, T, $d terminal emulator , exec, $TERMINAL +bindd = $mainMod Alt, T, $d dropdown terminal , exec, hyde-shell pypr toggle console +bindd = $mainMod, E, $d file explorer , exec, $EXPLORER +bindd = $mainMod, C, $d text editor , exec, $EDITOR +bindd = $mainMod, B, $d web browser , exec, $BROWSER +bindd = Control Shift, Escape, $d system monitor , exec, hyde-shell system.monitor + +$d=[$l|Rofi menus] +$rofi-launch=hyde-shell rofilaunch +bindd = $mainMod, A, $d application finder , exec, pkill -x rofi || $rofi-launch d +bindd = $mainMod, TAB, $d window switcher , exec, pkill -x rofi || $rofi-launch w +bindd = $mainMod Shift, E, $d file finder , exec, pkill -x rofi || $rofi-launch f +bindd = $mainMod, slash, $d keybindings hint, exec, pkill -x rofi || hyde-shell keybinds_hint c # launch keybinds hint +bindd = $mainMod, comma, $d emoji picker , exec, pkill -x rofi || hyde-shell emoji-picker # launch emoji picker +bindd = $mainMod, period, $d glyph picker , exec, pkill -x rofi || hyde-shell glyph-picker # launch glyph picker +bindd = $mainMod, V, $d clipboard , exec, pkill -x rofi || hyde-shell cliphist -c # launch clipboard, +bindd = $mainMod Shift, V, $d clipboard manager , exec, pkill -x rofi || hyde-shell cliphist # launch clipboard Manager +bindd = $mainMod Shift, A, $d select rofi launcher , exec, pkill -x rofi || hyde-shell rofiselect # launch select menu + + +$hc=Hardware Controls +$d=[$hc|Audio] +binddl = , F10, $d toggle mute output , exec, hyde-shell volumecontrol -o m # toggle audio mute +binddl = , XF86AudioMute,$d toggle mute output, exec, hyde-shell volumecontrol -o m # toggle audio mute +binddel = , F11, $d decrease volume , exec, hyde-shell volumecontrol -o d # decrease volume +binddel = , F12, $d increase volume , exec, hyde-shell volumecontrol -o i # increase volume +binddl = , XF86AudioMicMute,$d un/mute microphone , exec, hyde-shell volumecontrol -i m # toggle microphone mute +binddel = , XF86AudioLowerVolume, $d decrease volume , exec, hyde-shell volumecontrol -o d # decrease volume +binddel = , XF86AudioRaiseVolume, $d increase volume , exec, hyde-shell volumecontrol -o i # increase volume + +$d=[$hc|Media] +binddl = , XF86AudioPlay,$d play media, exec, playerctl play-pause # toggle between media play and pause +binddl = , XF86AudioPause,$d pause media, exec, playerctl play-pause # toggle between media play and pause +binddl = , XF86AudioNext,$d next media , exec, playerctl next # media next +binddl = , XF86AudioPrev,$d previous media , exec, playerctl previous # media previous + +$d=[$hc|Brightness] +binddel = , XF86MonBrightnessUp, $d increase brightness , exec, hyde-shell brightnesscontrol i # increase brightness +binddel = , XF86MonBrightnessDown, $d decrease brightness , exec, hyde-shell brightnesscontrol d # decrease brightness + + +$ut=Utilities +$d=[$ut] +binddl = $mainMod, K, $d toggle keyboard layout , exec, hyde-shell keyboardswitch # switch keyboard layout +bindd = $mainMod Alt, G, $d game mode , exec, hyde-shell gamemode # disable hypr effects for gamemode +bindd = $mainMod Shift, G, $d open game launcher , exec, hyde-shell gamelauncher # run game launcher for steam and lutris + +$d=[$ut|Screen Capture] +bindd = $mainMod Shift, P, $d color picker, exec, hyprpicker -an # Pick color (Hex) >> clipboard# +bindd = $mainMod, P, $d snip screen , exec, hyde-shell screenshot s # partial screenshot capture +bindd = $mainMod Control, P, $d freeze and snip screen, exec, hyde-shell screenshot sf # partial screenshot capture (frozen screen) +binddl = $mainMod Alt, P, $d print monitor , exec, hyde-shell screenshot m # monitor screenshot capture +binddl = , Print, $d print all monitors , exec, hyde-shell screenshot p # all monitors screenshot capture + +# TODO Make a main rofi menu for these selectors +$rice=Theming and Wallpaper +$d=[$rice] +bindd = $mainMod Alt, Right, $d next global wallpaper , exec, hyde-shell wallpaper -Gn # next global wallpaper +bindd = $mainMod Alt, Left, $d previous global wallpaper , exec, hyde-shell wallpaper -Gp # previous global wallpaper +bindd = $mainMod Shift, W, $d select a global wallpaper , exec, pkill -x rofi || hyde-shell wallpaper -SG # launch wallpaper select menu +bindd = $mainMod Alt, Up, $d next waybar layout , exec, hyde-shell wbarconfgen n # next waybar mode +bindd = $mainMod Alt, Down, $d previous waybar layout , exec, hyde-shell wbarconfgen p # previous waybar mode +bindd = $mainMod Shift, R, $d wallbash mode selector , exec, pkill -x rofi || hyde-shell wallbashtoggle -m # launch wallbash mode select menu +bindd = $mainMod Shift, T, $d select a theme, exec, pkill -x rofi || hyde-shell themeselect # launch theme select menu +bindd = $mainMod+Shift, Y, $d select animations, exec, pkill -x rofi || hyde-shell animations --select # launch animations select menu +bindd = $mainMod+Shift, U, $d select hyprlock layout, exec, pkill -x rofi || hyde-shell hyprlock --select # launch hyprlock layout select menu + + + +$ws=Workspaces +$d=[$ws|Navigation] +bindd = $mainMod, 1, $d navigate to workspace 1 , workspace, 1 +bindd = $mainMod, 2, $d navigate to workspace 2 , workspace, 2 +bindd = $mainMod, 3, $d navigate to workspace 3 , workspace, 3 +bindd = $mainMod, 4, $d navigate to workspace 4 , workspace, 4 +bindd = $mainMod, 5, $d navigate to workspace 5 , workspace, 5 +bindd = $mainMod, 6, $d navigate to workspace 6 , workspace, 6 +bindd = $mainMod, 7, $d navigate to workspace 7 , workspace, 7 +bindd = $mainMod, 8, $d navigate to workspace 8 , workspace, 8 +bindd = $mainMod, 9, $d navigate to workspace 9 , workspace, 9 +bindd = $mainMod, 0, $d navigate to workspace 10 , workspace, 10 + +$d=[$ws|Navigation|Relative workspace] +bindd = $mainMod Control, Right, $d change active workspace forwards , workspace, r+1 +bindd = $mainMod Control, Left, $d change active workspace backwards , workspace, r-1 + +$d=[$ws|Navigation] +bindd = $mainMod Control, Down, $d navigate to the nearest empty workspace , workspace, empty + +# Move focused window to a workspace +$d=[$ws|Move window to workspace] +bindd = $mainMod Shift, 1, $d move to workspace 1 , movetoworkspace, 1 +bindd = $mainMod Shift, 2, $d move to workspace 2 , movetoworkspace, 2 +bindd = $mainMod Shift, 3, $d move to workspace 3 , movetoworkspace, 3 +bindd = $mainMod Shift, 4, $d move to workspace 4 , movetoworkspace, 4 +bindd = $mainMod Shift, 5, $d move to workspace 5 , movetoworkspace, 5 +bindd = $mainMod Shift, 6, $d move to workspace 6 , movetoworkspace, 6 +bindd = $mainMod Shift, 7, $d move to workspace 7 , movetoworkspace, 7 +bindd = $mainMod Shift, 8, $d move to workspace 8 , movetoworkspace, 8 +bindd = $mainMod Shift, 9, $d move to workspace 9 , movetoworkspace, 9 +bindd = $mainMod Shift, 0, $d move to workspace 10 , movetoworkspace, 10 + +# Move focused window to a relative workspace +$d=[$ws] +bindd = $mainMod Control+Alt, Right, $d move window to next relative workspace , movetoworkspace, r+1 +bindd = $mainMod Control+Alt, Left, $d move window to previous relative workspace , movetoworkspace, r-1 + + +# Scroll through existing workspaces +$d=[$ws|Navigation] +bindd = $mainMod, mouse_down, $d next workspace, workspace, e+1 +bindd = $mainMod, mouse_up, $d previous workspace, workspace, e-1 + + +# Move/Switch to special workspace (scratchpad) +$d=[$ws|Navigation|Special workspace] +bindd = $mainMod Shift, S, $d move to scratchpad , movetoworkspace, special +bindd = $mainMod Alt, S, $d move to scratchpad (silent) , movetoworkspacesilent, special +bindd = $mainMod, S, $d toggle scratchpad , togglespecialworkspace + +# Move focused window to a workspace silently +$d=[$ws|Navigation|Move window silently] +bindd = $mainMod Alt, 1, $d move to workspace 1 (silent), movetoworkspacesilent, 1 +bindd = $mainMod Alt, 2, $d move to workspace 2 (silent), movetoworkspacesilent, 2 +bindd = $mainMod Alt, 3, $d move to workspace 3 (silent), movetoworkspacesilent, 3 +bindd = $mainMod Alt, 4, $d move to workspace 4 (silent), movetoworkspacesilent, 4 +bindd = $mainMod Alt, 5, $d move to workspace 5 (silent), movetoworkspacesilent, 5 +bindd = $mainMod Alt, 6, $d move to workspace 6 (silent), movetoworkspacesilent, 6 +bindd = $mainMod Alt, 7, $d move to workspace 7 (silent), movetoworkspacesilent, 7 +bindd = $mainMod Alt, 8, $d move to workspace 8 (silent), movetoworkspacesilent, 8 +bindd = $mainMod Alt, 9, $d move to workspace 9 (silent), movetoworkspacesilent, 9 +bindd = $mainMod Alt, 0, $d move to workspace 10 (silent), movetoworkspacesilent, 10 + + + +$d=#! unset the group name