From 0e5321ae8ea5ce3615d6b65e65f433dfadc66cf0 Mon Sep 17 00:00:00 2001 From: "kujiu (@uberwald)" Date: Sun, 10 Sep 2023 18:26:09 +0200 Subject: [PATCH] Add tmuxinator, description of functions, konsole profile --- .../.config/fish/functions/android-cast.fish | 2 +- common/.config/fish/functions/diff.fish | 2 +- .../.config/fish/functions/fish_greeting.fish | 2 +- common/.config/fish/functions/gitci.fish | 2 +- common/.config/fish/functions/gitcia.fish | 2 +- common/.config/fish/functions/gitco.fish | 2 +- common/.config/fish/functions/gitdiff.fish | 2 +- common/.config/fish/functions/gitgrep.fish | 2 +- .../fish/functions/gitgrephistory.fish | 2 +- common/.config/fish/functions/gitlog.fish | 2 +- common/.config/fish/functions/gitlstags.fish | 2 +- common/.config/fish/functions/gitpr.fish | 2 +- common/.config/fish/functions/gitprp.fish | 2 +- common/.config/fish/functions/gitprst.fish | 2 +- common/.config/fish/functions/gitprstp.fish | 2 +- common/.config/fish/functions/gitpull.fish | 2 +- common/.config/fish/functions/gitst.fish | 2 +- common/.config/fish/functions/gittag.fish | 2 +- common/.config/fish/functions/gittree.fish | 2 +- common/.config/fish/functions/gitw.fish | 2 +- common/.config/fish/functions/grep.fish | 2 +- common/.config/fish/functions/l.fish | 2 +- common/.config/fish/functions/less.fish | 2 +- common/.config/fish/functions/lg.fish | 2 +- common/.config/fish/functions/ll.fish | 2 +- common/.config/fish/functions/ls.fish | 2 +- common/.config/fish/functions/lzd.fish | 2 +- common/.config/fish/functions/make.fish | 2 +- common/.config/fish/functions/more.fish | 2 +- common/.config/fish/functions/mpc.fish | 2 +- common/.config/fish/functions/nvim.fish | 6 -- .../fish/functions/pip-upgrade-venv.fish | 2 +- .../.config/fish/functions/pip-upgrade.fish | 2 +- common/.config/fish/functions/txor.fish | 6 ++ .../.config/fish/functions/update-homes.fish | 1 + common/.config/fish/functions/vim.fish | 2 +- common/.config/fish/functions/vimdiff.fish | 2 +- common/.config/nvimpager/init.lua | 67 +++++++++++++++++++ desktop/.config/tmuxinator/chat.yml | 11 +++ .../.local/share/konsole/Profile 1.profile | 21 ++++++ tmuxinator.fish | 24 +++++++ 41 files changed, 164 insertions(+), 40 deletions(-) delete mode 100755 common/.config/fish/functions/nvim.fish create mode 100755 common/.config/fish/functions/txor.fish create mode 100644 common/.config/nvimpager/init.lua create mode 100644 desktop/.config/tmuxinator/chat.yml create mode 100644 desktop/.local/share/konsole/Profile 1.profile create mode 100644 tmuxinator.fish diff --git a/common/.config/fish/functions/android-cast.fish b/common/.config/fish/functions/android-cast.fish index 1b7ab29..3657d2c 100755 --- a/common/.config/fish/functions/android-cast.fish +++ b/common/.config/fish/functions/android-cast.fish @@ -1,6 +1,6 @@ #!/usr/bin/env fish # -function android-cast +function android-cast -d "Cast Android screen" adb shell "while true; do screenrecord --output-format=h264 -; done" | ffplay -framerate 60 -probesize 32 -sync video - end diff --git a/common/.config/fish/functions/diff.fish b/common/.config/fish/functions/diff.fish index 0003ae7..f683621 100755 --- a/common/.config/fish/functions/diff.fish +++ b/common/.config/fish/functions/diff.fish @@ -1,6 +1,6 @@ #!/usr/bin/env fish # -function diff +function diff -d "Diff tool" colordiff $argv end diff --git a/common/.config/fish/functions/fish_greeting.fish b/common/.config/fish/functions/fish_greeting.fish index 82215f3..4de97df 100755 --- a/common/.config/fish/functions/fish_greeting.fish +++ b/common/.config/fish/functions/fish_greeting.fish @@ -1,6 +1,6 @@ #!/usr/bin/env fish # -function fish_greeting +function fish_greeting -d "Greetings" json-fortune end diff --git a/common/.config/fish/functions/gitci.fish b/common/.config/fish/functions/gitci.fish index 420005a..4362ad9 100755 --- a/common/.config/fish/functions/gitci.fish +++ b/common/.config/fish/functions/gitci.fish @@ -1,6 +1,6 @@ #!/usr/bin/env fish # -function gitci +function gitci -d "git commit" git commit -S $argv end diff --git a/common/.config/fish/functions/gitcia.fish b/common/.config/fish/functions/gitcia.fish index 2f0693f..79be040 100755 --- a/common/.config/fish/functions/gitcia.fish +++ b/common/.config/fish/functions/gitcia.fish @@ -1,6 +1,6 @@ #!/usr/bin/env fish # -function gitcia +function gitcia -d "git commit all added/removed files" git commit -Sa $argv end diff --git a/common/.config/fish/functions/gitco.fish b/common/.config/fish/functions/gitco.fish index fa13155..0f3757c 100755 --- a/common/.config/fish/functions/gitco.fish +++ b/common/.config/fish/functions/gitco.fish @@ -1,6 +1,6 @@ #!/usr/bin/env fish # -function gitco +function gitco -d "git checkout" git checkout $argv end diff --git a/common/.config/fish/functions/gitdiff.fish b/common/.config/fish/functions/gitdiff.fish index 878068e..682dd78 100755 --- a/common/.config/fish/functions/gitdiff.fish +++ b/common/.config/fish/functions/gitdiff.fish @@ -1,6 +1,6 @@ #!/usr/bin/env fish # -function gitdiff +function gitdiff -d "git diff" git diff $argv end diff --git a/common/.config/fish/functions/gitgrep.fish b/common/.config/fish/functions/gitgrep.fish index fd3aca1..0b59514 100755 --- a/common/.config/fish/functions/gitgrep.fish +++ b/common/.config/fish/functions/gitgrep.fish @@ -1,6 +1,6 @@ #!/usr/bin/env fish # -function gitgrep +function gitgrep -d "git grep" git grep $argv end diff --git a/common/.config/fish/functions/gitgrephistory.fish b/common/.config/fish/functions/gitgrephistory.fish index 1dbf381..d46c512 100755 --- a/common/.config/fish/functions/gitgrephistory.fish +++ b/common/.config/fish/functions/gitgrephistory.fish @@ -1,6 +1,6 @@ #!/usr/bin/env fish -function gitgrephistory +function gitgrephistory -d "git grep in history" if test (count $argv) -eq 1 git rev-list --all | xargs git grep $argv[1] else diff --git a/common/.config/fish/functions/gitlog.fish b/common/.config/fish/functions/gitlog.fish index c650281..f8da81d 100755 --- a/common/.config/fish/functions/gitlog.fish +++ b/common/.config/fish/functions/gitlog.fish @@ -1,6 +1,6 @@ #!/usr/bin/env fish # -function gitlog +function gitlog -d "git log" git log --name-status $argv end diff --git a/common/.config/fish/functions/gitlstags.fish b/common/.config/fish/functions/gitlstags.fish index db0a8c7..b3b27d4 100755 --- a/common/.config/fish/functions/gitlstags.fish +++ b/common/.config/fish/functions/gitlstags.fish @@ -1,6 +1,6 @@ #!/usr/bin/env fish # -function gitlstags +function gitlstags -d "git list tags" git describe --tags $argv end diff --git a/common/.config/fish/functions/gitpr.fish b/common/.config/fish/functions/gitpr.fish index da09dd3..89ee960 100755 --- a/common/.config/fish/functions/gitpr.fish +++ b/common/.config/fish/functions/gitpr.fish @@ -1,7 +1,7 @@ #!/usr/bin/env fish # -function gitpr +function gitpr -d "git pull rebase and update modules" git pull --stat --progress --rebase git submodule update end diff --git a/common/.config/fish/functions/gitprp.fish b/common/.config/fish/functions/gitprp.fish index 8347c57..a101815 100755 --- a/common/.config/fish/functions/gitprp.fish +++ b/common/.config/fish/functions/gitprp.fish @@ -1,7 +1,7 @@ #!/usr/bin/env fish # -function gitprp +function gitprp -d "git pull, rebase, update modules and push" git pull --stat --progress --rebase git submodule update git push diff --git a/common/.config/fish/functions/gitprst.fish b/common/.config/fish/functions/gitprst.fish index 72e720b..55939b7 100755 --- a/common/.config/fish/functions/gitprst.fish +++ b/common/.config/fish/functions/gitprst.fish @@ -1,7 +1,7 @@ #!/usr/bin/env fish # -function gitprst +function gitprst -d "git stash, pull, rebase, update modules and apply stash" git stash git pull --stat --progress --rebase git submodule update diff --git a/common/.config/fish/functions/gitprstp.fish b/common/.config/fish/functions/gitprstp.fish index c810ecd..a85f981 100755 --- a/common/.config/fish/functions/gitprstp.fish +++ b/common/.config/fish/functions/gitprstp.fish @@ -1,7 +1,7 @@ #!/usr/bin/env fish # -function gitprstp +function gitprstp -d "git stash, pull, rebase, update modules, apply stash and push" git stash git pull --stat --progress --rebase git submodule update diff --git a/common/.config/fish/functions/gitpull.fish b/common/.config/fish/functions/gitpull.fish index a90f4c7..6f99d63 100755 --- a/common/.config/fish/functions/gitpull.fish +++ b/common/.config/fish/functions/gitpull.fish @@ -1,7 +1,7 @@ #!/usr/bin/env fish # -function gitpull +function gitpull -d "git pull and update submodules" git pull --stat --progress git submodule update end diff --git a/common/.config/fish/functions/gitst.fish b/common/.config/fish/functions/gitst.fish index 8125914..24a064c 100755 --- a/common/.config/fish/functions/gitst.fish +++ b/common/.config/fish/functions/gitst.fish @@ -1,6 +1,6 @@ #!/usr/bin/env fish # -function gitst +function gitst -d "git status" git status $argv | nvimpager end diff --git a/common/.config/fish/functions/gittag.fish b/common/.config/fish/functions/gittag.fish index af970bc..849dcee 100755 --- a/common/.config/fish/functions/gittag.fish +++ b/common/.config/fish/functions/gittag.fish @@ -1,6 +1,6 @@ #!/usr/bin/env fish # -function gittag +function gittag -d "git tag" git tag -a $argv end diff --git a/common/.config/fish/functions/gittree.fish b/common/.config/fish/functions/gittree.fish index debbe3f..1f228ac 100755 --- a/common/.config/fish/functions/gittree.fish +++ b/common/.config/fish/functions/gittree.fish @@ -1,6 +1,6 @@ #!/usr/bin/env fish # -function gittree +function gittree -d "git show tree" git log --graph $argv end diff --git a/common/.config/fish/functions/gitw.fish b/common/.config/fish/functions/gitw.fish index 6b28360..5221347 100755 --- a/common/.config/fish/functions/gitw.fish +++ b/common/.config/fish/functions/gitw.fish @@ -1,6 +1,6 @@ #!/usr/bin/env fish # -function gitw +function gitw -d "git web" git instaweb --httpd=webrick $argv end diff --git a/common/.config/fish/functions/grep.fish b/common/.config/fish/functions/grep.fish index d581b78..8221276 100755 --- a/common/.config/fish/functions/grep.fish +++ b/common/.config/fish/functions/grep.fish @@ -1,6 +1,6 @@ #!/usr/bin/env fish # -function grep +function grep -d "grep with color" command grep --color $argv end diff --git a/common/.config/fish/functions/l.fish b/common/.config/fish/functions/l.fish index 9967528..8cb5f1e 100755 --- a/common/.config/fish/functions/l.fish +++ b/common/.config/fish/functions/l.fish @@ -1,6 +1,6 @@ #!/usr/bin/env fish # -function l +function l -d "list files and show hidden" ls --color -pa $argv end diff --git a/common/.config/fish/functions/less.fish b/common/.config/fish/functions/less.fish index 343e7c5..c6312e5 100755 --- a/common/.config/fish/functions/less.fish +++ b/common/.config/fish/functions/less.fish @@ -1,6 +1,6 @@ #!/usr/bin/env fish # -function less +function less -d "pager" nvimpager $argv end diff --git a/common/.config/fish/functions/lg.fish b/common/.config/fish/functions/lg.fish index aea7b82..b110b3c 100755 --- a/common/.config/fish/functions/lg.fish +++ b/common/.config/fish/functions/lg.fish @@ -1,6 +1,6 @@ #!/usr/bin/env fish # -function lg +function lg -d "lazygit" lazygit $argv end diff --git a/common/.config/fish/functions/ll.fish b/common/.config/fish/functions/ll.fish index e13ed48..5740d65 100755 --- a/common/.config/fish/functions/ll.fish +++ b/common/.config/fish/functions/ll.fish @@ -1,6 +1,6 @@ #!/usr/bin/env fish # -function ll +function ll -d "list files" ls --color -pla $argv end diff --git a/common/.config/fish/functions/ls.fish b/common/.config/fish/functions/ls.fish index 5765ccf..3678fb9 100755 --- a/common/.config/fish/functions/ls.fish +++ b/common/.config/fish/functions/ls.fish @@ -1,6 +1,6 @@ #!/usr/bin/env fish # -function ls +function ls -d "list files" command ls --color -p $argv end diff --git a/common/.config/fish/functions/lzd.fish b/common/.config/fish/functions/lzd.fish index 349087e..ea1cf07 100755 --- a/common/.config/fish/functions/lzd.fish +++ b/common/.config/fish/functions/lzd.fish @@ -1,6 +1,6 @@ #!/usr/bin/env fish # -function lzd +function lzd -d "lazydocker" lazydocker $argv end diff --git a/common/.config/fish/functions/make.fish b/common/.config/fish/functions/make.fish index 5f2c5bf..6f7d70a 100755 --- a/common/.config/fish/functions/make.fish +++ b/common/.config/fish/functions/make.fish @@ -1,6 +1,6 @@ #!/usr/bin/env fish # -function make +function make -d "make tool" colormake $argv end diff --git a/common/.config/fish/functions/more.fish b/common/.config/fish/functions/more.fish index 1edbf59..f5ecf24 100755 --- a/common/.config/fish/functions/more.fish +++ b/common/.config/fish/functions/more.fish @@ -1,6 +1,6 @@ #!/usr/bin/env fish # -function more +function more -d "pager" nvimpager $argv end diff --git a/common/.config/fish/functions/mpc.fish b/common/.config/fish/functions/mpc.fish index 5b40a52..7c7ccfb 100755 --- a/common/.config/fish/functions/mpc.fish +++ b/common/.config/fish/functions/mpc.fish @@ -1,6 +1,6 @@ #!/usr/bin/env fish # -function mpc +function mpc -d "Music Player Client" command mpc -f "%title%[ - %album%]\n\r%artist%[ - %performer%]\n\r%file%" $argv end diff --git a/common/.config/fish/functions/nvim.fish b/common/.config/fish/functions/nvim.fish deleted file mode 100755 index cb88cb6..0000000 --- a/common/.config/fish/functions/nvim.fish +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env fish -# - -function nvim - command nvim -p $argv -end diff --git a/common/.config/fish/functions/pip-upgrade-venv.fish b/common/.config/fish/functions/pip-upgrade-venv.fish index 34f48cb..07bb5ba 100755 --- a/common/.config/fish/functions/pip-upgrade-venv.fish +++ b/common/.config/fish/functions/pip-upgrade-venv.fish @@ -1,6 +1,6 @@ #!/usr/bin/env fish # -function pip-upgrade-venv +function pip-upgrade-venv -d "Upgrade virtualenv" pip freeze | cut -d'=' -f1 | xargs -n1 pip install -U end diff --git a/common/.config/fish/functions/pip-upgrade.fish b/common/.config/fish/functions/pip-upgrade.fish index fc6c705..85acc15 100755 --- a/common/.config/fish/functions/pip-upgrade.fish +++ b/common/.config/fish/functions/pip-upgrade.fish @@ -1,6 +1,6 @@ #!/usr/bin/env fish # -function pip-upgrade +function pip-upgrade -d "Upgrade python user-installed packaged" pip freeze --user | cut -d'=' -f1 | xargs -n1 pip install -U --user end diff --git a/common/.config/fish/functions/txor.fish b/common/.config/fish/functions/txor.fish new file mode 100755 index 0000000..7b6d5e5 --- /dev/null +++ b/common/.config/fish/functions/txor.fish @@ -0,0 +1,6 @@ +#!/usr/bin/env fish +# + +function txor -d "Tmuxinator" + tmuxinator $argv +end diff --git a/common/.config/fish/functions/update-homes.fish b/common/.config/fish/functions/update-homes.fish index b3d4c77..a6864bd 100755 --- a/common/.config/fish/functions/update-homes.fish +++ b/common/.config/fish/functions/update-homes.fish @@ -176,6 +176,7 @@ function update-homes -d "Update homes configuration" rm -rf ~/.config/nvim rm -rf ~/.config/poezio rm -rf ~/.config/tmux + rm -rf ~/.config/tmuxinator rm -rf ~/.config/toot rm -rf ~/.config/vdirsyncer end diff --git a/common/.config/fish/functions/vim.fish b/common/.config/fish/functions/vim.fish index c2f560b..a98e1a8 100755 --- a/common/.config/fish/functions/vim.fish +++ b/common/.config/fish/functions/vim.fish @@ -1,6 +1,6 @@ #!/usr/bin/env fish # -function vim +function vim -d "Launch IDE" lvim -p $argv end diff --git a/common/.config/fish/functions/vimdiff.fish b/common/.config/fish/functions/vimdiff.fish index 5982eb4..88f9a53 100755 --- a/common/.config/fish/functions/vimdiff.fish +++ b/common/.config/fish/functions/vimdiff.fish @@ -1,6 +1,6 @@ #!/usr/bin/env fish # -function vimdiff +function vimdiff -d "Launch IDE in diff mode" lvim -d -o $argv end diff --git a/common/.config/nvimpager/init.lua b/common/.config/nvimpager/init.lua new file mode 100644 index 0000000..8a725d8 --- /dev/null +++ b/common/.config/nvimpager/init.lua @@ -0,0 +1,67 @@ +local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" +if not vim.loop.fs_stat(lazypath) then + vim.fn.system({ + "git", + "clone", + "--filter=blob:none", + "https://github.com/folke/lazy.nvim.git", + "--branch=stable", -- latest stable release + lazypath, + }) +end +vim.opt.rtp:prepend(lazypath) + +require("lazy").setup({ + { + "EdenEast/nightfox.nvim", + lazy=false, + priority=1000 + }, + {"salkin-mada/openscad.nvim", event="BufRead"}, + {"ChiliConSql/neovim-stylus", event="BufRead"}, + {"digitaltoad/vim-pug", event="BufRead"}, + {"pirmd/gemini.vim", event="BufRead"}, + {"dpelle/vim-Grammalecte"}, + {"vigoux/LanguageTool.nvim"}, + {"chaimleib/vim-renpy", event="BufRead"} +}) + +vim.opt.clipboard = 'unnamedplus' + +vim.opt.tabstop = 4 +vim.opt.softtabstop = 4 +vim.opt.shiftwidth = 4 +vim.opt.expandtab = true + +vim.opt.number = false +vim.opt.cursorline = true +vim.opt.splitbelow = true +vim.opt.splitright = true +vim.opt.termguicolors = true +vim.opt.showmode = false +vim.opt.textwidth=78 +vim.opt.colorcolumn = "29,30,71,72,79,80,119,120,139,140" + +vim.opt.incsearch = true +vim.opt.hlsearch = false +vim.opt.ignorecase = true +vim.opt.smartcase = true + +vim.opt.fdm = 'indent' +vim.opt.listchars = {eol = '¶', tab = '⁝‧' , extends = '␐', precedes= '␑', trail = '˽', nbsp = '⎵' } +vim.opt.list = true + +vim.opt.spelllang = 'fr' +vim.g.grammalecte_cli_py = '/usr/bin/grammalecte-cli' +vim.g.languagetool_jar = '~/.bin/languagetool-commandline.jar' + +opts = {noremap=true, silent=true} +vim.keymap.set('n', '', "gt", opts) +vim.keymap.set('n', '', "gT", opts) +vim.keymap.set('v', 'gl', ":'<,'>!lou_translate en-us-brf.dis,fr-bfu-comp6.utb,braille-patterns.cti", opts) +vim.keymap.set('v', 'gL', ":'<,'>!lou_translate --backward en-us-brf.dis,fr-bfu-comp6.utb,braille-patterns.cti", opts) + +vim.cmd 'colorscheme nightfox' +vim.transparent_window = true + +vim.cmd 'highlight Normal ctermbg=none guibg=none' diff --git a/desktop/.config/tmuxinator/chat.yml b/desktop/.config/tmuxinator/chat.yml new file mode 100644 index 0000000..9815474 --- /dev/null +++ b/desktop/.config/tmuxinator/chat.yml @@ -0,0 +1,11 @@ +name: chat + +windows: + - news: TERM=xterm-256color newsboat + - xmpp: TERM=xterm-256color poezio + - mail1: aerc + - mail2: neomutt + - toot: toot tui + - cal: ikhal + - music: pms + - other: diff --git a/desktop/.local/share/konsole/Profile 1.profile b/desktop/.local/share/konsole/Profile 1.profile new file mode 100644 index 0000000..adfc8cf --- /dev/null +++ b/desktop/.local/share/konsole/Profile 1.profile @@ -0,0 +1,21 @@ +[Appearance] +ColorScheme=nightfox_konsole +Font=Hack,48,-1,5,50,0,0,0,0,0 + +[Cursor Options] +CustomCursorColor=255,255,0 +UseCustomCursorColor=true + +[General] +Name=Profile 1 +Environment=TERM=konsole-direct,COLORTERM=truecolor +Parent=FALLBACK/ +TerminalColumns=61 +TerminalRows=16 + +[Scrolling] +HistoryMode=2 +ScrollBarPosition=2 + +[Terminal Features] +BlinkingCursorEnabled=true diff --git a/tmuxinator.fish b/tmuxinator.fish new file mode 100644 index 0000000..db8d3c5 --- /dev/null +++ b/tmuxinator.fish @@ -0,0 +1,24 @@ +function __fish_tmuxinator_using_command + set cmd (commandline -opc) + if [ (count $cmd) -gt 1 ] + if [ $argv[1] = $cmd[2] ] + return 0 + end + end + return 1 +end + +set __fish_tmuxinator_program_cmd (commandline -o)[1] + +function __fish_tmuxinator_program + eval "$__fish_tmuxinator_program_cmd $argv" +end + +complete -f -c $__fish_tmuxinator_program_cmd -a '(__fish_tmuxinator_program completions start)' +complete -f -c $__fish_tmuxinator_program_cmd -n '__fish_use_subcommand' -x -a "(__fish_tmuxinator_program commands)" +complete -f -c $__fish_tmuxinator_program_cmd -n '__fish_tmuxinator_using_command start' -a "(__fish_tmuxinator_program completions start)" +complete -f -c $__fish_tmuxinator_program_cmd -n '__fish_tmuxinator_using_command open' -a "(__fish_tmuxinator_program completions open)" +complete -f -c $__fish_tmuxinator_program_cmd -n '__fish_tmuxinator_using_command copy' -a "(__fish_tmuxinator_program completions copy)" +complete -f -c $__fish_tmuxinator_program_cmd -n '__fish_tmuxinator_using_command delete' -a "(__fish_tmuxinator_program completions delete)" + +abbr --add mux "tmuxinator"