dotfiles

My dotfiles.
Log | Files | Refs | LICENSE

commit 3705a9fe821dcbf7d8b38089b05f165ce25075ae
parent a6d7ebc1ed96ca8cad4aa6808e92a807085300de
Author: Ryan Jeffrey <ryan@ryanmj.xyz>
Date:   Thu,  1 Oct 2020 02:41:04 -0700

bspwm and more use-package

Diffstat:
A.config/bspwm/bspwmrc | 45+++++++++++++++++++++++++++++++++++++++++++++
A.config/mimeapps.list | 7+++++++
M.config/polybar/config | 23+++++++++++++++--------
A.config/sxhkd/sxhkdrc | 127+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
M.emacs.d/init.el | 2+-
M.emacs.d/lisp/config.org | 33++++++++++++++++++++++-----------
M.gitignore | 4++++
7 files changed, 221 insertions(+), 20 deletions(-)

diff --git a/.config/bspwm/bspwmrc b/.config/bspwm/bspwmrc @@ -0,0 +1,45 @@ +#!/usr/bin/env zsh + +pgrep -x sxhkd > /dev/null || sxhkd & + + + +#bspc monitor -d I II III IV V VI VII VIII IX X + + +#bspc monitor "HDMI-A-2" -d I II III IV V +#bspc monitor "DisplayPort-1" -d VI VII VIII IX X + +ws1=("Web" "_>" "_>" "_>" "Msg") +ws2=("_>" "_>" "Music" "Mail" "Prop") + +if [ "$HOST" = "Southpark" ]; then + bspc monitor "HDMI-A-2" -d $ws1 + bspc monitor "DisplayPort-1" -d $ws2 +else + bspc monitor -d $ws1 $ws2 +fi + + +bspc config border_width 2 +bspc config window_gap 12 + +bspc config split_ratio 0.52 +bspc config borderless_monocle true +bspc config gapless_monocle true +bspc config focus_follows_pointer true + + +bspc rule -a Gimp desktop='^7' state=floating follow=on +bspc rule -a brave desktop='^1' focus=on follow=on +bspc rule -a discord desktop='^5' +bspc rule -a slack desktop='^5' +bspc rule -a element desktop='^5' +bspc rule -a Steam desktop='^10' +bspc rule -a Screenkey manage=off + + + +sleep 3s && init-polybar.sh + +xdo above -t $(xdo id -n root) $(xdo id -n polybar) diff --git a/.config/mimeapps.list b/.config/mimeapps.list @@ -0,0 +1,7 @@ +[Default Applications] +image/jpeg=sxiv.desktop +video/mp4=mpv.desktop + +[Added Associations] +image/jpeg=sxiv.desktop; +video/mp4=mpv.desktop; diff --git a/.config/polybar/config b/.config/polybar/config @@ -24,8 +24,8 @@ background = ${xrdb:background} ;background = ${xrdb:color0:#222} background-alt = ${xrdb:color0:#222} -foreground = ${xrdb:color7:#222} -foreground-alt = ${xrdb:color7:#222} +foreground = #fff +foreground-alt = #bbb primary = ${xrdb:color1:#222} secondary = ${xrdb:color2:#222} alert = ${xrdb:color3:#222} @@ -78,11 +78,11 @@ module-margin-left = 1 module-margin-right = 2 ;font-0 = :pixelsize=12;1 -font-0 = "Inconsolata:fontformat=truetype:size=13:antialias=true;0" -font-1 = "Inconsolata:Style=Regular:scale=13;1" -font-2 = "Siji:scale=13;1" +font-0 = "Hack:fontformat=truetype:size=13:antialias=true;0" +font-1 = "Hack:Style=Regular:scale=13;1" +font-2 = "Noto Sans:size=13;1" -modules-left = i3 +modules-left = bspwm modules-center = date modules-right = mpd pulseaudio battery eth wlan temperature @@ -140,13 +140,19 @@ type = internal/bspwm format = <label-state> <label-mode> +ws-icon-0 = Web;🌐 +ws-icon-1 = office;♛ +ws-icon-2 = graphics;♜ +ws-icon-3 = mail;♝ +ws-icon-4 = web;♞ +ws-icon-default = ♟ ; Available tokens: ; %name% ; Default: %name% label-monitor = %name% -label-focused = %name% +label-focused = %icon% label-focused-background = ${colors.background-alt} label-focused-underline= ${colors.primary} label-focused-padding = 2 @@ -167,7 +173,7 @@ label-empty-padding = 2 ; But if you rename your bspwm monitors with bspc -n this option will no longer ; behave correctly. ; Default: true -pin-workspaces = true +pin-workspaces = false ; Output mode flags after focused state label ; Default: false @@ -195,6 +201,7 @@ fuzzy-match = true ; Separator in between workspaces ; label-separator = | + [module/i3] type = internal/i3 format = <label-state> <label-mode> diff --git a/.config/sxhkd/sxhkdrc b/.config/sxhkd/sxhkdrc @@ -0,0 +1,127 @@ +# +# wm independent hotkeys +# + +# terminal emulator +super + Return + st + +# program launcher +super + d + dmenu_run + +# make sxhkd reload its configuration files: +super + Escape + pkill -USR1 -x sxhkd + +# +# bspwm hotkeys +# + +# quit/restart bspwm +super + shift + r + bspc wm -r + +super + alt + e + bspc quit + +# close and kill +super + shift + q + bspc node -c + +# alternate between the tiled and monocle layout +super + m + bspc desktop -l next + +# 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 +super + g + bspc node -s biggest.window + +# +# state/flags +# + +# set the window state +super + {t,shift + t,s,f} + bspc node -t {tiled,pseudo_tiled,floating,fullscreen} + +# set the node flags +super + ctrl + {m,x,y,z} + bspc node -g {marked,locked,sticky,private} + +# +# focus/swap +# + +# focus 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 +super + {p,b,comma,period} + bspc node -f @{parent,brother,first,second} + +# 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} + bspc desktop -f {prev,next}.local + +# focus the last node/desktop +super + {grave,Tab} + bspc {node,desktop} -f last + +# 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 +super + {_,shift + }{1_-9,0} + bspc {desktop -f,node -d} '^{1-9,10}' + +super + {1-9,0} + bspc desktop -f '^{1-9,10}' + +# +# preselect +# + +# preselect the direction +super + ctrl + {h,j,k,l} + bspc node -p {west,south,north,east} + +# preselect the ratio +super + ctrl + {1-9} + bspc node -o 0.{1-9} + +# cancel the preselection for the focused node +super + ctrl + space + bspc node -p cancel + +# 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 +# + +# 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} + +# 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} + +# move a floating window +super + {Left,Down,Up,Right} + bspc node -v {-20 0,0 20,0 -20,20 0} diff --git a/.emacs.d/init.el b/.emacs.d/init.el @@ -42,7 +42,7 @@ '(org-time-stamp-custom-formats (quote ("<%b %e %G>" . "<%m/%d/%y %a %H:%M>"))) '(package-selected-packages (quote - (gitignore-mode company flycheck wc-mode htmlize fic-mode emojify org-bullets use-package-hydra use-package-ensure-system-package use-package-el-get use-package-chords undo-tree quelpa-use-package mu4e-query-fragments mu4e-overview mu4e-maildirs-extension mu4e-jump-to-list mu4e-conversation mu4e-alert modus-vivendi-theme modus-operandi-theme ivy-ycmd ivy-avy highlight fish-mode elfeed-web elfeed-score elfeed-protocol elfeed-org elfeed-goodies csgo-conf-mode counsel)))) + (yasnippet-snippets yasnippet gitignore-mode company flycheck wc-mode htmlize fic-mode emojify org-bullets use-package-hydra use-package-ensure-system-package use-package-el-get use-package-chords undo-tree quelpa-use-package mu4e-query-fragments mu4e-overview mu4e-maildirs-extension mu4e-jump-to-list mu4e-conversation mu4e-alert modus-vivendi-theme modus-operandi-theme ivy-ycmd ivy-avy highlight fish-mode elfeed-web elfeed-score elfeed-protocol elfeed-org elfeed-goodies csgo-conf-mode counsel)))) (custom-set-faces ;; custom-set-faces was added by Custom. ;; If you edit it by hand, you could mess it up, so be careful. diff --git a/.emacs.d/lisp/config.org b/.emacs.d/lisp/config.org @@ -26,8 +26,11 @@ (setq x-gtk-use-system-tooltips nil) ;; font -(add-to-list 'default-frame-alist - '(font . "Hack:antialias=true:size=16:style=Regular")) +(if (string= system-name "Southpark") + (add-to-list 'default-frame-alist + '(font . "JetBrainsMono-Medium:size=20:antialias=true:autohint=true:family=mono")) + (add-to-list 'default-frame-alist + '(font . "JetBrainsMono-Medium:size=13:antialias=true:autohint=true:family=mono"))) (defun my/create-greek-ligatures () @@ -60,8 +63,8 @@ :ensure t) (load-theme 'modus-vivendi t) -(global-set-key (kbd "M-<up>") 'text-scale-increase) -(global-set-key (kbd "M-<down>") 'text-scale-decrease) +(global-set-key (kbd "M-S-<up>") 'text-scale-increase) +(global-set-key (kbd "M-S-<down>") 'text-scale-decrease) (scroll-bar-mode nil) (use-package shr @@ -203,8 +206,13 @@ ;(require 'org-tempo) -(setq org-src-preserve-indentation nil - org-edit-src-content-indentation 0) +(use-package org + :init (setq org-src-preserve-indentation nil + org-edit-src-content-indentation 0) + (setq org-src-tab-acts-natively t) + :bind (:map org-mode-map + ("M-S-<up>" . 'text-scale-increase) + ("M-S-<down>" . 'text-scale-decrease))) (use-package org-indent-mode :config @@ -215,12 +223,15 @@ :ensure t) (use-package wc-mode - :ensure t) + :ensure t + :hook (org-mode tex-mode)) + +(use-package display-line-numbers-mode + :hook (org-mode tex-mode)) + +(use-package visual-line-mode + :hook (org-mode tex-mode)) -(setq org-src-tab-acts-natively t) -(add-hook 'org-mode-hook 'display-line-numbers-mode) -(add-hook 'org-mode-hook 'visual-line-mode) -(add-hook 'org-mode-hook 'wc-mode) #+End_src diff --git a/.gitignore b/.gitignore @@ -92,6 +92,10 @@ flycheck_*.el !/.config/systemd/user/emacs.service !/.config/youtube-dl !/.config/youtube-dl/config +!/.config/bspwm/ +!/.config/bspwm/bspwmrc +!/.config/sxhkd/ +!/.config/sxhkd/sxhkdrc /.emacs.d/**/*