dots

git clone git://mattcarlson.org/repos/dots.git
Log | Files | Refs

profile (3356B)


      1 #!/bin/sh
      2 #
      3 # profile
      4 
      5 # add local scripts to path
      6 PATH="${PATH}:$(du "${HOME}/.local/bin/" | cut -f 2 | tr '\n' ':' | sed 's/:*$//')"
      7 export PATH
      8 
      9 # programs
     10 export WM='dwm'
     11 export BAR='dwmblocks'
     12 export MENU='dmenu_run -c -l 10'
     13 export LOCKER='slock'
     14 export BROWSER='firefox'
     15 export TERMINAL='st'
     16 export FILE_VIEWER='fff'
     17 export EDITOR='vim'
     18 export MAIL_CLIENT='neomutt'
     19 export MUSIC_PLAYER='ncmpcpp'
     20 export READER='zathura'
     21 export YOUTUBE_CLIENT='ytfzf'
     22 export IMG_VIEWER='feh'
     23 export MIXER='alsamixer'
     24 export TORRENT_CLIENT='tremc'
     25 export IMAGE_EDITOR='gimp-2.99'
     26 export RSS_READER='newsboat'
     27 
     28 # xdg base directories
     29 export XDG_CONFIG_HOME="${HOME}/.config/"
     30 export XDG_DATA_HOME="${HOME}/.local/share/"
     31 export XDG_CACHE_HOME="${HOME}/.cache/"
     32 export XDG_STATE_HOME="${HOME}/.local/state/"
     33 
     34 # xdg base directory support
     35 export VIMINIT="source ${XDG_CONFIG_HOME:-${HOME}/.config/}/vim/vimrc"
     36 export GNUPGHOME="${XDG_DATA_HOME:-${HOME}/.local/share/}/gnupg/"
     37 export ENV="${XDG_CONFIG_HOME:-${HOME}/.config/}/mksh/mkshrc"
     38 export HISTFILE=''
     39 export XAUTHORITY="${XDG_RUNTIME_DIR}/xauth"
     40 export YTFZF_CONFIG_DIR="${XDG_CONFIG_HOME:-${HOME}/.config/}/ytfzf/"
     41 export YTFZF_CONFIG_FILE="${YTFZF_CONFIG_DIR}/ytfzf.sh"
     42 export STARDICT_DATA_DIR="${XDG_DATA_HOME:-${HOME}/.local/share/}"
     43 
     44 # folders
     45 export MAIL_DIR="${HOME}/mail/"
     46 export PICTURES_DIR="${HOME}/pix/"
     47 export DOWNLOADS_DIR="${HOME}/dl/"
     48 
     49 # colorful man pages
     50 LESS_TERMCAP_mb="$(printf '%b' '\x1b[1;32m')"
     51 export LESS_TERMCAP_mb
     52 LESS_TERMCAP_md="$(printf '%b' '\x1b[1;32m')"
     53 export LESS_TERMCAP_md
     54 LESS_TERMCAP_me="$(printf '%b' '\x1b[0m')"
     55 export LESS_TERMCAP_me
     56 LESS_TERMCAP_so="$(printf '%b' '\x1b[1;30;42m')"
     57 export LESS_TERMCAP_so
     58 LESS_TERMCAP_se="$(printf '%b' '\x1b[23;0m')"
     59 export LESS_TERMCAP_se
     60 LESS_TERMCAP_us="$(printf '%b' '\x1b[4;1;32m')"
     61 export LESS_TERMCAP_us
     62 LESS_TERMCAP_ue="$(printf '%b' '\x1b[24;0m')"
     63 export LESS_TERMCAP_ue
     64 LESS_TERMCAP_mr="$(printf '%b' '\x1b[7m')"
     65 export LESS_TERMCAP_mr
     66 LESS_TERMCAP_mh="$(printf '%b' '\x1b[2m')"
     67 export LESS_TERMCAP_mh
     68 LESS_TERMCAP_ZN=$(tput ssubm)
     69 export LESS_TERMCAP_ZN
     70 LESS_TERMCAP_ZV=$(tput rsubm)
     71 export LESS_TERMCAP_ZV
     72 LESS_TERMCAP_ZO=$(tput ssupm)
     73 export LESS_TERMCAP_ZO
     74 LESS_TERMCAP_ZW=$(tput rsupm)
     75 export LESS_TERMCAP_ZW
     76 
     77 # file explorer
     78 export FFF_COL1=2
     79 export FFF_COL2=2
     80 export FFF_COL3=1
     81 export FFF_COL4=2
     82 export FFF_COL5=0
     83 export FFF_HIDDEN=1
     84 export FFF_LS_COLORS=1
     85 export FFF_OPENER="${HOME}/.local/bin/open.sh"
     86 export FFF_STAT_CMD="stat"
     87 
     88 # device specific
     89 hostname='/etc/hostname'
     90 if [ -f "${hostname}" ]; then
     91     if [ "$(cat "${hostname}")" = 'laptop' ]; then
     92         export HOSTNAME='laptop'
     93         export MONITOR='DP3-2'
     94     elif [ "$(cat "${hostname}")" = 'pc' ]; then
     95         export HOSTNAME='pc'
     96         export MONITOR='DP-2'
     97     fi
     98 fi
     99 export PF_INFO='ascii title os host kernel uptime pkgs memory shell editor wm palette'
    100 export PF_COL1=2
    101 
    102 # fzf
    103 export FZF_DEFAULT_OPTS='
    104     --color fg:7
    105     --color preview-fg:2
    106     --color preview-bg:2
    107     --color hl:2
    108     --color fg+:0
    109     --color bg+:2
    110     --color gutter:2
    111     --color hl+:7
    112     --color info:2
    113     --color border:2
    114     --color prompt:2
    115     --color pointer:2
    116     --color marker:2
    117     --color spinner:2
    118     --color header:2
    119 '
    120 # clean up
    121 export LESSHISTFILE=-
    122 export SDCV_HISTFILE='/dev/null'
    123 
    124 # sx
    125 [ -z "${DISPLAY}" ] && [ "$(tty)" = /dev/tty1 ] && ssh-agent sx