summaryrefslogtreecommitdiff
path: root/.config
diff options
context:
space:
mode:
authorDavid Luevano Alvarado <55825613+luevano@users.noreply.github.com>2020-12-19 17:59:51 -0700
committerDavid Luevano Alvarado <55825613+luevano@users.noreply.github.com>2020-12-19 17:59:51 -0700
commit1a2357773586ee8421379de4070f71da40d1c679 (patch)
tree0d56955ebb4d28120b9d04942dc59d2a7315bd80 /.config
parentffb920179648bd4fdde1eb8b2e8b8e068fb4eb4b (diff)
Almost fully using bspwm
Diffstat (limited to '.config')
-rw-r--r--.config/alacritty/alacritty.yml4
-rwxr-xr-x.config/bspwm/bspwmrc20
-rw-r--r--.config/i3/config2
-rw-r--r--.config/nvim/init.vim4
-rw-r--r--.config/shell/profile1
-rw-r--r--.config/sxhkd/sxhkdrc104
-rw-r--r--.config/x11/xprofile2
7 files changed, 85 insertions, 52 deletions
diff --git a/.config/alacritty/alacritty.yml b/.config/alacritty/alacritty.yml
index eebf7ae..e6bb373 100644
--- a/.config/alacritty/alacritty.yml
+++ b/.config/alacritty/alacritty.yml
@@ -20,7 +20,8 @@ window:
# - none: Neither borders nor title bar
#decorations: full
#startup_mode: Windowed
- title: Alacritty
+ #title: Alacritty
+ dynamic_title: true
class:
instance: Alacritty
general: Alacritty
@@ -123,7 +124,6 @@ background_opacity: 0.9
#selection:
#save_to_clipboard: false
-#dynamic_title: true
cursor:
# - ▇ Block
diff --git a/.config/bspwm/bspwmrc b/.config/bspwm/bspwmrc
index db9b707..b152f41 100755
--- a/.config/bspwm/bspwmrc
+++ b/.config/bspwm/bspwmrc
@@ -1,13 +1,23 @@
#!/bin/sh
-# Check if sxhkd is installed, I guess,
-# because bspwm doesn't have keybindings by default.
+# Checks if X program is already running, if not, run it.
pgrep -x sxhkd > /dev/null || sxhkd &
+pgrep -x statusbar > /dev/null || statusbar &
# Multihead.
-if [ $(hostname) == "arch" ]; then
- bspc monitor DP-0 -d I II III IV V
- bspc monitor HDMI-0 -d VI VII VIII IX X
+if [ $(uname -n) = "arch" ]; then
+ MAINMON="DP-0"
+ SECMON="HDMI-0"
+
+ bspc monitor $MAINMON -d 1 2 3 4 5
+ bspc monitor $SECMON -d 6 7 8 9 10
+
+ if [ $(pgrep -f bspwm_enforce_monitor_position) < 2]; then
+ bspwm_enforce_monitor_position $MAINMON '^1' &
+ else
+ killall bspwm_enforce_monitor_position
+ bspwm_enforce_monitor_position $MAINMON '^1' &
+ fi
else
bspc monitor -d I II III IV V VI VII VIII IX X
fi
diff --git a/.config/i3/config b/.config/i3/config
index 97dfbd4..2e0176d 100644
--- a/.config/i3/config
+++ b/.config/i3/config
@@ -78,7 +78,7 @@ font pango:monospace 10
assign [class="vlc"] $ws5
# WS6
# For a negative regex lookup: "^(?!Save As).*$", for example.
- assign [class="firefox"] $ws6
+ # assign [class="firefox"] $ws6
# WS7
assign [class="Thunderbird"] $ws7
# WS8
diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim
index 0f48c01..dbe061d 100644
--- a/.config/nvim/init.vim
+++ b/.config/nvim/init.vim
@@ -19,8 +19,11 @@ set showcmd
" Color schemes
" Plug 'altercation/vim-colors-solarized'
Plug 'dracula/vim'
+ Plug 'chrisbra/Colorizer'
+ let g:colorizer_colornames = 0
" Other
+ Plug 'baskerville/vim-sxhkdrc'
Plug 'mboughaba/i3config.vim'
Plug 'junegunn/goyo.vim'
Plug 'preservim/nerdtree'
@@ -98,6 +101,7 @@ set showcmd
colorscheme dracula
" Just so alacritty can use transparency.
hi Normal ctermbg=NONE
+ set title
set encoding=utf-8
set number relativenumber
set cursorline
diff --git a/.config/shell/profile b/.config/shell/profile
index 5a487ce..599924a 100644
--- a/.config/shell/profile
+++ b/.config/shell/profile
@@ -15,6 +15,7 @@ export STATUSBAR="i3blocks"
export MAILMGR="thunderbird"
# export MSGCHAT="telegram-desktop"
export SSMGR="flameshot"
+ export SSPATH="$HOME/pix/ss/"
## ~/ cleanup.
# XDG base directory specification found in:
diff --git a/.config/sxhkd/sxhkdrc b/.config/sxhkd/sxhkdrc
index 46fa323..d4595ac 100644
--- a/.config/sxhkd/sxhkdrc
+++ b/.config/sxhkd/sxhkdrc
@@ -1,125 +1,143 @@
#
-# General keybinds.
+# General keybindings.
#
-# Terminal emulator.
+# Basic.
super + Return
- alacritty
-
-# Program launcher.
+ $TERMINAL
super + d
i3-dmenu-desktop
-
-# Reload sxhkd config.
super + Escape
pkill -USR1 -x sxhkd
+# Run programs.
+super + shift + w
+ $BROWSER
+super + shift + f
+ $TERMINAL -e $FILE
+super + Delete
+ $TERMINAL -e htop
+
+# Screenshots.
+{_,super, super + shift} + Print
+ $SSMGR {gui,full -c,full -p $SSPATH}
+
#
-# bspwm hotkeys
+# bspwm keybindings.
#
# Quit/restart bspwm.
-super + shift + r
- bspc wm -r
-# super + shift + {q,r}
-# bspc {quit,wm -r}
+super + shift + {e,r}
+ bspc {quit,wm -r}
# Close and kill.
-super + shift + q
- bspc node -k
-# super + {_,shift + }w
-# bspc node -{c,k}
+super + {_,shift + }q
+ bspc node -{c,k}
-# alternate between the tiled and monocle layout
+# Alternate between the tiled and monocle layout.
super + m
bspc desktop -l next
-# send the newest marked node to the newest preselected node
+# Send the newest marked node to the newest preselected node.
super + y
bspc node newest.marked.local -n newest.!automatic.local
-# swap the current node and the biggest window
+# Swap the current node and the biggest window.
super + g
bspc node -s biggest.window
#
-# state/flags
+# State/flags.
#
-# set the window state
+# Set the window state.
super + {t,shift + t,s,f}
bspc node -t {tiled,pseudo_tiled,floating,fullscreen}
-# set the node flags
+# Set the node flags.
super + ctrl + {m,x,y,z}
bspc node -g {marked,locked,sticky,private}
#
-# focus/swap
+# Focus/swap.
#
-# focus the node in the given direction
+# Socus the node in the given direction.
super + {_,shift + }{h,j,k,l}
bspc node -{f,s} {west,south,north,east}
-# focus the node for the given path jump
+# Focus the node for the given path jump.
super + {p,b,comma,period}
bspc node -f @{parent,brother,first,second}
-# focus the next/previous window in the current desktop
+# Focus the next/previous window in the current desktop.
super + {_,shift + }c
bspc node -f {next,prev}.local.!hidden.window
-# focus the next/previous desktop in the current monitor
-super + bracket{left,right}
+# Focus the next/previous desktop in the current monitor.
+super + brace{left,right}
bspc desktop -f {prev,next}.local
-# focus the last node/desktop
-super + {grave,Tab}
+# Focus the last node/desktop.
+super + {Tab,dead_acute}
bspc {node,desktop} -f last
-# focus the older or newer node in the focus history
+# Focus the older or newer node in the focus history.
super + {o,i}
bspc wm -h off; \
bspc node {older,newer} -f; \
bspc wm -h on
-# focus or send to the given desktop
+# Focus or send to the given desktop.
super + {_,shift + }{1-9,0}
bspc {desktop -f,node -d} '^{1-9,10}'
#
-# preselect
+# Preselect.
#
-# preselect the direction
+# Preselect the direction.
super + ctrl + {h,j,k,l}
bspc node -p {west,south,north,east}
-# preselect the ratio
+# Preselect the ratio.
super + ctrl + {1-9}
bspc node -o 0.{1-9}
-# cancel the preselection for the focused node
+# Cancel the preselection for the focused node.
super + ctrl + space
bspc node -p cancel
-# cancel the preselection for the focused desktop
+# Cancel the preselection for the focused desktop.
super + ctrl + shift + space
bspc query -N -d | xargs -I id -n 1 bspc node id -p cancel
#
-# move/resize
+# Move/resize.
#
-# expand a window by moving one of its side outward
+# Expand a window by moving one of its side outward.
super + alt + {h,j,k,l}
- bspc node -z {left -20 0,bottom 0 20,top 0 -20,right 20 0}
+ n=20; \
+ bspc node -z {left -$n 0,bottom 0 $n,top 0 -$n,right $n 0}
-# contract a window by moving one of its side inward
+# Contract a window by moving one of its side inward.
super + alt + shift + {h,j,k,l}
- bspc node -z {right -20 0,top 0 20,bottom 0 -20,left 20 0}
+ n=20; \
+ bspc node -z {right -$n 0,top 0 $n,bottom 0 -$n,left $n 0}
-# move a floating window
+# Move a floating window.
super + {Left,Down,Up,Right}
bspc node -v {-20 0,0 20,0 -20,20 0}
+
+
+# Smart resize, will grow or shrink depending on location.
+# Will always grow for floating nodes.
+super + alt + ctrl + {Left,Down,Up,Right}
+ n=10; \
+ { d1=left; d2=right; dx=-$n; dy=0; \
+ , d1=bottom; d2=top; dx=0; dy=$n; \
+ , d1=top; d2=bottom; dx=0; dy=-$n; \
+ , d1=right; d2=left; dx=$n; dy=0; \
+ } \
+ bspc node --resize $d1 $dx $dy || bspc node --resize $d2 $dx $dy
diff --git a/.config/x11/xprofile b/.config/x11/xprofile
index b3abfbb..d0d380c 100644
--- a/.config/x11/xprofile
+++ b/.config/x11/xprofile
@@ -15,4 +15,4 @@ flameshot &
pasystray &
# At the end, start the WM.
-exec i3
+exec bspwm