Initial commit

This commit is contained in:
2025-10-14 19:12:58 +03:00
commit 03a71a5e16
83 changed files with 2457 additions and 0 deletions

2
dot_bash_profile Normal file
View File

@ -0,0 +1,2 @@
. ~/.bashrc

22
dot_bashrc Normal file
View File

@ -0,0 +1,22 @@
export EDITOR=nvim
alias aliasd='alias |diff -u ~/.bashrc -'
alias aliasr='unalias -a; . ~/.bashrc'
alias aliass='alias > ~/.bashrc'
alias author-to-beesquit='git-replace-author.sh Beesquit sealreb@gmail.com'
alias beesquit-local-git-config='local-beesquit.sh'
alias cdp='cd /home/eugenebee/Programming'
alias cds='cd /home/eugenebee/services'
alias cfghypr='nvim ~/.config/hypr'
alias cfgkitty='nvim ~/.config/kitty'
alias cfgnvim='nvim ~/.config/nvim'
alias cfgrofi='nvim ~/.config/rofi'
alias cfgwaybar='nvim ~/.config/waybar'
alias edit-in-kitty='kitten edit-in-kitty'
alias ff='fastfetch'
alias ks='ls'
alias l='ls'
alias ll='ls -lah'
alias mm='unimatrix -f -a -s 92 -l coo -c yellow'
alias py='python'
alias pyv='python --version'

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 286 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 MiB

View File

@ -0,0 +1,15 @@
# See https://wiki.hyprland.org/Configuring/Keywords/ for more
# Execute your favorite apps at launch
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 -- swww-daemon
exec-once = uwsm app -- waybar
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 -- dunst
exec-once = uwsm app -- systemd-inhibit --who="Hyprland config" --why="wlogout keybind" --what=handle-power-key --mode=block sleep infinity

View File

@ -0,0 +1,121 @@
# See https://wiki.hyprland.org/Configuring/Keywords/ for more
$mainMod = SUPER
# Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more
bind = $mainMod, Q, exec, kitty
bind = $mainMod, C, killactive,
bind = $mainMod, M, exit,
bind = $mainMod, E, exec, dolphin
bind = $mainMod SHIFT, V, togglefloating,
bind = $mainMod, R, exec, rofi -show drun
bind = $mainMod, P, pseudo, # dwindle
bind = $mainMod, T, togglesplit, # dwindle
bind = $mainMod, F, fullscreen, 1
bind = $mainMod SHIFT, F, fullscreen, 0
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, grim -g "$(slurp)" - | wl-copy
bind = , PRINT, exec, grim - | wl-copy
bind = CONTROL, ESCAPE, exec, kitty btop
# bind = ALT_L, SHIFT_L, exec, hyprctl switchxkblayout current next
# 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, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+ -l 1.0; .config/hypr/scripts/dunst/volume.sh
binde = , XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%- -l 0.0; .config/hypr/scripts/dunst/volume.sh
bind = , XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle; .config/hypr/scripts/dunst/volumemute.sh
bind = , XF86AudioMicMute, exec, wpctl set-mute @DEFAULT_AUDIO_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
# brightness binds
bind = , XF86KbdBrightnessUp, exec, brightnessctl --device='asus::kbd_backlight' set 1+
bind = , XF86KbdBrightnessDown, exec, brightnessctl --device='asus::kbd_backlight' set 1-
binde = , XF86MonBrightnessUp , exec, brightnessctl --class='backlight' set 5%+; .config/hypr/scripts/dunst/eDP-1brightness.sh
binde = , XF86MonBrightnessDown , exec, brightnessctl --class='backlight' set 5%-; .config/hypr/scripts/dunst/eDP-1brightness.sh
bind = $mainMod ALT, up, exec, ddcutil -d 1 setvcp 10 + 5; .config/hypr/scripts/dunst/brightness.sh
bind = $mainMod ALT, down, exec, ddcutil -d 1 setvcp 10 - 5; .config/hypr/scripts/dunst/brightness.sh
# asus binds
bind = , XF86Launch1 , exec, asusctl profile -P quiet
# 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, 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 SHIFT, mouse:272, resizewindow
bindm = $mainMod, mouse:273, 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

View File

@ -0,0 +1,4 @@
# See https://wiki.hyprland.org/Configuring/Monitors/
#monitor = eDP-1, 1920x1080@120, auto, 1, vrr, 1
monitor = , prefered, auto, 1

View File

@ -0,0 +1,3 @@
general {
before_sleep_cmd = $HOME/.config/hypr/scripts/before-sleep.sh # command run before sleep
ignore_dbus_inhibit = false # whether to ignore dbus-sent idle-inhibit requests (used by e.g. firefox or steam) }

View File

@ -0,0 +1,126 @@
# Some default env vars.
env = GTK_THEME,Colloid-Transparent-Dracula
env = QT_QPA_PLATFORM,wayland;xcb
# env = QT_QPA_PLATFORMTHEME,qt6ct,*
env = XDG_CURRENT_DESKTOP,Hyprland
env = XDG_SESSION_TYPE,wayland
env = XDG_SESSION_DESKTOP,Hyprland
env = GDK_BACKEND,wayland,x11,*
env = XCURSOR_SIZE,24
exec = gsettings set org.gnome.desktop.interface color-scheme "prefer-dark"
exec = gsettings set org.gnome.desktop.interface gtk-theme "adw-gtk3-dark"
env = QT_QPA_PLATFORMTHEME,kde
ecosystem {
no_update_news = true
}
misc {
disable_hyprland_logo = true
}
# For all categories, see https://wiki.hyprland.org/Configuring/Variables/
input {
kb_layout = us, ru
kb_variant =
kb_model =
kb_options = grp:alt_shift_toggle
kb_rules =
follow_mouse = 1
touchpad {
natural_scroll = yes
scroll_factor = 0.5
}
sensitivity = -0.4 # -1.0 - 1.0, 0 means no modification.
force_no_accel = 0
}
general {
# See https://wiki.hyprland.org/Configuring/Variables/ for more
gaps_in = 3
gaps_out = 5
border_size = 2
col.active_border = rgba(33ccffee) rgba(bd93f9ee) 45deg
col.inactive_border = rgba(595959aa)
layout = dwindle
}
decoration {
# See https://wiki.hyprland.org/Configuring/Variables/ for more
rounding = 10
blur {
brightness = 0.7
contrast = 0.75
enabled = true
size = 3
passes = 2
ignore_opacity = true
}
}
animations {
enabled = yes
# Some default animations, see https://wiki.hyprland.org/Configuring/Animations/ for more
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
}
dwindle {
# See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more
pseudotile = yes # master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below
preserve_split = yes # you probably want this
}
gestures {
# See https://wiki.hyprland.org/Configuring/Variables/ for more
# Example (cool, but i don't know, what useful things i can do with that)
# gesture = 3, left, dispatcher, focusworkspaceoncurrentmonitor, r+1
gesture = 3, horizontal, workspace
}
# Example per-device config
# See https://wiki.hyprland.org/Configuring/Keywords/#executing for more
device {
name = epic-mouse-v1
sensitivity = -0.5
}
group {
col.border_active = rgba(33ccffee) rgba(bd93f9ee) 45deg
groupbar {
gradients = false
col.active = rgba(33ccffee)
render_titles = false
}
}
# See https://wiki.hyprland.org/Configuring/Window-Rules/ for more
windowrulev2 = float, center, class:^(xfce-polkit)$
windowrulev2 = float, center, class:^(file-roller)$
#windowrulev2 = minsize 1 1, title:^()$,class:^(OrcaSlicer)$
#windowrulev2 = minsize 1 1, title:^()$,class:^(steam)$
layerrule = blur, rofi
layerrule = ignorealpha, rofi
layerrule = blur, notifications
layerrule = ignorealpha, notifications
layerrule = blur, waybar
layerrule = ignorealpha, waybar
source = ~/.config/hypr/config/*

View File

@ -0,0 +1,53 @@
general {
fail_timeout = 300
}
background {
# all these options are taken from hyprland, see https://wiki.hyprland.org/Configuring/Variables/#blur for explanations
path = $HOME/.config/hypr/Wallpaper/pink.png # only png supported for now
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 = 2
dots_size = 0.2 # Scale of input-field height, 0.2 - 0.8
dots_spacing = 0.2 # Scale of dots' absolute size, 0.0 - 1.0
dots_center = true
outer_color = rgba(51, 204, 255, 0.93)
inner_color = rgba(10, 0, 30, 1)
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
}

View 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()

View 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

View 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()

View 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 //')"

View 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%"

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%"

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

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="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

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

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

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

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

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

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

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

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

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

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"

View 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%"

View 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

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

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

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

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

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

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

View File

@ -0,0 +1,96 @@
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
# 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
# {{{ Keybindings
map kitty_mod+t new_tab_with_cwd
# map ctrl+shift+z paste [\x1bctrlback]
# }}
# BEGIN_KITTY_THEME
# Catppuccin-Mocha
include current-theme.conf
# END_KITTY_THEME

4
dot_config/nvim/init.lua Normal file
View File

@ -0,0 +1,4 @@
require("config.lazy")
require("config.config")
require("config.options")
require("config.key_binds")

View File

@ -0,0 +1,29 @@
{
"Comment.nvim": { "branch": "master", "commit": "e30b7f2008e52442154b66f7c519bfd2f1e32acb" },
"catppuccin": { "branch": "main", "commit": "c89184526212e04feffbddda9d06b041a8fca416" },
"cmp-buffer": { "branch": "main", "commit": "b74fab3656eea9de20a9b8116afa3cfc4ec09657" },
"cmp-nvim-lsp": { "branch": "main", "commit": "bd5a7d6db125d4654b50eeae9f5217f24bb22fd3" },
"conform.nvim": { "branch": "master", "commit": "9d6f881a4047a51c7709223dcf24e967633c6523" },
"harpoon": { "branch": "master", "commit": "1bc17e3e42ea3c46b33c0bbad6a880792692a1b3" },
"indent-blankline.nvim": { "branch": "master", "commit": "005b56001b2cb30bfa61b7986bc50657816ba4ba" },
"lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" },
"lualine.nvim": { "branch": "master", "commit": "b8c23159c0161f4b89196f74ee3a6d02cdc3a955" },
"mini.nvim": { "branch": "main", "commit": "126ce3328c78399dcff58272f6f540a373b62a75" },
"neo-tree.nvim": { "branch": "main", "commit": "9130e58424ad95bf2dd8b40afbb8cf04d648638c" },
"nui.nvim": { "branch": "main", "commit": "de740991c12411b663994b2860f1a4fd0937c130" },
"nvim-autopairs": { "branch": "master", "commit": "23320e75953ac82e559c610bec5a90d9c6dfa743" },
"nvim-cmp": { "branch": "main", "commit": "b5311ab3ed9c846b585c0c15b7559be131ec4be9" },
"nvim-dap": { "branch": "master", "commit": "7367cec8e8f7a0b1e4566af9a7ef5959d11206a7" },
"nvim-dap-python": { "branch": "master", "commit": "bfe572e4458e0ac876b9539a1e9f301c72db8ea0" },
"nvim-dap-ui": { "branch": "master", "commit": "cf91d5e2d07c72903d052f5207511bf7ecdb7122" },
"nvim-lspconfig": { "branch": "master", "commit": "db8fef885009fdec0daeff3e5dda92e1f539611e" },
"nvim-nio": { "branch": "master", "commit": "21f5324bfac14e22ba26553caf69ec76ae8a7662" },
"nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" },
"nvim-web-devicons": { "branch": "master", "commit": "b8221e42cf7287c4dcde81f232f58d7b947c210d" },
"plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" },
"render-markdown.nvim": { "branch": "main", "commit": "06c7598471911742e8816617a2afb9b2f29a808d" },
"telescope.nvim": { "branch": "master", "commit": "b4da76be54691e854d3e0e02c36b0245f945c2c7" },
"vim-fugitive": { "branch": "master", "commit": "61b51c09b7c9ce04e821f6cf76ea4f6f903e3cf4" },
"vim-suda": { "branch": "master", "commit": "9adda7d195222d4e2854efb2a88005a120296c47" },
"yanky.nvim": { "branch": "main", "commit": "04775cc6e10ef038c397c407bc17f00a2f52b378" }
}

View File

@ -0,0 +1,13 @@
do
local neovim_options = {
expandtab = true,
number = true,
shiftwidth = 2,
tabstop = 2,
termguicolors = true,
}
for k, v in pairs(neovim_options) do
vim.opt[k] = v
end
end

View File

@ -0,0 +1,16 @@
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>
]])

View File

@ -0,0 +1,35 @@
-- 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)
-- Make sure to setup `mapleader` and `maplocalleader` before
-- loading lazy.nvim so that mappings are correct.
-- This is also a good place to setup other settings (vim.opt)
vim.g.mapleader = " "
vim.g.maplocalleader = "\\"
-- Setup lazy.nvim
require("lazy").setup({
spec = {
-- import your plugins
{ import = "plugins" },
},
-- Configure any other settings here. See the documentation for more details.
-- colorscheme that will be used when installing plugins.
install = { colorscheme = { "habamax" } },
-- automatically check for plugin updates
checker = { enabled = false },
})

View File

@ -0,0 +1,8 @@
vim.opt.clipboard = "unnamedplus"
vim.opt.fixeol = true
vim.opt.list = true
vim.opt.listchars = {
trail = "·",
tab = " ",
}

View File

@ -0,0 +1,47 @@
-- 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
-- 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

View File

@ -0,0 +1,7 @@
return {
"windwp/nvim-autopairs",
event = "InsertEnter",
config = function()
require("nvim-autopairs").setup({})
end,
}

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,
}

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,
}

View File

@ -0,0 +1,34 @@
-- completion engine plugin for neovim
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,
}

View File

@ -0,0 +1,9 @@
return {
"numToStr/Comment.nvim",
config = function()
local comment = require("Comment")
comment.setup({
opleader = { line = "|" },
})
end,
}

View File

@ -0,0 +1,54 @@
return {
"stevearc/conform.nvim",
event = { "BufWritePre" },
cmd = { "ConformInfo" },
keys = {
{
-- Customize or remove this keymap to your liking
"<leader>F",
function()
require("conform").format({ async = true, lsp_fallback = true })
end,
mode = "",
desc = "Format buffer",
},
},
-- Everything in opts will be passed to setup()
opts = {
-- Define your formatters
formatters_by_ft = {
lua = { "stylua" },
python = { "ruff_organize_imports_only" },
javascript = { "prettierd", "prettier", stop_after_first = true },
sh = { "shfmt" },
json = { "prettierd", "prettier", stop_after_first = true },
jsonc = { "prettierd", "prettier", stop_after_first = true },
css = { "prettierd", "prettier", stop_after_first = true },
html = { "prettierd", "prettier", stop_after_first = true },
-- go = { "goimports", "gofmt" },
-- typescript = { "prettierd", "prettier", stop_after_first = true },
},
-- Custom formatters
formatters = {
ruff_organize_imports_only = {
command = "ruff",
args = {
"check",
"--select",
"I001",
"--fix",
"--stdin-filename",
"$FILENAME",
"-",
},
stdin = true,
},
},
-- Set up format-on-save
format_on_save = { timeout_ms = 500, lsp_fallback = true },
},
init = function()
-- If you want the formatexpr, here is the place to set it
vim.o.formatexpr = "v:lua.require'conform'.formatexpr()"
end,
}

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,
},
}

View File

@ -0,0 +1,19 @@
return {
"ThePrimeagen/harpoon",
branch = "harpoon2",
dependencies = {
"nvim-lua/plenary.nvim",
},
config = function()
-- local harpoon = require("harpoon")
-- harpoon.setup({
-- save_on_toggle = false,
-- save_on_change = true,
-- enter_on_sendcmd = false,
-- tmux_autoclose_windows = false,
-- excluded_filetypes = { "harpoon" },
-- mark_branch = false,
-- })
-- require("harpoon"):setup()
end,
}

View File

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

View File

@ -0,0 +1,44 @@
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", {
settings = { interpreter = python_path },
})
vim.lsp.enable("ruff")
vim.lsp.config("basedpyright", {
settings = {
python = { pythonPath = python_path },
basedpyright = {
analysis = {
typeCheckingMode = "strict",
},
},
},
})
vim.lsp.enable("basedpyright")
vim.lsp.config("bashls", {
cmd = { "bash-language-server", "start" },
filetypes = { "bash", "sh" },
})
vim.lsp.enable("bashls")
end,
}

View File

@ -0,0 +1,7 @@
return {
"nvim-lualine/lualine.nvim",
dependencies = { "nvim-tree/nvim-web-devicons" },
config = function()
require("lualine").setup()
end,
}

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,
}

View File

@ -0,0 +1,5 @@
return {
"MeanderingProgrammer/render-markdown.nvim",
dependencies = { "nvim-treesitter/nvim-treesitter", "echasnovski/mini.nvim" },
opts = {},
}

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,
}

View File

@ -0,0 +1,22 @@
return {
"nvim-treesitter/nvim-treesitter",
config = function()
require("nvim-treesitter.configs").setup({
ensure_installed = {
"lua",
"python",
"yaml",
"markdown",
"bash",
},
sync_install = false,
auto_install = true,
highlight = {
enable = true,
additional_vim_regex_highlighting = false,
},
})
end,
}

View File

@ -0,0 +1,3 @@
return {
"lambdalisue/vim-suda",
}

View File

@ -0,0 +1,303 @@
/**
*
* Author : Aditya Shakya (adi1090x)
* Github : @adi1090x
*
* Rofi Theme File
* Rofi Version: 1.7.3
**/
/*****----- 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}";
}
/*****----- 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;
}

View File

@ -0,0 +1,17 @@
/**
*
* Author : Levi Lacoss (fishyfishfish55)
* Github : @fishyfishfish55
**/
* {
background: #0E12196A;
sel-foreground: #111218;
background-alt: #282B3C00;
foreground: #DADAFF;
selected: #87B2F6;
active: #33CCFF;
urgent: #50FA7B;
border: #87B2F6;
}

312
dot_config/rofi/config.rasi Normal file
View File

@ -0,0 +1,312 @@
/**
*
* Author : Aditya Shakya (adi1090x)
* Github : @adi1090x
*
* Rofi Theme File
* Rofi Version: 1.7.3
**/
/*****----- 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}";
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-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;
}

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"

View File

@ -0,0 +1,12 @@
/**
*
* Author : Aditya Shakya (adi1090x)
* Github : @adi1090x
*
* Fonts
*
**/
* {
font: "JetBrains Mono Nerd Font 13";
}

8
dot_config/rofi/rofi.cfg Normal file
View File

@ -0,0 +1,8 @@
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-next: Shift+Right,Control+Tab,Control+l
rofi.kb-mode-previous: Shift+Left,Control+Shift+Tab,Control+h
rofi.kb-remove-char-back: BackSpace

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",
],
}

View File

@ -0,0 +1,5 @@
{
"clock": {
"format": " {:%H:%M}",
},
}

View File

@ -0,0 +1,7 @@
{
"hyprland/language": {
"format": " {}",
"format-en": "en",
"format-ru": "ru",
},
}

View File

@ -0,0 +1,216 @@
#!/usr/bin/env python3
import gi
gi.require_version("Playerctl", "2.0")
from gi.repository import Playerctl, GLib
from gi.repository.Playerctl import Player
import psutil
import setproctitle
import argparse
import logging
import sys
import signal
import gi
import json
import os
from typing import List
logger = logging.getLogger(__name__)
def signal_handler(sig, frame):
logger.info("Received signal to stop, exiting")
sys.stdout.write("\n")
sys.stdout.flush()
# loop.quit()
sys.exit(0)
class PlayerManager:
def __init__(self, selected_player=None):
self.manager = Playerctl.PlayerManager()
self.loop = GLib.MainLoop()
self.manager.connect(
"name-appeared", lambda *args: self.on_player_appeared(*args)
)
self.manager.connect(
"player-vanished", lambda *args: self.on_player_vanished(*args)
)
signal.signal(signal.SIGINT, signal_handler)
signal.signal(signal.SIGTERM, signal_handler)
signal.signal(signal.SIGPIPE, signal.SIG_DFL)
self.selected_player = selected_player
self.init_players()
def init_players(self):
for player in self.manager.props.player_names:
if self.selected_player is not None and self.selected_player != player.name:
logger.debug(f"{player.name} is not the filtered player, skipping it")
continue
self.init_player(player)
def run(self):
logger.info("Starting main loop")
self.loop.run()
def init_player(self, player):
logger.info(f"Initialize new player: {player.name}")
player = Playerctl.Player.new_from_name(player)
player.connect("playback-status", self.on_playback_status_changed, None)
player.connect("metadata", self.on_metadata_changed, None)
self.manager.manage_player(player)
self.on_metadata_changed(player, player.props.metadata)
def get_players(self) -> List[Player]:
return self.manager.props.players
def write_output(self, text, player):
logger.debug(f"Writing output: {text}")
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 clear_output(self):
sys.stdout.write("\n")
sys.stdout.flush()
def on_playback_status_changed(self, player, status, _=None):
logger.debug(
f"Playback status changed for player {player.props.player_name}: {status}"
)
self.on_metadata_changed(player, player.props.metadata)
def get_first_playing_player(self):
players = self.get_players()
logger.debug(f"Getting first playing player from {len(players)} players")
if len(players) > 0:
# if any are playing, show the first one that is playing
# reverse order, so that the most recently added ones are preferred
for player in players[::-1]:
if player.props.status == "Playing":
return player
# if none are playing, show the first one
return players[0]
else:
logger.debug("No players found")
return None
def show_most_important_player(self):
logger.debug("Showing most important player")
# show the currently playing player
# or else show the first paused player
# or else show nothing
current_player = self.get_first_playing_player()
if current_player is not None:
self.on_metadata_changed(current_player, current_player.props.metadata)
else:
self.clear_output()
def on_metadata_changed(self, player, metadata, _=None):
logger.debug(f"Metadata changed for player {player.props.player_name}")
player_name = player.props.player_name
artist = player.get_artist()
title = player.get_title()
track_info = ""
if (
player_name == "spotify"
and "mpris:trackid" in metadata.keys()
and ":ad:" in player.props.metadata["mpris:trackid"]
):
track_info = "Advertisement"
elif artist is not None and title is not None:
track_info = f"{artist} - {title}"
else:
track_info = title
if track_info:
if player.props.status == "Playing":
track_info = "" + track_info
else:
track_info = "" + track_info
# only print output if no other player is playing
current_playing = self.get_first_playing_player()
if (
current_playing is None
or current_playing.props.player_name == player.props.player_name
):
self.write_output(track_info, player)
else:
logger.debug(
f"Other player {current_playing.props.player_name} is playing, skipping"
)
def on_player_appeared(self, _, player):
logger.info(f"Player has appeared: {player.name}")
if player is not None and (
self.selected_player is None or player.name == self.selected_player
):
self.init_player(player)
else:
logger.debug(
"New player appeared, but it's not the selected player, skipping"
)
def on_player_vanished(self, _, player):
logger.info(f"Player {player.props.player_name} has vanished")
self.show_most_important_player()
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")
parser.add_argument("--enable-logging", action="store_true")
return parser.parse_args()
def main():
arguments = parse_arguments()
# Initialize logging
if arguments.enable_logging:
logfile = os.path.join(
os.path.dirname(os.path.realpath(__file__)), "media-player.log"
)
logging.basicConfig(
filename=logfile,
level=logging.DEBUG,
format="%(asctime)s %(name)s %(levelname)s:%(lineno)d %(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))
logger.info("Creating player manager")
if arguments.player:
logger.info(f"Filtering for player: {arguments.player}")
player = PlayerManager(arguments.player)
player.run()
app_name = "WaybarPlayerctlBridge"
for proc in psutil.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.setproctitle(app_name)
list_of_procs = []
main()

View File

@ -0,0 +1,14 @@
{
"custom/media": {
"format": "{0} {1}",
"escape": true,
"return-type": "json",
"max-length": 40,
"on-click": "playerctl play-pause",
"on-click-right": "playerctl stop",
"smooth-scrolling-threshold": 3, // This value was tested using a trackpad, it should be lowered if using a mouse.
"on-scroll-down": "playerctl next",
"on-scroll-up": "playerctl previous",
"exec": "$HOME/.config/waybar/modules/mediaplayer.py 2> /dev/null", // Script in resources/custom_modules folder
},
}

View File

@ -0,0 +1,24 @@
{
"group/network-group": {
"orientation": "horizontal",
"modules": ["bluetooth", "network"],
},
"bluetooth": {
"format": "",
"format-disabled": "", // an empty format will hide the module
"format-connected": "",
"on-click": "kitty bluetui",
"tooltip-format": "{device_enumerate}",
"tooltip-format-enumerate-connected": "{device_alias}",
},
"network": {
"format": "{ifname}",
"format-wifi": " ",
"format-ethernet": "󰈀 ",
"format-disconnected": "󰖪 ",
"tooltip-format-wifi": "{essid}",
"tooltip-format-ethernet": "{ipaddr}",
"on-click": "networkmanager_dmenu",
},
}

View File

@ -0,0 +1,24 @@
{
"group/power-group": {
"orientation": "horizontal",
"modules": ["backlight", "battery"],
},
"battery": {
"format": "{icon}",
"format-icons": ["󰂎", "󰁺", "󰁻", "󰁼", "󰁽", "󰁾", "󰁿", "󰂀", "󰂂", "󰁹"],
"format-charging": "󰂄",
"on-click": "$HOME/.config/hypr/scripts/dunst/ROGprofiler.sh",
"tooltip-format": "{capacity}% {timeTo}",
},
"backlight": {
"device": "intel_backlight",
"format": "{icon}",
"format-icons": ["", "", "", "", "", "", "", "", ""],
"smooth-scrolling-threshold": 1, // This value was tested using a trackpad, it should be lowered if using a mouse.
"on-scroll-down": "brightnessctl --class='backlight' set 5%+",
"on-scroll-up": "brightnessctl --class='backlight' set 5%-",
"on-click": "python $HOME/.config/hypr/scripts/swww.py",
"tooltip-format": "{percent}%",
},
}

View File

@ -0,0 +1,29 @@
{
"group/pulseaudio-group": {
"orientation": "horizontal",
"modules": ["pulseaudio#input", "pulseaudio#output"],
},
"pulseaudio#output": {
"format": "{icon}",
"tooltip-format": "{volume}%",
"format-muted": " ",
"format-icons": {
"headphone": " ",
"hdmi": "󰽟 ",
"default": [" ", " ", " ", " "],
},
"scroll-step": 1,
"on-click": "rofi-mixer",
"smooth-scrolling-threshold": 1, // This value was tested using a trackpad, it should be lowered if using a mouse.
"on-scroll-down": "wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+ -l 1.0",
"on-scroll-up": "wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%- -l 1.0",
},
"pulseaudio#input": {
"format-source": "",
"format-source-muted": "",
"tooltip": false,
"format": "{format_source}",
"on-click": "wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle",
},
}

View File

@ -0,0 +1,10 @@
{
"tray": {
"icon-size": 14,
"spacing": 10,
"icons": {
"Steam": "",
"Telegram Desktop": "",
},
},
}

View File

@ -0,0 +1,29 @@
{
"group/workspaces-group": {
"orientation": "horizontal",
"modules": ["hyprland/windowcount", "hyprland/workspaces"],
},
"hyprland/workspaces": {
"format": "{icon}",
"tooltip": true,
"tooltips": {
"default": "{name}: {windows}",
"empty": "", // Will result in no tooltip
},
"all-outputs": false,
"on-scroll-up": "hyprctl dispatch focusworkspaceoncurrentmonitor r-1",
"on-scroll-down": "hyprctl dispatch focusworkspaceoncurrentmonitor r+1",
"format-icons": {
"active": "",
"default": "",
},
},
"hyprland/windowcount": {
"format": "{}",
"format-empty": "{}",
"format-windowed": "{}",
"separate-outputs": true,
"on-click": "rofi -show window",
},
}

View File

@ -0,0 +1,82 @@
* {
border: none;
font-family: "JetBrains Mono Nerd Font";
font-size: 16px;
font-weight: 700;
font-feature-settings: '"zero", "ss01", "ss02", "ss03", "ss04", "ss05", "cv31"';
min-height: 20px;
color: #c0caf5;
}
window#waybar {
background: transparent;
}
tooltip,
#clock,
#tray,
#language,
#custom-media,
#network-group,
#pulseaudio-group,
#workspaces-group,
#power-group {
border: 2px solid rgba(192, 202, 245, 0.5);
border-radius: 11px;
background-color: rgba(32, 33, 44, 0.42);
padding-top: 1px;
margin-bottom: 2px;
margin-top: 1px;
}
tooltip {
background: rgba(32, 33, 44, 0.82);
}
tooltip label {
}
#hyprland-group,
#custom-media {
margin-left: 5px;
}
#clock,
#power-group,
#network-group,
#pulseaudio-group,
#tray {
margin-right: 5px;
}
#pulseaudio,
#custom-media,
#network,
#battery,
#clock,
#tray,
#language,
#backlight,
#bluetooth,
#windowcount {
padding-left: 12px;
padding-right: 12px;
}
#workspaces button {
padding-left: 4px;
padding-left: 4px;
}
#windowcount {
padding-right: 4px;
}
#network,
#battery {
padding-left: 6px;
}
#workspaces,
#pulseaudio.input,
#backlight,
#bluetooth {
padding-right: 6px;
}