hyprwm / Hyprland

Hyprland is an independent, highly customizable, dynamic tiling Wayland compositor that doesn't sacrifice on its looks.
https://hyprland.org
BSD 3-Clause "New" or "Revised" License
19.54k stars 821 forks source link

Incorrect display of the active keyboard layout #7084

Open DIMFLIX-OFFICIAL opened 1 month ago

DIMFLIX-OFFICIAL commented 1 month ago

Regression?

Yes

System Info and Version

System/Version info ```sh Hyprland, built from branch at commit 918d8340afd652b011b937d29d5eea0be08467f5 (flake.lock: update). Date: Tue Jun 25 12:06:02 2024 Tag: v0.41.2, commits: 4886 flags: (if any) System Information: System name: Linux Node name: dimflix-pc Release: 6.9.8-arch1-1 Version: #1 SMP PREEMPT_DYNAMIC Fri, 05 Jul 2024 22:11:24 +0000 GPU information: 01:00.0 VGA compatible controller [0300]: NVIDIA Corporation GA102 [GeForce RTX 3080 Lite Hash Rate] [10de:2216] (rev a1) (prog-if 00 [VGA controller]) os-release: NAME="EndeavourOS" PRETTY_NAME="EndeavourOS" ID="endeavouros" ID_LIKE="arch" BUILD_ID=rolling ANSI_COLOR="38;2;23;147;209" HOME_URL="https://endeavouros.com" DOCUMENTATION_URL="https://discovery.endeavouros.com" SUPPORT_URL="https://forum.endeavouros.com" BUG_REPORT_URL="https://forum.endeavouros.com/c/general-system/endeavouros-installation" PRIVACY_POLICY_URL="https://endeavouros.com/privacy-policy-2" LOGO="endeavouros" plugins: ======Config-Start====== Config File: /home/dimflix/.config/hypr/hyprland.conf: Read Succeeded #   ░▒▒▒░░░░░▓▓          ___________ # ░░▒▒▒░░░░░▓▓        //___________/ # ░░▒▒▒░░░░░▓▓     _   _ _    _ _____ # ░░▒▒░░░░░▓▓▓▓▓▓ | | | | |  | |  __/ # ░▒▒░░░░▓▓   ▓▓ | |_| | |_/ /| |___ #  ░▒▒░░▓▓   ▓▓   \__  |____/ |____/ #    ░▒▓▓   ▓▓  //____/ $scrPath = $HOME/bin/old_hyprland/ # set scripts path # █▀▄▀█ █▀█ █▄░█ █ ▀█▀ █▀█ █▀█ # █░▀░█ █▄█ █░▀█ █ ░█░ █▄█ █▀▄ # See https://wiki.hyprland.org/Configuring/Monitors/ monitor = ,preferred,auto,auto # █░░ ▄▀█ █░█ █▄░█ █▀▀ █░█ # █▄▄ █▀█ █▄█ █░▀█ █▄▄ █▀█ # See https://wiki.hyprland.org/Configuring/Keywords/ exec-once = $scrPath/resetxdgportal.sh exec-once = dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP exec-once = dbus-update-activation-environment --systemd --all exec-once = systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP # for XDPH exec-once = $scrPath/polkitkdeauth.sh # authentication dialogue for GUI apps exec-once = waybar # launch the system bar exec-once = dunst # start notification demon exec-once = udiskie --no-automount --smart-tray # front-end that allows to manage removable media exec-once = wl-paste --type text --watch cliphist store # clipboard store text data exec-once = wl-paste --type image --watch cliphist store # clipboard store image data exec-once = swww init # start wallpaper daemon exec-once = python $HOME/.config/meowrch/meowrch.py --action set-wallpaper # █▀▀ █▄░█ █░█ # ██▄ █░▀█ ▀▄▀ # See https://wiki.hyprland.org/Configuring/Environment-variables/ env = PATH,$PATH:$scrPath env = XDG_CURRENT_DESKTOP,Hyprland env = XDG_SESSION_TYPE,wayland env = XDG_SESSION_DESKTOP,Hyprland env = QT_QPA_PLATFORM,wayland;xcb env = QT_QPA_PLATFORMTHEME,qt6ct env = QT_WAYLAND_DISABLE_WINDOWDECORATION,1 env = QT_AUTO_SCREEN_SCALE_FACTOR,1 env = MOZ_ENABLE_WAYLAND,1 env = GDK_SCALE,1 # █ █▄░█ █▀█ █░█ ▀█▀ # █ █░▀█ █▀▀ █▄█ ░█░ # See https://wiki.hyprland.org/Configuring/Variables/ input { kb_layout = us,ru kb_options = grp:alt_shift_toggle follow_mouse = 1 touchpad { natural_scroll = no } sensitivity = 0 force_no_accel = 1 } # See https://wiki.hyprland.org/Configuring/Keywords/#executing device { name = epic mouse V1 sensitivity = 0 } # See https://wiki.hyprland.org/Configuring/Variables/ gestures { workspace_swipe = true workspace_swipe_fingers = 3 } # █░░ ▄▀█ █▄█ █▀█ █░█ ▀█▀ █▀ # █▄▄ █▀█ ░█░ █▄█ █▄█ ░█░ ▄█ # See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ dwindle { pseudotile = yes preserve_split = yes } # See https://wiki.hyprland.org/Configuring/Master-Layout/ master { new_status = master } # █▀▄▀█ █ █▀ █▀▀ # █░▀░█ █ ▄█ █▄▄ # See https://wiki.hyprland.org/Configuring/Variables/ misc { vrr = 0 disable_hyprland_logo = true disable_splash_rendering = true force_default_wallpaper = 0 } xwayland { force_zero_scaling = true } # █▀ █▀█ █░█ █▀█ █▀▀ █▀▀ # ▄█ █▄█ █▄█ █▀▄ █▄▄ ██▄ source = ~/.config/hypr/animations.conf source = ~/.config/hypr/keybindings.conf source = ~/.config/hypr/windowrules.conf source = ~/.config/hypr/theme.conf source = ~/.config/hypr/monitors.conf # initially empty, to be configured by user and remains static source = ~/.config/hypr/userprefs.conf # initially empty, to be configured by user and remains static # Note: as userprefs.conf is sourced at the end, settings configured in this file will override the defaults source = ~/.config/hypr/nvidia.conf # auto sourced vars for nvidia\ Config File: /home/dimflix/.config/hypr/animations.conf: Read Succeeded # ▄▀█ █▄░█ █ █▀▄▀█ ▄▀█ ▀█▀ █ █▀█ █▄░█ # █▀█ █░▀█ █ █░▀░█ █▀█ ░█░ █ █▄█ █░▀█ # See https://wiki.hyprland.org/Configuring/Animations/ animations { enabled = yes bezier = wind, 0.05, 0.9, 0.1, 1.05 bezier = winIn, 0.1, 1.1, 0.1, 1.1 bezier = winOut, 0.3, -0.3, 0, 1 bezier = liner, 1, 1, 1, 1 animation = windows, 1, 6, wind, slide animation = windowsIn, 1, 6, winIn, slide animation = windowsOut, 1, 5, winOut, slide animation = windowsMove, 1, 5, wind, slide animation = border, 1, 1, liner animation = borderangle, 1, 30, liner, loop animation = fade, 1, 10, default animation = workspaces, 1, 5, wind } Config File: /home/dimflix/.config/hypr/keybindings.conf: Read Succeeded # █▄▀ █▀▀ █▄█ █▄▄ █ █▄░█ █▀▄ █ █▄░█ █▀▀ █▀ # █░█ ██▄ ░█░ █▄█ █ █░▀█ █▄▀ █ █░▀█ █▄█ ▄█ ##==> GLOBAL VARIABLES ############################################################################################## $mainMod = Super $subMod = $mainMod+Shift $term = alacritty $file = thunar $browser = firefox $binPath = ~/bin ############################################################################################## ##==> SYSTEM BINDS ############################################################################################## bind = $mainMod, Return, exec, $term #==> Terminal bind = $mainMod, E, exec, $file #==> File Manager bind = Ctrl+Shift, Escape, exec, alacritty -e btop #==> System monitor (Btop) bind = $mainMod, W, exec, python ~/.config/meowrch/meowrch.py --action select-wallpaper #==> Select wallapers bind = $mainMod, T, exec, python ~/.config/meowrch/meowrch.py --action select-theme #==> Select theme bind = , Print, exec, flameshot gui #==> Screenshot bind = $mainMod, P, exec, pavucontrol #==> Pavucontrol bind = $mainMod, V, exec, sh $binPath/rofi-menus/clipboard-manager.sh #==> Clipboard manager bind = $mainMod, D, exec, rofi -show drun #==> Apps Manager bind = $mainMod, X, exec, sh $binPath/rofi-menus/powermenu.sh #==> Powermenu bind = $mainMod, L, exec, sh $HOME/bin/screen-lock.sh #==> Lock screen bind = $mainMod, C, exec, sh $HOME/bin/color-picker.sh #==> Color Picker bind = $mainMod, B, exec, sh $HOME/bin/toggle-bar.sh #==> Toggle Waybar ############################################################################################## ##==> USER APPS ############################################################################################## bind = $subMod, C, exec, code #==> Visual Studio Code bind = $subMod, F, exec, firefox #==> Firefox bind = $subMod, T, exec, telegram-desktop #==> Telegram bind = $subMod, Y, exec, yandex-browser-stable #==> Yandex Browser bind = $subMod, O, exec, obs #==> OBS bind = $subMod, M, exec, ultimmc #==> Minecraft ############################################################################################## ##==> SYSTEM CONTROLS ################################################################################################# #-----------------------------------------------------------------------------------------------## VOLUME bindel = , XF86AudioRaiseVolume, exec, sh $HOME/bin/volume.sh --device output --action increase #==> increase volume bindel = , XF86AudioLowerVolume, exec, sh $HOME/bin/volume.sh --device output --action decrease #==> decrease volume bindl = , XF86AudioMute, exec, sh $HOME/bin/volume.sh --device output --action toggle #==> toggle audio mute #-----------------------------------------------------------------------------------------------## PLAYER bindl = , XF86AudioPlay, exec, playerctl play-pause #==> toggle between media play and pause bindl = , XF86AudioPause, exec, playerctl play-pause #==> toggle between media play and pause bindl = , XF86AudioNext, exec, playerctl next #==> media next bindl = , XF86AudioPrev, exec, playerctl previous #==> media previous bindl = , XF86AudioStop, exec, playerctl stop #==> media stop #-----------------------------------------------------------------------------------------------## BRIGHTNESS bindel = , XF86MonBrightnessUp, exec, sh $HOME/bin/brightnessctl.sh --up #==> increase brightness bindel = , XF86MonBrightnessDown, exec, sh $HOME/bin/brightnessctl.sh --down #==> decrease brightness ################################################################################################# ##==> HYPRLAND ############################################################################################## #--------------------------------------------------------------------------------------------# Session actions bind = $mainMod, Delete, exit #==> Kill hyprland session bind = Ctrl+Shift, R, exec, hyprctl reload #==> Reload hyprland session #--------------------------------------------------------------------------------------------# Window actions bind = $mainMod, Q, exec, hyprctl dispatch killactive "" #==> close focused window bind = $mainMod, Space, togglefloating #==> toggle the window between focus and float bind = Alt, Return, fullscreen #==> toggle the window between focus and fullscreen #--------------------------------------------------------------------------------------------## Move/Change window focus bind = $mainMod, Right, movefocus, r #==> Move right bind = $mainMod, Left, movefocus, l #==> Move left bind = $mainMod, Up, movefocus, u #==> Move up bind = $mainMod, Down, movefocus, d #==> Move Down bind = Alt, Tab, movefocus, d #==> Alt+Tab #--------------------------------------------------------------------------------------------## Switch workspaces bind = $mainMod, 1, workspace, 1 #==> Switch to 1 workspace bind = $mainMod, 2, workspace, 2 #==> Switch to 2 workspace bind = $mainMod, 3, workspace, 3 #==> Switch to 3 workspace bind = $mainMod, 4, workspace, 4 #==> Switch to 4 workspace bind = $mainMod, 5, workspace, 5 #==> Switch to 5 workspace bind = $mainMod, 6, workspace, 6 #==> Switch to 6 workspace bind = $mainMod, 7, workspace, 7 #==> Switch to 7 workspace bind = $mainMod, 8, workspace, 8 #==> Switch to 8 workspace bind = $mainMod, 9, workspace, 9 #==> Switch to 9 workspace bind = $mainMod, 0, workspace, 10 #==> Switch to 10 workspace bind = $mainMod+Ctrl, Right, workspace, r+1 #==> Switch to next workspace bind = $mainMod+Ctrl, Left, workspace, r-1 #==> Switch to prev workspace bind = $mainMod+Ctrl, Down, workspace, empty #==> Switch to the first empty workspace bind = $mainMod, mouse_down, workspace, e+10 #==> Scroll workspaces forward bind = $mainMod, mouse_up, workspace, e-10 #==> Scroll workspaces back #--------------------------------------------------------------------------------------------## Resize windows binde = $mainMod+Shift, Right, resizeactive, 30 0 #==> Resize to the right binde = $mainMod+Shift, Left, resizeactive, -30 0 #==> Resize to the left binde = $mainMod+Shift, Up, resizeactive, 0 -30 #==> Resize to the up binde = $mainMod+Shift, Down, resizeactive, 0 30 #==> Resize to the down bindm = $mainMod, mouse:273, resizewindow #==> Resize with the mouse #--------------------------------------------------------------------------------------------## Move focused window to a workspace bind = $mainMod+Shift, 1, movetoworkspace, 1 #==> Move to 1 workspace bind = $mainMod+Shift, 2, movetoworkspace, 2 #==> Move to 2 workspace bind = $mainMod+Shift, 3, movetoworkspace, 3 #==> Move to 3 workspace bind = $mainMod+Shift, 4, movetoworkspace, 4 #==> Move to 4 workspace bind = $mainMod+Shift, 5, movetoworkspace, 5 #==> Move to 5 workspace bind = $mainMod+Shift, 6, movetoworkspace, 6 #==> Move to 6 workspace bind = $mainMod+Shift, 7, movetoworkspace, 7 #==> Move to 7 workspace bind = $mainMod+Shift, 8, movetoworkspace, 8 #==> Move to 8 workspace bind = $mainMod+Shift, 9, movetoworkspace, 9 #==> Move to 9 workspace bind = $mainMod+Shift, 0, movetoworkspace, 10 #==> Move to 10 workspace #--------------------------------------------------------------------------------------------## Move focused window around the current workspace bind = $mainMod+Shift+Ctrl, Right, movewindow, r #==> Move to right bind = $mainMod+Shift+Ctrl, Left, movewindow, l #==> Move to left bind = $mainMod+Shift+Ctrl, Up, movewindow, u #==> Move to up bind = $mainMod+Shift+Ctrl, Down, movewindow, d #==> Move to down bindm = $mainMod, mouse:272, movewindow #==> Move with the mouse #--------------------------------------------------------------------------------------------## Silent workspaces bind = $mainMod+Alt, S, movetoworkspacesilent, special #==> Move window to silent workspace bind = $mainMod+Alt, S, movetoworkspace, previous #==> Move window to a regular workspace bind = $mainMod, S, togglespecialworkspace #==> Open a silent workspace ############################################################################################## Config File: /home/dimflix/.config/hypr/windowrules.conf: Read Succeeded # █░█░█ █ █▄░█ █▀▄ █▀█ █░█░█   █▀█ █░█ █░░ █▀▀ █▀ # ▀▄▀▄▀ █ █░▀█ █▄▀ █▄█ ▀▄▀▄▀   █▀▄ █▄█ █▄▄ ██▄ ▄█ # See https://wiki.hyprland.org/Configuring/Window-Rules/ windowrulev2 = opacity 0.90 0.90,class:^(firefox)$ windowrulev2 = opacity 0.90 0.90,class:^(Brave-browser)$ windowrulev2 = opacity 0.80 0.80,class:^(code-oss)$ windowrulev2 = opacity 0.80 0.80,class:^(Code)$ windowrulev2 = opacity 0.80 0.80,class:^(code-url-handler)$ windowrulev2 = opacity 0.80 0.80,class:^(code-insiders-url-handler)$ windowrulev2 = opacity 0.80 0.80,class:^(Alacritty)$ windowrulev2 = opacity 0.80 0.80,class:^(kitty)$ windowrulev2 = opacity 0.80 0.80,class:^(org.kde.dolphin)$ windowrulev2 = opacity 0.80 0.80,class:^(org.kde.ark)$ windowrulev2 = opacity 0.80 0.80,class:^(nwg-look)$ windowrulev2 = opacity 0.80 0.80,class:^(qt5ct)$ windowrulev2 = opacity 0.80 0.80,class:^(qt6ct)$ windowrulev2 = opacity 0.80 0.80,class:^(kvantummanager)$ windowrulev2 = opacity 0.80 0.70,class:^(org.pulseaudio.pavucontrol)$ windowrulev2 = opacity 0.80 0.70,class:^(blueman-manager)$ windowrulev2 = opacity 0.80 0.70,class:^(nm-applet)$ windowrulev2 = opacity 0.80 0.70,class:^(nm-connection-editor)$ windowrulev2 = opacity 0.80 0.70,class:^(org.kde.polkit-kde-authentication-agent-1)$ windowrulev2 = opacity 0.80 0.70,class:^(polkit-gnome-authentication-agent-1)$ windowrulev2 = opacity 0.80 0.70,class:^(org.freedesktop.impl.portal.desktop.gtk)$ windowrulev2 = opacity 0.80 0.70,class:^(org.freedesktop.impl.portal.desktop.hyprland)$ windowrulev2 = opacity 0.70 0.70,class:^([Ss]team)$ windowrulev2 = opacity 0.70 0.70,class:^(steamwebhelper)$ windowrulev2 = opacity 0.70 0.70,class:^(Spotify)$ windowrulev2 = opacity 0.70 0.70,initialTitle:^(Spotify Free)$ windowrulev2 = opacity 0.90 0.90,class:^(com.github.rafostar.Clapper)$ # Clapper-Gtk windowrulev2 = opacity 0.80 0.80,class:^(com.github.tchx84.Flatseal)$ # Flatseal-Gtk windowrulev2 = opacity 0.80 0.80,class:^(hu.kramo.Cartridges)$ # Cartridges-Gtk windowrulev2 = opacity 0.80 0.80,class:^(com.obsproject.Studio)$ # Obs-Qt windowrulev2 = opacity 0.80 0.80,class:^(gnome-boxes)$ # Boxes-Gtk windowrulev2 = opacity 0.80 0.80,class:^(discord)$ # Discord-Electron windowrulev2 = opacity 0.80 0.80,class:^(WebCord)$ # WebCord-Electron windowrulev2 = opacity 0.80 0.80,class:^(ArmCord)$ # ArmCord-Electron windowrulev2 = opacity 0.80 0.80,class:^(app.drey.Warp)$ # Warp-Gtk windowrulev2 = opacity 0.80 0.80,class:^(net.davidotek.pupgui2)$ # ProtonUp-Qt windowrulev2 = opacity 0.80 0.80,class:^(yad)$ # Protontricks-Gtk windowrulev2 = opacity 0.80 0.80,class:^(Signal)$ # Signal-Gtk windowrulev2 = opacity 0.80 0.80,class:^(io.github.alainm23.planify)$ # planify-Gtk windowrulev2 = opacity 0.80 0.80,class:^(io.gitlab.theevilskeleton.Upscaler)$ # Upscaler-Gtk windowrulev2 = opacity 0.80 0.80,class:^(com.github.unrud.VideoDownloader)$ # VideoDownloader-Gtk windowrulev2 = opacity 0.80 0.80,class:^(io.gitlab.adhami3310.Impression)$ # Impression-Gtk windowrulev2 = opacity 0.80 0.80,class:^(io.missioncenter.MissionCenter)$ # MissionCenter-Gtk windowrulev2 = opacity 0.80 0.80,class:^(io.github.flattool.Warehouse)$ # Warehouse-Gtk windowrulev2 = float,class:^(org.kde.dolphin)$,title:^(Progress Dialog — Dolphin)$ windowrulev2 = float,class:^(org.kde.dolphin)$,title:^(Copying — Dolphin)$ windowrulev2 = float,class:^(firefox)$,title:^(Picture-in-Picture)$ windowrulev2 = float,class:^(firefox)$,title:^(Library)$ windowrulev2 = float,class:^(kitty)$,title:^(top)$ windowrulev2 = float,class:^(kitty)$,title:^(btop)$ windowrulev2 = float,class:^(kitty)$,title:^(htop)$ windowrulev2 = float,class:^(vlc)$ windowrulev2 = float,class:^(kvantummanager)$ windowrulev2 = float,class:^(qt5ct)$ windowrulev2 = float,class:^(qt6ct)$ windowrulev2 = float,class:^(nwg-look)$ windowrulev2 = float,class:^(org.kde.ark)$ windowrulev2 = float,class:^(org.pulseaudio.pavucontrol)$ windowrulev2 = float,class:^(blueman-manager)$ windowrulev2 = float,class:^(nm-applet)$ windowrulev2 = float,class:^(nm-connection-editor)$ windowrulev2 = float,class:^(org.kde.polkit-kde-authentication-agent-1)$ windowrulev2 = float,class:^(Signal)$ # Signal-Gtk windowrulev2 = float,class:^(com.github.rafostar.Clapper)$ # Clapper-Gtk windowrulev2 = float,class:^(app.drey.Warp)$ # Warp-Gtk windowrulev2 = float,class:^(net.davidotek.pupgui2)$ # ProtonUp-Qt windowrulev2 = float,class:^(yad)$ # Protontricks-Gtk windowrulev2 = float,class:^(eog)$ # Imageviewer-Gtk windowrulev2 = float,class:^(io.github.alainm23.planify)$ # planify-Gtk windowrulev2 = float,class:^(io.gitlab.theevilskeleton.Upscaler)$ # Upscaler-Gtk windowrulev2 = float,class:^(com.github.unrud.VideoDownloader)$ # VideoDownloader-Gkk windowrulev2 = float,class:^(io.gitlab.adhami3310.Impression)$ # Impression-Gtk windowrulev2 = float,class:^(io.missioncenter.MissionCenter)$ # MissionCenter-Gtk windowrulev2 = noblur, class:^()$, title:^()$ # █░░ ▄▀█ █▄█ █▀▀ █▀█   █▀█ █░█ █░░ █▀▀ █▀ # █▄▄ █▀█ ░█░ ██▄ █▀▄   █▀▄ █▄█ █▄▄ ██▄ ▄█ layerrule = blur,rofi layerrule = ignorezero,rofi layerrule = blur,notifications layerrule = ignorezero,notifications layerrule = blur,swaync-notification-window layerrule = ignorezero,swaync-notification-window layerrule = blur,swaync-control-center layerrule = ignorezero,swaync-control-center layerrule = blur,logout_dialog layerrule = blur , waybar layerrule = ignorezero , waybar Config File: /home/dimflix/.config/hypr/theme.conf: Read Succeeded # █▀▀ █░█ █▀█ █▀ █▀█ █▀█ # █▄▄ █▄█ █▀▄ ▄█ █▄█ █▀▄ exec = hyprctl setcursor Bibata-Modern-Classic 20 exec = gsettings set org.gnome.desktop.interface cursor-theme 'Bibata-Modern-Classic' exec = gsettings set org.gnome.desktop.interface cursor-size 20 # █▀▀ █▀█ █▄░█ ▀█▀ # █▀░ █▄█ █░▀█ ░█░ exec = gsettings set org.gnome.desktop.interface font-name 'Cantarell 10' exec = gsettings set org.gnome.desktop.interface document-font-name 'Cantarell 10' exec = gsettings set org.gnome.desktop.interface monospace-font-name 'CaskaydiaCove Nerd Font Mono 9' exec = gsettings set org.gnome.desktop.interface font-antialiasing 'rgba' exec = gsettings set org.gnome.desktop.interface font-hinting 'full' # █▀ █▀█ █▀▀ █▀▀ █ ▄▀█ █░░ # ▄█ █▀▀ ██▄ █▄▄ █ █▀█ █▄▄ decoration { dim_special = 0.3 blur { special = true } } ##==> THEME exec = gsettings set org.gnome.desktop.interface icon-theme 'Tela-circle-dracula' exec = gsettings set org.gnome.desktop.interface gtk-theme 'oomox-catppuccin-mocha' exec = gsettings set org.gnome.desktop.interface color-scheme 'prefer-dark' general { gaps_in = 3 gaps_out = 8 border_size = 3 col.active_border = rgb(b4befe) rgb(f5c2e7) 45deg col.inactive_border = rgba(00000000) layout = dwindle resize_on_border = true } decoration { rounding = 10 drop_shadow = false blur { enabled = yes size = 6 passes = 3 new_optimizations = on ignore_opacity = on xray = false } } layerrule = blur,waybar Config File: /home/dimflix/.config/hypr/monitors.conf: Read Succeeded # █▀▄▀█ █▀█ █▄░█ █ ▀█▀ █▀█ █▀█ █▀ # █░▀░█ █▄█ █░▀█ █ ░█░ █▄█ █▀▄ ▄█ # Set your monitor configuration here # See https://wiki.hyprland.org/Configuring/Monitors/ # For a sample file, please refer to https://github.com/prasanthrangan/hyprdots/blob/main/Configs/.config/hypr/monitors.t2 monitor = HDMI-A-1, 1920x1080@144, 0x0, 1 Config File: /home/dimflix/.config/hypr/userprefs.conf: Read Succeeded # █░█ █▀ █▀▀ █▀█   █▀█ █▀█ █▀▀ █▀▀ █▀ # █▄█ ▄█ ██▄ █▀▄   █▀▀ █▀▄ ██▄ █▀░ ▄█ # Set your personal hyprland configuration here # For a sample file, please refer to https://github.com/prasanthrangan/hyprdots/blob/main/Configs/.config/hypr/userprefs.t2 Config File: /home/dimflix/.config/hypr/nvidia.conf: Read Succeeded # █▄░█ █░█ █ █▀▄ █ ▄▀█ # █░▀█ ▀▄▀ █ █▄▀ █ █▀█ # See https://wiki.hyprland.org/Nvidia/ env = LIBVA_DRIVER_NAME,nvidia env = __GLX_VENDOR_LIBRARY_NAME,nvidia env = __GL_VRR_ALLOWED,1 env = WLR_NO_HARDWARE_CURSORS,1 env = WLR_DRM_NO_ATOMIC,1 ======Config-End======== ```

Description

Incorrect display of the active keyboard layout. I have Russian and English languages ​​installed. When switching the language, nothing changes in the output of these commands (English remains):

hyprctl devices -j |
jq -r '.keyboards[] | .active_keymap' |
head -n1 |
cut -c1-2 |
tr 'a-z' 'A-Z'
setxkbmap -query

Capslock is also not read properly ...

How to reproduce

Just install Russian and English in the hyprland configuration, and try to change the layout, then repeat one of these commands:

hyprctl devices -j |
jq -r '.keyboards[] | .active_keymap' |
head -n1 |
cut -c1-2 |
tr 'a-z' 'A-Z'
setxkbmap -query

Crash reports, logs, images, videos

https://github.com/user-attachments/assets/1011f110-4321-4e93-a98f-da7056b3e200

MahouShoujoMivutilde commented 1 month ago

...head -n 1

here is your problem.

❯ hyprctl devices -j | jq -r '.keyboards[] | "\(.active_keymap) - \(.name)"' 
English (US) - power-button
English (US) - power-button-1
English (US) - logitech-usb-keyboard
English (US) - logitech-usb-keyboard-consumer-control
English (US) - logitech-usb-keyboard-system-control
English (US) - eee-pc-wmi-hotkeys

~ 
❯ hyprctl devices -j | jq -r '.keyboards[] | "\(.active_keymap) - \(.name)"'
English (US) - power-button
English (US) - power-button-1
Russian - logitech-usb-keyboard
English (US) - logitech-usb-keyboard-consumer-control
English (US) - logitech-usb-keyboard-system-control
English (US) - eee-pc-wmi-hotkeys

setxkbmap only displays defined layout, not an active one, and only for xwayland apps.

❯ setxkbmap -query
WARNING: Running setxkbmap against an Xwayland server
rules:      evdev
model:      pc105
layout:     us

~ 
❯ setxkbmap -layout us,ru             # this is NOT needed for writing in russian for xwayland
WARNING: Running setxkbmap against an Xwayland server

~ 
❯ setxkbmap -query       
WARNING: Running setxkbmap against an Xwayland server
rules:      evdev
model:      pc105
layout:     us,ru

Iirc, for that reason on X11 https://github.com/sergei-mironov/xkb-switch was written. (Because langmap in vim sucked and someone decided to write a plugin to just switch layout on InsertEnter, InsertLeave).

You probably want

hyprctl devices -j | jq -r '.keyboards.[] | select(.main == true).active_keymap'

I don't remember if .main always worked correctly (I'm on latest git), but for a long time pre-aquamarine I've been using

device {
    name = logitech-usb-keyboard
    kb_layout = us,ru
    kb_options = caps:escape,grp:toggle
}

and then querying for device I care about.

For waybar (if that's what it is), you can also set your preferred keyboard

    "hyprland/language": {
        "format": " {}",
        "format-en": "us",
        "format-ru": "ru",
        "keyboard-name": "logitech-usb-keyboard"
    },
DIMFLIX-OFFICIAL commented 1 month ago

hyprctl devices -j | jq -r '.keyboards.[] | select(.main == true).active_keymap'

Yes, it works for me. Could you tell me how to find out the status of Caps Lock in hyprland?

MahouShoujoMivutilde commented 1 month ago

I don't think you can.

No hyprctl options seem to provide modifier keys status, and no event is fired on socket2 when you press caps.

There is an internal state of modifier keys that is maintained, of course, but you'll have to write a plugin to get it, I think.

https://github.com/hyprwm/Hyprland/blob/3cc2028def295735ce496a42c79d1b922d2de45d/src/devices/IKeyboard.cpp#L312

What's the use case?

You might want to look at xkb options, maybe it's already covered:

   Caps Lock behavior
       ┌──────────────────────────────────────────────────────────────────────┐
       │ Option                         Description                           │
       ├──────────────────────────────────────────────────────────────────────┤
       │ caps:internal                  Caps  Lock  uses internal capitaliza‐ │
       │                                tion; Shift "pauses" Caps Lock        │
       │ caps:internal_nocancel         Caps Lock uses  internal  capitaliza‐ │
       │                                tion; Shift does not affect Caps Lock │
       │ caps:shift                     Caps Lock acts as Shift with locking; │
       │                                Shift "pauses" Caps Lock              │
       │ caps:shift_nocancel            Caps Lock acts as Shift with locking; │
       │                                Shift does not affect Caps Lock       │
       │ caps:capslock                  Caps  Lock toggles normal capitaliza‐ │
       │                                tion of alphabetic characters         │
       │ caps:shiftlock                 Caps Lock toggles Shift Lock (affects │
       │                                all keys)                             │
       │ caps:swapescape                Swap Esc and Caps Lock                │
       │ caps:escape                    Make Caps Lock an additional Esc      │
       │ caps:escape_shifted_capslock   Make Caps Lock an additional Esc, but │
       │                                Shift + Caps Lock is the regular Caps │
       │                                Lock                                  │
       │ caps:backspace                 Make Caps Lock  an  additional  Back‐ │
       │                                space                                 │
       │ caps:super                     Make Caps Lock an additional Super    │
       │ caps:hyper                     Make Caps Lock an additional Hyper    │
       │ caps:menu                      Make Caps Lock an additional Menu key │
       │ caps:numlock                   Make Caps Lock an additional Num Lock │
       │ caps:ctrl_modifier             Make  Caps  Lock act as an additional │
       │                                Ctrl modifier, but  keep  identifying │
       │                                as Caps Lock                          │
       │ caps:digits_row                Caps  Lock gives digits on the digits │
       │                                row (Azerty layouts)                  │
       │ caps:none                      Caps Lock is disabled                 │
       └──────────────────────────────────────────────────────────────────────┘

from man xkeyboard-config, which input:kb_options respects.