Add custom linux-hardened deny_new_usb module
This commit is contained in:
parent
3e00aa03f8
commit
3ab7c6aad7
|
@ -4,7 +4,7 @@
|
||||||
"height": 36, // Waybar height (to be removed for auto height)
|
"height": 36, // Waybar height (to be removed for auto height)
|
||||||
// "width": 1280, // Waybar width
|
// "width": 1280, // Waybar width
|
||||||
// Choose the order of the modules
|
// Choose the order of the modules
|
||||||
"modules-left": ["idle_inhibitor", "sway/workspaces", "sway/mode"],
|
"modules-left": ["idle_inhibitor", "sway/workspaces", "custom/usb", "sway/mode"],
|
||||||
"modules-center": ["clock"],
|
"modules-center": ["clock"],
|
||||||
"modules-right": ["custom/ivpn", "network", "pulseaudio", "backlight", "cpu", "memory", "battery", "tray"],
|
"modules-right": ["custom/ivpn", "network", "pulseaudio", "backlight", "cpu", "memory", "battery", "tray"],
|
||||||
// Modules configuration
|
// Modules configuration
|
||||||
|
@ -113,5 +113,11 @@
|
||||||
"return-type": "json",
|
"return-type": "json",
|
||||||
"interval": 1,
|
"interval": 1,
|
||||||
"on-click": "$HOME/.config/waybar/ivpn-reconnect.sh"
|
"on-click": "$HOME/.config/waybar/ivpn-reconnect.sh"
|
||||||
|
},
|
||||||
|
"custom/usb": {
|
||||||
|
"format": "{} USB",
|
||||||
|
"exec": "$HOME/.config/waybar/usb-status.sh",
|
||||||
|
"return-type": "json",
|
||||||
|
"interval": 1,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,8 +30,7 @@
|
||||||
* {
|
* {
|
||||||
border: none;
|
border: none;
|
||||||
border-radius: 0;
|
border-radius: 0;
|
||||||
/* `otf-font-awesome` is required to be installed for icons */
|
/* `ttf-font-awesome` is required to be installed for icons */
|
||||||
/* Find Ubuntu Condensed font somewhere and install it in your system, it is NOT installed by default */
|
|
||||||
font-family: "Fira Sans Condensed SemiBold", "Font Awesome 6 Free Solid", "Font Awesome 6 Free Regular", "Font Awesome 6 Brands Regular", sans-serif;
|
font-family: "Fira Sans Condensed SemiBold", "Font Awesome 6 Free Solid", "Font Awesome 6 Free Regular", "Font Awesome 6 Brands Regular", sans-serif;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
min-height: 0;
|
min-height: 0;
|
||||||
|
@ -47,6 +46,10 @@ window#waybar.hidden {
|
||||||
opacity: 0.5;
|
opacity: 0.5;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#workspaces {
|
||||||
|
margin: 0 5px;
|
||||||
|
}
|
||||||
|
|
||||||
#workspaces button {
|
#workspaces button {
|
||||||
background: transparent;
|
background: transparent;
|
||||||
padding: 0px;
|
padding: 0px;
|
||||||
|
@ -86,7 +89,8 @@ window#waybar.hidden {
|
||||||
#mode,
|
#mode,
|
||||||
#idle_inhibitor,
|
#idle_inhibitor,
|
||||||
#mpd,
|
#mpd,
|
||||||
#custom-ivpn{
|
#custom-ivpn,
|
||||||
|
#custom-usb {
|
||||||
padding: 0 4px;
|
padding: 0 4px;
|
||||||
margin: 0 4px;
|
margin: 0 4px;
|
||||||
color: @white;
|
color: @white;
|
||||||
|
@ -205,3 +209,13 @@ label:focus {
|
||||||
color: @green;
|
color: @green;
|
||||||
box-shadow: inset 0 3px @green;
|
box-shadow: inset 0 3px @green;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#custom-usb {
|
||||||
|
color: @orange;
|
||||||
|
box-shadow: inset 0 3px @orange;
|
||||||
|
}
|
||||||
|
|
||||||
|
#custom-usb.unprotected {
|
||||||
|
color: @red;
|
||||||
|
box-shadow: inset 0 3px @red;
|
||||||
|
}
|
||||||
|
|
13
waybar/.config/waybar/usb-status.sh
Executable file
13
waybar/.config/waybar/usb-status.sh
Executable file
|
@ -0,0 +1,13 @@
|
||||||
|
#!/usr/bin/env dash
|
||||||
|
|
||||||
|
if usbctl check; then
|
||||||
|
TEXT="\uf023"
|
||||||
|
TOOLTIP="PROTECTED"
|
||||||
|
CLASS="protected"
|
||||||
|
else
|
||||||
|
TEXT="\uf3c1"
|
||||||
|
TOOLTIP="UNPROTECTED"
|
||||||
|
CLASS="unprotected"
|
||||||
|
fi
|
||||||
|
|
||||||
|
env echo "{\"text\": \"${TEXT}\", \"tooltip\": \"${TOOLTIP}\", \"class\": \"${CLASS}\"}"
|
Loading…
Reference in a new issue