Remove USB locking
This commit is contained in:
parent
361ad1c8b7
commit
c4cb2829ac
|
@ -1,13 +0,0 @@
|
|||
#!/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}\"}"
|
|
@ -1,8 +0,0 @@
|
|||
#!/usr/bin/env dash
|
||||
|
||||
if usbctl check; then
|
||||
MODE="$([ "$1" = "--permanent" ] && printf "unprotect" || printf "temporary")"
|
||||
pkexec --disable-internal-agent usbctl "$MODE"
|
||||
else
|
||||
pkexec --disable-internal-agent usbctl protect
|
||||
fi
|
|
@ -23,9 +23,6 @@ bindsym $mod+Shift+c reload
|
|||
# Lock the screen
|
||||
bindsym $mod+l exec swaylock
|
||||
|
||||
# Unlock USB protection
|
||||
bindsym $mod+u exec usb-unlock.sh
|
||||
|
||||
# Session and power management
|
||||
bindsym $mod+Shift+e exec swaynag -t logout -m 'Log out?' -b 'Yes' 'swaymsg exit'
|
||||
bindsym $mod+Shift+r exec swaynag -t reboot -m 'Reboot?' -b 'Yes' 'doas reboot'
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
"layer": "top",
|
||||
"position": "top",
|
||||
"height": 36,
|
||||
"modules-left": ["idle_inhibitor", "sway/workspaces", "custom/usb", "sway/mode"],
|
||||
"modules-left": ["idle_inhibitor", "sway/workspaces", "sway/mode"],
|
||||
"modules-center": ["clock"],
|
||||
"modules-right": ["network", "pulseaudio", "backlight", "cpu", "memory", "battery", "tray"],
|
||||
"sway/workspaces": {
|
||||
|
@ -80,13 +80,5 @@
|
|||
"backlight": {
|
||||
"format": "{icon} {percent}%",
|
||||
"format-icons": ["", "", "", "", "", "", "", "", ""]
|
||||
},
|
||||
"custom/usb": {
|
||||
"format": "{} USB",
|
||||
"exec": "usb-status.sh",
|
||||
"return-type": "json",
|
||||
"interval": 1,
|
||||
"on-click": "usb-unlock.sh",
|
||||
"on-click-right": "usb-unlock.sh --permanent"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -88,8 +88,7 @@ window#waybar.hidden {
|
|||
#tray,
|
||||
#mode,
|
||||
#idle_inhibitor,
|
||||
#mpd,
|
||||
#custom-usb {
|
||||
#mpd {
|
||||
padding: 0 4px;
|
||||
margin: 0 4px;
|
||||
color: @white;
|
||||
|
@ -198,13 +197,3 @@ label:focus {
|
|||
color: @violet;
|
||||
box-shadow: inset 0 3px @violet;
|
||||
}
|
||||
|
||||
#custom-usb {
|
||||
color: @orange;
|
||||
box-shadow: inset 0 3px @orange;
|
||||
}
|
||||
|
||||
#custom-usb.unprotected {
|
||||
color: @red;
|
||||
box-shadow: inset 0 3px @red;
|
||||
}
|
||||
|
|
|
@ -67,7 +67,6 @@ if [[ $(lsb_release -si) == "Artix" ]]; then
|
|||
alias pacss="pacman -Ss"
|
||||
alias poweroff="doas poweroff"
|
||||
alias reboot="doas reboot"
|
||||
alias usb="doas usbctl tmp"
|
||||
elif [[ $(lsb_release -si) == "Fedora" ]]; then
|
||||
alias code="codium"
|
||||
alias dnfin="sudo dnf install"
|
||||
|
|
Loading…
Reference in a new issue