commit 76f2dffd62ff40c9ac571000dfc97e98a188f825 Author: pyrschtjag Date: Sat Jan 17 07:00:03 2026 +0400 update_0.1 diff --git a/dunst/dunstrc b/dunst/dunstrc new file mode 100644 index 0000000..5028f6e --- /dev/null +++ b/dunst/dunstrc @@ -0,0 +1,41 @@ +[global] + font = JetBrainsMono Nerd Font 11 + width = (0, 300) + height = (0, 200) + offset = (25, 72) + origin = top-right + corner_radius = 8 + follow = keyboard + icon_position = left + max_icon_size = 64 + frame_width = 2 + frame_color = "#00afff" + separator_height = 2 + separator_color = frame + padding = 15 + horizontal_padding = 15 + text_icon_padding = 10 + transparency = 0 + format = "%s\n%b" + alignment = left + vertical_alignment = center + show_age_threshold = 60 + word_wrap = yes + mouse_left_click = do_action, close_current + mouse_right_click = close_all + +[urgency_low] + background = "#2d2d2dcc" + foreground = "#ffffff" + timeout = 5 + +[urgency_normal] + background = "#2d2d2dcc" + foreground = "#ffffff" + timeout = 10 + +[urgency_critical] + background = "#2d2d2dcc" + foreground = "#ffffff" + frame_color = "#ff5555" + timeout = 0 \ No newline at end of file diff --git a/i3/bind b/i3/bind new file mode 100644 index 0000000..af9f18e --- /dev/null +++ b/i3/bind @@ -0,0 +1,78 @@ +bindsym $mod+F7 exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -10% #&& $refresh_i3status +bindsym $mod+F8 exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle #&& $refresh_i3status +bindsym $mod+F9 exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +10% #&& $refresh_i3status +bindsym $mod+Return exec kitty +bindsym $mod+Shift+q kill +bindsym $mod+d exec --no-startup-id "rofi -modi drun,run,window -show drun" +bindsym $mod+j focus left +bindsym $mod+k focus down +bindsym $mod+l focus up +bindsym $mod+semicolon focus right +bindsym $mod+Left focus left +bindsym $mod+Down focus down +bindsym $mod+Up focus up +bindsym $mod+Right focus right +bindsym $mod+Shift+j move left +bindsym $mod+Shift+k move down +bindsym $mod+Shift+l move up +bindsym $mod+Shift+semicolon move right +bindsym $mod+Shift+Left move left +bindsym $mod+Shift+Down move down +bindsym $mod+Shift+Up move up +bindsym $mod+Shift+Right move right +bindsym $mod+Shift+h split h +bindsym $mod+Shift+v split v +bindsym $mod+Shift+f fullscreen toggle +bindsym $mod+Shift+s layout stacking +bindsym $mod+Shift+w layout tabbed +bindsym $mod+Shift+e layout toggle split +bindsym $mod+m floating toggle +bindsym $mod+Shift+m focus mode_toggle +bindsym $mod+Shift+a focus parent +bindsym $mod+Shift+d focus child +bindsym $mod+1 workspace number $ws1 +bindsym $mod+2 workspace number $ws2 +bindsym $mod+3 workspace number $ws3 +bindsym $mod+4 workspace number $ws4 +bindsym $mod+5 workspace number $ws5 +bindsym $mod+6 workspace number $ws6 +bindsym $mod+7 workspace number $ws7 +bindsym $mod+8 workspace number $ws8 +bindsym $mod+9 workspace number $ws9 +bindsym $mod+0 workspace number $ws10 +bindsym $mod+Shift+1 move container to workspace number $ws1 +bindsym $mod+Shift+2 move container to workspace number $ws2 +bindsym $mod+Shift+3 move container to workspace number $ws3 +bindsym $mod+Shift+4 move container to workspace number $ws4 +bindsym $mod+Shift+5 move container to workspace number $ws5 +bindsym $mod+Shift+6 move container to workspace number $ws6 +bindsym $mod+Shift+7 move container to workspace number $ws7 +bindsym $mod+Shift+8 move container to workspace number $ws8 +bindsym $mod+Shift+9 move container to workspace number $ws9 +bindsym $mod+Shift+0 move container to workspace number $ws10 +bindsym $mod+Shift+c reload +bindsym $mod+Shift+r restart +mode "Exit i3? [y/n]" { + bindsym y exec i3-msg exit + bindsym n mode "default" + bindsym Escape mode "default" +} +bindsym $mod+Shift+x mode "Exit i3? [y/n]" +mode "Resize" { + bindsym $left resize shrink width 10 px or 10 ppt + bindsym $down resize grow height 10 px or 10 ppt + bindsym $up resize shrink height 10 px or 10 ppt + bindsym $right resize grow width 10 px or 10 ppt + bindsym Left resize shrink width 10 px or 10 ppt + bindsym Down resize grow height 10 px or 10 ppt + bindsym Up resize shrink height 10 px or 10 ppt + bindsym Right resize grow width 10 px or 10 ppt + bindsym Return mode "default" + bindsym Escape mode "default" + bindsym Mod1+r mode "default" +} +bindsym $mod+r mode "Resize" +bindsym $mod+v exec --no-startup-id bash -c "rofi -modi 'clipboard:greenclip print' -show clipboard && xclip -selection clipboard -o | ~/.config/i3/scripts/i3-sc-clipboard.sh" +bindsym Shift+Print exec --no-startup-id ~/.config/i3/scripts/i3-sc-area.sh +bindsym Ctrl+Print exec --no-startup-id ~/.config/i3/scripts/i3-sc-window.sh +bindsym Print exec --no-startup-id ~/.config/i3/scripts/i3-sc-full.shv \ No newline at end of file diff --git a/i3/color b/i3/color new file mode 100644 index 0000000..45b10e4 --- /dev/null +++ b/i3/color @@ -0,0 +1,12 @@ +set $bgcolor #00afff +set $ibgcolor #2d2d2d +set $textcolor #ffffff +set $itextcolor #969696 +set $ubgcolor #6b8e23 +set $indcolor #ffffff +set $indinactive #1a1a1a + +client.focused $bgcolor $bgcolor $textcolor $bgcolor +client.unfocused $ibgcolor $ibgcolor $itextcolor $indinactive +client.focused_inactive $ibgcolor $ibgcolor $itextcolor $indinactive +client.urgent $ubgcolor $ubgcolor $textcolor $ubgcolor \ No newline at end of file diff --git a/i3/config b/i3/config new file mode 100644 index 0000000..9d60575 --- /dev/null +++ b/i3/config @@ -0,0 +1,7 @@ +set $mod Mod4 + +include set +include main +include exec +include bind +include color \ No newline at end of file diff --git a/i3/exec b/i3/exec new file mode 100644 index 0000000..f8d4e9c --- /dev/null +++ b/i3/exec @@ -0,0 +1,12 @@ +exec --no-startup-id dex --autostart --environment i3 +exec --no-startup-id xss-lock --transfer-sleep-lock -- i3lock --nofork +exec --no-startup-id nm-applet +exec --no-startup-id picom +exec --no-startup-id clipmenud +exec --no-startup-id greenclip daemon +exec_always --no-startup-id bash ~/.config/i3/scripts/i3-lang-layout.sh +exec_always --no-startup-id killall -q dunst; dunst -config ~/.config/dunst/dunstrc +exec_always --no-startup-id setxkbmap -layout "us,ru" -option "grp:win_space_toggle" +exec_always --no-startup-id xrandr --output DVI-I-1 --mode 1600x900 --pos 0x0 --rotate normal --output HDMI-0 --primary --mode 1920x1080 --pos 1600x-160 --rotate normal +exec_always --no-startup-id ~/.config/polybar/launch.sh +exec_always --no-startup-id feh --bg-fill --no-fehbg ~/Pictures/wallhaven-7jj86e.jpg ~/Pictures/wallhaven-x1lr3l.jpg diff --git a/i3/main b/i3/main new file mode 100644 index 0000000..bf3b94b --- /dev/null +++ b/i3/main @@ -0,0 +1,8 @@ +font pango:JetBrainsMono Nerd Font 11 +floating_modifier $mod +tiling_drag modifier titlebar +gaps inner 5 +gaps outer 5 +for_window [class="^.*"] border pixel 2 +workspace 1 output HDMI-0 +workspace 5 output DVI-I-1 diff --git a/i3/scripts/i3-lang-layout.sh b/i3/scripts/i3-lang-layout.sh new file mode 100755 index 0000000..71bb4e1 --- /dev/null +++ b/i3/scripts/i3-lang-layout.sh @@ -0,0 +1,23 @@ +#!/bin/bash + +_self=$(basename "$0") +pgrep -f "$_self" | grep -v $$ | xargs kill -9 2>/dev/null +declare -A layouts +prev_win_id="" +while read -r event; do + if [[ "$event" == *'"change":"focus"'* ]]; then + current_win_id=$(echo "$event" | grep -oP '"id":\K[0-9]+' | head -n 1) + if [ -n "$current_win_id" ]; then + if [ -n "$prev_win_id" ] && [ "$prev_win_id" != "$current_win_id" ]; then + layouts[$prev_win_id]=$(xkb-switch -p) + fi + saved_layout=${layouts[$current_win_id]} + if [ -n "$saved_layout" ]; then + xkb-switch -s "$saved_layout" + else + layouts[$current_win_id]=$(xkb-switch -p) + fi + prev_win_id=$current_win_id + fi + fi +done < <(stdbuf -oL i3-msg -t subscribe -m '[ "window" ]') \ No newline at end of file diff --git a/i3/scripts/i3-sc-area.sh b/i3/scripts/i3-sc-area.sh new file mode 100755 index 0000000..54b0139 --- /dev/null +++ b/i3/scripts/i3-sc-area.sh @@ -0,0 +1,8 @@ +#!/bin/bash + +geometry=$(slop -f "%g" -c 0,0.68,1,0.4 -b 1 -l) +[ -z "$geometry" ] && exit 1 +temp_file="/tmp/i3-sc-area.png" +maim -g "$geometry" "$temp_file" +echo "file://$temp_file" | xclip -selection clipboard -t text/uri-list +notify-send "Screenshot" "Captured area: $geometry" -i camera-photo -u low \ No newline at end of file diff --git a/i3/scripts/i3-sc-clipboard.sh b/i3/scripts/i3-sc-clipboard.sh new file mode 100755 index 0000000..d5818fa --- /dev/null +++ b/i3/scripts/i3-sc-clipboard.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +selection=$(cat) +[[ -z "$selection" ]] && exit 0 + +pkill -u $USER -x xclip + +if [[ "$selection" == file://* && "$selection" == *.png ]]; then + echo -n "$selection" | xclip -selection clipboard -t text/uri-list +fi \ No newline at end of file diff --git a/i3/scripts/i3-sc-full.sh b/i3/scripts/i3-sc-full.sh new file mode 100755 index 0000000..7791061 --- /dev/null +++ b/i3/scripts/i3-sc-full.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +eval $(xdotool getmouselocation --shell) +data=$(i3-msg -t get_outputs | jq -r ".[] | select(.active == true and $X >= .rect.x and $X < (.rect.x + .rect.width) and $Y >= .rect.y and $Y < (.rect.y + .rect.height)) | \"\(.name)\t\(.rect.width)x\(.rect.height)+\(.rect.x)+\(.rect.y)\"") +name=$(echo "$data" | cut -f1) +geometry=$(echo "$data" | cut -f2) +temp_file="/tmp/i3-sc-full.png" +maim -g "$geometry" "$temp_file" +echo "file://$temp_file" | xclip -selection clipboard -t text/uri-list +notify-send "Screenshot" "Captured display: $name" -i camera-photo +rm "$temp_file" \ No newline at end of file diff --git a/i3/scripts/i3-sc-window.sh b/i3/scripts/i3-sc-window.sh new file mode 100755 index 0000000..6ba9cd6 --- /dev/null +++ b/i3/scripts/i3-sc-window.sh @@ -0,0 +1,8 @@ +#!/bin/bash + +window_id=$(xdotool getactivewindow) +window_name=$(xprop -id "$window_id" WM_CLASS | cut -d '"' -f 4) +temp_file="/tmp/i3-sc-window.png" +maim -i "$window_id" "$temp_file" +echo "file://$temp_file" | xclip -selection clipboard -t text/uri-list +notify-send "Screenshot" "Captured window: $window_name" -u low \ No newline at end of file diff --git a/i3/set b/i3/set new file mode 100644 index 0000000..6610b57 --- /dev/null +++ b/i3/set @@ -0,0 +1,11 @@ +set $refresh_i3status killall -SIGUSR1 i3status +set $ws1 "1" +set $ws2 "2" +set $ws3 "3" +set $ws4 "4" +set $ws5 "5" +set $ws6 "6" +set $ws7 "7" +set $ws8 "8" +set $ws9 "9" +set $ws10 "10" diff --git a/picom/blur-exclude.conf b/picom/blur-exclude.conf new file mode 100644 index 0000000..32d537e --- /dev/null +++ b/picom/blur-exclude.conf @@ -0,0 +1,3 @@ +blur-background-exclude = [ + "class_g = 'slop'" +]; diff --git a/picom/blur.conf b/picom/blur.conf new file mode 100644 index 0000000..e04ca38 --- /dev/null +++ b/picom/blur.conf @@ -0,0 +1,6 @@ +blur-method = "dual_kawase"; +blur-strength = 2; +blur-background = true; +blur-background-frame = false; +blur-background-fixed = false; +blur-kern = "3x3box"; diff --git a/picom/corners-exclude.conf b/picom/corners-exclude.conf new file mode 100644 index 0000000..016efc2 --- /dev/null +++ b/picom/corners-exclude.conf @@ -0,0 +1,6 @@ +rounded-corners-exclude = [ + "window_type = 'menu'", + "window_type = 'dropdown_menu'", + "window_type = 'popup_menu'", + "window_type = 'tooltip'" +]; diff --git a/picom/corners.conf b/picom/corners.conf new file mode 100644 index 0000000..d2219f8 --- /dev/null +++ b/picom/corners.conf @@ -0,0 +1,6 @@ +corner-radius = 8; +round-borders = 1; +rounded-corners-exclude = [ + "window_type = 'dock'", + "window_type = 'desktop'" +]; diff --git a/picom/fading.conf b/picom/fading.conf new file mode 100644 index 0000000..f9a083c --- /dev/null +++ b/picom/fading.conf @@ -0,0 +1,5 @@ +fading = true; +fade-in-step = 0.03; +fade-out-step = 0.03; +fade-delta = 5; +no-fading-openclose = false diff --git a/picom/general.conf b/picom/general.conf new file mode 100644 index 0000000..28239b3 --- /dev/null +++ b/picom/general.conf @@ -0,0 +1,14 @@ +backend = "glx"; +dithered-present = false; +vsync = false; +detect-rounded-corners = true; +detect-client-opacity = true; +use-ewmh-active-win = true; +unredir-if-possible = false; +detect-transient = true; +detect-client-leader = true; +use-damage = false; +window-shader-fg = "default"; +transparent-clipping = false; +log-level = "warn"; +log-file = "/var/log/picom.log" diff --git a/picom/opacity-rule.conf b/picom/opacity-rule.conf new file mode 100644 index 0000000..aad32f4 --- /dev/null +++ b/picom/opacity-rule.conf @@ -0,0 +1,18 @@ +opacity-rule = [ + "100:fullscreen", + "100:_NET_WM_STATE *= '_NET_WM_STATE_FULLSCREEN'", + "100:focused", + "100:!focused && _NET_WM_STATE *= '_NET_WM_STATE_FULLSCREEN'", + "100:window_type = 'dock'", + "100:window_type = 'desktop'", + "100:window_type = 'menu'", + "100:window_type = 'dropdown_menu'", + "100:window_type = 'popup_menu'", + "100:window_type = 'tooltip'", + "100:window_role = 'PictureInPicture'", + "100:name *= 'Picture-in-Picture'", + "100:name *= '- YouTube'", + "100:name *= 'Twitch'", + "100:name *= 'rofi'", + "100:class_g = 'slop'" +]; \ No newline at end of file diff --git a/picom/opacity.conf b/picom/opacity.conf new file mode 100644 index 0000000..2c67a87 --- /dev/null +++ b/picom/opacity.conf @@ -0,0 +1,3 @@ +frame-opacity = 0.9; +inactive-opacity = 0.8; +active-opacity = 1.0; \ No newline at end of file diff --git a/picom/picom.conf b/picom/picom.conf new file mode 100644 index 0000000..0b70c13 --- /dev/null +++ b/picom/picom.conf @@ -0,0 +1,9 @@ +@include "general.conf" +@include "blur.conf" +@include "blur-exclude.conf" +@include "corners.conf" +@include "corners-exclude.conf" +@include "opacity.conf" +@include "opacity-rule.conf" +@include "fading.conf" +@include "shadows.conf" diff --git a/picom/shadows.conf b/picom/shadows.conf new file mode 100644 index 0000000..fd22733 --- /dev/null +++ b/picom/shadows.conf @@ -0,0 +1,7 @@ +shadow = false; +shadow-radius = 7; +shadow-opacity = .75 +shadow-offset-x = -7; +shadow-offset-y = -7; +shadow-color = "#000000" +crop-shadow-to-monitor = false diff --git a/polybar/bar.ini b/polybar/bar.ini new file mode 100644 index 0000000..e2369c9 --- /dev/null +++ b/polybar/bar.ini @@ -0,0 +1,33 @@ +[bar/base] +monitor = ${env:MONITOR:} +width = 100% +height = 28pt +radius = 8 +dpi = 96 +background = ${colors.background} +foreground = ${colors.foreground} +line-size = 3pt +border-top-size = 8pt +border-left-size = 8pt +border-right-size = 8pt +border-color = #00000000 +padding-left = 1 +padding-right = 1 +module-margin = 1 +separator = | +separator-foreground = ${colors.disabled} +font-0 = monospace;2 +cursor-click = pointer +cursor-scroll = ns-resize +enable-ipc = true + +[bar/dvi] +inherit = bar/base +modules-left = i3 +modules-right = filesystem pulseaudio cpu memory temperature nvidia time xkeyboard + +[bar/hdmi] +inherit = bar/base +modules-left = i3 +modules-center = time date +modules-right = pulseaudio xkeyboard systray diff --git a/polybar/colors.ini b/polybar/colors.ini new file mode 100644 index 0000000..5652347 --- /dev/null +++ b/polybar/colors.ini @@ -0,0 +1,9 @@ +[colors] +background = #992d2d2d +background-alt = #3d3d3d +foreground = #ffffff +primary = #00afff +secondary = #969696 +alert = #ff4f4f +disabled = #969696 +urgent = #6b8e23 \ No newline at end of file diff --git a/polybar/config.ini b/polybar/config.ini new file mode 100644 index 0000000..329d3f3 --- /dev/null +++ b/polybar/config.ini @@ -0,0 +1,4 @@ +include-file = $HOME/.config/polybar/colors.ini +include-file = $HOME/.config/polybar/bar.ini +include-file = $HOME/.config/polybar/module.ini +include-file = $HOME/.config/polybar/settings.ini diff --git a/polybar/launch.sh b/polybar/launch.sh new file mode 100755 index 0000000..5d53f69 --- /dev/null +++ b/polybar/launch.sh @@ -0,0 +1,17 @@ +#!/usr/bin/env bash + +# Terminate already running bar instances +# If all your bars have ipc enabled, you can use +polybar-msg cmd quit +# Otherwise you can use the nuclear option: +# killall -q polybar + +# Launch bar1 and bar2 +echo "---" | tee -a /tmp/polybar1.log /tmp/polybar2.log + +MONITOR=HDMI-0 polybar hdmi 2>&1 | tee -a /tmp/polybar1.log & disown +MONITOR=DVI-I-1 polybar dvi 2>&1 | tee -a /tmp/polybar2.log & disown + +#polybar bar2 2>&1 | tee -a /tmp/polybar2.log & disown + +echo "Bars launched..." diff --git a/polybar/module.ini b/polybar/module.ini new file mode 100644 index 0000000..18cc444 --- /dev/null +++ b/polybar/module.ini @@ -0,0 +1,135 @@ +[module/i3] +type = internal/i3 +pin-workspaces = true +show-urgent = true +wrapping = false +format = +label-mode = %mode% +label-mode-padding = 1 +label-mode-background = ${colors.primary} +label-mode-foreground = ${colors.foreground} +label-focused = %name% +label-focused-background = ${colors.background-alt} +label-focused-underline = ${colors.primary} +label-focused-padding = 1 +label-unfocused = %name% +label-unfocused-padding = 1 +label-visible = %index% +label-visible-underline = ${colors.secondary} +label-visible-padding = 1 +label-urgent = %name% +label-urgent-background = ${colors.urgent} +label-urgent-padding = 1 + +[module/systray] +type = internal/tray +tray-spacing = 10px +tray-padding = 0px +tray-size = 45% + +[module/filesystem] +type = internal/fs +interval = 25 +mount-0 = / +warn-percentage = 90 +label-mounted = %free% +label-warn = %free% +label-unmounted = %mountpoint% not mounted +label-unmounted-foreground = ${colors.disabled} +format-mounted = +format-mounted-prefix = "/: " +format-mounted-prefix-foreground = ${colors.primary} +format-warn = +format-warn-prefix = "root: " +format-warn-prefix-foreground = ${colors.primary} +format-warn-foreground = ${colors.alert} + +[module/pulseaudio] +type = internal/pulseaudio +label-volume = %percentage%% +label-muted = muted +label-muted-foreground = ${colors.disabled} +format-volume-prefix = "vol: " +format-volume-prefix-foreground = ${colors.primary} +format-volume = + +[module/xkeyboard] +type = internal/xkeyboard +label-layout = %layout% +label-layout-foreground = ${colors.primary} +label-indicator-on-capslock = "caps+" +label-indicator-on-numlock = "num+" +label-indicator-padding = 2 +label-indicator-margin = 1 +label-indicator-foreground = ${colors.background} +label-indicator-background = ${colors.secondary} + +[module/memory] +type = internal/memory +interval = 2 +warn-percentage = 90 +label = %percentage_used%% +label-warn = %percentage_used%% +format =