Added keyboard layout to Waybar in Sway

This commit is contained in:
Logan G 2024-10-07 18:30:12 -06:00
parent 835769aa04
commit 03ed77a405
Signed by untrusted user: logan
GPG key ID: E328528C921E7A7A
3 changed files with 10 additions and 2 deletions

View file

@ -6,7 +6,7 @@
"modules-left": ["sway/workspaces", "sway/mode"],
"modules-center": ["sway/window"],
//"modules-right": ["tray", "custom/spotify", "custom/weather", "custom/mail", "custom/storage", "backlight", "pulseaudio", "network", "idle_inhibitor", "battery", "clock"],
"modules-right": ["pulseaudio", "backlight", "idle_inhibitor", "network", "battery", "clock", "tray"],
"modules-right": ["sway/language", "pulseaudio", "backlight", "idle_inhibitor", "network", "battery", "clock", "tray"],
"include": "~/.config/waybar/modules",
}

View file

@ -13,6 +13,14 @@
"tooltip": false
},
"sway/language": {
"format": "[{short}-{shortDescription}{variant}]",
"tooltip-format": "{long}",
"on-click": "swaymsg input type:keyboard xkb_switch_layout next",
"max-length": 15,
"tooltip": true
},
"hyprland/window": {
"max-length": 80,
"tooltip": false

View file

@ -46,7 +46,7 @@ window#waybar.solo {
color: rgba(238, 46, 36, 1);
}
#mode, #battery, #cpu, #memory, #network, #pulseaudio, #idle_inhibitor, #backlight, #custom-storage, #custom-spotify, #custom-weather, #custom-mail {
#mode, #battery, #cpu, #memory, #network, #pulseaudio, #idle_inhibitor, #backlight, #custom-storage, #custom-spotify, #custom-weather, #custom-mail, #language {
margin: 0px 6px 0px 10px;
min-width: 15px;
}