From cafc9f3ff1c27c17785d16028da9ee32319a3e58 Mon Sep 17 00:00:00 2001 From: David Aizenberg Date: Tue, 10 Nov 2020 01:46:56 +0400 Subject: [PATCH] update --- .zshrc => .archive/.zshrc | 2 + wmfsrc => .archive/wmfsrc | 0 .bashrc | 7 +- .vimrc | 11 +- fish/fish_variables | 32 ----- fish/fishd.jeff | 31 ---- fish/functions/fish_prompt.fish | 26 ---- {desktop/i3 => i3}/config | 10 +- i3blocks.conf | 8 +- {desktop/i3status => i3status}/config | 0 laptop/i3/config | 196 -------------------------- laptop/i3status/config | 69 --------- scripts/corona.sh | 6 + scripts/disk.sh | 49 +++++++ scripts/docker.sh | 12 ++ scripts/memory.sh | 70 +++++++++ setup.sh | 17 +-- 17 files changed, 163 insertions(+), 383 deletions(-) rename .zshrc => .archive/.zshrc (98%) rename wmfsrc => .archive/wmfsrc (100%) delete mode 100644 fish/fish_variables delete mode 100644 fish/fishd.jeff delete mode 100644 fish/functions/fish_prompt.fish rename {desktop/i3 => i3}/config (93%) rename {desktop/i3status => i3status}/config (100%) delete mode 100644 laptop/i3/config delete mode 100644 laptop/i3status/config create mode 100755 scripts/corona.sh create mode 100755 scripts/disk.sh create mode 100755 scripts/docker.sh create mode 100755 scripts/memory.sh diff --git a/.zshrc b/.archive/.zshrc similarity index 98% rename from .zshrc rename to .archive/.zshrc index 98a1ac8..ab7eb32 100644 --- a/.zshrc +++ b/.archive/.zshrc @@ -124,3 +124,5 @@ function tf() { export PATH="$PATH:$HOME/.rvm/bin" alias moc='mocp --theme=transparent-background' + +source /home/david/.config/broot/launcher/bash/br diff --git a/wmfsrc b/.archive/wmfsrc similarity index 100% rename from wmfsrc rename to .archive/wmfsrc diff --git a/.bashrc b/.bashrc index d1de51e..4c35d72 100644 --- a/.bashrc +++ b/.bashrc @@ -9,7 +9,6 @@ #Exports EDITOR=vim - #Thanks to http://bashrcgenerator.com/ export PS1="\[\e[00;32m\]\u\[\e[0m\]\[\e[00;37m\]@\h:\[\e[0m\]\[\e[00;36m\][\[\e[0m\]\[\e[00;32m\]\w\[\e[0m\]\[\e[00;36m\]]\[\e[0m\]\[\e[00;37m\]\\$ \[\e[0m\]" @@ -97,7 +96,7 @@ export NVM_DIR="$HOME/.nvm" # Yavide alias alias yavide="gvim --servername yavide -f -N -u /opt/yavide/.vimrc" -alias t="clear; python ~/t/t.py --task-dir ~/Dropbox --list tasks" +alias t="clear; python ~/t/t.py --task-dir ~/b2_sync/t --list tasks" alias tw="t | grep 'verify'" function ta() { @@ -124,3 +123,7 @@ export PATH="$PATH:$HOME/.rvm/bin" eval "$(starship init bash)" [[ -s "/etc/profile.d/grc.bashrc" ]] && source /etc/profile.d/grc.bashrc + +source /home/david/.config/broot/launcher/bash/br + +alias repl="NODE_PATH=$(npm root -g) node" diff --git a/.vimrc b/.vimrc index 5c7a03a..7257744 100644 --- a/.vimrc +++ b/.vimrc @@ -13,20 +13,16 @@ set nocompatible | filetype indent plugin on | syn on set runtimepath^=~/.vim/bundle/ctrlp.vim let g:ctrlp_user_command = ['.git', 'cd %s && git ls-files -co --exclude-standard'] + set rtp+=~/.vim/bundle/Vundle.vim call vundle#begin() " let Vundle manage Vundle, required Plugin 'VundleVim/Vundle.vim' Plugin 'preservim/nerdtree' -Plugin 'pangloss/vim-javascript' Plugin 'nathanaelkane/vim-indent-guides' -Plugin 'jelera/vim-javascript-syntax' Plugin 'Xuyuanp/nerdtree-git-plugin' Plugin 'ryanoasis/vim-devicons' Plugin 'Raimondi/delimitMate' -Plugin 'scrooloose/syntastic' -Plugin 'marijnh/tern_for_vim' -Plugin 'Valloric/YouCompleteMe' Plugin 'digitaltoad/vim-pug' Plugin 'ekalinin/Dockerfile.vim' Plugin 'godlygeek/tabular' @@ -155,6 +151,9 @@ autocmd FileType php setlocal expandtab shiftwidth=4 tabstop=4 softtabstop=4 " X?HTML & XML autocmd FileType html,xhtml,xml setlocal expandtab shiftwidth=2 tabstop=2 softtabstop=2 +" JS +autocmd FileType javascript setlocal equalprg=js-beautify\ --stdin + " CSS autocmd FileType css setlocal expandtab shiftwidth=4 tabstop=4 softtabstop=4 @@ -168,8 +167,6 @@ autocmd FileType javascript setlocal expandtab shiftwidth=4 tabstop=4 softtabsto let python_highlight_all = 1 let javascript_enable_domhtmlcss=1 -let g:javascript_plugin_jsdoc = 1 -let g:javascript_plugin_ngdoc = 1 filetype plugin indent on diff --git a/fish/fish_variables b/fish/fish_variables deleted file mode 100644 index 7f4b2b2..0000000 --- a/fish/fish_variables +++ /dev/null @@ -1,32 +0,0 @@ -# This file contains fish universal variable definitions. -# VERSION: 3.0 -SETUVAR __fish_init_2_39_8:\x1d -SETUVAR __fish_init_2_3_0:\x1d -SETUVAR fish_color_autosuggestion:9C9C9C -SETUVAR fish_color_cancel:\x2dr -SETUVAR fish_color_command:F4F4F4 -SETUVAR fish_color_comment:B0B0B0 -SETUVAR fish_color_cwd:green -SETUVAR fish_color_cwd_root:red -SETUVAR fish_color_end:969696 -SETUVAR fish_color_error:FFA779 -SETUVAR fish_color_escape:00a6b2 -SETUVAR fish_color_history_current:\x2d\x2dbold -SETUVAR fish_color_host:normal -SETUVAR fish_color_match:\x2d\x2dbackground\x3dbrblue -SETUVAR fish_color_normal:normal -SETUVAR fish_color_operator:00a6b2 -SETUVAR fish_color_param:A0A0F0 -SETUVAR fish_color_quote:666A80 -SETUVAR fish_color_redirection:FAFAFA -SETUVAR fish_color_search_match:bryellow\x1e\x2d\x2dbackground\x3dbrblack -SETUVAR fish_color_selection:white\x1e\x2d\x2dbold\x1e\x2d\x2dbackground\x3dbrblack -SETUVAR fish_color_status:red -SETUVAR fish_color_user:brgreen -SETUVAR fish_color_valid_path:\x2d\x2dunderline -SETUVAR fish_greeting:Welcome\x20to\x20fish\x2c\x20the\x20friendly\x20interactive\x20shell -SETUVAR fish_key_bindings:fish_default_key_bindings -SETUVAR fish_pager_color_completion:normal -SETUVAR fish_pager_color_description:B3A06D\x1eyellow -SETUVAR fish_pager_color_prefix:white\x1e\x2d\x2dbold\x1e\x2d\x2dunderline -SETUVAR fish_pager_color_progress:brwhite\x1e\x2d\x2dbackground\x3dcyan diff --git a/fish/fishd.jeff b/fish/fishd.jeff deleted file mode 100644 index 93eb0b8..0000000 --- a/fish/fishd.jeff +++ /dev/null @@ -1,31 +0,0 @@ -# This file is automatically generated by the fish. -# Do NOT edit it directly, your changes will be overwritten. -SET __fish_init_2_39_8:\x1d -SET __fish_init_2_3_0:\x1d -SET fish_color_autosuggestion:555\x1ebrblack -SET fish_color_cancel:\x2dr -SET fish_color_command:\x2d\x2dbold -SET fish_color_comment:red -SET fish_color_cwd:green -SET fish_color_cwd_root:red -SET fish_color_end:brmagenta -SET fish_color_error:brred -SET fish_color_escape:bryellow\x1e\x2d\x2dbold -SET fish_color_history_current:\x2d\x2dbold -SET fish_color_host:normal -SET fish_color_match:\x2d\x2dbackground\x3dbrblue -SET fish_color_normal:normal -SET fish_color_operator:bryellow -SET fish_color_param:cyan -SET fish_color_quote:yellow -SET fish_color_redirection:brblue -SET fish_color_search_match:bryellow\x1e\x2d\x2dbackground\x3dbrblack -SET fish_color_selection:white\x1e\x2d\x2dbold\x1e\x2d\x2dbackground\x3dbrblack -SET fish_color_user:brgreen -SET fish_color_valid_path:\x2d\x2dunderline -SET fish_greeting:Welcome\x20to\x20fish\x2c\x20the\x20friendly\x20interactive\x20shell -SET fish_key_bindings:fish_default_key_bindings -SET fish_pager_color_completion:\x1d -SET fish_pager_color_description:B3A06D\x1eyellow -SET fish_pager_color_prefix:white\x1e\x2d\x2dbold\x1e\x2d\x2dunderline -SET fish_pager_color_progress:brwhite\x1e\x2d\x2dbackground\x3dcyan diff --git a/fish/functions/fish_prompt.fish b/fish/functions/fish_prompt.fish deleted file mode 100644 index aa0f47f..0000000 --- a/fish/functions/fish_prompt.fish +++ /dev/null @@ -1,26 +0,0 @@ -function fish_prompt - if not set -q VIRTUAL_ENV_DISABLE_PROMPT - set -g VIRTUAL_ENV_DISABLE_PROMPT true - end - set_color yellow - printf '%s' (whoami) - set_color normal - printf ' at ' - - set_color magenta - echo -n (prompt_hostname) - set_color normal - printf ' in ' - - set_color $fish_color_cwd - printf '%s' (prompt_pwd) - set_color normal - - # Line 2 - echo - if test $VIRTUAL_ENV - printf "(%s) " (set_color blue)(basename $VIRTUAL_ENV)(set_color normal) - end - printf '↪ ' - set_color normal -end diff --git a/desktop/i3/config b/i3/config similarity index 93% rename from desktop/i3/config rename to i3/config index d2736ac..d093dc0 100644 --- a/desktop/i3/config +++ b/i3/config @@ -20,6 +20,7 @@ font pango:monospace 8 exec feh --bg-fill /home/david/Pictures/wall.jpg exec setxkbmap -layout gb,ru -variant ,winkeys -option grp:caps_toggle,grp_led:scroll,terminate:ctrl_alt_bksp,compose:ralt exec dunst +exec pasystray # This font is widely installed, provides lots of unicode glyphs, right-to-left @@ -41,6 +42,10 @@ bindsym XF86AudioRaiseVolume exec pactl set-sink-volume 0 +5% #increase sound vo bindsym XF86AudioLowerVolume exec pactl set-sink-volume 0 -5% #decrease sound volume bindsym XF86AudioMute exec pactl set-sink-mute 0 toggle # mute sound +bindsym $super+bracketright exec pactl set-sink-volume 0 +5% #increase sound volume +bindsym $super+bracketleft exec pactl set-sink-volume 0 -5% #decrease sound volume +bindsym $super+p exec pactl set-sink-mute 0 toggle # mute sound + bindsym XF86MonBrightnessUp exec xbacklight -inc 10 # increase screen brightness bindsym XF86MonBrightnessDown exec xbacklight -dec 10 # decrease screen brightness @@ -53,6 +58,7 @@ bindsym $mod+Shift+q kill # start dmenu (a program launcher) #bindsym $mod+d exec dmenu_run bindsym $mod+d exec rofi -show run -modi run -theme Arc-Dark +bindsym $mod+Shift+d exec rofi -show drun -modi run -show-icons -theme Arc-Dark bindsym F3 exec rofi -modi ssh -show ssh -theme Arc-Dark bindsym F2 exec rofi -modi window -show window -theme Arc-Dark @@ -99,7 +105,7 @@ bindsym $mod+f fullscreen toggle for_window [title="^scratchpad$"] border 1pixel, floating enable, move scratchpad bindsym F1 [instance="scratchpad"] scratchpad show; sticky enable -exec urxvt -name scratchpad -geometry 120x80 +exec urxvt -name scratchpad -geometry 200x50 # change container layout (stacked, tabbed, toggle split) bindsym $mod+s layout stacking @@ -146,7 +152,7 @@ bindsym $mod+Shift+0 move container to workspace 10 bindsym $mod+Shift+c move container to workspace tg bindsym $mod+Shift+x move container to workspace media -bindsym --release Print exec scrot -s '/tmp/%F_%T_$wx$h.png' -e 'xclip -selection clipboard -target image/png -i $f' +bindsym --release Print exec scrot --freeze -s '/tmp/%F_%T_$wx$h.png' -e 'xclip -selection clipboard -target image/png -i $f' # mocp #bindsym $mod+Shift+j exec "/usr/bin/mocp -G" diff --git a/i3blocks.conf b/i3blocks.conf index 9771d7c..4fd9851 100644 --- a/i3blocks.conf +++ b/i3blocks.conf @@ -1,16 +1,16 @@ [docker] -command= sh ~/Scripts/docker.sh +command= sh ~/dotfiles/scripts/docker.sh color=#0db7ed interval=10 [memory] -command= sh ~/Scripts/memory.sh +command= sh ~/dotfiles/scripts/memory.sh label=MEM interval=30 [disk] -command= sh ~/Scripts/disk.sh +command= sh ~/dotfiles/scripts/disk.sh label=HOME: interval=30 @@ -21,7 +21,7 @@ interval=3600 color=#A4C2F4 [covid] -command= sh ~/Scripts/corona.sh +command= sh ~/dotfiles/scripts/corona.sh color=#ffffff interval=240 diff --git a/desktop/i3status/config b/i3status/config similarity index 100% rename from desktop/i3status/config rename to i3status/config diff --git a/laptop/i3/config b/laptop/i3/config deleted file mode 100644 index a9595da..0000000 --- a/laptop/i3/config +++ /dev/null @@ -1,196 +0,0 @@ -# This file has been auto-generated by i3-config-wizard(1). -# It will not be overwritten, so edit it as you like. -# -# Should you change your keyboard layout some time, delete -# this file and re-run i3-config-wizard(1). -# - -# i3 config file (v4) -# -# Please see https://i3wm.org/docs/userguide.html for a complete reference! - -set $mod Mod1 -set $super Mod4 - -# Font for window titles. Will also be used by the bar unless a different font -# is used in the bar {} block below. -font pango:monospace 10 - -#exec feh --bg-fill /home/david/Pictures/Wallpapers/ellie_full.jpg -exec feh --bg-fill /home/david/Pictures/wall.png -exec setxkbmap -layout gb,ru -variant ,winkeys -option grp:caps_toggle,grp_led:scroll,terminate:ctrl_alt_bksp,compose:ralt - -bindsym --release Print exec scrot -s '/tmp/%F_%T_$wx$h.png' -e 'xclip -selection clipboard -target image/png -i $f' - - -# This font is widely installed, provides lots of unicode glyphs, right-to-left -# text rendering and scalability on retina/hidpi displays (thanks to pango). -#font pango:DejaVu Sans Mono 8 - -# Before i3 v4.8, we used to recommend this one as the default: -# font -misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1 -# The font above is very space-efficient, that is, it looks good, sharp and -# clear in small sizes. However, its unicode glyph coverage is limited, the old -# X core fonts rendering does not support right-to-left and this being a bitmap -# font, it doesn’t scale on retina/hidpi displays. - -# Use Mouse+$mod to drag floating windows to their wanted position -floating_modifier $mod - -# Pulse Audio controls -bindsym XF86AudioRaiseVolume exec pactl set-sink-volume 0 +5% #increase sound volume -bindsym XF86AudioLowerVolume exec pactl set-sink-volume 0 -5% #decrease sound volume -bindsym XF86AudioMute exec pactl set-sink-mute 0 toggle # mute sound - -bindsym XF86MonBrightnessUp exec xbacklight -inc 10 # increase screen brightness -bindsym XF86MonBrightnessDown exec xbacklight -dec 10 # decrease screen brightness - -# start a terminal -bindsym $mod+Return exec i3-sensible-terminal - -# kill focused window -bindsym $mod+Shift+q kill - -# start dmenu (a program launcher) -bindsym $mod+d exec dmenu_run -# There also is the (new) i3-dmenu-desktop which only displays applications -# shipping a .desktop file. It is a wrapper around dmenu, so you need that -# installed. -# bindsym $mod+d exec --no-startup-id i3-dmenu-desktop - -# change focus -bindsym $mod+Shif+j focus left -bindsym $mod+Shift+k focus down -bindsym $mod+l focus up -bindsym $mod+semicolon focus right - -# alternatively, you can use the cursor keys: -#bindsym $mod+Left focus left -#bindsym $mod+Down focus down -#bindsym $mod+Up focus up -#bindsym $mod+Right focus right - -# move focused window -#bindsym $mod+Shift+j move left -#bindsym $mod+Shift+k move down -#bindsym $mod+Shift+l move up -#bindsym $mod+Shift+semicolon move right - -# alternatively, you can use the cursor keys: -bindsym $mod+Shift+Left move left -bindsym $mod+Shift+Down move down -bindsym $mod+Shift+Up move up -bindsym $mod+Shift+Right move right - -# split in horizontal orientation -bindsym $mod+h split h - -# split in vertical orientation -bindsym $mod+v split v - -# enter fullscreen mode for the focused container -bindsym $mod+f fullscreen toggle - -# change container layout (stacked, tabbed, toggle split) -bindsym $mod+s layout stacking -bindsym $mod+w layout tabbed -bindsym $mod+e layout toggle split - -# toggle tiling / floating -bindsym $mod+Shift+space floating toggle - -# change focus between tiling / floating windows -bindsym $mod+space focus mode_toggle - -# focus the parent container -bindsym $mod+a focus parent - -# focus the child container -#bindsym $mod+d focus child - -# switch to workspace -bindsym $mod+1 workspace firefox -bindsym $mod+2 workspace local -bindsym $mod+3 workspace remote -bindsym $mod+4 workspace ide -bindsym $mod+5 workspace debug -bindsym $mod+6 workspace fs -bindsym $mod+7 workspace archive -bindsym $mod+8 workspace junk -bindsym $mod+9 workspace track -bindsym $mod+0 workspace 10 -bindsym $mod+c workspace tg -bindsym $mod+x workspace media - -# move focused container to workspace -bindsym $mod+Shift+1 move container to workspace firefox -bindsym $mod+Shift+2 move container to workspace local -bindsym $mod+Shift+3 move container to workspace remote -bindsym $mod+Shift+4 move container to workspace ide -bindsym $mod+Shift+5 move container to workspace debug -bindsym $mod+Shift+6 move container to workspace fs -bindsym $mod+Shift+7 move container to workspace archive -bindsym $mod+Shift+8 move container to workspace junk -bindsym $mod+Shift+9 move container to workspace track -bindsym $mod+Shift+0 move container to workspace 10 -bindsym $mod+Shift+c move container to workspace tg -bindsym $mod+Shift+x move container to workspace media - -# mocp -#bindsym $mod+Shift+j exec "/usr/bin/mocp -G" -bindsym $mod+p exec "/usr/bin/mocp -G" -bindsym $mod+k exec "/usr/bin/mocp -f" -bindsym $mod+j exec "/usr/bin/mocp -r" - -bindsym $super+l exec i3lock -i /home/david/Pictures/wall.png -# reload the configuration file -bindsym $mod+Shift+t reload -# restart i3 inplace (preserves your layout/session, can be used to upgrade i3) -bindsym $mod+Shift+r restart -# exit i3 (logs you out of your X session) -bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -b 'Yes, exit i3' 'i3-msg exit'" - -# resize window (you can also use the mouse for that) -mode "resize" { - # These bindings trigger as soon as you enter the resize mode - - # Pressing left will shrink the window’s width. - # Pressing right will grow the window’s width. - # Pressing up will shrink the window’s height. - # Pressing down will grow the window’s height. - bindsym j resize shrink width 10 px or 10 ppt - bindsym k resize grow height 10 px or 10 ppt - bindsym l resize shrink height 10 px or 10 ppt - bindsym semicolon resize grow width 10 px or 10 ppt - - # same bindings, but for the arrow keys - bindsym Left resize shrink width 10 px or 10 ppt - bindsym Down resize grow height 10 px or 10 ppt - bindsym Up resize shrink height 10 px or 10 ppt - bindsym Right resize grow width 10 px or 10 ppt - - # back to normal: Enter or Escape - bindsym Return mode "default" - bindsym Escape mode "default" -} - -bindsym $mod+r mode "resize" - -# Start i3bar to display a workspace bar (plus the system information i3status -bar { - status_command i3blocks -c /home/david/.config/i3blocks.conf + +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +DIR="${DIR:-$BLOCK_INSTANCE}" +DIR="${DIR:-$HOME}" +ALERT_LOW="${ALERT_LOW:-$1}" +ALERT_LOW="${ALERT_LOW:-10}" # color will turn red under this value (default: 10%) + +LOCAL_FLAG="-l" +if [ "$1" = "-n" ] || [ "$2" = "-n" ]; then + LOCAL_FLAG="" +fi + +df -h -P $LOCAL_FLAG "$DIR" | awk -v label="$LABEL" -v alert_low=$ALERT_LOW ' +/\/.*/ { + # full text + print label $4 + + # short text + print label $4 + + use=$5 + + # no need to continue parsing + exit 0 +} + +END { + gsub(/%$/,"",use) + if (100 - use < alert_low) { + # color + print "#FF0000" + } +} +' + diff --git a/scripts/docker.sh b/scripts/docker.sh new file mode 100755 index 0000000..9e1bace --- /dev/null +++ b/scripts/docker.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +# Number of docker containers running +count=$(docker ps -q | wc -l | sed -r 's/^0$//g') + +if [ "$count" = '' ]; then + count=0 +fi + +echo "🐳: $count" + + diff --git a/scripts/memory.sh b/scripts/memory.sh new file mode 100755 index 0000000..cf8b60b --- /dev/null +++ b/scripts/memory.sh @@ -0,0 +1,70 @@ +#!/bin/sh +# Copyright (C) 2014 Julien Bonjean + +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +TYPE="${BLOCK_INSTANCE:-mem}" + +awk -v type=$TYPE ' +/^MemTotal:/ { + mem_total=$2 +} +/^MemFree:/ { + mem_free=$2 +} +/^Buffers:/ { + mem_free+=$2 +} +/^Cached:/ { + mem_free+=$2 +} +/^SwapTotal:/ { + swap_total=$2 +} +/^SwapFree:/ { + swap_free=$2 +} +END { + if (type == "swap") { + free=swap_free/1024/1024 + used=(swap_total-swap_free)/1024/1024 + total=swap_total/1024/1024 + } else { + free=mem_free/1024/1024 + used=(mem_total-mem_free)/1024/1024 + total=mem_total/1024/1024 + } + + pct=0 + if (total > 0) { + pct=used/total*100 + } + + # full text + printf("%.1fG/%.1fG (%.f%%)\n", used, total, pct) + + # short text + printf("%.f%%\n", pct) + + # color + if (pct > 90) { + print("#FF0000") + } else if (pct > 80) { + print("#FFAE00") + } else if (pct > 70) { + print("#FFF600") + } +} +' /proc/meminfo + diff --git a/setup.sh b/setup.sh index b1fbcd5..5ac0977 100755 --- a/setup.sh +++ b/setup.sh @@ -17,24 +17,13 @@ then echo -e "${GREEN} Wiping old backups ${RESET}" rm -rf ~/.config/i3status~ rm -rf ~/.config/i3~ - rm -rf ~/.vim~ + rm -rf ~/.vim~ rm -f ~/.vimrc~ rm -f ~/.bashrc~ rm -f ~/.zshrc~ echo -e "${GREEN} Deleted old backups ${RESET}" fi -read -n 1 -p "Is this desktop or laptop? (d/l/q) " ans; - -case $ans in - d|D) - PLATFORM='desktop';; - l|L) - PLATFORM='laptop';; - *) - exit;; -esac - echo -e "${GREEN} Backing Up and moving configs ${RESET}" mv ~/.config/i3status ~/.config/i3status~ @@ -62,8 +51,8 @@ mkdir tmp/ # obsolette for now # ln -rsf wmfsrc ~/.config/wmfs/wmfsrc -ln -rsf ${PLATFORM}/i3/config ~/.config/i3/config -ln -rsf ${PLATFORM}/i3status/config ~/.config/i3status/config +ln -rsf i3/config ~/.config/i3/config +ln -rsf i3status/config ~/.config/i3status/config ln -rsf .zshrc ~/.zshrc ln -rsf .bashrc ~/.bashrc