Browse Source

i3 shortcuts: media, open apps in certain ws

red-hat-laptop
Kevin Mok 7 years ago
parent
commit
bca6d27965
  1. 2
      aliases/.bash_aliases
  2. 10
      aliases/.pc_aliases
  3. 10
      aliases/.school_aliases
  4. 47
      configs/NZXT/i3.conf

2
aliases/.bash_aliases

@ -32,7 +32,9 @@ alias cfg="d ~/.config"
ok() { okular $1 ; } ok() { okular $1 ; }
rfnd() { find . -name "$1" ; } rfnd() { find . -name "$1" ; }
# rfnde() { find . -name "*.$1" ; }
rgrp() { grep -r $1 * ; } rgrp() { grep -r $1 * ; }
grpy() { grep $1 *.py ; }
p3() { python3 $1 ; } p3() { python3 $1 ; }
py() { python $1 ; } py() { python $1 ; }

10
aliases/.pc_aliases

@ -20,8 +20,9 @@ if [ "$(whoami)" == "kevin" ]; then
alias ans="d /usr/local/android-studio/bin && ./studio.sh" alias ans="d /usr/local/android-studio/bin && ./studio.sh"
alias cdn="$cd_coding_dir" alias cdn="$cd_coding_dir"
alias tb="$cd_coding_dir/trapbot" alias tb="$cd_coding_dir/trapbot"
alias vtb="$cd_coding_dir/trapbot && vi trapbot.py"
alias ptb="python trapbot.py"
alias vtb="$cd_coding_dir/trapbot && vi scan_reddit.py"
alias ptb="python scan_reddit.py"
alias rtb="$cd_coding_dir/trapbot && python scan_reddit.py"
# }}} coding projs # # }}} coding projs #
bl() { xbacklight -set $1 ; } bl() { xbacklight -set $1 ; }
@ -72,7 +73,10 @@ if [ "$(hostname)" == "NZXT" ]; then
# }}} apps # # }}} apps #
# various coding projs {{{ # # various coding projs {{{ #
alias res="vi ~/Documents/resume/README.md"
alias cv="d ~/Documents/resume/examples"
alias cvf="d ~/Documents/resume/examples/cv"
alias vcv="vi ~/Documents/resume/examples/cv.tex"
alias okcv="ok ~/Documents/resume/examples/cv.pdf"
alias sfa="d ~/Documents/self-authoring" alias sfa="d ~/Documents/self-authoring"
alias rcg="$cd_coding_dir/random-color-generator" alias rcg="$cd_coding_dir/random-color-generator"
alias dcr="$cd_coding_dir/dcr-logger" alias dcr="$cd_coding_dir/dcr-logger"

10
aliases/.school_aliases

@ -41,8 +41,9 @@ 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 l6="$cd_209/mokkar/lab6"
alias 9a="$cd_209/mokkar/a2"
alias l7="$cd_209/mokkar/lab7"
alias m7="make childcreates && ./childcreates 3"
alias 9a="$cd_209/mokkar/a3"
# 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"
mkex() { chmod 777 $1 ; } mkex() { chmod 777 $1 ; }
@ -75,10 +76,9 @@ run() {
done < $1.in done < $1.in
} }
# temp # temp
deb() {
gdb ./print_ptree.out < "$1"
}
alias m3="make pfact && ./pfact 10"
# }}} # }}}
# }}} # }}}
alias 36a="$cd_school/236/a1" alias 36a="$cd_school/236/a1"
alias 36t="$cd_school && ok ../236-textbook.pdf"

47
configs/NZXT/i3.conf

@ -4,23 +4,22 @@ exec redshift -O 4000
exec_always feh --bg-center ~/Pictures/Backgrounds/samurai-astronaut.jpg exec_always feh --bg-center ~/Pictures/Backgrounds/samurai-astronaut.jpg
exec imwheel exec imwheel
exec --no-startup-id i3-msg 'workspace 1 ; exec terminator' exec --no-startup-id i3-msg 'workspace 1 ; exec terminator'
exec --no-startup-id i3-msg 'workspace 2 ; exec terminator'
exec --no-startup-id i3-msg 'workspace 3 ; exec google-chrome' exec --no-startup-id i3-msg 'workspace 3 ; exec google-chrome'
# exec terminator
# exec google-chrome
# }}} startup # # }}} startup #
set $sch_dir "$HOME/Documents/School" set $sch_dir "$HOME/Documents/School"
# app shortcuts {{{ #
bindsym Mod4+a exec studio 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+e exec nemo bindsym Mod4+e exec nemo
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+p exec pycharm bindsym Mod4+p exec pycharm
bindsym Mod4+s exec spotify
bindsym Print exec ksnapshot bindsym Print exec ksnapshot
# }}} app shortcuts #
# redshift {{{ # # redshift {{{ #
bindsym $mod+Mod4+1 exec redshift -O 1500 bindsym $mod+Mod4+1 exec redshift -O 1500
@ -110,27 +109,45 @@ set $benq "HDMI-0"
set $ws1 "1 " set $ws1 "1 "
workspace $ws1 output $samsung workspace $ws1 output $samsung
bindsym $mod+F1 workspace $ws1; exec terminator
set $ws2 "2 " set $ws2 "2 "
workspace $ws2 output $benq workspace $ws2 output $benq
bindsym $mod+F2 workspace $ws2; exec terminator
set $ws3 "3 " set $ws3 "3 "
workspace $ws3 output $benq workspace $ws3 output $benq
set $ws4 "4 " set $ws4 "4 "
workspace $ws4 output $samsung
assign [class="Okular"] $ws4
set $ws5 "5 " set $ws5 "5 "
workspace $ws5 output $benq workspace $ws5 output $benq
bindsym $mod+F5 workspace $ws5; exec google-chrome
set $ws6 "6 " set $ws6 "6 "
workspace $ws6 output $samsung workspace $ws6 output $samsung
assign [class="discord"] $ws6
bindsym Mod4+d workspace $ws6; exec discord
assign [class="Slack"] $ws6 assign [class="Slack"] $ws6
set $ws7 "7 " set $ws7 "7 "
workspace $ws7 output $samsung workspace $ws7 output $samsung
set $ws8 "8 " set $ws8 "8 "
assign [class="jetbrains-"] $ws8 assign [class="jetbrains-"] $ws8
set $ws9 "9 " set $ws9 "9 "
workspace $ws9 output $samsung
bindsym $mod+F9 workspace $ws9; exec terminator
set $ws10 "10 " set $ws10 "10 "
assign [class="VirtualBox"] $ws10 assign [class="VirtualBox"] $ws10
assign [class="Spotify"] $ws10
bindsym Mod4+s workspace $ws10; exec spotify
set $ws11 "11 " set $ws11 "11 "
workspace $ws11 output $benq workspace $ws11 output $benq
bindsym $mod+F11 workspace $ws11; exec terminator
# }}} ws names # # }}} ws names #
# ws bindings {{{ # # ws bindings {{{ #
@ -187,10 +204,10 @@ bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'You pressed the exit shortcu
# }}} reload config # # }}} reload config #
# resizing windows {{{ # # resizing windows {{{ #
bindsym $mod+control+h resize shrink width 10 px or 10 ppt
bindsym $mod+control+h resize grow width 10 px or 10 ppt
bindsym $mod+control+k resize grow height 10 px or 10 ppt bindsym $mod+control+k resize grow height 10 px or 10 ppt
bindsym $mod+control+j resize shrink height 10 px or 10 ppt bindsym $mod+control+j resize shrink height 10 px or 10 ppt
bindsym $mod+control+l resize grow width 10 px or 10 ppt
bindsym $mod+control+l resize shrink width 10 px or 10 ppt
# }}} resizing windows # # }}} resizing windows #
# status bar {{{ # # status bar {{{ #
@ -230,13 +247,13 @@ font pango:Hack 11
# }}} mod key/font # # }}} mod key/font #
# media keys {{{ # # media keys {{{ #
bindsym XF86AudioRaiseVolume exec --no-startup-id amixer -c 1 sset Master 5%+
bindsym XF86AudioLowerVolume exec --no-startup-id amixer -c 1 sset Master 5%-
bindsym XF86AudioMute exec --no-startup-id amixer -c 1 amixer -D pulse set Master 1+ toggle
bindsym XF86AudioRaiseVolume exec --no-startup-id amixer -c 1 sset Master 5+
bindsym XF86AudioLowerVolume exec --no-startup-id amixer -c 1 sset Master 5-
bindsym XF86AudioMute exec --no-startup-id amixer -D pulse set Master 1+ toggle
# Media player controls # Media player controls
bindsym XF86AudioPlay exec playerctl play
bindsym XF86AudioPause exec playerctl pause
bindsym XF86AudioNext exec playerctl next
bindsym XF86AudioPrev exec playerctl previous
bindsym XF86AudioPlay exec "dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.PlayPause"
bindsym XF86AudioStop exec "dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Stop"
bindsym XF86AudioPrev exec "dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Previous"
bindsym XF86AudioNext exec "dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Next"
# }}} media keys # # }}} media keys #
Loading…
Cancel
Save