浏览代码

add: update

Vitaliy Timtsurak 1 月之前
父节点
当前提交
5d8e5552f7
共有 7 个文件被更改,包括 54 次插入34 次删除
  1. 1 0
      .gitignore
  2. 19 20
      config/bspwm/bspwmrc
  3. 1 2
      config/polybar/config.ini
  4. 9 1
      config/polybar/launch.sh
  5. 15 5
      config/ranger/rc.conf
  6. 3 6
      config/ranger/rifle.conf
  7. 6 0
      home/.local/state/dragonplayerstaterc

+ 1 - 0
.gitignore

@@ -7,3 +7,4 @@ home/.local/share/xorg/Xorg.*.log
 home/.local/share/xorg/Xorg.*.log.old
 Profile.env
 ./Profile.env
+home/.local/state/okularstaterc

+ 19 - 20
config/bspwm/bspwmrc

@@ -38,30 +38,29 @@ fi
 # НАСТРОЙКА МОНИТОРОВ И РАБОЧИХ СТОЛОВ
 # ==============================================================================
 
-# Создание и именование рабочих столов (десктопов) на текущем мониторе
-# Мониторы идентифицируются по их именам (например, DVI-0, HDMI-A-0), 
-# но bspwm по умолчанию использует первый (самый левый) монитор.
 source $HOME/dotfiles/Profile.env
 
-if [ $profile == "work" ]
-then
-	bspc monitor HDMI-1 -d 1 2 3 4 5
-	bspc monitor HDMI-2 -d 6 7 8 9 10
-elif [ $profile == "laptop" ]
-then
-	bspc monitor eDP-1 -d 6 7 8 9 10
-	bspc monitor HDMI-1-0 -d 1 2 3 4 5
-
-	if [[ $(xrandr -q | grep " connected" | wc -l) -ge 2 ]]; then
-		bspc monitor eDP-1 -d 6 7 8 9 10
-		bspc monitor HDMI-1-0 -d 1 2 3 4 5
-	else
-		bspc monitor eDP-1 -d 1 2 3 4 5 6 7
-	fi
+# Автоматическое определение монитора для VNC или физического дисплея
+if xrandr -q | grep -q "VNC-0 connected"; then
+    bspc monitor VNC-0 -d 1 2 3 4 5 6 7 8 9 10
+elif [ "$profile" == "work" ]; then
+    bspc monitor HDMI-1 -d 1 2 3 4 5
+    bspc monitor HDMI-2 -d 6 7 8 9 10
+elif [ "$profile" == "laptop" ]; then
+    if [[ $(xrandr -q | grep " connected" | wc -l) -ge 2 ]]; then
+        bspc monitor eDP-1 -d 6 7 8 9 10
+        bspc monitor HDMI-1-0 -d 1 2 3 4 5
+    else
+        bspc monitor eDP-1 -d 1 2 3 4 5 6 7
+    fi
 else
-	_primary=$(xrandr -q | grep "primary" | cut -d' ' -f1)
-	bspc monitor $_primary -d 1 2 3 
+    _primary=$(xrandr -q | grep " connected" | head -n 1 | cut -d' ' -f1)
+    [ -n "$_primary" ] && bspc monitor $_primary -d 1 2 3 4 5 6 7 8 9 10
 fi
+
+# Перезапуск sxhkd для гарантии работы хоткеев на текущем DISPLAY
+pkill -x sxhkd
+sxhkd &
 # Если у вас несколько мониторов, их можно настроить так (пример):
 # bspc monitor DVI-I-1 -d 1 2 3 4
 # bspc monitor DVI-D-0 -d 5 6 7 8 9 10

+ 1 - 2
config/polybar/config.ini

@@ -179,8 +179,7 @@ wm-restack = bspwm
 [bar/bar1]
 ; Выбор монитора. 'primary' - основной.
 ; Узнать: 'xrandr -q' (например, 'eDP-1')
-#monitor = ${env:MONITOR:primary}
-monitor = HDMI-1
+monitor = ${env:MONITOR:HDMI-1}
 
 ; Геометрия
 width = 95%

+ 9 - 1
config/polybar/launch.sh

@@ -8,7 +8,15 @@ killall -q polybar
 # Ожидание полного завершения работы процессов
 while pgrep -u $UID -x polybar >/dev/null; do sleep 1; done
 
-if [ $profile == "work" ]
+# Автоматическое определение монитора
+if xrandr -q | grep -q "VNC-0 connected"; then
+    export MONITOR="VNC-0"
+else
+    # Берем первый попавшийся подключенный монитор, если MONITOR не задан
+    export MONITOR=$(xrandr -q | grep " connected" | head -n 1 | cut -d' ' -f1)
+fi
+
+if [ "$profile" == "work" ]
 then
 	notify-send "Запуск профиля: $profile"
 	# Запуск Polybar

+ 15 - 5
config/ranger/rc.conf

@@ -7,7 +7,7 @@ set use_preview_script true
 set preview_script ~/.config/ranger/scope.sh
 set automatically_count_files true
 set open_all_images true
-set vcs_aware false
+set vcs_aware true
 set vcs_backend_git enabled
 set vcs_backend_hg disabled
 set vcs_backend_bzr disabled
@@ -19,8 +19,9 @@ set w3m_delay 0.02
 set w3m_offset 0
 set iterm2_font_width 8
 set iterm2_font_height 11
-set unicode_ellipsis false
-set bidi_support false
+set unicode_ellipsis true
+set draw_borders both
+set bidi_support true
 set show_hidden_bookmarks true
 set colorscheme default
 set preview_files true
@@ -69,7 +70,7 @@ set sort_unicode false
 set xterm_alt_key false
 set cd_bookmarks true
 set cd_tab_case sensitive
-set cd_tab_fuzzy false
+set cd_tab_fuzzy true
 set preview_max_size 0
 set hint_collapse_threshold 10
 set show_selection_in_titlebar true
@@ -134,10 +135,16 @@ map @  console -p6 shell  %%s
 map #  console shell -p%space
 map s  console shell%space
 map r  chain draw_possible_programs; console open_with%space
+map O  chain draw_possible_programs; console open_with%space
 map f  console find%space
 map cd console cd%space
 
-map <C-p> chain console; eval fm.ui.console.history_move(-1)
+# Перетаскивание файлов (теперь через ripdrag)
+map <C-d> shell ripdrag %p &
+
+# Копирование файла в системный буфер обмена (для Ctrl+V в других программах)
+# Используем xclip. Команда копирует файл как URI, чтобы его понимали браузеры/мессенджеры.
+map <C-c> shell echo -n "file://$(realpath %p)" | xclip -selection clipboard -t text/uri-list
 
 # Change the line mode
 map Mf linemode filename
@@ -171,6 +178,9 @@ map <F8> console delete
 #map <F8> console trash
 map <F10> exit
 
+# F-key cheat sheet
+map <F12> eval fm.notify("F1:Help F2:Ren F3:View F4:Edit F5:Copy F6:Cut F7:Mkdir F8:Del F10:Exit")
+
 # In case you work on a keyboard with dvorak layout
 map <UP>       move up=1
 map <DOWN>     move down=1

+ 3 - 6
config/ranger/rifle.conf

@@ -140,15 +140,12 @@ mime ^video, terminal, !X, has mplayer   = mplayer -- "$@"
 #-------------------------------------------
 # Documents
 #-------------------------------------------
+ext pdf, has okular,   X, flag f = okular -- "$@"
+ext pdf, has google-chrome-stable, X, flag f, label chrome = google-chrome-stable -- "$@"
+ext pdf, has firefox,  X, flag f, label firefox = firefox -- "$@"
 ext pdf, has llpp,     X, flag f = llpp "$@"
 ext pdf, has zathura,  X, flag f = zathura -- "$@"
 ext pdf, has mupdf,    X, flag f = mupdf "$@"
-ext pdf, has mupdf-x11,X, flag f = mupdf-x11 "$@"
-ext pdf, has apvlv,    X, flag f = apvlv -- "$@"
-ext pdf, has xpdf,     X, flag f = xpdf -- "$@"
-ext pdf, has evince,   X, flag f = evince -- "$@"
-ext pdf, has atril,    X, flag f = atril -- "$@"
-ext pdf, has okular,   X, flag f = okular -- "$@"
 ext pdf, has epdfview, X, flag f = epdfview -- "$@"
 ext pdf, has qpdfview, X, flag f = qpdfview "$@"
 ext pdf, has open,     X, flag f = open "$@"

+ 6 - 0
home/.local/state/dragonplayerstaterc

@@ -0,0 +1,6 @@
+[MainWindow]
+2 screens: Height=224
+2 screens: Width=424
+2 screens: XPosition=1482
+2 screens: YPosition=842
+HDMI-1 HDMI-2=HDMI-1