Browse Source

i3: Monitor-specific workspaces, app shortcuts

- Vim: replace in command history
red-hat-laptop
Kevin Mok 7 years ago
parent
commit
611f7b5cb1
  1. 4
      aliases/.bash_aliases
  2. 25
      aliases/.pc_aliases
  3. 13
      aliases/.school_aliases
  4. 70
      configs/NZXT/i3.conf
  5. 33
      configs/NZXT/i3blocks.conf
  6. 1
      configs/X1-Carbon/i3blocks.conf
  7. 6
      dotfiles/vimrc

4
aliases/.bash_aliases

@ -16,7 +16,6 @@ alias s="systemctl suspend"
alias sd="sudo shutdown 0" alias sd="sudo shutdown 0"
alias reb="sudo shutdown -r 0" alias reb="sudo shutdown -r 0"
alias hst="history" alias hst="history"
alias topo="top -o %MEM"
alias rmsw="rm .sw*" alias rmsw="rm .sw*"
alias nf="neofetch" alias nf="neofetch"
alias vlm="alsamixer -c 1" alias vlm="alsamixer -c 1"
@ -43,13 +42,12 @@ alias r=". ~/.bashrc"
alias vs="vi $alias_folder/.school_aliases" alias vs="vi $alias_folder/.school_aliases"
alias vag="vi $alias_folder/.git_aliases" alias vag="vi $alias_folder/.git_aliases"
alias vap="vi $alias_folder/.pc_aliases" alias vap="vi $alias_folder/.pc_aliases"
alias v3="vi ~/.config/i3/config"
alias v3b="vi ~/.config/i3blocks/i3blocks.conf"
# }}} Config # # }}} Config #
# redshift # redshift
rs(){ redshift -O $(($1 * 1000)) ; } rs(){ redshift -O $(($1 * 1000)) ; }
alias rx="redshift -x" alias rx="redshift -x"
pand() { pandoc -o ${1%.*}.html $1 && google-chrome ${1%.*}.html ; }
# UltiSnips {{{ # # UltiSnips {{{ #
usnp_dir="~/.vim/plugged/vim-snippets/UltiSnips" usnp_dir="~/.vim/plugged/vim-snippets/UltiSnips"

25
aliases/.pc_aliases

@ -5,6 +5,12 @@ if [ "$(whoami)" == "kevin" ]; then
alias mt="ok ~/Documents/School/calc-textbook.pdf" alias mt="ok ~/Documents/School/calc-textbook.pdf"
alias clc="gcalccmd" alias clc="gcalccmd"
alias 6t="ok ~/Documents/School/236-textbook.pdf" alias 6t="ok ~/Documents/School/236-textbook.pdf"
alias doc="d ~/Documents"
alias v3="vi ~/.config/i3/config"
alias v3b="vi ~/.config/i3blocks/i3blocks.conf"
alias i3b="d /usr/share/i3blocks"
alias ans="d /usr/local/android-studio/bin && ./studio.sh"
cld() { colordiff -y --suppress-common-lines $1 $2 ; } cld() { colordiff -y --suppress-common-lines $1 $2 ; }
fi fi
@ -35,18 +41,29 @@ if [ "$(hostname)" == "NZXT" ]; then
xrandr --output "$output" --rotate "$dir" xrandr --output "$output" --rotate "$dir"
} }
alias ow7="virtualbox startvm W7"
# alias ow7="VBoxManage startvm W7 --type headless"
alias alsi="pactl list short sink-inputs"
alias als="pactl list short sinks"
amsih() { pactl move-sink-input $1 0 ; }
amsis() { pactl move-sink-input $1 1 ; }
alias w7="VBoxManage startvm W7 --type headless"
chr() { google-chrome $1 ; } chr() { google-chrome $1 ; }
alias nem="nemo ." alias nem="nemo ."
alias spt="speedtest" alias spt="speedtest"
alias pg="ping -c 5 google.ca" alias pg="ping -c 5 google.ca"
cd_coding_dir="d ~/Documents/coding"
alias cdn="$cd_coding_dir"
alias res="vi ~/Documents/resume/README.md" alias res="vi ~/Documents/resume/README.md"
alias sfa="d ~/Documents/self-authoring" alias sfa="d ~/Documents/self-authoring"
alias rcg="d ~/Documents/coding/random-color-generator"
alias dcr="d ~/Documents/coding/dcr-logger"
alias rcg="$cd_coding_dir/random-color-generator"
alias dcr="$cd_coding_dir/dcr-logger"
alias pf="$cd_coding_dir/ParsaFood"
alias tpb="$cd_coding_dir/trapbot"
alias ptb="python trapbot.py"
alias ptbo="python trapbot.py > output.py && vi output.py"
alias tbof="python trapbot-local.py"
# xset r rate 200 75 # xset r rate 200 75
# xmodmap -e "clear Lock" # xmodmap -e "clear Lock"

13
aliases/.school_aliases

@ -31,7 +31,7 @@ cptp() {
# 136 {{{ # 136 {{{
alias 136="$cd_school/136" alias 136="$cd_school/136"
alias 136l="$cd_school/136/lecture" alias 136l="$cd_school/136/lecture"
alias pr2="$cd_school/136/par/2"
alias pr3="$cd_school/136/par/3"
# }}} # }}}
# 209 {{{ # 209 {{{
@ -41,7 +41,7 @@ alias ll="ls -l"
cd_209="d ~/Documents/School/209"; cd_209="d ~/Documents/School/209";
alias 209="$cd_209" alias 209="$cd_209"
alias 9r="$cd_209/mokkar" alias 9r="$cd_209/mokkar"
alias l5="$cd_209/mokkar/lab5"
alias l6="$cd_209/mokkar/lab6"
alias 9a="$cd_209/mokkar/a2" alias 9a="$cd_209/mokkar/a2"
# alias cdf="ssh -t mokkar@cdf.utoronto.ca '. ./.bashrc; bash -l'" # alias cdf="ssh -t mokkar@cdf.utoronto.ca '. ./.bashrc; bash -l'"
alias cdf="echo \". ./.bashrc\"&& ssh mokkar@cdf.utoronto.ca" alias cdf="echo \". ./.bashrc\"&& ssh mokkar@cdf.utoronto.ca"
@ -62,10 +62,10 @@ c9a() {
} }
# compile and run # compile and run
c9r() { gc9 $1 && ./"${1%.*}.out" ; }
c9r() { c9 $1 && ./"${1%.*}.out" ; }
# compile and run with input # compile and run with input
c9i() { gc9 $1 && ./"${1%.*}.out" < $2 ; }
c9i() { c9 $1 && ./"${1%.*}.out" < $2 ; }
# compile and run with input file # compile and run with input file
run() { run() {
@ -75,11 +75,6 @@ run() {
done < $1.in done < $1.in
} }
# temp # temp
alias mkt="make test_print && ./test_print.out"
alias mka="make all && ./print_ptree.out -d 0 31589"
alias ppt="./print_ptree.out 31589"
alias pptd="./print_ptree.out -d 2 31589"
# alias db="gdb ./print_ptree.out < gdb.txt"
deb() { deb() {
gdb ./print_ptree.out < "$1" gdb ./print_ptree.out < "$1"
} }

70
configs/NZXT/i3.conf

@ -3,13 +3,23 @@
exec redshift -O 4000 exec redshift -O 4000
exec_always feh --bg-scale ~/Pictures/Backgrounds/samurai-astronaut.jpg exec_always feh --bg-scale ~/Pictures/Backgrounds/samurai-astronaut.jpg
exec imwheel exec imwheel
exec terminator
exec google-chrome
exec --no-startup-id i3-msg 'workspace 1 ; exec terminator'
exec --no-startup-id i3-msg 'workspace 3 ; exec google-chrome'
# exec terminator
# exec google-chrome
# }}} startup # # }}} startup #
set $sch_dir "$HOME/Documents/School"
bindsym Mod4+a exec studio
bindsym $mod+control+Return exec i3-sensible-terminal bindsym $mod+control+Return exec i3-sensible-terminal
bindsym Mod4+c exec google-chrome bindsym Mod4+c exec google-chrome
bindsym Mod4+d exec discord bindsym Mod4+d exec discord
bindsym Mod4+e exec nemo
bindsym Mod4+o exec okular
bindsym Mod4+m exec okular $sch_dir/calc-textbook.pdf
bindsym Mod4+p exec pycharm
bindsym Mod4+s exec spotify
# redshift {{{ # # redshift {{{ #
bindsym $mod+Mod4+1 exec redshift -O 1500 bindsym $mod+Mod4+1 exec redshift -O 1500
@ -94,17 +104,31 @@ bindsym $mod+a focus parent
# workspace {{{ # # workspace {{{ #
# ws names {{{ # # ws names {{{ #
set $samsung "DVI-I-1"
set $benq "HDMI-0"
set $ws1 "1 " set $ws1 "1 "
workspace $ws1 output $samsung
set $ws2 "2 " set $ws2 "2 "
workspace $ws2 output $benq
set $ws3 "3 " set $ws3 "3 "
workspace $ws3 output $benq
set $ws4 "4 " set $ws4 "4 "
set $ws5 "5 " set $ws5 "5 "
workspace $ws5 output $benq
set $ws6 "6 " set $ws6 "6 "
workspace $ws6 output $samsung
assign [class="discord"] $ws6
assign [class="Slack"] $ws6
set $ws7 "7 " set $ws7 "7 "
set $ws8 "8 "
workspace $ws7 output $samsung
set $ws8 "8 "
assign [class="jetbrains-"] $ws8
set $ws9 "9 " set $ws9 "9 "
set $ws10 "10 "
assign [class="discord"] $ws6
set $ws10 "10 "
assign [class="VirtualBox"] $ws10
set $ws11 "11 "
workspace $ws11 output $benq
# }}} ws names # # }}} ws names #
# ws bindings {{{ # # ws bindings {{{ #
@ -122,24 +146,26 @@ bindsym $mod+7 workspace $ws7
bindsym $mod+8 workspace $ws8 bindsym $mod+8 workspace $ws8
bindsym $mod+9 workspace $ws9 bindsym $mod+9 workspace $ws9
bindsym $mod+0 workspace $ws10 bindsym $mod+0 workspace $ws10
bindsym $mod+Shift+1 workspace $ws11
# }}} ws bindings # # }}} ws bindings #
# move container to ws {{{ # # move container to ws {{{ #
# move focused container to workspace # move focused container to workspace
bindsym $mod+control+1 move container to workspace $ws1
bindsym $mod+control+2 move container to workspace $ws2
bindsym $mod+control+3 move container to workspace $ws3
bindsym $mod+control+4 move container to workspace $ws4
# bindsym $mod+control+1 move container to workspace $ws1; workspace $ws1
# bindsym $mod+control+2 move container to workspace $ws2; workspace $ws2
# bindsym $mod+control+3 move container to workspace $ws3; workspace $ws3
# bindsym $mod+control+4 move container to workspace $ws4; workspace $ws4
bindsym $mod+control+5 move container to workspace $ws5
bindsym $mod+control+6 move container to workspace $ws6
bindsym $mod+control+7 move container to workspace $ws7
bindsym $mod+control+8 move container to workspace $ws8
bindsym $mod+control+9 move container to workspace $ws9
bindsym $mod+control+0 move container to workspace $ws10
# bindsym $mod+control+1 move container to workspace $ws1
# bindsym $mod+control+2 move container to workspace $ws2
# bindsym $mod+control+3 move container to workspace $ws3
# bindsym $mod+control+4 move container to workspace $ws4
bindsym $mod+control+1 move container to workspace $ws1; workspace $ws1
bindsym $mod+control+2 move container to workspace $ws2; workspace $ws2
bindsym $mod+control+3 move container to workspace $ws3; workspace $ws3
bindsym $mod+control+4 move container to workspace $ws4; workspace $ws4
bindsym $mod+control+5 move container to workspace $ws5; workspace $ws5
bindsym $mod+control+6 move container to workspace $ws6; workspace $ws6
bindsym $mod+control+7 move container to workspace $ws7; workspace $ws7
bindsym $mod+control+8 move container to workspace $ws8; workspace $ws8
bindsym $mod+control+9 move container to workspace $ws9; workspace $ws9
bindsym $mod+control+0 move container to workspace $ws10; workspace $ws10
bindsym $mod+control+Shift+1 move container to workspace $ws11
# }}} move container to ws # # }}} move container to ws #
# gaps {{{ # # gaps {{{ #
@ -171,14 +197,14 @@ bindsym $mod+control+l resize grow width 10 px or 10 ppt
set $sb_font Hack Bold set $sb_font Hack Bold
bar { bar {
font pango:$sb_font 17 font pango:$sb_font 17
tray_output HDMI_0
tray_output $benq
status_command i3blocks -c ~/.config/i3blocks/i3blocks.conf status_command i3blocks -c ~/.config/i3blocks/i3blocks.conf
output HDMI-0 output HDMI-0
} }
bar { bar {
output DVI-I-1
tray_output HDMI_0
output $samsung
tray_output $benq
font pango:$sb_font 22 font pango:$sb_font 22
} }
# }}} status bar # # }}} status bar #

33
configs/NZXT/i3blocks.conf

@ -28,33 +28,40 @@
align=center align=center
command=/usr/share/i3blocks/$BLOCK_NAME command=/usr/share/i3blocks/$BLOCK_NAME
separator=true separator=true
separator_block_width=20
interval=5
separator_block_width=25
markup=pango markup=pango
# }}} Global properties # # }}} Global properties #
[time] [time]
command=date '+%H:%M.%a-%m-%d' command=date '+%H:%M.%a-%m-%d'
interval=30 interval=30
color=#cccccc
# unbold this?
[load_average] [load_average]
label= label=
interval=5
color=#990000 color=#990000
# font=Hack 14
[name]
color=#D1EEEE
[memory]
label=
color=#006600
# unused blocks {{{ #
# [memory]
# label=
# color=#006600
[cpu_usage -w 50 -c 80]
label=
min_width=CPU: 100.00%
color=#adeaea
[wifi]
label=🖧
instance=wlp4s0
interval=10
# [cpu_usage -w 50 -c 80]
# label=
# min_width=CPU: 100.00%
# color=#adeaea
[name]
color=#cc5490
interval=6000
# unused blocks {{{ #
# Volume indicator # Volume indicator
# #
# The first parameter sets the step (and units to display) # The first parameter sets the step (and units to display)

1
configs/X1-Carbon/i3blocks.conf

@ -41,7 +41,6 @@ color=#999999
label=🗠 label=🗠
interval=5 interval=5
color=#990000 color=#990000
# font=Hack 14
[battery] [battery]
label=⚡ label=⚡

6
dotfiles/vimrc

@ -101,10 +101,10 @@ nnoremap <leader>nw :set nowrap<CR>
nnoremap <leader>pli :PlugInstall<CR> nnoremap <leader>pli :PlugInstall<CR>
nnoremap <leader>plc :PlugClean<CR> nnoremap <leader>plc :PlugClean<CR>
nnoremap <leader>plu :PlugUpdate<CR> nnoremap <leader>plu :PlugUpdate<CR>
nnoremap <leader>r :.,.+s///g<left><left><left><left><left>
nnoremap <leader>rl :.s///g<left><left><left>
nnoremap <leader>r q:i.,.+s///g<ESC>Fsi
nnoremap <leader>rl q:i.s///g<left><left><left>
nnoremap <leader>rv :source $MYVIMRC<CR> nnoremap <leader>rv :source $MYVIMRC<CR>
nnoremap <leader>R :%s///g<left><left><left>
nnoremap <leader>R q:i%s///g<ESC>2F/i
nnoremap <leader>s :set syn=sh<CR> nnoremap <leader>s :set syn=sh<CR>
nnoremap <leader>w Vgq nnoremap <leader>w Vgq
nnoremap <leader>z za nnoremap <leader>z za

Loading…
Cancel
Save