fix: fixed conflicts + moving to yadm

This commit is contained in:
2026-02-20 17:21:21 +03:00
parent 03128d0bcf
commit b5f443916b
553 changed files with 704 additions and 256 deletions
+32
View File
@@ -0,0 +1,32 @@
[global]
frame_color = "#BD93F9"
separator_color = "#20212C6A"
corner_radius = 10
width = 320
height = (0, 500)
offset = (30, 30)
padding = 20
horizontal_padding = 20
text_icon_padding = 16
frame_width = 2
gap_size = 20
font = "JetBrains Mono Nerd Font 9"
progress_bar_corner_radius = 3
progress_bar_frame_width = 0
progress_bar_height = 7
highlight = "#BD93F9"
origin = bottom-right
[urgency_low]
background = "#20212C6A"
foreground = "#C0CAF5"
[urgency_normal]
background = "#20212C6A"
foreground = "#C0CAF5"
[urgency_critical]
background = "#20212C6A"
foreground = "#C0CAF5"
frame_color = "#F38BA8"
+57
View File
@@ -0,0 +1,57 @@
#!/usr/bin/env python3
from dataclasses import dataclass
import subprocess
import sys
import os
import time
battery_state = {"Discharging": False, "Charging": True}
@dataclass(slots=True)
class Battery:
percent: int
power_plugged: bool
def sensors_battery(base_path: str) -> Battery:
with open(base_path + "capacity", "r") as c, open(base_path + "status", "r") as s:
return Battery(
percent=int(c.read().strip()), power_plugged=battery_state[s.read().strip()]
)
def main(sleep_time: int, base_path: str):
while True:
if sensors_battery(base_path).power_plugged:
os.system('notify-send -u normal -r "6896" "Battery" "Charging"')
while sensors_battery(base_path).power_plugged:
time.sleep(sleep_time)
os.system('notify-send -u normal -r "6896" "Battery" "Discharging"')
elif sensors_battery(base_path).percent <= 15:
os.system('notify-send -u critical -r "6896" "Battery" "Low battery alarm"')
while (
not sensors_battery(base_path).power_plugged
or sensors_battery(base_path).percent > 5
):
time.sleep(sleep_time)
if sensors_battery(base_path).percent <= 5:
os.system("systemctl suspend")
time.sleep(60)
time.sleep(sleep_time)
if __name__ == "__main__":
service_name = "BSC"
base_path = "/sys/class/power_supply/BAT0/"
if not os.path.exists(base_path):
sys.stdout.write("Can't get battery info\n")
sys.stdout.flush()
sys.exit(1)
if subprocess.run(["pgrep", service_name]).returncode != 1:
sys.stdout.write("Process alredy exists\n")
sys.stdout.flush()
sys.exit(1)
with open("/proc/self/comm", "w") as f:
f.write(service_name)
main(2, base_path)
@@ -0,0 +1,5 @@
#!/bin/bash
asusctl profile -n
notify-send -i $HOME/.config/dunst/scripts/icons/performance.svg -u low -r "3378455" "$(asusctl profile -p | grep Active | sed 's/^.*is //')"
@@ -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/dunst/scripts/icons/brightness.svg -a "changeBrightness" -u low -r "$msgId" \
-h int:value:"$brightpercent" "Яркость экрана: $brightpercent%"
@@ -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/dunst/scripts/icons/brightness.svg -a "changeBrightness" -u low -r "$msgId" \
-h int:value:"$brightpercent" "Яркость экрана: $brightpercent%"
+11
View 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/dunst/scripts/icons/mic off.svg" -u low -r "$msgId" "Микрофон выключен"
else
notify-send -i "$HOME/.config/dunst/scripts/icons/mic on.svg" -u low -r "$msgId" "Микрофон включен"
fi
@@ -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"
@@ -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/dunst/scripts/icons/volume.svg -a "changevolume" -u low -r "$msgId" \
-h int:value:"$volume" "Громкость: $volume%"
@@ -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/dunst/scripts/icons/volume mute.svg" -u low -r "$msgId" "Звук выключен"
else
notify-send -i "$HOME/.config/dunst/scripts/icons/volume.svg" -u low -r "$msgId" "Звук включен"
fi
@@ -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

@@ -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
View 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
View 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
View 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

@@ -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
View 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

@@ -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

@@ -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
View 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

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 MiB

+18
View File
@@ -0,0 +1,18 @@
exec-once = dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP
exec-once = uwsm app -- /usr/lib/xdg-desktop-portal-hyprland
exec-once = uwsm app -- /usr/lib/xdg-desktop-portal
exec-once = uwsm app -- /usr/lib/xdg-desktop-portal-gtk
exec-once = uwsm app -- hypridle
# exec-once = uwsm app -- hyprpaper
exec-once = uwsm app -- swww-daemon
exec-once = swww img "$WALLPAPER"
exec-once = uwsm app -- waybar
exec-once = uwsm app -- dunst
exec-once = uwsm app -- wl-paste --type text --watch cliphist store #Stores only text data
exec-once = uwsm app -- wl-paste --type image --watch cliphist store #Stores only image data
exec-once = uwsm app -- systemd-inhibit --who="Hyprland config" --why="wlogout keybind" --what=handle-power-key --mode=block sleep infinity
+141
View File
@@ -0,0 +1,141 @@
# general
$mainMod = SUPER
# navigation binds
bind = $mainMod SHIFT, C, killactive,
bind = $mainMod SHIFT, M, exit,
bind = $mainMod SHIFT, V, togglefloating,
bind = $mainMod, F, fullscreen, 1
bind = $mainMod SHIFT, F, fullscreen, 0
# dwindle
bind = $mainMod, P, pseudo,
bind = $mainMod, T, togglesplit,
bind = $mainMod SHIFT, T, swapsplit,
# apps binds
bind = $mainMod, Q, exec, kitty
bind = $mainMod, E, exec, thunar
bind = $mainMod, R, exec, rofi -show drun
# copy binds
bind = $mainMod, V, exec, rofi -modi clipboard:/$HOME/.config/rofi/cliphist-rofi-img.sh -show clipboard -show-icon
# -config $HOME/.config/rofi/clipboard-config.rasi
bind = $mainMod SHIFT, S, exec, IMG=~/Pictures/Screenshots/$(date +%Y-%m-%d_%H-%m-%s).png && grim -g "$(slurp)" $IMG && wl-copy < $IMG
bind = , PRINT, exec, grim - | wl-copy
# hyprlock bind
bind = $mainMod, code:49, exec, hyprlock
# waybar bind
bindr = $mainMod, w, exec, pkill -9 waybar || uwsm app -- waybar
# multimedia binds
binde = , XF86AudioRaiseVolume, exec, pactl set-sink-volume @DEFAULT_SINK@ +5%; .config/hypr/scripts/dunst/volume.sh
binde = , XF86AudioLowerVolume, exec, pactl set-sink-volume @DEFAULT_SINK@ -5%; .config/hypr/scripts/dunst/volume-down.sh
bind = , XF86AudioMute, exec, pactl set-sink-mute @DEFAULT_SINK@ toggle; .config/hypr/scripts/dunst/volume-mute.sh
bind = , XF86AudioMicMute, exec, pactl set-source-mute @DEFAULT_SOURCE@ toggle; .config/hypr/scripts/dunst/micro.sh
bind = , XF86AudioStop, exec, playerctl stop
bind = , XF86AudioPause, exec, playerctl pause
bind = , XF86AudioPrev, exec, playerctl previous; .config/hypr/scripts/dunst/trackinfo.sh
bind = , XF86AudioNext, exec, playerctl next; .config/hypr/scripts/dunst/trackinfo.sh
bind = , XF86AudioPlay, exec, playerctl play-pause
# bindsym XF86AudioRaiseVolume exec pactl set-sink-volume @DEFAULT_SINK@ +10%
# bindsym XF86AudioLowerVolume exec pactl set-sink-volume @DEFAULT_SINK@ -10%
# bindsym XF86AudioMute exec pactl set-sink-mute @DEFAULT_SINK@ toggle
# brightness binds
binde = , XF86MonBrightnessUp , exec, brightnessctl --class='backlight' set 5%+; .config/hypr/scripts/dunst/brightness.sh
binde = , XF86MonBrightnessDown , exec, brightnessctl --class='backlight' set 5%-; .config/hypr/scripts/dunst/brightness-down.sh
# power binds
# bindl = , switch:off:Lid Switch, exec, hyprctl keyword monitor "eDP-1, 1920x1080@120, 0x0, 1, vrr, 1"
# bindl = , switch:on:Lid Switch, exec, .config/hypr/scripts/eDPower.sh
# bind = , XF86PowerOff, exec, .config/hypr/scripts/before-sleep.sh
bind = , XF86PowerOff, exec, systemctl suspend
# Move focus with mainMod + arrow keys
bind = $mainMod, H, movefocus, l
bind = $mainMod, L, movefocus, r
bind = $mainMod, K, movefocus, u
bind = $mainMod, J, movefocus, d
bind = $mainMod, left, movefocus, l
bind = $mainMod, right, movefocus, r
bind = $mainMod, up, movefocus, u
bind = $mainMod, down, movefocus, d
bind = $mainMod SHIFT, H, movewindow, l
bind = $mainMod SHIFT, L, movewindow, r
bind = $mainMod SHIFT, K, movewindow, u
bind = $mainMod SHIFT, J, movewindow, d
bind = $mainMod SHIFT, left, movewindow, l
bind = $mainMod SHIFT, right, movewindow, r
bind = $mainMod SHIFT, up, movewindow, u
bind = $mainMod SHIFT, down, movewindow, d
bind = ALT, TAB, cyclenext
# Scroll through existing workspaces with mainMod + scroll
bind = $mainMod, mouse_down, workspace, r-1
bind = $mainMod, mouse_up, workspace, r+1
# Move/resize windows with mainMod + LMB/RMB and dragging
bindm = $mainMod, mouse:272, movewindow
bindm = $mainMod, mouse:273, resizewindow
bindm = $mainMod SHIFT, mouse:272, resizewindow
# Switch workspaces
bind = $mainMod, A, focusworkspaceoncurrentmonitor, r-1
bind = $mainMod, D, focusworkspaceoncurrentmonitor, r+1
# Move active window to the next or previous workspace
bind = $mainMod SHIFT, A, movetoworkspace, r-1
bind = $mainMod SHIFT, D, movetoworkspace, r+1
# Swap worlspaces between monitors
bind = $mainMod, TAB, swapactiveworkspaces, 1 0
# Switch workspaces with mainMod + [0-9]
bind = $mainMod, 1, focusworkspaceoncurrentmonitor, 1
bind = $mainMod, 2, focusworkspaceoncurrentmonitor, 2
bind = $mainMod, 3, focusworkspaceoncurrentmonitor, 3
bind = $mainMod, 4, focusworkspaceoncurrentmonitor, 4
bind = $mainMod, 5, focusworkspaceoncurrentmonitor, 5
bind = $mainMod, 6, focusworkspaceoncurrentmonitor, 6
bind = $mainMod, 7, focusworkspaceoncurrentmonitor, 7
bind = $mainMod, 8, focusworkspaceoncurrentmonitor, 8
bind = $mainMod, 9, focusworkspaceoncurrentmonitor, 9
bind = $mainMod, 0, focusworkspaceoncurrentmonitor, 0
# Move active window to a workspace with mainMod + SHIFT + [0-9]
bind = $mainMod SHIFT, 1, movetoworkspace, 1
bind = $mainMod SHIFT, 2, movetoworkspace, 2
bind = $mainMod SHIFT, 3, movetoworkspace, 3
bind = $mainMod SHIFT, 4, movetoworkspace, 4
bind = $mainMod SHIFT, 5, movetoworkspace, 5
bind = $mainMod SHIFT, 6, movetoworkspace, 6
bind = $mainMod SHIFT, 7, movetoworkspace, 7
bind = $mainMod SHIFT, 8, movetoworkspace, 8
bind = $mainMod SHIFT, 9, movetoworkspace, 9
bind = $mainMod SHIFT, 0, movetoworkspace, 0
+20
View File
@@ -0,0 +1,20 @@
env = GTK_THEME,Colloid-Transparent-Dracula
env = QT_QPA_PLATFORM,wayland;xcb
env = XDG_CURRENT_DESKTOP,Hyprland
env = XDG_SESSION_TYPE,wayland
env = XDG_SESSION_DESKTOP,Hyprland
env = GDK_BACKEND,wayland,x11,*
exec = gsettings set org.gnome.desktop.interface color-scheme "prefer-dark"
exec = gsettings set org.gnome.desktop.interface gtk-theme "adw-gtk3-dark"
env = XCURSOR_SIZE,24
env = ELECTRON_OZONE_PLATFORM_HINT,wayland
# env = chrome,--enable-features=TouchpadOverscrollHistoryNavigation
env = GDK_SCALE,1
xwayland {
force_zero_scaling = true
}
+44
View File
@@ -0,0 +1,44 @@
input {
kb_layout = us, ru
kb_variant =
kb_model =
kb_options = grp:alt_shift_toggle, caps:escape
kb_rules =
follow_mouse = 1
repeat_rate = 36 # Default: 25
repeat_delay = 400 # Default: 600
touchpad {
natural_scroll = yes
scroll_factor = 0.6
disable_while_typing = yes
}
sensitivity = 0 # -1.0 - 1.0, 0 means no modification.
# force_no_accel = 1
}
gestures {
gesture = 3, horizontal, scale: 3, workspace
gesture = 3, vertical, scale: 3, workspace
}
device {
name = compx-2.4g-wireless-receiver
sensitivity = 0
accel_profile = flat
}
device {
name = logitech-usb-optical-mouse
sensitivity = -0.4
accel_profile = flat
}
device {
name = hs-ch12u-ptp-01-02-0f-usb-keyboard-touchpad
sensitivity = 0.18
accel_profile = flat
}
+9
View File
@@ -0,0 +1,9 @@
# layers
layerrule = blur on, match:namespace rofi
layerrule = ignore_alpha 0.4, match:namespace rofi
layerrule = blur on, match:namespace notifications
layerrule = ignore_alpha 0.8, match:namespace notifications
layerrule = blur off, match:namespace waybar
layerrule = ignore_alpha 1, match:namespace waybar
+7
View File
@@ -0,0 +1,7 @@
# default
# monitor = eDP-1, 1920x1080@120, auto, 1, vrr, 1
# monitor = , prefered, auto, 1
monitor = eDP-1, prefered, auto, 1
# custom
monitor = desc:Communications Supply Corporation (A division of WESCO) P120ZDG-BF4, 2160x1440@60, auto, 1.33333334
+84
View File
@@ -0,0 +1,84 @@
ecosystem {
no_update_news = true
no_donation_nag = true
}
misc {
disable_hyprland_logo = true
disable_splash_rendering = true
}
general {
gaps_in = 3
gaps_out = 5
border_size = 2
col.active_border = rgba(33ccffee) rgba(bd93f9ee) 45deg
col.inactive_border = rgba(595959aa)
layout = dwindle
}
cursor {
inactive_timeout = 2
}
decoration {
rounding = 10
blur {
brightness = 0.7
contrast = 0.75
enabled = true
size = 3
passes = 2
ignore_opacity = true
}
}
animations {
enabled = yes
# Style 1
# bezier = myBezier, 0.05, 0.9, 0.1, 1.05
# animation = windows, 1, 7, myBezier
# animation = windowsOut, 1, 7, default, popin 80%
# animation = border, 1, 10, default
# animation = borderangle, 1, 8, default
# animation = fade, 1, 7, default
# animation = workspaces, 1, 6, default
# Style 2
bezier = myBezier, 0.05, 0.9, 0.1, 1.05
animation = windows, 1, 7, myBezier
animation = windowsIn, 1, 10, myBezier, gnomed
animation = windowsOut, 1, 7, myBezier, popin 70%
animation = border, 1, 10, default
animation = borderangle, 1, 8, default
animation = fade, 1, 5, myBezier
animation = workspaces, 1, 6, myBezier, slide
# Style 3 (raw)
# bezier = myBezier, 0, 0.55, 0.45, 1
# animation = windows, 1, 7, myBezier
# animation = windowsOut, 1, 7, default, popin 80%
# animation = border, 1, 10, default
# animation = borderangle, 1, 8, default
# animation = fade, 1, 5, myBezier
# animation = workspaces, 1, 6, myBezier, slide
}
dwindle {
pseudotile = yes
preserve_split = yes
}
group {
col.border_active = rgba(33ccffee) rgba(bd93f9ee) 45deg
groupbar {
gradients = false
col.active = rgba(33ccffee)
render_titles = false
}
}
+1
View File
@@ -0,0 +1 @@
env = WALLPAPER_PATH,$HOME/.config/hypr/Wallpapers/kotamota2.png
+29
View File
@@ -0,0 +1,29 @@
# browsers
windowrule = tag +browser, match:class ^([Gg]oogle-chrome|[Cc]hrome)$
windowrule = tag +browser, match:class ^([Ff]irefox|[Ff]irefox-esr|[Ff]irefox-bin|org.mozilla.firefox)$
windowrule = opacity 0.9 0.8, match:tag browser*
# messengers
windowrule = tag +messenger, match:class ^([Mm]attermost|[Mm]attermost-desktop)$
windowrule = tag +messenger, match:class ^([Tt]elegram|[Tt]elegram-desktop|org.telegram.desktop)$
windowrule = opacity 1 0.9, match:tag messenger*
# tools
windowrule = tag +tools, match:class ^([Dd][Bb]eaver|[Dd][Bb]eaver-ce|[Dd][Bb]eaver-community)$
windowrule = opacity 0.85 0.75, match:tag tools*
# jetbrains
windowrule = no_initial_focus on, match:class (jetbrains-idea), match:title ^win.*
windowrule = no_initial_focus on, match:class (jetbrains-studio), match:title ^win(.*)
windowrule = no_initial_focus on, match:class (jetbrains-goland), match:title ^win.*
windowrule = no_initial_focus on, match:class (jetbrains-toolbox), match:float yes
windowrule = no_initial_focus on, match:class (jetbrains-goland), match:float yes, match:title ^$, match:initial_title ^$
# other
# windowrule = float, center, match:class ^(xfce-polkit)$
# windowrule = float, center, match:class ^(file-roller)$
+30
View File
@@ -0,0 +1,30 @@
general {
inhibit_sleep = 3
# lock_cmd = pidof hyprlock || hyprlock
before_sleep_cmd = ~/.config/hypr/scripts/before-sleep.sh
after_sleep_cmd = ~/.config/hypr/scripts/after-sleep.sh
# ignore_dbus_inhibit = false
}
# TODO: migrate to brillo?
listener {
timeout = 120
on-timeout = brightnessctl -s set 0 # avoid 0 with OLED monitors
on-resume = brightnessctl -r
}
listener {
timeout = 180
on-timeout = loginctl lock-session
}
listener {
timeout = 330
on-timeout = hyprctl dispatch dpms off
on-resume = hyprctl dispatch dpms on && brightnessctl -r
}
listener {
timeout = 300
on-timeout = systemctl suspend
}
+1
View File
@@ -0,0 +1 @@
source = ~/.config/hypr/config/*
+57
View File
@@ -0,0 +1,57 @@
general {
fail_timeout = 300
}
background {
path = $HOME/.config/hypr/Wallpaper/kita.png
blur_passes = 1 # 0 disables blurring
blur_size = 3
noise = 0.0117
contrast = 0.8916
brightness = 0.8172
vibrancy = 0.1696
vibrancy_darkness = 0.0
}
input-field {
size = 250, 60
outline_thickness = 4
dots_size = 0.2
dots_spacing = 0.2
dots_center = true
outer_color = rgba(51, 204, 255, 0.93)
inner_color = rgba(10, 0, 30, 0)
font_color = rgb(200, 200, 200)
fade_on_empty = false
font_family = JetBrains Mono Nerd Font Mono
placeholder_text = <i><span foreground="##cdd6f4">Мур Кусь</span></i>
hide_input = false
position = 0, -280
halign = center
valign = center
}
label {
text = cmd[update:1000] echo "$(date +"%R")"
color = $foreground
font_size = 60
font_family = JetBrains Mono Nerd Font Mono ExtraBold
position = 0, -180
halign = center
valign = center
}
label {
text = cmd[update:1000] echo "$($HOME/.config/hypr/scripts/player-status.sh)"
color = $foreground
font_size = 14
font_family = JetBrains Mono Nerd Font Mono
position = 0, 10
halign = center
valign = bottom
}
animations {
animation = fadeIn, 0
animation = fadeOut, 0
}
+2
View File
@@ -0,0 +1,2 @@
preload = $HOME/.config/hypr/Wallpaper/kotamota2.png
wallpaper = , contain:$HOME/.config/hypr/Wallpaper/kotamota2.png
+4
View File
@@ -0,0 +1,4 @@
#!/bin/bash
# hyprctl keyword monitor "eDP-1, 1920x1080@120, 0x0, 1, vrr, 1"
# brightnessctl -r
+12
View File
@@ -0,0 +1,12 @@
#!/bin/bash
# hyprctl keyword monitor "eDP-1, 1920x1080@120, 0x0, 1, vrr, 1"
# TODO: why uwsm?
brightnessctl -s
# brightnessctl --class='backlight' set 0%
#
# sleep 4
# brightnessctl --class='backlight' set 20%
uwsm app -- hyprlock &
+8
View 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-down.svg -a "changeBrightness" -u low -r "$msgId" \
-h int:value:"$brightpercent" "Яркость экрана: $brightpercent%"
+8
View 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%"
@@ -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

@@ -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

@@ -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

@@ -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

@@ -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

@@ -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

@@ -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

@@ -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

@@ -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

@@ -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

+12
View File
@@ -0,0 +1,12 @@
#!/bin/bash
msgId="3378455"
station=$(pactl get-source-volume @DEFAULT_SOURCE@)
# TODO: fix if for pactl
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
+8
View File
@@ -0,0 +1,8 @@
#!/bin/bash
msgId="3378455"
volume=$(pactl get-sink-volume @DEFAULT_SINK@ | grep -Eo [0-9]+% | head -1)
notify-send -i $HOME/.config/hypr/scripts/dunst/icons/volume-down.svg -a "changevolume" -u low -r "$msgId" \
-h int:value:"$volume" "Громкость: $volume%"
+11
View File
@@ -0,0 +1,11 @@
#!/bin/bash
msgId="3378455"
station=$(pactl get-sink-mute @DEFAULT_SINK@)
if [ "$station" = 'Mute: yes' ]; 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
+11
View File
@@ -0,0 +1,11 @@
#!/bin/bash
msgId="3378455"
# Unmute on volume change
# pactl set-mute @DEFAULT_SINK@ 0
volume=$(pactl get-sink-volume @DEFAULT_SINK@ | grep -Eo [0-9]+% | head -1)
notify-send -i $HOME/.config/hypr/scripts/dunst/icons/volume.svg -a "changevolume" -u low -r "$msgId" \
-h int:value:"$volume" "Громкость: $volume%"
+6
View File
@@ -0,0 +1,6 @@
#!/bin/bash
X_POS=$(awk "BEGIN {srand(); print rand()}")
Y_POS=$(awk "BEGIN {srand(); print rand()}")
swww img $WALLPAPER --transition-type grow --transition-pos "$X_POS, $Y_POS" --transition-fps 60
+52
View File
@@ -0,0 +1,52 @@
#!/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()
+9
View 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
+19
View 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
+11
View 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"
+80
View File
@@ -0,0 +1,80 @@
# vim:ft=kitty
## name: Catppuccin-Mocha
## author: Pocco81 (https://github.com/Pocco81)
## license: MIT
## upstream: https://github.com/catppuccin/kitty/blob/main/mocha.conf
## blurb: Soothing pastel theme for the high-spirited!
# The basic colors
foreground #DADAFF
background #0E1219
selection_foreground #0E1219
selection_background #BD93F9
# Cursor colors
cursor #F5E0DC
cursor_text_color #1E1E2E
# URL underline color when hovering with mouse
url_color #F5E0DC
# Kitty window border colors
active_border_color #B4BEFE
inactive_border_color #6C7086
bell_border_color #F9E2AF
# OS Window titlebar colors
wayland_titlebar_color system
macos_titlebar_color system
# Tab bar colors
active_tab_foreground #11111B
active_tab_background #CBA6F7
inactive_tab_foreground #CDD6F4
inactive_tab_background #181825
tab_bar_background #11111B
# Colors for marks (marked text in the terminal)
mark1_foreground #1E1E2E
mark1_background #B4BEFE
mark2_foreground #1E1E2E
mark2_background #CBA6F7
mark3_foreground #1E1E2E
mark3_background #74C7EC
# The 16 terminal colors
# black
color0 #45475A
color8 #585B70
# red
color1 #F38BA8
color9 #F38BA8
# green
color2 #A6E3A1
color10 #A6E3A1
# yellow
color3 #F9E2AF
color11 #F9E2AF
# blue
color4 #89B4FA
color12 #89B4FA
# magenta
color5 #F5C2E7
color13 #F5C2E7
# cyan
color6 #94E2D5
color14 #94E2D5
# white
color7 #BAC2DE
color15 #A6ADC8
+101
View File
@@ -0,0 +1,101 @@
linux_display_server wayland
# wayland_titlebar_color background
font_family JetBrainsMono Nerd Font
bold_font auto
italic_font auto
bold_italic_font auto
font_size 14
background_opacity 0.4
disable_ligatures always
# window settings
initial_window_width 95c
initial_window_height 35c
window_padding_width 20
confirm_os_window_close 0
# Upstream colors {{{
# Special
# background #14151e
# foreground #98b0d3
# Black
# color0 #151720
# color8 #4f5572
# Red
# color1 #dd6777
# color9 #e26c7c
# Green
# color2 #90ceaa
# color10 #95d3af
# Yellow
# color3 #ecd3a0
# color11 #f1d8a5
# Blue
# color4 #86aaec
# color12 #8baff1
# Magenta
# color5 #c296eb
# color13 #c79bf0
# Cyan
# color6 #93cee9
# color14 #98d3ee
# White
# color7 #cbced3
# color15 #d0d3d8
# Cursor
# cursor #cbced3
# cursor_text_color #a5b6cf
# Selection highlight
# selection_foreground #a5b6cf
# selection_background #1c1e27
# The color for highlighting URLs on mouse-over
# url_color #9ece6a
url color #5de4c7
# Window borders
# active_border_color #3d59a1
# inactive_border_color #101014
# bell_border_color #fffac2
# Tab bar
tab_bar_style fade
tab_fade 1
# active_tab_foreground #3d59a1
# active_tab_background #16161e
active_tab_font_style bold
# inactive_tab_foreground #787c99
# inactive_tab_background #16161e
inactive_tab_font_style bold
# tab_bar_background #101014
# Title bar
# macos_titlebar_color #16161e
# Keyboard bindings
map kitty_mod+t new_tab_with_cwd
map ctrl+v paste_from_clipboard
# Mouse bindings
mouse_map b4 press grabbed,ungrabbed send_key ctrl+o
mouse_map b5 press grabbed,ungrabbed send_key ctrl+shift+i
# BEGIN_KITTY_THEME
# Catppuccin-Mocha
include current-theme.conf
# END_KITTY_THEME
+4
View File
@@ -0,0 +1,4 @@
require("config.lazy")
require("config.config")
require("config.options")
require("config.key_binds")
+31
View File
@@ -0,0 +1,31 @@
{
"Comment.nvim": { "branch": "master", "commit": "e30b7f2008e52442154b66f7c519bfd2f1e32acb" },
"catppuccin": { "branch": "main", "commit": "ce8d176faa4643e026e597ae3c31db59b63cef09" },
"cmp-buffer": { "branch": "main", "commit": "b74fab3656eea9de20a9b8116afa3cfc4ec09657" },
"cmp-nvim-lsp": { "branch": "main", "commit": "cbc7b02bb99fae35cb42f514762b89b5126651ef" },
"conform.nvim": { "branch": "master", "commit": "5420c4b5ea0aeb99c09cfbd4fd0b70d257b44f25" },
"dressing.nvim": { "branch": "master", "commit": "2d7c2db2507fa3c4956142ee607431ddb2828639" },
"flutter-tools.nvim": { "branch": "main", "commit": "539e84f5a652d96917f0afc1341c20f0d59dd789" },
"harpoon": { "branch": "harpoon2", "commit": "87b1a3506211538f460786c23f98ec63ad9af4e5" },
"indent-blankline.nvim": { "branch": "master", "commit": "005b56001b2cb30bfa61b7986bc50657816ba4ba" },
"lazy.nvim": { "branch": "main", "commit": "306a05526ada86a7b30af95c5cc81ffba93fef97" },
"lualine.nvim": { "branch": "master", "commit": "47f91c416daef12db467145e16bed5bbfe00add8" },
"mini.nvim": { "branch": "main", "commit": "7e55c3d2c04da134085a31156196836f80a89982" },
"neo-tree.nvim": { "branch": "main", "commit": "b0b73273b4f5a1f4b4aac8accd6e0c3b4b5a6967" },
"nui.nvim": { "branch": "main", "commit": "de740991c12411b663994b2860f1a4fd0937c130" },
"nvim-autopairs": { "branch": "master", "commit": "c2a0dd0d931d0fb07665e1fedb1ea688da3b80b4" },
"nvim-cmp": { "branch": "main", "commit": "d97d85e01339f01b842e6ec1502f639b080cb0fc" },
"nvim-dap": { "branch": "master", "commit": "818cd8787a77a97703eb1d9090543a374f79a9ac" },
"nvim-dap-python": { "branch": "master", "commit": "1808458eba2b18f178f990e01376941a42c7f93b" },
"nvim-dap-ui": { "branch": "master", "commit": "cf91d5e2d07c72903d052f5207511bf7ecdb7122" },
"nvim-lspconfig": { "branch": "master", "commit": "d696e36d5792daf828f8c8e8d4b9aa90c1a10c2a" },
"nvim-nio": { "branch": "master", "commit": "21f5324bfac14e22ba26553caf69ec76ae8a7662" },
"nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" },
"nvim-web-devicons": { "branch": "master", "commit": "6788013bb9cb784e606ada44206b0e755e4323d7" },
"plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" },
"render-markdown.nvim": { "branch": "main", "commit": "07d088bf8bdadd159eb807b90eaee86a4778383f" },
"telescope.nvim": { "branch": "master", "commit": "4d0f5e0e7f69071e315515c385fab2a4eff07b3d" },
"vim-fugitive": { "branch": "master", "commit": "61b51c09b7c9ce04e821f6cf76ea4f6f903e3cf4" },
"vim-suda": { "branch": "master", "commit": "c492741b4679b3cdd4d9e34138209784e061d916" },
"yanky.nvim": { "branch": "main", "commit": "04fc42b94305d94948c9c197f679336668af3292" }
}
+14
View File
@@ -0,0 +1,14 @@
do
local neovim_options = {
expandtab = true,
number = true,
relativenumber = true,
shiftwidth = 2,
tabstop = 2,
termguicolors = true,
}
for k, v in pairs(neovim_options) do
vim.opt[k] = v
end
end
+18
View File
@@ -0,0 +1,18 @@
vim.cmd([[
tnoremap <C-h> <C-\\><C-o><C-w>h
tnoremap <C-k> <C-\\><C-o><C-w>k
tnoremap <C-l> <C-\\><C-o><C-w>l
tnoremap <C-j> <C-\\><C-o><C-w>j
nnoremap <C-h> <C-w>h
nnoremap <C-k> <C-w>k
nnoremap <C-l> <C-w>l
nnoremap <C-j> <C-w>j
nnoremap <Space> @q
nnoremap <C-Space> 
vnoremap <C-Space> 
vnoremap <leader>e :!sh<CR>
nnoremap ' @q
]])
+28
View File
@@ -0,0 +1,28 @@
-- Bootstrap lazy.nvim
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not (vim.uv or vim.loop).fs_stat(lazypath) then
local lazyrepo = "https://github.com/folke/lazy.nvim.git"
local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath })
if vim.v.shell_error ~= 0 then
vim.api.nvim_echo({
{ "Failed to clone lazy.nvim:\n", "ErrorMsg" },
{ out, "WarningMsg" },
{ "\nPress any key to exit..." },
}, true, {})
vim.fn.getchar()
os.exit(1)
end
end
vim.opt.rtp:prepend(lazypath)
vim.g.mapleader = " "
vim.g.maplocalleader = "\\"
-- Setup lazy.nvim
require("lazy").setup({
spec = {
{ import = "plugins" },
},
install = { colorscheme = { "habamax" } },
checker = { enabled = false },
})
+24
View File
@@ -0,0 +1,24 @@
vim.opt.clipboard = "unnamedplus"
vim.g.clipboard = {
name = "osc 52",
copy = {
["+"] = require("vim.ui.clipboard.osc52").copy("+"),
["*"] = require("vim.ui.clipboard.osc52").copy("*"),
},
paste = {
["+"] = function()
return { vim.fn.split(vim.fn.getreg(""), "\n"), vim.fn.getregtype("") }
end,
["*"] = function()
return { vim.fn.split(vim.fn.getreg(""), "\n"), vim.fn.getregtype("") }
end,
},
}
vim.opt.fixeol = true
vim.opt.list = true
vim.opt.listchars = {
trail = "·",
tab = " ",
}
+52
View File
@@ -0,0 +1,52 @@
-- source https://github.com/neovim/nvim-lspconfig/issues/500#issuecomment-877293306
local export = {}
local function shorten_path(path)
if not path or #path <= 1 then
return path or "/"
end
local last_slash = path:match(".*/()")
if last_slash and last_slash > 1 then
return path:sub(1, last_slash - 2)
else
return "/"
end
end
function export.get_python_path()
local util = require("lspconfig/util")
local path = util.path
workspace = vim.fn.expand("%:p")
-- Use activated virtualenv.
if vim.env.VIRTUAL_ENV then
return path.join(vim.env.VIRTUAL_ENV, "bin", "python")
end
local match = vim.fn.glob(path.join(workspace, ".venv"))
if match ~= "" then
return path.join(workspace, ".venv", "bin", "python")
end
-- Find and use virtualenv via poetry in workspace directory.
while workspace ~= "" do
if workspace ~= "" then
local match = vim.fn.glob(path.join(workspace, "poetry.lock"))
if match ~= "" then
vim.api.nvim_set_current_dir(workspace)
local venv = vim.fn.trim(vim.fn.system("poetry env info -p 2> /dev/null"))
if venv ~= "" then
return path.join(venv, "bin", "python")
end
end
end
workspace = shorten_path(workspace)
end
-- Fallback to system Python.
return vim.fn.exepath("python3") or vim.fn.exepath("python") or "python"
end
return export
+7
View File
@@ -0,0 +1,7 @@
return {
"windwp/nvim-autopairs",
event = "InsertEnter",
config = function()
require("nvim-autopairs").setup({})
end,
}
+27
View File
@@ -0,0 +1,27 @@
return {
"lukas-reineke/indent-blankline.nvim",
config = function()
local highlight = {
-- "RainbowRed",
"RainbowYellow",
"RainbowBlue",
"RainbowOrange",
"RainbowGreen",
"RainbowViolet",
"RainbowCyan",
}
local hooks = require("ibl.hooks")
hooks.register(hooks.type.HIGHLIGHT_SETUP, function()
-- vim.api.nvim_set_hl(0, "RainbowRed", { fg = "#E06C75" })
vim.api.nvim_set_hl(0, "RainbowYellow", { fg = "#E5C07B" })
vim.api.nvim_set_hl(0, "RainbowBlue", { fg = "#61AFEF" })
vim.api.nvim_set_hl(0, "RainbowOrange", { fg = "#D19A66" })
vim.api.nvim_set_hl(0, "RainbowGreen", { fg = "#98C379" })
vim.api.nvim_set_hl(0, "RainbowViolet", { fg = "#C678DD" })
vim.api.nvim_set_hl(0, "RainbowCyan", { fg = "#56B6C2" })
end)
require("ibl").setup({ indent = { highlight = highlight } })
end,
}
+17
View File
@@ -0,0 +1,17 @@
return {
"catppuccin/nvim",
name = "catppuccin",
priority = 1000,
config = function()
require("catppuccin").setup({
flavour = "auto", -- latte, frappe, macchiato, mocha
background = { -- :h background
light = "latte",
dark = "mocha",
},
transparent_background = true,
})
vim.cmd.colorscheme("catppuccin")
end,
}
+33
View File
@@ -0,0 +1,33 @@
return {
"hrsh7th/nvim-cmp",
dependencies = {
"hrsh7th/cmp-nvim-lsp",
"hrsh7th/cmp-buffer",
},
config = function()
local cmp = require("cmp")
cmp.setup({
mapping = {
["<A-d>"] = cmp.mapping(function(fallback)
if cmp.visible_docs() then
cmp.close_docs()
elseif cmp.visible() then
cmp.open_docs()
else
fallback()
end
end),
["<A-j>"] = cmp.mapping(cmp.mapping.select_next_item(), { "i", "s" }),
["<A-k>"] = cmp.mapping(cmp.mapping.select_prev_item(), { "i", "s" }),
["<C-Space>"] = cmp.mapping.complete(),
["<Tab>"] = cmp.mapping.confirm({ select = true }),
},
snippet = {
expand = function(args)
vim.snippet.expand(args.body)
end,
},
sources = { { name = "nvim_lsp" }, { name = "buffer" } },
})
end,
}
+9
View File
@@ -0,0 +1,9 @@
return {
"numToStr/Comment.nvim",
config = function()
local comment = require("Comment")
comment.setup({
opleader = { line = "|" },
})
end,
}
+75
View File
@@ -0,0 +1,75 @@
return {
"stevearc/conform.nvim",
event = { "BufWritePre" },
cmd = { "ConformInfo" },
keys = {
{
"<leader>F",
function()
require("conform").format({ async = true, lsp_fallback = true })
end,
mode = "",
desc = "Format buffer",
},
},
opts = {
-- Defined formatters
formatters_by_ft = {
lua = { "stylua" },
sh = { "shfmt" },
python = { "better_ruff", "ruff_format" },
go = { "gofmt" },
html = { "prettierd", "prettier", stop_after_first = true },
css = { "prettierd", "prettier", stop_after_first = true },
javascript = { "prettierd", "prettier", stop_after_first = true },
typescript = { "prettierd", "prettier", stop_after_first = true },
json = { "prettierd", "prettier_f", stop_after_first = true },
jsonc = { "prettierd_f", "prettier_f", stop_after_first = true },
markdown = { "prettierd", "prettier", stop_after_first = true },
},
-- Custom formatters
formatters = {
better_ruff = {
command = "ruff",
args = {
"check",
"--unfixable",
"F401",
"--fix",
"--select",
"I",
-- "F", "E", "W", "C90", "I", "S", "BLE", "T20", "ERA"
"--stdin-filename",
"$FILENAME",
"-",
},
stdin = true,
},
prettierd = {
args = { "--tab-width", "2" },
},
prettier = {
args = { "--tab-width", "2" },
},
prettierd_f = {
command = "prettierd",
args = { "--tab-width", "4" },
stdin = true,
},
prettier_f = {
command = "prettier",
args = { "--tab-width", "4" },
stdin = true,
},
},
format_on_save = { timeout_ms = 5000, lsp_fallback = true },
},
init = function()
vim.o.formatexpr = "v:lua.require'conform'.formatexpr()"
end,
}
+43
View File
@@ -0,0 +1,43 @@
return {
{
"mfussenegger/nvim-dap",
config = function()
local dap = require("dap")
vim.keymap.set("n", "<F5>", dap.continue, opts)
vim.keymap.set("n", "<s-F5>", dap.stop, opts)
vim.keymap.set("n", "<F9>", dap.toggle_breakpoint, opts)
end,
},
{
"rcarriga/nvim-dap-ui",
dependencies = { "mfussenegger/nvim-dap", "nvim-neotest/nvim-nio" },
config = function()
local dap, dapui = require("dap"), require("dapui")
dapui.setup()
dap.listeners.before.attach.dapui_config = function()
dapui.open()
end
dap.listeners.before.launch.dapui_config = function()
dapui.open()
end
dap.listeners.before.event_terminated.dapui_config = function()
dapui.close()
end
dap.listeners.before.event_exited.dapui_config = function()
dapui.close()
end
end,
},
{
"mfussenegger/nvim-dap-python",
dependencies = {
"mfussenegger/nvim-dap",
},
config = function()
local python_utils = require("functions.python")
local python_path = python_utils.get_python_path()
require("dap-python").setup(python_path)
end,
},
}
@@ -0,0 +1,14 @@
return {
"tpope/vim-fugitive",
config = function()
vim.keymap.set("n", "<leader>p", function()
vim.cmd.Git("pull --rebase")
end, opts)
vim.keymap.set("n", "<leader>P", function()
vim.cmd.Git("push")
end, opts)
vim.keymap.set("n", "<leader>G", function()
vim.cmd.Git()
end, opts)
end,
}
+53
View File
@@ -0,0 +1,53 @@
return {
"akinsho/flutter-tools.nvim",
lazy = false,
dependencies = {
"nvim-lua/plenary.nvim",
"stevearc/dressing.nvim",
},
config = function()
require("flutter-tools").setup({
lsp = {
settings = {
showtodos = true,
completefunctioncalls = true,
analysisexcludedfolders = {
vim.fn.expand("$Home/.pub-cache"),
},
renamefileswithclasses = "prompt",
updateimportsonrename = true,
enablesnippets = false,
},
},
})
end,
}
-- return {
-- "akinsho/flutter-tools.nvim",
-- lazy = false,
-- dependencies = {
-- "nvim-lua/plenary.nvim",
-- "stevearc/dressing.nvim",
-- },
-- config = function()
-- require("flutter-tools").setup({
-- flutter_path = nil,
-- flutter_lookup_cmd = "asdf where flutter",
-- fvm = false,
-- widget_guides = { enabled = true },
-- lsp = {
-- settings = {
-- showtodos = true,
-- completefunctioncalls = true,
-- analysisexcludedfolders = {
-- vim.fn.expand("$Home/.pub-cache"),
-- },
-- renamefileswithclasses = "prompt",
-- updateimportsonrename = true,
-- enablesnippets = false,
-- },
-- },
-- })
-- end,
-- }
+56
View File
@@ -0,0 +1,56 @@
function number_switch(harpoon)
for i = 1, 9, 1 do
vim.keymap.set("n", "<leader>" .. i, function()
harpoon:list():select(i)
end)
end
end
return {
"ThePrimeagen/harpoon",
branch = "harpoon2",
dependencies = {
"nvim-lua/plenary.nvim",
},
opts = {
settings = {
save_on_toggle = false,
save_on_change = true,
excluded_filetypes = { "harpoon" },
},
menu = {
width = vim.api.nvim_win_get_width(0) - 4,
},
},
config = function()
local harpoon = require("harpoon")
harpoon:setup()
local harpoon_extensions = require("harpoon.extensions")
harpoon:extend(harpoon_extensions.builtins.highlight_current_file())
vim.keymap.set("n", "<leader>h", function()
harpoon.ui:toggle_quick_menu(harpoon:list())
end)
vim.keymap.set("n", "<leader>H", function()
harpoon:list():add()
end)
vim.keymap.set("n", "<leader>l", function()
harpoon:list():remove()
end)
vim.keymap.set("n", "<leader>L", function()
harpoon:list():clear()
end)
vim.keymap.set("n", "<M-h>", function()
harpoon:list():prev()
end)
vim.keymap.set("n", "<M-l>", function()
harpoon:list():next()
end)
number_switch(harpoon)
end,
}
+51
View File
@@ -0,0 +1,51 @@
return {
"neovim/nvim-lspconfig",
config = function()
vim.keymap.set("n", "gd", function()
vim.lsp.buf.definition()
end, opts)
vim.keymap.set("n", "gr", function()
vim.lsp.buf.references()
end, opts)
vim.keymap.set("n", "<C-i>", function()
vim.diagnostic.open_float()
end, opts)
vim.keymap.set("n", "K", function()
vim.lsp.buf.hover()
end, opts)
vim.keymap.set("n", "<leader>rn", vim.lsp.buf.rename, opts)
vim.keymap.set("n", "<leader>ca", vim.lsp.buf.code_action, opts)
vim.keymap.set("v", "<leader>ca", vim.lsp.buf.code_action, opts)
local python_utils = require("functions.python")
local python_path = python_utils.get_python_path()
vim.lsp.config("ruff", {
root_markers = { ".git" },
settings = { interpreter = python_path },
})
vim.lsp.enable("ruff")
vim.lsp.config("basedpyright", {
root_markers = { ".git" },
python = { pythonPath = python_path },
settings = {
basedpyright = {
analysis = {
typeCheckingMode = "standard",
diagnosticSeverityOverrides = {
reportUnusedImport = "none",
},
},
},
},
})
vim.lsp.enable("basedpyright")
vim.lsp.config("bashls", {
cmd = { "bash-language-server", "start" },
filetypes = { "bash", "sh" },
})
vim.lsp.enable("bashls")
end,
}
+7
View File
@@ -0,0 +1,7 @@
return {
"nvim-lualine/lualine.nvim",
dependencies = { "nvim-tree/nvim-web-devicons" },
config = function()
require("lualine").setup()
end,
}
+27
View File
@@ -0,0 +1,27 @@
return {
"nvim-neo-tree/neo-tree.nvim",
dependencies = {
"nvim-lua/plenary.nvim",
"nvim-tree/nvim-web-devicons",
"MunifTanjim/nui.nvim",
},
config = function()
local tree = require("neo-tree")
tree.setup({
document_symbols = {
custom_kinds = {},
},
window = {
width = 30,
mappings = {
["l"] = "open",
["h"] = "close_node",
["<Right>"] = "open",
["<Left>"] = "close_node",
},
},
})
vim.keymap.set("n", "<F2>", "<CMD>Neotree toggle<CR>")
end,
}
@@ -0,0 +1,5 @@
return {
"MeanderingProgrammer/render-markdown.nvim",
dependencies = { "nvim-treesitter/nvim-treesitter", "echasnovski/mini.nvim" },
opts = {},
}
+14
View File
@@ -0,0 +1,14 @@
return {
-- "crispgm/nvim-tabline",
-- config = true,
-- require("tabline").setup({
-- show_index = true,
-- show_modify = true,
-- show_icon = true,
-- fnamemodify = ":t",
-- modify_indicator = "*",
-- no_name = "Без вымени",
-- brackets = { "[", "]" },
-- inactive_tab_max_length = 0,
-- }),
}
+19
View File
@@ -0,0 +1,19 @@
return {
"nvim-telescope/telescope.nvim",
dependencies = {
"nvim-lua/plenary.nvim",
"gbprod/yanky.nvim",
},
config = function()
local builtin = require("telescope.builtin")
vim.keymap.set("n", "<leader>ff", builtin.find_files, opts)
vim.keymap.set("n", "<leader>fg", builtin.live_grep, opts)
vim.keymap.set("n", "<leader>fb", builtin.buffers, opts)
require("yanky").setup()
require("telescope").load_extension("yank_history")
vim.keymap.set("n", "<leader>fy", function()
vim.cmd.Telescope("yank_history")
end, opts)
end,
}
+26
View File
@@ -0,0 +1,26 @@
return {
"nvim-treesitter/nvim-treesitter",
config = function()
require("nvim-treesitter.configs").setup({
ensure_installed = {
"python",
"go",
"kotlin",
"dart",
"lua",
"bash",
"json",
"yaml",
"markdown",
},
sync_install = false,
auto_install = true,
highlight = {
enable = true,
additional_vim_regex_highlighting = false,
},
})
end,
}
+3
View File
@@ -0,0 +1,3 @@
return {
"lambdalisue/vim-suda",
}
+4
View File
@@ -0,0 +1,4 @@
- [ ] Add more VPNs to vpn-manager
- [ ] Don't request password when connecting to public network
- [ ] Add separator for power-menu?
+297
View File
@@ -0,0 +1,297 @@
// Configuration
configuration {
modi: "drun,run,filebrowser,window";
show-icons: true;
display-drun: " ";
display-run: " ";
display-filebrowser: " ";
display-window: " ";
drun-display-format: "{name}";
window-format: "{w} · {c} · {t}";
// binds
// kb-row-up: "Up,Control+k,Shift+Tab,Shift+ISO_Left_Tab";
// kb-row-down: "Down,Control+j";
}
// Global Properties
@import "./colors.rasi"
@import "./fonts.rasi"
* {
border-color: var(border);
handle-color: var(selected);
background-color: var(background);
foreground-color: var(foreground);
alternate-background: var(background-alt);
normal-background: var(background);
normal-foreground: var(foreground);
urgent-background: var(urgent);
urgent-foreground: var(background);
active-background: var(active);
active-foreground: var(sel-foreground);
selected-normal-background: var(selected);
selected-normal-foreground: var(sel-foreground);
selected-urgent-background: var(active);
selected-urgent-foreground: var(background);
selected-active-background: var(urgent);
selected-active-foreground: var(sel-foreground);
alternate-normal-background: var(background);
alternate-normal-foreground: var(foreground);
alternate-urgent-background: var(urgent);
alternate-urgent-foreground: var(background);
alternate-active-background: var(active);
alternate-active-foreground: var(background);
}
// Main Window
window {
// properties for window widget
transparency: "real";
location: center;
anchor: center;
fullscreen: false;
width: 440px;
x-offset: 0px;
y-offset: 0px;
// properties for all widgets
enabled: true;
margin: 0px;
padding: 0px;
border: 2px solid;
border-radius: 10px;
border-color: @border-color;
cursor: "default";
// Backgroud Colors
background-color: @background-color;
}
// Main Box
mainbox {
enabled: true;
spacing: 10px;
margin: 0px;
padding: 30px;
border: 0px solid;
border-radius: 15px;
border-color: @border-color;
background-color: transparent;
transparency : "real";
children: [ "inputbar", "message", "listview" ];
}
// Inputbar
inputbar {
enabled: true;
spacing: 10px;
margin: 0px;
padding: 0px;
border: 0px solid;
border-radius: 0px;
border-color: @border-color;
background-color: transparent;
text-color: @foreground-color;
children: [ "textbox-prompt-colon", "entry", "mode-switcher" ];
}
prompt {
enabled: true;
background-color: inherit;
text-color: inherit;
}
textbox-prompt-colon {
enabled: true;
padding: 5px 0px;
expand: false;
str: " ";
background-color: inherit;
text-color: inherit;
}
entry {
enabled: true;
padding: 5px 0px;
background-color: inherit;
text-color: inherit;
cursor: text;
placeholder: "Search...";
placeholder-color: inherit;
}
num-filtered-rows {
enabled: true;
expand: false;
background-color: inherit;
text-color: inherit;
}
textbox-num-sep {
enabled: true;
expand: false;
str: "/";
background-color: inherit;
text-color: inherit;
}
num-rows {
enabled: true;
expand: false;
background-color: inherit;
text-color: inherit;
}
case-indicator {
enabled: true;
background-color: inherit;
text-color: inherit;
}
// Listview
listview {
enabled: true;
columns: 1;
lines: 8;
cycle: true;
dynamic: true;
scrollbar: true;
layout: vertical;
reverse: false;
fixed-height: true;
fixed-columns: true;
spacing: 5px;
margin: 0px;
padding: 0px;
border: 0px solid;
border-radius: 0px;
border-color: @border-color;
background-color: transparent;
text-color: @foreground-color;
cursor: "default";
}
scrollbar {
handle-width: 6px;
handle-color: @handle-color;
border-radius: 10px;
background-color: @alternate-background;
}
// Elements
element {
enabled: true;
spacing: 10px;
margin: 0px;
padding: 5px 10px;
border: 0px solid;
border-radius: 10px;
border-color: @border-color;
background-color: transparent;
text-color: @foreground-color;
cursor: pointer;
}
element normal.normal {
background-color: transparent;
text-color: var(normal-foreground);
}
element normal.urgent {
background-color: var(urgent-background);
text-color: var(urgent-foreground);
}
element normal.active {
background-color: var(active-background);
text-color: var(active-foreground);
}
element selected.normal {
background-color: var(selected-normal-background);
text-color: var(selected-normal-foreground);
}
element selected.urgent {
background-color: var(selected-urgent-background);
text-color: var(selected-urgent-foreground);
}
element selected.active {
background-color: var(selected-active-background);
text-color: var(selected-active-foreground);
}
element alternate.normal {
background-color: transparent;
text-color: var(alternate-normal-foreground);
}
element alternate.urgent {
background-color: var(alternate-urgent-background);
text-color: var(alternate-urgent-foreground);
}
element alternate.active {
background-color: var(alternate-active-background);
text-color: var(alternate-active-foreground);
}
element-icon {
background-color: transparent;
text-color: inherit;
size: 24px;
cursor: inherit;
}
element-text {
background-color: transparent;
text-color: inherit;
highlight: inherit;
cursor: inherit;
vertical-align: 0.5;
horizontal-align: 0.0;
}
// Mode Switcher
mode-switcher{
enabled: true;
spacing: 10px;
margin: 0px;
padding: 0px;
border: 0px solid;
border-radius: 0px;
border-color: @border-color;
background-color: transparent;
text-color: @foreground-color;
}
button {
padding: 5px 10px;
border: 0px solid;
border-radius: 10px;
border-color: @border-color;
background-color: @alternate-background;
text-color: inherit;
cursor: pointer;
}
button selected {
background-color: var(selected-normal-background);
text-color: var(selected-normal-foreground);
}
// Message
message {
enabled: true;
margin: 0px;
padding: 0px;
border: 0px solid;
border-radius: 0px 0px 0px 0px;
border-color: @border-color;
background-color: transparent;
text-color: @foreground-color;
}
textbox {
padding: 8px 10px;
border: 0px solid;
border-radius: 10px;
border-color: @border-color;
background-color: @alternate-background;
text-color: @foreground-color;
vertical-align: 0.5;
horizontal-align: 0.0;
highlight: none;
placeholder-color: @foreground-color;
blink: true;
markup: true;
}
error-message {
padding: 10px;
border: 2px solid;
border-radius: 10px;
border-color: @border-color;
background-color: @background-color;
text-color: @foreground-color;
}
+22
View File
@@ -0,0 +1,22 @@
#!/usr/bin/env bash
tmp_dir="/tmp/cliphist"
rm -rf "$tmp_dir"
if [[ -n "$1" ]]; then
cliphist decode <<<"$1" | wl-copy
exit
fi
mkdir -p "$tmp_dir"
read -r -d '' prog <<EOF
/^[0-9]+\s<meta http-equiv=/ { next }
match(\$0, /^([0-9]+)\s(\[\[\s)?binary.*(jpg|jpeg|png|bmp)/, grp) {
system("echo " grp[1] "\\\\\t | cliphist decode >$tmp_dir/"grp[1]"."grp[3])
print \$0"\0icon\x1f$tmp_dir/"grp[1]"."grp[3]
next
}
1
EOF
cliphist list | gawk "$prog"
+10
View File
@@ -0,0 +1,10 @@
* {
background: #0E12196A;
sel-foreground: #111218;
background-alt: #282B3C00;
foreground: #DADAFF;
selected: #87B2F6;
active: #33CCFF;
urgent: #50FA7B;
border: #87B2F6;
}
+304
View File
@@ -0,0 +1,304 @@
// Configuration
configuration {
modi: "drun,run,filebrowser,window";
show-icons: false;
display-drun: " ";
display-run: " ";
display-filebrowser: " ";
display-window: " ";
drun-display-format: "{name}";
window-format: "{w} · {c} · {t}";
// binds
kb-row-up: "Up,Control+k,Shift+Tab,Shift+ISO_Left_Tab";
kb-row-down: "Down,Control+j";
kb-accept-entry: "Control+m,Return,KP_Enter";
terminal: "mate-terminal";
kb-remove-to-eol: "Control+Shift+e";
kb-mode-complete: "Control+Shift+t";
kb-mode-next: "Shift+Right,Control+Tab,Control+l";
kb-mode-previous: "Shift+Left,Control+Shift+Tab,Control+h";
kb-remove-char-back: "BackSpace";
}
// Global Properties
@import "./colors.rasi"
@import "./fonts.rasi"
* {
border-color: var(border);
handle-color: var(selected);
background-color: var(background);
foreground-color: var(foreground);
alternate-background: var(background-alt);
normal-background: var(background);
normal-foreground: var(foreground);
urgent-background: var(urgent);
urgent-foreground: var(background);
active-background: var(active);
active-foreground: var(sel-foreground);
selected-normal-background: var(selected);
selected-normal-foreground: var(sel-foreground);
selected-urgent-background: var(active);
selected-urgent-foreground: var(background);
selected-active-background: var(urgent);
selected-active-foreground: var(sel-foreground);
alternate-normal-background: var(background);
alternate-normal-foreground: var(foreground);
alternate-urgent-background: var(urgent);
alternate-urgent-foreground: var(background);
alternate-active-background: var(active);
alternate-active-foreground: var(background);
}
// Main Window
window {
// properties for window widget
transparency: "real";
location: center;
anchor: center;
fullscreen: false;
width: 400px;
x-offset: 0px;
y-offset: 0px;
// properties for all widgets
enabled: true;
margin: 0px;
padding: 0px;
border: 2px solid;
border-radius: 10px;
border-color: @border-color;
cursor: "default";
// Backgroud Colors
background-color: @background-color;
}
// Main Box
mainbox {
enabled: true;
spacing: 10px;
margin: 0px;
padding: 30px;
border: 0px solid;
border-radius: 15px;
border-color: @border-color;
background-color: transparent;
transparency: "real";
children: [ "inputbar", "message", "listview" ];
}
// Inputbar
inputbar {
enabled: true;
spacing: 10px;
margin: 0px;
padding: 0px;
border: 0px solid;
border-radius: 0px;
border-color: @border-color;
background-color: transparent;
text-color: @foreground-color;
children: [ "textbox-prompt-colon", "entry", "mode-switcher" ];
}
prompt {
enabled: true;
background-color: inherit;
text-color: inherit;
}
textbox-prompt-colon {
enabled: true;
padding: 5px 0px;
expand: false;
str: " ";
background-color: inherit;
text-color: inherit;
}
entry {
enabled: true;
padding: 5px 0px;
background-color: inherit;
text-color: inherit;
cursor: text;
placeholder: "Search...";
placeholder-color: inherit;
}
num-filtered-rows {
enabled: true;
expand: false;
background-color: inherit;
text-color: inherit;
}
textbox-num-sep {
enabled: true;
expand: false;
str: "/";
background-color: inherit;
text-color: inherit;
}
num-rows {
enabled: true;
expand: false;
background-color: inherit;
text-color: inherit;
}
case-indicator {
enabled: true;
background-color: inherit;
text-color: inherit;
}
// Listview
listview {
enabled: true;
columns: 1;
lines: 8;
cycle: true;
dynamic: true;
scrollbar: true;
layout: vertical;
reverse: false;
fixed-height: true;
fixed-columns: true;
spacing: 5px;
margin: 0px;
padding: 0px;
border: 0px solid;
border-radius: 0px;
border-color: @border-color;
background-color: transparent;
text-color: @foreground-color;
cursor: "default";
}
scrollbar {
handle-width: 6px;
handle-color: @handle-color;
border-radius: 10px;
background-color: @alternate-background;
}
// Elements
element {
enabled: true;
spacing: 10px;
margin: 0px;
padding: 5px 10px;
border: 0px solid;
border-radius: 10px;
border-color: @border-color;
background-color: transparent;
text-color: @foreground-color;
cursor: pointer;
}
element normal.normal {
background-color: transparent;
text-color: var(normal-foreground);
}
element normal.urgent {
background-color: var(urgent-background);
text-color: var(urgent-foreground);
}
element normal.active {
background-color: var(active-background);
text-color: var(active-foreground);
}
element selected.normal {
background-color: var(selected-normal-background);
text-color: var(selected-normal-foreground);
}
element selected.urgent {
background-color: var(selected-urgent-background);
text-color: var(selected-urgent-foreground);
}
element selected.active {
background-color: var(selected-active-background);
text-color: var(selected-active-foreground);
}
element alternate.normal {
background-color: transparent;
text-color: var(alternate-normal-foreground);
}
element alternate.urgent {
background-color: var(alternate-urgent-background);
text-color: var(alternate-urgent-foreground);
}
element alternate.active {
background-color: var(alternate-active-background);
text-color: var(alternate-active-foreground);
}
element-icon {
background-color: transparent;
text-color: inherit;
size: 24px;
cursor: inherit;
}
element-text {
background-color: transparent;
text-color: inherit;
highlight: inherit;
cursor: inherit;
vertical-align: 0.5;
horizontal-align: 0.0;
}
// Mode Switcher
mode-switcher{
enabled: true;
spacing: 10px;
margin: 0px;
padding: 0px;
border: 0px solid;
border-radius: 0px;
border-color: @border-color;
background-color: transparent;
text-color: @foreground-color;
}
button {
padding: 5px 10px;
border: 0px solid;
border-radius: 10px;
border-color: @border-color;
background-color: @alternate-background;
text-color: inherit;
cursor: pointer;
}
button selected {
background-color: var(selected-normal-background);
text-color: var(selected-normal-foreground);
}
// Message
message {
enabled: true;
margin: 0px;
padding: 0px;
border: 0px solid;
border-radius: 0px 0px 0px 0px;
border-color: @border-color;
background-color: transparent;
text-color: @foreground-color;
}
textbox {
padding: 8px 10px;
border: 0px solid;
border-radius: 10px;
border-color: @border-color;
background-color: @alternate-background;
text-color: @foreground-color;
vertical-align: 0.5;
horizontal-align: 0.0;
highlight: none;
placeholder-color: @foreground-color;
blink: true;
markup: true;
}
error-message {
padding: 10px;
border: 2px solid;
border-radius: 10px;
border-color: @border-color;
background-color: @background-color;
text-color: @foreground-color;
}
+3
View File
@@ -0,0 +1,3 @@
* {
font: "JetBrains Mono Nerd Font 13";
}
+127
View File
@@ -0,0 +1,127 @@
#!/bin/bash
SIGNAL_ICONS=("󰤟 " "󰤢 " "󰤥 " "󰤨 ")
SECURED_SIGNAL_ICONS=("󰤡 " "󰤤 " "󰤧 " "󰤪 ")
get_signal_icon() {
local signal_icon
local signal="$1"
local security="$2"
local signal_level=$((signal / 25))
if [[ $signal_level > 3 ]]; then
signal_level=3
fi
if [[ "$signal_level" -lt "${#SIGNAL_ICONS[@]}" ]]; then
signal_icon="${SIGNAL_ICONS[$signal_level]}"
fi
if [[ "$security" =~ WPA || "$security" =~ WEP ]]; then
signal_icon="${SECURED_SIGNAL_ICONS[$signal_level]}"
fi
echo "$signal_icon"
}
main_menu_options() {
local wifi_device=$(nmcli d | grep "wifi " | sed "s/ .*//")
if [ $wifi_device == ""]; then
echo "󰖪 No wifi device available"
else
local ssid=$(nmcli -t -f GENERAL device show "$wifi_device" | grep CONNECTION | cut -d: -f2)
local signal=$(nmcli -t -f GENERAL device show "$wifi_device" | grep STATE | cut -d: -f2 | sed "s/ .*//")
local security=$(nmcli connection show "$ssid" | grep "key-mgmt" | cut -d: -f2 | tr a-z A-Z)
local signal_icon=$(get_signal_icon $signal "$security")
if [ ! -z "$ssid" ]; then
echo -en "\0active\x1f0\n"
echo "$signal_icon$ssid"
fi
echo " Rescan"
fi
}
list_wifi() {
local ssids=()
local formatted_list=()
local active_ssid=""
local wifi_device=$(nmcli d | grep "wifi " | sed "s/ .*//")
local counter=0
local active_options=""
while IFS=: read -r in_use signal security ssid; do
if [ -z "$ssid" ]; then continue; fi # Пропускаем сети без SSID
local signal_icon=$(get_signal_icon $signal $security)
# Добавляем иконку подключения, если сеть активна
local formatted="$signal_icon$ssid"
if [[ "$in_use" =~ \* ]]; then
active_ssid="$ssid"
active_options+="-a $counter"
fi
ssids+=("$ssid")
formatted_ssids+="$formatted\n"
let counter++
done <<<"$(nmcli -t -f IN-USE,SIGNAL,SECURITY,SSID dev wifi)"
local chosen_option=$(echo -e "$formatted_ssids" | rofi -dmenu -i $active_options -selected-row 1 -p "Wi-Fi SSID: ")
manage_wifi "$chosen_option"
}
manage_wifi() {
local wifi_device=$(nmcli d | grep "wifi " | sed "s/ .*//")
local chosen_option="$1"
if [ -z "$chosen_option" ]; then
return
else
# Удаляем значки уровня сигнала, если есть
local chosen_id=$chosen_option
for icon in "${SIGNAL_ICONS[@]}"; do
chosen_id=$(echo "$chosen_id" | sed "s/$icon//")
done
for icon in "${SECURED_SIGNAL_ICONS[@]}"; do
chosen_id=$(echo "$chosen_id" | sed "s/$icon//")
done
# Проверяем состояние выбранной сети
local active_ssid=$(nmcli -t -f GENERAL device show $wifi_device | grep CONNECTION | cut -d: -f2)
# Определяем действие в зависимости от состояния сети
local action
if [[ "$chosen_id" == "$active_ssid" ]]; then
action=" Disconnect"
else
action="󰸋 Connect"
fi
action=$(echo -e "$action\n Forget" | rofi -dmenu -p "Action: " -mesg "$chosen_option" -theme-str 'inputbar {enabled: false;} window {height: 200px;}')
case $action in
"󰸋 Connect")
local saved_connections=$(nmcli -g NAME connection show)
if [[ $(echo "$saved_connections" | grep -Fx "$chosen_id") ]]; then
nmcli connection up id "$chosen_id" | grep "successfully" && notify-send "Connected" "$chosen_id"
else
local wifi_password=$(rofi -dmenu -p "Password: " -password -theme-str 'window {height: 110px;} entry {placeholder: "Password:";} textbox-prompt-colon {enabled: false;}')
nmcli device wifi connect "$chosen_id" password "$wifi_password" | grep "successfully" && notify-send "Connected" "$chosen_id"
fi
;;
" Disconnect")
nmcli device disconnect $wifi_device && notify-send "Disconnected" "$chosen_id"
;;
" Forget")
nmcli connection delete id "$chosen_id" && notify-send "Forgotten" "$chosen_id"
;;
esac
fi
}
if [ -z "$@" ]; then
main_menu_options
elif [ "$@" == " Rescan" ]; then
notify-send "Scaning Networks" "Please wait"
dir=$(dirname "$0")
coproc (list_wifi)
elif [ "$@" == "󰖪 No wifi device available" ]; then
:
else
dir=$(dirname "$0")
coproc (manage_wifi "$@")
fi
+3
View File
@@ -0,0 +1,3 @@
#!/bin/bash
dir=$(dirname "$0")
rofi -combi-mody " "," " -modi " ":$dir/network-manager.sh," ":$dir/vpn-manager.sh -show " "
+3
View File
@@ -0,0 +1,3 @@
#!/bin/bash
dir=$(dirname "$0")
rofi -modi " ":$dir/vpn-manager.sh -show " "
+93
View File
@@ -0,0 +1,93 @@
#!/bin/bash
# Checking if programms are available
case x"$@" in
x" Stop wireguard")
coproc (wg-quick down wg0 >/dev/null 2>&1) &
exit 0
;;
x" Start wireguard")
coproc (wg-quick up wg0 >/dev/null 2>&1) &
exit 0
;;
x" Stop netbird")
coproc (netbird down >/dev/null 2>&1) &
exit 0
;;
x" Start netbird")
coproc (netbird up >/dev/null 2>&1) &
exit 0
;;
x" Stop sing-box")
coproc (sudo systemctl stop sing-box >/dev/null 2>&1) &
exit 0
;;
x" Start sing-box")
coproc (sudo systemctl start sing-box >/dev/null 2>&1) &
exit 0
;;
esac
# Checking if programms are installed
wireguard_installed=true
if ! command -v wg-quick >/dev/null 2>&1; then
wireguard_installed=false
else
wireguard_installed=true
fi
netbird_installed=true
if ! command -v netbird >/dev/null 2>&1; then
netbird_installed=false
else
netbird_installed=true
fi
sing_box_installed=true
if ! systemctl list-unit-files -q sing-box.service >/dev/null 2>&1; then
sing_box_installed=false
else
sing_box_installed=true
fi
# active param
active="\0active\x1f"
# netbird
if $wireguard_installed; then
wireguard_status=$(sudo wg show interfaces)
if [ "$wireguard_status" != "wg0" ]; then
echo " Start wireguard"
else
active+="0"
echo " Stop wireguard"
fi
else
echo " Wireguard not installed"
fi
# netbird
if $netbird_installed; then
netbird_status=$(netbird status | grep "Networks" | cut -d: -f2 | sed "s/ -//")
if [ -z "$netbird_status" ]; then
echo " Start netbird"
else
active+="1"
echo " Stop netbird"
fi
else
echo " Netbird not installed"
fi
# sing-box
if $sing_box_installed; then
if systemctl status sing-box >/dev/null 2>&1; then
active+="2"
echo " Stop sing-box"
else
echo " Start sing-box"
fi
else
echo " Sing-box not installed"
fi
echo -en "$active\n"
+41
View File
@@ -0,0 +1,41 @@
#!/usr/bin/bash
menu_content() {
echo -en "\0message\x1f Power menu\n"
echo "󰌾 Lock session"
echo "󰒲 Sleep"
echo " Shutdown"
echo " Reboot"
echo "󰜺 Cancel"
}
handle_selection() {
case x"$@" in
x"󰌾 Lock session")
coproc ($HOME/.config/hypr/scripts/hyprlock.sh >/dev/null 2>&1)
;;
x"󰒲 Sleep")
systemctl sleep
;;
x" Shutdown")
shutdown now
;;
x" Reboot")
reboot
;;
x"󰜺 Cancel")
exit 0
;;
esac
}
if [ -n "$ROFI_RETV" ]; then
# ROFI_RETV=0 - show menu, ROFI_RETV=1 - selection made
if [ "$ROFI_RETV" -eq 0 ]; then
menu_content
elif [ "$ROFI_RETV" -eq 1 ]; then
handle_selection "$1"
fi
else
rofi -show quit -modi "quit:$0" -theme-str "inputbar {enabled: false;} window {height: 310px;}"
fi
+9
View File
@@ -0,0 +1,9 @@
# rofi.kb-row-up: Up,Control+k,Shift+Tab,Shift+ISO_Left_Tab
# rofi.kb-row-down: Down,Control+j
rofi.kb-accept-entry: Control+m,Return,KP_Enter
rofi.terminal: mate-terminal
rofi.kb-remove-to-eol: Control+Shift+e
rofi.kb-mode-complete: Control+Shift+t
rofi.kb-mode-next: Shift+Right,Control+Tab,Control+l
rofi.kb-mode-previous: Shift+Left,Control+Shift+Tab,Control+h
rofi.kb-remove-char-back: BackSpace
+23
View File
@@ -0,0 +1,23 @@
{
"position": "bottom",
"layer": "top",
"modules-left": ["group/workspaces-group", "custom/media"],
"modules-center": [],
"modules-right": [
"tray",
"group/pulseaudio-group",
"group/network-group",
"group/power-group",
"clock",
],
"include": [
"~/.config/waybar/modules/workspaces.jsonc",
"~/.config/waybar/modules/network.jsonc",
"~/.config/waybar/modules/tray.jsonc",
"~/.config/waybar/modules/pulseaudio.jsonc",
"~/.config/waybar/modules/power.jsonc",
"~/.config/waybar/modules/mediaplayer.jsonc",
"~/.config/waybar/modules/language.jsonc",
"~/.config/waybar/modules/clock.jsonc",
],
}
+130
View File
@@ -0,0 +1,130 @@
#!/usr/bin/env python3
from gi.repository import Playerctl, GLib
import argparse
import logging
import sys
import signal
import gi
import json
gi.require_version('Playerctl', '2.0')
logger = logging.getLogger(__name__)
def write_output(text, player):
logger.info('Writing output')
output = {'text': text,
'class': 'custom-' + player.props.player_name,
'alt': player.props.player_name}
sys.stdout.write(json.dumps(output) + '\n')
sys.stdout.flush()
def on_play(player, status, manager):
logger.info('Received new playback status')
on_metadata(player, player.props.metadata, manager)
def on_metadata(player, metadata, manager):
logger.info('Received new metadata')
track_info = ''
if player.props.player_name == 'spotify' and \
'mpris:trackid' in metadata.keys() and \
':ad:' in player.props.metadata['mpris:trackid']:
track_info = 'AD PLAYING'
elif player.get_artist() != '' and player.get_title() != '':
track_info = '{artist} - {title}'.format(artist=player.get_artist(),
title=player.get_title())
else:
track_info = player.get_title()
if player.props.status != 'Playing' and track_info:
track_info = '' + track_info
write_output(track_info, player)
def on_player_appeared(manager, player, selected_player=None):
if player is not None and (selected_player is None or player.name == selected_player):
init_player(manager, player)
else:
logger.debug(
"New player appeared, but it's not the selected player, skipping")
def on_player_vanished(manager, player):
logger.info('Player has vanished')
sys.stdout.write('\n')
sys.stdout.flush()
def init_player(manager, name):
logger.debug('Initialize player: {player}'.format(player=name.name))
player = Playerctl.Player.new_from_name(name)
player.connect('playback-status', on_play, manager)
player.connect('metadata', on_metadata, manager)
manager.manage_player(player)
on_metadata(player, player.props.metadata, manager)
def signal_handler(sig, frame):
logger.debug('Received signal to stop, exiting')
sys.stdout.write('\n')
sys.stdout.flush()
# loop.quit()
sys.exit(0)
def parse_arguments():
parser = argparse.ArgumentParser()
# Increase verbosity with every occurrence of -v
parser.add_argument('-v', '--verbose', action='count', default=0)
# Define for which player we're listening
parser.add_argument('--player')
return parser.parse_args()
def main():
arguments = parse_arguments()
# Initialize logging
logging.basicConfig(stream=sys.stderr, level=logging.DEBUG,
format='%(name)s %(levelname)s %(message)s')
# Logging is set by default to WARN and higher.
# With every occurrence of -v it's lowered by one
logger.setLevel(max((3 - arguments.verbose) * 10, 0))
# Log the sent command line arguments
logger.debug('Arguments received {}'.format(vars(arguments)))
manager = Playerctl.PlayerManager()
loop = GLib.MainLoop()
manager.connect('name-appeared',
lambda *args: on_player_appeared(*args, arguments.player))
manager.connect('player-vanished', on_player_vanished)
signal.signal(signal.SIGINT, signal_handler)
signal.signal(signal.SIGTERM, signal_handler)
signal.signal(signal.SIGPIPE, signal.SIG_DFL)
for player in manager.props.player_names:
if arguments.player is not None and arguments.player != player.name:
logger.debug('{player} is not the filtered player, skipping it'
.format(player=player.name)
)
continue
init_player(manager, player)
loop.run()
if __name__ == '__main__':
main()

Some files were not shown because too many files have changed in this diff Show More