Initial commit
61
dot_config/hypr/scripts/BSC.py
Normal file
@ -0,0 +1,61 @@
|
||||
#!/usr/bin/env python3
|
||||
from psutil import sensors_battery, process_iter
|
||||
import os
|
||||
import time
|
||||
from setproctitle import setproctitle
|
||||
|
||||
|
||||
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:
|
||||
if (
|
||||
config.low < int(sensors_battery().percent)
|
||||
or sensors_battery().power_plugged
|
||||
):
|
||||
os.system('notify-send -u normal -r "6896" "Battery" "Charging"')
|
||||
print("Charging")
|
||||
while sensors_battery().power_plugged:
|
||||
time.sleep(config.sleep)
|
||||
debug("charging loop")
|
||||
os.system('notify-send -u normal -r "6896" "Battery" "Discharging"')
|
||||
elif config.critical < int(sensors_battery().percent) <= config.low:
|
||||
os.system('notify-send -u critical -r "6896" "Battery" "Low battery alarm"')
|
||||
print("Low battery")
|
||||
while (not sensors_battery().power_plugged) and (
|
||||
int(sensors_battery().percent) > config.critical
|
||||
):
|
||||
debug("low loop")
|
||||
time.sleep(config.sleep)
|
||||
elif int(sensors_battery().percent) <= config.critical:
|
||||
os.system('notify-send -u critical -r "6896" "Battery" "Going to sleep"')
|
||||
print("Critical low")
|
||||
os.system("systemctl suspend")
|
||||
time.sleep(30)
|
||||
time.sleep(config.sleep)
|
||||
|
||||
|
||||
app_name = "BSC"
|
||||
|
||||
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()
|
||||
5
dot_config/hypr/scripts/before-sleep.sh
Normal file
@ -0,0 +1,5 @@
|
||||
#!/bin/bash
|
||||
|
||||
hyprctl keyword monitor "eDP-1, 1920x1080@120, 0x0, 1, vrr, 1"
|
||||
brightnessctl --device="asus::kbd_backlight" set 0
|
||||
uwsm app -- hyprlock
|
||||
36
dot_config/hypr/scripts/dunst/BSC.py
Normal file
@ -0,0 +1,36 @@
|
||||
#!/usr/bin/env python3
|
||||
from psutil import sensors_battery, process_iter
|
||||
import os
|
||||
import time
|
||||
from setproctitle import setproctitle
|
||||
|
||||
|
||||
def main():
|
||||
while True:
|
||||
if sensors_battery().power_plugged:
|
||||
os.system('notify-send -u normal -r "6896" "Battery" "Charging"')
|
||||
while sensors_battery().power_plugged:
|
||||
time.sleep(2)
|
||||
os.system('notify-send -u normal -r "6896" "Battery" "Discharging"')
|
||||
elif sensors_battery().percent <= 15:
|
||||
os.system('notify-send -u critical -r "6896" "Battery" "Low battery alarm"')
|
||||
while not sensors_battery().power_plugged or sensors_battery().percent > 5:
|
||||
time.sleep(2)
|
||||
if sensors_battery().percent <= 5:
|
||||
os.system("systemctl suspend")
|
||||
time.sleep(60)
|
||||
time.sleep(2)
|
||||
|
||||
|
||||
app_name = "BSC"
|
||||
|
||||
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()
|
||||
5
dot_config/hypr/scripts/dunst/ROGprofiler.sh
Normal file
@ -0,0 +1,5 @@
|
||||
#!/bin/bash
|
||||
|
||||
asusctl profile -n
|
||||
|
||||
notify-send -i $HOME/.config/hypr/scripts/dunst/icons/performance.svg -u low -r "3378455" "$(asusctl profile -p | sed 's/^.*is //')"
|
||||
10
dot_config/hypr/scripts/dunst/brightness.sh
Normal file
@ -0,0 +1,10 @@
|
||||
#!/bin/bash
|
||||
|
||||
msgId="3378455"
|
||||
|
||||
brightnessctl "$@" >/dev/null
|
||||
|
||||
brightpercent=$(ddcutil -d 1 getvcp 10 | sed 's/^.*current value = //' | sed 's/, max.*//')
|
||||
|
||||
notify-send -i $HOME/.config/hypr/scripts/dunst/icons/brightness.svg -a "changeBrightness" -u low -r "$msgId" \
|
||||
-h int:value:"$brightpercent" "Яркость экрана: $brightpercent%"
|
||||
8
dot_config/hypr/scripts/dunst/eDP-1brightness.sh
Normal file
@ -0,0 +1,8 @@
|
||||
#!/bin/bash
|
||||
|
||||
msgId="3378455"
|
||||
|
||||
brightpercent=$(brightnessctl -m --class='backlight' | awk -F, '{print substr($4, 0, length($4)-1)}')
|
||||
|
||||
notify-send -i $HOME/.config/hypr/scripts/dunst/icons/brightness.svg -a "changeBrightness" -u low -r "$msgId" \
|
||||
-h int:value:"$brightpercent" "Яркость экрана: $brightpercent%"
|
||||
4
dot_config/hypr/scripts/dunst/icons/brightness down.svg
Normal file
@ -0,0 +1,4 @@
|
||||
<svg width="96" height="96" viewBox="0 0 96 96" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<circle cx="48" cy="48" r="46" stroke="#DADAFF" stroke-width="4"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M77.4659 56.4963C72.3197 61.1593 65.4916 64 58 64C41.9837 64 29 51.0163 29 35C29 30.4645 30.0412 26.1723 31.8975 22.3491C24.1027 27.7673 19 36.7877 19 47C19 63.5685 32.4315 77 49 77C62.2497 77 73.4931 68.4106 77.4659 56.4963Z" fill="#DADAFF"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 463 B |
5
dot_config/hypr/scripts/dunst/icons/brightness.svg
Normal file
@ -0,0 +1,5 @@
|
||||
<svg width="96" height="96" viewBox="0 0 96 96" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<circle cx="48" cy="48" r="46" stroke="#DADAFF" stroke-width="4"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M52.7369 24.4674L48 16L43.2631 24.4674C44.7944 24.1608 46.3784 24 48 24C49.6216 24 51.2056 24.1608 52.7369 24.4674ZM55.6661 25.2504C58.7219 26.2798 61.5025 27.9075 63.8685 29.9943L64 20.2872L55.6661 25.2504ZM66.0057 32.1315C68.0925 34.4975 69.7202 37.2781 70.7496 40.3339L75.7128 32L66.0057 32.1315ZM71.5326 43.2631C71.8392 44.7944 72 46.3784 72 48C72 49.6216 71.8392 51.2056 71.5326 52.7369L80 48L71.5326 43.2631ZM70.7496 55.6661C69.7202 58.7219 68.0925 61.5025 66.0057 63.8685L75.7128 64L70.7496 55.6661ZM63.8685 66.0057C61.5025 68.0925 58.7219 69.7202 55.6661 70.7496L64 75.7128L63.8685 66.0057ZM52.7369 71.5326C51.2056 71.8392 49.6216 72 48 72C46.3784 72 44.7944 71.8392 43.2631 71.5326L48 80L52.7369 71.5326ZM40.3339 70.7496C37.2781 69.7202 34.4975 68.0925 32.1315 66.0057L32 75.7128L40.3339 70.7496ZM29.9943 63.8685C27.9075 61.5025 26.2798 58.7219 25.2504 55.6661L20.2872 64L29.9943 63.8685ZM24.4674 52.7369C24.1608 51.2056 24 49.6216 24 48C24 46.3784 24.1608 44.7944 24.4674 43.2631L16 48L24.4674 52.7369ZM25.2504 40.3339C26.2798 37.2781 27.9075 34.4975 29.9943 32.1315L20.2872 32L25.2504 40.3339ZM32.1315 29.9943C34.4975 27.9075 37.2781 26.2798 40.3339 25.2504L32 20.2872L32.1315 29.9943Z" fill="#DADAFF"/>
|
||||
<circle cx="48" cy="48" r="20" fill="#DADAFF"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.4 KiB |
5
dot_config/hypr/scripts/dunst/icons/mic off.svg
Normal file
@ -0,0 +1,5 @@
|
||||
<svg width="96" height="96" viewBox="0 0 96 96" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<circle cx="48" cy="48" r="46" stroke="#DADAFF" stroke-width="4"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M41 42.7846V50C41 53.866 44.134 57 48 57C48.3926 57 48.7777 56.9677 49.1527 56.9055L41 42.7846ZM50.2049 58.7279C49.4993 58.9056 48.7607 59 48 59C43.0294 59 39 54.9706 39 50V41H35V50C35 56.1472 39.2666 61.2978 45 62.6521V69H41C39.8954 69 39 69.8954 39 71V72C39 73.1046 39.8954 74 41 74H55C56.1046 74 57 73.1046 57 72V71C57 70.729 56.9461 70.4706 56.8484 70.2349L56.5884 69.7845C56.2229 69.3076 55.6474 69 55 69H51V62.6521C51.4283 62.551 51.8485 62.4286 52.2593 62.2862L50.2049 58.7279ZM58.6821 57.411L56.3483 53.3687C56.7686 52.3282 57 51.1911 57 50V41H61V50C61 52.7543 60.1434 55.3086 58.6821 57.411ZM54.9391 50.9278L41.4412 27.5488C42.4346 24.8917 44.9964 23 48 23C51.866 23 55 26.134 55 30V50C55 50.3145 54.9793 50.6242 54.9391 50.9278Z" fill="#DADAFF"/>
|
||||
<rect x="31.7321" y="22.7321" width="4" height="60" rx="2" transform="rotate(-30 31.7321 22.7321)" fill="#DADAFF"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.1 KiB |
6
dot_config/hypr/scripts/dunst/icons/mic on.svg
Normal file
@ -0,0 +1,6 @@
|
||||
<svg width="96" height="96" viewBox="0 0 96 96" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<circle cx="48" cy="48" r="46" stroke="#DADAFF" stroke-width="4"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M35 41V50C35 57.1797 40.8203 63 48 63C55.1797 63 61 57.1797 61 50V41H57V50C57 54.9706 52.9706 59 48 59C43.0294 59 39 54.9706 39 50V41H35Z" fill="#DADAFF"/>
|
||||
<rect x="41" y="23" width="14" height="34" rx="7" fill="#DADAFF"/>
|
||||
<path d="M45 62C45 60.3431 46.3431 59 48 59C49.6569 59 51 60.3431 51 62V69H55C56.1046 69 57 69.8954 57 71V72C57 73.1046 56.1046 74 55 74H41C39.8954 74 39 73.1046 39 72V71C39 69.8954 39.8954 69 41 69H45V62Z" fill="#DADAFF"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 666 B |
5
dot_config/hypr/scripts/dunst/icons/pause.svg
Normal file
@ -0,0 +1,5 @@
|
||||
<svg width="96" height="96" viewBox="0 0 96 96" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<circle cx="48" cy="48" r="46" stroke="#DADAFF" stroke-width="4"/>
|
||||
<rect x="27" y="26" width="14" height="44" rx="5" fill="#DADAFF"/>
|
||||
<rect x="55" y="26" width="14" height="44" rx="5" fill="#DADAFF"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 304 B |
7
dot_config/hypr/scripts/dunst/icons/performance.svg
Normal file
@ -0,0 +1,7 @@
|
||||
<svg width="96" height="96" viewBox="0 0 96 96" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<circle cx="48" cy="48" r="46" stroke="#DADAFF" stroke-width="4"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M45.6067 29.1493C37.8559 30.1233 31.5581 35.7664 29.6184 43.1731C33.2686 38.3283 38.7898 34.9726 45.1082 34.18L45.6067 29.1493Z" fill="#DADAFF"/>
|
||||
<path d="M47.4074 28.241C47.4675 27.5068 48.5422 27.506 48.6033 28.2401L49.9458 44.3502C49.975 44.7 49.6989 45 49.3479 45H46.687C46.3363 45 46.0604 44.7006 46.089 44.3511L47.4074 28.241Z" fill="#DADAFF"/>
|
||||
<circle cx="48" cy="48" r="4" fill="#DADAFF"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M71.4823 52.0165C70.4916 51.7527 69.849 50.7882 69.9301 49.7662C69.9764 49.1835 70 48.5945 70 48C70 35.8497 60.1503 26 48 26C35.8497 26 26 35.8497 26 48C26 50.5505 26.434 52.9996 27.2322 55.2776C27.5714 56.2457 27.1989 57.3416 26.308 57.85V57.85C25.293 58.4291 23.9814 58.0417 23.5794 56.9444C22.5577 54.1556 22 51.1429 22 48C22 33.6406 33.6406 22 48 22C62.3594 22 74 33.6406 74 48C74 48.8239 73.9617 49.6388 73.8867 50.4431C73.7783 51.6068 72.6116 52.3173 71.4823 52.0165V52.0165Z" fill="#DADAFF"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.1 KiB |
4
dot_config/hypr/scripts/dunst/icons/play.svg
Normal file
@ -0,0 +1,4 @@
|
||||
<svg width="96" height="96" viewBox="0 0 96 96" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<circle cx="48" cy="48" r="46" stroke="#DADAFF" stroke-width="4"/>
|
||||
<path d="M68.177 43.6339C71.5947 45.5414 71.5947 50.4586 68.177 52.3661L38.4367 68.9643C35.1039 70.8243 31 68.4149 31 64.5982V31.4018C31 27.5851 35.1039 25.1757 38.4367 27.0357L68.177 43.6339Z" fill="#DADAFF"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 381 B |
5
dot_config/hypr/scripts/dunst/icons/volume down.svg
Normal file
@ -0,0 +1,5 @@
|
||||
<svg width="96" height="96" viewBox="0 0 96 96" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<circle cx="48" cy="48" r="46" stroke="#DADAFF" stroke-width="4"/>
|
||||
<path d="M22 48L22 42C22 39.2386 24.2386 37 27 37H32.0292C33.2956 37 34.5149 36.5194 35.4408 35.6553L45.6354 26.1403C46.9138 24.9471 49 25.8537 49 27.6024V68.3976C49 70.1463 46.9138 71.0529 45.6354 69.8597L35.4408 60.3447C34.5149 59.4806 33.2956 59 32.0292 59H27C24.2386 59 22 56.7614 22 54V48Z" fill="#DADAFF"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M52.0442 43.1462C51.2482 43.9121 51.2741 45.178 51.6698 46.2094C51.8831 46.7653 52 47.369 52 48C52 48.631 51.8831 49.2347 51.6698 49.7906C51.2741 50.822 51.2482 52.0879 52.0442 52.8538V52.8538C52.8401 53.6196 54.1295 53.6031 54.7021 52.6586C55.5258 51.2996 56 49.7052 56 48C56 46.2948 55.5258 44.7004 54.7021 43.3414C54.1295 42.3969 52.8401 42.3804 52.0442 43.1462V43.1462Z" fill="#DADAFF"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 924 B |
6
dot_config/hypr/scripts/dunst/icons/volume mute.svg
Normal file
@ -0,0 +1,6 @@
|
||||
<svg width="96" height="96" viewBox="0 0 96 96" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<circle cx="48" cy="48" r="46" stroke="#DADAFF" stroke-width="4"/>
|
||||
<path d="M22 48L22 42C22 39.2386 24.2386 37 27 37H32.0292C33.2956 37 34.5149 36.5194 35.4408 35.6553L45.6354 26.1403C46.9138 24.9471 49 25.8537 49 27.6024V68.3976C49 70.1463 46.9138 71.0529 45.6354 69.8597L35.4408 60.3447C34.5149 59.4806 33.2956 59 32.0292 59H27C24.2386 59 22 56.7614 22 54V48Z" fill="#DADAFF"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M60.5359 50L54.2679 60.8564C53.7156 61.813 54.0434 63.0362 55 63.5885C55.9566 64.1407 57.1797 63.813 57.732 62.8564L62.8453 54L60.5359 50ZM67.4641 46L73.732 35.1436C74.2843 34.187 73.9566 32.9638 73 32.4115C72.0434 31.8593 70.8202 32.187 70.2679 33.1436L65.1547 42L67.4641 46Z" fill="#DADAFF"/>
|
||||
<rect x="53.2679" y="33.4115" width="4" height="36" rx="2" transform="rotate(-30 53.2679 33.4115)" fill="#DADAFF"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 943 B |
7
dot_config/hypr/scripts/dunst/icons/volume.svg
Normal file
@ -0,0 +1,7 @@
|
||||
<svg width="96" height="96" viewBox="0 0 96 96" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<circle cx="48" cy="48" r="46" stroke="#DADAFF" stroke-width="4"/>
|
||||
<path d="M22 48L22 42C22 39.2386 24.2386 37 27 37H32.0292C33.2956 37 34.5149 36.5194 35.4408 35.6553L45.6354 26.1403C46.9138 24.9471 49 25.8537 49 27.6024V68.3976C49 70.1463 46.9138 71.0529 45.6354 69.8597L35.4408 60.3447C34.5149 59.4806 33.2956 59 32.0292 59H27C24.2386 59 22 56.7614 22 54V48Z" fill="#DADAFF"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M52.0442 43.1462C51.2482 43.9121 51.2741 45.178 51.6698 46.2094C51.8831 46.7653 52 47.369 52 48C52 48.631 51.8831 49.2347 51.6698 49.7906C51.2741 50.822 51.2482 52.0879 52.0442 52.8538V52.8538C52.8401 53.6196 54.1295 53.6031 54.7021 52.6586C55.5258 51.2996 56 49.7052 56 48C56 46.2948 55.5258 44.7004 54.7021 43.3414C54.1295 42.3969 52.8401 42.3804 52.0442 43.1462V43.1462Z" fill="#DADAFF"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M57.8089 37.5992C57.0129 38.3651 57.0035 39.6242 57.6392 40.5276C59.1267 42.6415 60.0001 45.2188 60.0001 48C60.0001 50.7812 59.1267 53.3585 57.6392 55.4724C57.0035 56.3758 57.0129 57.6349 57.8089 58.4008V58.4008C58.6047 59.1666 59.8816 59.1486 60.5493 58.2688C62.7149 55.4159 64.0001 51.858 64.0001 48C64.0001 44.142 62.7149 40.5841 60.5493 37.7312C59.8816 36.8514 58.6047 36.8334 57.8089 37.5992V37.5992Z" fill="#DADAFF"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M63.5735 32.0522C62.7775 32.8181 62.7617 34.079 63.449 34.9438C66.298 38.5283 68 43.0654 68 48C68 52.9346 66.298 57.4717 63.449 61.0562C62.7617 61.921 62.7775 63.1819 63.5735 63.9478V63.9478C64.3693 64.7136 65.6422 64.6941 66.3425 63.84C69.8781 59.5276 72 54.0116 72 48C72 41.9884 69.8781 36.4724 66.3425 32.16C65.6422 31.3059 64.3693 31.2864 63.5735 32.0522V32.0522Z" fill="#DADAFF"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.8 KiB |
11
dot_config/hypr/scripts/dunst/micro.sh
Normal file
@ -0,0 +1,11 @@
|
||||
#!/bin/bash
|
||||
|
||||
msgId="3378455"
|
||||
|
||||
station=$(wpctl get-volume @DEFAULT_AUDIO_SOURCE@ | sed 's/Volume://' | tr -d [:digit:] | tr -d ' .[]')
|
||||
|
||||
if [ $station = 'MUTED' ]; then
|
||||
notify-send -i "$HOME/.config/hypr/scripts/dunst/icons/mic off.svg" -u low -r "$msgId" "Микрофон выключен"
|
||||
else
|
||||
notify-send -i "$HOME/.config/hypr/scripts/dunst/icons/mic on.svg" -u low -r "$msgId" "Микрофон включен"
|
||||
fi
|
||||
11
dot_config/hypr/scripts/dunst/trackinfo.sh
Normal file
@ -0,0 +1,11 @@
|
||||
#!/bin/bash
|
||||
|
||||
sleep 0.7
|
||||
|
||||
msgId="3378455"
|
||||
|
||||
artist=$(playerctl metadata artist)
|
||||
title=$(playerctl metadata title)
|
||||
image=$(playerctl metadata mpris:artUrl)
|
||||
|
||||
notify-send -u low -r "$msgId" "$artist" "$title" -i "$image"
|
||||
11
dot_config/hypr/scripts/dunst/volume.sh
Normal file
@ -0,0 +1,11 @@
|
||||
#!/bin/bash
|
||||
|
||||
msgId="3378455"
|
||||
|
||||
wpctl set-mute @DEFAULT_AUDIO_SINK@ 0
|
||||
|
||||
volume=$(wpctl get-volume @DEFAULT_AUDIO_SINK@ | sed 's/Volume://' |
|
||||
sed 's/ 0.//' | tr -d ' .')
|
||||
|
||||
notify-send -i $HOME/.config/hypr/scripts/dunst/icons/volume.svg -a "changevolume" -u low -r "$msgId" \
|
||||
-h int:value:"$volume" "Громкость: $volume%"
|
||||
11
dot_config/hypr/scripts/dunst/volumemute.sh
Normal file
@ -0,0 +1,11 @@
|
||||
#!/bin/bash
|
||||
|
||||
msgId="3378455"
|
||||
|
||||
station=$(wpctl get-volume @DEFAULT_AUDIO_SINK@ | sed 's/Volume://' | tr -d [:digit:] | tr -d ' .[]')
|
||||
|
||||
if [ $station = 'MUTED' ]; then
|
||||
notify-send -i "$HOME/.config/hypr/scripts/dunst/icons/volume mute.svg" -u low -r "$msgId" "Звук выключен"
|
||||
else
|
||||
notify-send -i "$HOME/.config/hypr/scripts/dunst/icons/volume.svg" -u low -r "$msgId" "Звук включен"
|
||||
fi
|
||||
9
dot_config/hypr/scripts/eDPower.sh
Normal file
@ -0,0 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
check=$(hyprctl monitors | awk '/HDMI-A-1/{print $1}' | tr -d '\n')
|
||||
|
||||
if [ $check != '' ]; then
|
||||
hyprctl keyword monitor "eDP-1, disable"
|
||||
swww kill
|
||||
uwsm app -- swww-daemon
|
||||
fi
|
||||
8
dot_config/hypr/scripts/lockwallpaper.py
Normal file
@ -0,0 +1,8 @@
|
||||
import os
|
||||
from random import randrange
|
||||
|
||||
swww_output = str(os.popen('swww query').read())
|
||||
swww_output = swww_output.split(" ")
|
||||
path = swww_output[len(swww_output) - 1].replace('\n', '')
|
||||
|
||||
print(path)
|
||||
19
dot_config/hypr/scripts/player-status.sh
Normal file
@ -0,0 +1,19 @@
|
||||
#!/bin/bash
|
||||
|
||||
artist_offset=25
|
||||
title_offset=40
|
||||
|
||||
artist=$(playerctl metadata artist)
|
||||
title=$(playerctl metadata title)
|
||||
|
||||
if [ ${#title} != 0 ]; then
|
||||
if [ ${#artist} -gt $artist_offset ]; then
|
||||
artist=$(echo $artist | cut -c1-$artist_offset)
|
||||
artist=$(echo $artist'...')
|
||||
fi
|
||||
if [ ${#title} -gt $title_offset ]; then
|
||||
title=$(echo $title | cut -c1-$title_offset)
|
||||
title=$(echo $title'...')
|
||||
fi
|
||||
echo $artist - $title
|
||||
fi
|
||||
6
dot_config/hypr/scripts/sleep.sh
Normal file
@ -0,0 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
hyprctl keyword monitor "HDMI-A-1, disable"
|
||||
hyprctl keyword monitor "DP-1, disable"
|
||||
hyprctl keyword monitor "eDP-1, 1920x1080@120, 0x0, 1, vrr, 1"
|
||||
|
||||
30
dot_config/hypr/scripts/swww.py
Normal file
@ -0,0 +1,30 @@
|
||||
import os
|
||||
from random import randrange
|
||||
|
||||
swww_output = str(os.popen("swww query").read())
|
||||
swww_output = swww_output.split(" ")
|
||||
path = swww_output[len(swww_output) - 1].replace("\n", "")
|
||||
current = path.split("/")
|
||||
current = current[len(current) - 1]
|
||||
|
||||
images = os.listdir(path.replace(current, ""))
|
||||
for_hyprlock = "hyprlock.png"
|
||||
|
||||
if for_hyprlock in images:
|
||||
images.pop(images.index(for_hyprlock))
|
||||
|
||||
next = images.index(current) + 1
|
||||
|
||||
if next >= len(images):
|
||||
next = images[0]
|
||||
else:
|
||||
next = images[next]
|
||||
|
||||
next = path.replace(current, next)
|
||||
|
||||
swww_command = f"swww img {next} --transition-step 90 --transition-angle 45 --transition-type outer --transition-fps 60 --transition-pos {float(randrange(1, 9, 1)) / 10},{float(randrange(0, 10, 1)) / 10}"
|
||||
|
||||
ln_command = f"ln -s -f {next} {path.replace(current, for_hyprlock)}"
|
||||
|
||||
os.system(swww_command)
|
||||
os.system(ln_command)
|
||||