From 1b1b70daed03e1e8cb70a8feb5867a63b3c34079 Mon Sep 17 00:00:00 2001 From: Andrey Zimin Date: Sun, 10 Mar 2024 13:30:59 +0300 Subject: [PATCH] add nvim --- PKGBUILD | 10 +- configs/bspwm/bin/apps_as_root | 7 + configs/bspwm/bin/askpass | 10 + configs/bspwm/bin/bspbar | 4 + configs/bspwm/bin/bspcomp | 13 + configs/bspwm/bin/bspconfig | 49 +++ configs/bspwm/bin/bspdunst | 11 + configs/bspwm/bin/bsprules | 45 ++ configs/bspwm/bspwmrc | 91 ++++ configs/bspwm/dunst/dunstrc | 56 +++ configs/bspwm/keybinding/sxhkdrc | 71 +++ configs/bspwm/picom/default.conf | 414 ++++++++++++++++++ configs/bspwm/polybar/config | 118 +++++ configs/bspwm/polybar/launch.sh | 64 +++ configs/bspwm/polybar/modules/cpu | 26 ++ configs/bspwm/polybar/modules/date | 19 + configs/bspwm/polybar/modules/filesystem | 22 + configs/bspwm/polybar/modules/keyboard | 11 + configs/bspwm/polybar/modules/main_menu | 9 + configs/bspwm/polybar/modules/media | 46 ++ configs/bspwm/polybar/modules/net | 61 +++ configs/bspwm/polybar/modules/separators | 197 +++++++++ configs/bspwm/polybar/modules/uparch | 11 + configs/bspwm/polybar/modules/workspaces | 44 ++ configs/bspwm/polybar/scripts/health | 47 ++ configs/bspwm/polybar/scripts/pulse-mic | 58 +++ configs/bspwm/polybar/scripts/uparch.sh | 12 + configs/bspwm/polybar/utils/colors | 22 + configs/bspwm/polybar/utils/system | 24 + configs/bspwm/rofi/bin/calendar | 97 ++++ configs/bspwm/rofi/bin/confirm | 7 + configs/bspwm/rofi/bin/launcher | 42 ++ configs/bspwm/rofi/bin/network | 66 +++ configs/bspwm/rofi/bin/powermenu | 116 +++++ configs/bspwm/rofi/bin/screenshot | 207 +++++++++ configs/bspwm/rofi/bin/windows | 6 + configs/bspwm/rofi/themes/askpass.rasi | 24 + configs/bspwm/rofi/themes/calendar.rasi | 158 +++++++ configs/bspwm/rofi/themes/colors.rasi | 10 + configs/bspwm/rofi/themes/confirm.rasi | 24 + configs/bspwm/rofi/themes/launcher.rasi | 100 +++++ configs/bspwm/rofi/themes/network.rasi | 153 +++++++ configs/bspwm/rofi/themes/networkmenu.rasi | 304 +++++++++++++ configs/bspwm/rofi/themes/powermenu.rasi | 148 +++++++ configs/bspwm/rofi/themes/screenshot.rasi | 142 ++++++ configs/bspwm/rofi/themes/window.rasi | 151 +++++++ configs/bspwm/themes/Chad WM/colorScheme | 93 ++++ configs/bspwm/themes/Chad WM/preview.png | Bin 0 -> 141286 bytes configs/bspwm/themes/Chad WM/theme.conf | 17 + configs/bspwm/xsettingsd | 10 + configs/geany/session.conf | 33 +- configs/kitty/kitty.conf | 2 +- configs/lazygit/state.yml | 12 +- configs/nvim/init.lua | 8 + configs/nvim/lazy-lock.json | 48 ++ configs/nvim/lua/core/icons.lua | 154 +++++++ configs/nvim/lua/core/mappings.lua | 93 ++++ configs/nvim/lua/core/options.lua | 299 +++++++++++++ configs/nvim/lua/plugins/configs/alpha.lua | 124 ++++++ .../nvim/lua/plugins/configs/autopairs.lua | 15 + configs/nvim/lua/plugins/configs/autosave.lua | 18 + .../nvim/lua/plugins/configs/blankline.lua | 38 ++ .../nvim/lua/plugins/configs/bufferline.lua | 42 ++ configs/nvim/lua/plugins/configs/cmp.lua | 105 +++++ .../nvim/lua/plugins/configs/colorscheme.lua | 56 +++ configs/nvim/lua/plugins/configs/comment.lua | 10 + configs/nvim/lua/plugins/configs/dressing.lua | 5 + .../nvim/lua/plugins/configs/highlight.lua | 9 + configs/nvim/lua/plugins/configs/hop.lua | 8 + configs/nvim/lua/plugins/configs/init.lua | 35 ++ .../lua/plugins/configs/lsp/lsp_configs.lua | 172 ++++++++ .../nvim/lua/plugins/configs/lsp/mason.lua | 54 +++ .../nvim/lua/plugins/configs/lsp/none_ls.lua | 72 +++ configs/nvim/lua/plugins/configs/lualine.lua | 51 +++ .../nvim/lua/plugins/configs/neoscroll.lua | 8 + configs/nvim/lua/plugins/configs/notify.lua | 90 ++++ .../nvim/lua/plugins/configs/nvim_tree.lua | 163 +++++++ .../nvim/lua/plugins/configs/telescope.lua | 160 +++++++ .../lua/plugins/configs/tmux_navigator.lua | 7 + .../nvim/lua/plugins/configs/treesitter.lua | 102 +++++ configs/nvim/lua/plugins/configs/wich_key.lua | 12 + configs/nvim/lua/plugins/init.lua | 38 ++ configs/rofi/config.rasi | 21 +- .../xfconf/xfce-perchannel-xml/thunar.xml | 2 +- makepkg.sh | 15 +- tarch-configs.install | 26 +- 86 files changed, 5504 insertions(+), 50 deletions(-) create mode 100755 configs/bspwm/bin/apps_as_root create mode 100755 configs/bspwm/bin/askpass create mode 100755 configs/bspwm/bin/bspbar create mode 100755 configs/bspwm/bin/bspcomp create mode 100755 configs/bspwm/bin/bspconfig create mode 100755 configs/bspwm/bin/bspdunst create mode 100755 configs/bspwm/bin/bsprules create mode 100755 configs/bspwm/bspwmrc create mode 100755 configs/bspwm/dunst/dunstrc create mode 100755 configs/bspwm/keybinding/sxhkdrc create mode 100755 configs/bspwm/picom/default.conf create mode 100755 configs/bspwm/polybar/config create mode 100755 configs/bspwm/polybar/launch.sh create mode 100755 configs/bspwm/polybar/modules/cpu create mode 100644 configs/bspwm/polybar/modules/date create mode 100644 configs/bspwm/polybar/modules/filesystem create mode 100644 configs/bspwm/polybar/modules/keyboard create mode 100644 configs/bspwm/polybar/modules/main_menu create mode 100755 configs/bspwm/polybar/modules/media create mode 100755 configs/bspwm/polybar/modules/net create mode 100755 configs/bspwm/polybar/modules/separators create mode 100644 configs/bspwm/polybar/modules/uparch create mode 100755 configs/bspwm/polybar/modules/workspaces create mode 100755 configs/bspwm/polybar/scripts/health create mode 100755 configs/bspwm/polybar/scripts/pulse-mic create mode 100755 configs/bspwm/polybar/scripts/uparch.sh create mode 100755 configs/bspwm/polybar/utils/colors create mode 100755 configs/bspwm/polybar/utils/system create mode 100755 configs/bspwm/rofi/bin/calendar create mode 100755 configs/bspwm/rofi/bin/confirm create mode 100755 configs/bspwm/rofi/bin/launcher create mode 100755 configs/bspwm/rofi/bin/network create mode 100755 configs/bspwm/rofi/bin/powermenu create mode 100755 configs/bspwm/rofi/bin/screenshot create mode 100755 configs/bspwm/rofi/bin/windows create mode 100755 configs/bspwm/rofi/themes/askpass.rasi create mode 100755 configs/bspwm/rofi/themes/calendar.rasi create mode 100755 configs/bspwm/rofi/themes/colors.rasi create mode 100755 configs/bspwm/rofi/themes/confirm.rasi create mode 100755 configs/bspwm/rofi/themes/launcher.rasi create mode 100755 configs/bspwm/rofi/themes/network.rasi create mode 100755 configs/bspwm/rofi/themes/networkmenu.rasi create mode 100755 configs/bspwm/rofi/themes/powermenu.rasi create mode 100755 configs/bspwm/rofi/themes/screenshot.rasi create mode 100755 configs/bspwm/rofi/themes/window.rasi create mode 100755 configs/bspwm/themes/Chad WM/colorScheme create mode 100644 configs/bspwm/themes/Chad WM/preview.png create mode 100755 configs/bspwm/themes/Chad WM/theme.conf create mode 100755 configs/bspwm/xsettingsd create mode 100644 configs/nvim/init.lua create mode 100644 configs/nvim/lazy-lock.json create mode 100644 configs/nvim/lua/core/icons.lua create mode 100644 configs/nvim/lua/core/mappings.lua create mode 100644 configs/nvim/lua/core/options.lua create mode 100644 configs/nvim/lua/plugins/configs/alpha.lua create mode 100644 configs/nvim/lua/plugins/configs/autopairs.lua create mode 100644 configs/nvim/lua/plugins/configs/autosave.lua create mode 100644 configs/nvim/lua/plugins/configs/blankline.lua create mode 100644 configs/nvim/lua/plugins/configs/bufferline.lua create mode 100644 configs/nvim/lua/plugins/configs/cmp.lua create mode 100644 configs/nvim/lua/plugins/configs/colorscheme.lua create mode 100644 configs/nvim/lua/plugins/configs/comment.lua create mode 100644 configs/nvim/lua/plugins/configs/dressing.lua create mode 100644 configs/nvim/lua/plugins/configs/highlight.lua create mode 100644 configs/nvim/lua/plugins/configs/hop.lua create mode 100644 configs/nvim/lua/plugins/configs/init.lua create mode 100644 configs/nvim/lua/plugins/configs/lsp/lsp_configs.lua create mode 100644 configs/nvim/lua/plugins/configs/lsp/mason.lua create mode 100644 configs/nvim/lua/plugins/configs/lsp/none_ls.lua create mode 100644 configs/nvim/lua/plugins/configs/lualine.lua create mode 100644 configs/nvim/lua/plugins/configs/neoscroll.lua create mode 100644 configs/nvim/lua/plugins/configs/notify.lua create mode 100644 configs/nvim/lua/plugins/configs/nvim_tree.lua create mode 100644 configs/nvim/lua/plugins/configs/telescope.lua create mode 100644 configs/nvim/lua/plugins/configs/tmux_navigator.lua create mode 100644 configs/nvim/lua/plugins/configs/treesitter.lua create mode 100644 configs/nvim/lua/plugins/configs/wich_key.lua create mode 100644 configs/nvim/lua/plugins/init.lua diff --git a/PKGBUILD b/PKGBUILD index da5d42e..f40e1e7 100755 --- a/PKGBUILD +++ b/PKGBUILD @@ -2,9 +2,9 @@ pkgname=tarch-configs pkgver=1.0 pkgrel=1 pkgdesc="Configs some App for Tarch OS" -arch=('any') -url="https://gitcast.ru/tarch_os/tarch-configs.git" -license=('GPL3') +arch=("any") +url="https://gitcast.ru/tarch_os/tarch-bin" +license=("GPL3") install=${pkgname}.install prepare() { @@ -16,5 +16,9 @@ package() { mkdir -p ${CONFIG_DIR} cp -r ${srcdir}/* ${CONFIG_DIR} + chmod +x "${CONFIG_DIR}/bspwm"/bin/* + chmod +x "${CONFIG_DIR}/bspwm"/rofi/bin/* + + install -Dm 755 ${srcdir}/bspwm/bspwmrc "${CONFIG_DIR}/bspwm"/bspwmrc install -Dm 644 ${srcdir}/mimeapps.list ${CONFIG_DIR}/mimeapps.list } diff --git a/configs/bspwm/bin/apps_as_root b/configs/bspwm/bin/apps_as_root new file mode 100755 index 0000000..25548fc --- /dev/null +++ b/configs/bspwm/bin/apps_as_root @@ -0,0 +1,7 @@ +#!/usr/bin/env bash + +# запуск программ от рута. например в thunar run as root +# SUDO_ASKPASS сообщает sudo, какую программу использовать, когда ей необходимо запросить пароль без взаимодействия с пользователем. + +export SUDO_ASKPASS=~/.config/bspwm/bin/askpass +sudo -A $1 diff --git a/configs/bspwm/bin/askpass b/configs/bspwm/bin/askpass new file mode 100755 index 0000000..073e0eb --- /dev/null +++ b/configs/bspwm/bin/askpass @@ -0,0 +1,10 @@ +#!/usr/bin/env bash + +# запуск меню вопроса о пароде + +rofi -dmenu\ + -password\ + -i\ + -no-fixed-num-lines\ + -p "[] Enter sudo Password, Mr.${USER}: "\ + -theme ~/.config/bspwm/rofi/themes/askpass.rasi diff --git a/configs/bspwm/bin/bspbar b/configs/bspwm/bin/bspbar new file mode 100755 index 0000000..c06340f --- /dev/null +++ b/configs/bspwm/bin/bspbar @@ -0,0 +1,4 @@ +#!/usr/bin/zsh + +# запуск полибара с иконками +bash $HOME/.config/bspwm/polybar/launch.sh diff --git a/configs/bspwm/bin/bspcomp b/configs/bspwm/bin/bspcomp new file mode 100755 index 0000000..3c4fb37 --- /dev/null +++ b/configs/bspwm/bin/bspcomp @@ -0,0 +1,13 @@ +#!/usr/bin/env bash + +# композитор. всякая анимация окон. +# можно посмотрет и поиграть в .config/bspwm/picom/tmp + +# убиваем запущенные +killall -q picom + +# ждем пока не выключиться все +while pgrep -u $UID -x picom >/dev/null; do sleep 1; done + +# запускаем +picom -b --experimental-backends --config $HOME/.config/bspwm/picom/default.conf & diff --git a/configs/bspwm/bin/bspconfig b/configs/bspwm/bin/bspconfig new file mode 100755 index 0000000..7c1f07d --- /dev/null +++ b/configs/bspwm/bin/bspconfig @@ -0,0 +1,49 @@ +#!/usr/bin/zsh + +# цвета из .Xresources +xrdb ~/.Xresources + +getcolors() { + FOREGROUND=$(xrdb -query | grep 'foreground:'| awk '{print $NF}') + BACKGROUND=$(xrdb -query | grep 'background:'| awk '{print $NF}') + BLACK=$(xrdb -query | grep 'color0:'| awk '{print $NF}') + RED=$(xrdb -query | grep 'color1:'| awk '{print $NF}') + GREEN=$(xrdb -query | grep 'color2:'| awk '{print $NF}') + YELLOW=$(xrdb -query | grep 'color3:'| awk '{print $NF}') + BLUE=$(xrdb -query | grep 'color4:'| awk '{print $NF}') + MAGENTA=$(xrdb -query | grep 'color5:'| awk '{print $NF}') + CYAN=$(xrdb -query | grep 'color6:'| awk '{print $NF}') + WHITE=$(xrdb -query | grep 'color7:'| awk '{print $NF}') +} + +getcolors + +bspc config focused_border_color "${BLUE}" +bspc config normal_border_color "${BACKGROUND}" +bspc config active_border_color "${MAGENTA}" +bspc config presel_feedback_color "${GREEN}" + +bspc config border_width 2 +bspc config window_gap 10 +bspc config bottom_padding 0 +bspc config top_padding 0 + +# кофициент разделения, сколько процентов останется от родительского окна при открытии нового +bspc config split_ratio 0.50 + +# отключение гапсов рамок и отступов когда открыто одно окно +bspc config borderless_monocle true +bspc config gapless_monocle true +bspc config paddingless_monocle true + +# режим монокля когда открыто одно окно +bspc config single_monocle false + +# фокус окна наведением курсора +bspc config focus_follows_pointer true + +bspc config presel_feedback true +bspc config pointer_modifier super + +# схемы согласно которым будут открыватся окна +#bspc config automatic_scheme spiral diff --git a/configs/bspwm/bin/bspdunst b/configs/bspwm/bin/bspdunst new file mode 100755 index 0000000..68036a7 --- /dev/null +++ b/configs/bspwm/bin/bspdunst @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# уведомления + +# убиваем ранее запущенные +if [[ `pidof dunst` ]]; then + pkill dunst +fi + +# запускаем +dunst -config $HOME/.config/bspwm/dunst/dunstrc & diff --git a/configs/bspwm/bin/bsprules b/configs/bspwm/bin/bsprules new file mode 100755 index 0000000..c163e9f --- /dev/null +++ b/configs/bspwm/bin/bsprules @@ -0,0 +1,45 @@ +#!/usr/bin/zsh + +# настройка отображения программ на workspaces + +# remove all rules first +bspc rule -r *:* + +bspc rule -a Google-chrome desktop='^1' follow=on focus=on +bspc rule -a Google-chrome-beta desktop='^1' +bspc rule -a chromium desktop='^1' follow=on focus=on +# bspc rule -a firefox desktop='^1' follow=on focus=on + +bspc rule -a TelegramDesktop desktop='^2' +bspc rule -a zoom desktop='^2' +bspc rule -a discord desktop='^2' + +bspc rule -a DBeaver desktop='^3' +bspc rule -a java desktop='^3' +bspc rule -a Java desktop='^3' + +bspc rule -a kitty:project_home desktop='^5' + +bspc rule -a "ONLYOFFICE Desktop Editors" desktop='^11' + +bspc rule -a Signal desktop='^12' +bspc rule -a anki desktop='^12' +bspc rule -a Anki desktop='^12' + +# на 13 (f) столе все окна плавающие # +FLOATING_DESKTOP_ID=$(bspc query -D -d '^13') +bspc subscribe node_add | while read -a msg; do + desk_id=${msg[2]} + wid=${msg[4]} + [ "$FLOATING_DESKTOP_ID" = "$desk_id" ] && bspc node "$wid" -t floating +done + +# # если перечислять # +# declare -a files=(Pcmanfm Thunar Caja dolphin) +# for i in ${files[@]}; do +# bspc rule -a $i desktop='^3' follow=on focus=on; +# done + +# терминалы в которых запускаются разные приложения с нужными размерами +bspc rule -a kitty:uparch_run state=floating rectangle=800x450+1516+700 follow=off +bspc rule -a kitty:raid_run state=floating rectangle=1280x800+1416+700 follow=off diff --git a/configs/bspwm/bspwmrc b/configs/bspwm/bspwmrc new file mode 100755 index 0000000..4c69914 --- /dev/null +++ b/configs/bspwm/bspwmrc @@ -0,0 +1,91 @@ +#!/usr/bin/zsh + +export PATH="${PATH}:$HOME/.config/bspwm/bin:$HOME/.config/bspwm/rofi/bin:$HOME/.local/bin:$HOME/.local/share/virtualenv/pip/bin" +BSPWM_DIR="$HOME/.config/bspwm" + +# настройки клавиш +KEYBOARD_LAYOUTS=us,ru +setxkbmap -layout ${KEYBOARD_LAYOUTS} +setxkbmap -option 'grp:alt_shift_toggle' +setxkbmap -option caps:hyper +# ------------------------------------------------------------------------------ # + +# цветовая схема +XRES="$HOME/.Xresources.d" +COLOR_SCHEME="Chad WM" +cat "${BSPWM_DIR}/themes/${COLOR_SCHEME}/colorScheme" > "${XRES}"/colors +# ------------------------------------------------------------------------------ # + +# Решение для java apps (e.g. JetBrains IDEs like PyCharm, CLion, etc). # +export _JAVA_AWT_WM_NONREPARENTING=1 +# Поддержка других приложений не работающих на WMs # +wmname LG3D +# ------------------------------------------------------------------------------ # + +# установка ролей # +bsprules +# ------------------------------------------------------------------------------ # + +# запуск workspaces +bspc monitor -d             f +# ------------------------------------------------------------------------------ # + +# Управляйте всеми неуправляемыми окнами, оставшимися с предыдущего сеанса. # +bspc wm --adopt-orphans +# ------------------------------------------------------------------------------ # + +# load bspwm Configurations # +bspconfig +# ------------------------------------------------------------------------------ # + +## HERE +# РАЗОБРАТЬ +## ------------------------- Autostart Apps ------------------------- ## + +# Kill if already running # +killall -9 xsettingsd sxhkd dunst ksuperkey xfce4-power-manager bspc picom +# ------------------------------------------------------------------------------ # + +# Lauch xsettingsd daemon # +xsettingsd --config="${BSPWM_DIR}"/xsettingsd & +# ------------------------------------------------------------------------------ # + +# polkit agent # +if [[ ! `pidof xfce-polkit` ]]; then + /usr/lib/xfce-polkit/xfce-polkit & +fi +# ------------------------------------------------------------------------------ # + +# Lauch keybindings daemon # +KEYBINDING=sxhkdrc +sxhkd -c "${BSPWM_DIR}"/keybinding/${KEYBINDING} & +# ------------------------------------------------------------------------------ # + +# Enable Super Keys For Menu # +ksuperkey -e 'Super_L=Alt_L|F1' & +ksuperkey -e 'Super_R=Alt_L|F1' & +# ------------------------------------------------------------------------------ # + +# Enable power manager # +xfce4-power-manager & +# ------------------------------------------------------------------------------ # + +# Fix cursor # +xsetroot -cursor_name left_ptr +# ------------------------------------------------------------------------------ # + +# restore wallpaper # +BACKGROUND=/usr/share/backgrounds/chad.png +feh --no-fehbg --bg-fill ${BACKGROUND} +# ------------------------------------------------------------------------------ # + +# enable num lock # +numlockx & +# ------------------------------------------------------------------------------ # + +# start bspwm scripts # +bspcomp +bspbar +bspdunst & +# ------------------------------------------------------------------------------ # +## ------------------------------------- END -------------------------------------------------- ## diff --git a/configs/bspwm/dunst/dunstrc b/configs/bspwm/dunst/dunstrc new file mode 100755 index 0000000..b83ec7e --- /dev/null +++ b/configs/bspwm/dunst/dunstrc @@ -0,0 +1,56 @@ +[global] +monitor = 0 +follow = mouse +geometry = "280x50-10+48" +indicate_hidden = yes +shrink = no +separator_height = 4 +separator_color = auto +padding = 15 +horizontal_padding = 15 +frame_width = 6 +sort = no +idle_threshold = 120 +font = JetBrains Mono 10 +line_height = 4 +markup = full +format = %s\n%b +alignment = left +show_age_threshold = 60 +word_wrap = yes +ignore_newline = no +stack_duplicates = false +hide_duplicate_count = yes +show_indicators = no +icon_position = left +max_icon_size = 48 +sticky_history = yes +history_length = 20 +browser = x-www-browser -new-tab +always_run_script = true +title = Dunst +class = Dunst + +[shortcuts] +close = ctrl+shift+space +close_all = ctrl+shift+space +history = ctrl+grave +context = ctrl+shift+period + +[urgency_low] +timeout = 2 +background = "#1E222A" +foreground = "#ABB2BF" +frame_color = "#61AFEF" + +[urgency_normal] +timeout = 5 +background = "#1E222A" +foreground = "#ABB2BF" +frame_color = "#61AFEF" + +[urgency_critical] +timeout = 0 +background = "#1E222A" +foreground = "#ABB2BF" +frame_color = "#61AFEF" diff --git a/configs/bspwm/keybinding/sxhkdrc b/configs/bspwm/keybinding/sxhkdrc new file mode 100755 index 0000000..2099795 --- /dev/null +++ b/configs/bspwm/keybinding/sxhkdrc @@ -0,0 +1,71 @@ +# переход по воркспейсам +super + {q,e} + bspc desktop -f {prev,next}.local + +# переключение по открытым приложениям в пределах одного воркспейса +super + shift + {s,w} + bspc node -f {next,prev}.local.!hidden.window + +# терминал +super + shift + Return + kitty + +# thunar +super + shift + f + thunar + +# colorpicker +super + shift + c + colorPicker + +# закрытие приложения +super + shift + z + bspc node -{c,k} + +# перезагрузка припязки клавишь +super + shift + k + pkill -USR1 -x sxhkd + +# restart bspwm +ctrl + shift + r + bspc wm -r + +# перемещение по панелям +super + ctrl + {1-9} + bspc node -o 0.{1-9} + +# поменять местами текущее и самое большое окно +super + gk + bspc node -s biggest.window + +# переключится на воркспейс или перетащить на него активное окно +# super 1 - перейти на 1 +# super + shift + 3 - перемещает активное окно на 3 +super + {_,shift + }{1-9,0} + bspc {desktop -f,node -d} '^{1-9,10}' + +# вернутся на предыдущий активный воркспейс +super + {grave,Tab} + bspc {node,desktop} -f last + +# меню запущенных программ +super + shift + m + sh ~/.config/bspwm/rofi/bin/windows + +# меню выхода из сиситемы +super + shift + q + sh ~/.config/bspwm/rofi/bin/powermenu + +# скриншот +ctrl + shift + s + sh ~/.config/bspwm/rofi/bin/screenshot + +# гловное меню с программами +super + m + sh ~/.config/bspwm/rofi/bin/launcher + + +# РАЗОБРАТЬСЯ !!! +# Toggle right click context menu. # +~button3 + xqp 0 $(xdo id -N Bspwm -n root) && jgmenu_run diff --git a/configs/bspwm/picom/default.conf b/configs/bspwm/picom/default.conf new file mode 100755 index 0000000..aa8b0db --- /dev/null +++ b/configs/bspwm/picom/default.conf @@ -0,0 +1,414 @@ +#========================= Corners =========================# + +corner-radius = 0; +rounded-corners-exclude = [ + "window_type = 'normal'", + "class_g ?= 'rofi'", + "class_g ?= 'polybar'", + "class_g ?= 'tint2'" +]; + +round-borders = 0; +round-borders-exclude = [ + "class_g = 'TelegramDesktop'" +]; + +# Specify a list of border width rules, in the format `PIXELS:PATTERN`, +# Note we don't make any guarantee about possible conflicts with the +# border_width set by the window manager. +# +# example: +# round-borders-rule = [ "2:class_g = 'URxvt'" ]; +# +round-borders-rule = [ + "2:class_g ?= 'URxvt'", + "2:class_g ?= 'Alacritty'", + "0:class_g ?= 'firefox'" +]; + +#========================= Shadows =========================# + +# Enabled client-side shadows on windows. Note desktop windows +# (windows with '_NET_WM_WINDOW_TYPE_DESKTOP') never get shadow, +# unless explicitly requested using the wintypes option. +# +shadow = true; + +# The blur radius for shadows, in pixels. (defaults to 12) +shadow-radius = 14; + +# The opacity of shadows. (0.0 - 1.0, defaults to 0.75) +shadow-opacity = 0.30; + +# The left offset for shadows, in pixels. (defaults to -15) +shadow-offset-x = -12; + +# The top offset for shadows, in pixels. (defaults to -15) +shadow-offset-y = -12; + +# Red color value of shadow (0.0 - 1.0, defaults to 0). +# shadow-red = 0 + +# Green color value of shadow (0.0 - 1.0, defaults to 0). +# shadow-green = 0 + +# Blue color value of shadow (0.0 - 1.0, defaults to 0). +# shadow-blue = 0 + +# Hex string color value of shadow (#000000 - #FFFFFF, defaults to #000000). This option will override options set shadow-(red/green/blue) +# shadow-color = "#000000" + +# Specify a list of conditions of windows that should have no shadow. +# +# examples: +# shadow-exclude = "n:e:Notification"; +# +# shadow-exclude = [] +shadow-exclude = [ + "class_g = 'Cairo-clock'", + "class_g = 'CoverGloobus'", + "class_g = 'Tilda'", + "name ?= 'gnome-pie'", + "class_g ?= 'Plank'", + "name *= 'recordmydesktop'", + "name = 'Notification'", + "name = 'Docky'", + "name = 'Kupfer'", + "name = 'xfce4-notifyd'", + "name *= 'VLC'", + "name *= 'Chromium'", + "name *= 'Chrome'", + "class_g = 'Conky'", + "class_g = 'Kupfer'", + "class_g = 'Synapse'", + "class_g ?= 'Notify-osd'", + "class_g ?= 'Cairo-dock'", + "class_g ?= 'Xfce4-notifyd'", + "class_g ?= 'Xfce4-power-manager'", + "_GTK_FRAME_EXTENTS@:c", + "_NET_WM_STATE@:32a *= '_NET_WM_STATE_HIDDEN'" +]; + +# Specify a X geometry that describes the region in which shadow should not +# be painted in, such as a dock window region. Use +# shadow-exclude-reg = "x10+0+0" +# for example, if the 10 pixels on the bottom of the screen should not have shadows painted on. +# +# shadow-exclude-reg = "" + +# Crop shadow of a window fully on a particular Xinerama screen to the screen. +# xinerama-shadow-crop = false + +#========================= Fading =========================# + +# Fade windows in/out when opening/closing and when opacity changes, +# unless no-fading-openclose is used. +fading = true; + +# Opacity change between steps while fading in. (0.01 - 1.0, defaults to 0.028) +fade-in-step = 0.03; + +# Opacity change between steps while fading out. (0.01 - 1.0, defaults to 0.03) +fade-out-step = 0.03; + +# The time between steps in fade step, in milliseconds. (> 0, defaults to 10) +fade-delta = 5; + +# Specify a list of conditions of windows that should not be faded. +# don't need this, we disable fading for all normal windows with wintypes: {} +fade-exclude = [ + "class_g = 'slop'" # maim +] + +# Do not fade on window open/close. +no-fading-openclose = false + +# Do not fade destroyed ARGB windows with WM frame. Workaround of bugs in Openbox, Fluxbox, etc. +no-fading-destroyed-argb = true + +#========================= Opacity =========================# + +# Opacity of inactive windows. (0.1 - 1.0, defaults to 1.0) +# inactive-opacity = 1 +inactive-opacity = 1; + +# Opacity of window titlebars and borders. (0.1 - 1.0, disabled by default) +# frame-opacity = 1.0 +frame-opacity = 1.0; + +# Let inactive opacity set by -i override the '_NET_WM_OPACITY' values of windows. +# inactive-opacity-override = true +inactive-opacity-override = false; + +# Default opacity for active windows. (0.0 - 1.0, defaults to 1.0) +active-opacity = 1.0; + +# Dim inactive windows. (0.0 - 1.0, defaults to 0.0) +#inactive-dim = 0.5 + +# Specify a list of conditions of windows that should always be considered focused. +# focus-exclude = [] +focus-exclude = [ + "class_g = 'Cairo-clock'", + "class_g = 'Bar'", # lemonbar + "class_g = 'slop'" # maim +]; + +# Use fixed inactive dim value, instead of adjusting according to window opacity. +# inactive-dim-fixed = 1.0 + +# Specify a list of opacity rules, in the format `PERCENT:PATTERN`, +# like `50:name *= "Firefox"`. picom-trans is recommended over this. +# Note we don't make any guarantee about possible conflicts with other +# programs that set '_NET_WM_WINDOW_OPACITY' on frame or client windows. +# example: +# opacity-rule = [ "80:class_g = 'URxvt'" ]; +# +# opacity-rule = [] +opacity-rule = [ + "100:class_g = 'Bar'", # lemonbar + "100:class_g = 'slop'", # maim + "100:class_g = 'XTerm'", + "100:class_g = 'URxvt'", + "100:class_g = 'kitty'", + "100:class_g = 'Alacritty'", + "100:class_g = 'Polybar'", + "100:class_g = 'code-oss'", + "100:class_g = 'Meld'", + "100:class_g = 'TelegramDesktop'", + "100:class_g = 'Joplin'", + "100:class_g = 'firefox'", + "100:class_g = 'Thunderbird'" +]; + +#========================= Blurring =========================# + +blur: { + method = "none"; + strength = 0; + background = false; + background-frame = false; + background-fixed = false; + kern = "3x3box"; +} + +# Exclude conditions for background blur. +blur-background-exclude = [ + "window_type = 'dock'", + "window_type = 'desktop'", + "class_g = 'Plank'", + "class_g = 'slop'", + "_GTK_FRAME_EXTENTS@:c" +]; + +#========================= General Settings =========================# + +# Daemonize process. Fork to background after initialization. Causes issues with certain (badly-written) drivers. +# daemon = false + +# Specify the backend to use: `xrender`, `glx`, or `xr_glx_hybrid`. +# `xrender` is the default one. +# +experimental-backends = true; +backend = "xrender"; + +# Enable/disable VSync. +# vsync = false +vsync = true; + +# Enable remote control via D-Bus. See the *D-BUS API* section below for more details. +# dbus = false + +# Try to detect WM windows (a non-override-redirect window with no +# child that has 'WM_STATE') and mark them as active. +# +# mark-wmwin-focused = false +mark-wmwin-focused = true; + +# Mark override-redirect windows that doesn't have a child window with 'WM_STATE' focused. +# mark-ovredir-focused = false +mark-ovredir-focused = true; + +# Try to detect windows with rounded corners and don't consider them +# shaped windows. The accuracy is not very high, unfortunately. +# +# detect-rounded-corners = false +detect-rounded-corners = true; + +# Detect '_NET_WM_OPACITY' on client windows, useful for window managers +# not passing '_NET_WM_OPACITY' of client windows to frame windows. +# +# detect-client-opacity = false +detect-client-opacity = true; + +# Specify refresh rate of the screen. If not specified or 0, picom will +# try detecting this with X RandR extension. +# +# refresh-rate = 60 +refresh-rate = 0; + +# Use EWMH '_NET_ACTIVE_WINDOW' to determine currently focused window, +# rather than listening to 'FocusIn'/'FocusOut' event. Might have more accuracy, +# provided that the WM supports it. +# +# use-ewmh-active-win = false + +# Unredirect all windows if a full-screen opaque window is detected, +# to maximize performance for full-screen windows. Known to cause flickering +# when redirecting/unredirecting windows. +# +# unredir-if-possible = false + +# Delay before unredirecting the window, in milliseconds. Defaults to 0. +# unredir-if-possible-delay = 0 + +# Conditions of windows that shouldn't be considered full-screen for unredirecting screen. +# unredir-if-possible-exclude = [] + +# Use 'WM_TRANSIENT_FOR' to group windows, and consider windows +# in the same group focused at the same time. +# +# detect-transient = false +detect-transient = true; + +# Use 'WM_CLIENT_LEADER' to group windows, and consider windows in the same +# group focused at the same time. 'WM_TRANSIENT_FOR' has higher priority if +# detect-transient is enabled, too. +# +# detect-client-leader = false +detect-client-leader = true; + +# Resize damaged region by a specific number of pixels. +# A positive value enlarges it while a negative one shrinks it. +# If the value is positive, those additional pixels will not be actually painted +# to screen, only used in blur calculation, and such. (Due to technical limitations, +# with use-damage, those pixels will still be incorrectly painted to screen.) +# Primarily used to fix the line corruption issues of blur, +# in which case you should use the blur radius value here +# (e.g. with a 3x3 kernel, you should use `--resize-damage 1`, +# with a 5x5 one you use `--resize-damage 2`, and so on). +# May or may not work with *--glx-no-stencil*. Shrinking doesn't function correctly. +# +# resize-damage = 1 + +# Specify a list of conditions of windows that should be painted with inverted color. +# Resource-hogging, and is not well tested. +# +# invert-color-include = [] + +# GLX backend: Avoid using stencil buffer, useful if you don't have a stencil buffer. +# Might cause incorrect opacity when rendering transparent content (but never +# practically happened) and may not work with blur-background. +# My tests show a 15% performance boost. Recommended. +# +glx-no-stencil = true; + +# GLX backend: Avoid rebinding pixmap on window damage. +# Probably could improve performance on rapid window content changes, +# but is known to break things on some drivers (LLVMpipe, xf86-video-intel, etc.). +# Recommended if it works. +# +# glx-no-rebind-pixmap = false + +# Disable the use of damage information. +# This cause the whole screen to be redrawn everytime, instead of the part of the screen +# has actually changed. Potentially degrades the performance, but might fix some artifacts. +# The opposing option is use-damage +# +# no-use-damage = false +use-damage = true; + +# Use X Sync fence to sync clients' draw calls, to make sure all draw +# calls are finished before picom starts drawing. Needed on nvidia-drivers +# with GLX backend for some users. +# +# xrender-sync-fence = false + +# GLX backend: Use specified GLSL fragment shader for rendering window contents. +# See `compton-default-fshader-win.glsl` and `compton-fake-transparency-fshader-win.glsl` +# in the source tree for examples. +# +# glx-fshader-win = "" + +# Force all windows to be painted with blending. Useful if you +# have a glx-fshader-win that could turn opaque pixels transparent. +# +# force-win-blend = false + +# Do not use EWMH to detect fullscreen windows. +# Reverts to checking if a window is fullscreen based only on its size and coordinates. +# +# no-ewmh-fullscreen = false + +# Dimming bright windows so their brightness doesn't exceed this set value. +# Brightness of a window is estimated by averaging all pixels in the window, +# so this could comes with a performance hit. +# Setting this to 1.0 disables this behaviour. Requires --use-damage to be disabled. (default: 1.0) +# +# max-brightness = 1.0 + +# Make transparent windows clip other windows like non-transparent windows do, +# instead of blending on top of them. +# +# transparent-clipping = false + +# Set the log level. Possible values are: +# "trace", "debug", "info", "warn", "error" +# in increasing level of importance. Case doesn't matter. +# If using the "TRACE" log level, it's better to log into a file +# using *--log-file*, since it can generate a huge stream of logs. +# +# log-level = "debug" +log-level = "info"; + +# Set the log file. +# If *--log-file* is never specified, logs will be written to stderr. +# Otherwise, logs will to written to the given file, though some of the early +# logs might still be written to the stderr. +# When setting this option from the config file, it is recommended to use an absolute path. +# +# log-file = "/path/to/your/log/file" + +# Show all X errors (for debugging) +# show-all-xerrors = false + +# Write process ID to a file. +# write-pid-path = "/path/to/your/log/file" + +# Window type settings +# +# 'WINDOW_TYPE' is one of the 15 window types defined in EWMH standard: +# "unknown", "desktop", "dock", "toolbar", "menu", "utility", +# "splash", "dialog", "normal", "dropdown_menu", "popup_menu", +# "tooltip", "notification", "combo", and "dnd". +# +# Following per window-type options are available: :: +# +# fade, shadow::: +# Controls window-type-specific shadow and fade settings. +# +# opacity::: +# Controls default opacity of the window type. +# +# focus::: +# Controls whether the window of this type is to be always considered focused. +# (By default, all window types except "normal" and "dialog" has this on.) +# +# full-shadow::: +# Controls whether shadow is drawn under the parts of the window that you +# normally won't be able to see. Useful when the window has parts of it +# transparent, and you want shadows in those areas. +# +# redir-ignore::: +# Controls whether this type of windows should cause screen to become +# redirected again after been unredirected. If you have unredir-if-possible +# set, and doesn't want certain window to cause unnecessary screen redirection, +# you can set this to `true`. +# +wintypes: +{ + tooltip = { fade=true; shadow=true; opacity=0.95; focus=true; full-shadow=false; }; + popup_menu = { opacity=1.0; } + dropdown_menu = { opacity=1.0; } + utility = { shadow=false; opacity=1.0; } +}; diff --git a/configs/bspwm/polybar/config b/configs/bspwm/polybar/config new file mode 100755 index 0000000..bedad51 --- /dev/null +++ b/configs/bspwm/polybar/config @@ -0,0 +1,118 @@ +# Global WM Settings +[global/wm] +margin-bottom = 0 +margin-top = 0 + +# разности +include-file = ./utils/system +include-file = ./utils/colors + +# сеть +include-file = ./modules/net + +# громкость, микрофон +include-file = ./modules/media + +# календарь и дата +include-file = ./modules/date + +# клавиатура +include-file = ./modules/keyboard + +# меню нга знаке арча +include-file = ./modules/main_menu + +# workspaces +include-file = ./modules/workspaces + +# monitoring +include-file = ./modules/cpu +include-file = ./modules/filesystem +include-file = ./modules/uparch + +# separators (e.g  , | , <| ,  ,etc..) # +include-file = ./modules/separators + +# # # # # +# VIEW # +# # # # # + +[bar/main] +monitor = ${env:MONITOR:} +monitor-strict = false +override-redirect = false + +bottom = false +fixed-center = true + +width = 99% +height = 30 +offset-x = 0.5% +offset-y = 0.5% + +background = ${color.BACKGROUND} +foreground = ${color.FOREGROUND} + +radius-top = 0.0 +radius-bottom = 0.0 + +line-size = 2 +line-color = ${color.BLUE} + +border-size = 5 +border-color = ${color.BACKGROUND} + +padding = 0 +module-margin-left = 0 +module-margin-right = 0 + +font-0 = "Iosevka Nerd Font:size=10;3" +font-1 = "Iosevka Nerd Font:size=12;3" +font-2 = "google\\-mdi:size=12;3" +font-3 = "Iosevka:style=bold:size=12;3" +font-4 = "Iosevka Nerd Font:size=18;4" +font-5 = "JetBrainsMono Nerd Font:style=Bold:pixelsize=9;3" +font-6 = "JetBrainsMono Nerd Font:size=13;4" + +modules-left = xdomenu space LDD bspwm LDD space +modules-center = xwindow +modules-right = uparch space LDD xkeyboard LDD space LDD volume spaceD pulse-mic spaceD space cpu space cpu-temp space network space ethernet space PLDD date PLD + +separator = +spacing = 0 + +dim-value = 1.0 + +wm-name = bspwm +locale = ru_RU.UTF-8 + +tray-position = right +tray-detached = false +tray-maxsize = 16 +tray-transparent = false +tray-background = ${color.tray-background} +tray-offset-x = 0 +tray-offset-y = 0 +tray-padding = 0 +tray-scale = 1.0 + +wm-restack = bspwm + +enable-ipc = true + +; bspwm +scroll-up = bspc desktop -f prev.local +scroll-down = bspc desktop -f next.local + +[settings] +throttle-output = 5 +throttle-output-for = 10 +throttle-input-for = 30 + +screenchange-reload = false + +compositing-background = source +compositing-foreground = over +compositing-overline = over +compositing-underline = over +compositing-border = over diff --git a/configs/bspwm/polybar/launch.sh b/configs/bspwm/polybar/launch.sh new file mode 100755 index 0000000..4530b68 --- /dev/null +++ b/configs/bspwm/polybar/launch.sh @@ -0,0 +1,64 @@ +#!/usr/bin/env bash + +# Files and Directories # +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" +BAR="Chad WM" +POLYBAR_DIR="$HOME/.config/bspwm/polybar" +SFILE="${POLYBAR_DIR}/utils/system" + +# Get system variable values for various modules # +GET_VALUES() { + CARD=$(light -L | grep 'backlight' | head -n1 | cut -d'/' -f3) + BATTERY=$(upower -i `upower -e | grep 'BAT'` | grep 'native-path' | cut -d':' -f2 | tr -d '[:blank:]') + ADAPTER=$(upower -i `upower -e | grep 'AC'` | grep 'native-path' | cut -d':' -f2 | tr -d '[:blank:]') + INTERFACE=$(ip link | awk '/state UP/ {print $2}' | tr -d :) +} + +# Write values to `system` file # +SET_VALUES() { + if [[ "$ADAPTER" ]]; then + sed -i -e "s/adapter = .*/adapter = $ADAPTER/g" "${SFILE}" + fi + + if [[ "$BATTERY" ]]; then + sed -i -e "s/battery = .*/battery = $BATTERY/g" "${SFILE}" + fi + + if [[ "$CARD" ]]; then + sed -i -e "s/graphics_card = .*/graphics_card = $CARD/g" "${SFILE}" + fi + + if [[ "$INTERFACE" ]]; then + sed -i -e "s/network_interface = .*/network_interface = $INTERFACE/g" "${SFILE}" + fi +} + +# Launch Polybar with the selected style ONLY in the primary display # +LAUNCH_SINGLE_BAR() { + CARD=$(light -L | grep 'backlight' | head -n1 | cut -d'/' -f3) + INTERFACE=$(ip link | awk '/state UP/ {print $2}' | tr -d :) + + if [[ -z "$CARD" ]]; then + sed -i -e 's/backlight/bna/g' "$DIR"/config + + elif [[ "$CARD" != *"intel_"* ]]; then + sed -i -e 's/backlight/brightness/g' "$DIR"/config + fi + + # Close polybar # + killall -q polybar + + # Wait until closing polybar # + while pgrep -u $UID -x polybar >/dev/null; do + sleep 1 + done + + # Launch polybar # + polybar -q main -c "$DIR"/config & +} + +# Execute functions # +GET_VALUES +SET_VALUES + +LAUNCH_SINGLE_BAR diff --git a/configs/bspwm/polybar/modules/cpu b/configs/bspwm/polybar/modules/cpu new file mode 100755 index 0000000..ade0927 --- /dev/null +++ b/configs/bspwm/polybar/modules/cpu @@ -0,0 +1,26 @@ +;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_ + +[module/cpu] +type = internal/cpu +interval = 0.5 + +format =