From: Dmitry Fedotov Date: Sat, 6 Apr 2024 12:36:16 +0000 (+0300) Subject: Refactor shell init scripts. Change tmux configs. Change 'dmunumount' script. Add... X-Git-Url: https://www.git.dmfe.net/?a=commitdiff_plain;h=d1bfc4579955618ee835c792b8833a2204993d10;p=dotfiles Refactor shell init scripts. Change tmux configs. Change 'dmunumount' script. Add 'xephyr' script. --- diff --git a/scripts/dmenumount.sh b/scripts/dmenumount.sh index 489e725..732dc4b 100755 --- a/scripts/dmenumount.sh +++ b/scripts/dmenumount.sh @@ -1,8 +1,8 @@ #!/bin/bash font="Monospace-18" -panel_background=$(xrdb -query | grep '*.panel_background' | awk '{print $NF}') -selected_background=$(xrdb -query | grep '*.ws_focused' | awk '{print $NF}') +panel_background=$(xrdb -query | grep '*.normbgcolor' | awk '{print $NF}') +selected_background=$(xrdb -query | grep '*.selbgcolor' | awk '{print $NF}') pgrep -x dmenu && exit diff --git a/scripts/xephyr.sh b/scripts/xephyr.sh new file mode 100755 index 0000000..8905dbc --- /dev/null +++ b/scripts/xephyr.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +Xephyr -br -ac -reset -screen 1920x1080 :1 & +# Xephyr -br -ac -reset -screen 800x600 :1 & +sleep 1s + +export DISPLAY=:1 + +wallpaper 20 & +xrdb ~/.Xresources +$1 & + diff --git a/shell/aliases/00-aliases b/shell/aliases/00-aliases index 0856897..bf065d7 100644 --- a/shell/aliases/00-aliases +++ b/shell/aliases/00-aliases @@ -1,7 +1,8 @@ # files -alias lla="ls -la" -alias ll="ls -l" -alias llr="ls -laRh" +alias ls="ls $LS_OPTIONS" +alias ll="ls $LS_OPTIONS -l" +alias l="ls $LS_OPTIONS -la" +alias lr="ls $LS_OPTIONS -laRh" # packet manager alias p="pacman" @@ -16,6 +17,9 @@ alias shutdown="sudo shutdown" alias shtd="shutdown -h now" alias reboot="sudo reboot" +# rsync +alias rsync="rsync -vrP --delete-after" + # arango db alias arangor="sudo /etc/init.d/arangodb start" alias arangos="sudo /etc/init.d/arangodb stop" diff --git a/shell/bashrc b/shell/bashrc index 7bd8c2b..f22d0d6 100644 --- a/shell/bashrc +++ b/shell/bashrc @@ -31,5 +31,17 @@ fi complete -cf sudo complete -cf man +# Enable vi mode +set -o vi + # Environment for interactive mode export EDITOR=nvim + +eval "$(dircolors)" + +# Powerline configuration +powerline-daemon -q +POWERLINE_BASH_CONTINUATION=1 +POWERLINE_BASH_SELECT=1 +. /usr/share/powerline/bindings/bash/powerline.sh + diff --git a/shell/envs/03-java b/shell/envs/03-java new file mode 100644 index 0000000..2cec07a --- /dev/null +++ b/shell/envs/03-java @@ -0,0 +1,3 @@ +export JAVA_HOME=/opt/jdks/jdk-17.0.9+9 +export GRADLE_HOME=/opt/build/gradle-8.2.1 + diff --git a/shell/envs/04-options b/shell/envs/04-options new file mode 100644 index 0000000..f9cc4f5 --- /dev/null +++ b/shell/envs/04-options @@ -0,0 +1 @@ +export LS_OPTIONS="--color=auto" diff --git a/shell/inputrc b/shell/inputrc new file mode 100644 index 0000000..70db596 --- /dev/null +++ b/shell/inputrc @@ -0,0 +1,3 @@ +set show-mode-in-prompt on +set vi-cmd-mode-string "\1\e[1;48;5;246;38;5;237m\2 CMD \1\e[48;5;239;38;5;246m\2\1\e[0m\2" +set vi-ins-mode-string "\1\e[1;48;5;109;38;5;237m\2 INS \1\e[48;5;239;38;5;109m\2\1\e[0m\2" diff --git a/tmux/theme.sh b/tmux/theme.sh index 7d1d776..06bad92 100644 --- a/tmux/theme.sh +++ b/tmux/theme.sh @@ -17,19 +17,19 @@ base0D='#6a9fb5' # - Functions, Methods, Attribute IDs, Headings base0E='#3781fa' # - Keywords, Storage, Selector, Markup Italic, Diff Changed base0F='#8f5536' # - Deprecated, Opening/Closing Embedded Language Tags, e.g. -set -g status-left-length 32 -set -g status-right-length 150 -set -g status-interval 5 +# set -g status-left-length 32 +# set -g status-right-length 150 +# set -g status-interval 5 # default statusbar colors -set-option -g status-style fg=$base03,bg=$base00 - -set-window-option -g window-status-style fg=$base03,bg=$base00 -set-window-option -g window-status-format " [#I] #W " +# set-option -g status-style fg=$base03,bg=$base00 +# +# set-window-option -g window-status-style fg=$base03,bg=$base00 +# set-window-option -g window-status-format " [#I] #W " # active window title colors -set-window-option -g window-status-current-style fg=$base06,bg=$base0C -set-window-option -g window-status-current-format " #[bold][#I] #W " +# set-window-option -g window-status-current-style fg=$base06,bg=$base0C +# set-window-option -g window-status-current-format " #[bold][#I] #W " # pane border colors set-window-option -g pane-active-border-style fg=$base00 @@ -42,14 +42,14 @@ set-window-option -g mode-style fg=$base06,bg=$base0C set-option -g message-style bg=$base00,fg=$base06 # pane number display -set-option -g display-panes-active-colour $base0C -set-option -g display-panes-colour $base03 +# set-option -g display-panes-active-colour $base0C +# set-option -g display-panes-colour $base03 # clock -set-window-option -g clock-mode-colour $base0C - -set-option -g status-right '' - -tm_session_name="#[default,bg=$base00,fg=$base06] #S " -set -g status-left "$tm_session_name" +# set-window-option -g clock-mode-colour $base0C +# +# set-option -g status-right '' +# +# tm_session_name="#[default,bg=$base00,fg=$base06] #S " +# set -g status-left "$tm_session_name" diff --git a/tmux/tmux.conf.symlink b/tmux/tmux.conf.symlink index 22b1f9e..3578478 100644 --- a/tmux/tmux.conf.symlink +++ b/tmux/tmux.conf.symlink @@ -44,7 +44,7 @@ set-option -g set-titles-string "#T - #W" ###################### # reload config file -bind r source-file ~/.dotfiles/tmux/tmux.conf.symlink \; display '~/.dotfiles/tmux/tmux.conf.symlink' +bind r source-file ~/dotfiles/tmux/tmux.conf.symlink \; display '~/dotfiles/tmux/tmux.conf.symlink' # split window and fix path for tmux 1.9 bind | split-window -h -c "#{pane_current_path}" @@ -84,4 +84,6 @@ bind-key b select-pane -t 2 \; send-keys Up C-m \; last-pane #### Color $ Style Settings#### ############################### -source ~/.dotfiles/tmux/theme.sh +source ~/dotfiles/tmux/theme.sh +run-shell "powerline-config tmux setup" +