Browse Source

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....
red-hat-laptop
Kevin Mok 5 years ago
parent
commit
2b55781ab8
Signed by: Kevin-Mok GPG Key ID: AEA75288DC135CF5
  1. 8
      aliases/zsh_aliases
  2. 55
      configs/i3/config
  3. 5
      configs/i3blocks-scripts/cpu_usage
  4. 2
      configs/i3blocks-scripts/memory
  5. 3
      configs/i3blocks-scripts/name
  6. 5
      configs/i3blocks-scripts/time
  7. 9
      configs/i3blocks/i3blocks.conf
  8. 6
      configs/sam-i3blocks/sam-i3blocks.conf
  9. 4
      dotfiles/.Xresources
  10. 4
      dotfiles/.gitconfig
  11. 8
      dotfiles/.vimrc
  12. 15
      dotfiles/.zshrc
  13. 3
      scripts/change-sink

8
aliases/zsh_aliases

@ -200,6 +200,7 @@ alias gstr="git config credential.helper store"
# add {{{ # # add {{{ #
alias ga="git add -A . && gs" alias ga="git add -A . && gs"
alias gac="git add -A . && git commit -S" alias gac="git add -A . && git commit -S"
alias gacu="git add -A . && git commit"
# }}} add # # }}} add #
# diff/log {{{ # # diff/log {{{ #
@ -222,13 +223,14 @@ alias gheadm1="git reset --hard HEAD~1"
alias gls="git ls-tree -r HEAD --name-only" alias gls="git ls-tree -r HEAD --name-only"
# push {{{ # # push {{{ #
alias vgc="ni commit-msg.txt"
alias vcm="ni commit-msg.txt"
alias gst="git stash" alias gst="git stash"
alias gstp="git stash pop" alias gstp="git stash pop"
alias gc="git commit -S" 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 # todo: fix
function gcm(){ echo git commit -m \""$1"\" ; } function gcm(){ echo git commit -m \""$1"\" ; }

55
configs/i3/config

@ -34,12 +34,13 @@ bindsym Mod4+c exec $browser
bindsym Mod4+f exec firefox bindsym Mod4+f exec firefox
bindsym Mod4+o exec okular bindsym Mod4+o exec okular
bindsym Mod4+m exec okular $sch_dir/calc-textbook.pdf 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 workspace $ws4; exec pgadmin3
# bindsym Mod4+p exec pycharm # bindsym Mod4+p exec pycharm
bindsym Mod4+q exec qdirstat bindsym Mod4+q exec qdirstat
bindsym Mod4+r exec urxvt -e ranger 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+t exec st
bindsym Mod4+x exec $swex bindsym Mod4+x exec $swex
bindsym Print exec gscreenshot bindsym Print exec gscreenshot
@ -128,9 +129,10 @@ bindsym control+Shift+x kill
# container display {{{ # # container display {{{ #
# backgrounds # 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 bindsym $mod+z exec feh --bg-fill ~/Pictures/Backgrounds/dim/black.jpg
# enter fullscreen mode for the focused container # enter fullscreen mode for the focused container
@ -198,8 +200,8 @@ set $ws4 "4 "
workspace $ws4 output $samsung workspace $ws4 output $samsung
bindsym $mod+F4 workspace $ws4; exec $def_term bindsym $mod+F4 workspace $ws4; exec $def_term
# set $ws5 "5 "
set $ws5 "5 🎥"
set $ws5 "5 "
# set $ws5 "5 🎥"
workspace $ws5 output $samsung workspace $ws5 output $samsung
bindsym $mod+F5 workspace $ws5; exec $browser bindsym $mod+F5 workspace $ws5; exec $browser
bindsym Mod4+g workspace $ws5; layout stacking; exec steam 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+d workspace $ws6; exec discord
bindsym Mod4+k workspace $ws6; exec slack bindsym Mod4+k workspace $ws6; exec slack
# set $ws7 "7 "
set $ws7 "7 📤"
set $ws7 "7 "
# set $ws7 "7 📤"
workspace $ws7 output $samsung workspace $ws7 output $samsung
bindsym $mod+F7 workspace $ws7; exec $def_term bindsym $mod+F7 workspace $ws7; exec $def_term
# set $ws8 "8 "
set $ws8 "8 📊"
set $ws8 "8 "
# set $ws8 "8 📊"
# assign [class="jetbrains-"] $ws8 # assign [class="jetbrains-"] $ws8
workspace $ws8 output $samsung workspace $ws8 output $samsung
bindsym $mod+F8 workspace $ws8; exec urxvt -e htop -s PERCENT_MEM 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 workspace $ws9 output $samsung
bindsym $mod+F9 workspace $ws9; exec $def_term bindsym $mod+F9 workspace $ws9; exec $def_term
# set $ws10 "10 "
set $ws10 "10 🎵"
set $ws10 "10 "
# set $ws10 "10 🎵"
assign [class="spotify"] $ws10 assign [class="spotify"] $ws10
workspace $ws10 output $samsung workspace $ws10 output $samsung
set $hp 2 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 bindsym $mod+Shift+s exec systemctl suspend
# restart i3 inplace (preserves your layout/session, can be used to upgrade i3) # 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 # reload the configuration file
bindsym $mod+Shift+c reload bindsym $mod+Shift+c reload
@ -324,11 +328,11 @@ for_window [class="^.*"] border pixel 3
set $inner_gaps 35 set $inner_gaps 35
set $outer_gaps 0 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 {{{ # # other gaps {{{ #
@ -391,7 +395,8 @@ set $bar_trans 00
set $benq_ws_trans aa set $benq_ws_trans aa
bar { bar {
i3bar_command i3bar -t i3bar_command i3bar -t
font pango:$sb_font 21
# font pango:$sb_font 21
font pango:$sb_font 14
colors { colors {
# 0 (transparent) -> 255 (opaque) in hex # 0 (transparent) -> 255 (opaque) in hex
background $black$bar_trans background $black$bar_trans
@ -415,7 +420,8 @@ bar {
bar { bar {
output $samsung output $samsung
font pango:$sb_font 25
# font pango:$sb_font 25
font pango:$sb_font 15
# output $benq # output $benq
i3bar_command i3bar -t i3bar_command i3bar -t
colors { colors {
@ -454,7 +460,8 @@ set $mod Mod1
# Font for window titles. Will also be used by the bar unless a different font # Font for window titles. Will also be used by the bar unless a different font
# is used in the bar {} block below. # 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 # This font is widely installed, provides lots of unicode glyphs, right-to-left
# text rendering and scalability on retina/hidpi displays (thanks to pango). # text rendering and scalability on retina/hidpi displays (thanks to pango).
#font pango:DejaVu Sans Mono 8 #font pango:DejaVu Sans Mono 8

5
configs/i3blocks-scripts/cpu_usage

@ -10,6 +10,7 @@ use strict;
use warnings; use warnings;
use utf8; use utf8;
use Getopt::Long; use Getopt::Long;
# use Env::Modify qw(:ksh source);
# default values # default values
my $t_warn = 50; 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;
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 # Print color, if needed
if ($cpu_usage >= $t_crit) { if ($cpu_usage >= $t_crit) {
print "#FF0000\n"; print "#FF0000\n";

2
configs/i3blocks-scripts/memory

@ -15,6 +15,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
TYPE="${BLOCK_INSTANCE:-mem}" TYPE="${BLOCK_INSTANCE:-mem}"
. "/home/kevin/.cache/wal/colors.sh"
awk -v type=$TYPE ' awk -v type=$TYPE '
/^MemTotal:/ { /^MemTotal:/ {
@ -47,3 +48,4 @@ END {
# TODO: color (if less than X%) # TODO: color (if less than X%)
} }
' /proc/meminfo ' /proc/meminfo
printf "\n%s\n" "$color7"

3
configs/i3blocks-scripts/name

@ -2,6 +2,7 @@
. "/home/kevin/.cache/wal/colors.sh" . "/home/kevin/.cache/wal/colors.sh"
echo "Kevin"
# echo "Kevin"
printf "Kevin\n\n%s\n" "$color7"
# echo "<span foreground=\"$foreground\">Kevin</span>" # echo "<span foreground=\"$foreground\">Kevin</span>"
# echo "<span foreground=\"$color2\">Kevin</span>" # echo "<span foreground=\"$color2\">Kevin</span>"

5
configs/i3blocks-scripts/time

@ -1,7 +1,6 @@
#!/bin/bash #!/bin/bash
. "/home/kevin/.cache/wal/colors.sh" . "/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 "<span foreground=\"%s\">$(date '+%H:%M.%a-%m-%d')%s</span>" "$color2"
# printf "%s" "$color2" # printf "%s" "$color2"
# printf ""

9
configs/i3blocks/i3blocks.conf

@ -14,7 +14,8 @@ color=#cbe4ff
# color="$(echo $foreground)" # color="$(echo $foreground)"
[time] [time]
label=🕓
label=
# label=🕓
# command=date '+%H:%M.%a-%m-%d' # command=date '+%H:%M.%a-%m-%d'
interval=30 interval=30
# color=#acc0cd # color=#acc0cd
@ -42,11 +43,13 @@ label=
interval=5 interval=5
[name] [name]
label=🎅
# label=🎅
label=
# color=#ba50a9 # color=#ba50a9
# color=#1e5b99 # color=#1e5b99
# color="$foreground" # color="$foreground"
interval=6000
# interval=6000
interval=30
# unused blocks {{{ # # unused blocks {{{ #
# Volume indicator # Volume indicator

6
configs/sam-i3blocks/sam-i3blocks.conf

@ -10,8 +10,8 @@ color=#cbe4ff
[spotify] [spotify]
command=python ~/linux-config/configs/i3blocks-scripts/spotify.py command=python ~/linux-config/configs/i3blocks-scripts/spotify.py
# label=
label=🎧
label=
# label=🎧
# green # green
# color=#198c19 # color=#198c19
# aqua # aqua
@ -19,7 +19,7 @@ label=🎧
interval=10 interval=10
[time] [time]
label=🕓
# label=🕓
command=echo "$(date '+%H:%M')" command=echo "$(date '+%H:%M')"
interval=30 interval=30
# color=#acc0cd # color=#acc0cd

4
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 Nerd Font:size=14
! URxvt.font: xft:Hack NF:size=18 ! URxvt.font: xft:Hack NF:size=18
! URxvt.font: xft:Hack:size=18 ! URxvt.font: xft:Hack:size=18

4
dotfiles/.gitconfig

@ -15,5 +15,5 @@
prompt = false prompt = false
[diff] [diff]
tool = vimdiff tool = vimdiff
[commit]
gpgsign = true
; [commit]
; gpgsign = true

8
dotfiles/.vimrc

@ -151,6 +151,9 @@ Plug 'jiangmiao/auto-pairs'
Plug 'henrik/vim-indexed-search' Plug 'henrik/vim-indexed-search'
Plug 'PotatoesMaster/i3-vim-syntax' Plug 'PotatoesMaster/i3-vim-syntax'
" vim file explorer
Plug 'scrooloose/nerdtree', { 'on': 'NERDTreeToggle' }
Plug 'terryma/vim-multiple-cursors'
call plug#end() call plug#end()
@ -165,9 +168,8 @@ colorscheme wal
" map <F3> :wa<CR> " map <F3> :wa<CR>
map <F4> :wqa<CR> map <F4> :wqa<CR>
map <F5> :qa!<CR> map <F5> :qa!<CR>
map <F6> :make -C ~/Documents/resume cv<CR>
map <F7> :AutoSaveToggle<CR>
" map <F9> :LLPStartPreview<CR>
" map <F6> :make -C ~/Documents/resume cv<CR>
" map <F7> :AutoSaveToggle<CR>
map <F9> :VimtexCompile<CR>:VimtexView<CR> map <F9> :VimtexCompile<CR>:VimtexView<CR>
" map <F9> :VimtexCompile<CR> " map <F9> :VimtexCompile<CR>
nnoremap <F10> :set paste<CR>"+p:set nopaste<CR> nnoremap <F10> :set paste<CR>"+p:set nopaste<CR>

15
dotfiles/.zshrc

@ -81,8 +81,9 @@ source ~/linux-config/aliases/zsh_aliases
# export MANPATH="/usr/local/man:$MANPATH" # export MANPATH="/usr/local/man:$MANPATH"
# You may need to manually set your language environment # 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 # Preferred editor for local and remote sessions
# if [[ -n $SSH_CONNECTION ]]; then # if [[ -n $SSH_CONNECTION ]]; then
@ -163,3 +164,13 @@ source /home/kevin/.shortcuts
add-zsh-hook -Uz chpwd (){ ls -a; } add-zsh-hook -Uz chpwd (){ ls -a; }
export GPG_TTY=$(tty) 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 #

3
scripts/change-sink

@ -2,7 +2,8 @@
#Device name variable #Device name variable
if [ "$1" = "dac" ]; then 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 elif [ "$1" = "line-out" ]; then
devicename="alsa_output.pci-0000_00_14.2.analog-stereo" devicename="alsa_output.pci-0000_00_14.2.analog-stereo"
fi fi

Loading…
Cancel
Save