Temp, no gather in firefox
This commit is contained in:
parent
52683079ef
commit
7bed37eb36
@ -239,7 +239,7 @@ bind = $mainMod CTRL, R, exec, $hyprscript reload
|
|||||||
bind = $mainMod SHIFT, Q, exec, hyprctl dispatch exit
|
bind = $mainMod SHIFT, Q, exec, hyprctl dispatch exit
|
||||||
|
|
||||||
bind = $mainMod, Z, exec, $social
|
bind = $mainMod, Z, exec, $social
|
||||||
bind = $mainMod, E, exec, firefox "-P" "Yuzzit" "https://mail.google.com/mail/u/0/" "https://app.slack.com/client/T03UFFGJK/D07KS0S1LDT" "https://app.gather.town/app/bZRkf3gh7MIximOa/ytopenspace" "https://yip.atlassian.net/wiki/spaces/Y/overview" "https://yip.atlassian.net/"
|
bind = $mainMod, E, exec, firefox "-P" "Yuzzit" "https://app.slack.com/client/T03UFFGJK/D07KS0S1LDT" "https://yip.atlassian.net/wiki/spaces/Y/overview" "https://yip.atlassian.net/"
|
||||||
|
|
||||||
bind = $mainMod, C, exec, alacritty -e numbat
|
bind = $mainMod, C, exec, alacritty -e numbat
|
||||||
bind = $mainMod, P, exec, pavucontrol
|
bind = $mainMod, P, exec, pavucontrol
|
||||||
|
|||||||
11
hyprscript
11
hyprscript
@ -200,18 +200,28 @@ def monitor_stats():
|
|||||||
|
|
||||||
cpu_values = [0] * 10
|
cpu_values = [0] * 10
|
||||||
mem_values = [0] * 10
|
mem_values = [0] * 10
|
||||||
|
temp_values = [0] * 10
|
||||||
|
|
||||||
|
min_temp = 45
|
||||||
|
max_temp = 90
|
||||||
|
|
||||||
while True:
|
while True:
|
||||||
cpu_percent = psutil.cpu_percent(interval=2)
|
cpu_percent = psutil.cpu_percent(interval=2)
|
||||||
mem_percent = psutil.virtual_memory().percent
|
mem_percent = psutil.virtual_memory().percent
|
||||||
battery = psutil.sensors_battery()
|
battery = psutil.sensors_battery()
|
||||||
|
temps = psutil.sensors_temperatures(fahrenheit=False).get('k10temp')
|
||||||
|
temp = max([x.current for x in temps if x.label != 'Tctl'])
|
||||||
|
|
||||||
|
temp_percent = 100 * min(max([temp - min_temp, 0]) / (max_temp - min_temp), 1)
|
||||||
|
|
||||||
for i in range(len(cpu_values) - 1):
|
for i in range(len(cpu_values) - 1):
|
||||||
cpu_values[i] = cpu_values[i+1]
|
cpu_values[i] = cpu_values[i+1]
|
||||||
mem_values[i] = mem_values[i+1]
|
mem_values[i] = mem_values[i+1]
|
||||||
|
temp_values[i] = temp_values[i+1]
|
||||||
|
|
||||||
cpu_values[-1] = cpu_percent
|
cpu_values[-1] = cpu_percent
|
||||||
mem_values[-1] = mem_percent
|
mem_values[-1] = mem_percent
|
||||||
|
temp_values[-1] = temp_percent
|
||||||
|
|
||||||
if battery is None:
|
if battery is None:
|
||||||
battery_json = '{"text": "", "class": "hidden"}'
|
battery_json = '{"text": "", "class": "hidden"}'
|
||||||
@ -235,6 +245,7 @@ def monitor_stats():
|
|||||||
f.write(
|
f.write(
|
||||||
' ' + ''.join([to_bar(x) for x in cpu_values]) + ' ' + "% 5.1f" % cpu_percent + '%\n' +
|
' ' + ''.join([to_bar(x) for x in cpu_values]) + ' ' + "% 5.1f" % cpu_percent + '%\n' +
|
||||||
' ' + ''.join([to_bar(x) for x in mem_values]) + ' ' + "% 5.1f" % mem_percent + '%\n' +
|
' ' + ''.join([to_bar(x) for x in mem_values]) + ' ' + "% 5.1f" % mem_percent + '%\n' +
|
||||||
|
' ' + ''.join([to_bar(x) for x in temp_values]) + ' ' + "% 5.1f" % temp + '°\n' +
|
||||||
battery_json
|
battery_json
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@ -17,6 +17,7 @@
|
|||||||
],
|
],
|
||||||
"modules-right": [
|
"modules-right": [
|
||||||
"hyprland/workspaces",
|
"hyprland/workspaces",
|
||||||
|
"custom/temp",
|
||||||
"custom/cpu",
|
"custom/cpu",
|
||||||
"custom/mem",
|
"custom/mem",
|
||||||
"custom/battery",
|
"custom/battery",
|
||||||
@ -158,8 +159,12 @@
|
|||||||
"exec": "sed '2q;d' ~/.config/hypr/.stat.txt",
|
"exec": "sed '2q;d' ~/.config/hypr/.stat.txt",
|
||||||
"restart-interval": 2
|
"restart-interval": 2
|
||||||
},
|
},
|
||||||
"custom/battery": {
|
"custom/temp": {
|
||||||
"exec": "sed '3q;d' ~/.config/hypr/.stat.txt",
|
"exec": "sed '3q;d' ~/.config/hypr/.stat.txt",
|
||||||
|
"restart-interval": 2
|
||||||
|
},
|
||||||
|
"custom/battery": {
|
||||||
|
"exec": "sed '4q;d' ~/.config/hypr/.stat.txt",
|
||||||
"return-type": "json",
|
"return-type": "json",
|
||||||
"restart-interval": 2
|
"restart-interval": 2
|
||||||
}
|
}
|
||||||
|
|||||||
@ -99,8 +99,12 @@ button:hover {
|
|||||||
padding: 0 10px;
|
padding: 0 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#custom-temp {
|
||||||
|
color: @red;
|
||||||
|
}
|
||||||
|
|
||||||
#custom-cpu {
|
#custom-cpu {
|
||||||
color: @red;
|
color: @green;
|
||||||
}
|
}
|
||||||
|
|
||||||
#custom-mem {
|
#custom-mem {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user