fix: fixed conflicts + moving to yadm
@@ -1,9 +1,20 @@
|
|||||||
# exports&imports
|
# Configs
|
||||||
export EDITOR=nvim
|
export EDITOR=nvim
|
||||||
|
|
||||||
export PYENV_ROOT="$HOME/.pyenv"
|
# infinite bash history
|
||||||
[[ -d $PYENV_ROOT/bin ]] && export PATH="$PYENV_ROOT/bin:$PATH"
|
# remove '-1' in both places if your bash version < 4.3
|
||||||
eval "$(pyenv init - bash)"
|
export HISTFILESIZE=-1
|
||||||
|
export HISTSIZE=-1
|
||||||
|
|
||||||
|
# writes bash history after every command
|
||||||
|
export PROMPT_COMMAND="history -a"
|
||||||
|
|
||||||
|
# pyenv
|
||||||
|
if command -v pyenv >/dev/null 2>&1; then
|
||||||
|
export PYENV_ROOT="$HOME/.pyenv"
|
||||||
|
[[ -d $PYENV_ROOT/bin ]] && export PATH="$PYENV_ROOT/bin:$PATH"
|
||||||
|
eval "$(pyenv init - bash)"
|
||||||
|
fi
|
||||||
|
|
||||||
if [ -f "$HOME/.bash_private" ]; then
|
if [ -f "$HOME/.bash_private" ]; then
|
||||||
. "$HOME/.bash_private"
|
. "$HOME/.bash_private"
|
||||||
@@ -49,6 +60,12 @@ alias pyv='python --version'
|
|||||||
alias clipclear='cliphist wipe'
|
alias clipclear='cliphist wipe'
|
||||||
alias scrcpy-def='scrcpy -S --no-audio -K'
|
alias scrcpy-def='scrcpy -S --no-audio -K'
|
||||||
alias hload='hyprctl reload'
|
alias hload='hyprctl reload'
|
||||||
|
alias shy='start-hyprland'
|
||||||
|
alias wifi-reload='nmcli r wifi off && nmcli r wifi on'
|
||||||
|
alias swagger-docs='sudo host-docs'
|
||||||
|
|
||||||
|
# kitty aliases
|
||||||
|
alias ssh='kitty +kitten ssh'
|
||||||
alias edit-in-kitty='kitten edit-in-kitty'
|
alias edit-in-kitty='kitten edit-in-kitty'
|
||||||
|
|
||||||
# yay aliases
|
# yay aliases
|
||||||
|
Before Width: | Height: | Size: 463 B After Width: | Height: | Size: 463 B |
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 666 B After Width: | Height: | Size: 666 B |
|
Before Width: | Height: | Size: 304 B After Width: | Height: | Size: 304 B |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 381 B After Width: | Height: | Size: 381 B |
|
Before Width: | Height: | Size: 924 B After Width: | Height: | Size: 924 B |
|
Before Width: | Height: | Size: 943 B After Width: | Height: | Size: 943 B |
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 2.5 MiB After Width: | Height: | Size: 2.5 MiB |
|
Before Width: | Height: | Size: 16 MiB After Width: | Height: | Size: 16 MiB |
|
Before Width: | Height: | Size: 3.6 MiB After Width: | Height: | Size: 3.6 MiB |
|
Before Width: | Height: | Size: 11 MiB After Width: | Height: | Size: 11 MiB |
@@ -1,9 +1,10 @@
|
|||||||
exec-once = dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP
|
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-hyprland
|
||||||
exec-once = uwsm app -- /usr/lib/xdg-desktop-portal
|
exec-once = uwsm app -- /usr/lib/xdg-desktop-portal
|
||||||
exec-once = uwsm app -- /usr/lib/xdg-desktop-portal-gtk
|
exec-once = uwsm app -- /usr/lib/xdg-desktop-portal-gtk
|
||||||
|
|
||||||
# exec-once = uwsm app -- hypridle
|
exec-once = uwsm app -- hypridle
|
||||||
|
|
||||||
# exec-once = uwsm app -- hyprpaper
|
# exec-once = uwsm app -- hyprpaper
|
||||||
exec-once = uwsm app -- swww-daemon
|
exec-once = uwsm app -- swww-daemon
|
||||||
@@ -12,6 +13,6 @@ exec-once = swww img "$WALLPAPER"
|
|||||||
exec-once = uwsm app -- waybar
|
exec-once = uwsm app -- waybar
|
||||||
exec-once = uwsm app -- dunst
|
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 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 -- 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
|
exec-once = uwsm app -- systemd-inhibit --who="Hyprland config" --why="wlogout keybind" --what=handle-power-key --mode=block sleep infinity
|
||||||
@@ -24,6 +24,7 @@ bind = $mainMod, R, exec, rofi -show drun
|
|||||||
|
|
||||||
# copy binds
|
# copy binds
|
||||||
bind = $mainMod, V, exec, rofi -modi clipboard:/$HOME/.config/rofi/cliphist-rofi-img.sh -show clipboard -show-icon
|
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 = $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
|
bind = , PRINT, exec, grim - | wl-copy
|
||||||
|
|
||||||
@@ -48,17 +49,20 @@ bind = , XF86AudioPrev, exec, playerctl previous; .config/hypr/scripts/dunst/tra
|
|||||||
bind = , XF86AudioNext, exec, playerctl next; .config/hypr/scripts/dunst/trackinfo.sh
|
bind = , XF86AudioNext, exec, playerctl next; .config/hypr/scripts/dunst/trackinfo.sh
|
||||||
bind = , XF86AudioPlay, exec, playerctl play-pause
|
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
|
# brightness binds
|
||||||
binde = , XF86MonBrightnessUp , exec, brightnessctl --class='backlight' set 5%+; .config/hypr/scripts/dunst/brightness.sh
|
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
|
binde = , XF86MonBrightnessDown , exec, brightnessctl --class='backlight' set 5%-; .config/hypr/scripts/dunst/brightness-down.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
|
|
||||||
|
|
||||||
|
|
||||||
# power binds
|
# power binds
|
||||||
# bindl = , switch:off:Lid Switch, exec, hyprctl keyword monitor "eDP-1, 1920x1080@120, 0x0, 1, vrr, 1"
|
# 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
|
# 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
|
bind = , XF86PowerOff, exec, systemctl suspend
|
||||||
|
|
||||||
|
|
||||||
@@ -93,21 +97,24 @@ bind = $mainMod, mouse_up, workspace, r+1
|
|||||||
|
|
||||||
# Move/resize windows with mainMod + LMB/RMB and dragging
|
# Move/resize windows with mainMod + LMB/RMB and dragging
|
||||||
bindm = $mainMod, mouse:272, movewindow
|
bindm = $mainMod, mouse:272, movewindow
|
||||||
bindm = $mainMod SHIFT, mouse:272, resizewindow
|
|
||||||
bindm = $mainMod, mouse:273, resizewindow
|
bindm = $mainMod, mouse:273, resizewindow
|
||||||
|
bindm = $mainMod SHIFT, mouse:272, resizewindow
|
||||||
|
|
||||||
|
|
||||||
# Switch workspaces
|
# Switch workspaces
|
||||||
bind = $mainMod, A, focusworkspaceoncurrentmonitor, r-1
|
bind = $mainMod, A, focusworkspaceoncurrentmonitor, r-1
|
||||||
bind = $mainMod, D, focusworkspaceoncurrentmonitor, r+1
|
bind = $mainMod, D, focusworkspaceoncurrentmonitor, r+1
|
||||||
|
|
||||||
|
|
||||||
# Move active window to the next or previous workspace
|
# Move active window to the next or previous workspace
|
||||||
bind = $mainMod SHIFT, A, movetoworkspace, r-1
|
bind = $mainMod SHIFT, A, movetoworkspace, r-1
|
||||||
bind = $mainMod SHIFT, D, movetoworkspace, r+1
|
bind = $mainMod SHIFT, D, movetoworkspace, r+1
|
||||||
|
|
||||||
|
|
||||||
# Swap worlspaces between monitors
|
# Swap worlspaces between monitors
|
||||||
bind = $mainMod, TAB, swapactiveworkspaces, 1 0
|
bind = $mainMod, TAB, swapactiveworkspaces, 1 0
|
||||||
|
|
||||||
|
|
||||||
# Switch workspaces with mainMod + [0-9]
|
# Switch workspaces with mainMod + [0-9]
|
||||||
bind = $mainMod, 1, focusworkspaceoncurrentmonitor, 1
|
bind = $mainMod, 1, focusworkspaceoncurrentmonitor, 1
|
||||||
bind = $mainMod, 2, focusworkspaceoncurrentmonitor, 2
|
bind = $mainMod, 2, focusworkspaceoncurrentmonitor, 2
|
||||||
@@ -120,6 +127,7 @@ bind = $mainMod, 8, focusworkspaceoncurrentmonitor, 8
|
|||||||
bind = $mainMod, 9, focusworkspaceoncurrentmonitor, 9
|
bind = $mainMod, 9, focusworkspaceoncurrentmonitor, 9
|
||||||
bind = $mainMod, 0, focusworkspaceoncurrentmonitor, 0
|
bind = $mainMod, 0, focusworkspaceoncurrentmonitor, 0
|
||||||
|
|
||||||
|
|
||||||
# Move active window to a workspace with mainMod + SHIFT + [0-9]
|
# Move active window to a workspace with mainMod + SHIFT + [0-9]
|
||||||
bind = $mainMod SHIFT, 1, movetoworkspace, 1
|
bind = $mainMod SHIFT, 1, movetoworkspace, 1
|
||||||
bind = $mainMod SHIFT, 2, movetoworkspace, 2
|
bind = $mainMod SHIFT, 2, movetoworkspace, 2
|
||||||
@@ -1,4 +1,5 @@
|
|||||||
env = GTK_THEME,Colloid-Transparent-Dracula
|
env = GTK_THEME,Colloid-Transparent-Dracula
|
||||||
|
|
||||||
env = QT_QPA_PLATFORM,wayland;xcb
|
env = QT_QPA_PLATFORM,wayland;xcb
|
||||||
env = XDG_CURRENT_DESKTOP,Hyprland
|
env = XDG_CURRENT_DESKTOP,Hyprland
|
||||||
env = XDG_SESSION_TYPE,wayland
|
env = XDG_SESSION_TYPE,wayland
|
||||||
@@ -6,11 +7,12 @@ env = XDG_SESSION_DESKTOP,Hyprland
|
|||||||
env = GDK_BACKEND,wayland,x11,*
|
env = GDK_BACKEND,wayland,x11,*
|
||||||
|
|
||||||
exec = gsettings set org.gnome.desktop.interface color-scheme "prefer-dark"
|
exec = gsettings set org.gnome.desktop.interface color-scheme "prefer-dark"
|
||||||
exec = gsettings set org.gnome.desktop.interface gtk-theme "adw-gtk3-dark"
|
exec = gsettings set org.gnome.desktop.interface gtk-theme "adw-gtk3-dark"
|
||||||
|
|
||||||
env = XCURSOR_SIZE,24
|
env = XCURSOR_SIZE,24
|
||||||
|
|
||||||
env = ELECTRON_OZONE_PLATFORM_HINT, auto
|
env = ELECTRON_OZONE_PLATFORM_HINT,wayland
|
||||||
|
# env = chrome,--enable-features=TouchpadOverscrollHistoryNavigation
|
||||||
|
|
||||||
env = GDK_SCALE,1
|
env = GDK_SCALE,1
|
||||||
xwayland {
|
xwayland {
|
||||||
@@ -22,7 +22,7 @@ input {
|
|||||||
|
|
||||||
gestures {
|
gestures {
|
||||||
gesture = 3, horizontal, scale: 3, workspace
|
gesture = 3, horizontal, scale: 3, workspace
|
||||||
gesture = 3, vertical, scale: 3, workspace
|
gesture = 3, vertical, scale: 3, workspace
|
||||||
}
|
}
|
||||||
|
|
||||||
device {
|
device {
|
||||||
@@ -1,5 +1,6 @@
|
|||||||
# default
|
# default
|
||||||
# monitor = eDP-1, 1920x1080@120, auto, 1, vrr, 1
|
# monitor = eDP-1, 1920x1080@120, auto, 1, vrr, 1
|
||||||
|
# monitor = , prefered, auto, 1
|
||||||
monitor = eDP-1, prefered, auto, 1
|
monitor = eDP-1, prefered, auto, 1
|
||||||
|
|
||||||
# custom
|
# custom
|
||||||
@@ -5,7 +5,8 @@ ecosystem {
|
|||||||
|
|
||||||
misc {
|
misc {
|
||||||
disable_hyprland_logo = true
|
disable_hyprland_logo = true
|
||||||
disable_splash_rendering = true
|
disable_splash_rendering = true
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -66,6 +67,7 @@ animations {
|
|||||||
# animation = workspaces, 1, 6, myBezier, slide
|
# animation = workspaces, 1, 6, myBezier, slide
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
dwindle {
|
dwindle {
|
||||||
pseudotile = yes
|
pseudotile = yes
|
||||||
preserve_split = yes
|
preserve_split = yes
|
||||||
@@ -73,7 +75,7 @@ dwindle {
|
|||||||
|
|
||||||
|
|
||||||
group {
|
group {
|
||||||
col.border_active = rgba(33ccffee) rgba(bd93f9ee) 45deg
|
col.border_active = rgba(33ccffee) rgba(bd93f9ee) 45deg
|
||||||
groupbar {
|
groupbar {
|
||||||
gradients = false
|
gradients = false
|
||||||
col.active = rgba(33ccffee)
|
col.active = rgba(33ccffee)
|
||||||
1
.config/hypr/config/wallpaper.conf
Normal file
@@ -0,0 +1 @@
|
|||||||
|
env = WALLPAPER_PATH,$HOME/.config/hypr/Wallpapers/kotamota2.png
|
||||||
@@ -15,7 +15,7 @@ windowrule = opacity 1 0.9, match:tag messenger*
|
|||||||
# tools
|
# tools
|
||||||
windowrule = tag +tools, match:class ^([Dd][Bb]eaver|[Dd][Bb]eaver-ce|[Dd][Bb]eaver-community)$
|
windowrule = tag +tools, match:class ^([Dd][Bb]eaver|[Dd][Bb]eaver-ce|[Dd][Bb]eaver-community)$
|
||||||
|
|
||||||
windowrule = opacity 0.85 0.3, match:tag tools*
|
windowrule = opacity 0.85 0.75, match:tag tools*
|
||||||
|
|
||||||
# jetbrains
|
# jetbrains
|
||||||
windowrule = no_initial_focus on, match:class (jetbrains-idea), match:title ^win.*
|
windowrule = no_initial_focus on, match:class (jetbrains-idea), match:title ^win.*
|
||||||
@@ -28,4 +28,3 @@ listener {
|
|||||||
timeout = 300
|
timeout = 300
|
||||||
on-timeout = systemctl suspend
|
on-timeout = systemctl suspend
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -15,12 +15,12 @@ background {
|
|||||||
|
|
||||||
input-field {
|
input-field {
|
||||||
size = 250, 60
|
size = 250, 60
|
||||||
outline_thickness = 2
|
outline_thickness = 4
|
||||||
dots_size = 0.2
|
dots_size = 0.2
|
||||||
dots_spacing = 0.2
|
dots_spacing = 0.2
|
||||||
dots_center = true
|
dots_center = true
|
||||||
outer_color = rgba(51, 204, 255, 0.93)
|
outer_color = rgba(51, 204, 255, 0.93)
|
||||||
inner_color = rgba(10, 0, 30, 1)
|
inner_color = rgba(10, 0, 30, 0)
|
||||||
font_color = rgb(200, 200, 200)
|
font_color = rgb(200, 200, 200)
|
||||||
fade_on_empty = false
|
fade_on_empty = false
|
||||||
font_family = JetBrains Mono Nerd Font Mono
|
font_family = JetBrains Mono Nerd Font Mono
|
||||||
@@ -50,3 +50,8 @@ label {
|
|||||||
halign = center
|
halign = center
|
||||||
valign = bottom
|
valign = bottom
|
||||||
}
|
}
|
||||||
|
|
||||||
|
animations {
|
||||||
|
animation = fadeIn, 0
|
||||||
|
animation = fadeOut, 0
|
||||||
|
}
|
||||||
2
.config/hypr/hyprpaper.conf
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
preload = $HOME/.config/hypr/Wallpaper/kotamota2.png
|
||||||
|
wallpaper = , contain:$HOME/.config/hypr/Wallpaper/kotamota2.png
|
||||||
4
.config/hypr/scripts/after-sleep.sh
Executable file
@@ -0,0 +1,4 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# hyprctl keyword monitor "eDP-1, 1920x1080@120, 0x0, 1, vrr, 1"
|
||||||
|
# brightnessctl -r
|
||||||
0
dot_config/hypr/scripts/executable_before-sleep.sh → .config/hypr/scripts/before-sleep.sh
Normal file → Executable file
2
dot_config/hypr/scripts/dunst/executable_brightness.sh → .config/hypr/scripts/dunst/brightness-down.sh
Normal file → Executable file
@@ -4,5 +4,5 @@ msgId="3378455"
|
|||||||
|
|
||||||
brightpercent=$(brightnessctl -m --class='backlight' | awk -F, '{print substr($4, 0, length($4)-1)}')
|
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" \
|
notify-send -i $HOME/.config/hypr/scripts/dunst/icons/brightness-down.svg -a "changeBrightness" -u low -r "$msgId" \
|
||||||
-h int:value:"$brightpercent" "Яркость экрана: $brightpercent%"
|
-h int:value:"$brightpercent" "Яркость экрана: $brightpercent%"
|
||||||
0
dot_config/hypr/scripts/dunst/eDP-1brightness.sh → .config/hypr/scripts/dunst/brightness.sh
Normal file → Executable file
|
Before Width: | Height: | Size: 463 B After Width: | Height: | Size: 463 B |
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 666 B After Width: | Height: | Size: 666 B |
|
Before Width: | Height: | Size: 304 B After Width: | Height: | Size: 304 B |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 381 B After Width: | Height: | Size: 381 B |
|
Before Width: | Height: | Size: 924 B After Width: | Height: | Size: 924 B |
|
Before Width: | Height: | Size: 943 B After Width: | Height: | Size: 943 B |
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.8 KiB |
0
dot_config/hypr/scripts/dunst/executable_micro.sh → .config/hypr/scripts/dunst/micro.sh
Normal file → Executable file
8
.config/hypr/scripts/dunst/volume-down.sh
Executable 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%"
|
||||||
6
dot_config/hypr/scripts/dunst/volumemute.sh → .config/hypr/scripts/dunst/volume-mute.sh
Normal file → Executable file
@@ -2,10 +2,10 @@
|
|||||||
|
|
||||||
msgId="3378455"
|
msgId="3378455"
|
||||||
|
|
||||||
station=$(wpctl get-volume @DEFAULT_AUDIO_SINK@ | sed 's/Volume://' | tr -d [:digit:] | tr -d ' .[]')
|
station=$(pactl get-sink-mute @DEFAULT_SINK@)
|
||||||
|
|
||||||
if [ $station = 'MUTED' ]; then
|
if [ "$station" = 'Mute: yes' ]; then
|
||||||
notify-send -i "$HOME/.config/hypr/scripts/dunst/icons/volume mute.svg" -u low -r "$msgId" "Звук выключен"
|
notify-send -i "$HOME/.config/hypr/scripts/dunst/icons/volume-mute.svg" -u low -r "$msgId" "Звук выключен"
|
||||||
else
|
else
|
||||||
notify-send -i "$HOME/.config/hypr/scripts/dunst/icons/volume.svg" -u low -r "$msgId" "Звук включен"
|
notify-send -i "$HOME/.config/hypr/scripts/dunst/icons/volume.svg" -u low -r "$msgId" "Звук включен"
|
||||||
fi
|
fi
|
||||||
0
dot_config/hypr/scripts/dunst/executable_volume.sh → .config/hypr/scripts/dunst/volume.sh
Normal file → Executable file
6
.config/hypr/scripts/swww.sh
Normal 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
.config/hypr/scripts/testing/BSC.py
Executable 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()
|
||||||
0
dot_config/hypr/scripts/eDPower.sh → .config/hypr/scripts/testing/eDPower.sh
Normal file → Executable file
0
dot_config/hypr/scripts/player-status.sh → .config/hypr/scripts/testing/player-status.sh
Normal file → Executable file
0
dot_config/hypr/scripts/dunst/trackinfo.sh → .config/hypr/scripts/testing/trackinfo.sh
Normal file → Executable file
@@ -6,7 +6,7 @@ bold_font auto
|
|||||||
italic_font auto
|
italic_font auto
|
||||||
bold_italic_font auto
|
bold_italic_font auto
|
||||||
|
|
||||||
font_size 12
|
font_size 14
|
||||||
background_opacity 0.4
|
background_opacity 0.4
|
||||||
|
|
||||||
disable_ligatures always
|
disable_ligatures always
|
||||||
@@ -14,7 +14,7 @@ disable_ligatures always
|
|||||||
# window settings
|
# window settings
|
||||||
initial_window_width 95c
|
initial_window_width 95c
|
||||||
initial_window_height 35c
|
initial_window_height 35c
|
||||||
window_padding_width 14
|
window_padding_width 20
|
||||||
confirm_os_window_close 0
|
confirm_os_window_close 0
|
||||||
|
|
||||||
# Upstream colors {{{
|
# Upstream colors {{{
|
||||||
@@ -1,28 +1,30 @@
|
|||||||
{
|
{
|
||||||
"Comment.nvim": { "branch": "master", "commit": "e30b7f2008e52442154b66f7c519bfd2f1e32acb" },
|
"Comment.nvim": { "branch": "master", "commit": "e30b7f2008e52442154b66f7c519bfd2f1e32acb" },
|
||||||
"catppuccin": { "branch": "main", "commit": "beaf41a30c26fd7d6c386d383155cbd65dd554cd" },
|
"catppuccin": { "branch": "main", "commit": "ce8d176faa4643e026e597ae3c31db59b63cef09" },
|
||||||
"cmp-buffer": { "branch": "main", "commit": "b74fab3656eea9de20a9b8116afa3cfc4ec09657" },
|
"cmp-buffer": { "branch": "main", "commit": "b74fab3656eea9de20a9b8116afa3cfc4ec09657" },
|
||||||
"cmp-nvim-lsp": { "branch": "main", "commit": "cbc7b02bb99fae35cb42f514762b89b5126651ef" },
|
"cmp-nvim-lsp": { "branch": "main", "commit": "cbc7b02bb99fae35cb42f514762b89b5126651ef" },
|
||||||
"conform.nvim": { "branch": "master", "commit": "c2526f1cde528a66e086ab1668e996d162c75f4f" },
|
"conform.nvim": { "branch": "master", "commit": "5420c4b5ea0aeb99c09cfbd4fd0b70d257b44f25" },
|
||||||
|
"dressing.nvim": { "branch": "master", "commit": "2d7c2db2507fa3c4956142ee607431ddb2828639" },
|
||||||
|
"flutter-tools.nvim": { "branch": "main", "commit": "539e84f5a652d96917f0afc1341c20f0d59dd789" },
|
||||||
"harpoon": { "branch": "harpoon2", "commit": "87b1a3506211538f460786c23f98ec63ad9af4e5" },
|
"harpoon": { "branch": "harpoon2", "commit": "87b1a3506211538f460786c23f98ec63ad9af4e5" },
|
||||||
"indent-blankline.nvim": { "branch": "master", "commit": "005b56001b2cb30bfa61b7986bc50657816ba4ba" },
|
"indent-blankline.nvim": { "branch": "master", "commit": "005b56001b2cb30bfa61b7986bc50657816ba4ba" },
|
||||||
"lazy.nvim": { "branch": "main", "commit": "306a05526ada86a7b30af95c5cc81ffba93fef97" },
|
"lazy.nvim": { "branch": "main", "commit": "306a05526ada86a7b30af95c5cc81ffba93fef97" },
|
||||||
"lualine.nvim": { "branch": "master", "commit": "47f91c416daef12db467145e16bed5bbfe00add8" },
|
"lualine.nvim": { "branch": "master", "commit": "47f91c416daef12db467145e16bed5bbfe00add8" },
|
||||||
"mini.nvim": { "branch": "main", "commit": "4f53281c51ad9384ef790178b9643740fa763979" },
|
"mini.nvim": { "branch": "main", "commit": "7e55c3d2c04da134085a31156196836f80a89982" },
|
||||||
"neo-tree.nvim": { "branch": "main", "commit": "1bd82358e516e3043796e207e64f50a11574af6e" },
|
"neo-tree.nvim": { "branch": "main", "commit": "b0b73273b4f5a1f4b4aac8accd6e0c3b4b5a6967" },
|
||||||
"nui.nvim": { "branch": "main", "commit": "de740991c12411b663994b2860f1a4fd0937c130" },
|
"nui.nvim": { "branch": "main", "commit": "de740991c12411b663994b2860f1a4fd0937c130" },
|
||||||
"nvim-autopairs": { "branch": "master", "commit": "c2a0dd0d931d0fb07665e1fedb1ea688da3b80b4" },
|
"nvim-autopairs": { "branch": "master", "commit": "c2a0dd0d931d0fb07665e1fedb1ea688da3b80b4" },
|
||||||
"nvim-cmp": { "branch": "main", "commit": "85bbfad83f804f11688d1ab9486b459e699292d6" },
|
"nvim-cmp": { "branch": "main", "commit": "d97d85e01339f01b842e6ec1502f639b080cb0fc" },
|
||||||
"nvim-dap": { "branch": "master", "commit": "cdfd55a133f63228c55f91378f12908cb2a78ded" },
|
"nvim-dap": { "branch": "master", "commit": "818cd8787a77a97703eb1d9090543a374f79a9ac" },
|
||||||
"nvim-dap-python": { "branch": "master", "commit": "1808458eba2b18f178f990e01376941a42c7f93b" },
|
"nvim-dap-python": { "branch": "master", "commit": "1808458eba2b18f178f990e01376941a42c7f93b" },
|
||||||
"nvim-dap-ui": { "branch": "master", "commit": "cf91d5e2d07c72903d052f5207511bf7ecdb7122" },
|
"nvim-dap-ui": { "branch": "master", "commit": "cf91d5e2d07c72903d052f5207511bf7ecdb7122" },
|
||||||
"nvim-lspconfig": { "branch": "master", "commit": "92ee7d42320edfbb81f3cad851314ab197fa324a" },
|
"nvim-lspconfig": { "branch": "master", "commit": "d696e36d5792daf828f8c8e8d4b9aa90c1a10c2a" },
|
||||||
"nvim-nio": { "branch": "master", "commit": "21f5324bfac14e22ba26553caf69ec76ae8a7662" },
|
"nvim-nio": { "branch": "master", "commit": "21f5324bfac14e22ba26553caf69ec76ae8a7662" },
|
||||||
"nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" },
|
"nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" },
|
||||||
"nvim-web-devicons": { "branch": "master", "commit": "803353450c374192393f5387b6a0176d0972b848" },
|
"nvim-web-devicons": { "branch": "master", "commit": "6788013bb9cb784e606ada44206b0e755e4323d7" },
|
||||||
"plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" },
|
"plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" },
|
||||||
"render-markdown.nvim": { "branch": "main", "commit": "c54380dd4d8d1738b9691a7c349ecad7967ac12e" },
|
"render-markdown.nvim": { "branch": "main", "commit": "07d088bf8bdadd159eb807b90eaee86a4778383f" },
|
||||||
"telescope.nvim": { "branch": "master", "commit": "0d8b6eaa0b5ae6bb3d9785f7a3ba4a4c6c1b1af2" },
|
"telescope.nvim": { "branch": "master", "commit": "4d0f5e0e7f69071e315515c385fab2a4eff07b3d" },
|
||||||
"vim-fugitive": { "branch": "master", "commit": "61b51c09b7c9ce04e821f6cf76ea4f6f903e3cf4" },
|
"vim-fugitive": { "branch": "master", "commit": "61b51c09b7c9ce04e821f6cf76ea4f6f903e3cf4" },
|
||||||
"vim-suda": { "branch": "master", "commit": "c492741b4679b3cdd4d9e34138209784e061d916" },
|
"vim-suda": { "branch": "master", "commit": "c492741b4679b3cdd4d9e34138209784e061d916" },
|
||||||
"yanky.nvim": { "branch": "main", "commit": "04fc42b94305d94948c9c197f679336668af3292" }
|
"yanky.nvim": { "branch": "main", "commit": "04fc42b94305d94948c9c197f679336668af3292" }
|
||||||
@@ -13,4 +13,6 @@ vim.cmd([[
|
|||||||
nnoremap <C-Space>
|
nnoremap <C-Space>
|
||||||
vnoremap <C-Space>
|
vnoremap <C-Space>
|
||||||
vnoremap <leader>e :!sh<CR>
|
vnoremap <leader>e :!sh<CR>
|
||||||
|
|
||||||
|
nnoremap ' @q
|
||||||
]])
|
]])
|
||||||
@@ -18,6 +18,7 @@ vim.opt.rtp:prepend(lazypath)
|
|||||||
vim.g.mapleader = " "
|
vim.g.mapleader = " "
|
||||||
vim.g.maplocalleader = "\\"
|
vim.g.maplocalleader = "\\"
|
||||||
|
|
||||||
|
-- Setup lazy.nvim
|
||||||
require("lazy").setup({
|
require("lazy").setup({
|
||||||
spec = {
|
spec = {
|
||||||
{ import = "plugins" },
|
{ import = "plugins" },
|
||||||
24
.config/nvim/lua/config/options.lua
Normal 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 = " ",
|
||||||
|
}
|
||||||
@@ -1,4 +1,3 @@
|
|||||||
-- completion engine plugin for neovim
|
|
||||||
return {
|
return {
|
||||||
"hrsh7th/nvim-cmp",
|
"hrsh7th/nvim-cmp",
|
||||||
dependencies = {
|
dependencies = {
|
||||||
@@ -26,7 +26,7 @@ return {
|
|||||||
javascript = { "prettierd", "prettier", stop_after_first = true },
|
javascript = { "prettierd", "prettier", stop_after_first = true },
|
||||||
typescript = { "prettierd", "prettier", stop_after_first = true },
|
typescript = { "prettierd", "prettier", stop_after_first = true },
|
||||||
|
|
||||||
json = { "prettierd_f", "prettier_f", stop_after_first = true },
|
json = { "prettierd", "prettier_f", stop_after_first = true },
|
||||||
jsonc = { "prettierd_f", "prettier_f", stop_after_first = true },
|
jsonc = { "prettierd_f", "prettier_f", stop_after_first = true },
|
||||||
|
|
||||||
markdown = { "prettierd", "prettier", stop_after_first = true },
|
markdown = { "prettierd", "prettier", stop_after_first = true },
|
||||||
@@ -40,6 +40,9 @@ return {
|
|||||||
"--unfixable",
|
"--unfixable",
|
||||||
"F401",
|
"F401",
|
||||||
"--fix",
|
"--fix",
|
||||||
|
"--select",
|
||||||
|
"I",
|
||||||
|
-- "F", "E", "W", "C90", "I", "S", "BLE", "T20", "ERA"
|
||||||
"--stdin-filename",
|
"--stdin-filename",
|
||||||
"$FILENAME",
|
"$FILENAME",
|
||||||
"-",
|
"-",
|
||||||
@@ -64,7 +67,7 @@ return {
|
|||||||
stdin = true,
|
stdin = true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
format_on_save = { timeout_ms = 1000, lsp_fallback = true },
|
format_on_save = { timeout_ms = 5000, lsp_fallback = true },
|
||||||
},
|
},
|
||||||
init = function()
|
init = function()
|
||||||
vim.o.formatexpr = "v:lua.require'conform'.formatexpr()"
|
vim.o.formatexpr = "v:lua.require'conform'.formatexpr()"
|
||||||
53
.config/nvim/lua/plugins/flutter.lua
Normal 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,
|
||||||
|
-- }
|
||||||
@@ -25,8 +25,8 @@ return {
|
|||||||
},
|
},
|
||||||
|
|
||||||
config = function()
|
config = function()
|
||||||
local harpoon = require("harpoon")
|
local harpoon = require("harpoon")
|
||||||
harpoon:setup()
|
harpoon:setup()
|
||||||
|
|
||||||
local harpoon_extensions = require("harpoon.extensions")
|
local harpoon_extensions = require("harpoon.extensions")
|
||||||
harpoon:extend(harpoon_extensions.builtins.highlight_current_file())
|
harpoon:extend(harpoon_extensions.builtins.highlight_current_file())
|
||||||
@@ -43,7 +43,7 @@ return {
|
|||||||
vim.keymap.set("n", "<leader>L", function()
|
vim.keymap.set("n", "<leader>L", function()
|
||||||
harpoon:list():clear()
|
harpoon:list():clear()
|
||||||
end)
|
end)
|
||||||
|
|
||||||
vim.keymap.set("n", "<M-h>", function()
|
vim.keymap.set("n", "<M-h>", function()
|
||||||
harpoon:list():prev()
|
harpoon:list():prev()
|
||||||
end)
|
end)
|
||||||
@@ -25,6 +25,7 @@ return {
|
|||||||
settings = { interpreter = python_path },
|
settings = { interpreter = python_path },
|
||||||
})
|
})
|
||||||
vim.lsp.enable("ruff")
|
vim.lsp.enable("ruff")
|
||||||
|
|
||||||
vim.lsp.config("basedpyright", {
|
vim.lsp.config("basedpyright", {
|
||||||
root_markers = { ".git" },
|
root_markers = { ".git" },
|
||||||
python = { pythonPath = python_path },
|
python = { pythonPath = python_path },
|
||||||
@@ -40,6 +41,7 @@ return {
|
|||||||
},
|
},
|
||||||
})
|
})
|
||||||
vim.lsp.enable("basedpyright")
|
vim.lsp.enable("basedpyright")
|
||||||
|
|
||||||
vim.lsp.config("bashls", {
|
vim.lsp.config("bashls", {
|
||||||
cmd = { "bash-language-server", "start" },
|
cmd = { "bash-language-server", "start" },
|
||||||
filetypes = { "bash", "sh" },
|
filetypes = { "bash", "sh" },
|
||||||
4
.config/rofi/TODO.md
Normal 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?
|
||||||
|
|
||||||
0
dot_config/rofi/executable_cliphist-rofi-img.sh → .config/rofi/cliphist-rofi-img.sh
Normal file → Executable file
127
.config/rofi/network-manager/network-manager.sh
Executable 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
.config/rofi/network-manager/run-manager.sh
Executable file
@@ -0,0 +1,3 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
dir=$(dirname "$0")
|
||||||
|
rofi -combi-mody " "," " -modi " ":$dir/network-manager.sh," ":$dir/vpn-manager.sh -show " "
|
||||||
3
.config/rofi/network-manager/run-vpn-manager.sh
Executable file
@@ -0,0 +1,3 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
dir=$(dirname "$0")
|
||||||
|
rofi -modi " ":$dir/vpn-manager.sh -show " "
|
||||||
93
.config/rofi/network-manager/vpn-manager.sh
Executable 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"
|
||||||