From dbcb96e2c2b14b37d0dd70ad43da8d9e864ec78d Mon Sep 17 00:00:00 2001
From: coolneng <akasroua@gmail.com>
Date: Wed, 8 Apr 2020 12:51:57 +0200
Subject: [PATCH] Create comfortable home office setup

---
 .gitignore                              |  3 +--
 kanshi/.config/kanshi/config            |  4 ++--
 kitty/.config/kitty/kitty.conf          |  2 +-
 neovim/.config/nvim/init.vim            | 32 ++++++++++++++++---------
 redshift/.config/redshift/redshift.conf |  2 +-
 sway/.config/sway/config                |  2 ++
 tmux/.tmux.conf                         |  5 ++--
 7 files changed, 31 insertions(+), 19 deletions(-)

diff --git a/.gitignore b/.gitignore
index 483f7c1..60301a4 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,6 +1,5 @@
-# Ignore logs
+weechat/.weechat/*.log
 weechat/.weechat/logs
-weechat/**/*.log
 weechat/.weechat/script/
 weechat/.weechat/sec.conf
 neovim/.config/nvim/.netrwhist
diff --git a/kanshi/.config/kanshi/config b/kanshi/.config/kanshi/config
index 573112d..4aac450 100644
--- a/kanshi/.config/kanshi/config
+++ b/kanshi/.config/kanshi/config
@@ -1,6 +1,6 @@
 {
-	output eDP-1 disable
-	output HDMI-A-2 enable
+	output eDP-1 enable
+	output HDMI-A-2 enable mode 1440x900
 }
 
 {
diff --git a/kitty/.config/kitty/kitty.conf b/kitty/.config/kitty/kitty.conf
index 9e9b741..4ac0c28 100644
--- a/kitty/.config/kitty/kitty.conf
+++ b/kitty/.config/kitty/kitty.conf
@@ -23,7 +23,7 @@ bold_italic_font Go Mono Bold Italic
 #:     italic_font      Operator Mono Book Italic
 #:     bold_italic_font Operator Mono Medium Italic
 
-font_size 10.0
+font_size 11.0
 
 #: Font size (in pts)
 
diff --git a/neovim/.config/nvim/init.vim b/neovim/.config/nvim/init.vim
index ef0cea4..dff4a4a 100644
--- a/neovim/.config/nvim/init.vim
+++ b/neovim/.config/nvim/init.vim
@@ -1,6 +1,5 @@
 ""Basic stuff
 set number
-set ttyfast
 set encoding=utf8
 set clipboard+=unnamedplus
 set nofoldenable
@@ -49,8 +48,15 @@ let &t_8b = "\<Esc>[48;2;%lu;%lu;%lum"
 set laststatus=0
 ""Set Markdown filetype for neomutt
 autocmd BufNewFile,BufRead /tmp/neomutt* set filetype=markdown
-""Quitting whether Goyo is active or not
+""Quit whether Goyo is active or not
 function! s:goyo_enter()
+  if executable('tmux') && strlen($TMUX)
+    silent !tmux set status off
+    silent !tmux list-panes -F '\#F' | grep -q Z || tmux resize-pane -Z
+  endif
+  set noshowmode
+  set noshowcmd
+  set scrolloff=999
   let b:quitting = 0
   let b:quitting_bang = 0
   autocmd QuitPre <buffer> let b:quitting = 1
@@ -58,15 +64,19 @@ function! s:goyo_enter()
 endfunction
 
 function! s:goyo_leave()
-  " Quit Vim if this is the only remaining buffer
-  if b:quitting && len(filter(range(1, bufnr('$')), 'buflisted(v:val)')) == 1
-    if b:quitting_bang
-      qa!
-    else
-      qa
-    endif
+  if executable('tmux') && strlen($TMUX)
+    silent !tmux set status on
+    silent !tmux list-panes -F '\#F' | grep -q Z && tmux resize-pane -Z
+  endif
+  set showmode
+  set showcmd
+  set scrolloff=5
+  if b:quitting_bang
+    qa!
+  else
+    qa
   endif
 endfunction
 
-autocmd! User GoyoEnter call <SID>goyo_enter()
-autocmd! User GoyoLeave call <SID>goyo_leave()
+autocmd! User GoyoEnter nested call <SID>goyo_enter()
+autocmd! User GoyoLeave nested call <SID>goyo_leave()
diff --git a/redshift/.config/redshift/redshift.conf b/redshift/.config/redshift/redshift.conf
index 5457fd5..05bcabc 100644
--- a/redshift/.config/redshift/redshift.conf
+++ b/redshift/.config/redshift/redshift.conf
@@ -34,7 +34,7 @@ location-provider=manual
 ; 'randr' is the preferred method, 'vidmode' is an older API.
 ; but works in some cases when 'randr' does not.
 ; The adjustment method settings are in a different section.
-adjustment-method=randr
+adjustment-method=wayland
 
 ; Configuration of the location-provider:
 ; type 'redshift -l PROVIDER:help' to see the settings.
diff --git a/sway/.config/sway/config b/sway/.config/sway/config
index 1d5ff9b..a14d72f 100644
--- a/sway/.config/sway/config
+++ b/sway/.config/sway/config
@@ -297,6 +297,8 @@ exec swayidle -w \
     exec doas wg-quick up /etc/wireguard/wg0.conf
     # kanshi
     exec kanshi
+    # redshift
+    exec redshift
     # tmux
     assign [app_id="tmux"] $workspace1
     exec kitty --class tmux -- tmuxp load ~/.tmuxp/local.yaml
diff --git a/tmux/.tmux.conf b/tmux/.tmux.conf
index cdf229f..553189c 100644
--- a/tmux/.tmux.conf
+++ b/tmux/.tmux.conf
@@ -26,7 +26,7 @@ bind l select-pane -R
 
 # equalize splits with x
 unbind space
-bind x select-layout even-vertical
+bind space select-layout even-vertical
 
 # window switching
 unbind n
@@ -40,7 +40,8 @@ bind-key n command-prompt "rename-window '%%'"
 
 # change kill window bind
 unbind &
-bind k kill-session
+unbind x
+bind x kill-session
 
 # force a reload of the config file
 unbind r