From bca6d27965e86fbaf0e5cfdd16237cb590c57118 Mon Sep 17 00:00:00 2001 From: Kevin Mok Date: Mon, 5 Mar 2018 03:42:16 -0500 Subject: [PATCH] i3 shortcuts: media, open apps in certain ws --- aliases/.bash_aliases | 2 ++ aliases/.pc_aliases | 10 ++++++--- aliases/.school_aliases | 10 ++++----- configs/NZXT/i3.conf | 47 ++++++++++++++++++++++++++++------------- 4 files changed, 46 insertions(+), 23 deletions(-) diff --git a/aliases/.bash_aliases b/aliases/.bash_aliases index 753868a..6aec977 100644 --- a/aliases/.bash_aliases +++ b/aliases/.bash_aliases @@ -32,7 +32,9 @@ alias cfg="d ~/.config" ok() { okular $1 ; } rfnd() { find . -name "$1" ; } +# rfnde() { find . -name "*.$1" ; } rgrp() { grep -r $1 * ; } +grpy() { grep $1 *.py ; } p3() { python3 $1 ; } py() { python $1 ; } diff --git a/aliases/.pc_aliases b/aliases/.pc_aliases index f4f11f1..b740aab 100644 --- a/aliases/.pc_aliases +++ b/aliases/.pc_aliases @@ -20,8 +20,9 @@ if [ "$(whoami)" == "kevin" ]; then alias ans="d /usr/local/android-studio/bin && ./studio.sh" alias cdn="$cd_coding_dir" 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 # bl() { xbacklight -set $1 ; } @@ -72,7 +73,10 @@ if [ "$(hostname)" == "NZXT" ]; then # }}} apps # # 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 rcg="$cd_coding_dir/random-color-generator" alias dcr="$cd_coding_dir/dcr-logger" diff --git a/aliases/.school_aliases b/aliases/.school_aliases index 2edd55e..be891c9 100644 --- a/aliases/.school_aliases +++ b/aliases/.school_aliases @@ -41,8 +41,9 @@ alias ll="ls -l" cd_209="d ~/Documents/School/209"; alias 209="$cd_209" 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="echo \". ./.bashrc\"&& ssh mokkar@cdf.utoronto.ca" mkex() { chmod 777 $1 ; } @@ -75,10 +76,9 @@ run() { done < $1.in } # temp - deb() { - gdb ./print_ptree.out < "$1" - } + alias m3="make pfact && ./pfact 10" # }}} # }}} alias 36a="$cd_school/236/a1" +alias 36t="$cd_school && ok ../236-textbook.pdf" diff --git a/configs/NZXT/i3.conf b/configs/NZXT/i3.conf index 7760975..95d58a7 100644 --- a/configs/NZXT/i3.conf +++ b/configs/NZXT/i3.conf @@ -4,23 +4,22 @@ exec redshift -O 4000 exec_always feh --bg-center ~/Pictures/Backgrounds/samurai-astronaut.jpg exec imwheel 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 terminator -# exec google-chrome # }}} startup # set $sch_dir "$HOME/Documents/School" +# app shortcuts {{{ # bindsym Mod4+a exec studio bindsym $mod+control+Return exec i3-sensible-terminal bindsym Mod4+c exec google-chrome -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 bindsym Print exec ksnapshot +# }}} app shortcuts # # redshift {{{ # bindsym $mod+Mod4+1 exec redshift -O 1500 @@ -110,27 +109,45 @@ set $benq "HDMI-0" set $ws1 "1 " workspace $ws1 output $samsung +bindsym $mod+F1 workspace $ws1; exec terminator + set $ws2 "2 " workspace $ws2 output $benq +bindsym $mod+F2 workspace $ws2; exec terminator + set $ws3 "3 " workspace $ws3 output $benq + set $ws4 "4 " +workspace $ws4 output $samsung +assign [class="Okular"] $ws4 + set $ws5 "5 " workspace $ws5 output $benq +bindsym $mod+F5 workspace $ws5; exec google-chrome + set $ws6 "6 " workspace $ws6 output $samsung -assign [class="discord"] $ws6 +bindsym Mod4+d workspace $ws6; exec discord assign [class="Slack"] $ws6 + set $ws7 "7 " workspace $ws7 output $samsung + set $ws8 "8 " assign [class="jetbrains-"] $ws8 + set $ws9 "9 " +workspace $ws9 output $samsung +bindsym $mod+F9 workspace $ws9; exec terminator + set $ws10 "10 " assign [class="VirtualBox"] $ws10 -assign [class="Spotify"] $ws10 +bindsym Mod4+s workspace $ws10; exec spotify + set $ws11 "11 " workspace $ws11 output $benq +bindsym $mod+F11 workspace $ws11; exec terminator # }}} ws names # # ws bindings {{{ # @@ -187,10 +204,10 @@ bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'You pressed the exit shortcu # }}} reload config # # 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+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 # # status bar {{{ # @@ -230,13 +247,13 @@ font pango:Hack 11 # }}} mod key/font # # 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 -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 #