feat: Add wifi to status bar
This commit is contained in:
Binary file not shown.
BIN
.config/backgrounds/Study-table.png
LFS
Normal file
BIN
.config/backgrounds/Study-table.png
LFS
Normal file
Binary file not shown.
@@ -15,7 +15,8 @@
|
||||
"bar.layouts": {
|
||||
"0": {
|
||||
"left": [
|
||||
"media"
|
||||
"media",
|
||||
"custom/wifi"
|
||||
],
|
||||
"middle": [
|
||||
"workspaces"
|
||||
@@ -31,7 +32,8 @@
|
||||
},
|
||||
"1": {
|
||||
"left": [
|
||||
"media"
|
||||
"media",
|
||||
"custom/wifi"
|
||||
],
|
||||
"middle": [
|
||||
"workspaces"
|
||||
|
||||
@@ -1,2 +1,20 @@
|
||||
{
|
||||
"custom/wifi": {
|
||||
"icon": "",
|
||||
"label": "{status}",
|
||||
"tooltip": "{status}",
|
||||
"truncationSize": -1,
|
||||
"execute": "/home/nathan/dotfiles/.config/hyprpanel/wifi.sh",
|
||||
"executeOnAction": "",
|
||||
"interval": 1000,
|
||||
"hideOnEmpty": true,
|
||||
"scrollThreshold": 1,
|
||||
"actions": {
|
||||
"onLeftClick": "",
|
||||
"onRightClick": "",
|
||||
"onMiddleClick": "",
|
||||
"onScrollUp": "",
|
||||
"onScrollDown": ""
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
/* ##################################
|
||||
* # Custom Wi-Fi Module Styling #
|
||||
* ################################## */
|
||||
@include styleModule(
|
||||
// class name
|
||||
'cmodule-wifi',
|
||||
// styling properties
|
||||
(
|
||||
'text-color': #FFFFFF,
|
||||
'icon-color': #FFFFFF,
|
||||
'icon-background': #090909,
|
||||
'label-background': #090909,
|
||||
'inner-spacing': 0.5em,
|
||||
'border-enabled': false,
|
||||
'border-color': #FFFFFF,
|
||||
'icon-size': 1.2em
|
||||
)
|
||||
);
|
||||
10
.config/hyprpanel/wifi.sh
Executable file
10
.config/hyprpanel/wifi.sh
Executable file
@@ -0,0 +1,10 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Get the current Wi-Fi network name
|
||||
wifi_name=$(iwgetid -r)
|
||||
# Output the Wi-Fi network name, or "Disconnected" if not connected
|
||||
if [ -z "$wifi_name" ]; then
|
||||
echo '{"status":"Disconnected"}'
|
||||
else
|
||||
echo "{\"status\":\"$wifi_name\"}"
|
||||
fi
|
||||
Reference in New Issue
Block a user