diff --git a/dotfiles/bspwm.org b/dotfiles/bspwm.org index 1379913..717c1a5 100644 --- a/dotfiles/bspwm.org +++ b/dotfiles/bspwm.org @@ -6,13 +6,12 @@ #+PROPERTY: header-args:bash+ :tangle ~/.config/bspwm/bspwmrc :END: +* List Desktops #+begin_src bash - # If refreshing bspwm, remove all previous rules to prevent doubling up. - bspc rule -r "*" - bspc monitor -d code web mail misc figs #+end_src +* Basic Config #+begin_src bash bspc config border_width 1 bspc config window_gap 8 @@ -25,20 +24,27 @@ bspc config focus_follows_pointer true #+end_src +* Colors #+begin_src bash bspc config normal_border_color \#32302f bspc config focused_border_color \#bdae93 #+end_src +* Rules +Use =xprop= to obtain information about the window. + #+begin_src bash + # If refreshing bspwm, remove all previous rules to prevent doubling up. + bspc rule -r "*" + bspc rule --add qutebrowser desktop='web' follow=on state=tiled bspc rule --add Emacs desktop='code' follow=on state=tiled + + bspc rule --add Pavucontrol state=floating #+end_src +* Run Polybar and SXHKD #+begin_src bash $HOME/.config/polybar/scripts/launch.sh -#+end_src - -#+begin_src bash sxhkd -m 1 -c ~/.config/sxhkd/sxhkdrc.bspwm & #+end_src diff --git a/dotfiles/i3.org b/dotfiles/i3.org index 8070a7c..da050b4 100644 --- a/dotfiles/i3.org +++ b/dotfiles/i3.org @@ -183,6 +183,11 @@ To display names or symbols instead of plain workspace numbers you can use somet floating_modifier $mod #+end_src +** Back and Forth +#+begin_src conf + workspace_auto_back_and_forth yes +#+end_src + ** Application Specific *** Open applications on specific workspaces #+begin_src conf @@ -215,74 +220,7 @@ To display names or symbols instead of plain workspace numbers you can use somet for_window [title="Simulink Library Browser"] floating enable #+end_src -* Windows Manager -** DONE Change focus -#+begin_src conf - bindsym $mod+h focus left - bindsym $mod+j focus down - bindsym $mod+k focus up - bindsym $mod+l focus right - - bindsym $mod+Left focus left - bindsym $mod+Down focus down - bindsym $mod+Up focus up - bindsym $mod+Right focus right -#+end_src - -** DONE Move focused window -#+begin_src conf - bindsym $mod+Shift+h move left - bindsym $mod+Shift+j move down - bindsym $mod+Shift+k move up - bindsym $mod+Shift+l move right - - bindsym $mod+Shift+Left move left - bindsym $mod+Shift+Down move down - bindsym $mod+Shift+Up move up - bindsym $mod+Shift+Right move right -#+end_src - -** DONE Split orientation -#+begin_src conf - bindsym $mod+q split h - bindsym $mod+v split v -#+end_src - -** DONE Kill focused window -#+begin_src conf - bindsym $mod+Shift+q kill -#+end_src - -** DONE Toggle fullscreen mode for the focused container -#+begin_src conf - bindsym $mod+f fullscreen toggle -#+end_src - -** DONE Change container layout (stacked, tabbed, toggle split) -#+begin_src conf - # Toggle between stacking/tabbed/split: - bindsym $mod+x layout toggle tabbed split -#+end_src - -** DONE Toggle tiling / floating -#+begin_src conf - bindsym $mod+Shift+space floating toggle -#+end_src - -** DONE Change focus between tiling / floating windows -#+begin_src conf - bindsym $mod+a focus mode_toggle -#+end_src - -** DONE Resize Window -#+begin_src conf - bindsym $mod+Shift+y resize shrink width 10 px or 10 ppt - bindsym $mod+Shift+u resize grow height 10 px or 10 ppt - bindsym $mod+Shift+i resize shrink height 10 px or 10 ppt - bindsym $mod+Shift+o resize grow width 10 px or 10 ppt -#+end_src - -** TODO Scratchpad +* TODO Scratchpad #+begin_src conf # move the currently focused window to the scratchpad bindsym $mod+Shift+BackSpace move scratchpad @@ -292,73 +230,8 @@ To display names or symbols instead of plain workspace numbers you can use somet bindsym $mod+BackSpace scratchpad show #+end_src -* DONE Workspaces -:PROPERTIES: -:header-args:conf+: :tangle no -:END: -** DONE Switch to workspace -#+begin_src conf - bindsym $mod+1 workspace $ws1 - bindsym $mod+2 workspace $ws2 - bindsym $mod+3 workspace $ws3 - bindsym $mod+4 workspace $ws4 - bindsym $mod+5 workspace $ws5 - bindsym $mod+6 workspace $ws6 - bindsym $mod+7 workspace $ws7 - bindsym $mod+8 workspace $ws8 -#+end_src - -** DONE Workspace back and forth (with/without active container) -#+begin_src conf - workspace_auto_back_and_forth yes - bindsym $mod+b workspace back_and_forth -#+end_src - -** DONE Move to prev/next workspace -#+begin_src conf - bindsym $mod+n workspace next - bindsym $mod+p workspace prev -#+end_src - -** DONE Move focused container to workspace -#+begin_src conf - bindsym $mod+Ctrl+1 move container to workspace $ws1 - bindsym $mod+Ctrl+2 move container to workspace $ws2 - bindsym $mod+Ctrl+3 move container to workspace $ws3 - bindsym $mod+Ctrl+4 move container to workspace $ws4 - bindsym $mod+Ctrl+5 move container to workspace $ws5 - bindsym $mod+Ctrl+6 move container to workspace $ws6 - bindsym $mod+Ctrl+7 move container to workspace $ws7 - bindsym $mod+Ctrl+8 move container to workspace $ws8 -#+end_src - -** DONE Move to workspace with focused container -#+begin_src conf - bindsym $mod+Shift+1 move container to workspace $ws1; workspace $ws1 - bindsym $mod+Shift+2 move container to workspace $ws2; workspace $ws2 - bindsym $mod+Shift+3 move container to workspace $ws3; workspace $ws3 - bindsym $mod+Shift+4 move container to workspace $ws4; workspace $ws4 - bindsym $mod+Shift+5 move container to workspace $ws5; workspace $ws5 - bindsym $mod+Shift+6 move container to workspace $ws6; workspace $ws6 - bindsym $mod+Shift+7 move container to workspace $ws7; workspace $ws7 - bindsym $mod+Shift+8 move container to workspace $ws8; workspace $ws8 -#+end_src - -* DONE I3 Bindings -:PROPERTIES: -:header-args:conf+: :tangle no -:END: -Restart i3 inplace (preserves your layout/session, can be used to upgrade i3) -#+begin_src conf - bindsym $mod+Shift+r restart -#+end_src - -* Run Polybar +* Run Polybar and SXHKD #+begin_src conf exec_always --no-startup-id $HOME/.config/polybar/scripts/launch.sh -#+end_src - -* Key Bindings -#+begin_src conf exec_always --no-startup-id sxhkd -m 1 -c ~/.config/sxhkd/sxhkdrc.i3 #+end_src diff --git a/dotfiles/polybar.org b/dotfiles/polybar.org index 57e90a3..798e291 100644 --- a/dotfiles/polybar.org +++ b/dotfiles/polybar.org @@ -1,6 +1,6 @@ #+TITLE: Polybar Configuration :DRAWER: -#+PROPERTY: header-args+ :comments both +#+PROPERTY: header-args :comments no #+PROPERTY: header-args+ :mkdirp yes #+PROPERTY: header-args+ :tangle ~/.config/polybar/config :END: @@ -48,8 +48,8 @@ * VM #+begin_src conf [global/wm] - margin-top = 5 - margin-bottom = 5 + margin-top = 0 + margin-bottom = 0 #+end_src * Top Bar @@ -81,9 +81,11 @@ font-1 = unifont:fontformat=truetype:size=8:antialias=false;0 font-2 = Weather Icons:size=10;1 - modules-left = i3 xwindow + modules-left = i3 bspwm xwindow modules-center = - modules-right = pulseaudio wireless-network xbacklight screenshot redshift nordvpn lockscreen dunst unread_mail cpu battery temperature date + modules-right = pulseaudio xbacklightredshift nordvpn lockscreen dunst unread_mail cpu battery temperature date + + wm-restack = bspwm tray-position = right tray-detached = true @@ -143,6 +145,48 @@ label-urgent-padding = 1 #+END_SRC +* BSPWM +#+begin_src conf + [module/bspwm] + type = internal/bspwm + + pin-workspaces = true + enable-click = true + enable-scroll = false + + ; Use fuzzy (partial) matching on labels when assigning + ; icons to workspaces + ; Example: code;♚ will apply the icon to all workspaces + ; containing 'code' in the label + fuzzy-match = false + + + ws-icon-0 = code; + ws-icon-1 = web; + ws-icon-2 = mail; + ws-icon-3 = misc; + ws-icon-4 = figs;ﬧ + ws-icon-default = + + label-focused = %icon% + label-focused-foreground = ${colors.background} + label-focused-background = ${colors.turquoise} + label-focused-underline= ${colors.turquoise} + label-focused-padding = 1 + + label-occupied = %icon% + label-occupied-underline = ${colors.foreground} + label-occupied-padding = 1 + + label-urgent = %icon% + label-urgent-background = ${colors.red} + label-urgent-padding = 1 + + label-empty = %icon% + label-empty-foreground = ${colors.foreground} + label-empty-padding = 1 +#+end_src + * Music using MPD #+BEGIN_SRC conf [module/mpd] @@ -558,7 +602,6 @@ fi #+end_src - * Weather https://github.com/x70b1/polybar-scripts/tree/master/polybar-scripts/openweathermap-fullfeatured diff --git a/dotfiles/sxhkd.org b/dotfiles/sxhkd.org index 3cdfb43..75cf597 100644 --- a/dotfiles/sxhkd.org +++ b/dotfiles/sxhkd.org @@ -67,7 +67,7 @@ # File Manager super + o - alacritty -e "ranger" + urxvt -e "ranger" # Browser super + i @@ -144,7 +144,7 @@ XF86Display # Ranger super + space ; r - alacritty -e "ranger" + urxvt -e "ranger" # pcmanfm: GUI file manager super + space ; shift + r @@ -228,8 +228,15 @@ super + shift + d ** Set the window State #+begin_src conf # set the window state - super + {t,s, shift + f} - bspc node -t {tiled,floating,fullscreen} + super + {t, shift + f} + bspc node -t {tiled,fullscreen} + + super + s + if [ -z "$(bspc query -N -n focused.floating)" ]; then \ + bspc node focused -t floating; \ + else \ + bspc node focused -t tiled; \ + fi #+end_src ** Sticky Window @@ -239,7 +246,7 @@ super + shift + d bspc node -g sticky #+end_src -** focus/swap +** Focus and Swap #+begin_src conf # Focus/swap the node in the given direction super + {_,shift + }{h,j,k,l} @@ -248,10 +255,6 @@ super + shift + d # focus the last Node super + Tab bspc node -f last - - # Swap to the last Desktop - super + shift + b - bspc node -s last #+end_src #+begin_src conf @@ -303,6 +306,7 @@ super + ctrl + space super + {Left,Down,Up,Right} bspc node -v {-20 0,0 20,0 -20,20 0} #+end_src + * I3 related :PROPERTIES: :header-args:conf+: :tangle ~/.config/sxhkd/sxhkdrc.i3 @@ -325,16 +329,16 @@ super + ctrl + space super + f i3-msg layout toggle tabbed split - # focus the next/previous node in the current desktop - # super + c - # bspc node -f next.local + # Change focus between tiling / floating windows + super + c + i3-msg focus mode_toggle #+end_src ** Set the window State #+begin_src conf # set the window state super + {t,s, shift + f} - i3-msg {fullscreen disavle,floating toggle,fullscreen toggle} + i3-msg {fullscreen disable,floating toggle,fullscreen toggle} #+end_src ** Sticky Window @@ -346,16 +350,14 @@ super + ctrl + space ** focus/swap #+begin_src conf # Focus/swap the node in the given direction - super + {_,shift + }{h,j,k,l} - i3-msg {focus,move} {left,down,up,right} - - # focus the last Node - # super + Tab - # bspc node -f last - - # Swap to the last Desktop - # super + shift + b - # bspc node -s last + super + {_,shift + }{h,Left} + i3-msg {focus,move} left + super + {_,shift + }{j,Down} + i3-msg {focus,move} down + super + {_,shift + }{k,Up} + i3-msg {focus,move} up + super + {_,shift + }{l,Right} + i3-msg {focus,move} right #+end_src #+begin_src conf @@ -376,17 +378,14 @@ super + ctrl + space WP={1-9} && i3-msg move container to workspace $WP && i3-msg workspace $WP #+end_src -** Change focus between tiling / floating windows -#+begin_src conf - super + a - i3-msg focus mode_toggle -#+end_src - ** Preselect Preselect the direction #+begin_src conf - super + ctrl + {h,j,k,l} - i3-msg split {h,v,v,h} + super + ctrl + {h,l,Left,Right} + i3-msg split h + + super + ctrl + {j,k,Up,Down} + i3-msg split v #+end_src ** Resize