From: Dmitry Fedotov Date: Sun, 14 May 2023 17:05:13 +0000 (+0300) Subject: Rework configs and shell init scripts. X-Git-Url: https://git.dmfe.net/?a=commitdiff_plain;h=dcd7c38854d7993b4098c0dabea21488f167d9aa;p=dotfiles Rework configs and shell init scripts. --- diff --git a/config/i3/config b/config/i3/config deleted file mode 100644 index 8881ef0..0000000 --- a/config/i3/config +++ /dev/null @@ -1,230 +0,0 @@ -# This file has been auto-generated by i3-config-wizard(1). -# It will not be overwritten, so edit it as you like. -# -# Should you change your keyboard layout some time, delete -# this file and re-run i3-config-wizard(1). -# - -# i3 config file (v4) -# -# Please see https://i3wm.org/docs/userguide.html for a complete reference! - -# Custom variables -set $scripts_dir ~/scripts -set $mod Mod4 - -# Font for window titles. Will also be used by the bar unless a different font -# is used in the bar {} block below. -font pango:sans 12 - -# This font is widely installed, provides lots of unicode glyphs, right-to-left -# text rendering and scalability on retina/hidpi displays (thanks to pango). -#font pango:DejaVu Sans Mono 8 - -# Before i3 v4.8, we used to recommend this one as the default: -# font -misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1 -# The font above is very space-efficient, that is, it looks good, sharp and -# clear in small sizes. However, its unicode glyph coverage is limited, the old -# X core fonts rendering does not support right-to-left and this being a bitmap -# font, it doesn’t scale on retina/hidpi displays. - -# Use Mouse+$mod to drag floating windows to their wanted position -floating_modifier $mod - -# start a terminal -#bindsym $mod+Return exec $term - -# kill focused window -bindsym $mod+Shift+q kill - -# gaps size -bindsym $mod+s gaps inner current plus 5 -bindsym $mod+Shift+s gaps inner current minus 5 -bindsym $mod+Shift+d gaps inner current set 0; gaps outer current set 0 - -# There also is the (new) i3-dmenu-desktop which only displays applications -# shipping a .desktop file. It is a wrapper around dmenu, so you need that -# installed. -# bindsym $mod+d exec --no-startup-id i3-dmenu-desktop - -# change focus -bindsym $mod+h focus left -bindsym $mod+j focus down -bindsym $mod+k focus up -bindsym $mod+l focus right - -# alternatively, you can use the cursor keys: -bindsym $mod+Left focus left -bindsym $mod+Down focus down -bindsym $mod+Up focus up -bindsym $mod+Right focus right - -# move focused window -bindsym $mod+Shift+h move left 30 px -bindsym $mod+Shift+j move down 30 px -bindsym $mod+Shift+k move up 30 px -bindsym $mod+Shift+l move right 30 px - -# alternatively, you can use the cursor keys: -bindsym $mod+Shift+Left move left -bindsym $mod+Shift+Down move down -bindsym $mod+Shift+Up move up -bindsym $mod+Shift+Right move right - -# enter fullscreen mode for the focused container -bindsym $mod+f fullscreen toggle - -# change container layout (stacked, tabbed, toggle split) -bindsym $mod+Mod1+s layout stacking -bindsym $mod+Mod1+w layout tabbed -bindsym $mod+Mod1+v layout splitv -bindsym $mod+Mod1+h layout splith -bindsym $mod+backslash split horizontal -bindsym $mod+minus split vertical - -# toggle tiling / floating -bindsym $mod+Shift+space floating toggle - -# change focus between tiling / floating windows -bindsym $mod+space focus mode_toggle - -# focus the parent container -bindsym $mod+a focus parent - -# focus the child container -#bindsym $mod+d focus child - -# Define names for default workspaces for which we configure key bindings later on. -# We use variables to avoid repeating the names in multiple places. -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 " - -# switch to workspace -bindsym $mod+1 workspace $ws1 -bindsym $mod+2 workspace $ws2 -bindsym $mod+3 workspace $ws3 -bindsym $mod+4 workspace $ws4 -bindsym $mod+5 workspace $ws5 -bindsym $mod+6 workspace $ws6 -bindsym $mod+7 workspace $ws7 -bindsym $mod+8 workspace $ws8 -bindsym $mod+9 workspace $ws9 -bindsym $mod+0 workspace $ws10 - -# move focused container to workspace -bindsym $mod+Shift+1 move container to workspace $ws1 -bindsym $mod+Shift+2 move container to workspace $ws2 -bindsym $mod+Shift+3 move container to workspace $ws3 -bindsym $mod+Shift+4 move container to workspace $ws4 -bindsym $mod+Shift+5 move container to workspace $ws5 -bindsym $mod+Shift+6 move container to workspace $ws6 -bindsym $mod+Shift+7 move container to workspace $ws7 -bindsym $mod+Shift+8 move container to workspace $ws8 -bindsym $mod+Shift+9 move container to workspace $ws9 -bindsym $mod+Shift+0 move container to workspace $ws10 - -# reload the configuration file -bindsym $mod+Shift+c reload -# restart i3 inplace (preserves your layout/session, can be used to upgrade i3) -bindsym $mod+Shift+r restart -# exit i3 (logs you out of your X session) -bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -b 'Yes, exit i3' 'i3-msg exit'" - -# resize window (you can also use the mouse for that) -mode "resize" { - # These bindings trigger as soon as you enter the resize mode - - # Pressing left will shrink the window’s width. - # Pressing right will grow the window’s width. - # Pressing up will shrink the window’s height. - # Pressing down will grow the window’s height. - bindsym h resize shrink width 5 px or 5 ppt - bindsym j resize grow height 5 px or 5 ppt - bindsym k resize shrink height 5 px or 5 ppt - bindsym l resize grow width 5 px or 5 ppt - - # same bindings, but for the arrow keys - 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 - - # back to normal: Enter or Escape or $mod+r - bindsym Return mode "default" - bindsym Escape mode "default" - bindsym $mod+r mode "default" -} - -bindsym $mod+r mode "resize" - -# Start i3bar to display a workspace bar (plus the system information i3status -# finds out, if available) -bar { - status_command i3blocks -c ~/.config/i3blocks/config - position top - #mode dock - mode dock - #hidden_state hide - modifier None - #modifier $mod - font pango:sans 12 - colors { - background $bg-color - separator #757575 - # border background text - focused_workspace $bg-color $bar-ws-focus-color $text-color - active_workspace $inactive-bg-color $inactive-bg-color $inactive-text-color - inactive_workspace $inactive-bg-color $inactive-bg-color $inactive-text-color - urgent_workspace $text-color $urgent-bg-color $text-color - } -} - -# Configuring gaps -for_window [class="^.*"] border pixel 2 -gaps inner 8 -gaps outer 8 - -# Window colors -set_from_resource $bar-ws-focus-color ws_focused -set_from_resource $bg-color panel_background -set_from_resource $inactive-bg-color panel_background -set_from_resource $text-color text_color -set_from_resource $inactive-text-color inactive_text -set_from_resource $urgent-bg-color urgent_bg - -client.focused $bg-color $bar-ws-focus-color $text-color $urgent-bg-color -client.unfocused $inactive-bg-color $inactive-bg-color $inactive-text-color $urgent-bg-color -client.focused_inactive $inactive-bg-color $inactive-bg-color $inactive-text-color $urgent-bg-color -client.urgent $urgent-bg-color $urgent-bg-color $text-color $urgent-bg-color - -# Pulse Audio controls -bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume 1 +5% #increase sound volume -bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume 1 -5% #decrease sound volume -bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute 1 toggle # mute sound - -# Media player controls -bindsym XF86AudioPlay exec playerctl play -bindsym XF86AudioPause exec playerctl pause -bindsym XF86AudioNext exec playerctl next -bindsym XF86AudioPrev exec playerctl previous - -# Workspaces mappings -assign [class= "Thunderbird"] $ws6 -assign [class= "Steam"] $ws7 -assign [class= "Firefox"] $ws10 -assign [class= "Skype"] $ws8 -assign [class= "TelegramDesktop"] $ws9 - -# for developing purposes... -for_window [class="SFML works!"] floating enable border normal -for_window [class="Minusculo"] floating enable border normal -for_window [class="bomber"] floating enable border normal -for_window [class="Firefox"] floating enable normal diff --git a/config/i3blocks/config b/config/i3blocks/config deleted file mode 100644 index f6cfc16..0000000 --- a/config/i3blocks/config +++ /dev/null @@ -1,142 +0,0 @@ -# i3blocks config file -# -# Please see man i3blocks for a complete reference! -# The man page is also hosted at http://vivien.github.io/i3blocks -# -# List of valid properties: -# -# align -# color -# background -# border -# command -# full_text -# instance -# interval -# label -# min_width -# name -# separator -# separator_block_width -# short_text -# signal -# urgent - -# Global properties -# -# The top properties below are applied to every block, but can be overridden. -# Each block command defaults to the script name to avoid boilerplate. -command=/usr/local/libexec/i3blocks/$BLOCK_NAME -align=center -separator_block_width=0 -markup=none - -border_left=0 -border_right=0 -border_top=0 -border_bottom=0 - -[separator1] -command=echo  | ~/scripts/i3b-formatter.sh -s -interval=once - -[focused-window] -command=~/scripts/window-title.sh | ~/scripts/i3b-formatter.sh -r -align=center -interval=repeat -min_width=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx - -[separator4] -command=echo  | ~/scripts/i3b-formatter.sh -s -interval=once - -[mpd] -command=~/scripts/i3mpd.sh | ~/scripts/i3b-formatter.sh -interval=1 -align=left - -[separator1] -command=echo  | ~/scripts/i3b-formatter.sh -s -interval=once - -[volume] -command=~/scripts/sound/volume.sh | ~/scripts/i3b-formatter.sh -r -signal=10 -interval=once -min_width=xxx100% - -[separator2] -command=echo  | ~/scripts/i3b-formatter.sh -r -s -interval=once - -[memory] -command=~/scripts/mem.sh | ~/scripts/i3b-formatter.sh -interval=15 -min_width=x99.9G/99.9G - -[separator1] -command=echo  | ~/scripts/i3b-formatter.sh -s -interval=once - -[disk] -command=~/scripts/disk.sh /home | ~/scripts/i3b-formatter.sh -r -interval=30 -min_width=xx999G/999G - -[separator2] -command=echo  | ~/scripts/i3b-formatter.sh -r -s -interval=once - -[iface] -command=~/scripts/iface.sh | ~/scripts/i3b-formatter.sh -interval=10 -min_width=x000.000.000.000 - -[separator1] -command=echo  | ~/scripts/i3b-formatter.sh -s -interval=once - -[bandwidth] -command=~/scripts/nettraf.sh | ~/scripts/i3b-formatter.sh -r -interval=10 -min_width=xddddKiBxddddKiB - -[separator2] -command=echo  | ~/scripts/i3b-formatter.sh -r -s -interval=once - -[cpu_util] -command=~/scripts/cpu-util.sh | ~/scripts/i3b-formatter.sh -interval=10 -min_width=x 100% - -[separator3] -command=echo "  " | ~/scripts/i3b-formatter.sh -s -interval=once - -[cpu_temp] -command=~/scripts/cpu-temp.sh | ~/scripts/i3b-formatter.sh -interval=10 -min_width=xxx100.0x - -[separator1] -command=echo  | ~/scripts/i3b-formatter.sh -s -interval=once - -[time] -command=~/scripts/date-time.sh | ~/scripts/i3b-formatter.sh -r -interval=5 - -[separator2] -command=echo  | ~/scripts/i3b-formatter.sh -r -s -interval=once - -[keymap] -command=~/scripts/keymap-switch.sh | ~/scripts/i3b-formatter.sh -signal=5 -interval=once -min_width=xxx us - -[vpn] -command=~/scripts/vpn/vpn-status | ~/scripts/i3b-formatter.sh -interval=15 diff --git a/scripts/iface.sh b/scripts/iface.sh index aa2b1f6..15554b5 100755 --- a/scripts/iface.sh +++ b/scripts/iface.sh @@ -19,7 +19,7 @@ case $1 in af=inet6? ;; esac -ipaddr=$(ip addr show enp3s0 | awk '/inet/ { print $2 ; exit }' | sed 's/\/.*//g') +ipaddr=$(ip addr show enp4s0 | awk '/inet/ { print $2 ; exit }' | sed 's/\/.*//g') echo "${icon} ${ipaddr}" echo diff --git a/scripts/keymap-switch.sh b/scripts/keymap-switch.sh index 0c8aba3..29e9a6e 100755 --- a/scripts/keymap-switch.sh +++ b/scripts/keymap-switch.sh @@ -6,10 +6,15 @@ i3bpid="$(cat ${i3bkeymapfile})" i3bpidcur="$(pidof i3blocks)" if [[ ${i3bpid} == ${i3bpidcur} ]]; then - xkb-switch -n + cur_layout="$(setxkbmap -query | grep layout | awk '{print $2}')" + if [[ $cur_layout == "us" ]]; then + setxkbmap ru + else + setxkbmap us + fi else echo "${i3bpidcur}" > "${i3bkeymapfile}" fi -out="$(xkb-switch)" +out="$(setxkbmap -query | grep layout | awk '{print $2}')" printf "%s %s\n" "${icon}" "${out}" diff --git a/scripts/wallpaper.sh b/scripts/wallpaper.sh index 2ffc7f6..fd22ef9 100755 --- a/scripts/wallpaper.sh +++ b/scripts/wallpaper.sh @@ -1,14 +1,11 @@ #!/bin/bash -period=$1 -wp_dir=~/Pictures/wallpapers +period=${1:-1} +WALLPAPERS_DIR="$SHARE_LOCAL_PICTURES/wallpapers" while true do - cur_wp_name=$(ls -1 $wp_dir | shuf | head -n 1) - -# echo $cur_wp_name - feh --bg-scale $wp_dir/$cur_wp_name - + cur_wp_name=$(ls -1 $WALLPAPERS_DIR | shuf | head -n 1) + xwallpaper --zoom "$WALLPAPERS_DIR/$cur_wp_name" sleep ${period}m done diff --git a/shell/.bash_profile.symlink b/shell/.bash_profile.symlink deleted file mode 100644 index dfac0ac..0000000 --- a/shell/.bash_profile.symlink +++ /dev/null @@ -1,25 +0,0 @@ -# __ __ _____ __ -# / /_ ____ ______/ /_ ____ _________ / __(_) /__ -# / __ \/ __ `/ ___/ __ \ / __ \/ ___/ __ \/ /_/ / / _ \ -# _ / /_/ / /_/ (__ ) / / / / /_/ / / / /_/ / __/ / / __/ -#(_)_.___/\__,_/____/_/ /_/_____/ .___/_/ \____/_/ /_/_/\___/ -# /_____/_/ -# -# /etc/skel/.bash_profile - -# This file is sourced by bash for login shells. The following line -# runs your .bashrc and is recommended by the bash info pages. - -export DOT_FILES="${HOME}/.dotfiles" -export DOT_FILES_TMUX="${DOT_FILES}/tmux" -export DOT_FILES_VIM="${DOT_FILES}/vim" -export DOT_FILES_VIM_C_DEV="${DOT_FILES_VIM}/c-dev" -export DOT_FILES_SHELL="${DOT_FILES}/shell" -export DOT_FILES_SHELL_INIT="${DOT_FILES_SHELL}/init_scripts" -export SCRIPTS="${HOME}/scripts" - -if [[ -d ${DOT_FILES_SHELL_INIT} ]]; then - for s in $(ls -a ${DOT_FILES_SHELL_INIT} | grep -v "\.$"); do - . ${DOT_FILES_SHELL_INIT}/$s - done -fi diff --git a/shell/aliases/00-aliases b/shell/aliases/00-aliases new file mode 100644 index 0000000..0856897 --- /dev/null +++ b/shell/aliases/00-aliases @@ -0,0 +1,21 @@ +# files +alias lla="ls -la" +alias ll="ls -l" +alias llr="ls -laRh" + +# packet manager +alias p="pacman" +alias sp="sudo pacman" + +# programs +alias v='nvim' +alias tmux="tmux -f ${XDG_CONFIG_HOME}/tmux/config" + +# system management +alias shutdown="sudo shutdown" +alias shtd="shutdown -h now" +alias reboot="sudo reboot" + +# arango db +alias arangor="sudo /etc/init.d/arangodb start" +alias arangos="sudo /etc/init.d/arangodb stop" diff --git a/shell/bash_profile b/shell/bash_profile new file mode 100644 index 0000000..cbce496 --- /dev/null +++ b/shell/bash_profile @@ -0,0 +1,24 @@ +# __ __ _____ __ +# / /_ ____ ______/ /_ ____ _________ / __(_) /__ +# / __ \/ __ `/ ___/ __ \ / __ \/ ___/ __ \/ /_/ / / _ \ +# _ / /_/ / /_/ (__ ) / / / / /_/ / / / /_/ / __/ / / __/ +#(_)_.___/\__,_/____/_/ /_/_____/ .___/_/ \____/_/ /_/_/\___/ +# /_____/_/ + +# This file is sourced by bash for login shells. + +# Environment variables +ENVS_CONFIGS=${HOME}/dotfiles/shell/envs +if [[ -d ${ENVS_CONFIGS} ]]; then + for f in ${ENVS_CONFIGS}/*; do + [[ -f ${f} ]] && source ${f} + done + unset f +fi + +# Local .bashrc +source ${HOME}/.bashrc + +# Start X +[[ ! ${DISPLAY} && $(tty) = /dev/tty1 ]] && exec startx + diff --git a/shell/bashrc b/shell/bashrc new file mode 100644 index 0000000..7bd8c2b --- /dev/null +++ b/shell/bashrc @@ -0,0 +1,35 @@ +# __ __ +# / /_ ____ ______/ /_ __________ +# / __ \/ __ `/ ___/ __ \/ ___/ ___/ +# _ / /_/ / /_/ (__ ) / / / / / /__ +#(_)_.___/\__,_/____/_/ /_/_/ \___/ + +if [[ $- != *i* ]] ; then + # Shell is non-interactive. Be done now! + return +fi + +# Aliases +ALIASES_CONFIGS=${DOT_FILES_SHELL}/aliases +if [[ -d ${ALIASES_CONFIGS} ]]; then + for f in ${ALIASES_CONFIGS}/*; do + [[ -f ${f} ]] && source ${f} + done + unset f +fi + +# Functions +FUNCTIONS_CONFIGS=${DOT_FILES_SHELL}/functions +if [[ -d ${FUNCTIONS_CONFIGS} ]]; then + for f in ${FUNCTIONS_CONFIGS}/*; do + [[ -f ${f} ]] && source ${f} + done + unset f +fi + +# Autocompletion +complete -cf sudo +complete -cf man + +# Environment for interactive mode +export EDITOR=nvim diff --git a/shell/envs/00-dotfiles b/shell/envs/00-dotfiles new file mode 100644 index 0000000..3c4990b --- /dev/null +++ b/shell/envs/00-dotfiles @@ -0,0 +1,6 @@ +export DOT_FILES="${HOME}/dotfiles" +export DOT_FILES_CONFIG="${DOT_FILES}/config" +export DOT_FILES_SCRIPTS="${DOT_FILES}/scripts" +export DOT_FILES_SHELL="${DOT_FILES}/shell" +export DOT_FILES_TMUX="${DOT_FILES}/tmux" + diff --git a/shell/envs/01-path b/shell/envs/01-path new file mode 100644 index 0000000..c17b624 --- /dev/null +++ b/shell/envs/01-path @@ -0,0 +1,4 @@ +LOCAL_BIN=${HOME}/.local/bin +if [[ -d ${LOCAL_BIN} ]]; then + export PATH=${LOCAL_BIN}:${PATH} +fi diff --git a/shell/envs/02-xdg b/shell/envs/02-xdg new file mode 100644 index 0000000..80e4724 --- /dev/null +++ b/shell/envs/02-xdg @@ -0,0 +1,4 @@ +export XDG_CONFIG_HOME=${HOME}/.config +export XDG_LOCAL_HOME=${HOME}/.local +export SHARE_LOCAL=${XDG_LOCAL_HOME}/share +export SHARE_LOCAL_PICTURES=${SHARE_LOCAL}/pictures diff --git a/shell/functions/00-functions b/shell/functions/00-functions new file mode 100644 index 0000000..785650b --- /dev/null +++ b/shell/functions/00-functions @@ -0,0 +1,16 @@ +function cdd() { + font="monospace" + root_dev_folder=~/dev + dev_folder_name=`ls -1 "${root_dev_folder}" | dmenu -fn "${font}" -i -p "Choose dev folder:"` + + if [[ ${dev_folder_name} ]]; then + dev_folder=${root_dev_folder}/${dev_folder_name} + + projects_count=`ls -1 "${dev_folder}" | wc -l` + project_name=`ls -1 "${dev_folder}" | dmenu -fn "${font}" -i -p "${dev_folder_name}" -l \ + "${projects_count}"` + + [ ${project_name} ] && cd ${dev_folder}/${project_name} + fi +} + diff --git a/shell/init_scripts/arango.mrc b/shell/init_scripts/arango.mrc deleted file mode 100644 index de639b5..0000000 --- a/shell/init_scripts/arango.mrc +++ /dev/null @@ -1,8 +0,0 @@ -# ____ __________ _____ ____ _____ -# / __ `/ ___/ __ `/ __ \/ __ `/ __ \ -# _/ /_/ / / / /_/ / / / / /_/ / /_/ / -#(_)__,_/_/ \__,_/_/ /_/\__, /\____/ -# /____/ - -alias arangor="sudo /etc/init.d/arangodb start" -alias arangos="sudo /etc/init.d/arangodb stop" diff --git a/shell/init_scripts/bashrc.mrc b/shell/init_scripts/bashrc.mrc deleted file mode 100644 index ea765a4..0000000 --- a/shell/init_scripts/bashrc.mrc +++ /dev/null @@ -1,31 +0,0 @@ -# __ __ -# / /_ ____ ______/ /_ __________ -# / __ \/ __ `/ ___/ __ \/ ___/ ___/ -# _ / /_/ / /_/ (__ ) / / / / / /__ -#(_)_.___/\__,_/____/_/ /_/_/ \___/ - -# Test for an interactive shell. There is no need to set anything -# past this point for scp and rcp, and it's important to refrain from -# outputting anything in those cases. -if [[ $- != *i* ]] ; then - # Shell is non-interactive. Be done now! - return -fi - -# Put your fun stuff here. - -LOCAL_BIN=${HOME}/.local/bin -if [[ -d ${LOCAL_BIN} ]]; then - export PATH=${LOCAL_BIN}:${PATH} -fi - -alias lla="ls -la" -alias ll="ls -l" -alias llr="ls -laRh" - -complete -cf sudo -complete -cf man - -export EDITOR=nvim - -. /usr/share/bash-completion/bash_completion diff --git a/shell/init_scripts/configs.mrc b/shell/init_scripts/configs.mrc deleted file mode 100644 index b6754f0..0000000 --- a/shell/init_scripts/configs.mrc +++ /dev/null @@ -1,15 +0,0 @@ -# _____ -# _________ ____ / __(_)___ ______ -# / ___/ __ \/ __ \/ /_/ / __ `/ ___/ -# _/ /__/ /_/ / / / / __/ / /_/ (__ ) -#(_)___/\____/_/ /_/_/ /_/\__, /____/ -# /____/ - -export XDG_CONFIG_HOME=${HOME}/.config - -alias vi='vi -c "let g:tty='\''$(tty)'\''"' -alias nv='nvim' -alias v='nv' -alias i3c="vi ${HOME}/.config/i3/config" -alias bsc="vi ${HOME}/.bashrc" -alias tmux="tmux -f ${XDG_CONFIG_HOME}/tmux/config" diff --git a/shell/init_scripts/funcs.mrc b/shell/init_scripts/funcs.mrc deleted file mode 100644 index ea52e22..0000000 --- a/shell/init_scripts/funcs.mrc +++ /dev/null @@ -1,21 +0,0 @@ -# ____ -# / __/_ ______ __________ -# / /_/ / / / __ \/ ___/ ___/ -# _ / __/ /_/ / / / / /__(__ ) -#(_)_/ \__,_/_/ /_/\___/____/ - -function cdd() { - font="System San Francisco Display" - root_dev_folder=~/dev - dev_folder_name=`ls -1 "${root_dev_folder}" | dmenu -fn "${font}" -i -p "Choose dev folder:"` - - if [[ ${dev_folder_name} ]]; then - dev_folder=${root_dev_folder}/${dev_folder_name} - - projects_count=`ls -1 "${dev_folder}" | wc -l` - project_name=`ls -1 "${dev_folder}" | dmenu -fn "${font}" -i -p "${dev_folder_name}" -l \ - "${projects_count}"` - - [ ${project_name} ] && cd ${dev_folder}/${project_name} - fi -} diff --git a/shell/init_scripts/i3wm.mrc b/shell/init_scripts/i3wm.mrc deleted file mode 100644 index 3554996..0000000 --- a/shell/init_scripts/i3wm.mrc +++ /dev/null @@ -1,7 +0,0 @@ -# _ _____ -# (_)__ / ______ ___ -# / / /_ < | /| / / __ `__ \ -# _ / /___/ / |/ |/ / / / / / / -#(_)_//____/|__/|__/_/ /_/ /_/ - -export TERMINAL=st diff --git a/shell/init_scripts/java.mrc b/shell/init_scripts/java.mrc deleted file mode 100644 index 2a1e750..0000000 --- a/shell/init_scripts/java.mrc +++ /dev/null @@ -1,4 +0,0 @@ -# /etc/skel/.javarc -export JAVA_HOME="/usr/lib/jvm/jdk-11" -export GROOVY_HOME="/opt/groovy/groovy-2.5.15" -export GRADLE_HOME="/opt/gradle/gradle-6.4.1" diff --git a/shell/init_scripts/kube.mrc b/shell/init_scripts/kube.mrc deleted file mode 100644 index 9244b9d..0000000 --- a/shell/init_scripts/kube.mrc +++ /dev/null @@ -1,6 +0,0 @@ -# __ __ -# / /____ __/ /_ ___ -# / //_/ / / / __ \/ _ \ -# / ,< / /_/ / /_/ / __/ -#/_/|_|\__,_/_.___/\___/ -source <(kubectl completion bash) diff --git a/shell/init_scripts/mgmt.mrc b/shell/init_scripts/mgmt.mrc deleted file mode 100644 index a00179d..0000000 --- a/shell/init_scripts/mgmt.mrc +++ /dev/null @@ -1,10 +0,0 @@ -# __ -# ____ ___ ____ _____ / /_ -# / __ `__ \/ __ `/ __ \/ __/ -# _ / / / / / / /_/ / / / / /_ -#(_)_/ /_/ /_/\__, /_/ /_/\__/ -# /____/ - -alias shutdown="sudo shutdown" -alias shtd="shutdown -h now" -alias reboot="sudo reboot" diff --git a/shell/init_scripts/nvm.mrc b/shell/init_scripts/nvm.mrc deleted file mode 100644 index c0f93a0..0000000 --- a/shell/init_scripts/nvm.mrc +++ /dev/null @@ -1,10 +0,0 @@ -# ____ _ ______ ___ -# / __ \ | / / __ `__ \ -# _ / / / / |/ / / / / / / -#(_)_/ /_/|___/_/ /_/ /_/ - -export NVM_DIR="$HOME/.nvm" -# This loads nvm -[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" -# This loads nvm bash_completion -[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" diff --git a/shell/init_scripts/portage.mrc b/shell/init_scripts/portage.mrc deleted file mode 100644 index ca75a7a..0000000 --- a/shell/init_scripts/portage.mrc +++ /dev/null @@ -1,21 +0,0 @@ -# __ -# ____ ____ _____/ /_____ _____ ____ -# / __ \/ __ \/ ___/ __/ __ `/ __ `/ _ \ -# _ / /_/ / /_/ / / / /_/ /_/ / /_/ / __/ -#(_) .___/\____/_/ \__/\__,_/\__, /\___/ -# /_/ /____/ - -alias eqf='equery f' -alias equ='equery u' -alias eqh='equery h' -alias eqa='equery a' -alias eqb='equery b' -alias eql='equery l' -alias eqd='equery d' -alias eqg='equery g' -alias eqc='equery c' -alias eqk='equery k' -alias eqm='equery m' -alias eqy='equery y' -alias eqs='equery s' -alias eqw='equery w' diff --git a/shell/init_scripts/prompt_power.mrc b/shell/init_scripts/prompt_power.mrc deleted file mode 100644 index 3478186..0000000 --- a/shell/init_scripts/prompt_power.mrc +++ /dev/null @@ -1,14 +0,0 @@ -# __ -# ____ _________ ____ ___ ____ / /_ -# / __ \/ ___/ __ \/ __ `__ \/ __ \/ __/ -# _ / /_/ / / / /_/ / / / / / / /_/ / /_ -# (_) .___/_/ \____/_/ /_/ /_/ .___/\__/ -# /_/ /_/ - -function _update_ps1() { - PS1=$(powerline-shell $?) -} - -if [[ $TERM != linux && ! $PROMPT_COMMAND =~ _update_ps1 ]]; then - PROMPT_COMMAND="_update_ps1; $PROMPT_COMMAND" -fi diff --git a/shell/init_scripts/startx.mrc b/shell/init_scripts/startx.mrc deleted file mode 100644 index e69484e..0000000 --- a/shell/init_scripts/startx.mrc +++ /dev/null @@ -1,7 +0,0 @@ -# __ __ -# _____/ /_____ ______/ /__ __ -# / ___/ __/ __ `/ ___/ __/ |/_/ -# _ (__ ) /_/ /_/ / / / /__> < -#(_)____/\__/\__,_/_/ \__/_/|_| - -[[ ! ${DISPLAY} && $(tty) = /dev/tty1 ]] && exec startx diff --git a/shell/init_scripts/vault.mrc b/shell/init_scripts/vault.mrc deleted file mode 100644 index a796b04..0000000 --- a/shell/init_scripts/vault.mrc +++ /dev/null @@ -1,3 +0,0 @@ -export PATH="/opt/vault:${PATH}" - -complete -C /opt/vault/vault vault diff --git a/shell/init_scripts/vpn.mrc b/shell/init_scripts/vpn.mrc deleted file mode 100644 index 37cdd22..0000000 --- a/shell/init_scripts/vpn.mrc +++ /dev/null @@ -1,9 +0,0 @@ -# _ ______ ____ -# | | / / __ \/ __ \ -# _| |/ / /_/ / / / / -#(_)___/ .___/_/ /_/ -# /_/ - -alias vpnr="sudo /etc/init.d/vpnagentd start" -alias vpns="sudo /etc/init.d/vpnagentd stop" -alias vpnui="/opt/cisco/anyconnect/bin/vpnui > /dev/null 2>&1 &"