From 2c523ef1eb51ab9e0e9b1ba6bc30c117396bb331 Mon Sep 17 00:00:00 2001
From: Yigit Sever
Date: Sun, 8 Dec 2019 14:46:45 +0300
Subject: Work auto spliff
---
.config/dunst/dunstrc | 4 ++++
.config/i3/config##c.desktop,h.Lowe | 3 +++
bin/watch_incoming.sh | 16 ++++++++++++++++
3 files changed, 23 insertions(+)
create mode 100755 bin/watch_incoming.sh
diff --git a/.config/dunst/dunstrc b/.config/dunst/dunstrc
index e1d2052..523d3ba 100755
--- a/.config/dunst/dunstrc
+++ b/.config/dunst/dunstrc
@@ -57,3 +57,7 @@ timeout = 0
[Spotify]
appname = Spotify
format = "Now Playing\n%s\n%b"
+
+[spliff]
+appname = "spliff"
+format = "ready for printing\n%s\n%b"
diff --git a/.config/i3/config##c.desktop,h.Lowe b/.config/i3/config##c.desktop,h.Lowe
index 30692e1..86688be 100644
--- a/.config/i3/config##c.desktop,h.Lowe
+++ b/.config/i3/config##c.desktop,h.Lowe
@@ -8,6 +8,9 @@ set $alt Mod1
# launch polybar
exec --no-startup-id $HOME/.config/polybar/launch.sh &
+# launch spliffer + notification
+exec --no-startup-id $HOME/bin/watch_incoming.sh &
+
# start the screensaver, '' at the end is not a typo
exec --no-startup-id xidlehook --not-when-fullscreen --not-when-audio --timer normal 300 'betterlockscreen -l dimblur -t "Welcome Back"' ''
diff --git a/bin/watch_incoming.sh b/bin/watch_incoming.sh
new file mode 100755
index 0000000..b031461
--- /dev/null
+++ b/bin/watch_incoming.sh
@@ -0,0 +1,16 @@
+#!/usr/bin/env bash
+
+TARGET=$HOME/Downloads/toPrint/toPrint_staging
+PROCESSED=$HOME/Downloads/toPrint/toPrint_ready
+SPLIFF=$HOME/bin/spliff
+
+inotifywait -m -e create -e moved_to --format "%f" "${TARGET}" \
+ | while read FILENAME
+do
+ THUMB=$(mktemp /tmp/pdf_thumbnail_XXXXXXXXX.png)
+ evince-thumbnailer -s 1024 -l "${TARGET}/${FILENAME}" "${THUMB}"
+ mv "${TARGET}/${FILENAME}" "${PROCESSED}/${FILENAME}"
+ $SPLIFF "${PROCESSED}/${FILENAME}"
+ rm -f "${PROCESSED}/${FILENAME}"
+ dunstify -a "spliff" -I "${THUMB}" "$FILENAME"
+done
--
cgit v1.2.3-70-g09d2
From 702d0822b2a9b79602db02797b8ff4816a90c22a Mon Sep 17 00:00:00 2001
From: Yigit Sever
Date: Sun, 8 Dec 2019 18:32:51 +0300
Subject: vim sets spell for prose
---
.config/nvim/init.vim | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim
index fab8f58..dfa8a76 100755
--- a/.config/nvim/init.vim
+++ b/.config/nvim/init.vim
@@ -112,6 +112,9 @@ autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isT
" Resize all windows proportionally when the terminal is resized
" let terminal resize scale the internal windows
autocmd VimResized * :wincmd =
+
+" Set spell for prose
+autocmd FileType markdown,tex setlocal spell
"}}}
"{{{Misc Settings
@@ -152,6 +155,8 @@ set splitbelow " new split panes will split to below and right
set splitright
set cursorline
+set thesaurus+=~/.local/share/thesaurus.txt
+
" persistent undo
set undodir=~/.vim/undodir
set undofile
--
cgit v1.2.3-70-g09d2
From 0ee8d81649c027a8bfbd9d740325f5e922eb9705 Mon Sep 17 00:00:00 2001
From: Yigit Sever
Date: Mon, 16 Dec 2019 15:10:12 +0300
Subject: Change focus script to display time
---
.config/polybar/focus | 12 ++++++------
.taskrc##c.desktop,h.Lowe | 4 ++--
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/.config/polybar/focus b/.config/polybar/focus
index 8eeb92a..17c9862 100755
--- a/.config/polybar/focus
+++ b/.config/polybar/focus
@@ -34,10 +34,10 @@ $active_task_maybe =~ s/^\s+|\s+$//g;
my @lines = split /\n/, $active_task_maybe;
my $task = $lines[2];
-$task =~ s/^\s+|\s+$//g;
-$task =~ s/\s+/ /g;
+$task =~ s/^\s+|\s+$//g; # left and right trim
+$task =~ s/\s+/ /g; # reduce multiple whitespace into one
-# if ($task =~ m/.*?next (.*)$/) {
-# print "$1";
-# }
-print $task;
+if ($task =~ m/^(.*)?\s(\d+\w+)$/g) {
+ print "$1 | $2";
+}
+# print $task;
diff --git a/.taskrc##c.desktop,h.Lowe b/.taskrc##c.desktop,h.Lowe
index b79820e..c8419c4 100644
--- a/.taskrc##c.desktop,h.Lowe
+++ b/.taskrc##c.desktop,h.Lowe
@@ -62,8 +62,8 @@ report.todoConky.filter = status:pending and due.after:now and due.before:l
report.todoConky.dateformat = D-M-y H:N (A)
### report for focus script
-report.custom_focus.columns = description
-report.custom_focus.labels = Description
+report.custom_focus.columns = description,start.age
+report.custom_focus.labels = Description,active
report.custom_focus.description = Task to feed to focus script
report.custom_focus.filter = status:pending and +ACTIVE
--
cgit v1.2.3-70-g09d2
From 8d9cec31afcec93216f2884c6dadfebf94730996 Mon Sep 17 00:00:00 2001
From: Yigit Sever
Date: Sat, 21 Dec 2019 11:26:58 +0300
Subject: change expand snip map to ctrl-i
easier on colemak, natively mapped to insert tab, just press tab
---
.config/nvim/init.vim | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim
index dfa8a76..1c802a6 100755
--- a/.config/nvim/init.vim
+++ b/.config/nvim/init.vim
@@ -320,7 +320,7 @@ let g:UltiSnipsEditSplit="vertical"
let g:UltiSnipsSnippetsDir=$HOME.'/.vim/my-snippets/UltiSnips'
" ctrl + l expands the snippet, c + j/k navigates placeholders
-let g:UltiSnipsExpandTrigger = ""
+let g:UltiSnipsExpandTrigger = ""
"}}}
"{{{ vim-startify
--
cgit v1.2.3-70-g09d2
From 2705b61f05612bc63a2cdcd127d4ed5f04431f66 Mon Sep 17 00:00:00 2001
From: Yigit Sever
Date: Sun, 22 Dec 2019 22:21:59 +0300
Subject: Revert the ctrl-i mapping
can't use tab
---
.config/nvim/init.vim | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim
index 1c802a6..dfa8a76 100755
--- a/.config/nvim/init.vim
+++ b/.config/nvim/init.vim
@@ -320,7 +320,7 @@ let g:UltiSnipsEditSplit="vertical"
let g:UltiSnipsSnippetsDir=$HOME.'/.vim/my-snippets/UltiSnips'
" ctrl + l expands the snippet, c + j/k navigates placeholders
-let g:UltiSnipsExpandTrigger = ""
+let g:UltiSnipsExpandTrigger = ""
"}}}
"{{{ vim-startify
--
cgit v1.2.3-70-g09d2
From 9a550708b34ab9c391f82ba535130034a52d19c9 Mon Sep 17 00:00:00 2001
From: Yigit Sever
Date: Wed, 25 Dec 2019 20:28:34 +0300
Subject: fix taskserver connection
keep alive so server doesn't time us out
---
.ssh/config | 1 +
1 file changed, 1 insertion(+)
diff --git a/.ssh/config b/.ssh/config
index bce878a..2930dbb 100644
--- a/.ssh/config
+++ b/.ssh/config
@@ -12,6 +12,7 @@ Host overseer
HostName 207.154.210.186
Port 22
User yigit
+ ServerAliveInterval 180
Host dev
HostName 10.10.3.49
Port 22
--
cgit v1.2.3-70-g09d2
From 161fec5dcac768e9c3a6129cc9e7f49bacfeb682 Mon Sep 17 00:00:00 2001
From: Yigit Sever
Date: Wed, 25 Dec 2019 20:29:07 +0300
Subject: Change mod+a to sticky toggle
---
.config/i3/config##c.desktop,h.Lowe | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/.config/i3/config##c.desktop,h.Lowe b/.config/i3/config##c.desktop,h.Lowe
index 86688be..2e5a8c4 100644
--- a/.config/i3/config##c.desktop,h.Lowe
+++ b/.config/i3/config##c.desktop,h.Lowe
@@ -9,7 +9,7 @@ set $alt Mod1
exec --no-startup-id $HOME/.config/polybar/launch.sh &
# launch spliffer + notification
-exec --no-startup-id $HOME/bin/watch_incoming.sh &
+exec --no-startup-id $HOME/bin/watch_incoming.sh
# start the screensaver, '' at the end is not a typo
exec --no-startup-id xidlehook --not-when-fullscreen --not-when-audio --timer normal 300 'betterlockscreen -l dimblur -t "Welcome Back"' ''
@@ -108,11 +108,14 @@ bindsym $mod+e layout toggle split
# toggle tiling / floating
bindsym $mod+Shift+space floating toggle
+# toggle sticky floating window
+bindsym $mod+a sticky toggle
+
# change focus between tiling / floating windows
bindsym $mod+space focus mode_toggle
# focus the parent container
-bindsym $mod+a focus parent
+# bindsym $mod+a focus parent
# Define names for default workspaces for which we configure key bindings later on.
# We use variables to avoid repeating the names in multiple places.
--
cgit v1.2.3-70-g09d2
From e8100588c1d3a0bf2323ef3e47bef7a47edff65a Mon Sep 17 00:00:00 2001
From: Yigit Sever
Date: Mon, 30 Dec 2019 01:03:46 +0300
Subject: experimental vimrc changes
---
.config/nvim/init.vim | 86 +++++++++++++++++++++++++--------------------------
1 file changed, 43 insertions(+), 43 deletions(-)
diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim
index dfa8a76..4978d2d 100755
--- a/.config/nvim/init.vim
+++ b/.config/nvim/init.vim
@@ -1,100 +1,100 @@
"{{{ Plugs
call plug#begin('~/.local/share/nvim/plugged')
-"completion
+" completion
Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' }
Plug 'lionawurscht/deoplete-biblatex'
Plug 'deoplete-plugins/deoplete-jedi'
" ledger
Plug 'ledger/vim-ledger'
-"language packs
+" language packs
Plug 'sheerun/vim-polyglot'
-"syntax checking
+" syntax checking
Plug 'dense-analysis/ale'
-"manages tag files
+" manages tag files
Plug 'ludovicchabant/vim-gutentags'
-"run your tests
-Plug 'janko/vim-test'
-" latex
-Plug 'lervag/vimtex'
+" run your tests
+" Plug 'janko/vim-test' " TODO benched for now but should be useful later
-"snippet solution
+" snippets to expand
Plug 'SirVer/ultisnips' | Plug 'honza/vim-snippets'
-"autopair plugin
+" autopair plugin
Plug 'tmsvg/pear-tree'
-"colored brackets
-Plug 'luochen1990/rainbow'
" Plugin outside ~/.vim/plugged with post-update hook
Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' }
Plug 'junegunn/fzf.vim'
-"tree explorer
-Plug 'scrooloose/nerdtree'
-"displays tags ordered by scope
+" tree explorer
+" Plug 'scrooloose/nerdtree' TODO benched for now, use netrw
+" displays tags ordered by scope
Plug 'majutsushi/tagbar'
-"status/tabline
+" status/tabline
Plug 'bling/vim-airline'
+" floating terminal
+Plug 'voldikss/vim-floaterm'
-" " color theme
+" color theme of $CURRENT_YEAR
Plug 'joshdick/onedark.vim'
-"Personal wiki
+" Personal wiki
Plug 'vimwiki/vimwiki'
-"distraction-free writing
+" centers the writing
Plug 'junegunn/goyo.vim'
+" highlights the current parapraph
Plug 'junegunn/limelight.vim'
+" latex
+Plug 'lervag/vimtex'
-"text alignment
+" text alignment
Plug 'godlygeek/tabular'
-"color code highlight
-Plug 'chrisbra/Colorizer'
-"move selections up and down
+" color code highlight
+" Plug 'chrisbra/Colorizer' " TODO benched for now, can't remember the last
+" time this was useful
+" move selections up and down
Plug 'matze/vim-move'
-" search/select/edit sandwiched textobjects (vim-surround)
+" search/select/edit sandwiched textobjects
Plug 'machakann/vim-sandwich'
" provide additional text objects
Plug 'wellle/targets.vim'
" indentation level text object
Plug 'michaeljsmith/vim-indent-object'
-" undo history visualizer
-Plug 'mbbill/undotree'
-"reopen files at your last edit position
+" reopen files at your last edit position
Plug 'farmergreg/vim-lastplace'
-"toggle, display and navigate marks
-Plug 'kshenoy/vim-signature'
-"git diff in the sign column
+" toggle, display and navigate marks
+" Plug 'kshenoy/vim-signature' TODO benched for now, never used
+" git diff in the sign column
Plug 'airblade/vim-gitgutter'
-"jump to location by 2 characters
+" jump to location by 2 characters
Plug 'justinmk/vim-sneak'
-"splits delete into cut and delete
+" splits delete into cut and delete
Plug 'svermeulen/vim-cutlass'
-"change text with yank
+" change text with yank
Plug 'svermeulen/vim-subversive'
-"yank history
+" yank history
Plug 'svermeulen/vim-yoink'
-"enable repeating supported plugin maps with '.'
+" enable repeating supported plugin maps with '.'
Plug 'tpope/vim-repeat'
-"pairs of handy bracket mappings
+" pairs of handy bracket mappings
Plug 'tpope/vim-unimpaired'
-"git wrapper
+" git wrapper
Plug 'tpope/vim-fugitive'
-"increment dates, times & more
+" increment dates, times & more
Plug 'tpope/vim-speeddating'
-"search, substitute and abbreviate
+" search, substitute and abbreviate
Plug 'tpope/vim-abolish'
-"provides ga, show unicode stuff of char under cursor
+" provides ga, show unicode stuff of char under cursor
Plug 'tpope/vim-characterize'
-"comment helper
+" comment helper
Plug 'tpope/vim-commentary'
-"asynchronous build and test dispatcher
+" asynchronous build and test dispatcher
Plug 'tpope/vim-dispatch'
-"fancy start screen
+" fancy start screen
Plug 'mhinz/vim-startify'
Plug 'ryanoasis/vim-devicons' " asks to be placed last, sure
--
cgit v1.2.3-70-g09d2
From 22f4404592585368ad250cdbead655c498c10509 Mon Sep 17 00:00:00 2001
From: Yigit Sever
Date: Mon, 30 Dec 2019 15:31:57 +0300
Subject: Track new spliff
---
bin/spliff | 6 ++++++
1 file changed, 6 insertions(+)
create mode 100755 bin/spliff
diff --git a/bin/spliff b/bin/spliff
new file mode 100755
index 0000000..3767bac
--- /dev/null
+++ b/bin/spliff
@@ -0,0 +1,6 @@
+#!/usr/bin/env zsh
+
+PDF=$1
+OUTPUT="${PDF:r}_spliff.pdf"
+N=`qpdf --show-npages $1`
+qpdf --collate --empty --pages $1 1-$(((N+1)/2)) $1 $(((N+1)/2 + 1))-$N -- $OUTPUT
--
cgit v1.2.3-70-g09d2
From 29e0f13632f2f0af0fcdcbab48e502bdeeb91cde Mon Sep 17 00:00:00 2001
From: Yigit Sever
Date: Mon, 30 Dec 2019 15:35:50 +0300
Subject: Add safety flag
---
bin/watch_incoming.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/bin/watch_incoming.sh b/bin/watch_incoming.sh
index b031461..eed1da0 100755
--- a/bin/watch_incoming.sh
+++ b/bin/watch_incoming.sh
@@ -5,7 +5,7 @@ PROCESSED=$HOME/Downloads/toPrint/toPrint_ready
SPLIFF=$HOME/bin/spliff
inotifywait -m -e create -e moved_to --format "%f" "${TARGET}" \
- | while read FILENAME
+ | while read -r FILENAME
do
THUMB=$(mktemp /tmp/pdf_thumbnail_XXXXXXXXX.png)
evince-thumbnailer -s 1024 -l "${TARGET}/${FILENAME}" "${THUMB}"
--
cgit v1.2.3-70-g09d2
From b7382c651d7246c1e0f17c42434ee30dd72ec017 Mon Sep 17 00:00:00 2001
From: Yigit Sever
Date: Mon, 30 Dec 2019 22:07:58 +0300
Subject: new nvim plugin
---
.config/nvim/init.vim | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim
index 4978d2d..9d52e0c 100755
--- a/.config/nvim/init.vim
+++ b/.config/nvim/init.vim
@@ -16,6 +16,8 @@ Plug 'dense-analysis/ale'
Plug 'ludovicchabant/vim-gutentags'
" run your tests
" Plug 'janko/vim-test' " TODO benched for now but should be useful later
+" open a floating terminal
+Plug 'voldikss/vim-floaterm'
" snippets to expand
Plug 'SirVer/ultisnips' | Plug 'honza/vim-snippets'
@@ -190,7 +192,8 @@ colorscheme onedark
" Open the TagBar Plugin
nnoremap :TagbarToggle
" Open NERDTree
-nnoremap :NERDTreeToggle
+" nnoremap :NERDTreeToggle
+let g:floaterm_keymap_toggle = ''
" Fix whole buffer via ALE
nmap (ale_fix)
--
cgit v1.2.3-70-g09d2