From a324612c70d12bfc86bb9ce744fdc2548a596c5c Mon Sep 17 00:00:00 2001 From: David Todd Date: Wed, 25 Mar 2020 14:26:51 -0500 Subject: [PATCH] restructuring --- .gitignore | 6 + {i3 => bin}/screencast2gif.sh | 0 {i3 => bin}/screenshotter.sh | 0 {i3 => bin}/wallpaper.sh | 6 +- {i3 => home/.config/i3}/compton.conf | 0 {i3 => home/.config/i3}/config | 0 {i3 => home/.config/i3}/i3-dstatus.conf | 0 {i3 => home/.config/i3}/i3blocks.conf | 0 {i3 => home/.config/i3}/i3blocks/bandwidth | 0 {i3 => home/.config/i3}/i3blocks/clock | 0 {i3 => home/.config/i3}/i3blocks/cpu | 0 {i3 => home/.config/i3}/i3blocks/cpu_usage | Bin {i3 => home/.config/i3}/i3blocks/disk | 0 {i3 => home/.config/i3}/i3blocks/gpu-load | 0 {i3 => home/.config/i3}/i3blocks/internet | 0 {i3 => home/.config/i3}/i3blocks/load_average | 0 {i3 => home/.config/i3}/i3blocks/memory | 0 {i3 => home/.config/i3}/i3blocks/scratchpad | 0 {i3 => home/.config/i3}/i3blocks/spotify | 0 {i3 => home/.config/i3}/i3blocks/window | 0 {i3 => home/.config/i3}/stalonetrayrc | 0 home/{ => .config}/terminator/config | 0 home/.local/share/applications/mimeapps.list | 0 {shell => home/shell}/aliases | 0 {shell => home/shell}/bashrc | 14 +- {shell => home/shell}/env | 14 +- {shell => home/shell}/functions | 0 home/{ => shell}/tmux.conf | 0 home/{ => shell}/vimrc | 0 {shell => home/shell}/zshrc | 6 +- home/stalonetrayrc | 137 ------------------ install.sh | 27 ++-- {.bin => internal_bin}/check_for_upgrade.sh | 2 +- {.bin => internal_bin}/install.arch | 0 {.bin => internal_bin}/install.deb | 0 {.bin => internal_bin}/upgrade.sh | 0 36 files changed, 42 insertions(+), 170 deletions(-) rename {i3 => bin}/screencast2gif.sh (100%) rename {i3 => bin}/screenshotter.sh (100%) rename {i3 => bin}/wallpaper.sh (98%) rename {i3 => home/.config/i3}/compton.conf (100%) rename {i3 => home/.config/i3}/config (100%) rename {i3 => home/.config/i3}/i3-dstatus.conf (100%) rename {i3 => home/.config/i3}/i3blocks.conf (100%) rename {i3 => home/.config/i3}/i3blocks/bandwidth (100%) rename {i3 => home/.config/i3}/i3blocks/clock (100%) rename {i3 => home/.config/i3}/i3blocks/cpu (100%) rename {i3 => home/.config/i3}/i3blocks/cpu_usage (100%) rename {i3 => home/.config/i3}/i3blocks/disk (100%) rename {i3 => home/.config/i3}/i3blocks/gpu-load (100%) rename {i3 => home/.config/i3}/i3blocks/internet (100%) rename {i3 => home/.config/i3}/i3blocks/load_average (100%) rename {i3 => home/.config/i3}/i3blocks/memory (100%) rename {i3 => home/.config/i3}/i3blocks/scratchpad (100%) rename {i3 => home/.config/i3}/i3blocks/spotify (100%) rename {i3 => home/.config/i3}/i3blocks/window (100%) rename {i3 => home/.config/i3}/stalonetrayrc (100%) rename home/{ => .config}/terminator/config (100%) create mode 100644 home/.local/share/applications/mimeapps.list rename {shell => home/shell}/aliases (100%) rename {shell => home/shell}/bashrc (92%) rename {shell => home/shell}/env (86%) rename {shell => home/shell}/functions (100%) rename home/{ => shell}/tmux.conf (100%) rename home/{ => shell}/vimrc (100%) rename {shell => home/shell}/zshrc (95%) delete mode 100644 home/stalonetrayrc rename {.bin => internal_bin}/check_for_upgrade.sh (96%) rename {.bin => internal_bin}/install.arch (100%) rename {.bin => internal_bin}/install.deb (100%) rename {.bin => internal_bin}/upgrade.sh (100%) diff --git a/.gitignore b/.gitignore index 8a7a27d..04b77e8 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,9 @@ *.swo *.DS_STORE *desktop.ini + +home/.config/Code +home/.config/google-chrome +home/.config/libfm +home/.config/pcmanfm +home/.config/yay \ No newline at end of file diff --git a/i3/screencast2gif.sh b/bin/screencast2gif.sh similarity index 100% rename from i3/screencast2gif.sh rename to bin/screencast2gif.sh diff --git a/i3/screenshotter.sh b/bin/screenshotter.sh similarity index 100% rename from i3/screenshotter.sh rename to bin/screenshotter.sh diff --git a/i3/wallpaper.sh b/bin/wallpaper.sh similarity index 98% rename from i3/wallpaper.sh rename to bin/wallpaper.sh index 09eed2f..ccf9238 100755 --- a/i3/wallpaper.sh +++ b/bin/wallpaper.sh @@ -1,6 +1,6 @@ #!/bin/bash shopt -s nullglob - + #===change these config start=== #wallpapers directory path @@ -20,8 +20,8 @@ while true; do [[ -f $i ]] && files+=("$i") done range=${#files[@]} - + ((range)) && feh --bg-scale "${files[RANDOM % range]}" - + sleep $interval done diff --git a/i3/compton.conf b/home/.config/i3/compton.conf similarity index 100% rename from i3/compton.conf rename to home/.config/i3/compton.conf diff --git a/i3/config b/home/.config/i3/config similarity index 100% rename from i3/config rename to home/.config/i3/config diff --git a/i3/i3-dstatus.conf b/home/.config/i3/i3-dstatus.conf similarity index 100% rename from i3/i3-dstatus.conf rename to home/.config/i3/i3-dstatus.conf diff --git a/i3/i3blocks.conf b/home/.config/i3/i3blocks.conf similarity index 100% rename from i3/i3blocks.conf rename to home/.config/i3/i3blocks.conf diff --git a/i3/i3blocks/bandwidth b/home/.config/i3/i3blocks/bandwidth similarity index 100% rename from i3/i3blocks/bandwidth rename to home/.config/i3/i3blocks/bandwidth diff --git a/i3/i3blocks/clock b/home/.config/i3/i3blocks/clock similarity index 100% rename from i3/i3blocks/clock rename to home/.config/i3/i3blocks/clock diff --git a/i3/i3blocks/cpu b/home/.config/i3/i3blocks/cpu similarity index 100% rename from i3/i3blocks/cpu rename to home/.config/i3/i3blocks/cpu diff --git a/i3/i3blocks/cpu_usage b/home/.config/i3/i3blocks/cpu_usage similarity index 100% rename from i3/i3blocks/cpu_usage rename to home/.config/i3/i3blocks/cpu_usage diff --git a/i3/i3blocks/disk b/home/.config/i3/i3blocks/disk similarity index 100% rename from i3/i3blocks/disk rename to home/.config/i3/i3blocks/disk diff --git a/i3/i3blocks/gpu-load b/home/.config/i3/i3blocks/gpu-load similarity index 100% rename from i3/i3blocks/gpu-load rename to home/.config/i3/i3blocks/gpu-load diff --git a/i3/i3blocks/internet b/home/.config/i3/i3blocks/internet similarity index 100% rename from i3/i3blocks/internet rename to home/.config/i3/i3blocks/internet diff --git a/i3/i3blocks/load_average b/home/.config/i3/i3blocks/load_average similarity index 100% rename from i3/i3blocks/load_average rename to home/.config/i3/i3blocks/load_average diff --git a/i3/i3blocks/memory b/home/.config/i3/i3blocks/memory similarity index 100% rename from i3/i3blocks/memory rename to home/.config/i3/i3blocks/memory diff --git a/i3/i3blocks/scratchpad b/home/.config/i3/i3blocks/scratchpad similarity index 100% rename from i3/i3blocks/scratchpad rename to home/.config/i3/i3blocks/scratchpad diff --git a/i3/i3blocks/spotify b/home/.config/i3/i3blocks/spotify similarity index 100% rename from i3/i3blocks/spotify rename to home/.config/i3/i3blocks/spotify diff --git a/i3/i3blocks/window b/home/.config/i3/i3blocks/window similarity index 100% rename from i3/i3blocks/window rename to home/.config/i3/i3blocks/window diff --git a/i3/stalonetrayrc b/home/.config/i3/stalonetrayrc similarity index 100% rename from i3/stalonetrayrc rename to home/.config/i3/stalonetrayrc diff --git a/home/terminator/config b/home/.config/terminator/config similarity index 100% rename from home/terminator/config rename to home/.config/terminator/config diff --git a/home/.local/share/applications/mimeapps.list b/home/.local/share/applications/mimeapps.list new file mode 100644 index 0000000..e69de29 diff --git a/shell/aliases b/home/shell/aliases similarity index 100% rename from shell/aliases rename to home/shell/aliases diff --git a/shell/bashrc b/home/shell/bashrc similarity index 92% rename from shell/bashrc rename to home/shell/bashrc index 7088a78..f2affeb 100644 --- a/shell/bashrc +++ b/home/shell/bashrc @@ -1,7 +1,7 @@ # Include our shared environment stuff -source ~/dotfiles/shell/env -source ~/dotfiles/shell/aliases -source ~/dotfiles/shell/functions +source ~/dotfiles/home/shell/env +source ~/dotfiles/home/shell/aliases +source ~/dotfiles/home/shell/functions # Basic options export HISTCONTROL=ignoredups @@ -47,7 +47,7 @@ function timer_stop { } trap 'timer_start' DEBUG -PROMPT_COMMAND=timer_stop +PROMPT_COMMAND=timer_stop # Prompt # Black 0;30 Dark Gray 1;30 @@ -85,10 +85,10 @@ PS1="$PS1""${LGREEN}[${LPURPLE}\u${WHITE}@${LBLUE}\h${LGREEN}]-(${YELLOW}\w${LGR PS1="$PS1""\n [${LRED}\@ ${LGRAY}Last:${WHITE} \${timer_show}s ${LCYAN}Err:" # Error code test - not working -#if [[ \$? = "0" ]] # If last program exited with 0 (good exit) -#then +#if [[ \$? = "0" ]] # If last program exited with 0 (good exit) +#then PS1="$PS1"" ${WHITE}\$?" # show white error code -#else +#else # PS1="$PS1"" ${LRED}\$?" # if last program exited with anything else, show red error code #fi diff --git a/shell/env b/home/shell/env similarity index 86% rename from shell/env rename to home/shell/env index 292dfe8..6d29e4b 100644 --- a/shell/env +++ b/home/shell/env @@ -1,9 +1,9 @@ -# Skip all this for non-interactive shells -[[ -z "$PS1" ]] && return - -# Force en_US UTF-8 environment -export LC_ALL=en_US.UTF-8 -export LANG=en_US.UTF-8 +# Skip all this for non-interactive shells +[[ -z "$PS1" ]] && return + +# Force en_US UTF-8 environment +export LC_ALL=en_US.UTF-8 +export LANG=en_US.UTF-8 export LANGUAGE=en_US.UTF-8 # Terminal Editor @@ -25,7 +25,7 @@ export DISABLE_DOTFILES_UPDATE_PROMPT="FALSE" export UPDATE_DOTFILES_DAYS=13 # Whether or not to automatically connect to a TMUX session when opening the shell -export ENABLE_TMUXAC="TRUE" +export ENABLE_TMUXAC="FALSE" # If there is not an active tmux session, we probably want one # Otherwise, the shell will not open the session again (eg. opening tabs, new terminals) diff --git a/shell/functions b/home/shell/functions similarity index 100% rename from shell/functions rename to home/shell/functions diff --git a/home/tmux.conf b/home/shell/tmux.conf similarity index 100% rename from home/tmux.conf rename to home/shell/tmux.conf diff --git a/home/vimrc b/home/shell/vimrc similarity index 100% rename from home/vimrc rename to home/shell/vimrc diff --git a/shell/zshrc b/home/shell/zshrc similarity index 95% rename from shell/zshrc rename to home/shell/zshrc index 184b55d..fa7cc05 100644 --- a/shell/zshrc +++ b/home/shell/zshrc @@ -1,7 +1,7 @@ # Include our shared shell stuff -source ~/dotfiles/shell/env -source ~/dotfiles/shell/aliases -source ~/dotfiles/shell/functions +source ~/dotfiles/home/shell/env +source ~/dotfiles/home/shell/aliases +source ~/dotfiles/home/shell/functions # History Settings export HISTIGNORE="&:ls:[bf]g:exit:reset:clear:cd:cd ..:cd..:replay" diff --git a/home/stalonetrayrc b/home/stalonetrayrc deleted file mode 100644 index 06ca8a1..0000000 --- a/home/stalonetrayrc +++ /dev/null @@ -1,137 +0,0 @@ -# vim:filetype=config:tw=80:et -# -# This is sample ~/.stalonetrayrc, resembling default configuration. -# Remember: command line parameters take precedence. -# -# Directives introduced in 0.8 are marked with "NEW in 0.8" -# -#################################################################### -# -# stalonetray understands following directives -# -#################################################################### - -# background # color can be specified as an HTML hex triplet or - # as a name from rgb.txt, note that '#' must be quoted -background "#777777" - -# decorations # set trays window decorations; possible values for - # decspec are: all, title, border, none -decorations none - -# display # as usual - -# dockapp_mode # set dockapp mode, which can be either simple (for - # e.g. OpenBox, wmaker for WindowMaker, or none - # (default). NEW in 0.8. -dockapp_mode none - -# fuzzy_edges [] # enable fuzzy edges and set fuzziness level. level - # can be from 0 (disabled) to 3; this setting works - # with tinting and/or transparent and/or pixmap - # backgrounds -fuzzy_edges 0 - -# geometry # tray's geometry in standard X notation; width and - # height are specified in slot_size multiples -geometry 1x1+0+0 - -# grow_gravity # one of N, S, E, W, NW, NE, SW, SE; tray will grow - # in the direction opposite to one specified by - # grow_gravity; if horizontal or vertical - # direction is not specified, tray will not grow in - # that direction -grow_gravity NW - -# icon_gravity # icon placement gravity, one of NW, NE, SW, SE -icon_gravity NW - -# icon_size # specifies dimensions of typical icon slot -icon_size 24 - -# log_level # controls the amount of logging output, level can - # be err (default), info, or trace (enabled only - # when stalonetray configured with --enable-debug) - # NEW in 0.8. -log_level err - -# kludges kludge[,kludge] # enable specific kludges to work around - # non-conforming WMs and/or stalonetray bugs. - # NEW in 0.8. Argument is a - # comma-separated list of - # * fix_window_pos - fix tray window position on - # erroneous moves by WM - # * force_icons_size - ignore resize events on all - # icons; force their size to be equal to - # icon_size - # * use_icon_hints - use icon window hints to - # dtermine icon size - -# max_geometry # maximal tray dimensions; 0 in width/height means - # no limit -max_geometry 0x0 - -# no_shrink [] # disables shrink-back mode -no_shrink false - -# parent_bg [] # whether to use pseudo-transparency - # (looks better when reparented into smth like FvwmButtons) -parent_bg true - -# pixmap_bg # use pixmap from specified xpm file for (tiled) background -# pixmap_bg /home/user/.stalonetraybg.xpm - -# scrollbars # enable/disable scrollbars; mode is either - # vertical, horizontal, all or none (default) - # NEW in 0.8. -scrollbars none - -# scrollbars-size # scrollbars step in pixels; default is slot_size / 4 -# scrollbars-step 8 - -# scrollbars-step # scrollbars step in pixels; default is slot_size / 2 -# scrollbars-step 32 - -# slot_size # specifies size of icon slot, defaults to - # icon_size NEW in 0.8. - -# skip_taskbar [] # hide tray`s window from the taskbar -skip_taskbar true - -# sticky [] # make a tray`s window sticky across the - # desktops/pages -sticky true - -# tint_color # set tinting color -tint_color white - -# tint_level # set tinting level; level ranges from 0 (disabled) - # to 255 -tint_level 0 - -# transparent [] # whether to use root-transparency (background - # image must be set with Esetroot or compatible utility) -transparent false - -# vertical [] # whether to use vertical layout (horisontal layout - # is used by default) -vertical false - -# window_layer # set the EWMH-compatible window layer; one of: - # bottom, normal, top -window_layer normal - -# window_strut # enable/disable window struts for tray window (to - # avoid converting of tray window by maximized - # windows); mode defines to which screen border tray - # will be attached; it can be either top, bottom, - # left, right, none or auto (default) -window_strut auto - -# window_type # set the EWMH-compatible window type; one of: - # desktop, dock, normal, toolbar, utility -window_type normal - -# xsync [] # whether to operate on X server synchronously (SLOOOOW) -xsync false - diff --git a/install.sh b/install.sh index 840c4f8..6dd8145 100755 --- a/install.sh +++ b/install.sh @@ -41,7 +41,7 @@ read -p "Press enter to install my dotfiles " WAIT_FOR_INPUT read -p "[Dotfiles] Would you like to detect distro and auto-install dependencies? [Y/n]: " line if [[ "$line" == Y* ]] || [[ "$line" == y* ]] || [ -z "$line" ]; then - distrourl="https://raw.githubusercontent.com/alopexc0de/dotfiles/master/.bin" + distrourl="https://raw.githubusercontent.com/alopexc0de/dotfiles/master/internal_bin" if [ -f /etc/arch-release ]; then bash <(curl -sL $distrourl/install.arch) elif [ -f /etc/debian_version ]; then @@ -57,9 +57,9 @@ if ! which git >>/dev/null ; then fi # If the update script exists, try to do a normal update -if [ -x "$basedir/.bin/check_for_upgrade.sh" ]; then +if [ -x "$basedir/internal_bin/check_for_upgrade.sh" ]; then source "$basedir/shell/env" - env _DOTFILES=$basedir DISABLE_UPDATE_PROMPT='FALSE' zsh -f $basedir/.bin/check_for_upgrade.sh + env _DOTFILES=$basedir DISABLE_UPDATE_PROMPT='FALSE' zsh -f $basedir/internal_bin/check_for_upgrade.sh else echo "Cloning dotfiles to $basedir" rm -rf $basedir @@ -69,16 +69,18 @@ fi # Start installing config echo "Creating Symlinks..." -symlink $basedir/shell/zshrc $HOME/.zshrc -symlink $basedir/shell/bashrc $HOME/.bashrc -symlink $basedir/home/tmux.conf $HOME/.tmux.conf -symlink $basedir/home/vimrc $HOME/.vimrc -symlink $basedir/home/gitconfig $HOME/.gitconfig -symlink $basedir/home/Xresources $HOME/.Xresources -symlink $basedir/home/terminator $HOME/.config/terminator -symlink $basedir/home/stalonetrayrc $HOME/.stalonetrayrc -symlink $basedir/home/.config $HOME/.config +# Environment symlink $basedir/home/.local $HOME/.local +symlink $basedir/home/.config $HOME/.config + +symlink $basedir/home/Xresources $HOME/.Xresources +symlink $basedir/home/gitconfig $HOME/.gitconfig + +symlink $basedir/home/shell/tmux.conf $HOME/.tmux.conf +symlink $basedir/home/shell/bashrc $HOME/.bashrc +symlink $basedir/home/shell/zshrc $HOME/.zshrc +symlink $basedir/home/shell/vimrc $HOME/.vimrc + echo "Installing VIM Pathogen..." mkdir -p $HOME/.vim/autoload $HOME/.vim/bundle @@ -107,6 +109,7 @@ symlink $basedir/i3/wallpaper.sh $HOME/.i3/wallpaper.sh symlink $basedir/i3/screenshotter.sh $HOME/.i3/screenshotter.sh symlink $basedir/i3/compton.conf $HOME/.compton.conf symlink $basedir/i3/i3blocks $bindir/i3blocks +symlink $basedir/i3/stalonetrayrc $HOME/.stalonetrayrc echo "Installing shell-history" python3 -m pip install shellhistory diff --git a/.bin/check_for_upgrade.sh b/internal_bin/check_for_upgrade.sh similarity index 96% rename from .bin/check_for_upgrade.sh rename to internal_bin/check_for_upgrade.sh index de6d9fd..5868ade 100755 --- a/.bin/check_for_upgrade.sh +++ b/internal_bin/check_for_upgrade.sh @@ -16,7 +16,7 @@ function _update_dotfiles_update() { } function _upgrade_dotfiles() { - env _DOTFILES=$_DOTFILES sh $_DOTFILES/.bin/upgrade.sh + env _DOTFILES=$_DOTFILES sh $_DOTFILES/internal_bin/upgrade.sh # update the zsh file _update_dotfiles_update } diff --git a/.bin/install.arch b/internal_bin/install.arch similarity index 100% rename from .bin/install.arch rename to internal_bin/install.arch diff --git a/.bin/install.deb b/internal_bin/install.deb similarity index 100% rename from .bin/install.deb rename to internal_bin/install.deb diff --git a/.bin/upgrade.sh b/internal_bin/upgrade.sh similarity index 100% rename from .bin/upgrade.sh rename to internal_bin/upgrade.sh