fix: small waybar style fix + opencode function fix
This commit is contained in:
@@ -190,7 +190,7 @@ look-into-kitty() {
|
||||
|
||||
opencode-save() {
|
||||
uuid="$1"
|
||||
echo "opencode -s $uuid" >>.opencode-session
|
||||
echo "opencode -s $uuid" >.opencode-session
|
||||
echo 'Saved the command to continue opencode session to ".opencode-session"'
|
||||
}
|
||||
|
||||
|
||||
@@ -1,52 +0,0 @@
|
||||
#!/usr/bin/env python3
|
||||
import os
|
||||
import time
|
||||
|
||||
from psutil import process_iter, sensors_battery
|
||||
from setproctitle import setproctitle
|
||||
|
||||
|
||||
APP_NAME = "BSC" # Battery status checker
|
||||
|
||||
|
||||
class config:
|
||||
low = 15
|
||||
critical = 5
|
||||
sleep = 2
|
||||
debug = False
|
||||
|
||||
|
||||
def debug(level):
|
||||
if config.debug:
|
||||
print(level)
|
||||
print("Charging: ", sensors_battery().power_plugged)
|
||||
print("Battery: ", sensors_battery().percent)
|
||||
|
||||
|
||||
def main():
|
||||
while True:
|
||||
battery = sensors_battery()
|
||||
if (
|
||||
not battery.power_plugged and
|
||||
config.critical < int(battery.percent) and
|
||||
int(battery.percent) <= config.low
|
||||
):
|
||||
os.system('notify-send -u critical -r "6896" "Battery" "Low battery level"')
|
||||
elif (
|
||||
not battery.power_plugged and
|
||||
int(battery.percent) <= config.critical
|
||||
):
|
||||
os.system('notify-send -u critical -r "6896" "Battery" "Critical battery level"')
|
||||
time.sleep(config.sleep)
|
||||
|
||||
|
||||
for proc in process_iter(["pid", "name"]):
|
||||
if proc.name() == APP_NAME and proc.pid != os.getpid():
|
||||
print(proc)
|
||||
os.kill(proc.pid, 9)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
setproctitle(APP_NAME)
|
||||
list_of_procs = []
|
||||
main()
|
||||
@@ -1,9 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
check=$(hyprctl monitors | awk '/HDMI-A-1/{print $1}' | tr -d '\n')
|
||||
|
||||
if [ $check != '' ]; then
|
||||
hyprctl keyword monitor "eDP-1, disable"
|
||||
awww kill
|
||||
uwsm app -- awww-daemon
|
||||
fi
|
||||
@@ -51,6 +51,10 @@ tooltip label {
|
||||
|
||||
|
||||
/* Groups */
|
||||
.modules-left {
|
||||
margin-left: 4px;
|
||||
}
|
||||
|
||||
#hyprland-group {
|
||||
margin-left: 4px;
|
||||
}
|
||||
@@ -76,7 +80,6 @@ tooltip label {
|
||||
|
||||
#tray {
|
||||
margin-right: 4px;
|
||||
margin-left: 4px;
|
||||
padding-left: 8px;
|
||||
padding-right: 8px;
|
||||
}
|
||||
@@ -137,12 +140,12 @@ tooltip label {
|
||||
}
|
||||
|
||||
#battery {
|
||||
padding-right: 8px;
|
||||
padding-right: 0px;
|
||||
padding-left: 6px;
|
||||
}
|
||||
|
||||
#idle_inhibitor {
|
||||
padding-left: 4px;
|
||||
padding-left: 12px;
|
||||
padding-right: 12px;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user