From 2b55781ab850b4e8cdb1eb7d195a6ca28956834e Mon Sep 17 00:00:00 2001 From: Kevin Mok Date: Thu, 6 Dec 2018 21:37:16 -0500 Subject: [PATCH] Reverted back to FontAwesome workspace icons Like the cleaner look of uniform coloring. Also added pywal bg color to Benq blocks except for CPU usage, which has Perl problems.... --- aliases/zsh_aliases | 8 ++-- configs/i3/config | 55 +++++++++++++++----------- configs/i3blocks-scripts/cpu_usage | 5 +++ configs/i3blocks-scripts/memory | 2 + configs/i3blocks-scripts/name | 3 +- configs/i3blocks-scripts/time | 5 +-- configs/i3blocks/i3blocks.conf | 9 +++-- configs/sam-i3blocks/sam-i3blocks.conf | 6 +-- dotfiles/.Xresources | 4 +- dotfiles/.gitconfig | 4 +- dotfiles/.vimrc | 8 ++-- dotfiles/.zshrc | 15 ++++++- scripts/change-sink | 3 +- 13 files changed, 81 insertions(+), 46 deletions(-) diff --git a/aliases/zsh_aliases b/aliases/zsh_aliases index e59f533..59acb49 100644 --- a/aliases/zsh_aliases +++ b/aliases/zsh_aliases @@ -200,6 +200,7 @@ alias gstr="git config credential.helper store" # add {{{ # alias ga="git add -A . && gs" alias gac="git add -A . && git commit -S" +alias gacu="git add -A . && git commit" # }}} add # # diff/log {{{ # @@ -222,13 +223,14 @@ alias gheadm1="git reset --hard HEAD~1" alias gls="git ls-tree -r HEAD --name-only" # push {{{ # -alias vgc="ni commit-msg.txt" +alias vcm="ni commit-msg.txt" alias gst="git stash" alias gstp="git stash pop" alias gc="git commit -S" -alias gcam="ga && git commit --amend --no-edit" -alias gcamp="ga && git commit --amend --no-edit && gpsf" +alias gcu="git commit" +alias gcam="ga && git commit --amend --no-edit -S" +alias gcamp="ga && git commit --amend --no-edit -S && gpsf" # todo: fix function gcm(){ echo git commit -m \""$1"\" ; } diff --git a/configs/i3/config b/configs/i3/config index 13a6b55..af30824 100644 --- a/configs/i3/config +++ b/configs/i3/config @@ -34,12 +34,13 @@ bindsym Mod4+c exec $browser bindsym Mod4+f exec firefox bindsym Mod4+o exec okular bindsym Mod4+m exec okular $sch_dir/calc-textbook.pdf -bindsym Mod4+n exec nemo +bindsym Mod4+n exec urxvt -e nvim bindsym Mod4+p workspace $ws4; exec pgadmin3 # bindsym Mod4+p exec pycharm bindsym Mod4+q exec qdirstat bindsym Mod4+r exec urxvt -e ranger -bindsym control+$mod+s exec systemctl suspend +# bindsym control+$mod+s exec systemctl suspend +bindsym control+$mod+p exec systemctl suspend bindsym Mod4+t exec st bindsym Mod4+x exec $swex bindsym Print exec gscreenshot @@ -128,9 +129,10 @@ bindsym control+Shift+x kill # container display {{{ # # backgrounds -bindsym $mod+q exec wal -i "$HOME/Pictures/Backgrounds/vibrant" -bindsym $mod+w exec wal -i "$HOME/Pictures/Backgrounds/dim" -bindsym $mod+r exec wal -i "$HOME/Pictures/Backgrounds/" +# set $colors_sh "~/.cache/wal/colors.sh" +bindsym $mod+q exec wal -i "$HOME/Pictures/Backgrounds/vibrant"; exec ~/.cache/wal/colors.sh +bindsym $mod+w exec wal -i "$HOME/Pictures/Backgrounds/dim"; exec ~/.cache/wal/colors.sh +bindsym $mod+r exec wal -i "$HOME/Pictures/Backgrounds/"; exec ~/.cache/wal/colors.sh bindsym $mod+z exec feh --bg-fill ~/Pictures/Backgrounds/dim/black.jpg # enter fullscreen mode for the focused container @@ -198,8 +200,8 @@ set $ws4 "4 " workspace $ws4 output $samsung bindsym $mod+F4 workspace $ws4; exec $def_term -# set $ws5 "5 " -set $ws5 "5 🎥" +set $ws5 "5 " +# set $ws5 "5 🎥" workspace $ws5 output $samsung bindsym $mod+F5 workspace $ws5; exec $browser bindsym Mod4+g workspace $ws5; layout stacking; exec steam @@ -210,24 +212,24 @@ assign [class="Slack"] $ws6 bindsym Mod4+d workspace $ws6; exec discord bindsym Mod4+k workspace $ws6; exec slack -# set $ws7 "7 " -set $ws7 "7 📤" +set $ws7 "7 " +# set $ws7 "7 📤" workspace $ws7 output $samsung bindsym $mod+F7 workspace $ws7; exec $def_term -# set $ws8 "8 " -set $ws8 "8 📊" +set $ws8 "8 " +# set $ws8 "8 📊" # assign [class="jetbrains-"] $ws8 workspace $ws8 output $samsung bindsym $mod+F8 workspace $ws8; exec urxvt -e htop -s PERCENT_MEM -# set $ws9 "9 " -set $ws9 "9 🔧" +set $ws9 "9 " +# set $ws9 "9 🔧" workspace $ws9 output $samsung bindsym $mod+F9 workspace $ws9; exec $def_term -# set $ws10 "10 " -set $ws10 "10 🎵" +set $ws10 "10 " +# set $ws10 "10 🎵" assign [class="spotify"] $ws10 workspace $ws10 output $samsung set $hp 2 @@ -298,7 +300,9 @@ bindsym $mod+Shift+5 move container to workspace $ws15; workspace $ws15 bindsym $mod+Shift+s exec systemctl suspend # restart i3 inplace (preserves your layout/session, can be used to upgrade i3) -bindsym $mod+control+r restart +# bindsym $mod+control+r exec ~/.cache/wal/colors.sh; restart +bindsym $mod+control+r exec restart +# bindsym $mod+control+r exec $colors_sh && i3-msg restart # reload the configuration file bindsym $mod+Shift+c reload @@ -324,11 +328,11 @@ for_window [class="^.*"] border pixel 3 set $inner_gaps 35 set $outer_gaps 0 -gaps inner $inner_gaps -gaps outer $outer_gaps -gaps bottom 0 -# gaps inner 0 -# gaps outer 0 +# gaps inner $inner_gaps +# gaps outer $outer_gaps +# gaps bottom 0 +gaps inner 0 +gaps outer 0 # other gaps {{{ # @@ -391,7 +395,8 @@ set $bar_trans 00 set $benq_ws_trans aa bar { i3bar_command i3bar -t - font pango:$sb_font 21 + # font pango:$sb_font 21 + font pango:$sb_font 14 colors { # 0 (transparent) -> 255 (opaque) in hex background $black$bar_trans @@ -415,7 +420,8 @@ bar { bar { output $samsung - font pango:$sb_font 25 + # font pango:$sb_font 25 + font pango:$sb_font 15 # output $benq i3bar_command i3bar -t colors { @@ -454,7 +460,8 @@ set $mod Mod1 # Font for window titles. Will also be used by the bar unless a different font # is used in the bar {} block below. -font pango:Hack 11 +# font pango:Hack 11 +font pango:$sb_font 8 # 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 diff --git a/configs/i3blocks-scripts/cpu_usage b/configs/i3blocks-scripts/cpu_usage index 6809953..194b9f3 100755 --- a/configs/i3blocks-scripts/cpu_usage +++ b/configs/i3blocks-scripts/cpu_usage @@ -10,6 +10,7 @@ use strict; use warnings; use utf8; use Getopt::Long; +# use Env::Modify qw(:ksh source); # default values my $t_warn = 50; @@ -44,6 +45,10 @@ $cpu_usage eq -1 and die 'Can\'t find CPU information'; printf "%.0f%%\n", $cpu_usage; printf "%.0f%%\n", $cpu_usage; +system("source \"/home/kevin/.cache/wal/colors.sh\""); +# printf "%s", $ENV{'SHELL'}; +printf "%s", $ENV{'color2'}; +# printf "%s", $ENV{'bg'}; # Print color, if needed if ($cpu_usage >= $t_crit) { print "#FF0000\n"; diff --git a/configs/i3blocks-scripts/memory b/configs/i3blocks-scripts/memory index b9d7310..1d92d7c 100755 --- a/configs/i3blocks-scripts/memory +++ b/configs/i3blocks-scripts/memory @@ -15,6 +15,7 @@ # along with this program. If not, see . TYPE="${BLOCK_INSTANCE:-mem}" +. "/home/kevin/.cache/wal/colors.sh" awk -v type=$TYPE ' /^MemTotal:/ { @@ -47,3 +48,4 @@ END { # TODO: color (if less than X%) } ' /proc/meminfo +printf "\n%s\n" "$color7" diff --git a/configs/i3blocks-scripts/name b/configs/i3blocks-scripts/name index 176a414..022fa0c 100755 --- a/configs/i3blocks-scripts/name +++ b/configs/i3blocks-scripts/name @@ -2,6 +2,7 @@ . "/home/kevin/.cache/wal/colors.sh" -echo "Kevin" +# echo "Kevin" +printf "Kevin\n\n%s\n" "$color7" # echo "Kevin" # echo "Kevin" diff --git a/configs/i3blocks-scripts/time b/configs/i3blocks-scripts/time index 089e568..bd5b1f9 100755 --- a/configs/i3blocks-scripts/time +++ b/configs/i3blocks-scripts/time @@ -1,7 +1,6 @@ #!/bin/bash . "/home/kevin/.cache/wal/colors.sh" -printf "$(date '+%H:%M.%a-%m-%d')\n\n%s" "$color2" +printf "$(date '+%H:%M.%a-%m-%d')\n\n%s\n" "$color7" +# echo "$(date '+%H:%M.%a-%m-%d')%s" "$color2" # printf "%s" "$color2" -# printf "" - diff --git a/configs/i3blocks/i3blocks.conf b/configs/i3blocks/i3blocks.conf index 62bdb74..b6214cc 100644 --- a/configs/i3blocks/i3blocks.conf +++ b/configs/i3blocks/i3blocks.conf @@ -14,7 +14,8 @@ color=#cbe4ff # color="$(echo $foreground)" [time] -label=🕓 +label= +# label=🕓 # command=date '+%H:%M.%a-%m-%d' interval=30 # color=#acc0cd @@ -42,11 +43,13 @@ label= interval=5 [name] -label=🎅 +# label=🎅 +label= # color=#ba50a9 # color=#1e5b99 # color="$foreground" -interval=6000 +# interval=6000 +interval=30 # unused blocks {{{ # # Volume indicator diff --git a/configs/sam-i3blocks/sam-i3blocks.conf b/configs/sam-i3blocks/sam-i3blocks.conf index cdf13c2..0925afc 100644 --- a/configs/sam-i3blocks/sam-i3blocks.conf +++ b/configs/sam-i3blocks/sam-i3blocks.conf @@ -10,8 +10,8 @@ color=#cbe4ff [spotify] command=python ~/linux-config/configs/i3blocks-scripts/spotify.py -# label= -label=🎧 +label= +# label=🎧 # green # color=#198c19 # aqua @@ -19,7 +19,7 @@ label=🎧 interval=10 [time] -label=🕓 +# label=🕓 command=echo "$(date '+%H:%M')" interval=30 # color=#acc0cd diff --git a/dotfiles/.Xresources b/dotfiles/.Xresources index 381b757..0a46ef3 100644 --- a/dotfiles/.Xresources +++ b/dotfiles/.Xresources @@ -1,4 +1,6 @@ -URxvt.font: xft:DejaVuSansMono Nerd Font Mono:size=14 +! URxvt.font: xft:DejaVuSansMono Nerd Font Mono:size=14 +URxvt.font: xft:DejaVuSansMono Nerd Font Mono:size=9 + ! URxvt.font: xft:Hack Nerd Font:size=14 ! URxvt.font: xft:Hack NF:size=18 ! URxvt.font: xft:Hack:size=18 diff --git a/dotfiles/.gitconfig b/dotfiles/.gitconfig index 78f5e50..2541162 100644 --- a/dotfiles/.gitconfig +++ b/dotfiles/.gitconfig @@ -15,5 +15,5 @@ prompt = false [diff] tool = vimdiff -[commit] - gpgsign = true +; [commit] + ; gpgsign = true diff --git a/dotfiles/.vimrc b/dotfiles/.vimrc index 7680262..2c8377c 100644 --- a/dotfiles/.vimrc +++ b/dotfiles/.vimrc @@ -151,6 +151,9 @@ Plug 'jiangmiao/auto-pairs' Plug 'henrik/vim-indexed-search' Plug 'PotatoesMaster/i3-vim-syntax' +" vim file explorer +Plug 'scrooloose/nerdtree', { 'on': 'NERDTreeToggle' } +Plug 'terryma/vim-multiple-cursors' call plug#end() @@ -165,9 +168,8 @@ colorscheme wal " map :wa map :wqa map :qa! -map :make -C ~/Documents/resume cv -map :AutoSaveToggle -" map :LLPStartPreview +" map :make -C ~/Documents/resume cv +" map :AutoSaveToggle map :VimtexCompile:VimtexView " map :VimtexCompile nnoremap :set paste"+p:set nopaste diff --git a/dotfiles/.zshrc b/dotfiles/.zshrc index 25a6b61..f83a504 100644 --- a/dotfiles/.zshrc +++ b/dotfiles/.zshrc @@ -81,8 +81,9 @@ source ~/linux-config/aliases/zsh_aliases # export MANPATH="/usr/local/man:$MANPATH" # You may need to manually set your language environment -export LANG=en_US.UTF-8 -export LC_MESSAGES="C" +# export LANG="en_US.UTF-8" +# export LC_MESSAGES="en_US.UTF-8" +# export LC_ALL="en_US.UTF-8" # Preferred editor for local and remote sessions # if [[ -n $SSH_CONNECTION ]]; then @@ -163,3 +164,13 @@ source /home/kevin/.shortcuts add-zsh-hook -Uz chpwd (){ ls -a; } export GPG_TTY=$(tty) + +# perl {{{ # + +PATH="/home/kevin/perl5/bin${PATH:+:${PATH}}"; export PATH; +PERL5LIB="/home/kevin/perl5/lib/perl5${PERL5LIB:+:${PERL5LIB}}"; export PERL5LIB; +PERL_LOCAL_LIB_ROOT="/home/kevin/perl5${PERL_LOCAL_LIB_ROOT:+:${PERL_LOCAL_LIB_ROOT}}"; export PERL_LOCAL_LIB_ROOT; +PERL_MB_OPT="--install_base \"/home/kevin/perl5\""; export PERL_MB_OPT; +PERL_MM_OPT="INSTALL_BASE=/home/kevin/perl5"; export PERL_MM_OPT; + +# }}} perl # diff --git a/scripts/change-sink b/scripts/change-sink index 06b5f77..b6a23cc 100755 --- a/scripts/change-sink +++ b/scripts/change-sink @@ -2,7 +2,8 @@ #Device name variable if [ "$1" = "dac" ]; then - devicename="alsa_output.usb-1852_DigiHug_USB_Audio-01.analog-stereo" + # devicename="alsa_output.usb-1852_DigiHug_USB_Audio-01.analog-stereo" + devicename="alsa_output.usb-FiiO_DigiHug_USB_Audio-01.analog-stereo" elif [ "$1" = "line-out" ]; then devicename="alsa_output.pci-0000_00_14.2.analog-stereo" fi