diff options
| -rw-r--r-- | mac/.config/firefox/vdh-settings.json | 2 | ||||
| -rw-r--r-- | mac/.config/kitty/kitty.conf | 5 | ||||
| -rw-r--r-- | mac/.config/mpv/scripts/navigator.lua | 4 | ||||
| -rw-r--r-- | mac/.config/shell/bm-dirs | 4 | ||||
| -rw-r--r-- | mac/.config/shell/profile | 2 | ||||
| -rw-r--r-- | mac/.config/tmux/tmux.conf | 4 | ||||
| -rw-r--r-- | mac/.config/vim/init.vim | 4 | ||||
| -rw-r--r-- | mac/.config/vim/vimrc | 1 | ||||
| -rwxr-xr-x | mac/.local/bin/localshortcuts | 27 | ||||
| -rwxr-xr-x | mac/.local/bin/rbackup | 43 |
10 files changed, 12 insertions, 84 deletions
diff --git a/mac/.config/firefox/vdh-settings.json b/mac/.config/firefox/vdh-settings.json index a159c22..11718dd 100644 --- a/mac/.config/firefox/vdh-settings.json +++ b/mac/.config/firefox/vdh-settings.json @@ -52,7 +52,7 @@ "donateNotAgainExpire": 0, "popupHeightLeftOver": 100, "coappDownloads": "coapp", - "lastDownloadDirectory": "/home/si/Videos", + "lastDownloadDirectory": "/home/si/Movies", "fileDialogType": "tab", "alertDialogType": "tab", "monitorNetworkRequests": true, diff --git a/mac/.config/kitty/kitty.conf b/mac/.config/kitty/kitty.conf index 5662155..71b9421 100644 --- a/mac/.config/kitty/kitty.conf +++ b/mac/.config/kitty/kitty.conf @@ -33,7 +33,7 @@ resize_in_steps no # window_resize_step_lines 0 placement_strategy center # window_border_width 100px -window_margin_width 5 +window_margin_width 15 # single_window_margin_width -1 hide_window_decorations yes # hide_window_decorations titlebar-only @@ -107,7 +107,7 @@ active_border_color #ffa9c9 # inactive_border_color #928374 inactive_border_color #cccccc bell_border_color #f98080 -# wayland_titlebar_color #080808 +# wayland_titlebar_color #080808 # macos_titlebar_color #080808 active_tab_foreground #080808 active_tab_background #a990c9 @@ -142,4 +142,3 @@ tab_bar_background #080808 # color15 #bdae93 # color7 #bbbbbb # color15 #ffffff - diff --git a/mac/.config/mpv/scripts/navigator.lua b/mac/.config/mpv/scripts/navigator.lua index 4533f60..91f9208 100644 --- a/mac/.config/mpv/scripts/navigator.lua +++ b/mac/.config/mpv/scripts/navigator.lua @@ -35,11 +35,9 @@ local settings = { --favorites in format { 'Path to directory, notice trailing /' } --on windows use double backslash c:\\my\\directory\\ favorites = { - "/media/" .. user, - "/mnt/second/videos", home .. "/Downloads", home .. "/Torrents/complete", - home .. "/Videos", + home .. "/Movies", home .. "/.config/mpv/playlists", }, --list of paths to ignore. the value is anything that returns true for if-statement. diff --git a/mac/.config/shell/bm-dirs b/mac/.config/shell/bm-dirs index 7afa15d..27c2113 100644 --- a/mac/.config/shell/bm-dirs +++ b/mac/.config/shell/bm-dirs @@ -60,8 +60,8 @@ gss ${XDG_PICTURES_DIR:-${HOME}/Pictures}/screenshots gtc $HOME/Torrents/complete gti $HOME/Torrents/incomplete gtt $HOME/Torrents -gvr ${XDG_VIDEOS_DIR:-${HOME}/Videos}/recordings -gvv ${XDG_VIDEOS_DIR:-${HOME}/Videos} +gvr ${XDG_VIDEOS_DIR:-${HOME}/Movies}/recordings +gvv ${XDG_VIDEOS_DIR:-${HOME}/Movies} gwf $HOME/.librewolf/$USER.default gwo ${XDG_DESKTOP_DIR:-${HOME}/Desktop}/Work gww ${XDG_PICTURES_DIR:-${HOME}/Pictures}/wallpaper diff --git a/mac/.config/shell/profile b/mac/.config/shell/profile index 21858e9..eef2c13 100644 --- a/mac/.config/shell/profile +++ b/mac/.config/shell/profile @@ -43,7 +43,7 @@ export XDG_MUSIC_DIR="$HOME/Music" export XDG_PICTURES_DIR="$HOME/Pictures" export XDG_PUBLICSHARE_DIR="$HOME/Public" export XDG_TEMPLATES_DIR="$HOME/Templates" -export XDG_VIDEOS_DIR="$HOME/Videos" +export XDG_VIDEOS_DIR="$HOME/Movies" ################################################### ### --- DEFAULT ENV PATHES FOR ALL PROGRAMS --- ### diff --git a/mac/.config/tmux/tmux.conf b/mac/.config/tmux/tmux.conf index 069a7cd..ccdb412 100644 --- a/mac/.config/tmux/tmux.conf +++ b/mac/.config/tmux/tmux.conf @@ -13,7 +13,7 @@ if 'test ! -d "${TMUX_PLUGIN_MANAGER_PATH}/tpm"' { set -as terminal-features 'xterm*:extkeys' set -g base-index 1 set -g pane-base-index 1 -set -g default-shell /usr/bin/zsh +set -g default-shell /bin/zsh set -g detach-on-destroy off set -s extended-keys on set -g focus-events on @@ -273,7 +273,7 @@ set -g @offline_icon "nok" set -ogq @thm_bg "default" # transparent background set -g status-left "" set -g status-left-length 90 -set -ga status-left "#[bg=default,fg=#{@thm_red}] #(tmux list-sessions | nl | grep -w \"$(tmux display-message -p '#S')\" | awk '{print \$1}')/#(tmux list-sessions | wc -l) " +set -ga status-left "#[bg=default,fg=#{@thm_red}] #(tmux list-sessions | nl | grep -w \"$(tmux display-message -p '#S')\" | awk '{print \$1}' | tr -d '[:space:]')/#(tmux list-sessions | wc -l | tr -d '[:space:]') " set -ga status-left "#[bg=default,fg=#{@thm_overlay_0},none]│" set -ga status-left "#{?client_prefix,#{#[bg=#{@thm_surface_2},fg=#{@thm_green},bold,italics] #S },#{#[bg=default,fg=#{@thm_green}] #S }}" set -ga status-left "#[bg=default,fg=#{@thm_overlay_0},none]│" diff --git a/mac/.config/vim/init.vim b/mac/.config/vim/init.vim index c39c130..ecc2c99 100644 --- a/mac/.config/vim/init.vim +++ b/mac/.config/vim/init.vim @@ -1,4 +1,3 @@ - " AUTOCMD ---------------------------------------------------------------- {{{ " Close with q @@ -232,7 +231,8 @@ augroup END let g:lsp_fold_enabled = 0 let g:lsp_log_verbose = 1 -let g:lsp_log_file = expand('~/.cache/vim/vim-lsp.log') +call mkdir(expand('~/.cache/vim'), 'p') +let g:lsp_log_file = expand('~/.cache/vim/vim-lsp.log') let g:asyncomplete_log_file = expand('~/.cache/vim/asyncomplete.log') let g:lsp_settings_filetype_python = ['pyright-langserver', 'ruff', 'ruff-lsp'] diff --git a/mac/.config/vim/vimrc b/mac/.config/vim/vimrc index b2cc1a1..7185687 100644 --- a/mac/.config/vim/vimrc +++ b/mac/.config/vim/vimrc @@ -9,6 +9,7 @@ if $USER != "root" set packpath^=$XDG_DATA_HOME/vim,$XDG_CONFIG_HOME/vim set packpath+=$XDG_CONFIG_HOME/vim/after,$XDG_DATA_HOME/vim/after + let g:netrw_home = $XDG_DATA_HOME."/vim" call mkdir($XDG_DATA_HOME."/vim/spell", 'p') diff --git a/mac/.local/bin/localshortcuts b/mac/.local/bin/localshortcuts index b9d5ba9..98977c7 100755 --- a/mac/.local/bin/localshortcuts +++ b/mac/.local/bin/localshortcuts @@ -57,30 +57,3 @@ eval "echo \"$(cat "$bmfiles")\"" | printf(\"nmap <localleader><localleader>%s :e %s<cr>\n\",\$1,\$2) >> \"$vim_shortcuts\" ; printf(\"vim.keymap.set('c', ';%s', '%s<cr>', { noremap = true, silent = true, desc = '%s' })\n\", \$1, \$2, gensub(\"^/home/$USER/\",\"~/\",\"g\",\$2)) >> \"$nvim_shortcuts\" ; printf(\"vim.keymap.set('n', '<localleader><localleader>%s', '<cmd>e %s<cr>', { noremap = true, silent = true, desc = '%s' })\n\", \$1, \$2, gensub(\"^/home/$USER/\",\"~/\",\"g\",\$2)) >> \"$nvim_shortcuts\"}" - -# # root -# root_shell_shortcuts="/root/.config/shell/rootshortcutrc" -# root_zsh_named_dirs="/root/.config/shell/rootzshnameddirrc" -# root_lf_shortcuts="/root/.config/lf/rootshortcutrc" -# root_vim_shortcuts="/root/.config/vim/rootshortcuts.vim" -# -# sudo rm -f "$root_zsh_named_dirs" "$root_lf_shortcuts" "$root_vim_shortcuts" 2>/dev/null -# printf "# vim: filetype=sh\\nalias " | sudo tee "$root_shell_shortcuts" 2>/dev/null -# sudo mkdir -p /root/.config/shell/ /root/.config/lf/ /root/.config/vim/ -# sudo touch "$root_shell_shortcuts" "$root_zsh_named_dirs" "$root_lf_shortcuts" "$root_vim_shortcuts" -# -# eval "echo \"$(cat "$bmdirs")\"" | -# sudo awk "!/^\s*#/ && !/^\s*\$/ && /cache|config($|\/bash|\/lf|\/shell|\/vim)|local\/(bin|share|state)$/ {gsub(\"\\\s*#.*$\",\"\"); gsub(\"home/$USER\", \"root\"); -# printf(\",%s=\42cd %s && ls -A\42 \\\\\n\",\$1,\$2) >> \"$root_shell_shortcuts\" ; -# printf(\"hash -d ,%s=%s \n\",\$1,\$2) >> \"$root_zsh_named_dirs\" ; -# printf(\"map ,%s cd \42%s\42 \n\",\$1,\$2) >> \"$root_lf_shortcuts\" ; -# printf(\"cmap ;%s %s\n\",\$1,\$2) >> \"$root_vim_shortcuts\" ; -# printf(\"nmap <localleader><localleader>%s :Explore %s<cr>\n\",\$1,\$2) >> \"$root_vim_shortcuts\"}" -# -# eval "echo \"$(cat "$bmfiles")\"" | -# sudo awk "!/^\s*#/ && !/^\s*\$/ && /config\/(bash|lf|vim)\/.*rc |inputrc|\$EDITOR / {gsub(\"\\\s*#.*$\",\"\"); gsub(\"home/$USER\", \"root\"); -# printf(\",%s=\42\$EDITOR %s\42 \\\\\n\",\$1,\$2) >> \"$root_shell_shortcuts\" ; -# printf(\"hash -d ,%s=%s \n\",\$1,\$2) >> \"$root_zsh_named_dirs\" ; -# printf(\"map ,%s \$\$EDITOR \42%s\42 \n\",\$1,\$2) >> \"$root_lf_shortcuts\" ; -# printf(\"cmap ;%s %s\n\",\$1,\$2) >> \"$root_vim_shortcuts\" ; -# printf(\"nmap <localleader><localleader>%s :e %s<cr>\n\",\$1,\$2) >> \"$root_vim_shortcuts\"}" diff --git a/mac/.local/bin/rbackup b/mac/.local/bin/rbackup index d2dc610..364373d 100755 --- a/mac/.local/bin/rbackup +++ b/mac/.local/bin/rbackup @@ -22,11 +22,9 @@ usage() { echo "" echo "Options:" echo " -h, --help Show this help message" - echo " -r, --root Sync root files only" echo "" echo "Example:" echo " ${0##*/} # Sync all files to backup path" - echo " ${0##*/} --root # Sync root files only" exit 0 } @@ -54,36 +52,6 @@ sync_files() { done } -sync_root() { - # clean targets - sudo rm -rf /root/.config /root/.bash_history /root/.local/share/history - sudo mkdir -p /root/.config/bash /root/.config/lf /root/.config/shell /root/.config/vim /root/.local/bin /root/.local/share/history/vim_history /root/.local/state - - # Root configuration synchronization on local system - sudo rsync -vrazPlu --delete "$vim_path/vimrc" "/root/.config/vim/" >/dev/null 2>&1 - sudo rsync -vrazPlu --delete "$lf_path" "/root/.config/" >/dev/null 2>&1 - sudo mv -f "/root/.config/lf/rooticons" "/root/.config/lf/icons" >/dev/null 2>&1 - sudo rsync -vrazPlu --delete "$bash_path" "/root/.config/" >/dev/null 2>&1 - sudo rsync -vrazPlu --delete "$shell_path/inputrc" "/root/.config/shell/" >/dev/null 2>&1 - - # load shortcuts - shortcuts >/dev/null 2>&1 - - # Modify root's Bash and LF configuration to include user-specific settings - echo "[ -f \"$user_home/.config/shell/shortcutrc\" ] && source \"$user_home/.config/shell/shortcutrc\"" | sudo tee -a /root/.config/bash/bashrc >/dev/null 2>&1 - echo "[ -f \"$user_home/.config/shell/zshnameddirrc\" ] && source \"$user_home/.config/shell/zshnameddirrc\"" | sudo tee -a /root/.config/bash/bashrc >/dev/null 2>&1 - sudo sed -i "s|source[[:space:]]*\"\?~/.config/lf/shortcutrc\"\?|source \"$user_home/.config/lf/shortcutrc\"|" /root/.config/lf/lfrc >/dev/null 2>&1 - sudo grep -q "source \"\?/root/.config/lf/rootshortcutrc\"\?" /root/.config/lf/lfrc || - sudo sed -i "\|source \"\?$user_home/.config/lf/shortcutrc\"\?|a source \"/root/.config/lf/rootshortcutrc\"" /root/.config/lf/lfrc - - # Final ownership and link adjustments - sudo chown -R root:root /root/.config/ >/dev/null 2>&1 - sudo ln -sf /root/.config/bash/bashrc /root/.bashrc >/dev/null 2>&1 - sudo ln -sf /root/.config/bash/bash_profile /root/.bash_profile >/dev/null 2>&1 - sudo ln -sf /root/.config/shell/inputrc /root/.inputrc >/dev/null 2>&1 - sudo ln -sf /root/.config/vim/vimrc /root/.vimrc >/dev/null 2>&1 -} - sync_server() { # clean targets ssh "$THESIAH_SERVER" "rm -rf /root/.config /var/www/thesiah" @@ -137,11 +105,6 @@ handle_long_option() { help) usage ;; - root) - echo "Sync root files..." - sync_root && echo "Success to sync root!" && echo "Done!" || error "Failed to back up root" - exit 0 - ;; *) error "Unknown option: --$1" ;; @@ -154,11 +117,6 @@ process_options() { -h | --help) usage ;; - -r | --root) - echo "Sync root files..." - sync_root && echo "Success to sync root!" && echo "Done!" || error "Failed to back up root" - exit 0 - ;; --*) handle_long_option "${1#--}" ;; @@ -181,7 +139,6 @@ process_options "$@" mount_luks && echo "Mount backup drive... " && echo "Success to mount luks drive!" || error "Failed to mount $backup_path" [ -d "$backup_path" ] || sudo mkdir -p "$backup_path" echo "Sync home files..." && sync_files && echo "Success to sync files!" || error "Failed back up files" -echo "Sync root files..." && sync_root && echo "Success to sync root!" || error "Failed back up root" echo "Sync server files..." && sync_server && echo "Success to sync server!" || error "Failed back up server" echo "Sync files to nextcloud..." && sync_nextcloud && echo "Success to sync nextcloud!" || error "Failed back up nextcloud" echo "Done!" |
