Compare commits
5 Commits
1e0da1267f
...
20c3536ae5
| Author | SHA1 | Date | |
|---|---|---|---|
| 20c3536ae5 | |||
| da78b850b3 | |||
| 09c0acf2a7 | |||
| 4bce143d3e | |||
| 9afcc87711 |
@@ -55,7 +55,7 @@ conflict_resolution = "a wins"
|
|||||||
type = "google_calendar"
|
type = "google_calendar"
|
||||||
token_file = "~/.local/share/calendars/google/credentials.txt"
|
token_file = "~/.local/share/calendars/google/credentials.txt"
|
||||||
client_id = "188415318767-802h28ig8gromo0f72blrbg6cgcop6m8.apps.googleusercontent.com"
|
client_id = "188415318767-802h28ig8gromo0f72blrbg6cgcop6m8.apps.googleusercontent.com"
|
||||||
client_secret = <<get-password(passname="google_calendar_client_secret")>>
|
client_secret = "<<get-password(passname='google_calendar_client_secret')>>"
|
||||||
|
|
||||||
[storage google_calendar_local]
|
[storage google_calendar_local]
|
||||||
type = "filesystem"
|
type = "filesystem"
|
||||||
|
|||||||
@@ -72,6 +72,7 @@ workspace_layout default
|
|||||||
* Focus Configuration
|
* Focus Configuration
|
||||||
#+begin_src conf
|
#+begin_src conf
|
||||||
focus_follows_mouse no
|
focus_follows_mouse no
|
||||||
|
focus_on_window_activation none
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
* Settings for i3-gaps
|
* Settings for i3-gaps
|
||||||
@@ -210,10 +211,10 @@ bindsym $mod+y sticky toggle
|
|||||||
** focus/swap
|
** focus/swap
|
||||||
#+begin_src conf
|
#+begin_src conf
|
||||||
# Focus/swap the node in the given direction
|
# Focus/swap the node in the given direction
|
||||||
bindsym $mod+h focus left
|
bindsym $mod+h exec --no-startup-id i3-msg focus left && i3-focus-sync
|
||||||
bindsym $mod+j focus down
|
bindsym $mod+j exec --no-startup-id i3-msg focus down && i3-focus-sync
|
||||||
bindsym $mod+k focus up
|
bindsym $mod+k exec --no-startup-id i3-msg focus up && i3-focus-sync
|
||||||
bindsym $mod+l focus right
|
bindsym $mod+l exec --no-startup-id i3-msg focus right && i3-focus-sync
|
||||||
|
|
||||||
bindsym $mod+Shift+h move left
|
bindsym $mod+Shift+h move left
|
||||||
bindsym $mod+Shift+j move down
|
bindsym $mod+Shift+j move down
|
||||||
@@ -227,7 +228,7 @@ bindsym $mod+p workspace prev
|
|||||||
bindsym $mod+n workspace next
|
bindsym $mod+n workspace next
|
||||||
|
|
||||||
# Focus the last Desktop
|
# Focus the last Desktop
|
||||||
bindsym $mod+b workspace back_and_forth
|
bindsym $mod+b exec --no-startup-id i3-msg workspace back_and_forth && i3-focus-sync
|
||||||
|
|
||||||
# Focus to the given desktop
|
# Focus to the given desktop
|
||||||
bindsym $mod+1 workspace 1
|
bindsym $mod+1 workspace 1
|
||||||
@@ -286,6 +287,29 @@ bindsym $mod+$alt+k resize shrink height 10 px or 10 ppt
|
|||||||
bindsym $mod+$alt+l resize grow width 10 px or 10 ppt
|
bindsym $mod+$alt+l resize grow width 10 px or 10 ppt
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
|
* Fix focus for =WM_TAKE_FOCUS= applications
|
||||||
|
Some applications (e.g. OnlyOffice, Electron apps) use the =WM_TAKE_FOCUS= protocol and
|
||||||
|
fail to release X11 keyboard focus when i3 moves focus elsewhere.
|
||||||
|
This keybinding forces X11 focus to the window i3 currently considers focused.
|
||||||
|
|
||||||
|
#+begin_src bash :tangle ~/.local/bin/i3-focus-sync :comments none :mkdirp yes :shebang "#!/usr/bin/env bash" :tangle-mode (identity #o755)
|
||||||
|
win=$(i3-msg -t get_tree | python3 -c "
|
||||||
|
import json, sys
|
||||||
|
def find_focused(node):
|
||||||
|
if node.get('focused') and node.get('window'):
|
||||||
|
return node['window']
|
||||||
|
for child in node.get('nodes', []) + node.get('floating_nodes', []):
|
||||||
|
r = find_focused(child)
|
||||||
|
if r is not None:
|
||||||
|
return r
|
||||||
|
return None
|
||||||
|
w = find_focused(json.load(sys.stdin))
|
||||||
|
if w is not None: print(w)
|
||||||
|
" 2>/dev/null)
|
||||||
|
[ -n "$win" ] && xdotool windowfocus --sync "$win" 2>/dev/null
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
|
||||||
* Run Polybar and SXHKD
|
* Run Polybar and SXHKD
|
||||||
#+begin_src conf
|
#+begin_src conf
|
||||||
# exec --no-startup-id sxhkd -m 1 -c ~/.config/sxhkd/sxhkdrc.i3
|
# exec --no-startup-id sxhkd -m 1 -c ~/.config/sxhkd/sxhkdrc.i3
|
||||||
|
|||||||
@@ -6,6 +6,40 @@ Installation:
|
|||||||
paru -S mbsync msmtp neomutt lynx urlview
|
paru -S mbsync msmtp neomutt lynx urlview
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
|
* Claude Code — Email Assistant
|
||||||
|
#+begin_src markdown :tangle ~/.config/neomutt/CLAUDE.md :comments none :mkdirp yes
|
||||||
|
# Email Refinement Assistant
|
||||||
|
|
||||||
|
You are helping refine professional emails composed in Neomutt.
|
||||||
|
The file you receive is a raw email in RFC 2822 format: a header block
|
||||||
|
(lines like `From:`, `To:`, `Subject:`, `Cc:`) followed by a blank line,
|
||||||
|
then the body text.
|
||||||
|
|
||||||
|
## Your task
|
||||||
|
|
||||||
|
When asked to "refine" (or similar), edit the file directly so that a diff
|
||||||
|
can be reviewed. Apply all of the following:
|
||||||
|
|
||||||
|
- **Subject**: if it starts with `Re:`, this is a reply — do not change it; otherwise make it specific, informative and professional (avoid vague subjects like "Question" or "Update")
|
||||||
|
- **Grammar & spelling**: fix all errors
|
||||||
|
- **Clarity**: remove ambiguity; one idea per sentence
|
||||||
|
- **Conciseness**: cut filler words, redundant phrases and unnecessary
|
||||||
|
preamble; get to the point quickly
|
||||||
|
- **Tone**: professional but natural; avoid overly formal or stiff language
|
||||||
|
- **Structure**: ensure a proper greeting, clear body paragraphs and a
|
||||||
|
polite closing
|
||||||
|
- **Signature**: do not modify anything from the `-- ` line onwards (dash dash space — the trailing space is required by RFC 3676 and must not be removed)
|
||||||
|
- **Line breaks**: write one sentence per line in the body
|
||||||
|
|
||||||
|
## Constraints
|
||||||
|
|
||||||
|
- Preserve the header block exactly (do not reorder or remove headers),
|
||||||
|
only edit the `Subject:` value, and of course the main code text
|
||||||
|
- **Single edit**: you MUST apply every change (subject, grammar, tone, structure) in one single call to the file edit tool — do not make multiple sequential edits
|
||||||
|
- Do not invent facts or add content that was not implied by the original
|
||||||
|
- Preserve the author's intent and voice
|
||||||
|
#+end_src
|
||||||
|
|
||||||
* =mbsync= - Synchronize Mailboxes
|
* =mbsync= - Synchronize Mailboxes
|
||||||
:PROPERTIES:
|
:PROPERTIES:
|
||||||
:header-args:conf: :tangle ~/.config/isync/mbsyncrc
|
:header-args:conf: :tangle ~/.config/isync/mbsyncrc
|
||||||
@@ -1685,3 +1719,4 @@ application/msword; onlyoffice-desktopeditors '%s'; copiousoutput
|
|||||||
application/wordperfect; onlyoffice-desktopeditors '%s'; copiousoutput
|
application/wordperfect; onlyoffice-desktopeditors '%s'; copiousoutput
|
||||||
text/rtf; onlyoffice-desktopeditors '%s'; copiousoutput
|
text/rtf; onlyoffice-desktopeditors '%s'; copiousoutput
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
|
|||||||
@@ -204,102 +204,3 @@ super + space ; p
|
|||||||
super + space ; t
|
super + space ; t
|
||||||
$TERMINAL -e tmux new-session -A -s stig stig
|
$TERMINAL -e tmux new-session -A -s stig stig
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
* I3 related
|
|
||||||
:PROPERTIES:
|
|
||||||
:header-args:conf+: :tangle ~/.config/sxhkd/sxhkdrc.i3
|
|
||||||
:END:
|
|
||||||
|
|
||||||
** Kill Window
|
|
||||||
#+begin_src conf
|
|
||||||
# close and kill
|
|
||||||
super + q
|
|
||||||
i3-msg kill
|
|
||||||
#+end_src
|
|
||||||
|
|
||||||
** Set the window State
|
|
||||||
#+begin_src conf
|
|
||||||
# Set the window to full-screen
|
|
||||||
super + f
|
|
||||||
i3-msg fullscreen toggle
|
|
||||||
|
|
||||||
# Set the window to floating
|
|
||||||
super + s
|
|
||||||
i3-msg floating toggle
|
|
||||||
|
|
||||||
# Alternate between the tiled and normal layout
|
|
||||||
super + t
|
|
||||||
i3-msg layout toggle tabbed split
|
|
||||||
|
|
||||||
# Change focus between tiling / floating windows
|
|
||||||
super + c
|
|
||||||
i3-msg focus mode_toggle
|
|
||||||
|
|
||||||
# Sticky window
|
|
||||||
super + y
|
|
||||||
i3-msg sticky toggle
|
|
||||||
#+end_src
|
|
||||||
|
|
||||||
** focus/swap
|
|
||||||
#+begin_src conf
|
|
||||||
# Focus/swap the node in the given direction
|
|
||||||
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
|
|
||||||
# Focus the next/previous desktop in the current monitor
|
|
||||||
super + {p,n}
|
|
||||||
i3-msg workspace {prev,next}
|
|
||||||
|
|
||||||
# Focus the last Desktop
|
|
||||||
super + b
|
|
||||||
i3-msg workspace back_and_forth
|
|
||||||
|
|
||||||
# Focus to the given desktop
|
|
||||||
super + {1-9}
|
|
||||||
i3-msg workspace '{1-9}'
|
|
||||||
|
|
||||||
# Send to the given desktop
|
|
||||||
super + ctrl + {1-9}
|
|
||||||
i3-msg move container to workspace '{1-9}'
|
|
||||||
|
|
||||||
# Focus and Send to the given desktop
|
|
||||||
super + shift + {1-9}
|
|
||||||
WP={1-9} && i3-msg move container to workspace $WP && i3-msg workspace $WP
|
|
||||||
#+end_src
|
|
||||||
|
|
||||||
** Preselect
|
|
||||||
Preselect the direction
|
|
||||||
#+begin_src conf
|
|
||||||
# Set Horizontal Layout
|
|
||||||
super + ctrl + {h,l,Left,Right}
|
|
||||||
i3-msg split h
|
|
||||||
|
|
||||||
# Set Vertical Layout
|
|
||||||
super + ctrl + {j,k,Up,Down}
|
|
||||||
i3-msg split v
|
|
||||||
#+end_src
|
|
||||||
|
|
||||||
** Resize
|
|
||||||
Expand/Shrink a window
|
|
||||||
#+begin_src conf
|
|
||||||
# Horizontal Shrink
|
|
||||||
super + alt + h
|
|
||||||
i3-msg resize shrink width 10 px or 10 ppt
|
|
||||||
# Vertical Grow
|
|
||||||
super + alt + j
|
|
||||||
i3-msg resize grow height 10 px or 10 ppt
|
|
||||||
# Vertical Shrink
|
|
||||||
super + alt + k
|
|
||||||
i3-msg resize shrink height 10 px or 10 ppt
|
|
||||||
# Horizontal Grow
|
|
||||||
super + alt + l
|
|
||||||
i3-msg resize grow width 10 px or 10 ppt
|
|
||||||
#+end_src
|
|
||||||
|
|||||||
@@ -131,6 +131,12 @@ Plug 'nvim-telescope/telescope-ui-select.nvim'
|
|||||||
Plug 'folke/which-key.nvim'
|
Plug 'folke/which-key.nvim'
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
|
** Claude Code
|
||||||
|
#+begin_src vimrc
|
||||||
|
Plug 'folke/snacks.nvim'
|
||||||
|
Plug 'coder/claudecode.nvim'
|
||||||
|
#+end_src
|
||||||
|
|
||||||
** Plug End
|
** Plug End
|
||||||
#+begin_src vimrc
|
#+begin_src vimrc
|
||||||
call plug#end()
|
call plug#end()
|
||||||
@@ -526,6 +532,13 @@ snoremap <C-K> <Esc>b[sviw<C-G>
|
|||||||
#+begin_src vimrc
|
#+begin_src vimrc
|
||||||
autocmd FileType mail set spell spelllang=en_us,fr
|
autocmd FileType mail set spell spelllang=en_us,fr
|
||||||
autocmd FileType mail set textwidth=0
|
autocmd FileType mail set textwidth=0
|
||||||
|
autocmd FileType mail lcd %:p:h
|
||||||
|
|
||||||
|
" Start Claude: save, open Claude, add current buffer, then ask to refine
|
||||||
|
autocmd FileType mail nnoremap <buffer> <leader>ae <cmd>lua ClaudeMailRefine()<cr>
|
||||||
|
|
||||||
|
" Finish: accept diff, close Claude pane, save and quit
|
||||||
|
autocmd FileType mail nnoremap <buffer> <leader>aq <cmd>ClaudeCodeDiffAccept<cr><cmd>ClaudeCode<cr>
|
||||||
|
|
||||||
function! Mailcomplete(findstart, base)
|
function! Mailcomplete(findstart, base)
|
||||||
if a:findstart == 1
|
if a:findstart == 1
|
||||||
@@ -788,6 +801,55 @@ lua << EOF
|
|||||||
EOF
|
EOF
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
|
** Diff wrap
|
||||||
|
#+begin_src vimrc
|
||||||
|
autocmd OptionSet diff if v:option_new | setlocal wrap linebreak | endif
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
** =claudecode=
|
||||||
|
#+begin_src vimrc
|
||||||
|
lua << EOF
|
||||||
|
require('claudecode').setup({
|
||||||
|
split_side = "right",
|
||||||
|
split_width_percentage = 0.35,
|
||||||
|
})
|
||||||
|
|
||||||
|
function ClaudeMailRefine()
|
||||||
|
local win = vim.api.nvim_get_current_win()
|
||||||
|
vim.cmd('w')
|
||||||
|
vim.cmd('ClaudeCode')
|
||||||
|
vim.defer_fn(function()
|
||||||
|
if vim.api.nvim_win_is_valid(win) then
|
||||||
|
vim.api.nvim_set_current_win(win)
|
||||||
|
end
|
||||||
|
vim.cmd('ClaudeCodeAdd %')
|
||||||
|
vim.defer_fn(function()
|
||||||
|
for _, buf in ipairs(vim.api.nvim_list_bufs()) do
|
||||||
|
local name = vim.api.nvim_buf_get_name(buf)
|
||||||
|
if name:match('claude') then
|
||||||
|
local job_id = vim.b[buf].terminal_job_id
|
||||||
|
if job_id then
|
||||||
|
vim.api.nvim_chan_send(job_id, "Refine this email using a single file edit tool call: fix the subject, grammar, clarity and tone all at once. Do not make multiple edits.\r")
|
||||||
|
break
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end, 500)
|
||||||
|
end, 1000)
|
||||||
|
end
|
||||||
|
EOF
|
||||||
|
|
||||||
|
nnoremap <leader>ac <cmd>ClaudeCode<cr>
|
||||||
|
nnoremap <leader>af <cmd>ClaudeCodeFocus<cr>
|
||||||
|
nnoremap <leader>ar <cmd>ClaudeCode --resume<cr>
|
||||||
|
nnoremap <leader>aC <cmd>ClaudeCode --continue<cr>
|
||||||
|
nnoremap <leader>am <cmd>ClaudeCodeSelectModel<cr>
|
||||||
|
nnoremap <leader>ab <cmd>ClaudeCodeAdd %<cr>
|
||||||
|
vnoremap <leader>as <cmd>ClaudeCodeSend<cr>
|
||||||
|
nnoremap <leader>aa <cmd>ClaudeCodeDiffAccept<cr>
|
||||||
|
nnoremap <leader>ad <cmd>ClaudeCodeDiffDeny<cr>
|
||||||
|
#+end_src
|
||||||
|
|
||||||
* Key Bindings
|
* Key Bindings
|
||||||
** Quit
|
** Quit
|
||||||
#+begin_src vimrc
|
#+begin_src vimrc
|
||||||
|
|||||||
Reference in New Issue
Block a user