├── config ├── ranger │ ├── tagged │ ├── commands.py │ ├── rifle.conf │ ├── scope.sh │ └── rc.conf ├── mutt │ ├── signature_muttrc │ ├── mailcap_muttrc │ ├── muttrc │ └── color.muttrc ├── rofi │ ├── config.rasi │ ├── config │ └── theme.rasi ├── neofetch │ ├── batman3 │ ├── batman │ ├── batman2 │ └── config.conf ├── zathura │ └── zathurarc └── i3 │ ├── i3blocks.conf │ └── config ├── vim ├── plugins │ ├── vim-snippets.vim │ ├── vim-surround.vim │ ├── vim-commentary.vim │ ├── DoxygenToolkit.vim │ ├── vim-cpp-enhanced-highlight.vim │ ├── vim-fugitive.vim │ ├── ultisnips.vim │ ├── netrw_settings.vim │ ├── vimtex.vim │ ├── fzf.vim │ ├── terminal_build.vim │ ├── vim-hardtime.vim │ ├── vim-markdown.vim │ ├── lightline.vim │ ├── switch_source_header.vim │ ├── tag_managment.vim │ └── my_autocomplete.vim ├── after │ └── ftplugin │ │ ├── cmake.vim │ │ ├── python.vim │ │ ├── plantuml.vim │ │ ├── cpp.vim │ │ └── markdown.vim ├── UltiSnips │ ├── cpp.snippets │ └── tex.snippets ├── autoload │ └── onedark.vim ├── colors │ ├── my_theme.vim │ └── new_theme.vim └── vimrc ├── .gitignore ├── scripts ├── i3block_template_script.sh ├── change_wallpaper_i3blocks.sh ├── exit.sh ├── shutdown.sh ├── gif_wallpaper.sh ├── pre_lock.sh ├── change_wallpaper.sh ├── cpu.sh ├── wlan.sh ├── memory.sh ├── screenshot.sh ├── wlan_nm.sh ├── toggle_bar.sh ├── change_brightness.sh ├── next_workspace.sh ├── send_next_workspace.sh ├── passmenu ├── catkin_workspace_switcher.sh ├── alarm.sh ├── low_battery.sh ├── get_wallpaper.sh ├── change_volume.sh ├── gif_selector.sh ├── beamer.sh ├── wifi └── pendrive.sh ├── update_dotfiles.sh ├── Xdefaults ├── nord.xresource ├── terminal_cmd_help.md ├── LICENSE ├── tmux.conf ├── source_list ├── README.md ├── zshrc ├── bash_aliases ├── urxvt └── ext │ ├── clipboard │ ├── url-select │ ├── font-size │ └── keyboard-select ├── aliases ├── installation_guide.md └── bashrc /config/ranger/tagged: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /vim/plugins/vim-snippets.vim: -------------------------------------------------------------------------------- 1 | Plug 'honza/vim-snippets' 2 | -------------------------------------------------------------------------------- /vim/plugins/vim-surround.vim: -------------------------------------------------------------------------------- 1 | Plug 'tpope/vim-surround' 2 | -------------------------------------------------------------------------------- /vim/after/ftplugin/cmake.vim: -------------------------------------------------------------------------------- 1 | setlocal commentstring=#\ %s 2 | -------------------------------------------------------------------------------- /vim/after/ftplugin/python.vim: -------------------------------------------------------------------------------- 1 | setlocal foldmethod=indent 2 | -------------------------------------------------------------------------------- /vim/plugins/vim-commentary.vim: -------------------------------------------------------------------------------- 1 | Plug 'tpope/vim-commentary' 2 | -------------------------------------------------------------------------------- /vim/after/ftplugin/plantuml.vim: -------------------------------------------------------------------------------- 1 | setlocal commentstring='\ %s 2 | 3 | -------------------------------------------------------------------------------- /vim/plugins/DoxygenToolkit.vim: -------------------------------------------------------------------------------- 1 | Plug 'vim-scripts/DoxygenToolkit.vim' 2 | -------------------------------------------------------------------------------- /vim/plugins/vim-cpp-enhanced-highlight.vim: -------------------------------------------------------------------------------- 1 | Plug 'octol/vim-cpp-enhanced-highlight' 2 | -------------------------------------------------------------------------------- /vim/after/ftplugin/cpp.vim: -------------------------------------------------------------------------------- 1 | setlocal commentstring=//\ %s 2 | setlocal foldmethod=syntax 3 | -------------------------------------------------------------------------------- /vim/plugins/vim-fugitive.vim: -------------------------------------------------------------------------------- 1 | Plug 'tpope/vim-fugitive' 2 | 3 | nnoremap G :Git 4 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | config/ranger/history 2 | config/ranger/bookmarks 3 | vim/plugged 4 | vim/.netrwhist 5 | vim/spell 6 | -------------------------------------------------------------------------------- /config/mutt/signature_muttrc: -------------------------------------------------------------------------------- 1 | 2 | Best Regards, 3 | Dharmin B. 4 | 5 | Github: https://github.com/DharminB 6 | Profile: https://dharminb.github.io/ 7 | -------------------------------------------------------------------------------- /config/mutt/mailcap_muttrc: -------------------------------------------------------------------------------- 1 | image/*; feh %s 2 | text/plain; $EDITOR %s 3 | text/html; w3m -I %{charset} -T text/html; copiousoutput 4 | application/pdf; zathura %s 5 | 6 | -------------------------------------------------------------------------------- /vim/after/ftplugin/markdown.vim: -------------------------------------------------------------------------------- 1 | " setlocal foldmethod=indent 2 | setlocal conceallevel=2 3 | 4 | setlocal wrap 5 | 6 | nnoremap j gj 7 | nnoremap k gk 8 | -------------------------------------------------------------------------------- /vim/plugins/ultisnips.vim: -------------------------------------------------------------------------------- 1 | Plug 'SirVer/ultisnips' 2 | 3 | " Expand trigger 4 | let g:UltiSnipsExpandTrigger="" 5 | let g:UltiSnipsSnippetsDirectories=[$HOME.'/.vim/UltiSnips'] 6 | -------------------------------------------------------------------------------- /scripts/i3block_template_script.sh: -------------------------------------------------------------------------------- 1 | #!bin/sh 2 | 3 | # case $BLOCK_BUTTON in 4 | # 1) echo "Left click action" ;; 5 | # 3) echo "Right click action" ;; 6 | # esac 7 | 8 | echo "Output" 9 | -------------------------------------------------------------------------------- /scripts/change_wallpaper_i3blocks.sh: -------------------------------------------------------------------------------- 1 | #!bin/sh 2 | 3 | case $BLOCK_BUTTON in 4 | 1) bash ~/dotfiles/scripts/change_wallpaper.sh ;; 5 | 3) echo "Right click action" ;; 6 | esac 7 | 8 | echo "WP" 9 | -------------------------------------------------------------------------------- /scripts/exit.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | choices="Yes\nNo" 4 | chosen=$(echo -e $choices | rofi -dmenu -i -color-normal "#ff0000" -p "Exit i3?") 5 | if [ "$chosen" == "Yes" ]; then 6 | i3-msg exit 7 | fi 8 | -------------------------------------------------------------------------------- /scripts/shutdown.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | choices="Yes\nNo" 4 | chosen=$(echo -e $choices | rofi -dmenu -i -color-normal "#ff0000" -p "Shutdown?") 5 | if [ "$chosen" == "Yes" ]; then 6 | shutdown now 7 | fi 8 | -------------------------------------------------------------------------------- /config/rofi/config.rasi: -------------------------------------------------------------------------------- 1 | configuration { 2 | width: 30; 3 | lines: 10; 4 | font: "mono 16"; 5 | bw: 0; 6 | hide-scrollbar: true; 7 | fake-transparency: true; 8 | theme: "~/dotfiles/config/rofi/theme.rasi"; 9 | } 10 | -------------------------------------------------------------------------------- /vim/plugins/netrw_settings.vim: -------------------------------------------------------------------------------- 1 | " netrw file browsing 2 | let g:netrw_banner=0 " hide banner 3 | let g:netrw_browse_split=4 "open in prior window 4 | let g:netrw_altv=1 "open splits to the right 5 | let g:netrw_liststyle=3 "tree view 6 | -------------------------------------------------------------------------------- /vim/plugins/vimtex.vim: -------------------------------------------------------------------------------- 1 | Plug 'lervag/vimtex' 2 | 3 | " needed so that the snippets recognize .tex files 4 | let g:tex_flavor='latex' 5 | 6 | " opens pdf file using zathura 7 | let g:vimtex_view_method = 'zathura' 8 | let g:vimtex_quickfix_open_on_warning = 0 9 | -------------------------------------------------------------------------------- /scripts/gif_wallpaper.sh: -------------------------------------------------------------------------------- 1 | #!bin/sh 2 | 3 | case $BLOCK_BUTTON in 4 | 1) notify-send "Press mod + g to start GIF background";; 5 | 6 | 3) kill `pgrep xwinwrap`; feh --bg-scale ~/Pictures/Wallpapers/blue_material_design.jpg;; 7 | esac 8 | 9 | echo "GIF" 10 | -------------------------------------------------------------------------------- /config/rofi/config: -------------------------------------------------------------------------------- 1 | rofi.theme: ~/dotfiles/config/rofi/theme.rasi 2 | 3 | rofi.width: 50 4 | 5 | rofi.font: mono 16 6 | 7 | rofi.fake-transparency: true 8 | rofi.lines: 10 9 | rofi.bw: 0 10 | rofi.opacity: "90" 11 | rofi.hide-scrollbar: true 12 | rofi.width: 30 13 | -------------------------------------------------------------------------------- /scripts/pre_lock.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | scrot /tmp/screen.png 4 | 5 | [[ -f ~/Pictures/lock.png ]] && 6 | convert /tmp/screen.png -scale 5% -scale 2000% ~/Pictures/lock.png -gravity center -composite -matte /tmp/screenlock.png 7 | 8 | ## pause music 9 | playerctl pause 10 | -------------------------------------------------------------------------------- /scripts/change_wallpaper.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | export DISPLAY=:0.0 3 | wallpaperdir="$HOME/Pictures/Wallpapers" 4 | 5 | randompic=$(find $wallpaperdir -maxdepth 1 -type f | shuf -n1) 6 | echo $randompic 7 | 8 | feh --bg-scale "$randompic" 9 | datetime=$(date -u) 10 | echo $datetime 11 | -------------------------------------------------------------------------------- /scripts/cpu.sh: -------------------------------------------------------------------------------- 1 | #!bin/sh 2 | 3 | case $BLOCK_BUTTON in 4 | 1) notify-send --icon=gtk-info "Top CPU using processes" "$(ps axch -o cmd:15,%cpu --sort=-%cpu | head)" -h string:x-canonical-private-synchronous:anything;; 5 | # 3) echo "Right click action" ;; 6 | esac 7 | 8 | echo "CPU" 9 | -------------------------------------------------------------------------------- /scripts/wlan.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # ask user to choose which wireless network to connect to 4 | choice=$(wicd-cli -ySl | awk 'NR>1 {print $1 " " $4}' | rofi -dmenu -i -p "Which network? ") 5 | network_id=$(echo "${choice%% *}") 6 | 7 | # connect to selected network 8 | wicd-cli -y -n"${network_id}" -c 9 | -------------------------------------------------------------------------------- /scripts/memory.sh: -------------------------------------------------------------------------------- 1 | #!bin/sh 2 | 3 | case $BLOCK_BUTTON in 4 | 1) notify-send --icon=gtk-info "Top Memory using processes" "$(ps axch -o cmd:15,%mem --sort=-%mem | head)" -h string:x-canonical-private-synchronous:anything;; 5 | # 3) echo "Right click action" ;; 6 | esac 7 | 8 | free -h | awk '/Mem:/ {print $3}' 9 | -------------------------------------------------------------------------------- /scripts/screenshot.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | if [ "$1" = "crop" ] 3 | then 4 | scrot -s ~/Pictures/Screenshots/Screenshot_from_%F_%T_cropped.png 5 | else 6 | scrot ~/Pictures/Screenshots/Screenshot_from_%F_%T.png 7 | fi 8 | 9 | notify-send -t 2000 "Screenshot taken" -h string:x-canonical-private-synchronous:anything 10 | -------------------------------------------------------------------------------- /scripts/wlan_nm.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # ask user to choose which wireless network to connect to 4 | choice=$(nmcli connection show | awk 'NR>1 {print $1 "\t" $2}'| rofi -dmenu -i -p "Which network? ") 5 | network_uuid=$(echo $choice | awk '{print $2}') 6 | 7 | # connect to selected network 8 | nmcli connection up uuid $network_uuid 9 | -------------------------------------------------------------------------------- /scripts/toggle_bar.sh: -------------------------------------------------------------------------------- 1 | #! /usr/bin/sh 2 | 3 | # check if bar is hidden or not 4 | output=$(i3-msg -t get_bar_config bar-0 | grep -c "\"mode\":\"hide\"") 5 | 6 | # if bar is not hidden, then hide it otherwise dock it 7 | if [[ $output -eq 0 ]]; then 8 | i3-msg -t command "bar mode hide" 9 | else 10 | i3-msg -t command "bar mode dock" 11 | fi 12 | -------------------------------------------------------------------------------- /vim/plugins/fzf.vim: -------------------------------------------------------------------------------- 1 | Plug 'junegunn/fzf' 2 | Plug 'junegunn/fzf.vim' 3 | 4 | " fuzzy file finder (fzf) bindings 5 | let g:fzf_preview_window = ['right:hidden', 'ctrl-/'] 6 | nnoremap og :GFiles 7 | nnoremap of :Files 8 | nnoremap ob :Buffers 9 | nnoremap or :Rg 10 | nnoremap ot :Tags 11 | nnoremap :b# 12 | -------------------------------------------------------------------------------- /scripts/change_brightness.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | if [ "$1" = "up" ] 4 | then 5 | light -A 1% 6 | if [ "$2" = "big" ] 7 | then 8 | light -A 9% 9 | fi 10 | else 11 | light -U 1% 12 | if [ "$2" = "big" ] 13 | then 14 | light -U 9% 15 | fi 16 | fi 17 | 18 | BRIGHTNESS_PERC=$(light -G) 19 | s="Brightness level:" 20 | notify-send -t 500 "$s" "$BRIGHTNESS_PERC" 21 | -------------------------------------------------------------------------------- /vim/plugins/terminal_build.vim: -------------------------------------------------------------------------------- 1 | nnoremap TT :set termwinsize&:terminal 2 | nnoremap Tb :set termwinsize=20*200:terminal bash -x .editor/build_cmd 3 | nnoremap Tt :terminal bash -x .editor/test_cmd 4 | 5 | " find cmake errors and warning 6 | nnoremap Te /\v(.+)\/\zs([^\/]+)\.(h\|cpp)\ze:\d+:\d+: (fatal error\|error\|warning): 7 | 8 | nnoremap cbt :terminal bash -c "catkin build --this" 9 | -------------------------------------------------------------------------------- /vim/plugins/vim-hardtime.vim: -------------------------------------------------------------------------------- 1 | Plug 'takac/vim-hardtime' 2 | 3 | let g:hardtime_default_on = 1 4 | let g:list_of_normal_keys = ["h", "j", "k", "l"] 5 | let g:list_of_visual_keys = ["h", "j", "k", "l"] 6 | let g:list_of_insert_keys = [] 7 | let g:list_of_disabled_keys = [] 8 | let g:hardtime_timeout = 500 9 | let g:hardtime_ignore_buffer_patterns = ["index", ".*\.txt"] 10 | let g:hardtime_allow_different_key = 1 11 | let g:hardtime_maxcount = 2 12 | -------------------------------------------------------------------------------- /scripts/next_workspace.sh: -------------------------------------------------------------------------------- 1 | wsNum="$(i3-msg -t get_workspaces | jq -r '.[] | select(.focused==true).name')" 2 | # echo $wsNum 3 | left=$(($wsNum - 1)) 4 | right=$(($wsNum + 1)) 5 | if [ $left -eq 0 ] 6 | then 7 | left=1 8 | fi 9 | if [ $right -eq 11 ] 10 | then 11 | right=10 12 | fi 13 | # echo $left 14 | # echo $right 15 | 16 | if [ "$1" = "l" ] 17 | then 18 | ws=$left 19 | else 20 | ws=$right 21 | fi 22 | # echo $ws 23 | ws_name="workspace "$ws 24 | # echo $ws_name 25 | i3-msg $ws_name 26 | -------------------------------------------------------------------------------- /vim/plugins/vim-markdown.vim: -------------------------------------------------------------------------------- 1 | " Plug 'gabrielelana/vim-markdown' 2 | " let g:markdown_enable_conceal = 1 3 | " let g:markdown_mapping_switch_status = 's' 4 | " let g:markdown_enable_insert_mode_mappings = 0 5 | 6 | Plug 'godlygeek/tabular' 7 | Plug 'preservim/vim-markdown' 8 | 9 | let g:tex_conceal = "" 10 | let g:vim_markdown_math = 1 11 | let g:vim_markdown_conceal_code_blocks = 0 12 | let g:vim_markdown_frontmatter = 1 13 | let g:vim_markdown_json_frontmatter = 1 14 | let g:vim_markdown_strikethrough = 1 15 | let g:vim_markdown_new_list_item_indent = 0 16 | -------------------------------------------------------------------------------- /scripts/send_next_workspace.sh: -------------------------------------------------------------------------------- 1 | wsNum="$(i3-msg -t get_workspaces | jq -r '.[] | select(.focused==true).name')" 2 | #echo $wsNum 3 | left=$(($wsNum - 1)) 4 | right=$(($wsNum + 1)) 5 | if [ $left -eq 0 ] 6 | then 7 | left=1 8 | fi 9 | if [ $right -eq 11 ] 10 | then 11 | right=10 12 | fi 13 | #echo $left 14 | #echo $right 15 | 16 | if [ "$1" = "l" ] 17 | then 18 | ws=$left 19 | else 20 | ws=$right 21 | fi 22 | #echo $ws 23 | cmd_name="move container to workspace "$ws 24 | cmd2_name="workspace "$ws 25 | #echo $ws_name 26 | i3-msg $cmd_name 27 | i3-msg $cmd2_name 28 | -------------------------------------------------------------------------------- /vim/plugins/lightline.vim: -------------------------------------------------------------------------------- 1 | Plug 'itchyny/lightline.vim' 2 | 3 | " Hack to make light-line appear... 4 | set laststatus=2 5 | 6 | " Get rid of default vim mode 7 | set noshowmode 8 | 9 | " Light-line configuration 10 | let g:lightline = { 11 | \ 'colorscheme': 'powerline', 12 | \ 'active': { 13 | \ 'left': [ [ 'mode', 'paste' ], 14 | \ [ 'gitbranch', 'readonly', 'filename', 'modified' ] ], 15 | \ 'right': [ [ 'lineinfo' ], 16 | \ [ 'percent' ], 17 | \ [ 'filetype' ] ] 18 | \ }, 19 | \ 'component_function': { 20 | \ 'gitbranch': 'fugitive#head' 21 | \ }, 22 | \ } 23 | -------------------------------------------------------------------------------- /scripts/passmenu: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | 3 | shopt -s nullglob globstar 4 | 5 | typeit=0 6 | if [[ $1 == "--type" ]]; then 7 | typeit=1 8 | shift 9 | fi 10 | 11 | prefix=${PASSWORD_STORE_DIR-~/.password-store} 12 | password_files=( "$prefix"/**/*.gpg ) 13 | password_files=( "${password_files[@]#"$prefix"/}" ) 14 | password_files=( "${password_files[@]%.gpg}" ) 15 | 16 | password=$(printf '%s\n' "${password_files[@]}" | dmenu "$@") 17 | 18 | [[ -n $password ]] || exit 19 | 20 | if [[ $typeit -eq 0 ]]; then 21 | pass show -c "$password" 2>/dev/null 22 | else 23 | pass show "$password" | { IFS= read -r pass; printf %s "$pass"; } | 24 | xdotool type --clearmodifiers --file - 25 | fi 26 | -------------------------------------------------------------------------------- /update_dotfiles.sh: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | 3 | # update the dotfiles from different locations 4 | 5 | # urxvt folder with extensions 6 | rm -rf ./urxvt 7 | cp -r ~/.urxvt ./urxvt 8 | 9 | # some folders in .vim 10 | rm -rf ./vim 11 | mkdir ./vim 12 | cp -r ~/.vim/autoload ./vim 13 | cp -r ~/.vim/colors ./vim 14 | cp -r ~/.vim/spell ./vim 15 | cp -r ~/.vim/UltiSnips ./vim 16 | 17 | 18 | # folder from .config/ 19 | cp -r ~/.config/i3 ./config 20 | cp -r ~/.config/neofetch ./config 21 | cp -r ~/.config/rofi ./config 22 | cp -r ~/.config/ranger ./config 23 | cp -r ~/.config/zathura ./config 24 | cp -r ~/.config/mutt/*muttrc ./config/mutt 25 | 26 | # remove ranger history and bookmark 27 | rm ./config/ranger/history 28 | rm ./config/ranger/bookmarks 29 | -------------------------------------------------------------------------------- /vim/UltiSnips/cpp.snippets: -------------------------------------------------------------------------------- 1 | snippet fors 2 | for ( size_t ${2:i} = 0; $2 < ${1:count}; $2${3:++} ) 3 | { 4 | ${4} 5 | } 6 | endsnippet 7 | 8 | snippet fore 9 | for ( ${1:const Object&} : ${2:container} ) 10 | { 11 | ${3} 12 | } 13 | endsnippet 14 | 15 | snippet fori 16 | for ( ${3:auto} ${2:itr} = ${1:container}.begin(); $2 != $1.end(); $2 ++ ) 17 | { 18 | ${4} 19 | } 20 | endsnippet 21 | 22 | snippet ns 23 | namespace ${1:my_ns} { 24 | ${2} 25 | } // namespace $1 26 | endsnippet 27 | 28 | snippet header 29 | #ifndef ${1:HEADER_GUARD_H} 30 | #define $1 31 | ${2} 32 | #endif // $1 33 | endsnippet 34 | 35 | snippet todo 36 | // TODO: ${1:description} 37 | endsnippet 38 | 39 | snippet fixme 40 | // FIXME: ${1:description} 41 | endsnippet 42 | -------------------------------------------------------------------------------- /scripts/catkin_workspace_switcher.sh: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | 3 | current_dir="$HOME/.config/catkin_workspace" 4 | current_dir="`( cd \"$current_dir\" && pwd )`" # absolutized and normalized 5 | catkin_workspaces_file="$current_dir""/catkin_workspaces" 6 | catkin_workspaces=`cat $catkin_workspaces_file` 7 | chosen_workspace=$(echo "$catkin_workspaces" | rofi -dmenu -i -fn "Monospace-13" -p "Which catkin_workspace?") 8 | if [ "$chosen_workspace" = "" ] 9 | then 10 | exit 1 11 | fi 12 | chosen_catkin_workspace_file="$current_dir""/chosen_catkin_workspace" 13 | echo "$chosen_workspace" > $chosen_catkin_workspace_file 14 | echo "Chosen catkin workspace: ""$chosen_workspace" 15 | echo "####################################" 16 | echo "# Please execute \`source ~/.zshrc\` #" 17 | echo "####################################" 18 | -------------------------------------------------------------------------------- /config/neofetch/batman3: -------------------------------------------------------------------------------- 1 | ${c5} 2 | 3 | 4 | .--:/:' . . `:\\::--. 5 | .-+sdmmmm: .m++m. :mmmdhs+-. 6 | ./ydmmmmmmmmo. .:mmmm:. .ymmmmmmmmds:. 7 | .odmmmmmmmmmmmmmyyydmmmmmmbyyymmmmmmmmmmmmmbo. 8 | /o+//+shmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmdho+//+o: 9 | ` `-smmmmmmmmmmmmmmmmmmmmmmmmmmmmo. ` 10 | syo////oydmmmmmmmmdyo///+oy+ 11 | ` ./hmmmmy:` ` 12 | `+md:` 13 | \\/ 14 | 15 | 16 | -------------------------------------------------------------------------------- /scripts/alarm.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | if [[ $1 == "-t" ]]; then 3 | echo "time" 4 | args=$@ 5 | time=("${args[@]:3}") 6 | current_time=$(date +"%H:%M") 7 | echo $time 8 | while [[ $current_time != $time ]]; do 9 | sleep 5s 10 | current_time=$(date +"%H:%M") 11 | done 12 | i3-msg -t command "workspace 5" 13 | notify-send "wake up" && aplay ~/Music/Loud_Alarm_Clock_Buzzer.wav 14 | elif [[ $1 == "-d" ]]; then 15 | echo "duration" 16 | args=$@ 17 | time=("${args[@]:3}") 18 | sleep $time 19 | i3-msg -t command "workspace 5" 20 | notify-send "wake up" && aplay ~/Music/Loud_Alarm_Clock_Buzzer.wav 21 | else 22 | echo "use either -t (time in HH:MM) or -d (duration in sleep command format) option" 23 | echo "Example:" 24 | echo " -t 15:55" 25 | echo " -d 5m 5s" 26 | fi 27 | -------------------------------------------------------------------------------- /scripts/low_battery.sh: -------------------------------------------------------------------------------- 1 | while true; do 2 | percentage_string="$(acpi -b | awk '/Battery 0:/ {print $4}')" 3 | num_of_char=$(wc -c <<< $percentage_string) 4 | IFS='%'; arrIN=($percentage_string); unset IFS; 5 | for i in "${arrIN[@]}"; do 6 | echo $i 7 | percentage="$i" 8 | break 9 | done 10 | acpi_output="$(acpi -b)" 11 | if [ $percentage -lt 30 ]; then 12 | if [[ $acpi_output == *"Discharging"* ]]; then 13 | notify-send -i battery-low -u critical "LOW BATTERY" "$percentage" 14 | fi 15 | sleep 120 16 | else 17 | if [ $percentage -gt 95 ]; then 18 | if [[ $acpi_output == *"Charging"* ]]; then 19 | notify-send -i battery-low -u low "BATTERY CHARGED" "$percentage" 20 | fi 21 | fi 22 | sleep 300 23 | fi 24 | done 25 | -------------------------------------------------------------------------------- /scripts/get_wallpaper.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | fn_basedir=/tmp/ 3 | fn_index='.chromecast.html' 4 | fn_image='wallpaper.jpg' 5 | 6 | mkdir -p "$fn_basedir" 7 | 8 | notify-send -i "wallpaper" "Changing wallpaper..." -h string:x-canonical-private-synchronous:anything 9 | 10 | # Get page index 11 | wget -q "https://clients3.google.com/cast/chromecast/home" -O "${fn_basedir}${fn_index}" 12 | if [ $? -ne 0 ]; then 13 | echo "Failed to get index from google chromecast" 14 | exit 1 15 | fi 16 | 17 | # Set image url 18 | image_url=$(grep -oP 'https:\\/\\/lh3(.*?)-mv' "${fn_basedir}${fn_index}" | sed -e 's/\\//g' -e 's/u003d/=/g' | head -1) 19 | 20 | # Get image 21 | wget -q "$image_url" -O "${fn_basedir}${fn_image}" 22 | if [ $? -ne 0 ]; then 23 | echo "Failed to get image from www.googleusercontent.com" 24 | exit 1 25 | fi 26 | 27 | # Change wallpaper 28 | sleep 1 29 | feh --bg-fill "${fn_basedir}${fn_image}" 30 | 31 | notify-send -i "wallpaper" "Wallpaper changed" -h string:x-canonical-private-synchronous:anything 32 | exit 0 33 | -------------------------------------------------------------------------------- /scripts/change_volume.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | if [ "$1" = "up" ] 3 | then 4 | pactl set-sink-volume @DEFAULT_SINK@ +5% 5 | elif [ "$1" = "down" ] 6 | then 7 | pactl set-sink-volume @DEFAULT_SINK@ -5% 8 | elif [ "$1" = "mute" ] 9 | then 10 | pactl set-sink-mute @DEFAULT_SINK@ toggle # mute sound 11 | else 12 | notify-send -i dialog-error "Change volume" "Unknown argument" 13 | fi 14 | 15 | volume_string="$(bash /usr/share/i3blocks/volume 5 pulse)" 16 | s="Volume level:" 17 | if [ "$volume_string" = "MUTE" ] 18 | then 19 | icon="audio-volume-muted" 20 | else 21 | num_of_char=$(wc -c <<< $volume_string) 22 | num_of_digits=$(( num_of_char-2 )) 23 | volume="$(cut -c -$num_of_digits <<< $volume_string)" 24 | if [ $volume -gt 70 ] 25 | then 26 | icon="audio-volume-high" 27 | elif [ $volume -lt 25 ] 28 | then 29 | icon="audio-volume-low" 30 | else 31 | icon="audio-volume-medium" 32 | fi 33 | fi 34 | notify-send -t 500 -i "$icon" "$s" "$volume_string" -h string:x-canonical-private-synchronous:anything 35 | -------------------------------------------------------------------------------- /config/zathura/zathurarc: -------------------------------------------------------------------------------- 1 | # Config file for Zathura (pdf viewer) 2 | # (Rules for configuring at https://pwmt.org/projects/zathura/documentation/) 3 | # use clipboard to copy stuff (instead of primary) 4 | set selection-clipboard clipboard 5 | 6 | # set how the pdf opens (does not work) 7 | # set adjust-open "best-fit" 8 | 9 | # map i to invert color 10 | map [normal] i recolor 11 | map [fullscreen] i recolor 12 | set recolor-darkcolor "#d9c8b4" 13 | set recolor-lightcolor "#0b0e11" 14 | 15 | # unmap Ctrl+r to invert color 16 | unmap [normal] 17 | unmap [fullscreen] 18 | 19 | # map W for zoom to width 20 | map [normal] w adjust_window width 21 | map [fullscreen] w adjust_window width 22 | 23 | # map left and right arrow for previous and next page 24 | map [normal] navigate next 25 | map [fullscreen] navigate next 26 | map [normal] navigate previous 27 | map [fullscreen] navigate previous 28 | 29 | # map spacebar to toggle the status bar 30 | map [normal] toggle_statusbar 31 | map [fullscreen] toggle_statusbar 32 | 33 | -------------------------------------------------------------------------------- /Xdefaults: -------------------------------------------------------------------------------- 1 | #include "/home/dharmin/dotfiles/nord.xresource" 2 | 3 | ! ============== 4 | ! URxvt settings 5 | ! ============== 6 | /* scroll back limit */ 7 | URxvt.saveLines: 20000 8 | 9 | URxvt.intensityStyles: false 10 | 11 | URxvt*depth: 32 12 | URxvt.background: [95]nord0 13 | 14 | URxvt.font: xft:monospace:size=16 15 | URxvt.scrollBar: false 16 | URxvt.cursorColor: white 17 | 18 | !! copy and paste with ctrl shift c and v 19 | URxvt.keysym.Shift-Control-V: eval:paste_clipboard 20 | URxvt.keysym.Shift-Control-C: eval:selection_to_clipboard 21 | !! Extensions 22 | URxvt.perl-ext-common: default,matcher,font-size,url-select,keyboard-select 23 | URxvt.colorUL: #4682B4 24 | !! url-select 25 | URxvt.keysym.M-u: perl:url-select:select_next 26 | URxvt.url-select.launcher: webview 27 | URxvt.url-select.underline: true 28 | 29 | !! keyboard-select: 30 | URxvt.keysym.M-Escape: perl:keyboard-select:activate 31 | URxvt.keyboard-select.clipboard: true 32 | !! Matcher 33 | URxvt.url-launcher: webview 34 | URxvt.matcher.button: 1 35 | 36 | ! ========= 37 | ! i3 colors 38 | ! ========= 39 | i3wm.background: nord0 40 | i3wm.foreground: nord4 41 | /* i3wm.fadeColor: nord3 */ 42 | -------------------------------------------------------------------------------- /scripts/gif_selector.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | screen_width=1366 4 | screen_height=768 5 | # get gif from a specific folder 6 | gif_name=$HOME/Pictures/gif_wallpapers/$(ls -1 ~/Pictures/gif_wallpapers | rofi -dmenu -i -fn "Monospace-13" -p "Which gif?") 7 | 8 | # get width and height of selected gif 9 | file_output="$(file $gif_name -b)" 10 | IFS=','; arrIN=($file_output); unset IFS; 11 | size="${arrIN[2]}" 12 | IFS='x'; arrIN=($size); unset IFS; 13 | width="${arrIN[0]}" 14 | height="${arrIN[1]}" 15 | 16 | # set a bg based on the first frame of the gif 17 | convert "$gif_name""[0]" /tmp/gif_bg.png 18 | convert /tmp/gif_bg.png -scale 10% -scale 1366x768 /tmp/gif_bg.png 19 | convert /tmp/gif_bg.png -blur 0x50 /tmp/gif_bg.png 20 | feh --bg-scale /tmp/gif_bg.png 21 | rm /tmp/gif_bg.png 22 | 23 | # calculate offset for the selected gif based on screen size 24 | width=$(($width)) 25 | height=$(($height)) 26 | width_offset=$(($screen_width/2 - $width/2)) 27 | height_offset=$(($screen_height/2 - $height/2)) 28 | 29 | # start xwinwrap to loop selected gif as background 30 | xwinwrap -g "$width""x""$height""+""$width_offset""+""$height_offset" -ov -ni -s -nf -- gifview -w WID $gif_name -a 31 | -------------------------------------------------------------------------------- /nord.xresource: -------------------------------------------------------------------------------- 1 | ! Copyright (c) 2016-present Arctic Ice Studio 2 | ! Copyright (c) 2016-present Sven Greb 3 | 4 | ! Project: Nord XResources 5 | ! Version: 0.1.0 6 | ! Repository: https://github.com/arcticicestudio/nord-xresources 7 | ! License: MIT 8 | 9 | #define nord0 #2E3440 10 | #define nord1 #3B4252 11 | #define nord2 #434C5E 12 | #define nord3 #4C566A 13 | #define nord4 #D8DEE9 14 | #define nord5 #E5E9F0 15 | #define nord6 #ECEFF4 16 | #define nord7 #8FBCBB 17 | #define nord8 #88C0D0 18 | #define nord9 #81A1C1 19 | #define nord10 #5E81AC 20 | #define nord11 #BF616A 21 | #define nord12 #D08770 22 | #define nord13 #EBCB8B 23 | #define nord14 #A3BE8C 24 | #define nord15 #B48EAD 25 | 26 | *.foreground: nord4 27 | *.background: nord0 28 | *.cursorColor: nord4 29 | *fading: 35 30 | *fadeColor: nord3 31 | 32 | *color0: nord1 33 | *color1: nord11 34 | *color2: nord14 35 | *color3: nord13 36 | *color4: nord9 37 | *color5: nord15 38 | *color6: nord8 39 | *color7: nord5 40 | *color8: nord3 41 | *color9: nord11 42 | *color10: nord14 43 | *color11: nord13 44 | *color12: nord9 45 | *color13: nord15 46 | *color14: nord7 47 | *color15: nord6 48 | -------------------------------------------------------------------------------- /terminal_cmd_help.md: -------------------------------------------------------------------------------- 1 | # Commands to perform misc actions without GUI 2 | 3 | ## Format a usb stick 4 | 5 | Erase all data (source: https://askubuntu.com/a/204597/873993) 6 | - Find usb 7 | ``` 8 | lsblk 9 | ``` 10 | 11 | - Unmount the usb if mounted 12 | ``` 13 | sudo umount /dev/sdxx 14 | ``` 15 | 16 | - Format the usb 17 | ``` 18 | sudo mkfs.vfat /dev/sdxx 19 | ``` 20 | or 21 | ``` 22 | sudo mkfs.vfat -n "usb name" /dev/sdxx 23 | ``` 24 | or if usb has partitions and all partitions need to be formatted then 25 | ``` 26 | sudo mkfs.vfat -n "usb name" -I /dev/sdx 27 | ``` 28 | 29 | Make new partition on the newly formatted usb (source: https://askubuntu.com/a/571340/873993) 30 | - Make new partition table 31 | ``` 32 | sudo fdisk /dev/sdx 33 | ``` 34 | Press `o` to create new DOS partition table 35 | 36 | - Make a new partition 37 | Press letter `n` to add a new partition. 38 | You will be prompted for the size of the partition. 39 | Making a primary partition when prompted, if you are not sure. Use default if not sure. 40 | Then press letter `w` to write table to disk and exit. 41 | 42 | - Format the newly created partition to make it easily mountable. 43 | -------------------------------------------------------------------------------- /vim/plugins/switch_source_header.vim: -------------------------------------------------------------------------------- 1 | function! IterativeFind(file_path, filename) 2 | let itr = 0 3 | let itr_limit = 5 4 | let search_path = a:file_path 5 | while itr < itr_limit 6 | let itr += 1 7 | let search_path = simplify(search_path . '/..') 8 | let answer = split(globpath(search_path, '**/' . a:filename), '\n') 9 | if len(answer) > 0 10 | return answer[0] 11 | endif 12 | endwhile 13 | return 14 | endfunction 15 | 16 | function! SwitchSourceHeader() 17 | let file_extension = expand('%:e') 18 | let file_name = expand('%:t:r') 19 | let file_path = expand('%:p:h') 20 | let other_file_name = '' 21 | if ( file_extension == 'cpp') 22 | let other_file_name = file_name . '.h' 23 | elseif ( file_extension == 'h' ) 24 | let other_file_name = file_name . '.cpp' 25 | else 26 | echom 'Switching does not support .' . file_extension 27 | return 28 | endif 29 | let other_file_path = IterativeFind(file_path, other_file_name) 30 | if empty(other_file_path) 31 | echom 'Could not find ' . other_file_name 32 | return 33 | endif 34 | execute 'edit' other_file_path 35 | endfunction 36 | 37 | nnoremap os :call SwitchSourceHeader() 38 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | This is free and unencumbered software released into the public domain. 2 | 3 | Anyone is free to copy, modify, publish, use, compile, sell, or 4 | distribute this software, either in source code form or as a compiled 5 | binary, for any purpose, commercial or non-commercial, and by any 6 | means. 7 | 8 | In jurisdictions that recognize copyright laws, the author or authors 9 | of this software dedicate any and all copyright interest in the 10 | software to the public domain. We make this dedication for the benefit 11 | of the public at large and to the detriment of our heirs and 12 | successors. We intend this dedication to be an overt act of 13 | relinquishment in perpetuity of all present and future rights to this 14 | software under copyright law. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 19 | IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR 20 | OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 21 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 22 | OTHER DEALINGS IN THE SOFTWARE. 23 | 24 | For more information, please refer to 25 | -------------------------------------------------------------------------------- /vim/plugins/tag_managment.vim: -------------------------------------------------------------------------------- 1 | function! GenerateTags() 2 | " create .editor directory if it does not exist 3 | if ( !isdirectory('.editor') ) 4 | :call system('mkdir .editor && echo ".editor/*" >> .gitignore') 5 | endif 6 | 7 | " remove existing tags file 8 | :call system('rm .editor/tags') 9 | 10 | " create ctags_dep_list file if it does not exist 11 | if ( !filereadable('.editor/ctags_dep_list') ) 12 | let cwd = getcwd() 13 | :call writefile([cwd], '.editor/ctags_dep_list') 14 | endif 15 | 16 | " generate new tags 17 | :call system('ctags -o .editor/tags -L .editor/ctags_dep_list') 18 | :set tags=.editor/tags 19 | echom "Updated Tags!" 20 | endfunction 21 | 22 | " nnoremap tj g 23 | nnoremap tj :call fzf#vim#tags('^' . expand('') . ' ', {'options': '--exact --select-1 --exit-0 +i'}) 24 | nnoremap tgd :call fzf#vim#tags('^' . expand('') . ' .h ', {'options': '--exact --select-1 --exit-0 +i'}) 25 | nnoremap tgf :call fzf#vim#tags('^' . expand('') . ' .cpp ', {'options': '--exact --select-1 --exit-0 +i'}) 26 | nnoremap tn :tnext 27 | nnoremap tp :tprevious 28 | nnoremap tu :call GenerateTags() 29 | 30 | if ( isdirectory('.editor') ) 31 | :set tags=.editor/tags 32 | endif 33 | -------------------------------------------------------------------------------- /vim/plugins/my_autocomplete.vim: -------------------------------------------------------------------------------- 1 | function! SimpleAutoComplete(is_backwards) 2 | let directions = ["\", "\"] 3 | let indent_directions = ["\", "\"] 4 | let direction_index = a:is_backwards ? 1 : 0 5 | if pumvisible() " if completion menu is visible just cycle through it 6 | return directions[direction_index] 7 | endif 8 | 9 | " get the current line as string (excluding empty spaces and tabs) 10 | let pos = getpos('.') " get cursor position return a list (buff, row, col) 11 | let substr = matchstr(strpart(getline(pos[1]), 0, pos[2]-1), "[^ \t]*$") 12 | 13 | " Indent/De-indent if current line is empty string 14 | if empty(substr) 15 | return indent_directions[direction_index] 16 | endif 17 | 18 | if match(substr, '\/') != -1 " if the line contains a '/' do file path completion 19 | return "\\" . directions[direction_index] 20 | endif 21 | 22 | return directions[direction_index] " normal completion compl-generic 23 | endfunction 24 | 25 | set shortmess+=c " Shut off completion messages 26 | set belloff+=ctrlg " If Vim beeps during completion 27 | set completeopt=menu,menuone,longest 28 | 29 | inoremap pumvisible() ? "\" : "\u\" 30 | inoremap SimpleAutoComplete(0) 31 | inoremap SimpleAutoComplete(1) 32 | -------------------------------------------------------------------------------- /tmux.conf: -------------------------------------------------------------------------------- 1 | # remap prefix to C-a 2 | unbind C-b 3 | set-option -g prefix C-a 4 | bind-key C-a send-prefix 5 | 6 | # Set vi mode for copy buffer 7 | set-window-option -g mode-keys vi 8 | bind P paste-buffer 9 | # for version < 2.4 10 | # bind-key -t vi-copy 'v' begin-selection 11 | # bind-key -t vi-copy 'y' copy-selection 12 | # bind -t vi-copy y copy-pipe "xclip -i -sel p -f | xclip -i -sel c" 13 | # for version >= 2.4 14 | bind-key -T copy-mode-vi v send-keys -X begin-selection 15 | bind-key -T copy-mode-vi y send-keys -X copy-selection 16 | bind -T copy-mode-vi y send -X copy-pipe "xclip -i -sel p -f | xclip -i -sel c" \; display-message "copied to system clipboard" 17 | 18 | # split panes using | and - 19 | bind | split-window -h 20 | bind - split-window -v 21 | unbind '"' 22 | unbind % 23 | 24 | # switch panes using Alt-arrow without prefix 25 | bind -n M-Left select-pane -L 26 | bind -n M-Right select-pane -R 27 | bind -n M-Up select-pane -U 28 | bind -n M-Down select-pane -D 29 | 30 | # switch panes using Alt-hjkl without prefix 31 | bind -n M-h select-pane -L 32 | bind -n M-l select-pane -R 33 | bind -n M-k select-pane -U 34 | bind -n M-j select-pane -D 35 | 36 | # Enable mouse control (clickable windows, panes, resizable panes) 37 | set -g mouse on 38 | set -sg escape-time 0 39 | 40 | # switch windows using Alt-nm without prefix 41 | bind -n M-m next-window 42 | bind -n M-n previous-window 43 | bind -n M-f resize-pane -Z 44 | -------------------------------------------------------------------------------- /config/neofetch/batman: -------------------------------------------------------------------------------- 1 | ```````````````````````````````````````````````` 2 | ```````````````:\`````````````./```````````````` 3 | ```````````````om:/++oooo++/:-ds```````````````` 4 | ```````````````yMMMMMNNNNMMMMMMh```````````````` 5 | ```````````````hMMNmNNNNNNNmNMMd```````````````` 6 | ```````````````mMmmMMMMMMMMMMMMN```````````````` 7 | ```````````````NMNNMMMMMMMMMMMMM.``````````````` 8 | ``````````````.MMNdNMMMMMMMNdNMM-``````````````` 9 | ``````````````:MMNmdmMNNNMmdmMMM/``````````````` 10 | ``````````````/MdohmNmdNMMMmdymM+``````````````` 11 | ``````````````oMy```.-/o+:---:mMs``````````````` 12 | ``````````````sMs````....----:dMy``````````````` 13 | ``````````````hMo``````...--::hMd``````````````` 14 | ``````````````dMMy-``````.--+hMMm``````````````` 15 | ````````````:oNNMMMy:-::::+dMMMMMo:````````````` 16 | ````````:ohNNNMMNMMMddNMMMMMMMMMMMMNho-````````` 17 | ```.:ohNNNmddmNNmMMMmNMMMmMMMMMMMMMMMMMNho-````` 18 | -/sdMMNmdmmNNMMMNmMMMMNMMMmMMMMMMMMMMMMMMMMMNho: 19 | -:/+osymNMMMMMMMMMMMMMMMMMMNMMMNmmdddmmmmmmdyo+//: 20 | ``````/dMMMMMMMMMMMMMMMMMMMMMMMMMMNNmmd+.``````` 21 | ````````mMMMMMMMMMMMMMMMMMMMMMMMMMMMMM/````````` 22 | ````````+soossyhmMMMMMMMMMMMMNdysoooos.````````` 23 | ``````````````````:smMMMMMNs:``````````````````` 24 | `````````````````````+NMMs.````````````````````` 25 | ``````````````````````-No``````````````````````` 26 | ```````````````````````+```````````````````````` 27 | -------------------------------------------------------------------------------- /scripts/beamer.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | INTERNAL_OUTPUT="eDP-1" 4 | EXTERNAL_OUTPUT="HDMI-1-0" 5 | 6 | # Detect extenal monitor 7 | if [ `xrandr | grep $EXTERNAL_OUTPUT | grep -c ' connected '` -eq 1 ]; then 8 | 9 | choices="laptop\ndual\nexternal\nclone" 10 | 11 | chosen=$(echo -e $choices | rofi -dmenu -i -fn "Monospace-13" -p "which configuration?") 12 | case "$chosen" in 13 | external) 14 | xrandr --output $INTERNAL_OUTPUT --off --output $EXTERNAL_OUTPUT --auto --primary 15 | notify-send "Screen Configuration" "EXTERNAL" 16 | ;; 17 | laptop) 18 | xrandr --output $INTERNAL_OUTPUT --auto --primary --output $EXTERNAL_OUTPUT --off 19 | notify-send "Screen Configuration" "LAPTOP" 20 | ;; 21 | clone) 22 | resolution=$(xrandr | grep -m 1 '*+' | awk '{print $1}') 23 | echo $resolution 24 | xrandr --output $INTERNAL_OUTPUT --auto --output $EXTERNAL_OUTPUT --auto --scale-from $resolution 25 | notify-send "Screen Configuration" "CLONE" 26 | ;; 27 | dual) 28 | xrandr --output $INTERNAL_OUTPUT --auto --output $EXTERNAL_OUTPUT --auto --above $INTERNAL_OUTPUT --primary 29 | notify-send "Screen Configuration" "DUAL" 30 | ;; 31 | esac 32 | else 33 | xrandr --output $INTERNAL_OUTPUT --auto --primary --output $EXTERNAL_OUTPUT --off 34 | notify-send "Screen Configuration" "LAPTOP (default)" 35 | fi 36 | 37 | -------------------------------------------------------------------------------- /source_list: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | 3 | # This is a script used for executing scripts, sourcing softwares and other 4 | # things before starting a terminal. These are not related to bash or zsh and 5 | # thus kept in a seperate file. 6 | 7 | export TERM=xterm-256color 8 | 9 | # set tabstop to 4 spaces 10 | tabs -4 11 | 12 | # fuzzy file finder (fzf) related settings 13 | [ -f ~/.fzf.zsh ] && source ~/.fzf.zsh 14 | export FZF_DEFAULT_COMMAND='find . -not \( -path "*/build/*" -prune \)\ 15 | -not \( -path "*/devel/*" -prune \)\ 16 | -not \( -path "*/logs/*" -prune \)\ 17 | -not \( -path "*/\.*/*" -prune \)' 18 | export FZF_CTRL_T_COMMAND="$FZF_DEFAULT_COMMAND" 19 | export FZF_DEFAULT_OPTS="--height 40% --layout=reverse --border" 20 | 21 | # ROS stuff 22 | # export ROBOT_ENV=empty-world 23 | # export ROBOT=youbot-brsu-arm 24 | # export ROBOT_ENV=brsu-c025-sim 25 | # export ROBOT=youbot-brsu-4 26 | export ROSCONSOLE_FORMAT='[${severity}] [${time}] [${node}]: ${message}' 27 | # roslaunch gbot robot.launch |& tee /home/ropod/.ros/kelo/log/real_robot_launch_\$(date +%F_%T).log 28 | 29 | # use the previously chose catkin workspace 30 | source $(cat ~/.config/catkin_workspace/chosen_catkin_workspace) 31 | 32 | # ranger file browser related settings 33 | export RANGER_LOAD_DEFAULT_RC=FALSE 34 | VISUAL=vim; export VISUAL EDITOR=vim; export EDITOR 35 | export BROWSER=brave-browser-beta 36 | 37 | # neofetch on start 38 | neofetch --source ~/.config/neofetch/batman3 39 | -------------------------------------------------------------------------------- /scripts/wifi: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Copyright (C) 2014 Alexander Keller 3 | 4 | # This program is free software: you can redistribute it and/or modify 5 | # it under the terms of the GNU General Public License as published by 6 | # the Free Software Foundation, either version 3 of the License, or 7 | # (at your option) any later version. 8 | 9 | # This program is distributed in the hope that it will be useful, 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | # GNU General Public License for more details. 13 | 14 | # You should have received a copy of the GNU General Public License 15 | # along with this program. If not, see . 16 | 17 | #------------------------------------------------------------------------ 18 | 19 | INTERFACE="${BLOCK_INSTANCE:-wlan0}" 20 | 21 | #------------------------------------------------------------------------ 22 | 23 | # As per #36 -- It is transparent: e.g. if the machine has no battery or wireless 24 | # connection (think desktop), the corresponding block should not be displayed. 25 | [[ ! -d /sys/class/net/${INTERFACE}/wireless ]] || 26 | [[ "$(cat /sys/class/net/$INTERFACE/operstate)" = 'down' ]] && exit 27 | 28 | #------------------------------------------------------------------------ 29 | 30 | QUALITY=$(grep $INTERFACE /proc/net/wireless | awk '{ print int($3 * 100 / 70) }') 31 | 32 | #------------------------------------------------------------------------ 33 | 34 | echo $QUALITY% # full text 35 | echo $QUALITY% # short text 36 | 37 | # color 38 | if [[ $QUALITY -ge 80 ]]; then 39 | echo "#00FF00" 40 | elif [[ $QUALITY -lt 80 ]]; then 41 | echo "#FFF600" 42 | elif [[ $QUALITY -lt 60 ]]; then 43 | echo "#FFAE00" 44 | elif [[ $QUALITY -lt 40 ]]; then 45 | echo "#FF0000" 46 | fi 47 | -------------------------------------------------------------------------------- /scripts/pendrive.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # ask user to choose between mounting and unmounting 4 | operation=$(echo -e "Mount\nUnmount" | rofi -dmenu -i -p "Which operation? ") 5 | 6 | if [ "$operation" = "Mount" ];then 7 | # get mountable drives from lsblk command 8 | mountable=$(lsblk -lp | grep "part $" | awk '{print $1, "(" $4 ")"}') 9 | [[ "$mountable" = "" ]] && exit 1 10 | 11 | # ask user to choose a mountable drive 12 | chosen=$(echo "$mountable" | rofi -dmenu -i -fn "Monospace-13" -p "Mount which drive?" | awk '{print $1}') 13 | [[ "$chosen" = "" ]] && exit 1 14 | 15 | # get list of directories where the drive could be mounted 16 | dirs=$(find /media /mnt 2>/dev/null) 17 | # ask user to select a mount point 18 | mountpoint=$(echo "$dirs" | rofi -dmenu -i -fn "Monospace-13" -p "Where do you want to mount "$chosen"?" ) 19 | [[ "$mountpoint" = "" ]] && exit 1 20 | 21 | # create a directory if it does not exist 22 | if [[ ! -d "$mountpoint" ]]; then 23 | sudo mkdir -p "$mountpoint" 24 | fi 25 | 26 | # mount chosen drive to the chosen mountpoint 27 | sudo mount -o umask=0022,uid=1000,gid=1000 $chosen $mountpoint && notify-send "$chosen mounted to $mountpoint" 28 | else 29 | # get unmountable drives from lsblk command and exclude /, /home and /boot from that list 30 | exclusionregex="\(/boot\|/home\|/\)$" 31 | unmountable=$(lsblk -lp | grep "part /" | grep -v "$exclusionregex" | awk '{print $1, "(" $4 ")"}') 32 | [[ "$unmountable" = "" ]] && exit 1 33 | 34 | # ask user to choose a drive to be unmounted 35 | chosen=$(echo "$unmountable" | rofi -dmenu -i -fn "Monospace-13" -p "Unmount which drive?" | awk '{print $1}') 36 | [[ "$chosen" = "" ]] && exit 1 37 | 38 | # mount chosen drive to the chosen mountpoint 39 | sudo umount $chosen && notify-send "$chosen unmounted" 40 | fi 41 | -------------------------------------------------------------------------------- /config/neofetch/batman2: -------------------------------------------------------------------------------- 1 | -------------------------------------------------- 2 | -------.o---------------------------------+.------ 3 | -------.my.------------------------------hd.------ 4 | --------NMo.---------.......-----------.sMN------- 5 | -------:MMN+/+osyhdddmmmmmmmdddhyyso+//+MMN------- 6 | -------+MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM/------ 7 | -------oMMMMMMMMMMMMMNNNNNNNNMMMMMMMMMMMMMM+------ 8 | -------yMMMMMMMmddhhhhhhhhhhhhhddmmNMMMMMMMo------ 9 | ------.hMMMMMMmhhNNNNNMMMNNNNNmmddhhdMMMMMMy.----- 10 | ------.mMMMMmdhdNMMMMMMMMMMMMMMMMMMNmNMMMMMh.----- 11 | -------NMMMNhhmMMMMMMMMMMMMMMMMMMMMMMMMMMMMm.----- 12 | -------NMMMNhhmMMMMMMMMMMMMMMMMMMMMMMMMMMMMN------ 13 | ------:MMMMNhhmMMMMMMMMMMMMMMMMMMMMMMMMMMMMN------ 14 | ------+MMMMNdhmMMMMMMMMMMMMMMMMMMMMMMMMMMMMM:----- 15 | ------oMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM+----- 16 | ------sMMMMMhhmMMMMMMMMMMMMMMMMMMMMNhyNMMMMMo----- 17 | -----.hMMMMMN+::+shmMMMMMMdNMMmhyo/:/mMMMMMMs----- 18 | -----.dMMMMmNMMMMMMMMMmmmNmNMMMMMMMMMMMMMMMMh.---- 19 | -----.mMMMNhhmMMMMMMNdhhhNMMMMMMMMMMMMMMMMMMd.---- 20 | ------NMMdyyhmMMMMNdhhhhhNMMMMMMMMMMMNmhhMMMN.---- 21 | -----:MMMM+..-:+shdmdhhhhNMMMMNmhyo+////NMMMN----- 22 | -----/MMMM+.......--:/+oshyo+/::::::////NMMMM:---- 23 | -----+MMMM:............--:::::::::::////mMMMM/---- 24 | -----sMMMN-........----:://///::::::////dMMMM+---- 25 | -----yMMMN.........-..........-::::::///hMMMMs---- 26 | ----.hMMMm...........---:::::::::::::///yMMMMy---- 27 | ----.mMMMd....................-:::::////sMMMMd.--- 28 | -----NMMMNo...................:::::////omMMMMm.--- 29 | -----NMMMMMmo-...............-::::///odMMMMMMN.--- 30 | ----:MMmNMMMMNo-.............-::://omMMMMMMMMN---- 31 | ---:yMMNdMMMMMMNs-......----::::/smMMMMMMMMMMMs:.- 32 | +ymMMMMMdNMMMMMMmdsooosssssssssymMMMMMMMMMMMMMMMmy 33 | MMMNMMMMmmMMMMMMMhhhhhdMMMMMMMMMMMMMMMMMMMMMMMMMMM 34 | mdhhmMMMNhMMMMMMMmhhhhhNMMMMMMMMMMMMMMMMMMMMMMMMMM 35 | hhhhdNMMMhmMMMMMMMhhdmmNMMMMNmdNMMMMMMMMMMMMMMMMMM -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # My Dot files 2 | 3 | Mostly for personal use. But feel free to use these if you are setting up 4 | your system. 5 | 6 | ### Standard rc files 7 | 8 | - `.bashrc` (config file for bash) 9 | - `.zshrc` (config file for zsh) 10 | - `.vimrc` (config file for vim) 11 | - `.Xdefaults` (config file for urxvt) 12 | - `aliases` (some aliases for bash/zsh that I commonly use) 13 | - `source_list` (list of commands to run before starting terminal) 14 | 15 | ### Config folder for a few programs 16 | 17 | The folders present in `config` folder are generally present in `~/.config` 18 | 19 | Note: You might want to check documentation for each program to make sure 20 | that these files are being used instead of defaults. For example, you have to 21 | execute `ranger --copy-config=all` and replace existing `.config/ranger` with 22 | the one present in this repository to see the changes. 23 | 24 | ### i3 25 | 26 | Config file and some useful bash scripts from `~/.i3/` are placed in this folder. 27 | 28 | On fresh install of i3, the config file might be present in `~/.config/i3/`. You 29 | might wanna delete this and create `~/.i3/`. 30 | 31 | ### vim 32 | 33 | Files for vim terminal editor are present in this folder. This is generally 34 | named `~/.vim/`. 35 | 36 | `.vim/plugged` is ignored here because the folders present inside 37 | are individual git repositories with their own `.git` files. Including these will 38 | not only be a mess but also considered plagarism. These are not important in most 39 | of the cases. These will be created when running `:PlugInstall` in vim. 40 | 41 | ### urxvt 42 | 43 | Plugins for urxvt terminal emulator are present in this folder. This is generally 44 | named `~/.urxvt/`. 45 | 46 | ### Update script 47 | 48 | `update_dotfiles.sh` is a simple shell script which updates the files in 49 | this folder by copying files and folders from different locations. This makes 50 | maintaining dotfiles a little bit easier. 51 | 52 | -------------------------------------------------------------------------------- /config/mutt/muttrc: -------------------------------------------------------------------------------- 1 | # vim: filetype=muttrc 2 | set sort = 'reverse-date' 3 | set include 4 | bind index,pager i noop 5 | bind index,pager g noop 6 | bind index j next-entry 7 | bind index k previous-entry 8 | bind attach view-mailcap 9 | bind attach l view-mailcap 10 | bind editor noop 11 | bind index G last-entry 12 | bind index gg first-entry 13 | bind pager,attach h exit 14 | bind pager j next-line 15 | bind pager k previous-line 16 | bind pager l view-attachments 17 | bind index D delete-message 18 | bind index U undelete-message 19 | bind index L limit 20 | bind index h noop 21 | bind index l display-message 22 | bind index tag-entry 23 | macro browser h '..' "Go to parent folder" 24 | bind browser l select-entry 25 | bind index,pager S sync-mailbox 26 | bind index,pager R group-reply 27 | bind index \031 previous-undeleted # Mouse wheel 28 | bind index \005 next-undeleted # Mouse wheel 29 | bind pager \031 previous-line # Mouse wheel 30 | bind pager \005 next-line # Mouse wheel 31 | bind editor complete-query 32 | 33 | set delete 34 | unset confirmappend 35 | set quit = "ask-yes" 36 | 37 | # visual/looks 38 | set tilde 39 | set smart_wrap 40 | set markers = "no" 41 | set sleep_time = 0 42 | set fast_reply 43 | source ~/.config/mutt/color.muttrc 44 | 45 | macro index gs 'c=Sent' "Go to sent folder" 46 | macro index gi 'c=INBOX' "Go to Inbox folder" 47 | macro index gd 'c=Drafts' "Go to Drafts folder" 48 | macro index gt 'c=Trash' "Go to Trash folder" 49 | 50 | macro pager \co 'urlview' 'Follow links with urlview' 51 | # macro attach V 'iconv -c --to-code=UTF8 > /tmp/mutt_mail.html''$BROWSER /tmp/mutt_mail.html' 'Open html in browser' 52 | 53 | set mailcap_path = ~/.config/mutt/mailcap_muttrc 54 | auto_view text/html 55 | alternative_order text/plain text/enriched text/html 56 | 57 | set signature = ~/.config/mutt/signature_muttrc 58 | 59 | source ~/.config/mutt/locomotec 60 | -------------------------------------------------------------------------------- /config/mutt/color.muttrc: -------------------------------------------------------------------------------- 1 | # vim: filetype=muttrc 2 | ############################################################################### 3 | # Dracula Theme for Mutt: https://draculatheme.com/ 4 | # 5 | # @author Paul Townsend 6 | # general ------------ foreground ---- background ----------------------------- 7 | color error color231 color212 8 | color indicator color231 color241 9 | color markers color210 default 10 | color message default default 11 | color normal default default 12 | color prompt default default 13 | color search color84 default 14 | color status color141 color236 15 | color tilde color231 default 16 | color tree color141 default 17 | # message index ------ foreground ---- background ----------------------------- 18 | color index color210 default ~D # deleted messages 19 | color index color84 default ~F # flagged messages 20 | color index color117 default ~N # new messages 21 | color index color212 default ~Q # messages which have been replied to 22 | color index color215 default ~T # tagged messages 23 | color index color141 default ~v # messages part of a collapsed thread 24 | # message headers ---- foreground ---- background ----------------------------- 25 | color hdrdefault color117 default 26 | color header color231 default ^Subject:.* 27 | # message body ------- foreground ---- background ----------------------------- 28 | color attachment color228 default 29 | color body color231 default [\-\.+_a-zA-Z0-9]+@[\-\.a-zA-Z0-9]+ # email addresses 30 | color body color228 default (https?|ftp)://[\-\.,/%~_:?&=\#a-zA-Z0-9]+ # URLs 31 | color body color231 default (^|[[:space:]])\\*[^[:space:]]+\\*([[:space:]]|$) # *bold* text 32 | color body color231 default (^|[[:space:]])_[^[:space:]]+_([[:space:]]|$) # _underlined_ text 33 | color body color231 default (^|[[:space:]])/[^[:space:]]+/([[:space:]]|$) # /italic/ text 34 | color quoted color61 default 35 | color quoted1 color117 default 36 | color quoted2 color84 default 37 | color quoted3 color215 default 38 | color quoted4 color212 default 39 | color signature color212 default 40 | -------------------------------------------------------------------------------- /vim/autoload/onedark.vim: -------------------------------------------------------------------------------- 1 | " [onedark.vim](https://github.com/joshdick/onedark.vim/) 2 | 3 | let s:overrides = get(g:, "onedark_color_overrides", {}) 4 | 5 | let s:colors = { 6 | \ "red": get(s:overrides, "red", { "gui": "#E06C75", "cterm": "204", "cterm16": "1" }), 7 | \ "dark_red": get(s:overrides, "dark_red", { "gui": "#BE5046", "cterm": "196", "cterm16": "9" }), 8 | \ "green": get(s:overrides, "green", { "gui": "#98C379", "cterm": "114", "cterm16": "2" }), 9 | \ "yellow": get(s:overrides, "yellow", { "gui": "#E5C07B", "cterm": "180", "cterm16": "3" }), 10 | \ "dark_yellow": get(s:overrides, "dark_yellow", { "gui": "#D19A66", "cterm": "173", "cterm16": "11" }), 11 | \ "blue": get(s:overrides, "blue", { "gui": "#61AFEF", "cterm": "39", "cterm16": "4" }), 12 | \ "purple": get(s:overrides, "purple", { "gui": "#C678DD", "cterm": "170", "cterm16": "5" }), 13 | \ "cyan": get(s:overrides, "cyan", { "gui": "#56B6C2", "cterm": "38", "cterm16": "6" }), 14 | \ "white": get(s:overrides, "white", { "gui": "#ABB2BF", "cterm": "145", "cterm16": "7" }), 15 | \ "black": get(s:overrides, "black", { "gui": "#282C34", "cterm": "235", "cterm16": "0" }), 16 | \ "visual_black": get(s:overrides, "visual_black", { "gui": "NONE", "cterm": "NONE", "cterm16": "0" }), 17 | \ "comment_grey": get(s:overrides, "comment_grey", { "gui": "#5C6370", "cterm": "59", "cterm16": "15" }), 18 | \ "gutter_fg_grey": get(s:overrides, "gutter_fg_grey", { "gui": "#4B5263", "cterm": "238", "cterm16": "15" }), 19 | \ "cursor_grey": get(s:overrides, "cursor_grey", { "gui": "#2C323C", "cterm": "236", "cterm16": "8" }), 20 | \ "visual_grey": get(s:overrides, "visual_grey", { "gui": "#3E4452", "cterm": "237", "cterm16": "15" }), 21 | \ "menu_grey": get(s:overrides, "menu_grey", { "gui": "#3E4452", "cterm": "237", "cterm16": "8" }), 22 | \ "special_grey": get(s:overrides, "special_grey", { "gui": "#3B4048", "cterm": "238", "cterm16": "15" }), 23 | \ "vertsplit": get(s:overrides, "vertsplit", { "gui": "#181A1F", "cterm": "59", "cterm16": "15" }), 24 | \} 25 | 26 | function! onedark#GetColors() 27 | return s:colors 28 | endfunction 29 | -------------------------------------------------------------------------------- /vim/colors/my_theme.vim: -------------------------------------------------------------------------------- 1 | " Vim color file 2 | " Maintainer: Dharmin B. 3 | " Last Change: 24 March 2018 4 | " grey on black 5 | " optimized for TFT panels 6 | 7 | set background=dark 8 | hi clear 9 | if exists("syntax_on") 10 | syntax reset 11 | endif 12 | "colorscheme default 13 | let g:colors_name = "my_theme" 14 | 15 | " hardcoded colors : 16 | " GUI Comment : #80a0ff = Light blue 17 | 18 | " GUI 19 | " highlight Normal guifg=Grey80 guibg=Black 20 | " highlight Search guifg=Black guibg=Red gui=bold 21 | " highlight Visual guifg=#404040 gui=bold 22 | " highlight Cursor guifg=Black guibg=Green gui=bold 23 | " highlight Special guifg=Orange 24 | " highlight Comment guifg=#80a0ff 25 | " highlight StatusLine guifg=blue guibg=white 26 | " highlight Statement guifg=Yellow gui=NONE 27 | " highlight Type gui=NONE 28 | 29 | " Console 30 | highlight Normal ctermfg=White ctermbg=Black 31 | highlight Search ctermfg=Red ctermbg=NONE cterm=bold 32 | highlight Visual cterm=reverse 33 | highlight Cursor ctermfg=Black ctermbg=Green cterm=bold 34 | highlight Special ctermfg=Brown 35 | highlight Comment ctermfg=DarkGrey 36 | highlight StatusLine ctermfg=blue ctermbg=white 37 | highlight Statement ctermfg=Yellow cterm=NONE 38 | highlight Type ctermfg=LightGreen cterm=NONE 39 | highlight Cursorline ctermbg=NONE term=bold cterm=bold 40 | highlight CursorLineNR ctermbg=NONE term=bold cterm=bold 41 | highlight String ctermfg=LightBlue 42 | highlight Number ctermfg=DarkMagenta 43 | highlight Float ctermfg=DarkMagenta 44 | highlight Boolean ctermfg=DarkMagenta 45 | highlight Operator ctermfg=Yellow 46 | highlight Identifier ctermfg=Green cterm=NONE 47 | highlight Function ctermfg=Blue cterm=bold 48 | highlight Include ctermfg=Yellow cterm=NONE 49 | 50 | " only for vim 5 51 | if has("unix") 52 | if v:version<600 53 | highlight Normal ctermfg=Grey ctermbg=Black cterm=NONE guifg=Grey80 guibg=Black gui=NONE 54 | highlight Search ctermfg=Black ctermbg=Red cterm=bold guifg=Black guibg=Red gui=bold 55 | highlight Visual ctermfg=Black ctermbg=yellow cterm=bold guifg=#404040 gui=bold 56 | highlight Special ctermfg=LightBlue cterm=NONE guifg=LightBlue gui=NONE 57 | highlight Comment ctermfg=Cyan cterm=NONE guifg=LightBlue gui=NONE 58 | endif 59 | endif 60 | 61 | -------------------------------------------------------------------------------- /vim/colors/new_theme.vim: -------------------------------------------------------------------------------- 1 | " Vim color file 2 | " Maintainer: Dharmin B. 3 | " Last Change: 26 March 2018 4 | " grey on black 5 | " optimized for TFT panels 6 | 7 | set background=dark 8 | hi clear 9 | if exists("syntax_on") 10 | syntax reset 11 | endif 12 | "colorscheme default 13 | let g:colors_name = "new_theme" 14 | 15 | " hardcoded colors : 16 | " GUI Comment : #80a0ff = Light blue 17 | 18 | " GUI 19 | " highlight Normal guifg=Grey80 guibg=Black 20 | " highlight Search guifg=Black guibg=Red gui=bold 21 | " highlight Visual guifg=#404040 gui=bold 22 | " highlight Cursor guifg=Black guibg=Green gui=bold 23 | " highlight Special guifg=Orange 24 | " highlight Comment guifg=#80a0ff 25 | " highlight StatusLine guifg=blue guibg=white 26 | " highlight Statement guifg=Yellow gui=NONE 27 | " highlight Type gui=NONE 28 | 29 | " Console 30 | highlight Normal ctermfg=252 ctermbg=NONE 31 | highlight Search ctermfg=Red ctermbg=NONE cterm=bold 32 | highlight Visual cterm=reverse 33 | highlight Cursor ctermfg=Black ctermbg=Green cterm=bold 34 | highlight Special ctermfg=Brown 35 | highlight Comment ctermfg=DarkGrey 36 | highlight StatusLine ctermfg=blue ctermbg=white 37 | highlight Statement ctermfg=Yellow cterm=NONE 38 | highlight Type ctermfg=LightGreen cterm=NONE 39 | highlight Cursorline ctermbg=237 term=bold cterm=bold 40 | highlight CursorLineNR ctermbg=NONE term=bold cterm=bold 41 | highlight LineNR ctermbg=236 cterm=NONE 42 | highlight String ctermfg=LightBlue 43 | highlight Number ctermfg=DarkMagenta 44 | highlight Float ctermfg=DarkMagenta 45 | highlight Boolean ctermfg=DarkMagenta 46 | highlight Operator ctermfg=Yellow 47 | highlight Identifier ctermfg=Green cterm=NONE 48 | highlight Function ctermfg=Blue cterm=bold 49 | highlight Include ctermfg=Yellow cterm=NONE 50 | 51 | " only for vim 5 52 | if has("unix") 53 | if v:version<600 54 | highlight Normal ctermfg=Grey ctermbg=Black cterm=NONE guifg=Grey80 guibg=Black gui=NONE 55 | highlight Search ctermfg=Black ctermbg=Red cterm=bold guifg=Black guibg=Red gui=bold 56 | highlight Visual ctermfg=Black ctermbg=yellow cterm=bold guifg=#404040 gui=bold 57 | highlight Special ctermfg=LightBlue cterm=NONE guifg=LightBlue gui=NONE 58 | highlight Comment ctermfg=Cyan cterm=NONE guifg=LightBlue gui=NONE 59 | endif 60 | endif 61 | 62 | -------------------------------------------------------------------------------- /zshrc: -------------------------------------------------------------------------------- 1 | # Config File for ZSH 2 | 3 | # Prompt related configuration 4 | function git_stuff(){ 5 | branch=$(git branch 2> /dev/null | grep '\*' | awk '{print ($2)}') 6 | if [ ! -z "$branch" ]; then 7 | st=$(git status --short) 8 | if [ -z "$st" ]; then 9 | echo "%F{green}$branch" 10 | else 11 | echo "%F{red}$branch" 12 | fi 13 | fi 14 | } 15 | PROMPT=' 16 | %F{blue}%S %B%1~%b%F{blue} %s ▶%f ' 17 | RPROMPT='$(git_stuff)' 18 | 19 | # reevaluate prompt every time 20 | setopt promptsubst 21 | 22 | # appends cd in front of a directory name 23 | setopt autocd 24 | 25 | # allow to make a beep noise 26 | setopt beep 27 | 28 | # glob based on ~ 29 | setopt extendedglob 30 | 31 | # if no match found, show a error line 32 | setopt nomatch 33 | 34 | # 35 | setopt notify 36 | 37 | # vim like key bindings 38 | bindkey -v 39 | 40 | # If we have a glob, this will expand it 41 | setopt glob_complete 42 | setopt pushd_minus 43 | 44 | # case insensitive glob 45 | setopt no_case_glob 46 | 47 | # command completion 48 | autoload -U compinit 49 | compinit 50 | # autocomplete with keyboard 51 | zstyle ':completion:*' menu select 52 | # case insensitive completion 53 | zstyle ':completion:*' matcher-list 'm:{a-z}={A-Z}' 54 | # generate description with magic 55 | zstyle ':completion:*' auto-description 'specify: %d' 56 | # autocompletion for command line switches for alias 57 | setopt completealiases 58 | 59 | # history related settings 60 | HISTFILE=~/.histfile 61 | HISTSIZE=10000 62 | SAVEHIST=10000 63 | setopt appendhistory 64 | # prevent duplicate lines in history 65 | setopt hist_save_no_dups 66 | setopt hist_ignore_all_dups 67 | setopt hist_find_no_dups 68 | # write to history after each command 69 | setopt inc_append_history 70 | bindkey "^F" history-beginning-search-forward 71 | bindkey "^R" history-incremental-search-backward 72 | 73 | # rehash automatically so new files in $PATH are found 74 | zstyle ':completion:*' rehash true 75 | 76 | # disable "flow control" (flow control locks terminal when pressing ctrl+s 77 | stty -ixon 78 | 79 | 80 | # The following lines were added by compinstall 81 | zstyle :compinstall filename '/home/dharmin/.zshrc' 82 | 83 | # End of lines added by compinstall 84 | 85 | # function zle-line-init zle-keymap-select { 86 | # RPS1="${${KEYMAP/vicmd/-- NORMAL --}/(main|viins)/-- INSERT --}" 87 | # RPS2=$RPS1 88 | # zle reset-prompt 89 | # } 90 | # zle -N zle-line-init 91 | # zle -N zle-keymap-select 92 | 93 | # source zsh_aliases file 94 | source ~/dotfiles/aliases 95 | 96 | source ~/dotfiles/source_list 97 | -------------------------------------------------------------------------------- /bash_aliases: -------------------------------------------------------------------------------- 1 | 2 | # Basic 3 | alias vi="gvim" 4 | alias py="python3" 5 | 6 | # source bashrc 7 | alias sb='source $HOME/.bashrc' 8 | 9 | # colorise ls command 10 | alias ls='ls --color=auto' 11 | 12 | # colorise tree command 13 | alias tree='tree -C' 14 | 15 | # some ls aliases 16 | alias ll='ls -alF' 17 | alias la='ls -A' 18 | alias l='ls -CF' 19 | 20 | # colorise grep commands 21 | alias grep='grep --color=auto' 22 | alias fgrep='fgrep --color=auto' 23 | alias egrep='egrep --color=auto' 24 | 25 | # parent directories aliases 26 | alias ..='cdls ..' 27 | alias ...='cdls ../..' 28 | alias ....='cdls ../../..' 29 | alias .....='cdls ../../../..' 30 | 31 | # tmux alias 32 | alias troscore='tmux new -A -s roscore' 33 | alias tbringup='tmux new -A -s bringup' 34 | alias tplanning_bringup='tmux new -A -s planning_bringup' 35 | alias tskynet='tmux new -A -s skynet' 36 | alias tmisc='tmux new -A -s misc' 37 | alias tls='tmux ls' 38 | 39 | # git 40 | alias st='git status' 41 | alias br='git branch -a' 42 | 43 | # lock from PC 44 | #alias lock="gnome-screensaver-command -a" 45 | 46 | # ROS 47 | alias sourceme="source devel/setup.bash" 48 | 49 | # b-it-bots 50 | # BELOW alias is for mir_object_recognition package 51 | # alias launch_recognition="roslaunch mir_object_recognition multimodal_object_recognition.launch" 52 | # alias event_in="rostopic pub -1 /mir_perception/multimodal_object_recognition/event_in std_msgs/String \"data: \'e_start'\"" 53 | # alias play_bag="rosbag play -l -q ~/work/b_it_bot_work/2d_object_detection/b_it_bot_dataset/bagfiles/2022-04-26-15-37-47.bag" 54 | # alias play_bag_2="rosbag play -l -q ~/work/b_it_bot_work/2d_object_detection/b_it_bot_dataset/summer_competition_22_dataset/bagfiles_ss22_dataset_local_competition/2022-08-31-10-06-58.bag" 55 | alias bitbots="cd ~/work/b_it_bots/b_it_bots_ws" 56 | alias yb2="ssh -X robocup@192.168.1.114" 57 | alias yb4="ssh -X robocup@192.168.1.142" 58 | alias yb3="ssh -X robocup@192.168.1.116" 59 | alias youbot_export="export ROS_MASTER_URI=http://192.168.1.114:11311" 60 | alias yb2_eth="ssh -X robocup@192.168.1.138" 61 | alias anylabel="conda activate anylabeling && anylabeling" 62 | 63 | # to access at-work lab PC from home 64 | alias tuni_hbrs_vpn='tmux new -A -s uni_hbrs_vpn' 65 | alias uni_work_station_access="sudo openvpn ~/Documents/HBRS_vpn/client.conf" 66 | alias work_lab_cluster="ssh -X kpatel2s@10.20.118.78" 67 | alias work_lab_cluster-folders="sshfs kpatel2s@10.20.118.78:/home/kpatel2s/kpatel2s /home/kvnptl/HBRS/cloud_drive_mounts/uni_hbrs_work_lab_gpu" 68 | alias work_lab_cluster-folders-datasets="sshfs kpatel2s@10.20.118.78:/srv/disk1/datasets/kpatel2s_datasets /home/kvnptl/HBRS/cloud_drive_mounts/uni_hbrs_work_lab_gpu_datasets" 69 | -------------------------------------------------------------------------------- /config/ranger/commands.py: -------------------------------------------------------------------------------- 1 | # This is a sample commands.py. You can add your own commands here. 2 | # 3 | # Please refer to commands_full.py for all the default commands and a complete 4 | # documentation. Do NOT add them all here, or you may end up with defunct 5 | # commands when upgrading ranger. 6 | 7 | # You always need to import ranger.api.commands here to get the Command class: 8 | from ranger.api.commands import * 9 | 10 | # A simple command for demonstration purposes follows. 11 | #------------------------------------------------------------------------------ 12 | 13 | # You can import any python module as needed. 14 | import os 15 | 16 | # Any class that is a subclass of "Command" will be integrated into ranger as a 17 | # command. Try typing ":my_edit" in ranger! 18 | class my_edit(Command): 19 | # The so-called doc-string of the class will be visible in the built-in 20 | # help that is accessible by typing "?c" inside ranger. 21 | """:my_edit 22 | 23 | A sample command for demonstration purposes that opens a file in an editor. 24 | """ 25 | 26 | # The execute method is called when you run this command in ranger. 27 | def execute(self): 28 | # self.arg(1) is the first (space-separated) argument to the function. 29 | # This way you can write ":my_edit somefilename". 30 | if self.arg(1): 31 | # self.rest(1) contains self.arg(1) and everything that follows 32 | target_filename = self.rest(1) 33 | else: 34 | # self.fm is a ranger.core.filemanager.FileManager object and gives 35 | # you access to internals of ranger. 36 | # self.fm.thisfile is a ranger.container.file.File object and is a 37 | # reference to the currently selected file. 38 | target_filename = self.fm.thisfile.path 39 | 40 | # This is a generic function to print text in ranger. 41 | self.fm.notify("Let's edit the file " + target_filename + "!") 42 | 43 | # Using bad=True in fm.notify allows you to print error messages: 44 | if not os.path.exists(target_filename): 45 | self.fm.notify("The given file does not exist!", bad=True) 46 | return 47 | 48 | # This executes a function from ranger.core.acitons, a module with a 49 | # variety of subroutines that can help you construct commands. 50 | # Check out the source, or run "pydoc ranger.core.actions" for a list. 51 | self.fm.edit_file(target_filename) 52 | 53 | # The tab method is called when you press tab, and should return a list of 54 | # suggestions that the user will tab through. 55 | def tab(self): 56 | # This is a generic tab-completion function that iterates through the 57 | # content of the current directory. 58 | return self._tab_directory_content() 59 | -------------------------------------------------------------------------------- /urxvt/ext/clipboard: -------------------------------------------------------------------------------- 1 | #! perl -w 2 | # Author: Bert Muennich 3 | # Website: http://www.github.com/muennich/urxvt-perls 4 | # License: GPLv2 5 | 6 | # Use keyboard shortcuts to copy the selection to the clipboard and to paste 7 | # the clipboard contents (optionally escaping all special characters). 8 | # Requires xsel to be installed! 9 | 10 | # Usage: put the following lines in your .Xdefaults/.Xresources: 11 | # URxvt.perl-ext-common: ...,clipboard 12 | # URxvt.keysym.M-c: perl:clipboard:copy 13 | # URxvt.keysym.M-v: perl:clipboard:paste 14 | # URxvt.keysym.M-C-v: perl:clipboard:paste_escaped 15 | 16 | # Options: 17 | # URxvt.clipboard.autocopy: If true, PRIMARY overwrites clipboard 18 | 19 | # You can also overwrite the system commands to use for copying/pasting. 20 | # The default ones are: 21 | # URxvt.clipboard.copycmd: xsel -ib 22 | # URxvt.clipboard.pastecmd: xsel -ob 23 | # If you prefer xclip, then put these lines in your .Xdefaults/.Xresources: 24 | # URxvt.clipboard.copycmd: xclip -i -selection clipboard 25 | # URxvt.clipboard.pastecmd: xclip -o -selection clipboard 26 | # On Mac OS X, put these lines in your .Xdefaults/.Xresources: 27 | # URxvt.clipboard.copycmd: pbcopy 28 | # URxvt.clipboard.pastecmd: pbpaste 29 | 30 | # The use of the functions should be self-explanatory! 31 | 32 | use strict; 33 | 34 | sub on_start { 35 | my ($self) = @_; 36 | 37 | $self->{copy_cmd} = $self->x_resource('clipboard.copycmd') || 'xsel -ib'; 38 | $self->{paste_cmd} = $self->x_resource('clipboard.pastecmd') || 'xsel -ob'; 39 | 40 | if ($self->x_resource('clipboard.autocopy') eq 'true') { 41 | $self->enable(sel_grab => \&sel_grab); 42 | } 43 | 44 | () 45 | } 46 | 47 | sub copy { 48 | my ($self) = @_; 49 | 50 | if (open(CLIPBOARD, "| $self->{copy_cmd}")) { 51 | my $sel = $self->selection(); 52 | utf8::encode($sel); 53 | print CLIPBOARD $sel; 54 | close(CLIPBOARD); 55 | } else { 56 | print STDERR "error running '$self->{copy_cmd}': $!\n"; 57 | } 58 | 59 | () 60 | } 61 | 62 | sub paste { 63 | my ($self) = @_; 64 | 65 | my $str = `$self->{paste_cmd}`; 66 | if ($? == 0) { 67 | $self->tt_paste($str); 68 | } else { 69 | print STDERR "error running '$self->{paste_cmd}': $!\n"; 70 | } 71 | 72 | () 73 | } 74 | 75 | sub paste_escaped { 76 | my ($self) = @_; 77 | 78 | my $str = `$self->{paste_cmd}`; 79 | if ($? == 0) { 80 | $str =~ s/([!#\$%&\*\(\) ='"\\\|\[\]`~,<>\?])/\\\1/g; 81 | $self->tt_paste($str); 82 | } else { 83 | print STDERR "error running '$self->{paste_cmd}': $!\n"; 84 | } 85 | 86 | () 87 | } 88 | 89 | sub on_action { 90 | my ($self, $action) = @_; 91 | 92 | on_user_command($self, "clipboard:" . $action); 93 | } 94 | 95 | sub on_user_command { 96 | my ($self, $cmd) = @_; 97 | 98 | if ($cmd eq "clipboard:copy") { 99 | $self->copy; 100 | } elsif ($cmd eq "clipboard:paste") { 101 | $self->paste; 102 | } elsif ($cmd eq "clipboard:paste_escaped") { 103 | $self->paste_escaped; 104 | } 105 | 106 | () 107 | } 108 | 109 | sub sel_grab { 110 | my ($self) = @_; 111 | 112 | $self->copy; 113 | 114 | () 115 | } 116 | -------------------------------------------------------------------------------- /vim/UltiSnips/tex.snippets: -------------------------------------------------------------------------------- 1 | snippet bf "Bold font" i 2 | \textbf{$0} 3 | endsnippet 4 | 5 | snippet ita "Italic font" i 6 | \textit{$0} 7 | endsnippet 8 | 9 | snippet tt "Monospace font" i 10 | \texttt{$0} 11 | endsnippet 12 | 13 | snippet simple_article "Simple article class" b 14 | \documentclass[12pt]{article} 15 | \usepackage{natbib,amsmath,amsfonts,fullpage,hyphenat,booktabs,graphicx,setspace} 16 | \usepackage[colorlinks,linkcolor=black,citecolor=blue,urlcolor=black]{hyperref} 17 | \setcitestyle{square,comma,super} 18 | \onehalfspacing 19 | 20 | \title{${2:Title}} 21 | \author{${3:Team member and }Dharmin Bakaraniya} 22 | \begin{document} 23 | \maketitle 24 | 25 | % \begin{abstract} 26 | % \end{abstract} 27 | 28 | \section{${4:Introduction}} 29 | $0 30 | 31 | % \begin{thebibliography}{1} 32 | % \bibitem{uniqueKey}Authors ``Title'' Conference/journal name, year. 33 | % \bibitem{anotherUniqueKey}\href{https://github.com/DharminB}{My git} 34 | % \end{thebibliography} 35 | 36 | \end{document} 37 | endsnippet 38 | 39 | snippet simple_beamer "Simple beamer template" b 40 | \documentclass{beamer} 41 | \usetheme{Rochester} 42 | %\usecolortheme{seagull} 43 | %\usecolortheme{whale} 44 | %\setbeamertemplate{footline} % To remove the footer line in all slides uncomment this line 45 | \setbeamertemplate{footline}[page number] % To replace the footer line in all slides with a simple slide count uncomment this line 46 | \setbeamertemplate{navigation symbols}{} % To remove the navigation symbols from the bottom of all slides uncomment this line 47 | \usepackage{graphicx, booktabs} 48 | 49 | \title{${2:Title}} 50 | \subtitle{${3:Subtitle}} 51 | \author{${4:Team Member and }Dharmin Bakaraniya} 52 | \institute{${5:Insitute}} 53 | \date{\today} 54 | \begin{document} 55 | 56 | \begin{frame} 57 | \titlepage{} 58 | \end{frame} 59 | 60 | \begin{frame} 61 | \frametitle{\huge{${6:Introduction}}} 62 | $0 63 | % \begin{itemize} 64 | % \item Item 1 65 | % \item Item 2 66 | % \end{itemize} 67 | \end{frame} 68 | 69 | 70 | %\begin{frame} 71 | % \frametitle{\huge{Blocks of Highlighted Text}} 72 | % \begin{block}{Block 1} 73 | % Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer lectus nisl, ultricies in feugiat rutrum, porttitor sit amet augue. Aliquam ut tortor mauris. Sed volutpat ante purus, quis accumsan dolor. 74 | % \end{block} 75 | %\end{frame} 76 | % 77 | %\begin{frame} 78 | % \frametitle{\huge{Multiple Columns}} 79 | % \begin{columns}[t] 80 | % \column{.45\textwidth} 81 | % \textbf{Heading} 82 | % \begin{enumerate} 83 | % \item Statement 84 | % \end{enumerate} 85 | % \column{.5\textwidth} 86 | % Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer lectus nisl, ultricies in feugiat rutrum, porttitor sit amet augue. Aliquam ut tortor mauris. Sed volutpat ante purus, quis accumsan dolor. 87 | % \end{columns} 88 | %\end{frame} 89 | % 90 | %\begin{frame} 91 | % \frametitle{\huge{References}} 92 | % \footnotesize{ 93 | % \begin{thebibliography}{1} 94 | % \bibitem[Smith, 2012]{p1} John Smith (2012) Some pub, some date 95 | % \end{thebibliography} 96 | %} 97 | %\end{frame} 98 | % 99 | %\begin{frame} 100 | % \Huge{\centerline{Thank you}} 101 | %\end{frame} 102 | \end{document} 103 | endsnippet 104 | 105 | snippet abcd "test snippet" i 106 | Hello there. This is a test snippet. Please remain calm. 107 | This is the second line of test snippet. 108 | endsnippet 109 | 110 | -------------------------------------------------------------------------------- /aliases: -------------------------------------------------------------------------------- 1 | # zsh aliases 2 | 3 | alias :q='exit' 4 | 5 | alias sz='source $HOME/.zshrc' 6 | 7 | # colorise ls command 8 | alias ls='ls --color=auto' 9 | 10 | # colorise tree command 11 | alias tree='tree -C' 12 | 13 | # some ls aliases 14 | alias ll='ls -alF' 15 | alias la='ls -A' 16 | alias l='ls -CF' 17 | 18 | # colorise grep commands 19 | alias grep='grep --color=auto' 20 | alias fgrep='fgrep --color=auto' 21 | alias egrep='egrep --color=auto' 22 | 23 | # combine cd and ls functions 24 | function cdls(){ 25 | cd "$@" && ls 26 | } 27 | 28 | # parent directories aliases 29 | alias ..='cdls ..' 30 | alias ...='cdls ../..' 31 | alias ....='cdls ../../..' 32 | alias .....='cdls ../../../..' 33 | 34 | # run ranger (with exiing to selected directory option) 35 | # alias r='echo "Starting Ranger file manager"; ranger --choosedir=$HOME/.lastdir; cd `cat $HOME/.lastdir`' 36 | alias r='. ranger' 37 | 38 | # open a file after choosing from fzf 39 | alias vf='vim $(fzf)' 40 | 41 | # ping google's DNS 42 | alias p='ping 8.8.8.8' 43 | 44 | # alias for mounting and unmounting usb 45 | alias pendrive='~/dotfiles/scripts/pendrive.sh' 46 | 47 | # alias for choosing workspace 48 | alias choose_catkin_ws='~/dotfiles/scripts/catkin_workspace_switcher.sh' 49 | 50 | alias cbt='catkin build --this' 51 | 52 | # Add an "alert" alias for long running commands. Use like so: 53 | # sleep 10; alert 54 | alias alarm="~/dotfiles/scripts/alarm.sh" 55 | 56 | # tmux alias 57 | alias tmisc='tmux new -A -s misc' 58 | 59 | alias lofi='cvlc --loop ~/Music/lofi_hiphop.mp3' 60 | 61 | alias mpcn='roslaunch mpc_navigation mpc_navigator.launch' 62 | alias mpcnd='roslaunch mpc_navigation mpc_navigator.launch dummy_mode:=true' 63 | 64 | alias plantuml='java -Xmx1024m -DPLANTUML_LIMIT_SIZE=8192 -jar ~/.local/bin/plantuml-1.2022.1.jar -gui' 65 | 66 | # robot related aliases 67 | alias yb2='ssh robocup@192.168.1.120' 68 | alias yb2l='ssh -X robocup@192.168.1.120' 69 | alias yb4='ssh -X robocup@youbot-brsu-4-pc2' 70 | alias export_yb4='export ROS_MASTER_URI=http://youbot-brsu-4-pc2:11311' 71 | alias yb2pc2='ssh -X robocup@youbot-brsu-2-pc2' 72 | alias export_yb2pc2='export ROS_MASTER_URI=http://youbot-brsu-2-pc2:11311; export ROS_IP=192.168.1.119' 73 | alias yb3pc1='ssh -X robocup@192.168.1.114' 74 | alias export_yb3pc1='export ROS_MASTER_URI=http://192.168.1.114:11311; export ROS_IP=192.168.1.119' 75 | alias bonnie='ssh -X ropod@192.168.22.105' 76 | alias export_bonnie='export ROS_MASTER_URI=http://192.168.22.105:11311' 77 | alias narko='ssh -X narko5@192.168.22.205' 78 | alias export_narko='export ROS_MASTER_URI=http://192.168.22.205:11311' 79 | alias jetson='ssh kelo@192.168.22.122' 80 | alias export_jetson='export ROS_MASTER_URI=http://192.168.22.122:11311' 81 | alias uvc='ssh -X ropod@192.168.1.102' 82 | alias export_uvc='export ROS_MASTER_URI=http://192.168.1.102:11311' 83 | alias uvc_nuc_2='ssh -X kelo@192.168.1.106' 84 | alias export_uvc_nuc_2='export ROS_MASTER_URI=http://192.168.1.106:11311' 85 | alias lucy='ssh lucy@192.168.50.201' 86 | alias export_lucy='export ROS_MASTER_URI=http://192.168.50.201:11311; export ROS_IP=192.168.50.3' 87 | alias kelo3='ssh kelo@kelo3' 88 | alias export_kelo3='export ROS_MASTER_URI=http://kelo3:11311' 89 | alias bergheim_pi='ssh -X -i ~/.ssh/id_rsa_locomotec -p 8006 pi@kdpw622zk0ovrjr0.myfritz.net' 90 | alias robile1='ssh -X kelo@kelo4' 91 | alias export_robile='export ROS_MASTER_URI=http://kelo4:11311' 92 | alias xavier='ssh kelo@xavier6' 93 | alias export_walter='export ROS_MASTER_URI=http://walter-4u:11311' 94 | alias uvc3='ssh -X kelo@uvc3' 95 | alias export_uvc3='export ROS_MASTER_URI=http://uvc3:11311' 96 | alias dell_server='ssh -p 82 sblume@locomotec.noip.me' 97 | alias kelo5='ssh -X kelo@kelo5' 98 | alias export_kelo5='export ROS_MASTER_URI=http://kelo5:11311' 99 | -------------------------------------------------------------------------------- /installation_guide.md: -------------------------------------------------------------------------------- 1 | # Installation Guide 2 | 3 | Add instructions for install i3 gaps 4 | 5 | ``` 6 | ln -s ~/dotfiles/config/i3/config ~/.config/i3/config 7 | ln -s ~/dotfiles/config/i3/i3blocks.conf ~/.config/i3/i3blocks.conf 8 | 9 | sudo apt install ranger 10 | ln -s ~/dotfiles/config/ranger ~/.config/ranger 11 | sudo apt install i3blocks 12 | sudo apt install rxvt-unicode-256color 13 | sudo apt install dmenu 14 | sudo apt install rofi 15 | sudo apt install i3lock 16 | sudo apt install pulseaudio-utils 17 | 18 | echo "/home/dharmin" > ~/.lastdir 19 | echo "1.0" > ~/.config/brightness 20 | ``` 21 | 22 | # install playerctl 23 | ``` 24 | wget http://ftp.nl.debian.org/debian/pool/main/p/playerctl/libplayerctl2_2.0.1-1_amd64.deb 25 | wget http://ftp.nl.debian.org/debian/pool/main/p/playerctl/playerctl_2.0.1-1_amd64.deb 26 | sudo dpkg -i libplayerctl2_2.0.1-1_amd64.deb playerctl_2.0.1-1_amd64.deb 27 | 28 | sudo apt install libxrandr2 29 | sudo apt install scrot 30 | 31 | ln -s ~/dotfiles/Xdefaults ~/.Xdefaults 32 | ln -s ~/dotfiles/config/i3/config ~/.config/i3/config 33 | 34 | sudo apt install jq 35 | sudo apt install feh 36 | sudo apt install imagemagick 37 | ``` 38 | 39 | ### install brave browser beta 40 | ``` 41 | sudo apt install apt-transport-https curl gnupg 42 | 43 | curl -s https://brave-browser-apt-beta.s3.brave.com/brave-core-nightly.asc | sudo apt-key --keyring /etc/apt/trusted.gpg.d/brave-browser-prerelease.gpg add - 44 | 45 | echo "deb [arch=amd64] https://brave-browser-apt-beta.s3.brave.com/ stable main" | sudo tee /etc/apt/sources.list.d/brave-browser-beta.list 46 | 47 | sudo apt update 48 | 49 | sudo apt install brave-browser-beta 50 | ``` 51 | 52 | ``` 53 | sudo apt install sylpheed 54 | ``` 55 | 56 | ### install and use zsh (logout and login for zsh to work) 57 | ``` 58 | sudo apt install zsh 59 | chsh -s /usr/bin/zsh 60 | ``` 61 | ``` 62 | sudo apt install neofetch 63 | ln -s ~/dotfiles/config/neofetch ~/.config/ 64 | ln -s ~/dotfiles/urxvt ~/.urxvt 65 | ``` 66 | 67 | ### setup vim 68 | ``` 69 | sudo apt install vim-gnome 70 | ln -s ~/dotfiles/vimrc ~/.vimrc 71 | ln -s ~/dotfiles/vim ~/.vim 72 | vim 73 | :PlugInstall 74 | :qa 75 | ``` 76 | 77 | ### brightness 78 | 79 | - install light from github 80 | - build and install 81 | 82 | ``` 83 | sudo chmod +s /usr/bin/light 84 | ``` 85 | 86 | ### screen tear and transparency 87 | 88 | ``` 89 | sudo apt install compton 90 | ``` 91 | log out and log back in 92 | 93 | ### Change wallpapers using cron 94 | 95 | execute `crontab -e` 96 | Add this at the last line 97 | 98 | ``` 99 | */1 * * * * /bin/bash /home/USER/dotfiles/scripts/change_wallpaper.sh >/tmp/wallpaper_cronjob.log 2>&1 100 | ``` 101 | 102 | ### Additional software 103 | 104 | ``` 105 | sudo apt install mpv 106 | sudo apt install thunderbird 107 | sudo snap install spotify 108 | sudo snap install skype 109 | sudo apt install zathura 110 | sudo apt install simplescreenrecorder 111 | sudo apt install wireguard-tools 112 | sudo apt install resolvconf 113 | sudo apt install tmux 114 | sudo apt install htop 115 | sudo apt install tree 116 | sudo apt install gimp 117 | sudo apt install libreoffice 118 | sudo apt install w3m 119 | sudo apt install python-pip 120 | sudo apt install nmap 121 | sudo apt install xclip 122 | sudo apt install python-rosdep 123 | sudo apt install texlive-full 124 | sudo apt install latexmk 125 | ``` 126 | 127 | install zoom 128 | 129 | ### Element riot messenger 130 | 131 | ``` 132 | sudo apt install -y wget apt-transport-https 133 | sudo wget -O /usr/share/keyrings/element-io-archive-keyring.gpg https://packages.element.io/debian/element-io-archive-keyring.gpg 134 | echo "deb [signed-by=/usr/share/keyrings/element-io-archive-keyring.gpg] https://packages.element.io/debian/ default main" | sudo tee /etc/apt/sources.list.d/element-io.list 135 | sudo apt update 136 | sudo apt install element-desktop 137 | ``` 138 | -------------------------------------------------------------------------------- /config/rofi/theme.rasi: -------------------------------------------------------------------------------- 1 | * { 2 | active-background: @background; 3 | active-foreground: @foreground; 4 | normal-background: transparent; 5 | normal-foreground: @foreground; 6 | urgent-background: @background; 7 | urgent-foreground: @foreground; 8 | 9 | alternate-active-background: transparent; 10 | alternate-active-foreground: @foreground; 11 | alternate-normal-background: transparent; 12 | alternate-normal-foreground: @foreground; 13 | alternate-urgent-background: transparent; 14 | alternate-urgent-foreground: @foreground; 15 | 16 | selected-active-background: @background; 17 | selected-active-foreground: @foreground; 18 | selected-normal-background: @foreground; 19 | selected-normal-foreground: rgb(46, 52, 64, 90%); 20 | selected-urgent-background: @background; 21 | selected-urgent-foreground: @foreground; 22 | 23 | background-color: @background; 24 | background: rgb(46, 52, 64, 20%); 25 | foreground: rgb(129, 161, 193, 90%); 26 | border-color: @background; 27 | spacing: 0; 28 | } 29 | 30 | #window { 31 | background-color: @background; 32 | border: 0; 33 | padding: 0.1ch; 34 | } 35 | 36 | #mainbox { 37 | border: 0; 38 | padding: 0; 39 | } 40 | 41 | #message { 42 | border: 2px 0px 0px; 43 | border-color: @border-color; 44 | padding: 1px; 45 | } 46 | 47 | #textbox { 48 | text-color: @foreground; 49 | } 50 | 51 | inputbar { 52 | children: [ prompt,textbox-prompt-colon,entry,case-indicator ]; 53 | } 54 | 55 | textbox-prompt-colon { 56 | expand: false; 57 | str: ":"; 58 | margin: 0px 0.3em 0em 0em; 59 | text-color: @normal-foreground; 60 | } 61 | 62 | #listview { 63 | fixed-height: 0; 64 | border: 2px 0px 0px; 65 | border-color: @border-color; 66 | spacing: 2px; 67 | scrollbar: true; 68 | padding: 2px 0px 0px; 69 | } 70 | 71 | #element { 72 | border: 0; 73 | padding: 1px; 74 | } 75 | 76 | #element.normal.normal { 77 | background-color: @normal-background; 78 | text-color: @normal-foreground; 79 | } 80 | 81 | #element.normal.urgent { 82 | background-color: @urgent-background; 83 | text-color: @urgent-foreground; 84 | } 85 | 86 | #element.normal.active { 87 | background-color: @active-background; 88 | text-color: @active-foreground; 89 | } 90 | 91 | #element.selected.normal { 92 | background-color: @selected-normal-background; 93 | text-color: @selected-normal-foreground; 94 | } 95 | 96 | #element.selected.urgent { 97 | background-color: @selected-urgent-background; 98 | text-color: @selected-urgent-foreground; 99 | } 100 | 101 | #element.selected.active { 102 | background-color: @selected-active-background; 103 | text-color: @selected-active-foreground; 104 | } 105 | 106 | #element.alternate.normal { 107 | background-color: @alternate-normal-background; 108 | text-color: @alternate-normal-foreground; 109 | } 110 | 111 | #element.alternate.urgent { 112 | background-color: @alternate-urgent-background; 113 | text-color: @alternate-urgent-foreground; 114 | } 115 | 116 | #element.alternate.active { 117 | background-color: @alternate-active-background; 118 | text-color: @alternate-active-foreground; 119 | } 120 | 121 | #scrollbar { 122 | width: 0px; 123 | border: 0; 124 | handle-width: 0px; 125 | padding: 0; 126 | } 127 | 128 | #sidebar { 129 | border: 2px 0px 0px; 130 | border-color: @border-color; 131 | } 132 | 133 | #button { 134 | text-color: @normal-foreground; 135 | } 136 | 137 | #button.selected { 138 | background-color: @selected-normal-background; 139 | text-color: @selected-normal-foreground; 140 | } 141 | 142 | #inputbar { 143 | spacing: 0; 144 | text-color: @normal-foreground; 145 | padding: 1px; 146 | } 147 | 148 | #case-indicator { 149 | spacing: 0; 150 | text-color: @normal-foreground; 151 | } 152 | 153 | #entry { 154 | spacing: 0; 155 | text-color: @normal-foreground; 156 | } 157 | 158 | #prompt { 159 | spacing: 0; 160 | text-color: @normal-foreground; 161 | } 162 | -------------------------------------------------------------------------------- /config/i3/i3blocks.conf: -------------------------------------------------------------------------------- 1 | # i3blocks config file 2 | # 3 | # Please see man i3blocks for a complete reference! 4 | # The man page is also hosted at http://vivien.github.io/i3blocks 5 | # 6 | # List of valid properties: 7 | # 8 | # align 9 | # color 10 | # command 11 | # full_text 12 | # instance 13 | # interval 14 | # label 15 | # min_width 16 | # name 17 | # separator 18 | # separator_block_width 19 | # short_text 20 | # signal 21 | # urgent 22 | 23 | # Global properties 24 | # 25 | # The top properties below are applied to every block, but can be overridden. 26 | # Each block command defaults to the script name to avoid boilerplate. 27 | command=/usr/share/i3blocks/$BLOCK_NAME 28 | separator_block_width=25 29 | markup=none 30 | 31 | # GIF wallpaper 32 | # [gif] 33 | # interval=3 34 | # command=bash ~/dotfiles/scripts/gif_wallpaper.sh 35 | # separator=true 36 | 37 | # wallpaper 38 | [wp] 39 | interval=10 40 | command=bash ~/dotfiles/scripts/change_wallpaper_i3blocks.sh 41 | separator=true 42 | 43 | # Volume indicator 44 | # 45 | # The first parameter sets the step (and units to display) 46 | # The second parameter overrides the mixer selection 47 | # See the script for details. 48 | [volume] 49 | #label=VOL 50 | label=🔊 51 | instance=Master 52 | #instance=PCM 53 | interval=5 54 | signal=10 55 | command=/usr/share/i3blocks/volume 5 pulse 56 | separator=true 57 | 58 | 59 | # Disk usage 60 | # 61 | # The directory defaults to $HOME if the instance is not specified. 62 | # The script may be called with a optional argument to set the alert 63 | # (defaults to 10 for 10%). 64 | #[disk] 65 | #label=HOME 66 | ##instance=/mnt/data 67 | #interval=30 68 | 69 | # Network interface monitoring 70 | # 71 | # If the instance is not specified, use the interface used for default route. 72 | # The address can be forced to IPv4 or IPv6 with -4 or -6 switches. 73 | #[iface] 74 | ##instance=wlo1 75 | #color=#00FF00 76 | #interval=10 77 | #separator=false 78 | 79 | [wifi] 80 | label=📶 81 | command=~/dotfiles/scripts/wifi 82 | instance=wlp0s20f3 83 | interval=10 84 | separator=false 85 | 86 | [ssid] 87 | command=iwgetid -r 88 | color=#00FF00 89 | interval=10 90 | separator=false 91 | 92 | [bandwidth] 93 | #instance=eth0 94 | color=#00FF00 95 | interval=5 96 | 97 | [cpu] 98 | interval=30 99 | command=bash ~/dotfiles/scripts/cpu.sh 100 | separator=false 101 | # CPU usage 102 | # 103 | # The script may be called with -w and -c switches to specify thresholds, 104 | # see the script for details. 105 | [cpu_usage] 106 | # label=CPU 107 | interval=10 108 | #min_width=CPU: 100.00% 109 | #separator=false 110 | 111 | #[load_average] 112 | #interval=10 113 | 114 | # Memory usage 115 | # 116 | # The type defaults to "mem" if the instance is not specified. 117 | [memory] 118 | #label=MEM 119 | label=⛃ 120 | separator=true 121 | interval=30 122 | command=bash ~/dotfiles/scripts/memory.sh 123 | 124 | #[memory] 125 | #label=SWAP 126 | #instance=swap 127 | #separator=false 128 | #interval=30 129 | # Battery indicator 130 | # 131 | # The battery instance defaults to 0. 132 | [battery] 133 | #label=BAT 134 | label=⚡ 135 | #instance=1 136 | interval=30 137 | 138 | # Date Time 139 | # 140 | [time] 141 | label=⏰ 142 | command=date '+%a %d %b %Y %H:%M:%S' 143 | interval=1 144 | 145 | # Generic media player support 146 | # 147 | # This displays "ARTIST - SONG" if a music is playing. 148 | # Supported players are: spotify, vlc, audacious, xmms2, mplayer, and others. 149 | #[mediaplayer] 150 | #instance=spotify 151 | #interval=5 152 | #signal=10 153 | 154 | # OpenVPN support 155 | # 156 | # Support multiple VPN, with colors. 157 | #[openvpn] 158 | #interval=20 159 | 160 | # Temperature 161 | # 162 | # Support multiple chips, though lm-sensors. 163 | # The script may be called with -w and -c switches to specify thresholds, 164 | # see the script for details. 165 | #[temperature] 166 | #label=TEMP 167 | #interval=10 168 | 169 | # Key indicators 170 | # 171 | # Add the following bindings to i3 config file: 172 | # 173 | # bindsym --release Caps_Lock exec pkill -SIGRTMIN+11 i3blocks 174 | # bindsym --release Num_Lock exec pkill -SIGRTMIN+11 i3blocks 175 | #[keyindicator] 176 | #instance=CAPS 177 | #interval=once 178 | #signal=11 179 | 180 | #[keyindicator] 181 | #instance=NUM 182 | #interval=once 183 | #signal=11 184 | -------------------------------------------------------------------------------- /vim/vimrc: -------------------------------------------------------------------------------- 1 | " ============================================================================= 2 | " General settings 3 | " ============================================================================= 4 | 5 | set confirm 6 | 7 | " change cursor in different modes 8 | let &t_SI = "\e[6 q" 9 | let &t_EI = "\e[2 q" 10 | 11 | " setting to keep cursor line in middle 12 | set scrolloff=5 13 | 14 | " Vim loads indentation and plugins acc. to detected filetype 15 | filetype plugin indent on 16 | 17 | " Vim jumps to last position when reopening a file 18 | if has("autocmd") 19 | au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif 20 | endif 21 | 22 | " Better copy & paste 23 | set pastetoggle= 24 | set clipboard=unnamedplus 25 | 26 | " Automatic reloading of .vimrc 27 | autocmd! bufwritepost .vimrc source % 28 | 29 | " Enable backspace to work normally 30 | set backspace=start,eol,indent 31 | 32 | " Enable syntax highlighting 33 | syntax on 34 | 35 | " make hidden characters like tabs or EOL visible 36 | " set listchars=nbsp:_,trail:.,tab:▸\ ,eol:¬ 37 | set listchars=nbsp:_,trail:.,tab:▸\ 38 | set list 39 | 40 | " disable auto-commenting when entering new line 41 | autocmd FileType * setlocal formatoptions+=c formatoptions+=r formatoptions-=o 42 | 43 | " enter the current millenium 44 | set nocompatible 45 | 46 | " hide buffers instead of closing when switching to another buffer 47 | set hidden 48 | 49 | " use every file in current dir and child dir while "find" ind 50 | set path=** 51 | 52 | " wildmenu for fuzzy file finding 53 | set wildmenu 54 | 55 | " level of nesting to fold 56 | " set foldnestmax=0 57 | set nofoldenable 58 | " set foldlevel=0 59 | 60 | " Show line numbers 61 | set number 62 | 63 | " Show relative line numbers 64 | set relativenumber 65 | 66 | " Set tabs width to 4, it is still \t 67 | set tabstop=4 68 | " Set shiftwidth to 0 which makes it equal to tabwidth by default. This is 69 | " needed to use proper indentation 70 | set shiftwidth=0 71 | 72 | " Expand tabs into spaces 73 | set expandtab|retab 74 | 75 | " Indent when moving to the next line while writing code 76 | set autoindent 77 | 78 | " setting smart indentation 79 | set smartindent 80 | 81 | " Show the matching part of the pair for [] {} and () 82 | set showmatch 83 | 84 | " set color column 85 | hi ColorColumn ctermbg=darkgrey guibg=lightgrey 86 | set colorcolumn=80 87 | " set textwidth 88 | set textwidth=80 89 | " disable autowrap text when writing in insert mode 90 | set formatoptions-=t 91 | " disable wrapping the lines 92 | set nowrap 93 | 94 | " highlight search 95 | set hlsearch 96 | 97 | " include search (highlights while typing the search pattern) 98 | set incsearch 99 | " Make search case insensitive 100 | set ignorecase 101 | set smartcase 102 | 103 | " Disable backup and swap files 104 | set nobackup 105 | set nowritebackup 106 | set noswapfile 107 | 108 | " Eliminate delay between INSERT and ESCAPE 109 | set timeoutlen=1000 ttimeoutlen=0 110 | 111 | 112 | 113 | " ============================================================================= 114 | " Key Mappings 115 | " ============================================================================= 116 | 117 | " map spacebar as leader key 118 | nnoremap 119 | let mapleader=" " 120 | 121 | " my mappings 122 | :command! W w 123 | :command! Q q 124 | :command! WQ wq 125 | :command! Wq wq 126 | :command! Toc VimtexTocOpen 127 | :command! RemoveWhiteSpace %s/\s\+$//e 128 | 129 | " Mouse click 130 | " set mouse=a 131 | " disable scroll using mouse 132 | nmap 133 | nmap 134 | imap 135 | imap 136 | vmap 137 | vmap 138 | 139 | " Copy in the clipboard 140 | vnoremap "+y 141 | vnoremap "+p 142 | 143 | " Easier indentation of code blocks 144 | vnoremap < >gv 146 | 147 | " Move between splits 148 | nmap k :wincmd k 149 | nmap j :wincmd j 150 | nmap h :wincmd h 151 | nmap l :wincmd l 152 | 153 | " open directory tree on left side 154 | nnoremap e :20Lexplore 155 | 156 | " find go to next/previous underscore 157 | nnoremap f f_ 158 | nnoremap F F_ 159 | 160 | " search for selected text 161 | vnoremap // y/" 162 | 163 | " Y behave like other uppercase letters 164 | nnoremap Y y$ 165 | 166 | 167 | " ============================================================================= 168 | " Plugins 169 | " ============================================================================= 170 | 171 | " Automatically download vim-plug if not present 172 | let data_dir = '~/.vim' 173 | if empty(glob(data_dir . '/autoload/plug.vim')) 174 | silent execute '!curl -fLo '.data_dir.'/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim' 175 | autocmd VimEnter * PlugInstall --sync | source $MYVIMRC 176 | endif 177 | 178 | " source all plugins 179 | call plug#begin(data_dir . '/plugged') 180 | source ~/.vim/plugins/ultisnips.vim 181 | source ~/.vim/plugins/vim-snippets.vim 182 | source ~/.vim/plugins/vim-commentary.vim 183 | source ~/.vim/plugins/vim-fugitive.vim 184 | source ~/.vim/plugins/vim-surround.vim 185 | source ~/.vim/plugins/vim-cpp-enhanced-highlight.vim 186 | source ~/.vim/plugins/fzf.vim 187 | source ~/.vim/plugins/lightline.vim 188 | source ~/.vim/plugins/vim-hardtime.vim 189 | source ~/.vim/plugins/vimtex.vim 190 | source ~/.vim/plugins/DoxygenToolkit.vim 191 | source ~/.vim/plugins/vim-markdown.vim 192 | call plug#end() 193 | 194 | 195 | source ~/.vim/plugins/my_autocomplete.vim 196 | source ~/.vim/plugins/switch_source_header.vim 197 | source ~/.vim/plugins/netrw_settings.vim 198 | source ~/.vim/plugins/tag_managment.vim 199 | source ~/.vim/plugins/terminal_build.vim 200 | 201 | 202 | " ============================================================================= 203 | " Color scheme 204 | " ============================================================================= 205 | 206 | colorscheme onedark 207 | " set background=dark 208 | " transparent background 209 | hi Normal guibg=NONE ctermbg=NONE 210 | -------------------------------------------------------------------------------- /bashrc: -------------------------------------------------------------------------------- 1 | # ~/.bashrc: executed by bash(1) for non-login shells. 2 | # see /usr/share/doc/bash/examples/startup-files (in the package bash-doc) 3 | # for examples 4 | 5 | # If not running interactively, don't do anything 6 | case $- in 7 | *i*) ;; 8 | *) return;; 9 | esac 10 | 11 | # don't put duplicate lines or lines starting with space in the history. 12 | # See bash(1) for more options 13 | HISTCONTROL=ignoreboth 14 | 15 | # append to the history file, don't overwrite it 16 | shopt -s histappend 17 | 18 | # for setting history length see HISTSIZE and HISTFILESIZE in bash(1) 19 | HISTSIZE=1000 20 | HISTFILESIZE=2000 21 | 22 | # check the window size after each command and, if necessary, 23 | # update the values of LINES and COLUMNS. 24 | shopt -s checkwinsize 25 | 26 | # If set, the pattern "**" used in a pathname expansion context will 27 | # match all files and zero or more directories and subdirectories. 28 | #shopt -s globstar 29 | 30 | # make less more friendly for non-text input files, see lesspipe(1) 31 | [ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)" 32 | 33 | # set variable identifying the chroot you work in (used in the prompt below) 34 | if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then 35 | debian_chroot=$(cat /etc/debian_chroot) 36 | fi 37 | 38 | # set a fancy prompt (non-color, unless we know we "want" color) 39 | case "$TERM" in 40 | xterm-color|*-256color) color_prompt=yes;; 41 | esac 42 | 43 | # uncomment for a colored prompt, if the terminal has the capability; turned 44 | # off by default to not distract the user: the focus in a terminal window 45 | # should be on the output of commands, not on the prompt 46 | #force_color_prompt=yes 47 | 48 | if [ -n "$force_color_prompt" ]; then 49 | if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then 50 | # We have color support; assume it's compliant with Ecma-48 51 | # (ISO/IEC-6429). (Lack of such support is extremely rare, and such 52 | # a case would tend to support setf rather than setaf.) 53 | color_prompt=yes 54 | else 55 | color_prompt= 56 | fi 57 | fi 58 | 59 | if [ "$color_prompt" = yes ]; then 60 | PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ ' 61 | else 62 | PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ ' 63 | fi 64 | unset color_prompt force_color_prompt 65 | 66 | # If this is an xterm set the title to user@host:dir 67 | case "$TERM" in 68 | xterm*|rxvt*) 69 | PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1" 70 | ;; 71 | *) 72 | ;; 73 | esac 74 | 75 | # enable color support of ls and also add handy aliases 76 | if [ -x /usr/bin/dircolors ]; then 77 | test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)" 78 | alias ls='ls --color=auto' 79 | #alias dir='dir --color=auto' 80 | #alias vdir='vdir --color=auto' 81 | 82 | alias grep='grep --color=auto' 83 | alias fgrep='fgrep --color=auto' 84 | alias egrep='egrep --color=auto' 85 | fi 86 | 87 | # colored GCC warnings and errors 88 | #export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01' 89 | 90 | # some more ls aliases 91 | alias ll='ls -alF' 92 | alias la='ls -A' 93 | alias l='ls -CF' 94 | 95 | # Add an "alert" alias for long running commands. Use like so: 96 | # sleep 10; alert 97 | alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"' 98 | 99 | # Alias definitions. 100 | # You may want to put all your additions into a separate file like 101 | # ~/.bash_aliases, instead of adding them here directly. 102 | # See /usr/share/doc/bash-doc/examples in the bash-doc package. 103 | 104 | if [ -f ~/.bash_aliases ]; then 105 | . ~/.bash_aliases 106 | fi 107 | 108 | # enable programmable completion features (you don't need to enable 109 | # this, if it's already enabled in /etc/bash.bashrc and /etc/profile 110 | # sources /etc/bash.bashrc). 111 | if ! shopt -oq posix; then 112 | if [ -f /usr/share/bash-completion/bash_completion ]; then 113 | . /usr/share/bash-completion/bash_completion 114 | elif [ -f /etc/bash_completion ]; then 115 | . /etc/bash_completion 116 | fi 117 | fi 118 | 119 | 120 | # <<< Below commands added by user Kevin Patel >>> 121 | 122 | if [ -f ~/.bash_completion ]; then 123 | . ~/.bash_completion 124 | fi 125 | 126 | # combine cd and ls functions 127 | function cdls(){ 128 | cd "$@" && ls 129 | } 130 | 131 | #ROS 1 and ROS 2 environment setup 132 | 133 | #source /opt/ros/noetic/setup.bash 134 | 135 | #source ~/ros2_foxy/install/local_setup.bash 136 | 137 | # >>> conda initialize >>> 138 | # The base environment is not activated by default 139 | 140 | # !! Contents within this block are managed by 'conda init' !! 141 | __conda_setup="$('/home/kvnptl/anaconda3/bin/conda' 'shell.bash' 'hook' 2> /dev/null)" 142 | if [ $? -eq 0 ]; then 143 | eval "$__conda_setup" 144 | else 145 | if [ -f "/home/kvnptl/anaconda3/etc/profile.d/conda.sh" ]; then 146 | . "/home/kvnptl/anaconda3/etc/profile.d/conda.sh" 147 | else 148 | export PATH="/home/kvnptl/anaconda3/bin:$PATH" 149 | fi 150 | fi 151 | unset __conda_setup 152 | 153 | conda config --set auto_activate_base False 154 | # <<< conda initialize <<< 155 | 156 | CONDA_ROOT=~/anaconda3 # <- set to your Anaconda/Miniconda installation directory 157 | if [[ -r $CONDA_ROOT/etc/profile.d/bash_completion.sh ]]; then 158 | source $CONDA_ROOT/etc/profile.d/bash_completion.sh 159 | else 160 | echo "WARNING: could not find conda-bash-completion setup script" 161 | fi 162 | 163 | # Show git branch name 164 | 165 | # Show git branch name only if ahead of remote 166 | ahead_of_remote() { 167 | local ahead="$(git rev-list @{u}.. 2>&1 | wc -l)" 168 | if [ $ahead -gt 0 ]; then 169 | echo "++"; 170 | fi 171 | } 172 | 173 | 174 | force_color_prompt=yes 175 | color_prompt=yes 176 | parse_git_branch() { 177 | git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/' 178 | } 179 | if [ "$color_prompt" = yes ]; then 180 | #PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[01;31m\]$(parse_git_branch)\[\033[00m\]\$ ' 181 | PS1='\[\033[01;32m\]\W\[\033[01;31m\]$(__git_ps1 " (%s$(ahead_of_remote))")\[\033[00m\]\$' 182 | else 183 | PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w$(parse_git_branch)\$ ' 184 | fi 185 | unset color_prompt force_color_prompt 186 | 187 | # my catkin workspace 188 | #source ~/work/catkin_ws/devel/setup.bash 189 | 190 | 191 | if [[ -n $SSH_CONNECTION ]]; then 192 | echo "SSH Connection: hello" 193 | fi 194 | 195 | # ROS 2 Humble 196 | source /opt/ros/humble/setup.bash 197 | source /usr/share/colcon_argcomplete/hook/colcon-argcomplete.bash 198 | source ~/work/ros2_ws/install/setup.bash 199 | -------------------------------------------------------------------------------- /config/ranger/rifle.conf: -------------------------------------------------------------------------------- 1 | # vim: ft=cfg 2 | # 3 | # This is the configuration file of "rifle", ranger's file executor/opener. 4 | # Each line consists of conditions and a command. For each line the conditions 5 | # are checked and if they are met, the respective command is run. 6 | # 7 | # Syntax: 8 | # , , ... = command 9 | # 10 | # The command can contain these environment variables: 11 | # $1-$9 | The n-th selected file 12 | # $@ | All selected files 13 | # 14 | # If you use the special command "ask", rifle will ask you what program to run. 15 | # 16 | # Prefixing a condition with "!" will negate its result. 17 | # These conditions are currently supported: 18 | # match | The regexp matches $1 19 | # ext | The regexp matches the extension of $1 20 | # mime | The regexp matches the mime type of $1 21 | # name | The regexp matches the basename of $1 22 | # path | The regexp matches the absolute path of $1 23 | # has | The program is installed (i.e. located in $PATH) 24 | # env | The environment variable "variable" is non-empty 25 | # file | $1 is a file 26 | # directory | $1 is a directory 27 | # number | change the number of this command to n 28 | # terminal | stdin, stderr and stdout are connected to a terminal 29 | # X | $DISPLAY is not empty (i.e. Xorg runs) 30 | # 31 | # There are also pseudo-conditions which have a "side effect": 32 | # flag | Change how the program is run. See below. 33 | # label