aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJaKooLit <jimmielovejay@gmail.com>2023-12-07 10:58:39 +0900
committerJaKooLit <jimmielovejay@gmail.com>2023-12-07 10:58:39 +0900
commit86ccfafed6083d36a38714867202545ed83ae8b2 (patch)
tree650a6cc50674aad3e90a544d998ae9f2cc30fbfc
parentfefd56f435d8885f30982c3d5ad09a91495d83a8 (diff)
added custom-keyboad waybar module
-rwxr-xr-xconfig/hypr/scripts/SwitchKeyboardLayout.sh31
-rw-r--r--config/waybar/configs/Def[Bottom]-Laptop3
-rw-r--r--config/waybar/configs/Def[TOP]-Laptop3
-rw-r--r--config/waybar/configs/Default [Bottom]2
-rw-r--r--config/waybar/configs/Default [TOP]2
-rw-r--r--config/waybar/modules10
-rw-r--r--config/waybar/style/Catppuccin-Latte.css3
-rw-r--r--config/waybar/style/Catppuccin-Mocha.css3
-rw-r--r--config/waybar/style/Chroma Edge.css1
-rw-r--r--config/waybar/style/Chroma Glow.css3
-rw-r--r--config/waybar/style/Chroma Tally.css3
-rw-r--r--config/waybar/style/Crimson.css3
-rw-r--r--config/waybar/style/Crystal Clear.css3
-rw-r--r--config/waybar/style/Golden Noir.css3
-rw-r--r--config/waybar/style/Monochrome Contrast.css9
-rw-r--r--config/waybar/style/Monochrome Manifest.css9
-rw-r--r--config/waybar/style/Obsidian Edge.css3
-rw-r--r--config/waybar/style/Obsidian Glow.css3
-rw-r--r--config/waybar/style/Purpl.css3
-rw-r--r--config/waybar/style/Pywal Simple.css3
-rw-r--r--config/waybar/style/Pywal.css5
-rw-r--r--config/waybar/style/Rainbow Spectrum.css4
-rw-r--r--config/waybar/style/Rose Pine.css3
-rw-r--r--config/waybar/style/Simple Pink.css3
-rw-r--r--config/waybar/style/Translucent Chromatic.css3
25 files changed, 75 insertions, 46 deletions
diff --git a/config/hypr/scripts/SwitchKeyboardLayout.sh b/config/hypr/scripts/SwitchKeyboardLayout.sh
new file mode 100755
index 00000000..40b212f0
--- /dev/null
+++ b/config/hypr/scripts/SwitchKeyboardLayout.sh
@@ -0,0 +1,31 @@
+#!/bin/bash
+
+layout_f="/tmp/kb_layout"
+current_layout=$(cat "$layout_f")
+
+# Read keyboard layout settings from Settings.conf
+settings_file="$HOME/.config/hypr/configs/Settings.conf"
+
+if [ -f "$settings_file" ]; then
+ # Extract the value of kb_layout from Settings.conf
+ kb_layout_line=$(grep 'kb_layout=' "$settings_file" | cut -d '=' -f 2)
+ IFS=',' read -ra layout_mapping <<< "$kb_layout_line"
+fi
+
+layout_count=${#layout_mapping[@]}
+
+# Find the index of the current layout in the mapping
+for ((i = 0; i < layout_count; i++)); do
+ if [ "$current_layout" == "${layout_mapping[i]}" ]; then
+ current_index=$i
+ break
+ fi
+done
+
+# Calculate the index of the next layout
+next_index=$(( (current_index + 1) % layout_count ))
+new_layout="${layout_mapping[next_index]}"
+
+# Update the keyboard layout
+hyprctl keyword input:kb_layout "$new_layout"
+echo "$new_layout" > "$layout_f"
diff --git a/config/waybar/configs/Def[Bottom]-Laptop b/config/waybar/configs/Def[Bottom]-Laptop
index 8bf8ecd1..d7b7d18a 100644
--- a/config/waybar/configs/Def[Bottom]-Laptop
+++ b/config/waybar/configs/Def[Bottom]-Laptop
@@ -56,11 +56,12 @@
"custom/separator#dot-line",
"pulseaudio",
"custom/separator#dot-line",
- //"wireplumber",
"pulseaudio#microphone",
"custom/separator#dot-line",
"keyboard-state",
"custom/separator#dot-line",
+ "custom/keyboard",
+ "custom/separator#dot-line",
"custom/power",
],
}
diff --git a/config/waybar/configs/Def[TOP]-Laptop b/config/waybar/configs/Def[TOP]-Laptop
index eabaf37e..8808e762 100644
--- a/config/waybar/configs/Def[TOP]-Laptop
+++ b/config/waybar/configs/Def[TOP]-Laptop
@@ -56,11 +56,12 @@
"custom/separator#dot-line",
"pulseaudio",
"custom/separator#dot-line",
- //"wireplumber",
"pulseaudio#microphone",
"custom/separator#dot-line",
"keyboard-state",
"custom/separator#dot-line",
+ "custom/keyboard",
+ "custom/separator#dot-line",
"custom/power",
],
} \ No newline at end of file
diff --git a/config/waybar/configs/Default [Bottom] b/config/waybar/configs/Default [Bottom]
index 6c37a22f..1e1e5abf 100644
--- a/config/waybar/configs/Default [Bottom]
+++ b/config/waybar/configs/Default [Bottom]
@@ -56,6 +56,8 @@
"custom/separator#dot-line",
"keyboard-state",
"custom/separator#dot-line",
+ "custom/keyboard",
+ "custom/separator#dot-line",
"custom/power",
],
}
diff --git a/config/waybar/configs/Default [TOP] b/config/waybar/configs/Default [TOP]
index edc14094..acce267f 100644
--- a/config/waybar/configs/Default [TOP]
+++ b/config/waybar/configs/Default [TOP]
@@ -56,6 +56,8 @@
"custom/separator#dot-line",
"keyboard-state",
"custom/separator#dot-line",
+ "custom/keyboard",
+ "custom/separator#dot-line",
"custom/power",
],
} \ No newline at end of file
diff --git a/config/waybar/modules b/config/waybar/modules
index a4567c08..fa989045 100644
--- a/config/waybar/modules
+++ b/config/waybar/modules
@@ -457,6 +457,14 @@
"tooltip": false,
"on-click": "~/.config/hypr/scripts/KeyHints.sh",
},
+
+ "custom/keyboard": {
+ "exec": "cat /tmp/kb_layout",
+ "interval": 3,
+ "format": " {}",
+ "on-click": "~/.config/hypr/scripts/SwitchKeyboardLayout.sh",
+ "tooltip": false,
+ },
"custom/light_dark": {
"format": "",
@@ -640,7 +648,7 @@
"temperature#vertical": {
"interval": 10,
"tooltip": true,
- "hwmon-path": ["/sys/class/hwmon/hwmon1/temp1_input", "/sys/class/thermal/thermal_zone0/temp"],
+ "hwmon-path": ["/sys/class/hwmon/hwmon6/temp1_input", "/sys/class/thermal/thermal_zone0/temp"],
//"thermal-zone": 0,
"critical-threshold": 80,
"format-critical": "{icon}\n{temperatureC}°C",
diff --git a/config/waybar/style/Catppuccin-Latte.css b/config/waybar/style/Catppuccin-Latte.css
index 619b24a3..21f295ba 100644
--- a/config/waybar/style/Catppuccin-Latte.css
+++ b/config/waybar/style/Catppuccin-Latte.css
@@ -53,8 +53,6 @@ window#waybar.hidden {
#cpu,
#disk,
#idle_inhibitor,
-#keyboard-state label,
-#keyboard-state label.locked,
#keyboard-state,
#memory,
#mode,
@@ -72,6 +70,7 @@ window#waybar.hidden {
#custom-backlight,
#custom-cycle_wall,
#custom-keybinds,
+#custom-keyboard,
#custom-light_dark,
#custom-lock,
#custom-menu,
diff --git a/config/waybar/style/Catppuccin-Mocha.css b/config/waybar/style/Catppuccin-Mocha.css
index eceb569b..1d49b33f 100644
--- a/config/waybar/style/Catppuccin-Mocha.css
+++ b/config/waybar/style/Catppuccin-Mocha.css
@@ -59,8 +59,6 @@ window#waybar.hidden {
#cpu,
#disk,
#idle_inhibitor,
-#keyboard-state label,
-#keyboard-state label.locked,
#keyboard-state,
#memory,
#mode,
@@ -78,6 +76,7 @@ window#waybar.hidden {
#custom-backlight,
#custom-cycle_wall,
#custom-keybinds,
+#custom-keyboard,
#custom-light_dark,
#custom-lock,
#custom-menu,
diff --git a/config/waybar/style/Chroma Edge.css b/config/waybar/style/Chroma Edge.css
index fac5035a..7195b3f1 100644
--- a/config/waybar/style/Chroma Edge.css
+++ b/config/waybar/style/Chroma Edge.css
@@ -107,6 +107,7 @@ tooltip label{
#custom-backlight,
#custom-cycle_wall,
#custom-keybinds,
+#custom-keyboard,
#custom-light_dark,
#custom-lock,
#custom-menu,
diff --git a/config/waybar/style/Chroma Glow.css b/config/waybar/style/Chroma Glow.css
index 46cfe7c5..789b2675 100644
--- a/config/waybar/style/Chroma Glow.css
+++ b/config/waybar/style/Chroma Glow.css
@@ -102,8 +102,6 @@ tooltip label{
#cpu,
#disk,
#idle_inhibitor,
-#keyboard-state label,
-#keyboard-state label.locked,
#keyboard-state,
#memory,
#mode,
@@ -121,6 +119,7 @@ tooltip label{
#custom-backlight,
#custom-cycle_wall,
#custom-keybinds,
+#custom-keyboard,
#custom-light_dark,
#custom-lock,
#custom-menu,
diff --git a/config/waybar/style/Chroma Tally.css b/config/waybar/style/Chroma Tally.css
index 789cb384..263906d7 100644
--- a/config/waybar/style/Chroma Tally.css
+++ b/config/waybar/style/Chroma Tally.css
@@ -59,8 +59,6 @@ window#waybar {
#cpu,
#disk,
#idle_inhibitor,
-#keyboard-state label,
-#keyboard-state label.locked,
#keyboard-state,
#memory,
#mode,
@@ -78,6 +76,7 @@ window#waybar {
#custom-backlight,
#custom-cycle_wall,
#custom-keybinds,
+#custom-keyboard,
#custom-light_dark,
#custom-lock,
#custom-menu,
diff --git a/config/waybar/style/Crimson.css b/config/waybar/style/Crimson.css
index 44c20e0f..8d139d1a 100644
--- a/config/waybar/style/Crimson.css
+++ b/config/waybar/style/Crimson.css
@@ -116,8 +116,6 @@ tooltip {
#cpu,
#disk,
#idle_inhibitor,
-#keyboard-state label,
-#keyboard-state label.locked,
#keyboard-state,
#memory,
#mode,
@@ -135,6 +133,7 @@ tooltip {
#custom-backlight,
#custom-cycle_wall,
#custom-keybinds,
+#custom-keyboard,
#custom-light_dark,
#custom-lock,
#custom-menu,
diff --git a/config/waybar/style/Crystal Clear.css b/config/waybar/style/Crystal Clear.css
index 324c7aad..566b1961 100644
--- a/config/waybar/style/Crystal Clear.css
+++ b/config/waybar/style/Crystal Clear.css
@@ -102,8 +102,6 @@ tooltip {
#cpu,
#disk,
#idle_inhibitor,
-#keyboard-state label,
-#keyboard-state label.locked,
#keyboard-state,
#memory,
#mode,
@@ -119,6 +117,7 @@ tooltip {
#workspaces,
#custom-cycle_wall,
#custom-keybinds,
+#custom-keyboard,
#custom-light_dark,
#custom-lock,
#custom-menu,
diff --git a/config/waybar/style/Golden Noir.css b/config/waybar/style/Golden Noir.css
index 2540188c..42ae216b 100644
--- a/config/waybar/style/Golden Noir.css
+++ b/config/waybar/style/Golden Noir.css
@@ -128,8 +128,6 @@ tooltip {
#cpu,
#disk,
#idle_inhibitor,
-#keyboard-state label,
-#keyboard-state label.locked,
#keyboard-state,
#memory,
#mode,
@@ -147,6 +145,7 @@ tooltip {
#custom-backlight,
#custom-cycle_wall,
#custom-keybinds,
+#custom-keyboard,
#custom-light_dark,
#custom-lock,
#custom-menu,
diff --git a/config/waybar/style/Monochrome Contrast.css b/config/waybar/style/Monochrome Contrast.css
index 74602604..6dbb4732 100644
--- a/config/waybar/style/Monochrome Contrast.css
+++ b/config/waybar/style/Monochrome Contrast.css
@@ -40,7 +40,7 @@ tooltip label{
.modules-right {
background-color: white;
color: black;
- border-bottom: 2px;
+ border-bottom: 4px;
border-style: solid;
border-color: black;
border-radius: 10px;
@@ -52,7 +52,7 @@ tooltip label{
.modules-center {
background-color: white;
color: black;
- border-bottom: 2px;
+ border-bottom: 4px;
border-style: solid;
border-color: black;
border-radius: 10px;
@@ -64,7 +64,7 @@ tooltip label{
.modules-left {
background-color: white;
color: black;
- border-bottom: 2px;
+ border-bottom: 4px;
border-style: solid;
border-color: black;
border-radius: 10px;
@@ -115,8 +115,6 @@ tooltip label{
#cpu,
#disk,
#idle_inhibitor,
-#keyboard-state label,
-#keyboard-state label.locked,
#keyboard-state,
#memory,
#mode,
@@ -134,6 +132,7 @@ tooltip label{
#custom-backlight,
#custom-cycle_wall,
#custom-keybinds,
+#custom-keyboard,
#custom-light_dark,
#custom-lock,
#custom-menu,
diff --git a/config/waybar/style/Monochrome Manifest.css b/config/waybar/style/Monochrome Manifest.css
index 2d4cafd0..913dc8e3 100644
--- a/config/waybar/style/Monochrome Manifest.css
+++ b/config/waybar/style/Monochrome Manifest.css
@@ -40,7 +40,7 @@ tooltip label{
.modules-right {
background-color: black;
color: white;
- border-bottom: 2px;
+ border-bottom: 3px;
border-style: solid;
border-color: white;
border-radius: 10px;
@@ -52,7 +52,7 @@ tooltip label{
.modules-center {
background-color: black;
color: white;
- border-bottom: 2px;
+ border-bottom: 3px;
border-style: solid;
border-color: white;
border-radius: 10px;
@@ -64,7 +64,7 @@ tooltip label{
.modules-left {
background-color: black;
color: white;
- border-bottom: 2px;
+ border-bottom: 3px;
border-style: solid;
border-color: white;
border-radius: 10px;
@@ -114,8 +114,6 @@ tooltip label{
#cpu,
#disk,
#idle_inhibitor,
-#keyboard-state label,
-#keyboard-state label.locked,
#keyboard-state,
#memory,
#mode,
@@ -133,6 +131,7 @@ tooltip label{
#custom-backlight,
#custom-cycle_wall,
#custom-keybinds,
+#custom-keyboard,
#custom-light_dark,
#custom-lock,
#custom-menu,
diff --git a/config/waybar/style/Obsidian Edge.css b/config/waybar/style/Obsidian Edge.css
index 59f58285..53aa79ba 100644
--- a/config/waybar/style/Obsidian Edge.css
+++ b/config/waybar/style/Obsidian Edge.css
@@ -121,8 +121,6 @@ tooltip label {
#cpu,
#disk,
#idle_inhibitor,
-#keyboard-state label,
-#keyboard-state label.locked,
#keyboard-state,
#memory,
#mode,
@@ -140,6 +138,7 @@ tooltip label {
#custom-backlight,
#custom-cycle_wall,
#custom-keybinds,
+#custom-keyboard,
#custom-light_dark,
#custom-lock,
#custom-menu,
diff --git a/config/waybar/style/Obsidian Glow.css b/config/waybar/style/Obsidian Glow.css
index e790730c..df6a9681 100644
--- a/config/waybar/style/Obsidian Glow.css
+++ b/config/waybar/style/Obsidian Glow.css
@@ -90,8 +90,6 @@ tooltip label {
#cpu,
#disk,
#idle_inhibitor,
-#keyboard-state label,
-#keyboard-state label.locked,
#keyboard-state,
#memory,
#mode,
@@ -109,6 +107,7 @@ tooltip label {
#custom-backlight,
#custom-cycle_wall,
#custom-keybinds,
+#custom-keyboard,
#custom-light_dark,
#custom-lock,
#custom-menu,
diff --git a/config/waybar/style/Purpl.css b/config/waybar/style/Purpl.css
index 3a6c6904..7d89f329 100644
--- a/config/waybar/style/Purpl.css
+++ b/config/waybar/style/Purpl.css
@@ -125,8 +125,6 @@ tooltip {
#cpu,
#disk,
#idle_inhibitor,
-#keyboard-state label,
-#keyboard-state label.locked,
#keyboard-state,
#memory,
#mode,
@@ -144,6 +142,7 @@ tooltip {
#custom-backlight,
#custom-cycle_wall,
#custom-keybinds,
+#custom-keyboard,
#custom-light_dark,
#custom-lock,
#custom-menu,
diff --git a/config/waybar/style/Pywal Simple.css b/config/waybar/style/Pywal Simple.css
index 83d73cde..321f6e86 100644
--- a/config/waybar/style/Pywal Simple.css
+++ b/config/waybar/style/Pywal Simple.css
@@ -106,8 +106,6 @@ tooltip {
#cpu,
#disk,
#idle_inhibitor,
-#keyboard-state label,
-#keyboard-state label.locked,
#keyboard-state,
#memory,
#mode,
@@ -125,6 +123,7 @@ tooltip {
#custom-backlight,
#custom-cycle_wall,
#custom-keybinds,
+#custom-keyboard,
#custom-light_dark,
#custom-lock,
#custom-menu,
diff --git a/config/waybar/style/Pywal.css b/config/waybar/style/Pywal.css
index 411cf426..a0ce5025 100644
--- a/config/waybar/style/Pywal.css
+++ b/config/waybar/style/Pywal.css
@@ -8,7 +8,7 @@
font-weight: bold;
min-height: 0;
/* set font-size to 100% if font scaling is set to 1.00 using nwg-look */
- font-size: 96%;
+ font-size: 94%;
font-feature-settings: '"zero", "ss01", "ss02", "ss03", "ss04", "ss05", "cv31"';
padding: 1px;
}
@@ -122,8 +122,6 @@ tooltip {
#cpu,
#disk,
#idle_inhibitor,
-#keyboard-state label,
-#keyboard-state label.locked,
#keyboard-state,
#memory,
#mode,
@@ -141,6 +139,7 @@ tooltip {
#custom-backlight,
#custom-cycle_wall,
#custom-keybinds,
+#custom-keyboard,
#custom-light_dark,
#custom-lock,
#custom-menu,
diff --git a/config/waybar/style/Rainbow Spectrum.css b/config/waybar/style/Rainbow Spectrum.css
index 9f0c7040..aa140f0c 100644
--- a/config/waybar/style/Rainbow Spectrum.css
+++ b/config/waybar/style/Rainbow Spectrum.css
@@ -57,8 +57,6 @@ tooltip label{
#cpu,
#disk,
#idle_inhibitor,
-#keyboard-state label,
-#keyboard-state label.locked,
#keyboard-state,
#memory,
#mode,
@@ -76,6 +74,7 @@ tooltip label{
#custom-backlight,
#custom-cycle_wall,
#custom-keybinds,
+#custom-keyboard,
#custom-light_dark,
#custom-lock,
#custom-menu,
@@ -138,6 +137,7 @@ tooltip label{
background-color: #a6e3a1;
}
+#custom-keyboard,
#keyboard-state,
#keyboard-state label,
#keyboard-state label.locked,
diff --git a/config/waybar/style/Rose Pine.css b/config/waybar/style/Rose Pine.css
index 261f4b66..856edc0a 100644
--- a/config/waybar/style/Rose Pine.css
+++ b/config/waybar/style/Rose Pine.css
@@ -107,8 +107,6 @@ tooltip {
#cpu,
#disk,
#idle_inhibitor,
-#keyboard-state label,
-#keyboard-state label.locked,
#keyboard-state,
#memory,
#mode,
@@ -123,6 +121,7 @@ tooltip {
#custom-backlight,
#custom-cycle_wall,
#custom-keybinds,
+#custom-keyboard,
#custom-light_dark,
#custom-lock,
#custom-menu,
diff --git a/config/waybar/style/Simple Pink.css b/config/waybar/style/Simple Pink.css
index b21c4ac7..32831fe3 100644
--- a/config/waybar/style/Simple Pink.css
+++ b/config/waybar/style/Simple Pink.css
@@ -129,8 +129,6 @@ tooltip {
#cpu,
#disk,
#idle_inhibitor,
-#keyboard-state label,
-#keyboard-state label.locked,
#keyboard-state,
#memory,
#mode,
@@ -148,6 +146,7 @@ tooltip {
#custom-backlight,
#custom-cycle_wall,
#custom-keybinds,
+#custom-keyboard,
#custom-light_dark,
#custom-lock,
#custom-menu,
diff --git a/config/waybar/style/Translucent Chromatic.css b/config/waybar/style/Translucent Chromatic.css
index b6f3c414..3efc20d6 100644
--- a/config/waybar/style/Translucent Chromatic.css
+++ b/config/waybar/style/Translucent Chromatic.css
@@ -115,8 +115,6 @@ tooltip label{
#cpu,
#disk,
#idle_inhibitor,
-#keyboard-state label,
-#keyboard-state label.locked,
#keyboard-state,
#memory,
#mode,
@@ -134,6 +132,7 @@ tooltip label{
#custom-backlight,
#custom-cycle_wall,
#custom-keybinds,
+#custom-keyboard,
#custom-light_dark,
#custom-lock,
#custom-menu,
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage