├── nvim
├── ftplugin
│ ├── djot.lua
│ ├── sh.lua
│ ├── tex.lua
│ ├── typst.lua
│ ├── fish.lua
│ ├── java.lua
│ ├── kotlin.lua
│ ├── lp.lua
│ ├── text.lua
│ └── markdown.lua
├── spell
│ ├── it.utf-8.add
│ ├── en.utf-8.add.spl
│ ├── it.utf-8.add.spl
│ └── en.utf-8.add
├── after
│ └── lsp
│ │ ├── zls.lua
│ │ ├── jdtls.lua
│ │ ├── lua_ls.lua
│ │ └── ts_ls.lua
├── lua
│ ├── snippets
│ │ ├── all.lua
│ │ ├── python.lua
│ │ ├── rust.lua
│ │ ├── markdown.lua
│ │ ├── zig.lua
│ │ ├── cpp.lua
│ │ ├── init.lua
│ │ └── asm.lua
│ ├── plugins
│ │ ├── init.lua
│ │ ├── indent.lua
│ │ ├── zen-mode.lua
│ │ ├── lint.lua
│ │ ├── oil.lua
│ │ ├── lualine.lua
│ │ ├── completion.lua
│ │ ├── colors.lua
│ │ ├── telescope.lua
│ │ ├── git.lua
│ │ ├── treesitter.lua
│ │ ├── lsp.lua
│ │ └── dap.lua
│ ├── diagnostic.lua
│ ├── autocommands.lua
│ ├── scratch-terminal.lua
│ ├── options.lua
│ └── keymaps.lua
├── syntax
│ ├── bnf.vim
│ └── lp.vim
├── init.lua
└── lazy-lock.json
├── gdb
└── gdbinit
├── fish
├── functions
│ ├── fish_mode_prompt.fish
│ ├── error.fish
│ ├── warn.fish
│ ├── info.fish
│ ├── pkg-remove.fish
│ ├── exercism.fish
│ ├── fish_prompt.fish
│ ├── paru.fish
│ ├── meltdown.fish
│ ├── clean.fish
│ ├── pdfmarks.fish
│ ├── require_command.fish
│ ├── unredirect.fish
│ ├── exportenv.fish
│ ├── cbrtocbz.fish
│ ├── fish_title.fish
│ ├── ppicalc.fish
│ ├── panes.fish
│ ├── poggress.fish
│ ├── backup.fish
│ ├── theme.fish
│ ├── tohevc.fish
│ ├── juke.fish
│ └── fish_helix_key_bindings.fish
├── config.fish
├── abbreviations.fish
├── fish_variables
└── environment.fish
├── xdg-terminals.list
├── fastfetch.png
├── README.md
├── maven
└── settings.xml
├── git
├── attributes
├── allowed_signers
├── ignore
└── config
├── npm
└── npmrc
├── systemd
└── user
│ ├── backup.timer
│ └── backup.service
├── bat
└── config
├── locale.conf
├── packages-aur.txt
├── sway
├── status.sh
├── scr.sh
└── config
├── readline
└── inputrc
├── zed
├── keymap.json
├── debug.json
└── settings.json
├── ghostty
├── themes
│ ├── GruvboxDark
│ ├── GruvboxLight
│ ├── jellybeans-light
│ └── jellybeans-muted
└── config
├── helix
├── config.toml
└── languages.toml
├── cava
└── config
├── user-dirs.dirs
├── fastfetch
└── config.jsonc
├── .gitignore
├── procps
└── toprc
├── packages.txt
├── fontconfig
└── fonts.conf
├── mimeapps.list
├── vivid
└── filetypes.yml
└── LICENSE
/nvim/ftplugin/djot.lua:
--------------------------------------------------------------------------------
1 | text.lua
--------------------------------------------------------------------------------
/gdb/gdbinit:
--------------------------------------------------------------------------------
1 | set debuginfo enabled on
2 |
--------------------------------------------------------------------------------
/fish/functions/fish_mode_prompt.fish:
--------------------------------------------------------------------------------
1 | # override
2 |
--------------------------------------------------------------------------------
/nvim/ftplugin/sh.lua:
--------------------------------------------------------------------------------
1 | vim.o.makeprg = 'sh %:.'
2 |
--------------------------------------------------------------------------------
/xdg-terminals.list:
--------------------------------------------------------------------------------
1 | com.mitchellh.ghostty.desktop
2 |
--------------------------------------------------------------------------------
/nvim/ftplugin/tex.lua:
--------------------------------------------------------------------------------
1 | /home/mario/.config/nvim/ftplugin/text.lua
--------------------------------------------------------------------------------
/nvim/ftplugin/typst.lua:
--------------------------------------------------------------------------------
1 | /home/mario/.config/nvim/ftplugin/text.lua
--------------------------------------------------------------------------------
/nvim/ftplugin/fish.lua:
--------------------------------------------------------------------------------
1 | vim.o.shiftwidth = 4
2 | vim.o.tabstop = 4
3 |
--------------------------------------------------------------------------------
/nvim/ftplugin/java.lua:
--------------------------------------------------------------------------------
1 | vim.o.shiftwidth = 4
2 | vim.o.tabstop = 4
3 |
--------------------------------------------------------------------------------
/nvim/ftplugin/kotlin.lua:
--------------------------------------------------------------------------------
1 | vim.o.shiftwidth = 4
2 | vim.o.tabstop = 4
3 |
--------------------------------------------------------------------------------
/fastfetch.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ormai/dotfiles/HEAD/fastfetch.png
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | Some `~/.config`s.
2 |
3 | 
4 |
--------------------------------------------------------------------------------
/nvim/ftplugin/lp.lua:
--------------------------------------------------------------------------------
1 | vim.o.commentstring = '%%s'
2 | vim.o.makeprg = 'dlv %:.'
3 |
--------------------------------------------------------------------------------
/nvim/spell/it.utf-8.add:
--------------------------------------------------------------------------------
1 | JetBrainsMono
2 | const
3 | textobjects
4 | Shopenhauer
5 |
--------------------------------------------------------------------------------
/nvim/ftplugin/text.lua:
--------------------------------------------------------------------------------
1 | vim.o.wrap = true
2 | vim.o.linebreak = true
3 | vim.o.spell = true
4 |
--------------------------------------------------------------------------------
/nvim/after/lsp/zls.lua:
--------------------------------------------------------------------------------
1 | return {
2 | settings = {
3 | enable_build_on_save = true,
4 | }
5 | }
6 |
--------------------------------------------------------------------------------
/nvim/spell/en.utf-8.add.spl:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ormai/dotfiles/HEAD/nvim/spell/en.utf-8.add.spl
--------------------------------------------------------------------------------
/nvim/spell/it.utf-8.add.spl:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ormai/dotfiles/HEAD/nvim/spell/it.utf-8.add.spl
--------------------------------------------------------------------------------
/maven/settings.xml:
--------------------------------------------------------------------------------
1 |
2 | ${env.XDG_CACHE_HOME}/m2/repository
3 |
4 |
--------------------------------------------------------------------------------
/git/attributes:
--------------------------------------------------------------------------------
1 | # Take every file that ends in png and pre-process them with a strategy
2 | # called 'exif'
3 | *.png diff=exif
4 |
--------------------------------------------------------------------------------
/nvim/ftplugin/markdown.lua:
--------------------------------------------------------------------------------
1 | -- This file affects the hover documentation
2 |
3 | vim.o.wrap = true
4 | vim.o.linebreak = true
5 |
--------------------------------------------------------------------------------
/nvim/after/lsp/jdtls.lua:
--------------------------------------------------------------------------------
1 | return {
2 | settings = {
3 | java = {
4 | redhat = { telemetry = { enabled = { false } } },
5 | }
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/git/allowed_signers:
--------------------------------------------------------------------------------
1 | goffredo2004@gmail.com namespaces="git" ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICud8fPnHtUCDXnJf5e/Gv8Ovgce4f5JOaayg4fFwwA4 goffredo2004@gmail.com
2 |
--------------------------------------------------------------------------------
/git/ignore:
--------------------------------------------------------------------------------
1 | target
2 | build
3 | out
4 | node_modules
5 | .vscode
6 | .idea
7 | .env*
8 | *.o
9 | *.out
10 | *trash*
11 | *cache*
12 | *secret*
13 | *token*
14 |
--------------------------------------------------------------------------------
/npm/npmrc:
--------------------------------------------------------------------------------
1 | prefix=${XDG_DATA_HOME}/npm
2 | cache=${XDG_CACHE_HOME}/npm
3 | init-module=${XDG_CONFIG_HOME}/npm/config/npm-init.js
4 | logs-dir=${XDG_STATE_HOME}/npm/logs
5 |
--------------------------------------------------------------------------------
/fish/functions/error.fish:
--------------------------------------------------------------------------------
1 | function error -d 'Log an error message'
2 | set_color brred
3 | echo -n '[ERROR]'
4 | set_color normal
5 | echo " $argv"
6 | end
7 |
--------------------------------------------------------------------------------
/fish/functions/warn.fish:
--------------------------------------------------------------------------------
1 | function warn -d 'Log a warning message'
2 | set_color bryellow
3 | echo -n '[WARN]'
4 | set_color normal
5 | echo " $argv"
6 | end
7 |
--------------------------------------------------------------------------------
/nvim/lua/snippets/all.lua:
--------------------------------------------------------------------------------
1 | LS.add_snippets("all", {
2 | S("pdfPage",
3 | {
4 | T("[/Page "), I(1), T(" /Title ("), I(2), T(") /OUT pdfmark"),
5 | }
6 | ),
7 | })
8 |
--------------------------------------------------------------------------------
/nvim/lua/snippets/python.lua:
--------------------------------------------------------------------------------
1 | LS.add_snippets('python', {
2 | S({ trig = 'swap', desc = 'Swap two variables' },
3 | { I(1), T(', '), I(2), T(' = '), Rep(2), T(', '), Rep(1) })
4 | })
5 |
--------------------------------------------------------------------------------
/fish/config.fish:
--------------------------------------------------------------------------------
1 | if status is-login
2 | source $HOME/.config/fish/environment.fish
3 | end
4 |
5 | if status is-interactive
6 | source $XDG_CONFIG_HOME/fish/abbreviations.fish
7 | end
8 |
--------------------------------------------------------------------------------
/fish/functions/info.fish:
--------------------------------------------------------------------------------
1 | # Nobody uses GNU Info anyway
2 | function info -d 'Log a message'
3 | set_color brgreen
4 | echo -n '[INFO]'
5 | set_color normal
6 | echo " $argv"
7 | end
8 |
--------------------------------------------------------------------------------
/fish/functions/pkg-remove.fish:
--------------------------------------------------------------------------------
1 | function pkg-remove --description 'Remove packages interactively'
2 | if set -l packages (paru -Qq | fzf --multi --preview 'paru -Qi {}')
3 | paru -Rscn $packages
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/systemd/user/backup.timer:
--------------------------------------------------------------------------------
1 | [Unit]
2 | Description=Backup the home directory with restic to a remote location
3 | Requires=backup.service
4 |
5 | [Timer]
6 | OnCalendar=daily
7 | Unit=backup.service
8 | Persistent=true
9 |
10 | [Install]
11 | WantedBy=timers.target
12 |
--------------------------------------------------------------------------------
/fish/functions/exercism.fish:
--------------------------------------------------------------------------------
1 | function exercism --wraps exercism
2 | # Changes directory to new exercise after dowloading it
3 | set -l out (command exercism $argv)
4 | echo $out
5 | if test $argv[1] = download && $out[-1]
6 | cd $out[-1] || return 1
7 | end
8 | end
9 |
--------------------------------------------------------------------------------
/fish/functions/fish_prompt.fish:
--------------------------------------------------------------------------------
1 | function fish_prompt
2 | # ~/.c/fish (main >) $
3 | set_color $fish_color_cwd
4 | echo -n (prompt_pwd -D 1)
5 | set_color normal
6 | echo -n (fish_git_prompt)
7 | set_color yellow
8 | echo -n ' $ '
9 | set_color normal
10 | end
11 |
--------------------------------------------------------------------------------
/fish/functions/paru.fish:
--------------------------------------------------------------------------------
1 | function paru -w paru
2 | # Update the package list after using paru
3 | command paru $argv
4 | and command paru -Qqm > $XDG_CONFIG_HOME/packages-aur.txt
5 | and command paru -Qqe | grep -vxf $XDG_CONFIG_HOME/packages-aur.txt > $XDG_CONFIG_HOME/packages.txt
6 | end
7 |
--------------------------------------------------------------------------------
/fish/functions/meltdown.fish:
--------------------------------------------------------------------------------
1 | function meltdown --description 'Melt your computer'
2 | function int --on-signal INT
3 | kill (jobs -p)
4 | end
5 |
6 | for i in /dev/cpu/*
7 | cat /dev/zero >/dev/null &
8 | end
9 | echo 'Press CTRL+C to stop'
10 | wait
11 | end
12 |
--------------------------------------------------------------------------------
/nvim/spell/en.utf-8.add:
--------------------------------------------------------------------------------
1 | nonpreemptive
2 | nondeterministic
3 | MPI
4 | SPMD
5 | Recv
6 | commited
7 | l'ID
8 | serializzabili
9 | serializzabile
10 | serializzabilità
11 | l'overhead
12 | superlineare
13 | dell'interrupt
14 | HLDA
15 | DMA
16 | l'address
17 | INTR
18 | all'overhead
19 | isoefficienza
20 | tupla
21 | NoSQL
22 | python3
23 |
--------------------------------------------------------------------------------
/bat/config:
--------------------------------------------------------------------------------
1 | # This is `bat`s configuration file. Each line either contains a comment or
2 | # a command-line option that you want to pass to `bat` by default. You can
3 | # run `bat --help` to get a list of all possible configuration options.
4 |
5 | --italic-text=always
6 | --theme=auto
7 | --theme-dark=gruvbox-dark
8 | --theme-light=gruvbox-light
9 |
--------------------------------------------------------------------------------
/locale.conf:
--------------------------------------------------------------------------------
1 | LANG=en_US.UTF-8
2 | LC_CTYPE=it_IT.UTF-8
3 | LC_NUMERIC=it_IT.UTF-8
4 | LC_TIME=en_DK.UTF-8
5 | LC_COLLATE=it_IT.UTF-8
6 | LC_MONETARY=it_IT.UTF-8
7 | LC_MESSAGES=en_US.UTF-8
8 | LC_PAPER=it_IT.UTF-8
9 | LC_NAME=it_IT.UTF-8
10 | LC_ADDRESS=it_IT.UTF-8
11 | LC_TELEPHONE=it_IT.UTF-8
12 | LC_MEASUREMENT=it_IT.UTF-8
13 | LC_IDENTIFICATION=it_IT.UTF-8
14 |
--------------------------------------------------------------------------------
/nvim/lua/snippets/rust.lua:
--------------------------------------------------------------------------------
1 | LS.add_snippets("rust", {
2 | S({ trig = "directions" },
3 | {
4 | T { "#[rustfmt::skip]",
5 | "const DIRECTIONS: [(isize, isize); 8] = [",
6 | " (-1, 1), (0, 1), (1, 1),",
7 | " (-1, 0), (1, 0),",
8 | " (-1, -1), (0, -1), (1, -1),",
9 | "];" },
10 | }),
11 | })
12 |
--------------------------------------------------------------------------------
/packages-aur.txt:
--------------------------------------------------------------------------------
1 | atlauncher-bin
2 | brother-dcp1610w
3 | brscan4
4 | exercism
5 | fish-lsp
6 | jdtls
7 | jetbrains-toolbox
8 | kissfft-git
9 | kotlin-language-server
10 | miniaudio
11 | paru-bin
12 | python-pysdl3
13 | quarto-cli-bin
14 | recordbox
15 | rstudio-desktop-bin
16 | spek
17 | tauon-music-box
18 | ty-bin
19 | xdg-ninja-git
20 | xdg-terminal-exec-git
21 | zen-browser-bin
22 |
--------------------------------------------------------------------------------
/fish/functions/clean.fish:
--------------------------------------------------------------------------------
1 | function clean --description 'Free storage'
2 | paru -Rsnu (paru -Qqd) # orphans
3 | sudo paccache -rk1
4 | sudo paccache -ruk0
5 | paru --noconfirm -Sccd
6 | sudo docker system prune --all --force
7 | cargo cache --autoclean
8 | pip cache purge
9 | uv cache clean
10 | gio trash --empty
11 | cargo clean-all -i ~
12 | end
13 |
--------------------------------------------------------------------------------
/fish/functions/pdfmarks.fish:
--------------------------------------------------------------------------------
1 | function pdfmarks -d 'Add table of contents to a PDF'
2 | if test (count $argv) != 2 || not string match '*.pdf' $argv[1]
3 | echo Usage: pdfmarks input.pdf pdfmarks.txt
4 | return 1
5 | end
6 |
7 | # https://gist.github.com/shreve/0b73d9dcb7ff11336188
8 | gs -o toc_$argv[1] -sDEVICE=pdfwrite -dPDFSETTINGS=/prepress $argv
9 | end
10 |
--------------------------------------------------------------------------------
/nvim/lua/snippets/markdown.lua:
--------------------------------------------------------------------------------
1 | LS.add_snippets("markdown", {
2 | S({ trig = "matrix", desc = "Math matrix for LaTex" },
3 | {
4 | T("\\left[\\begin{array}{rr} "), I(1), T(" \\\\ "), I(2), T(" \\end{array}\\right]"),
5 | }
6 | ),
7 | S({ trig = "vector", desc = "Math vector for LaTex" },
8 | {
9 | T("\\overrightarrow{"), I(1), T("}"),
10 | }
11 | )
12 | })
13 |
--------------------------------------------------------------------------------
/systemd/user/backup.service:
--------------------------------------------------------------------------------
1 | [Unit]
2 | Description=Backup the home directory with restic to a remote location
3 | After=network-online.target
4 | Wants=network-online.target
5 | StartLimitBurst=5
6 | StartLimitIntervalSec=1h
7 |
8 | [Service]
9 | ExecStartPre=ping -nc 1 ping.archlinux.org
10 | ExecStart=/usr/bin/fish -c backup
11 | Restart=on-failure
12 | RestartSec=20s
13 |
14 | [Install]
15 | WantedBy=default.target
16 |
--------------------------------------------------------------------------------
/nvim/lua/plugins/init.lua:
--------------------------------------------------------------------------------
1 | return {
2 | {
3 | 'eandrju/cellular-automaton.nvim',
4 | cmd = 'CellularAutomaton',
5 | },
6 | {
7 | 'norcalli/nvim-colorizer.lua',
8 | ft = { 'css', 'scss', 'html', 'rasi' },
9 | cmd = { 'ColorizerAttachToBuffer', 'ColorizerToggle' },
10 | config = function(self)
11 | require('colorizer').setup(self.ft)
12 | end
13 | },
14 | { "OXY2DEV/ui.nvim" },
15 | }
16 |
--------------------------------------------------------------------------------
/nvim/lua/diagnostic.lua:
--------------------------------------------------------------------------------
1 | vim.diagnostic.config({
2 | severity_sort = true,
3 | float = { source = 'if_many' },
4 | signs = {
5 | text = {
6 | [vim.diagnostic.severity.ERROR] = '',
7 | [vim.diagnostic.severity.WARN] = '',
8 | [vim.diagnostic.severity.HINT] = '',
9 | [vim.diagnostic.severity.INFO] = '',
10 | }
11 | },
12 | virtual_text = {
13 | source = 'if_many',
14 | spacing = 2,
15 | }
16 | })
17 |
--------------------------------------------------------------------------------
/fish/functions/require_command.fish:
--------------------------------------------------------------------------------
1 | # Checks if **all** the strings that it is passed are executable commands.
2 | # Useful to declare and check the external dependencies of a shell function.
3 | function require_command -d 'Check if a command is available'
4 | for cmd in $argv
5 | command -v $cmd &>/dev/null
6 | or begin
7 | error "'$cmd' is required but it's missing"
8 | return 127
9 | end
10 | end
11 | end
12 |
--------------------------------------------------------------------------------
/nvim/lua/snippets/zig.lua:
--------------------------------------------------------------------------------
1 | LS.add_snippets("zig", {
2 | S({ trig = "gpa" },
3 | {
4 | T {
5 | "var gpa = std.heap.GeneralPurposeAllocator(.{}){};",
6 | "const allocator = gpa.allocator();",
7 | "defer std.debug.assert(gpa.deinit() == .ok);"
8 | }
9 | }),
10 | S({ trig = "ArrayList" },
11 | {
12 | T "var ", I(1), T " = std.ArrayList(", I(2), T { ").init(allocator);", "defer " },
13 | Rep(1), T ".deinit();"
14 | }),
15 | })
16 |
--------------------------------------------------------------------------------
/sway/status.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | bat() {
4 | batteries=0
5 | percent=0
6 | for bat in /sys/class/power_supply/BAT*; do
7 | batteries=$((batteries + 1))
8 | percent=$((percent + $(cat "$bat/energy_now") * 100 / $(cat "$bat/energy_full")))
9 | done
10 | echo $((percent / batteries))
11 | }
12 |
13 | while true; do
14 | printf "vol %d%% bat %d%% %s \n" \
15 | "$(wpctl get-volume @DEFAULT_AUDIO_SINK@ | cut -d . -f 2)" \
16 | "$(bat)" \
17 | "$(date +'%a %d %b %H:%M')"
18 | sleep 2
19 | done
20 |
--------------------------------------------------------------------------------
/nvim/after/lsp/lua_ls.lua:
--------------------------------------------------------------------------------
1 | return {
2 | settings = {
3 | Lua = {
4 | hint = {
5 | enable = true,
6 | setType = true,
7 | },
8 | diagnostics = {
9 | globals = { 'vim' },
10 | neededFileStatus = {
11 | ['codestyle-check'] = 'Any'
12 | }
13 | },
14 | format = {
15 | defaultConfig = {
16 | indent_style = 'space',
17 | indent_size = '2',
18 | max_line_length = '80'
19 | }
20 | }
21 | }
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/readline/inputrc:
--------------------------------------------------------------------------------
1 | set editing-mode vi
2 | set keyseq-timeout 1
3 |
4 | set show-mode-in-prompt on
5 |
6 | $if term=linux
7 | set vi-ins-mode-string \1\e[?0c\2
8 | set vi-cmd-mode-string \1\e[?8c\2
9 | $else
10 | set vi-ins-mode-string \1\e[6 q\2
11 | set vi-cmd-mode-string \1\e[2 q\2
12 | $endif
13 |
14 | set keymap vi-command
15 | "k": history-substring-search-backward
16 | "j": history-substring-search-forward
17 |
18 | set keymap vi-insert
19 | "\C-l": clear-screen
20 |
21 | set colored-stats On
22 | set colored-completion-prefix On
23 |
--------------------------------------------------------------------------------
/zed/keymap.json:
--------------------------------------------------------------------------------
1 | // Zed keymap
2 | //
3 | // For information on binding keys, see the Zed
4 | // documentation: https://zed.dev/docs/key-bindings
5 | //
6 | // To see the default key bindings run `zed: open default keymap`
7 | // from the command palette.
8 | [
9 | {
10 | "context": "Workspace",
11 | "bindings": {
12 | // "shift shift": "file_finder::Toggle"
13 | }
14 | },
15 | {
16 | "context": "Editor",
17 | "bindings": {
18 | // "j k": ["workspace::SendKeystrokes", "escape"]
19 | }
20 | }
21 | ]
22 |
--------------------------------------------------------------------------------
/nvim/syntax/bnf.vim:
--------------------------------------------------------------------------------
1 | if exists("b:current_syntax")
2 | finish
3 | endif
4 |
5 | syntax match BnfNonTerminal "\v[<]?[a-z][a-z0-9_-]*[>]?"
6 | syntax region BnfTerminal start="\"" end="\""
7 | syntax region BnfTerminal start="\'" end="\'"
8 | syntax match BnfProduction "::="
9 | syntax match BnfChoice "|"
10 | syntax match BnfComment "//.*$"
11 |
12 | highlight link BnfNonTerminal Variable
13 | highlight link BnfTerminal String
14 | highlight link BnfProduction Keyword
15 | highlight link BnfChoice Operator
16 | highlight link BnfComment Comment
17 |
--------------------------------------------------------------------------------
/ghostty/themes/GruvboxDark:
--------------------------------------------------------------------------------
1 | palette = 0=#3c3836
2 | palette = 1=#cc241d
3 | palette = 2=#98971a
4 | palette = 3=#d79921
5 | palette = 4=#458588
6 | palette = 5=#b16286
7 | palette = 6=#689d6a
8 | palette = 7=#a89984
9 | palette = 8=#928374
10 | palette = 9=#fb4934
11 | palette = 10=#b8bb26
12 | palette = 11=#fabd2f
13 | palette = 12=#83a598
14 | palette = 13=#d3869b
15 | palette = 14=#8ec07c
16 | palette = 15=#ebdbb2
17 | background = 1D2021
18 | foreground = ebdbb2
19 | cursor-color = ebdbb2
20 | selection-background = 665c54
21 | selection-foreground = ebdbb2
22 |
--------------------------------------------------------------------------------
/ghostty/themes/GruvboxLight:
--------------------------------------------------------------------------------
1 | palette = 0=#ebdbb2
2 | palette = 1=#9d0006
3 | palette = 2=#79740e
4 | palette = 3=#b57614
5 | palette = 4=#076678
6 | palette = 5=#8f3f71
7 | palette = 6=#427b58
8 | palette = 7=#3c3836
9 | palette = 8=#9d8374
10 | palette = 9=#cc241d
11 | palette = 10=#98971a
12 | palette = 11=#d79921
13 | palette = 12=#458588
14 | palette = 13=#b16186
15 | palette = 14=#689d69
16 | palette = 15=#7c6f64
17 | background = FAF4D2
18 | foreground = 282828
19 | cursor-color = 282828
20 | selection-background = d5c4a1
21 | selection-foreground = 665c54
22 |
--------------------------------------------------------------------------------
/nvim/lua/snippets/cpp.lua:
--------------------------------------------------------------------------------
1 | LS.add_snippets("cpp", {
2 | S({ trig = "print_vector" },
3 | {
4 | T {
5 | "template void print_vector(const std::vector &v) {",
6 | " const int len = v.size();",
7 | " std::cout << '[';",
8 | " for (int i = 0; i < len; ++i) {",
9 | " std::cout << v[i];",
10 | " if (i != len - 1) {",
11 | ' std::cout << ", ";',
12 | " }",
13 | " }",
14 | " std::cout << ']' << std::endl;",
15 | "}"
16 | }
17 | }),
18 | })
19 |
--------------------------------------------------------------------------------
/helix/config.toml:
--------------------------------------------------------------------------------
1 | # https://github.com/helix-editor/helix/pull/14356
2 | # [theme]
3 | # dark = "gruvbox_dark_hard"
4 | # light = "gruvbox_light_hard"
5 | theme = "gruvbox_dark_hard"
6 |
7 | [editor.cursor-shape]
8 | insert = "bar"
9 |
10 | [editor.file-picker]
11 | hidden = false
12 |
13 | [editor.indent-guides]
14 | render = true
15 | character = "▏"
16 |
17 | [editor.auto-save]
18 | focus-lost = true
19 | after-delay.enable = true
20 | after-delay.timeout = 400
21 |
22 | [editor]
23 | end-of-line-diagnostics = "hint"
24 |
25 | [editor.inline-diagnostics]
26 | cursor-line = "warning"
27 |
--------------------------------------------------------------------------------
/nvim/after/lsp/ts_ls.lua:
--------------------------------------------------------------------------------
1 | return {
2 | settings = {
3 | typescript = {
4 | inlayHints = {
5 | includeInlayParameterNameHints = 'all',
6 | includeInlayParameterNameHintsWhenArgumentMatchesName = true,
7 | includeInlayFunctionParameterTypeHints = true,
8 | includeInlayVariableTypeHints = true,
9 | includeInlayVariableTypeHintsWhenTypeMatchesName = true,
10 | includeInlayPropertyDeclarationTypeHints = true,
11 | includeInlayFunctionLikeReturnTypeHints = true,
12 | includeInlayEnumMemberValueHints = true
13 | }
14 | }
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/nvim/lua/plugins/indent.lua:
--------------------------------------------------------------------------------
1 | return {
2 | 'lukas-reineke/indent-blankline.nvim',
3 | main = 'ibl',
4 | dependencies = 'nvim-treesitter/nvim-treesitter',
5 | opts = {
6 | indent = {
7 | char = '▏',
8 | tab_char = '▏',
9 | highlight = 'IblIndent'
10 | },
11 | scope = {
12 | char = '▏',
13 | priority = 1024,
14 | highlight = 'IblScope',
15 | show_start = false,
16 | show_end = false,
17 | show_exact_scope = false,
18 | include = {
19 | node_type = {
20 | xml = { 'element', 'content' }
21 | }
22 | }
23 | }
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/fish/functions/unredirect.fish:
--------------------------------------------------------------------------------
1 | function unredirect --description 'Takes an URL and prints the redirection chain'
2 | test (count $argv) -eq 1
3 | or echo "Usage: $_ [URI]" && return 1
4 |
5 | # https://unix.stackexchange.com/a/680583/648549
6 | set -l url $argv[1]
7 | set -l count 1
8 | while set -l next_url (curl -ISsfw '%{redirect_url}\n' -o /dev/null $url)
9 | set_color yellow
10 | echo -n $count
11 | set_color normal
12 | echo " $url"
13 | test -z "$next_url"
14 | and break
15 | set count (math $count + 1)
16 | set url $next_url
17 | end
18 | end
19 |
--------------------------------------------------------------------------------
/nvim/lua/plugins/zen-mode.lua:
--------------------------------------------------------------------------------
1 | return {
2 | 'folke/zen-mode.nvim',
3 | keys = {
4 | { 'z', 'ZenMode', desc = 'Toggle ZenMode' }
5 | },
6 | cmd = 'ZenMode',
7 | opts = {
8 | window = {
9 | backdrop = 1,
10 | width = 100,
11 | -- height = .95,
12 | options = {
13 | number = false,
14 | cursorline = false,
15 | list = false,
16 | signcolumn = 'no'
17 | }
18 | },
19 | plugins = {
20 | options = {
21 | enabled = true,
22 | laststatus = 0,
23 | showcmd = false,
24 | ruler = false
25 | }
26 | }
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/ghostty/config:
--------------------------------------------------------------------------------
1 | # font-family = JetBrainsMono Nerd Font
2 | font-family = Maple Mono NF
3 | theme = dark: GruvboxDark, light: GruvboxLight
4 | mouse-hide-while-typing = true
5 | window-padding-balance = true
6 | window-inherit-font-size = false
7 | gtk-single-instance = true
8 |
9 | keybind = ctrl+shift+w=close_surface
10 | keybind = ctrl+alt+shift+h=new_split:left
11 | keybind = ctrl+alt+shift+j=new_split:down
12 | keybind = ctrl+alt+shift+k=new_split:up
13 | keybind = ctrl+alt+shift+l=new_split:right
14 | keybind = ctrl+alt+h=goto_split:left
15 | keybind = ctrl+alt+j=goto_split:down
16 | keybind = ctrl+alt+k=goto_split:up
17 | keybind = ctrl+alt+l=goto_split:right
18 |
--------------------------------------------------------------------------------
/cava/config:
--------------------------------------------------------------------------------
1 | # https://github.com/karlstav/cava/blob/master/example_files/config
2 |
3 | [general]
4 | framerate = 60
5 | autosens = 0
6 | sensitivity = 220
7 | bar_width = 1
8 | bar_spacing = 0
9 |
10 | [output]
11 | method = noncurses
12 | orientation = bottom
13 | xaxis = none
14 | alacritty_sync = 0
15 | show_idle_bar_heads = 1
16 |
17 | [color]
18 | background = default
19 | foreground = default
20 | gradient = 1
21 | gradient_count = 5
22 | gradient_color_1 = '#8ec07c'
23 | # gradient_color_2 = '#b8bb26'
24 | gradient_color_2 = '#fabd2f'
25 | # gradient_color_3 = '#f38019'
26 | gradient_color_3 = '#fb4934'
27 |
28 | [smoothing]
29 | monstercat = 0
30 | waves = 0
31 | noise_reduction = 70
32 |
--------------------------------------------------------------------------------
/user-dirs.dirs:
--------------------------------------------------------------------------------
1 | # This file is written by xdg-user-dirs-update
2 | # If you want to change or add directories, just edit the line you're
3 | # interested in. All local changes will be retained on the next run.
4 | # Format is XDG_xxx_DIR="$HOME/yyy", where yyy is a shell-escaped
5 | # homedir-relative path, or XDG_xxx_DIR="/yyy", where /yyy is an
6 | # absolute path. No other format is supported.
7 |
8 | XDG_DESKTOP_DIR="$HOME/Desktop"
9 | XDG_DOWNLOAD_DIR="$HOME/Downloads"
10 | XDG_TEMPLATES_DIR="$HOME/Templates"
11 | XDG_PUBLICSHARE_DIR="$HOME/Public"
12 | XDG_DOCUMENTS_DIR="$HOME/Documents"
13 | XDG_MUSIC_DIR="$HOME/Music"
14 | XDG_PICTURES_DIR="$HOME/Pictures"
15 | XDG_VIDEOS_DIR="$HOME/Videos"
16 |
--------------------------------------------------------------------------------
/nvim/lua/plugins/lint.lua:
--------------------------------------------------------------------------------
1 | return {
2 | 'mfussenegger/nvim-lint',
3 | config = function()
4 | local lint = require('lint')
5 |
6 | lint.linters_by_ft = {
7 | make = { 'checkmake' },
8 | c = { 'trivy' },
9 | cpp = { 'trivy' },
10 | python = { 'trivy' },
11 | rust = { 'trivy' },
12 | java = { 'trivy' },
13 | javascript = { 'trivy' },
14 | typescript = { 'trivy' },
15 | dart = { 'trivy' },
16 | docker = { 'trivy' }
17 | }
18 |
19 | vim.api.nvim_create_autocmd(
20 | { 'BufReadPost', 'BufWritePost', 'InsertLeave', 'TextChanged' },
21 | {
22 | callback = function()
23 | lint.try_lint()
24 | end
25 | })
26 | end,
27 | }
28 |
--------------------------------------------------------------------------------
/ghostty/themes/jellybeans-light:
--------------------------------------------------------------------------------
1 | # name = "jellybeans-light"
2 | # author = "A. Fox"
3 |
4 | palette = 0=#f5f5f5
5 | palette = 1=#954d3b
6 | palette = 2=#386014
7 | palette = 3=#876820
8 | palette = 4=#234291
9 | palette = 5=#6a4abd
10 | palette = 6=#2B5B77
11 | palette = 7=#444444
12 | palette = 8=#787878
13 | palette = 9=#a02020
14 | palette = 10=#457039
15 | palette = 11=#a66a10
16 | palette = 12=#2952a3
17 | palette = 13=#540063
18 | palette = 14=#3a596a
19 | palette = 15=#252525
20 | palette = 16=#904070
21 | palette = 17=#556633
22 | palette = 18=#e0dcd7
23 | palette = 19=#595959
24 | palette = 20=#7a8490
25 | palette = 21=#f8f8f8
26 |
27 | background = F5E6D3
28 | foreground = 252525
29 | cursor-color = 252525
30 | selection-background = 787878
31 | selection-foreground = fdf6ec
32 |
--------------------------------------------------------------------------------
/ghostty/themes/jellybeans-muted:
--------------------------------------------------------------------------------
1 | # name = "jellybeans-muted"
2 | # author = "A. Fox"
3 |
4 | palette = 0=#101010
5 | palette = 1=#cc4d4d
6 | palette = 2=#909c6e
7 | palette = 3=#e8c88c
8 | palette = 4=#7a8aa6
9 | palette = 5=#b8aed3
10 | palette = 6=#617b87
11 | palette = 7=#dad6c8
12 | palette = 8=#7a7a7a
13 | palette = 9=#7e2e23
14 | palette = 10=#6aa84c
15 | palette = 11=#d8a16c
16 | palette = 12=#83adc3
17 | palette = 13=#5c1e68
18 | palette = 14=#83adc3
19 | palette = 15=#e9e5dc
20 | palette = 16=#cc4d4d
21 | palette = 17=#d9a45a
22 | palette = 18=#1e1e1c
23 | palette = 19=#3c3936
24 | palette = 20=#6f6f6c
25 | palette = 21=#bebebe
26 |
27 | background = #101010
28 | foreground = #dad6c8
29 | cursor-color = #a6c3d9
30 | selection-background = #3c3b38
31 | selection-foreground = #dad6c8
32 |
--------------------------------------------------------------------------------
/zed/debug.json:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "label": "Debug active PHP file",
4 | "adapter": "PHP",
5 | "program": "$ZED_FILE",
6 | "request": "launch",
7 | "cwd": "$ZED_WORKTREE_ROOT"
8 | },
9 | {
10 | "label": "Debug active Python file",
11 | "adapter": "Debugpy",
12 | "program": "$ZED_FILE",
13 | "request": "launch",
14 | "cwd": "$ZED_WORKTREE_ROOT"
15 | },
16 | {
17 | "label": "Debug active JavaScript file",
18 | "adapter": "JavaScript",
19 | "program": "$ZED_FILE",
20 | "request": "launch",
21 | "cwd": "$ZED_WORKTREE_ROOT"
22 | },
23 | {
24 | "label": "JavaScript debug terminal",
25 | "adapter": "JavaScript",
26 | "request": "launch",
27 | "cwd": "$ZED_WORKTREE_ROOT",
28 | "console": "integratedTerminal"
29 | }
30 | ]
31 |
--------------------------------------------------------------------------------
/fish/functions/exportenv.fish:
--------------------------------------------------------------------------------
1 | function exportenv --description 'Export NAME=VALUE variables from files'
2 | # Useful to export all the variables in a .env to the shell environment.
3 | # I use this in ~/.config/fish/environment.fish to export
4 | # ~/.config/user-dirs.dirs and ~/.config/locale.conf
5 |
6 | if test (count $argv) -lt 1
7 | echo "Usage: $_ files..."
8 | end
9 |
10 | for file in $argv
11 | for line in (grep -v -e '^\s*#' -e '^\s*$' $file)
12 | string match -qr '^(?:export\s+)?(?\w+)=(?\N+)' $line
13 | set -l expanded_value (eval echo $value)
14 | if test $name = PATH
15 | fish_add_path $expanded_value
16 | else
17 | set -gx "$name" $expanded_value
18 | end
19 | end
20 | end
21 | end
22 |
--------------------------------------------------------------------------------
/nvim/lua/plugins/oil.lua:
--------------------------------------------------------------------------------
1 | local detail = false;
2 |
3 | return {
4 | 'stevearc/oil.nvim',
5 | lazy = false,
6 | opts = {
7 | delete_to_trash = true,
8 | columns = {},
9 | keymaps = {
10 | [''] = {
11 | desc = "Show hidden files and file details",
12 | callback = function()
13 | detail = not detail
14 | local oil = require('oil')
15 | oil.toggle_hidden()
16 | if detail then
17 | oil.set_columns({ "permissions", "size", "mtime" })
18 | else
19 | oil.set_columns({})
20 | end
21 | end,
22 | },
23 | [''] = {
24 | desc = 'Open',
25 | callback = function()
26 | local oil = require('oil')
27 | oil.select()
28 | vim.cmd.cd(oil.get_current_dir());
29 | end
30 | }
31 | },
32 | },
33 | }
34 |
--------------------------------------------------------------------------------
/fish/functions/cbrtocbz.fish:
--------------------------------------------------------------------------------
1 | function cbrtocbz -d 'Convert a comic book archive from RAR to ZIP'
2 | if test (count $argv) -lt 1
3 | echo "Usage: $_ files..."
4 | return 1
5 | end
6 |
7 | require_command unrar zip gio rm mktemp
8 | or return $status
9 |
10 | # Extracts the .cbr with unrar, then creates a .cbz with zip
11 | function convert -a file
12 | set -l workdir (mktemp -d)
13 | and unrar e $file -o $workdir
14 | and zip (path change-extension 'cbz' $file) $workdir/*
15 | and gio trash $file # Original file is not lost
16 | and rm -r $workdir
17 | end
18 |
19 | for file in $argv
20 | if test -f $file && test (path extension $file) = .cbr
21 | convert $file
22 | else
23 | warn "skipping '$file': it is not a valid comic book RAR archive"
24 | end
25 | end
26 | end
27 |
--------------------------------------------------------------------------------
/fastfetch/config.jsonc:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json",
3 | "logo": {
4 | "source": "arch2",
5 | "color": {
6 | "1": "blue",
7 | "2": "blue"
8 | },
9 | "padding": {
10 | "left": 3,
11 | "top": 1
12 | }
13 | },
14 | "modules": [
15 | "title",
16 | "os",
17 | "kernel",
18 | "uptime",
19 | {
20 | "type": "command",
21 | "key": "System Age",
22 | "text": "echo $((($(date +%s) - $(stat -c %W /)) / 86400)) days"
23 | },
24 | "packages",
25 | // "break",
26 | "host",
27 | {
28 | "type": "cpu",
29 | "temp": true
30 | },
31 | "gpu",
32 | "display",
33 | "memory",
34 | "disk",
35 | "de",
36 | "font",
37 | "shell",
38 | "terminal",
39 | "terminalfont",
40 | "editor",
41 | "break",
42 | "colors"
43 | ]
44 | }
45 |
--------------------------------------------------------------------------------
/fish/functions/fish_title.fish:
--------------------------------------------------------------------------------
1 | function fish_title
2 | set -l cmd (status current-command)
3 | set -l icon
4 | switch $cmd
5 | case fish
6 | set icon 🐟
7 | case helix hx
8 | set icon 🧬
9 | case man
10 | set icon 📖
11 | case git
12 | set icon 🌿
13 | case curl wget ping
14 | set icon 🌐
15 | case ssh
16 | set icon 🖥️
17 | case cargo rustc rustup
18 | set icon 🦀
19 | case docker docker-compose
20 | set icon 🐳
21 | case make cmake meson ninja ./mach
22 | set icon 🛠️
23 | case gradle ./gradlew psql
24 | set icon 🐘
25 | case mvn ./mvnw
26 | set icon 🪶
27 | case node npm pnpm
28 | set icon 🌲
29 | case pacman paru
30 | set icon 📦
31 | end
32 | echo "$icon $cmd"
33 | end
34 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | aerc
2 | blender
3 | cef_user_data
4 | celluloid
5 | configstore
6 | dconf
7 | discord
8 | docker
9 | Electron
10 | epiphany
11 | exercism
12 | GIMP
13 | gnome-boxes
14 | gnome-session
15 | goa-1.0
16 | Google
17 | gtk-2.0
18 | gtk-3.0
19 | gtk-4.0
20 | heroic
21 | ibus
22 | inkscape
23 | irssi
24 | JetBrains
25 | keepassxc
26 | libaccounts-glib
27 | libreoffice
28 | libvirt
29 | matplotlib
30 | menus
31 | mpv
32 | MusicBrainz
33 | nautilus
34 | news-flash
35 | nicotine
36 | npm
37 | NuGet
38 | nushell
39 | obs-studio
40 | obsidian
41 | pipewire
42 | pulse
43 | qalculate
44 | qt5ct
45 | qt6ct
46 | servo
47 | simple-scan
48 | sway
49 | syncthing
50 | systemd
51 | tiling-assistant
52 | zed
53 | kde*
54 | gtk*
55 | .android
56 | pavucontrol.ini
57 | *flags.conf
58 | monitors.xml*
59 | .gsd-keyboard.settings-ported
60 | fish/functions/streamer.fish
61 | QtProject.conf
62 | java
63 | evolution
64 | cava
65 | rstudio
66 | spek
67 | go
68 | wireshark
69 | RStudio
70 | B-Human
71 | papers
72 | R
73 | glow
74 |
--------------------------------------------------------------------------------
/nvim/lua/autocommands.lua:
--------------------------------------------------------------------------------
1 | local group = vim.api.nvim_create_augroup('config', { clear = true })
2 |
3 | vim.api.nvim_create_autocmd('TextYankPost', {
4 | pattern = '*',
5 | callback = function() vim.hl.on_yank { timeout = 500 } end,
6 | group = group,
7 | })
8 |
9 | -- https://www.reddit.com/r/neovim/comments/1abd2cq/comment/kjo7moz/
10 | -- :h last-position-jump
11 | vim.api.nvim_create_autocmd('BufReadPost', {
12 | pattern = '*',
13 | callback = function()
14 | vim.api.nvim_win_set_cursor(0, vim.api.nvim_buf_get_mark(0, '"'))
15 | end,
16 | group = group,
17 | desc = 'Open file at last edit position',
18 | })
19 |
20 | vim.api.nvim_create_autocmd(
21 | { 'BufLeave', 'FocusLost', 'InsertLeave', 'TextChanged' },
22 | {
23 | callback = function(e)
24 | if vim.bo[e.buf].modifiable and vim.bo[e.buf].modified then
25 | vim.schedule(function() vim.cmd 'silent! write' end)
26 | end
27 | end,
28 | group = group,
29 | desc = 'Save buffer automatically'
30 | }
31 | )
32 |
--------------------------------------------------------------------------------
/fish/functions/ppicalc.fish:
--------------------------------------------------------------------------------
1 | function ppicalc -a width_px height_px diagonal_in
2 | test (count $argv) -eq 3
3 | or echo "Usage: $_ width-px height-px diagonal-in" && return 1
4 |
5 | echo -n 'Pixels per inch: '
6 | set_color cyan --bold
7 | set -l dpi (math --scale=2 "sqrt($width_px * $width_px + $height_px * $height_px) / $diagonal_in")
8 | echo -n $dpi
9 |
10 | set_color normal
11 | echo -n ' ('
12 | set_color yellow
13 | if test $dpi -lt 120
14 | echo -n ldpi
15 | else if test $dpi -lt 160
16 | echo -n mpdi
17 | else if test $dpi -lt 213
18 | echo -n tvdpi
19 | else if test $dpi -lt 240
20 | echo -n hdpi
21 | else if test $dpi -lt 320
22 | echo -n xhdpi
23 | else if test $dpi -lt 480
24 | echo -n xxhdpi
25 | else if test $dpi -lt 640
26 | echo -n xxxhdpi
27 | else
28 | set_color red --bold
29 | echo -n out of scale value
30 | end
31 | set_color normal
32 | echo \)
33 | end
34 |
--------------------------------------------------------------------------------
/zed/settings.json:
--------------------------------------------------------------------------------
1 | // Zed settings
2 | //
3 | // For information on how to configure Zed, see the Zed
4 | // documentation: https://zed.dev/docs/configuring-zed
5 | //
6 | // To see all of Zed's default settings without changing your
7 | // custom settings, run `zed: open default settings` from the
8 | // command palette (cmd-shift-p / ctrl-shift-p)
9 | {
10 | "autosave": { "after_delay": { "milliseconds": 500 } },
11 | "cursor_blink": false,
12 | "telemetry": {
13 | "metrics": false
14 | },
15 | "features": {
16 | "edit_prediction_provider": "none"
17 | },
18 | // "vim_mode": true,
19 | "ui_font_size": 16,
20 | "buffer_font_size": 16,
21 | "buffer_font_family": "Maple Mono NF",
22 | "theme": {
23 | "mode": "system",
24 | "light": "Catppuccin Latte",
25 | "dark": "Catppuccin Mocha"
26 | },
27 | "icon_theme": {
28 | "mode": "system",
29 | "dark": "Catppuccin Mocha",
30 | "light": "Catppuccin Latte"
31 | },
32 | "ui_font_family": "Adwaita Sans",
33 | "diagnostics": { "inline": { "enabled": true } }
34 | }
35 |
--------------------------------------------------------------------------------
/nvim/lua/snippets/init.lua:
--------------------------------------------------------------------------------
1 | -- These abbreviation are only set once
2 | LS = require("luasnip")
3 | S = LS.snippet
4 | SN = LS.snippet_node
5 | ISN = LS.indent_snippet_node
6 | T = LS.text_node
7 | I = LS.insert_node
8 | F = LS.function_node
9 | C = LS.choice_node
10 | D = LS.dynamic_node
11 | R = LS.restore_node
12 | Events = require("luasnip.util.events")
13 | AI = require("luasnip.nodes.absolute_indexer")
14 | Extras = require("luasnip.extras")
15 | L = Extras.lambda
16 | Rep = Extras.rep
17 | P = Extras.partial
18 | M = Extras.match
19 | N = Extras.nonempty
20 | DL = Extras.dynamic_lambda
21 | Fmt = require("luasnip.extras.fmt").fmt
22 | Fmta = require("luasnip.extras.fmt").fmta
23 | Conds = require("luasnip.extras.expand_conditions")
24 | Postfix = require("luasnip.extras.postfix").postfix
25 | Types = require("luasnip.util.types")
26 | Parse = require("luasnip.util.parser").parse_snippet
27 | MS = LS.multi_snippet
28 |
29 | require('snippets.markdown')
30 | require('snippets.cpp')
31 | require('snippets.python')
32 | require('snippets.zig')
33 | require('snippets.rust')
34 |
--------------------------------------------------------------------------------
/git/config:
--------------------------------------------------------------------------------
1 | [user]
2 | name = "Mario D'Andrea"
3 | email = goffredo2004@gmail.com
4 | signingkey = /home/mario/.ssh/commit/key.pub
5 | [init]
6 | defaultBranch = main
7 | [status]
8 | branch = true
9 | showStash = true
10 | showUntrackedFiles = all
11 | [core]
12 | autocrlf = input
13 | pager = delta
14 | compression = 9
15 | whitespace = error
16 | preloadindex = true
17 | [advice]
18 | addEmptyPathSpec = false
19 | pushNonFastForward = false
20 | statusHint = false
21 | [push]
22 | autoSetupRemote = true
23 | default = current
24 | [merge]
25 | conflictstyle = zdiff3
26 | [commit]
27 | verbose = true
28 | gpgsign = true
29 | [color]
30 | pager = true
31 | [diff "exif"]
32 | texconv = exiftool
33 | [filter "lfs"]
34 | clean = git-lfs clean -- %f
35 | smudge = git-lfs smudge -- %f
36 | process = git-lfs filter-process
37 | required = true
38 | [bash]
39 | showDirtyState = true
40 | showUntrackedFiles = true
41 | [delta]
42 | line-numbers = true
43 | side-by-side = false
44 | [gpg]
45 | format = ssh
46 | [gpg "ssh"]
47 | allowedSignersFile = /home/mario/.config/git/allowed_signers
48 |
--------------------------------------------------------------------------------
/fish/abbreviations.fish:
--------------------------------------------------------------------------------
1 | abbr ls 'eza --hyperlink'
2 | abbr ll 'eza -laM -s modified --git --time-style=iso --icons --hyperlink'
3 | abbr lt 'eza -T --icons --hyperlink'
4 | abbr mv 'mv -iv'
5 | abbr rm 'rm -iv'
6 | abbr cp 'cp -iv'
7 | abbr ip 'ip -c'
8 | abbr df 'duf --only local,network'
9 | abbr du dust # Du, du hast, du hast mich...
10 | abbr hx helix
11 | abbr cat bat
12 | abbr top 'top -u $USER'
13 | abbr copy wl-copy
14 | abbr paste wl-paste
15 | abbr trash 'gio trash'
16 | abbr rsync 'rsync -avhL --partial --info=progress2'
17 | abbr venv 'source .venv/bin/activate.fish'
18 | abbr onefetch 'onefetch --number-of-authors 5 --number-of-file-churns 0 --no-title'
19 | abbr monero 'monero-wallet-cli --log-file $XDG_STATE_HOME/monero/monero-wallet-cli.log --wallet-file $XDG_DOCUMENTS_DIR/MoneroWallet --daemon-address 192.168.1.8:18089 --trusted-daemon'
20 | abbr irssi 'irssi --config=$XDG_CONFIG_HOME/irssi/config.conf --home=$XDG_DATA_HOME/irssi'
21 |
22 | # Git
23 | abbr a git add
24 | abbr s git status --short
25 | abbr d git diff
26 | abbr c git commit -v
27 | abbr l git log --graph --abbrev-commit --date=relative --pretty=format:"'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr)%Creset'"
28 |
--------------------------------------------------------------------------------
/nvim/init.lua:
--------------------------------------------------------------------------------
1 | require('keymaps')
2 | require('options')
3 | require('autocommands')
4 | require('diagnostic')
5 |
6 | vim.filetype.add({ extension = { dj = 'djot' } }) -- djot.net
7 | vim.filetype.add({ extension = { bnf = 'bnf' } })
8 | vim.filetype.add({ extension = { lp = 'lp' } })
9 | vim.filetype.add({ extension = { pddl = 'scheme' } })
10 |
11 | -- Bootstrap lazy.nvim
12 | local lazypath = vim.fn.stdpath('data') .. '/lazy/lazy.nvim'
13 | if not vim.loop.fs_stat(lazypath) then
14 | vim.fn.system({ 'git', 'clone', '--filter=blob:none',
15 | 'https://github.com/folke/lazy.nvim.git', '--branch=stable', lazypath })
16 | end
17 | vim.opt.rtp:prepend(vim.fn.stdpath('data') .. '/lazy/lazy.nvim')
18 |
19 | require('lazy').setup('plugins', {
20 | change_detection = { notify = false },
21 | performance = {
22 | rtp = {
23 | disabled_plugins = {
24 | 'gzip', 'matchit', 'netrwPlugin', 'tarPlugin',
25 | 'tohtml', 'tutor', 'zipPlugin', 'rplugin', 'editorconfig', -- 'matchparen'
26 | }
27 | }
28 | }
29 | })
30 |
31 | -- Remove 'Disable mouse' option from the right-click menu
32 | vim.cmd.aunmenu('PopUp.How-to\\ disable\\ mouse')
33 | vim.cmd.aunmenu('PopUp.-2-')
34 |
--------------------------------------------------------------------------------
/fish/functions/panes.fish:
--------------------------------------------------------------------------------
1 | function panes -d 'Draw colored panes'
2 | set -l RESET '\e[0m'
3 |
4 | set -l black '\e[30m'
5 | set -l red '\e[31m'
6 | set -l green '\e[32m'
7 | set -l yellow '\e[33m'
8 | set -l blue '\e[34m'
9 | set -l magenta '\e[35m'
10 | set -l cyan '\e[36m'
11 | set -l white '\e[37m'
12 |
13 | set -l brblack '\e[90m'
14 | set -l brred '\e[91m'
15 | set -l brgreen '\e[92m'
16 | set -l bryellow '\e[93m'
17 | set -l brblue '\e[94m'
18 | set -l brmagenta '\e[95m'
19 | set -l brcyan '\e[96m'
20 | set -l brwhite '\e[97m'
21 |
22 | echo -e "\n $black▄▄▄ $red▄▄▄ $green▄▄▄ $yellow▄▄▄ $blue▄▄▄ $magenta▄▄▄ $cyan▄▄▄ $white▄▄▄"
23 | echo -e " $black█$brblack███ $red█$brred███ $green█$brgreen███ $yellow█$bryellow███ $blue█$brblue███ $magenta█$brmagenta███ $cyan█$brcyan███ $white█$brwhite███"
24 | echo -e " $black█$brblack███ $red█$brred███ $green█$brgreen███ $yellow█$bryellow███ $blue█$brblue███ $magenta█$brmagenta███ $cyan█$brcyan███ $white█$brwhite███"
25 | echo -e " $brblack▀▀▀ $brred▀▀▀ $brgreen▀▀▀ $bryellow▀▀▀ $brblue▀▀▀ $brmagenta▀▀▀ $brcyan▀▀▀ $brwhite▀▀▀$RESET\n"
26 | end
27 |
--------------------------------------------------------------------------------
/nvim/lua/plugins/lualine.lua:
--------------------------------------------------------------------------------
1 | return {
2 | 'nvim-lualine/lualine.nvim',
3 | event = 'VeryLazy',
4 | dependencies = 'nvim-tree/nvim-web-devicons',
5 | opts = {
6 | options = {
7 | icons_enabled = true,
8 | section_separators = { left = '', right = '' },
9 | component_separators = { left = '', right = '' },
10 | always_divide_middle = true,
11 | globalstatus = true
12 | },
13 | sections = {
14 | lualine_a = { { 'mode', separator = { left = '', right = '' } } },
15 | lualine_b = {
16 | {
17 | 'filename',
18 | newfile_status = true,
19 | symbols = {
20 | modified = '', readonly = '', unnamed = '', newfile = ''
21 | }
22 | },
23 | { 'branch', icon = '' },
24 | {
25 | 'diff', symbols = { added = ' ', modified = ' ', removed = ' ' }
26 | }
27 | },
28 | lualine_c = { 'diagnostics' },
29 | lualine_x = { '%S', 'searchcount', 'selectioncount' },
30 | lualine_y = {
31 | { 'filetype', icon = { align = 'right' } },
32 | 'fileformat',
33 | 'encoding'
34 | },
35 | lualine_z = {
36 | 'location',
37 | { 'progress', separator = { left = '', right = '' } }
38 | }
39 | }
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/nvim/lua/scratch-terminal.lua:
--------------------------------------------------------------------------------
1 | -- https://youtu.be/5PIiKDES_wc
2 |
3 | local self = { win = -1, buf = -1 }
4 |
5 | local function config()
6 | local c = {
7 | relative = 'editor',
8 | style = 'minimal',
9 | width = math.floor(vim.o.columns * (vim.o.columns < 150 and 0.9 or 0.7)),
10 | height = math.floor(vim.o.lines * 0.8),
11 | border = 'solid',
12 | }
13 | c.col = (vim.o.columns - c.width - 2) / 2
14 | c.row = (vim.o.lines - c.height - 2) / 2
15 | return c
16 | end
17 |
18 | local function toggle()
19 | if not vim.api.nvim_win_is_valid(self.win) then
20 | if not vim.api.nvim_buf_is_valid(self.buf) then
21 | self.buf = vim.api.nvim_create_buf(false, true)
22 | end
23 | self.win = vim.api.nvim_open_win(self.buf, true, config())
24 | if vim.bo[self.buf].buftype ~= 'terminal' then
25 | vim.cmd.terminal()
26 | end
27 | else
28 | vim.api.nvim_win_hide(self.win)
29 | end
30 | end
31 |
32 | vim.api.nvim_create_autocmd('VimResized', {
33 | group = vim.api.nvim_create_augroup('scratch-terminal', { clear = true }),
34 | callback = function()
35 | if vim.api.nvim_win_is_valid(self.win) then
36 | vim.api.nvim_win_set_config(self.win, config())
37 | end
38 | end
39 | })
40 |
41 | vim.api.nvim_create_user_command('Term', toggle, {})
42 |
43 | Keymap('', toggle, 'Toggle scratch terminal', { 'n', 't', 'i', 'x' })
44 |
--------------------------------------------------------------------------------
/nvim/lua/options.lua:
--------------------------------------------------------------------------------
1 | -- vim.o.title = true
2 | -- vim.o.titlestring = '%{v:progname} %f %h'
3 | vim.o.termguicolors = true
4 | vim.o.clipboard = 'unnamedplus'
5 | vim.o.fileencoding = 'utf-8'
6 | vim.o.mouse = 'a'
7 | vim.o.spelllang = 'en,it'
8 | vim.o.wrap = false
9 |
10 | vim.o.laststatus = 3
11 | vim.o.cmdheight = 0
12 | vim.o.showcmdloc = 'statusline'
13 | vim.o.showmode = false
14 |
15 | vim.o.pumheight = 8
16 | vim.o.completeopt = 'menu,menuone,noinsert,preview'
17 |
18 | vim.o.list = true
19 | vim.o.listchars = 'trail:-,tab: '
20 | vim.o.fillchars = 'eob: ,foldopen:⌄,foldsep:│,foldclose:›'
21 | vim.o.conceallevel = 2
22 |
23 | vim.o.signcolumn = 'yes'
24 | vim.o.number = true
25 | vim.o.relativenumber = false
26 | vim.o.cursorline = true
27 | vim.o.cursorlineopt = 'number'
28 |
29 | vim.o.history = 1000
30 | vim.o.backup = true
31 | vim.o.backupdir = vim.fn.stdpath('state') .. 'backup/'
32 | vim.o.undofile = true
33 | vim.o.updatetime = 200
34 |
35 | vim.o.ignorecase = true
36 | vim.o.smartcase = true
37 |
38 | vim.o.smartindent = true
39 | vim.o.expandtab = true
40 | vim.o.tabstop = 2
41 | vim.o.shiftwidth = 2
42 |
43 | vim.o.splitbelow = true
44 | vim.o.splitright = true
45 |
46 | vim.o.foldcolumn = 'auto:9'
47 | vim.o.foldlevel = 99
48 | vim.o.foldlevelstart = 99
49 | vim.o.foldenable = true
50 |
51 | vim.g.loaded_ruby_provider = 0
52 | vim.g.loaded_perl_provider = 0
53 | vim.g.loaded_python3_provider = 0
54 | vim.g.loaded_node_provider = 0
55 |
56 | vim.g.man_hardwrap = 0
57 |
--------------------------------------------------------------------------------
/nvim/lua/plugins/completion.lua:
--------------------------------------------------------------------------------
1 | return {
2 | 'saghen/blink.cmp',
3 | version = '1.*',
4 | event = 'InsertEnter',
5 | dependencies = {
6 | {
7 | 'L3MON4D3/LuaSnip',
8 | build = 'make install_jsregexp',
9 | version = 'v2.*',
10 | dependencies = 'rafamadriz/friendly-snippets',
11 | opts = {
12 | history = true,
13 | updateevents = 'TextChanged,TextChangedI',
14 | enable_autosnippets = true,
15 | },
16 | config = function(_, opts)
17 | require('luasnip.loaders.from_vscode').lazy_load()
18 | require('snippets')
19 | require('luasnip').config.set_config(opts)
20 | end
21 | },
22 | {
23 | 'folke/lazydev.nvim',
24 | ft = 'lua',
25 | opts = {
26 | library = { { path = '${3rd}/luv/library', words = { 'vim%.uv' } } }
27 | }
28 | }
29 | },
30 | opts = {
31 | completion = {
32 | documentation = {
33 | auto_show = true,
34 | auto_show_delay_ms = 500
35 | },
36 | ghost_text = { enabled = true }
37 | },
38 | snippets = { preset = 'luasnip' },
39 | sources = {
40 | default = { 'lsp', 'path', 'snippets', 'buffer', 'lazydev' },
41 | providers = {
42 | lazydev = {
43 | name = 'LazyDev',
44 | module = 'lazydev.integrations.blink',
45 | fallbacks = { 'lsp' }
46 | },
47 | buffer = { min_keyword_length = 2 }
48 | }
49 | },
50 | signature = { enabled = true }
51 | },
52 | opts_extend = { 'sources.default' }
53 | }
54 |
--------------------------------------------------------------------------------
/fish/functions/poggress.fish:
--------------------------------------------------------------------------------
1 | # https://github.com/faho/fish-snippets/blob/main/functions/poggress.fish
2 |
3 | function poggress --description "Display a progress bar"
4 | set -l width $COLUMNS
5 | # With -w WIDTH, format bar to given width (default is $COLUMNS)
6 | # With -c CHAR, use that to end the progress bar (default is "#")
7 | argparse w/width= c/char= -- $argv
8 | or return
9 | set -ql _flag_w
10 | and set width $_flag_w[-1]
11 | set -l char '>'
12 | set -ql _flag_c
13 | and set char $_flag_c[-1]
14 |
15 | set -l read 0
16 | if not set -q argv[1]; and not isatty stdin
17 | set read 1
18 | end
19 | set -l perc
20 | while if test $read = 1
21 | read perc
22 | else
23 | set -q argv[1]; and set perc $argv[1]; and set -e argv[1]
24 | end
25 | # We do percent, so we pad the number + the % to 5 cells,
26 | # and we always use at least one '#' (string pad doesn't *remove* characters when width is 0)
27 | set -l fill (math -s0 max 1, min $width x "($perc / 100)", $width - 5)
28 |
29 | # (this is the actual number padding
30 | set perc (string pad -w 5 -c ' ' $perc%)
31 |
32 | set -l bar (string pad -w $fill -c '=' $char)
33 |
34 | # Rest of the width gets spaces and then foo%
35 | set -l percwidth (math -s0 $width - $fill)
36 | set -l percent (string pad -w $percwidth -c ' ' $perc)
37 |
38 | printf %s $bar $percent
39 | end
40 | end
41 |
42 | # for i in (seq 100)
43 | # poggress $i
44 | # printf \r
45 | # sleep 0.02
46 | # end; and echo \nDone!
47 |
--------------------------------------------------------------------------------
/nvim/lua/plugins/colors.lua:
--------------------------------------------------------------------------------
1 | return {
2 | {
3 | 'ellisonleao/gruvbox.nvim',
4 | opts = {
5 | contrast = 'hard',
6 | italic = {
7 | strings = false,
8 | emphasis = true,
9 | comments = false,
10 | operators = false,
11 | folds = true,
12 | },
13 | overrides = {
14 | CursorLineNr = { bg = '', bold = true }, -- Remove bg in line number
15 | SignColumn = { link = 'Normal' }, -- Normal bg
16 | StatusLine = { link = 'Normal' }, -- transparent bg for '' ''
17 | ZenBg = { link = 'Normal' },
18 |
19 | -- Remove lighter background from diagnostic signs
20 | DiagnosticSignError = { link = 'GruvboxRed' },
21 | DiagnosticSignInfo = { link = 'GruvboxBlue' },
22 | DiagnosticSignWarn = { link = 'GruvboxYellow' },
23 | DiagnosticSignHint = { link = 'GruvboxAqua' },
24 |
25 | LspReferenceWrite = { link = 'CursorLine' },
26 | LspReferenceText = { link = 'CursorLine' },
27 | LspReferenceRead = { link = 'CursorLine' },
28 | }
29 | },
30 | config = function(_, opts)
31 | require('gruvbox').setup(opts)
32 | vim.cmd.colorscheme('gruvbox')
33 | end
34 | },
35 | {
36 | 'wtfox/jellybeans.nvim',
37 | priority = 1000,
38 | opts = {
39 | flat_ui = false,
40 | transparent = false,
41 | },
42 | config = function(_, opts)
43 | require('jellybeans').setup(opts)
44 | -- vim.cmd.colorscheme('jellybeans-muted')
45 | -- require('lualine').setup { options = { theme = 'jellybeans' } }
46 | end
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/fish/functions/backup.fish:
--------------------------------------------------------------------------------
1 | function backup --description 'Backup ~ with restic to a sftp location'
2 | set -l output (systemd-inhibit --why='Home backup' \
3 | restic backup \
4 | --json --quiet \
5 | --repo sftp:server:laptop-backup \
6 | --password-command='secret-tool lookup service restic_backup' \
7 | --exclude='**/*cache*' \
8 | --exclude='**/*Cache*' \
9 | --exclude='**/.var' \
10 | --exclude='**/.local/share/gnome-boxes' \
11 | --exclude='**/.local/share/rustup' \
12 | --exclude='**/Downloads' \
13 | --exclude='**/Trash' \
14 | $HOME
15 | )
16 |
17 | set -f urgency critical
18 | set -f summary 'Unexpected output'
19 | set -f body "Here's the full output $output"
20 | switch (echo $output | jq -r .message_type)
21 | case summary
22 | set urgency low # Not shown on screen but left in the drawer
23 | set summary 'Backup completed'
24 | set body "$(math (echo $output | jq -r .files_new) + (echo $output | jq -r .files_changed)) files, $(echo (string split ' ≈ ' (qalc -s 'prec 2' (echo $output | jq -r .data_added) bytes))[2]), in $(echo $output | jq -r .total_duration | awk '{printf "%02d:%02d:%02d\n", $1/3600, ($1%3600)/60, $1%60}')" # *chef's kiss*
25 | case exit_error
26 | set summary 'Backup failed'
27 | set body (echo $output | jq -r .message)
28 | end
29 |
30 | notify-send -a Backup -i drive-harddisk -u $urgency "$summary" "$body"
31 |
32 | # see also ~/.config/systemd/user/backup.service
33 | # and ~/.config/systemd/user/backup.timer
34 | end
35 |
--------------------------------------------------------------------------------
/nvim/lua/plugins/telescope.lua:
--------------------------------------------------------------------------------
1 | return {
2 | 'nvim-telescope/telescope.nvim',
3 | dependencies = {
4 | 'nvim-lua/plenary.nvim',
5 | { 'nvim-telescope/telescope-fzf-native.nvim', build = 'make' },
6 | 'nvim-telescope/telescope-ui-select.nvim',
7 | 'nvim-tree/nvim-web-devicons'
8 | },
9 | keys = {
10 | 'h', '', 't', 'sw', 's',
11 | 'rs', 'p', 'rf', 'k', '',
12 | '/'
13 | },
14 | config = function()
15 | local telescope = require 'telescope'
16 | telescope.setup {
17 | extensions = {
18 | ['ui-select'] = {
19 | require 'telescope.themes'.get_dropdown(),
20 | },
21 | fzf = {}
22 | },
23 | }
24 | telescope.load_extension 'fzf'
25 | telescope.load_extension 'ui-select'
26 |
27 | local b = require 'telescope.builtin'
28 | Keymap('h', b.help_tags, 'Telescope: Help')
29 | Keymap('', b.find_files, 'Telescope: Find Files')
30 | Keymap('', b.builtin, 'Telescope')
31 | Keymap('sw', b.grep_string, 'Telescope: Find Word')
32 | Keymap('g', b.live_grep, 'Telescope: Live Grep')
33 | Keymap('rs', b.resume, 'Telescope: Resume Live Grep')
34 | Keymap('p', b.diagnostics, 'Telescope: Workspace Diagnostics')
35 | Keymap('rf', b.oldfiles, 'Telescope: Oldfiles')
36 | Keymap('k', b.keymaps, 'Telescope: Key Maps')
37 | Keymap('', b.buffers, 'Telescope: Buffers')
38 | Keymap('/', b.current_buffer_fuzzy_find,
39 | 'Telescope: Current Buffer Fuzzy')
40 | end
41 | }
42 |
--------------------------------------------------------------------------------
/nvim/lua/plugins/git.lua:
--------------------------------------------------------------------------------
1 | return {
2 | 'lewis6991/gitsigns.nvim',
3 | event = { 'BufReadPost', 'BufNewFile' },
4 | dependencies = 'nvim-lua/plenary.nvim',
5 | opts = {
6 | signs = { untracked = { text = '' } },
7 | max_file_length = 2000,
8 | on_attach = function()
9 | local g = require 'gitsigns'
10 | Keymap(']c', function()
11 | if vim.wo.diff then
12 | vim.cmd.normal { ']c', bang = true }
13 | else
14 | g.nav_hunk 'next'
15 | end
16 | end, 'Git: go to next change')
17 | Keymap('[c', function()
18 | if vim.wo.diff then
19 | vim.cmd.normal { '[c', bang = true }
20 | else
21 | g.nav_hunk 'prev'
22 | end
23 | end, 'Git: go to previous change')
24 | Keymap('hs',
25 | function() g.reset_hunk { vim.fn.line '.', vim.fn.line 'v' } end,
26 | 'Git: reset hunk')
27 | Keymap('sh', g.stage_hunk, 'Git: stage hunk')
28 | Keymap('rh', g.reset_hunk, 'Git: reset hunk')
29 | Keymap('sb', g.stage_buffer, 'Git: stage buffer')
30 | Keymap('uh', g.undo_stage_hunk, 'Git: unstage hunk')
31 | Keymap('rb', g.reset_buffer, 'Git: reset buffer')
32 | Keymap('vh', g.preview_hunk, 'Git: preview hunk')
33 | Keymap('gb', g.blame_line, 'Git: blame line')
34 | Keymap('dt', g.diffthis, 'Git: diff against index')
35 | Keymap('dtc', function() g.diffthis '@' end,
36 | 'Git: diff against latest commit')
37 | Keymap('lb', g.toggle_current_line_blame,
38 | 'Git: toggle blame on current line')
39 | Keymap('tD', g.toggle_deleted, 'Git: toggle deleted')
40 | end,
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/nvim/lua/keymaps.lua:
--------------------------------------------------------------------------------
1 | function Keymap(lhs, rhs, opts, mode)
2 | opts = type(opts) == 'string' and { desc = opts }
3 | or vim.tbl_extend('error', opts --[[@as table]], { buffer = bufnr })
4 | vim.keymap.set(mode or 'n', lhs, rhs, opts)
5 | end
6 |
7 | Keymap('', 'set invspell', 'Toggle spell checking')
8 | Keymap('', 'move .-2==', 'Move line up')
9 | Keymap('', 'move .+1==', 'Move line down')
10 | Keymap('', ":m '<-2gv-gv",
11 | { silent = true, desc = 'Move line or selection up' }, 'x')
12 | Keymap('', ":m '>+1gv-gv",
13 | { silent = true, desc = 'Move line or selection down' }, 'x')
14 |
15 | -- Don't lose selection when indenting in visual mode
16 | Keymap('<', '', '>gv', 'Indent line or selection', 'v')
18 |
19 | -- Keymap('[d', vim.diagnostic.goto_prev, 'Previous diagnostic message')
20 | -- Keymap(']d', vim.diagnostic.goto_next, 'Next diagnostic mesage')
21 | Keymap('e', vim.diagnostic.open_float, 'Show diagnostic message')
22 | Keymap('q', vim.diagnostic.setloclist, 'Open diagnostics quickfix list')
23 |
24 | Keymap('dd',
25 | function()
26 | local line_data = vim.api.nvim_win_get_cursor(0)
27 | local current_line = vim.api.nvim_buf_get_lines(0, line_data[1] - 1,
28 | line_data[1], false)
29 | if current_line[1] == '' then
30 | return '"_dd'
31 | else
32 | return 'dd'
33 | end
34 | end,
35 | {
36 | noremap = true,
37 | expr = true,
38 | desc = "dd on empty line doesn't overwrite clibboard"
39 | })
40 |
41 | Keymap('l', function()
42 | local word_under_cursor = vim.fn.escape(vim.fn.expand(''), [[\/]])
43 | vim.system {
44 | 'xdg-open',
45 | 'https://en.wiktionary.org/wiki/' .. word_under_cursor
46 | }
47 | end, 'Lookup word under cursor on the Wiktionary.')
48 |
--------------------------------------------------------------------------------
/fish/functions/theme.fish:
--------------------------------------------------------------------------------
1 | function theme --description "Change terminal theme"
2 | # Update colorscheme of for all pts devices in /dev/pts/[0-9]
3 | # https://codeberg.org/dnkl/foot/wiki#dynamic-color-changes
4 |
5 | argparse h/help l/list-themes -- $argv
6 | or return 1
7 |
8 | function usage
9 | echo "Usage: $_ [options] [theme]"
10 | echo
11 | echo 'Options:'
12 | echo ' -h, --help Print help'
13 | echo ' -l, --list-themes List available themes'
14 | end
15 |
16 | if set -q _flag_help
17 | usage
18 | return
19 | end
20 |
21 | if set -q _flag_list_themes
22 | echo gruvbox-dark-hard
23 | echo gruvbox-light-hard
24 | return
25 | end
26 |
27 | test (count $argv) -eq 1
28 | or usage && return 1
29 |
30 | set -l background
31 | set -l foreground
32 | set -l palette
33 | switch $argv[1]
34 | case gruvbox-dark-hard
35 | set background '#1d2021'
36 | set foreground '#ebdbb2'
37 | set palette '#3c3836 #cc241d #98971a #d79921 #458588 #b16286 #689d6a
38 | #a89984 928374 #fb4934 #b8bb26 #fabd2f #83a598 #d3869b #8ec07c #fbf1c7'
39 | case gruvbox-light-hard
40 | set background '#f9f5d7'
41 | set foreground '#504945'
42 | set palette '#bdae93 #9d0006 #79740e #b57614 #076678 #8f3f71 #427b58
43 | #504945 928374 #9d0006 #79740e #b57614 #076678 #8f3f71 #427b58 #282828'
44 | case '*'
45 | echo "Unknown theme '$argv[1]', use --list-themes to see available themes"
46 | return 1
47 | end
48 |
49 | printf "\033]10;$foreground\007" | tee '/dev/pts/[0-9]+' 2>/dev/null # foreground
50 | printf "\033]11;$background\007" | tee '/dev/pts/[0-9]+' 2>/dev/null # background
51 | printf "\033]12;$foreground\007" | tee '/dev/pts/[0-9]+' 2>/dev/null # cursor
52 |
53 | set -l i 0
54 | for color in $palette
55 | printf "\033]4;$i;$color\007" | tee '/dev/pts/[0-9]+' 2>/dev/null
56 | set i (math $i + 1)
57 | end
58 | end
59 |
--------------------------------------------------------------------------------
/nvim/lua/plugins/treesitter.lua:
--------------------------------------------------------------------------------
1 | return {
2 | 'nvim-treesitter/nvim-treesitter',
3 | build = ':TSUpdate',
4 | dependencies = {
5 | {
6 | 'hiphish/rainbow-delimiters.nvim',
7 | config = function()
8 | vim.g.rainbow_delimiters = {
9 | highlight = {
10 | 'GruvboxPurple',
11 | 'GruvboxBlue',
12 | 'GruvboxAqua',
13 | 'GruvboxGreen',
14 | 'GruvboxYellow',
15 | 'GruvboxOrange',
16 | 'GruvboxRed',
17 | }
18 | }
19 | end
20 | },
21 | 'nvim-treesitter/nvim-treesitter-textobjects'
22 | },
23 | config = function()
24 | require 'nvim-treesitter.configs'.setup {
25 | ensure_installed = {
26 | 'bash', 'c', 'html', 'lua', 'vim',
27 | 'luadoc', 'markdown', 'vimdoc'
28 | },
29 | modules = {},
30 | sync_install = false,
31 | ignore_install = {},
32 | auto_install = true,
33 | highlight = { enable = true },
34 | indent = { enable = true },
35 | incremental_selection = {
36 | enable = true,
37 | keymaps = {
38 | init_selection = '',
39 | node_incremental = '',
40 | node_decremental = ''
41 | }
42 | },
43 | textobjects = {
44 | enable = true,
45 | swap = { -- Swap node under the cursor
46 | enable = true,
47 | swap_next = { ['a'] = '@parameter.inner' },
48 | swap_previous = { ['A'] = '@parameter.inner' }
49 | },
50 | move = {
51 | enable = true,
52 | set_jumps = true, -- Register jumps in the jump list
53 | goto_next_start = {
54 | [']m'] = '@function.outer',
55 | [']]'] = '@class.outer',
56 | },
57 | goto_next_end = {
58 | [']M'] = '@function.outer',
59 | [']['] = '@class.outer',
60 | },
61 | goto_previous_start = {
62 | ['[m'] = '@function.outer',
63 | ['[['] = '@class.outer',
64 | },
65 | goto_previous_end = {
66 | ['[M'] = '@function.outer',
67 | ['[]'] = '@class.outer',
68 | }
69 | }
70 | }
71 | }
72 | end
73 | }
74 |
--------------------------------------------------------------------------------
/helix/languages.toml:
--------------------------------------------------------------------------------
1 | [language-server]
2 | harper = { command = "harper-ls", args = ["--stdio"] }
3 | rumdl = { command = "rumdl", args = ["server"] }
4 | emmet = { command = "emmet-language-server", args = ["--stdio"] }
5 |
6 | [language-server.eslint]
7 | command = "eslint-language-server"
8 | args = ["--stdio"]
9 |
10 | [language-server.eslint.config]
11 | codeActionsOnSave = { mode = "all", "source.fixAll.eslint" = true }
12 | format = { enable = true }
13 | nodePath = ""
14 | quiet = false
15 | rulesCustomizations = []
16 | run = "onType"
17 | validate = "on"
18 | experimental = {}
19 | problems = { shortenToSingleLine = false }
20 |
21 | [language-server.eslint.config.codeAction]
22 | disableRuleComment = { enable = true, location = "separateLine" }
23 | showDocumentation = { enable = false }
24 |
25 | [language-server.vscode-json-language-server.config]
26 | json = { validate = { enable = true }, format = { enable = true } }
27 | provideFormatter = true
28 |
29 | [language-server.vscode-css-language-server.config]
30 | css = { validate = { enable = true } }
31 | scss = { validate = { enable = true } }
32 | less = { validate = { enable = true } }
33 | provideFormatter = true
34 |
35 | [[language]]
36 | name = "markdown"
37 | soft-wrap = { enable = true, wrap-at-text-width = true }
38 | language-servers = ["marksman", "rumdl", "harper"]
39 |
40 | [[language]]
41 | name = "typst"
42 | soft-wrap = { enable = true, wrap-at-text-width = true }
43 | language-servers = ["tinymist", "harper"]
44 |
45 | [[language]]
46 | name = "typescript"
47 | language-servers = [ "typescript-language-server", "eslint", "emmet" ]
48 | formatter = { command = "dprint", args = [ "fmt", "--stdin", "typescript" ] }
49 | auto-format = true
50 |
51 | [[language]]
52 | name = "javascript"
53 | language-servers = [ "typescript-language-server", "eslint", "emmet" ]
54 | formatter = { command = "dprint", args = [ "fmt", "--stdin", "javascript" ] }
55 | auto-format = true
56 |
57 | [[language]]
58 | name = "json"
59 | formatter = { command = "dprint", args = [ "fmt", "--stdin", "json" ] }
60 | auto-format = true
61 |
62 | [[language]]
63 | name = "html"
64 | language-servers = [ "vscode-html-language-server", "superhtml", "emmet" ]
65 | auto-format = true
66 |
67 | [[language]]
68 | name = "css"
69 | language-servers = [ "vscode-css-language-server", "emmet" ]
70 | auto-format = true
71 |
--------------------------------------------------------------------------------
/fish/functions/tohevc.fish:
--------------------------------------------------------------------------------
1 | function tohevc --description 'Encode videos to HEVC/x265 mp4'
2 | argparse d/dry-run h/help r/recursive -- $argv
3 | or return
4 |
5 | if set -q _flag_help
6 | echo Usage:
7 | echo " $_ [options] files..."
8 | echo
9 | echo Options
10 | echo ' -d, --dry-run list files that can be converted'
11 | echo ' -h, --help show help usage'
12 | echo ' -r, --recursive descend directories and search for videos to convert'
13 | return
14 | end
15 |
16 | if not set -q argv[1] && not set -q _flag_recursive
17 | echo 'Usage: tohevc [options] files...'
18 | return 1
19 | end
20 |
21 | if set -q _flag_recursive
22 | set -f files **/*.{mp4,m4a,mov,m4v,wmv,mkv,ts,mpg}
23 | else
24 | set -f files $argv
25 | end
26 |
27 | function should_be_converted -d 'Determine if a file should be converted to HEVC'
28 | set -l compressor_id (exiftool -b -CompressorID $argv[1] 2>/dev/null)
29 | if test -z "$compressor_id"
30 | warn "'$argv[1]' has no CompressorID"
31 | return
32 | end
33 | return (test $compressor_id != hev1 && test $compressor_id != hvc1)
34 | end
35 |
36 | if set -q _flag_dry_run
37 | for file in $files
38 | should_be_converted $file
39 | and echo $file
40 | end
41 | return 0
42 | end
43 |
44 | function convert
45 | set -l output (path dirname $argv[1])/.hevc_(path change-extension mp4 (path basename $argv[1]))
46 | set -l size_before (du -h $argv[1] | cut -d \t -f 1)
47 | set -l size_before_KiB (du $argv[1] | cut -d \t -f 1)
48 | set -l start_time (date +%s)
49 | ffmpeg -y -nostats -hide_banner -loglevel error -i $argv[1] -c:v libx265 -vtag hvc1 \
50 | -x265-params "log-level=warning" $output
51 | and info "encoded '$argv[1]', $size_before -> $(du -h $output | cut -d \t -f 1)," \
52 | "factor $(math $size_before_KiB / $(du $output | cut -d \t -f 1))," \
53 | "in $(math (date +%s) - $start_time | awk '{printf "%02d:%02d:%02d\n", $1/3600, ($1%3600)/60, $1%60}')"
54 | and gio trash $argv[1] # Original file is not lost
55 | and mv $output (string replace .hevc_ '' $output)
56 | end
57 |
58 | for file in $files
59 | if should_be_converted $file
60 | convert $file
61 | end
62 | end
63 | end
64 |
--------------------------------------------------------------------------------
/nvim/lua/snippets/asm.lua:
--------------------------------------------------------------------------------
1 | LS.add_snippets("asm", {
2 | -- The trigger should be already indented
3 |
4 | S({ trig = ".type", desc = "Function boilerplate (Aarch-64)" },
5 | {
6 | T(" .type "), I(1), T({ ", %function", -- .type main, %function
7 | " .global " }), Rep(1), T({ "", "" }), -- .global main
8 | Rep(1), T({ ":", -- main:
9 | " stp x29, x30, [sp, #-16]!", "", "" }), -- stp x29, x30, [sp, #-16]!
10 | I(2), -- *function body*
11 | T({ "", "", " mov w0, #0", -- mov w0, #0
12 | " ldp x29, x30, [sp], #16" }), -- ldp x29, x30, [sp], #16
13 | T({ "", " ret", -- ret
14 | " .size " }), Rep(1), T(", (. - "), Rep(1), T(")") -- .size main, (. - main)
15 | }
16 | ),
17 |
18 | S({ trig = ".size" },
19 | {
20 | T(".size "), I(1), T(", (. - "), Rep(1), T(")") -- .size main, (. - main)
21 | }
22 | ),
23 |
24 | S({ trig = ".macro" },
25 | {
26 | T(".macro "), I(1), T({ "", ".endm" })
27 | }
28 | ),
29 |
30 | S({ trig = ".section" },
31 | {
32 | T(".section .rodata")
33 | }
34 | ),
35 |
36 | S({ trig = "read", desc = "A macro to read user input." }, -- uses GNU C lib
37 | {
38 | T({ ".macro read dest", "" }),
39 | T({ "adr x0, prompt", "" }),
40 | T({ "bl printf", "" }),
41 | T({ "adr x0, fmt_scan", "" }),
42 | T({ "adr x1, \\dest", "" }),
43 | T({ "bl scanf", "" }),
44 | T({ ".endm" })
45 | }
46 | ),
47 |
48 | S({ trig = "pstate", desc = "Print PSTATE." },
49 | {
50 | T({ "fmt_PSTATE: .string \"NZCV = %d%d%d%d\\n\"", "", "" }),
51 | T({ ".macro print_PSTATE", "" }),
52 | T({ "adr x0, fmt_PSTATE", "" }),
53 | T({ "cset w1, mi", "" }),
54 | T({ "cset w2, eq", "" }),
55 | T({ "cset w3, cs", "" }),
56 | T({ "cset w4, vs", "" }),
57 | T({ "bl printf", "" }),
58 | T({ ".endm" })
59 | }
60 | )
61 | })
62 |
--------------------------------------------------------------------------------
/fish/fish_variables:
--------------------------------------------------------------------------------
1 | # This file contains fish universal variable definitions.
2 | # VERSION: 3.0
3 | SETUVAR __fish_git_prompt_char_dirtystate:\x1d
4 | SETUVAR __fish_git_prompt_char_stagedstate:\x1d
5 | SETUVAR __fish_git_prompt_char_stateseparator:
6 | SETUVAR __fish_git_prompt_char_untrackedfiles:\x1d
7 | SETUVAR __fish_git_prompt_char_upstream_prefix:\x20
8 | SETUVAR __fish_git_prompt_color_branch_dirty:D65D0E
9 | SETUVAR __fish_git_prompt_color_branch_staged:yellow
10 | SETUVAR __fish_git_prompt_color_merging:brmagenta
11 | SETUVAR __fish_git_prompt_color_prefix:brblack
12 | SETUVAR __fish_git_prompt_color_suffix:brblack
13 | SETUVAR __fish_git_prompt_showcolorhints:true
14 | SETUVAR __fish_git_prompt_showstashstate:true
15 | SETUVAR __fish_git_prompt_showupstream:true
16 | SETUVAR __fish_git_prompt_use_informative_chars:\x1d
17 | SETUVAR __fish_initialized:3800
18 | SETUVAR fish_color_autosuggestion:brblack
19 | SETUVAR fish_color_command:blue
20 | SETUVAR fish_color_comment:brblack
21 | SETUVAR fish_color_cwd:green
22 | SETUVAR fish_color_end:magenta
23 | SETUVAR fish_color_error:brred
24 | SETUVAR fish_color_escape:brcyan
25 | SETUVAR fish_color_history_current:green
26 | SETUVAR fish_color_keyword:red
27 | SETUVAR fish_color_operator:magenta
28 | SETUVAR fish_color_option:yellow
29 | SETUVAR fish_color_param:normal
30 | SETUVAR fish_color_quote:brgreen
31 | SETUVAR fish_color_redirection:magenta
32 | SETUVAR fish_color_search_match:white\x1e\x2d\x2dbackground\x3dbrblack
33 | SETUVAR fish_color_selection:brblack\x1e\x2d\x2dbold\x1e\x2d\x2dbackground\x3dwhite
34 | SETUVAR fish_color_valid_path:brcyan\x1e\x2d\x2dunderline
35 | SETUVAR fish_cursor_default:block
36 | SETUVAR fish_cursor_external:line
37 | SETUVAR fish_cursor_insert:line
38 | SETUVAR fish_cursor_replace:underscore
39 | SETUVAR fish_cursor_replace_one:underscore
40 | SETUVAR fish_cursor_visual:block
41 | SETUVAR fish_greeting:\x1d
42 | SETUVAR fish_key_bindings:fish_vi_key_bindings
43 | SETUVAR fish_pager_color_description:yellow
44 | SETUVAR fish_pager_color_selected_background:\x2d\x2dbackground\x3dblack
45 | SETUVAR fish_pager_color_selected_completion:brmagenta
46 | SETUVAR fish_pager_color_selected_description:bryellow
47 | SETUVAR fish_pager_color_selected_prefix:blue
48 | SETUVAR fish_user_paths:/home/mario/\x2elocal/share/JetBrains/Toolbox/apps/android\x2dstudio/bin\x1e/var/lib/flatpak/exports/bin\x1e/home/mario/\x2econfig/luarocks/bin\x1e/home/mario/\x2eluarocks/bin\x1e/home/mario/\x2elocal/share/nvim/mason/bin\x1e/usr/lib/rustup/bin\x1e/usr/bin/site_perl\x1e/usr/bin/vendor_perl\x1e/usr/bin/core_perl\x1e/usr/lib/jvm/default/bin\x1e/usr/local/sbin\x1e/usr/local/bin\x1e/usr/bin\x1e/home/mario/\x2elocal/bin\x1e/home/mario/\x2elocal/share/cargo/bin\x1e/home/mario/\x2elocal/share/npm/bin\x1e/home/mario/\x2elocal/share/go/bin\x1e/home/mario/\x2elocal/share/pipx/bin\x1e/home/mario/\x2elocal/share/JetBrains/Toolbox/apps/intellij\x2didea\x2dultimate/bin
49 | SETUVAR fish_vi_force_cursor:1
50 |
--------------------------------------------------------------------------------
/nvim/lazy-lock.json:
--------------------------------------------------------------------------------
1 | {
2 | "LuaSnip": { "branch": "master", "commit": "458560534a73f7f8d7a11a146c801db00b081df0" },
3 | "blink.cmp": { "branch": "main", "commit": "bae4bae0eedd1fa55f34b685862e94a222d5c6f8" },
4 | "cellular-automaton.nvim": { "branch": "main", "commit": "1606e9d5d04ff254023c3f3c62842d065708d6d3" },
5 | "fidget.nvim": { "branch": "main", "commit": "4d5858bd4c471c895060e1b9f3575f1551184dc5" },
6 | "friendly-snippets": { "branch": "main", "commit": "572f5660cf05f8cd8834e096d7b4c921ba18e175" },
7 | "gitsigns.nvim": { "branch": "main", "commit": "f780609807eca1f783a36a8a31c30a48fbe150c5" },
8 | "gruvbox.nvim": { "branch": "main", "commit": "5e0a460d8e0f7f669c158dedd5f9ae2bcac31437" },
9 | "indent-blankline.nvim": { "branch": "master", "commit": "005b56001b2cb30bfa61b7986bc50657816ba4ba" },
10 | "jellybeans.nvim": { "branch": "main", "commit": "28b80886b54396b13a2a85edf608926333e842b9" },
11 | "lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" },
12 | "lazydev.nvim": { "branch": "main", "commit": "2367a6c0a01eb9edb0464731cc0fb61ed9ab9d2c" },
13 | "lualine.nvim": { "branch": "master", "commit": "b8c23159c0161f4b89196f74ee3a6d02cdc3a955" },
14 | "mason-lspconfig.nvim": { "branch": "main", "commit": "7f9a39fcd2ac6e979001f857727d606888f5909c" },
15 | "mason.nvim": { "branch": "main", "commit": "7dc4facca9702f95353d5a1f87daf23d78e31c2a" },
16 | "nvim-cmp": { "branch": "main", "commit": "b555203ce4bd7ff6192e759af3362f9d217e8c89" },
17 | "nvim-colorizer.lua": { "branch": "master", "commit": "a065833f35a3a7cc3ef137ac88b5381da2ba302e" },
18 | "nvim-dap": { "branch": "master", "commit": "7523676a4be17644587aa47e4d42f6f7646d4727" },
19 | "nvim-lint": { "branch": "master", "commit": "f126af5345c7472e9a0cdbe1d1a29209be72c4c4" },
20 | "nvim-lspconfig": { "branch": "master", "commit": "d89f4891f0720cd2598e4bdd60010d8784b2ac8a" },
21 | "nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" },
22 | "nvim-treesitter-textobjects": { "branch": "master", "commit": "71385f191ec06ffc60e80e6b0c9a9d5daed4824c" },
23 | "nvim-web-devicons": { "branch": "master", "commit": "6e51ca170563330e063720449c21f43e27ca0bc1" },
24 | "oil.nvim": { "branch": "master", "commit": "07f80ad645895af849a597d1cac897059d89b686" },
25 | "plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" },
26 | "rainbow-delimiters.nvim": { "branch": "master", "commit": "687ef75fdbd497eabc9eea92b52e7b4d403b3319" },
27 | "telescope-fzf-native.nvim": { "branch": "main", "commit": "1f08ed60cafc8f6168b72b80be2b2ea149813e55" },
28 | "telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" },
29 | "telescope.nvim": { "branch": "master", "commit": "b4da76be54691e854d3e0e02c36b0245f945c2c7" },
30 | "ui.nvim": { "branch": "main", "commit": "4df20c2d97c0cce381ef275f8cdacea262b817f3" },
31 | "zen-mode.nvim": { "branch": "main", "commit": "863f150ca321b3dd8aa1a2b69b5f411a220e144f" }
32 | }
33 |
--------------------------------------------------------------------------------
/procps/toprc:
--------------------------------------------------------------------------------
1 | top's Config File (Linux processes with windows)
2 | Id:m, Mode_altscr=0, Mode_irixps=0, Delay_time=3.0, Curwin=0
3 | Def fieldscur= 75 77 107 81 103 105 119 123 129 137 111 117 115 139 78 82 84 86 88 90
4 | 92 94 96 98 100 108 112 120 124 126 164 130 132 134 140 142 144 146 148 150
5 | 152 154 156 158 160 162 166 168 170 172 174 176 178 180 182 184 186 188 190 192
6 | 194 196 198 200 202 204 206 208 210 212 214 216 218 220 222 224 226 228 230 232
7 | 234 236 238 240 242 244 246 248 250 252 254 256 258 260 262 264 266 268 270 272
8 | winflags=163636, sortindx=18, maxtasks=0, graph_cpus=1, graph_mems=0, double_up=0, combine_cpus=0, core_types=0
9 | summclr=6, msgsclr=5, headclr=7, taskclr=-1, task_xy=3
10 | Job fieldscur= 75 77 115 111 117 80 103 105 137 119 123 128 120 79 139 82 84 86 88 90
11 | 92 94 96 98 100 106 108 112 124 126 130 132 134 140 142 144 146 148 150 152
12 | 154 156 158 160 162 164 166 168 170 172 174 176 178 180 182 184 186 188 190 192
13 | 194 196 198 200 202 204 206 208 210 212 214 216 218 220 222 224 226 228 230 232
14 | 234 236 238 240 242 244 246 248 250 252 254 256 258 260 262 264 266 268 270 272
15 | winflags=193844, sortindx=0, maxtasks=0, graph_cpus=0, graph_mems=0, double_up=0, combine_cpus=0, core_types=0
16 | summclr=6, msgsclr=6, headclr=7, taskclr=-1, task_xy=6
17 | Mem fieldscur= 75 117 119 120 123 125 127 129 131 154 132 156 135 136 102 104 111 139 76 78
18 | 80 82 84 86 88 90 92 94 96 98 100 106 108 112 114 140 142 144 146 148
19 | 150 152 158 160 162 164 166 168 170 172 174 176 178 180 182 184 186 188 190 192
20 | 194 196 198 200 202 204 206 208 210 212 214 216 218 220 222 224 226 228 230 232
21 | 234 236 238 240 242 244 246 248 250 252 254 256 258 260 262 264 266 268 270 272
22 | winflags=193844, sortindx=21, maxtasks=0, graph_cpus=0, graph_mems=0, double_up=0, combine_cpus=0, core_types=0
23 | summclr=5, msgsclr=5, headclr=4, taskclr=-1, task_xy=5
24 | Usr fieldscur= 75 77 79 81 85 97 115 111 117 137 139 82 86 88 90 92 94 98 100 102
25 | 104 106 108 112 118 120 122 124 126 128 130 132 134 140 142 144 146 148 150 152
26 | 154 156 158 160 162 164 166 168 170 172 174 176 178 180 182 184 186 188 190 192
27 | 194 196 198 200 202 204 206 208 210 212 214 216 218 220 222 224 226 228 230 232
28 | 234 236 238 240 242 244 246 248 250 252 254 256 258 260 262 264 266 268 270 272
29 | winflags=193844, sortindx=3, maxtasks=0, graph_cpus=0, graph_mems=0, double_up=0, combine_cpus=0, core_types=0
30 | summclr=3, msgsclr=3, headclr=2, taskclr=-1, task_xy=3
31 | Fixed_widest=0, Summ_mscale=2, Task_mscale=1, Zero_suppress=1, Tics_scaled=0
32 |
--------------------------------------------------------------------------------
/nvim/lua/plugins/lsp.lua:
--------------------------------------------------------------------------------
1 | local function inlay_hints(client, bufnr)
2 | if client:supports_method(client.server_capabilities.inlayHintProvider, bufnr) then
3 | Keymap('ih', function()
4 | vim.lsp.inlay_hint.enable(not vim.lsp.inlay_hint.is_enabled({ bufnr = bufnr }))
5 | end, 'LSP: toggle inlay hints')
6 | end
7 | end
8 |
9 | local function highlight_current_symbol(client, bufnr)
10 | if client:supports_method(vim.lsp.protocol.Methods.textDocument_documentHighlight, bufnr) then
11 | local group = vim.api.nvim_create_augroup('highlight-references',
12 | { clear = false })
13 | vim.api.nvim_create_autocmd({ 'CursorHold', 'CursorHoldI' }, {
14 | buffer = bufnr,
15 | group = group,
16 | callback = vim.lsp.buf.document_highlight,
17 | desc = 'LSP: hihlight references of symbol under cursor'
18 | })
19 | vim.api.nvim_create_autocmd({ 'CursorMoved', 'CursorMovedI' }, {
20 | buffer = bufnr,
21 | group = group,
22 | callback = vim.lsp.buf.clear_references,
23 | desc = 'LSP: clear references highlight'
24 | })
25 | vim.api.nvim_create_autocmd('LspDetach', {
26 | group = group,
27 | callback = function(event)
28 | vim.lsp.buf.clear_references()
29 | vim.api.nvim_clear_autocmds {
30 | group = group,
31 | buffer = event.buf
32 | }
33 | end,
34 | desc = 'LSP: stop highlighting references.'
35 | })
36 | end
37 | end
38 |
39 | local function create_keymaps()
40 | local t = require 'telescope.builtin'
41 | Keymap('gd', t.lsp_definitions, 'LSP: go to definition')
42 | Keymap('gD', vim.lsp.buf.declaration, 'LSP: go to declaration')
43 | Keymap('gri', t.lsp_implementations, 'LSP: go to implementation')
44 | Keymap('gtd', t.lsp_type_definitions, 'LSP: go to type definition')
45 | Keymap('grr', t.lsp_references, 'LSP: references')
46 | Keymap('gO', t.lsp_document_symbols, 'LSP: document symbols')
47 | Keymap('ws', t.lsp_dynamic_workspace_symbols, 'LSP: workspace symbols')
48 | Keymap('wa', vim.lsp.buf.add_workspace_folder,
49 | 'LSP: add workspace folder')
50 | Keymap('wr', vim.lsp.buf.remove_workspace_folder,
51 | 'LSP: remove workspace folder')
52 | Keymap('wl',
53 | function() print(vim.inspect(vim.lsp.buf.list_workspace_folders())) end,
54 | 'LSP: list workspace folders')
55 | Keymap('f', vim.lsp.buf.format, 'LSP: format file')
56 | end
57 |
58 | vim.api.nvim_create_autocmd('LspAttach', {
59 | group = vim.api.nvim_create_augroup('lsp-attach-hooks', { clear = true }),
60 | callback = function(event)
61 | create_keymaps()
62 | local client = vim.lsp.get_client_by_id(event.data.client_id)
63 | if client then
64 | highlight_current_symbol(client, event.buf)
65 | inlay_hints(client, event.buf)
66 | end
67 | end
68 | })
69 |
70 | return {
71 | 'neovim/nvim-lspconfig',
72 | dependencies = {
73 | { 'williamboman/mason.nvim', cmd = 'Mason', opts = {} },
74 | { 'williamboman/mason-lspconfig.nvim', opts = {} },
75 | 'nvim-telescope/telescope.nvim',
76 | { "j-hui/fidget.nvim", opts = {} },
77 | 'saghen/blink.cmp',
78 | },
79 | }
80 |
--------------------------------------------------------------------------------
/fish/environment.fish:
--------------------------------------------------------------------------------
1 | # https://specifications.freedesktop.org/basedir-spec/latest/
2 | set -gx XDG_DATA_HOME $HOME/.local/share
3 | set -gx XDG_CONFIG_HOME $HOME/.config
4 | set -gx XDG_STATE_HOME $HOME/.local/state
5 | set -gx XDG_CACHE_HOME $HOME/.cache # non-essential (cached) data files
6 | fish_add_path $HOME/.local/bin
7 |
8 | # Set paths from /etc/profile and /etc/profile.d/*.sh, and other paths.
9 | fish_add_path /usr/bin /usr/local/bin /usr/local/sbin \
10 | /usr/lib/rustup/bin /usr/lib/jvm/default/bin \
11 | /usr/bin/site_perl /usr/bin/vendor_perl /usr/bin/core_perl \
12 | $CARGO_HOME/bin $XDG_DATA_HOME/npm/bin $XDG_DATA_HOME/nvim/mason/bin \
13 | $XDG_DATA_HOME/JetBrains/Toolbox/apps/intellij-idea-ultimate/bin \
14 | $XDG_DATA_HOME/JetBrains/Toolbox/apps/android-studio/bin
15 |
16 | exportenv $XDG_CONFIG_HOME/user-dirs.dirs $XDG_CONFIG_HOME/locale.conf
17 |
18 | set -gx LD_LIBRARY_PATH /lib:/usr/lib:/usr/local/lib
19 |
20 | set -gx EDITOR helix
21 | set -gx VISUAL $EDITOR
22 | set -gx TERMINAL ghostty
23 | set -gx BROWSER zen-browser
24 | set -gx OPENER xdg-open
25 | set -gx PAGER less
26 | set -gx LS_COLORS (vivid generate gruvbox-dark-soft)
27 |
28 | batman --export-env | source
29 |
30 | # For Xwayland
31 | # set -gx XCURSOR_SIZE 48
32 | # set -gx QT_QPA_PLATFORM wayland
33 | # set -gx QT_QPA_PLATFORMTHEME qt6ct
34 | # set -gx SDL_VIDEODRIVER wayland
35 | # set -gx GDK_BACKEND wayland
36 | set -gx RUSTC_WRAPPER sccache
37 |
38 | # Keep $HOME tidy (https://wiki.archlinux.org/title/XDG_Base_Directory)
39 | set -gx ANDROID_USER_HOME $XDG_DATA_HOME/android
40 | set -gx PASSWORD_STORE_DIR $XDG_DATA_HOME/pass
41 | set -gx GNUPGHOME $XDG_DATA_HOME/gnupg
42 | set -gx GOPATH $XDG_DATA_HOME/go
43 | set -gx PIPX_BIN_DIR $XDG_DATA_HOME/pipx/bin
44 | set -gx HOME_ETC $XDG_CONFIG_HOME
45 | set -gx DOCKER_CONFIG $XDG_CONFIG_HOME/docker
46 | set -gx NPM_CONFIG_USERCONFIG $XDG_CONFIG_HOME/npm/npmrc
47 | set -gx RUSTUP_HOME $XDG_DATA_HOME/rustup
48 | set -gx CARGO_HOME $XDG_DATA_HOME/cargo
49 | set -gx GTK2_RC_FILES $XDG_CONFIG_HOME/gtk-2.0/gtkrc
50 | set -gx RANDFILE $XDG_DATA_HOME/open-ssl/rnd
51 | set -gx WGETRC $XDG_CONFIG_HOME/wgetrc
52 | set -gx GRADLE_USER_HOME $XDG_DATA_HOME/gradle
53 | set -gx WINEPREFIX $XDG_DATA_HOME/wine
54 | set -gx KONAN_DATA_DIR $XDG_DATA_HOME/konan
55 | set -gx PSQL_HISTORY $XDG_STATE_HOME/psql_history
56 | set -gx SQLITE_HISTORY $XDG_DATA_HOME/sqlite_history
57 | set -gx PYTHON_HISTORY $XDG_STATE_HOME/python/history # since python 3.13
58 | set -gx MARIADB_HISTFILE $XDG_DATA_HOME/mariadb_history
59 | set -gx LESSHISTFILE $XDG_CACHE_HOME/lesshst
60 | set -gx NODE_REPL_HISTORY $XDG_CACHE_HOME/node_repl_history
61 | set -gx TEXMFHOME $XDG_DATA_HOME/texmf
62 | set -gx TEXMFVAR $XDG_CACHE_HOME/texlive/texmf-var
63 | set -gx TEXMFCONFIG $XDG_CONFIG_HOME/texlive/texmf-config
64 | set -gx PYTHONPYCACHEPREFIX $XDG_CACHE_HOME/python
65 | set -gx PYTHONUSERBASE $XDG_DATA_HOME/python
66 | set -gx INPUTRC $XDG_CONFIG_HOME/readline/inputrc
67 | set -gx HISTFILE $XDG_STATE_HOME/sh_history
68 | set -gx DOTNET_CLI_HOME $XDG_DATA_HOME/dotnet
69 | set -gx W3M_DIR $XDG_DATA_HOME/w3m
70 | set -gx _JAVA_OPTIONS "-Djava.util.prefs.userRoot=$XDG_CONFIG_HOME/java"
71 | set -gx R_HISTFILE $XDG_CONFIG_HOME/R/history
72 | set -gx JUPYTERLAB_DIR $XDG_DATA_HOME/jupyter/lab
73 | set -gx KERAS_HOME $XDG_STATE_HOME/keras
74 |
--------------------------------------------------------------------------------
/nvim/syntax/lp.vim:
--------------------------------------------------------------------------------
1 | " Vim syntax file
2 | " Language: Answer Set Programming (ASP)
3 | " Maintainer: Mario D'Andrea
4 | " Latest Revision: 08 May 2025
5 |
6 | if exists("b:current_syntax")
7 | finish
8 | endif
9 |
10 | " Case sensitivity matters in ASP
11 | syntax case match
12 |
13 | " Comments
14 | syn match aspComment "%.*$"
15 | syn region aspBlockComment start="%\*" end="\*%" contains=@Spell
16 |
17 | " Variables (must start with uppercase letter)
18 | syn match aspVariable "\<[A-Z][a-zA-Z0-9_]*\>"
19 |
20 | " Strings
21 | syn region aspString start=+"+ skip=+\\"+ end=+"+ contains=@Spell
22 |
23 | syn match aspPredicate "\<[a-z][a-zA-Z0-9_]*\>"
24 |
25 | " Numbers
26 | syn match aspNumber "\<\(0\|[1-9][0-9]*\)\(\.[0-9]\+\)\?\>"
27 |
28 | " Annotations
29 | " Annotations - handle @ separately
30 | syn match aspAnnotationMarker "%\?@" nextgroup=aspAnnotationName
31 | syn match aspAnnotationName "[a-z][a-zA-Z0-9_]*" contained
32 |
33 | " Aggregates
34 | syn match aspAggregate "#\(count\|sum\|min\|max\)"
35 |
36 | " Negation
37 | syn keyword aspNegation not
38 |
39 | " External predicates
40 | syn match aspExternalPredicate "&[a-z][a-zA-Z0-9_]*"
41 |
42 | " Predicate conversions
43 | syn keyword aspPredicateConversion U_INT UT_INT UR_INT T_INT R_INT CONST Q_CONST
44 |
45 | " Directives
46 | syn match aspDirective "#\(show\|external_predicate_conversion\|import_sql\|export_sql\|import_local_sparql\|import_remote_sparql\)\>"
47 |
48 | " Define highlights
49 | hi def link aspComment Comment
50 | hi def link aspBlockComment Comment
51 | hi def link aspVariable @variable
52 | hi def link aspString String
53 | hi def link aspPredicate Function
54 | hi def link aspNumber Number
55 | hi def link aspAnnotationMarker PreProc
56 | hi def link aspAnnotationName PreProc
57 | hi def link aspAggregate Special
58 | hi def link aspNegation Keyword
59 | hi def link aspExternalPredicate Special
60 | hi def link aspPredicateConversion Type
61 | hi def link aspDirective PreProc
62 |
63 | " Common ASP symbols and operators
64 | " ASP specific operators
65 | syn match aspImplication "\:-" containedin=aspColon
66 | syn match aspConjunction ","
67 | syn match aspDisjunction ";"
68 | syn match aspPeriod "\."
69 | "syn match aspAssign ":="
70 | syn match aspWeak "\:\~" containedin=aspColon
71 | syn match aspConditional "?:"
72 | syn match aspInterval "\.\."
73 | " Arithmetic and comparison operators
74 | syn match aspArithOp "[+\-*/]"
75 | syn match aspCompOp "[=<>]"
76 | syn match aspCompOp "=="
77 | syn match aspCompOp "!="
78 | syn match aspCompOp "<="
79 | syn match aspCompOp ">="
80 | syn match aspColon ":"
81 |
82 | " Punctuation/brackets
83 | syn match aspBracket "[\[\](){}]"
84 | hi def link aspImplication Conditional
85 | hi def link aspConjunction Operator
86 | hi def link aspDisjunction Operator
87 | hi def link aspCompOp Operator
88 | hi def link aspColon Operator
89 | hi def link aspPeriod Operator
90 | hi def link aspAssign Operator
91 | hi def link aspConditional Operator
92 | hi def link aspArithOp Operator
93 | hi def link aspWeak Conditional
94 | hi def link aspComp Operator
95 | hi def link aspInterval Operator
96 | hi def link aspOperator Operator
97 | hi def link aspBracket Delimiter
98 |
99 | " Common ASP keywords
100 | syn keyword aspKeyword not
101 | hi def link aspKeyword Keyword
102 |
103 | let b:current_syntax = "lp"
104 |
--------------------------------------------------------------------------------
/packages.txt:
--------------------------------------------------------------------------------
1 | 7zip
2 | acpi_call
3 | adobe-source-serif-fonts
4 | adw-gtk-theme
5 | android-tools
6 | baobab
7 | base
8 | base-devel
9 | bash-language-server
10 | bat
11 | bc
12 | biome
13 | bison
14 | blueprint-compiler
15 | bluez
16 | box2d
17 | breeze
18 | breeze5
19 | btrfs-progs
20 | ca-certificates
21 | cava
22 | ccache
23 | clang
24 | cmake
25 | cowfortune
26 | dbus-broker
27 | dconf-editor
28 | debugedit
29 | decibels
30 | dhcpcd
31 | dialect
32 | discord
33 | docker
34 | docker-buildx
35 | docker-compose
36 | dosfstools
37 | duf
38 | dust
39 | efibootmgr
40 | emblem
41 | epiphany
42 | exfat-utils
43 | eyedropper
44 | eza
45 | fakeroot
46 | fastfetch
47 | fd
48 | ffmpeg
49 | ffmpegthumbnailer
50 | figlet
51 | fish
52 | flex
53 | foliate
54 | fractal
55 | fuse2
56 | fwupd
57 | fwupd-efi
58 | fzf
59 | gcr
60 | gdb
61 | gdm
62 | gemini-cli
63 | ghostty
64 | gimp
65 | git
66 | git-delta
67 | git-filter-repo
68 | glow
69 | gnome-backgrounds
70 | gnome-boxes
71 | gnome-browser-connector
72 | gnome-calculator
73 | gnome-calendar
74 | gnome-characters
75 | gnome-clocks
76 | gnome-color-manager
77 | gnome-control-center
78 | gnome-disk-utility
79 | gnome-epub-thumbnailer
80 | gnome-font-viewer
81 | gnome-menus
82 | gnome-remote-desktop
83 | gnome-session
84 | gnome-settings-daemon
85 | gnome-shell
86 | gnome-shell-extensions
87 | gnome-system-monitor
88 | gnome-text-editor
89 | gnome-user-share
90 | gnome-weather
91 | gperf
92 | grilo-plugins
93 | grub
94 | gst-libav
95 | gtk4
96 | gvfs-afc
97 | gvfs-goa
98 | gvfs-google
99 | gvfs-gphoto2
100 | gvfs-mtp
101 | gvfs-nfs
102 | gvfs-smb
103 | helix
104 | hieroglyphic
105 | hunspell-en_us
106 | hunspell-it
107 | hyperfine
108 | ibus
109 | inkscape
110 | intel-gpu-tools
111 | intel-media-driver
112 | inter-font
113 | irssi
114 | jdk-openjdk
115 | jdk21-openjdk
116 | jedi-language-server
117 | jq
118 | kdenlive
119 | libdecor
120 | libnotify
121 | libqalculate
122 | libreoffice-fresh
123 | libva-utils
124 | libvdpau-va-gl
125 | libvoikko
126 | linux
127 | linux-firmware
128 | linux-headers
129 | lld
130 | lldb
131 | localsearch
132 | loupe
133 | lsof
134 | lua51
135 | lvm2
136 | make
137 | man-db
138 | man-pages
139 | marksman
140 | mediainfo
141 | meson
142 | mold
143 | nautilus
144 | neovim
145 | net-tools
146 | networkmanager
147 | newsflash
148 | nicotine+
149 | ninja
150 | npm
151 | ntfs-3g
152 | nushell
153 | obs-studio
154 | obsidian
155 | onefetch
156 | openssl-1.1
157 | pacman-contrib
158 | papers
159 | pass
160 | patch
161 | pavucontrol
162 | perl-image-exiftool
163 | picard
164 | pigz
165 | piper
166 | pipewire-pulse
167 | pkgconf
168 | pkgstats
169 | pnpm
170 | postgresql
171 | power-profiles-daemon
172 | pre-commit
173 | python-gobject
174 | python-lsp-server
175 | python-pip
176 | python-pipx
177 | python-tqdm
178 | python-virtualenv
179 | qemu-full
180 | qemu-user
181 | qrencode
182 | qt5-wayland
183 | qt5ct
184 | qt6-wayland
185 | qt6ct
186 | restic
187 | ripgrep
188 | rnote
189 | rsync
190 | ruff
191 | rust-analyzer
192 | rustup
193 | sccache
194 | secrets
195 | showtime
196 | simple-scan
197 | snapshot
198 | source-highlight
199 | strace
200 | sudo
201 | syncthing
202 | system-config-printer
203 | systemd-resolvconf
204 | taplo-cli
205 | tecla
206 | texinfo
207 | tinymist
208 | tokei
209 | tombi
210 | ttf-inconsolata-nerd
211 | ttf-jetbrains-mono-nerd
212 | ttf-nerd-fonts-symbols
213 | typescript-language-server
214 | typst
215 | ufw
216 | unrar
217 | unzip
218 | uv
219 | vivid
220 | vscode-css-languageserver
221 | vscode-html-languageserver
222 | vscode-json-languageserver
223 | vulkan-tools
224 | wev
225 | which
226 | whois
227 | wireshark-qt
228 | wl-clipboard
229 | xdg-desktop-portal-gnome
230 | xdg-user-dirs
231 | xdg-user-dirs-gtk
232 | xorg-xwayland
233 | yt-dlp
234 | zip
235 |
--------------------------------------------------------------------------------
/fish/functions/juke.fish:
--------------------------------------------------------------------------------
1 | function juke --description 'Music library management helpers'
2 | argparse h/help l/add-lyrics r/recursive -- $argv
3 | or return
4 |
5 | if set -q _flag_help
6 | echo Usage:
7 | echo " $_ [options] files..."
8 | echo
9 | echo Options:
10 | echo ' -h, --help show help usage'
11 | echo ' -l, --add-lyrics download synced lyrics for files'
12 | echo ' -r, --recursive descend recusively in directories'
13 | return
14 | end
15 |
16 | # TODO: handle more than one input file
17 | set -f target $argv[1]
18 | test (count $argv) -gt 0
19 | or set target .
20 | test -e $target
21 | or begin
22 | error "$target does not exist"
23 | return 1
24 | end
25 |
26 | if test -d $target
27 | if set -q _flag_recursive
28 | set target $target/**/*.{mp3,flac}
29 | else
30 | set target $target/*.{mp3,flac}
31 | end
32 | end
33 |
34 | function lrclib -a song --description 'Download synced lyrics for a song'
35 | # https://lrclib.net/docs
36 | # Takes a relative path to an mp3 file
37 | # Creates a file with the same base path of the mp3 but with lrc extension
38 |
39 | set -l lrc_file (path change-extension lrc $song)
40 | test -f $lrc_file
41 | and return # synced lyrics found
42 | set -l txt_file (path change-extension txt $song)
43 | test -f $txt_file
44 | and return # plain lyrics found
45 |
46 | set sig (string split ';' (exiftool -b -p '$Artist;$Title;$Album;$Duration' $song))
47 | set -l res (curl -s -G \
48 | --data-urlencode artist_name=$sig[1] \
49 | --data-urlencode track_name=$sig[2] \
50 | --data-urlencode album_name=$sig[3] \
51 | -d duration=(math round $sig[4]) \
52 | https://lrclib.net/api/get)
53 |
54 | set -l synced_lyrics "$(echo $res | jq -r .syncedLyrics)"
55 | if test $synced_lyrics = null
56 | set -l plain_lyrics "$(echo $res | jq -r .plainLyrics)"
57 | if test $plain_lyrics = null
58 | printf "info: no lyrics found for $song"
59 | test "$(echo $res | jq -r .instrumental)" = true
60 | and set_color cyan && printf ' (instrumental)' && set_color normal
61 | echo
62 | else
63 | echo "$plain_lyrics" >$txt_file
64 | info "downloaded plain lyrics: $txt_file"
65 | end
66 | else
67 | echo "$synced_lyrics" >$lrc_file
68 | info "downloaded synced lyrics: $lrc_file"
69 | end
70 | end
71 |
72 | if set -q _flag_add_lyrics
73 | for file in $target
74 | lrclib $file
75 | end
76 | else # default to checking
77 | # Songs should be mp3 files with a bit rate of 320 Kbps, accompanied by lyrics
78 | for file in $target
79 | set -l low_bitrate (test (exiftool $file -b -AudioBitrate) -lt 320000
80 | and echo true; or echo false)
81 | set -l has_no_lyrics (! test -f (path change-extension lrc $file) \
82 | && ! test -f (path change-extension txt $file)
83 | and echo true; or echo false)
84 | if $low_bitrate || $has_no_lyrics
85 | printf "$file "
86 | $low_bitrate
87 | and set_color yellow --bold && printf 'bit rate is not 320 Kbps '
88 | $has_no_lyrics
89 | and set_color magenta --bold && printf 'has no lyrics'
90 | echo
91 | set_color normal
92 | end
93 | end
94 | end
95 | end
96 |
--------------------------------------------------------------------------------
/fontconfig/fonts.conf:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | User config
5 |
6 |
7 | rgb
8 |
9 |
10 |
11 | lcdlight
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 | sans-serif
20 |
21 | Adwaita Sans
22 |
23 |
24 |
25 | DejaVuSans
26 |
27 | Adwaita Sans
28 |
29 |
30 |
31 | sans
32 |
33 | Adwaita Sans
34 |
35 |
36 |
37 | Noto Sans
38 |
39 | Adwaita Sans
40 |
41 |
42 |
43 | Cantarell
44 |
45 | Adwaita Sans
46 |
47 |
48 |
49 | Arial
50 |
51 | Adwaita Sans
52 |
53 |
54 |
55 | Helvetica
56 |
57 | Adwaita Sans
58 |
59 |
60 |
61 | Helvetica
62 |
63 | Adwaita Sans
64 |
65 |
66 |
67 | Liberation Sans
68 |
69 | Adwaita Sans
70 |
71 |
72 |
73 | Fira Sans
74 |
75 | Adwaita Sans
76 |
77 |
78 |
79 | Open Sans
80 |
81 | Adwaita Sans
82 |
83 |
84 |
85 |
86 |
87 | monospace
88 |
89 | Adwaita Mono
90 |
91 |
92 |
93 | Liberation Mono
94 |
95 | Adwaita Mono
96 |
97 |
98 |
99 | Noto Mono
100 |
101 | Adwaita Mono
102 |
103 |
104 |
105 | Source Code Pro
106 |
107 | Adwaita Mono
108 |
109 |
110 |
111 | Courier
112 |
113 | Adwaita Mono
114 |
115 |
116 |
117 | DejaVu Sans Mono
118 |
119 | Adwaita Mono
120 |
121 |
122 |
123 |
124 |
125 | serif
126 |
127 | Libertinus Serif
128 |
129 |
130 |
131 | Times New Roman
132 |
133 | Libertinus Serif
134 |
135 |
136 |
137 | Palatino Linotype
138 |
139 | Libertinus Serif
140 |
141 |
142 |
143 | Times
144 |
145 | Libertinus Serif
146 |
147 |
148 |
149 |
--------------------------------------------------------------------------------
/nvim/lua/plugins/dap.lua:
--------------------------------------------------------------------------------
1 | vim.fn.sign_define('DapLogPoint', { text = '' })
2 | vim.fn.sign_define('DapBreakpoint', { text = '' })
3 | vim.fn.sign_define('DapBreakpointCondition', { text = '' })
4 | vim.fn.sign_define('DapStopped', { text = '' })
5 |
6 | return {
7 | 'mfussenegger/nvim-dap',
8 | keys = {
9 | '', '', '', '', 'br', 'lp',
10 | 'dr', 'dl', 'dh', 'dp', 'df',
11 | 'ds'
12 | },
13 | config = function()
14 | local widgets = require('dap.ui.widgets')
15 | local dap = require('dap')
16 |
17 | Keymap('', dap.continue, 'DAP: continue')
18 | Keymap('', dap.step_over, 'DAP: step over')
19 | Keymap('', dap.step_into, 'DAP: step into')
20 | Keymap('', dap.step_out, 'DAP: step out')
21 | Keymap('b', dap.toggle_breakpoint, 'DAP: toggle breakpoint')
22 | Keymap('lp', function()
23 | dap.set_breakpoint(nil, nil, vim.fn.input('Log: '))
24 | end, 'DAP: set breakpoint with log')
25 | Keymap('dr', dap.repl.open, 'DAP: open REPL/debug console')
26 | Keymap('dl', dap.run_last, 'DAP: re-run last debug adapter')
27 | Keymap('dh', widgets.hover,
28 | 'DAP: evaluate and show expression under cursor', { 'n', 'v' })
29 | Keymap('dp', widgets.preview,
30 | 'DAP: evaluate and preview of expression under cursor', { 'n', 'v' })
31 | -- Keymap('df', widgets.centered_float(widgets.frames),
32 | -- 'DAP: show stack frames')
33 | -- Keymap('ds', widgets.centered_float(widgets.scopes),
34 | -- 'DAP: show variables in the current scopes')
35 |
36 | dap.adapters = {
37 | gdb = {
38 | type = "executable",
39 | command = "gdb",
40 | args = { "--interpreter=dap", "--eval-command", "set print pretty on" }
41 | },
42 | python = {
43 | type = 'executable',
44 | command = 'debugpy'
45 | }
46 | }
47 | dap.configurations = {
48 | rust = {
49 | {
50 | name = "Launch",
51 | type = "gdb",
52 | request = "launch",
53 | program = function()
54 | return vim.fn.input('Path to executable: ', vim.fn.getcwd() .. '/',
55 | 'file')
56 | end,
57 | cwd = "${workspaceFolder}",
58 | stopAtBeginningOfMainSubprogram = false,
59 | },
60 | {
61 | name = "Select and attach to process",
62 | type = "gdb",
63 | request = "attach",
64 | program = function()
65 | return vim.fn.input('Path to executable: ', vim.fn.getcwd() .. '/',
66 | 'file')
67 | end,
68 | pid = function()
69 | local name = vim.fn.input('Executable name (filter): ')
70 | return require("dap.utils").pick_process({ filter = name })
71 | end,
72 | cwd = '${workspaceFolder}'
73 | },
74 | {
75 | name = 'Attach to gdbserver :1234',
76 | type = 'gdb',
77 | request = 'attach',
78 | target = 'localhost:1234',
79 | program = function()
80 | return vim.fn.input('Path to executable: ', vim.fn.getcwd() .. '/',
81 | 'file')
82 | end,
83 | cwd = '${workspaceFolder}'
84 | }
85 | },
86 | cpp = {
87 | {
88 | name = "Launch file",
89 | type = "cppdbg",
90 | request = "launch",
91 | program = function()
92 | return vim.fn.input('Path to executable: ', vim.fn.getcwd() .. '/',
93 | 'file')
94 | end,
95 | cwd = '${workspaceFolder}',
96 | stopAtEntry = true,
97 | },
98 | {
99 | name = 'Attach to gdbserver :1234',
100 | type = 'cppdbg',
101 | request = 'launch',
102 | MIMode = 'gdb',
103 | miDebuggerServerAddress = 'localhost:1234',
104 | miDebuggerPath = '/usr/bin/gdb',
105 | cwd = '${workspaceFolder}',
106 | program = function()
107 | return vim.fn.input('Path to executable: ', vim.fn.getcwd() .. '/',
108 | 'file')
109 | end
110 | }
111 | }
112 | }
113 | end
114 | }
115 |
--------------------------------------------------------------------------------
/sway/scr.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | # grimblast based on grimshot
4 | # https://github.com/OctopusET/sway-contrib
5 |
6 | ## Author: Misterio (https://github.com/misterio77)
7 | ## https://github.com/swaywm/sway/blob/master/contrib/grimshot
8 |
9 | # Ported later to sh and sway by Mario D'Andrea
10 |
11 | SCRIPT=$(basename "$0")
12 |
13 | usage() {
14 | echo "$SCRIPT: take screenshots on sway using grim"
15 | echo "Usage: $SCRIPT [-chnms] [-f file] [-t target]"
16 | echo
17 | echo "Options:"
18 | echo " -c Copy screenshot to clipboard"
19 | echo " -f file Specify file to save the screenshot"
20 | echo " -h Show this help message"
21 | echo " -n Enable desktop notifications"
22 | echo " -m Include mouse pointer in the screenshot"
23 | echo " -s Save screenshot to file"
24 | echo " -t target Specify target of the screenshot"
25 | echo
26 | echo "Targets:"
27 | echo " active The currently focused container"
28 | echo " area Select container, output or custom area"
29 | echo " output The currently focused output"
30 | echo " screen All visible outputs"
31 | }
32 |
33 | have() {
34 | command -v "$1" >/dev/null || fatal "$1 is missing"
35 | }
36 |
37 | NOTIFY=false
38 | TARGET=screen
39 |
40 | while getopts cf:hnmst: option; do
41 | case "$option" in
42 | c)
43 | have wl-copy
44 | COPY=true
45 | ;;
46 | f) FILE="$OPTARG" && SAVE=true ;;
47 | h) usage && exit ;;
48 | n) NOTIFY=true ;;
49 | m) MOUSE=true ;;
50 | s) SAVE=true ;;
51 | t) TARGET="$OPTARG" ;;
52 | \?) exit 1 ;;
53 | esac
54 | done
55 |
56 | fatal() {
57 | msg=${1:-Error taking screenshot with "$SCRIPT"}
58 | if $NOTIFY; then
59 | notify-send -u critical -t 5000 -a "$SCRIPT" "$msg"
60 | else
61 | printf "\033[31merror\033[0m: %s\n" "$msg"
62 | fi
63 | exit 1
64 | }
65 |
66 | screenshot_directory() {
67 | . "${XDG_CONFIG_HOME:-$HOME/.config}/user-dirs.dirs" 2>/dev/null
68 | echo "${XDG_SCREENSHOTS_DIR:-${XDG_PICTURES_DIR:-$HOME}}"
69 | }
70 |
71 | notify() {
72 | if $NOTIFY; then
73 | notify-send ${SAVE:+-i $FILE} -u low -t 3000 -a "$SCRIPT" "$@"
74 | else
75 | echo "$SCRIPT:" "$@"
76 | fi
77 | }
78 |
79 | # If any of these is missing there is no point in continuing
80 | for cmd in grim swaymsg jq; do
81 | have "$cmd"
82 | done
83 |
84 | case "$TARGET" in
85 | active)
86 | focused=$(swaymsg -t get_tree |
87 | jq -r "recurse(.nodes[]?, .floating_nodes[]?) | select(.focused)")
88 | GEOMETRY=$(echo "$focused" |
89 | jq -r '.rect | "\(.x),\(.y) \(.width)x\(.height)"')
90 | TARGET="$(echo "$focused" | jq -r '.app_id') window"
91 | ;;
92 | area)
93 | have slurp
94 | GEOMETRY=$(swaymsg -t get_tree |
95 | jq -r '.. | select(.pid? and .visible?) | .rect | "\(.x),\(.y) \(.width)x\(.height)"' |
96 | slurp -o)
97 | [ -z "$GEOMETRY" ] && exit # user did not select anything
98 | ;;
99 | output)
100 | OUTPUT=$(swaymsg -t get_outputs | jq -r '.[] | select(.focused)' |
101 | jq -r '.name')
102 | ;;
103 | screen) ;;
104 | *) fatal "Unknown target '$TARGET'" ;;
105 | esac
106 |
107 | if $SAVE; then
108 | FILE=${FILE:-$(screenshot_directory)/$(date +%FT%H-%M-%S%z).png} # ISO 8601
109 | if $COPY; then # copysave
110 | grim ${MOUSE:+-c} ${OUTPUT:+-o $OUTPUT} ${GEOMETRY:+-g "$GEOMETRY"} - |
111 | tee "$FILE" | wl-copy -t image/png
112 | notify "$TARGET copied to clipboard and saved to $FILE"
113 | else # save
114 | grim ${MOUSE:+-c} ${OUTPUT:+-o $OUTPUT} ${GEOMETRY:+-g "$GEOMETRY"} "$FILE"
115 | notify "$TARGET saved to $FILE"
116 | fi
117 | else # copy
118 | grim ${MOUSE:+-c} ${OUTPUT:+-o $OUTPUT} ${GEOMETRY:+-g "$GEOMETRY"} - |
119 | wl-copy -t image/png
120 | notify "$TARGET copied to clipboard"
121 | fi
122 |
123 | case "$ACTION" in
124 | save)
125 | grim ${MOUSE:+-c} ${OUTPUT:+-o $OUTPUT} ${GEOMETRY:+-g "$GEOMETRY"} "$FILE"
126 | notify "$TARGET saved to $FILE"
127 | ;;
128 | copy)
129 | grim ${MOUSE:+-c} ${OUTPUT:+-o $OUTPUT} ${GEOMETRY:+-g "$GEOMETRY"} - |
130 | wl-copy -t image/png
131 | notify "$TARGET copied to clipboard"
132 | ;;
133 | copysave)
134 | grim ${MOUSE:+-c} ${OUTPUT:+-o $OUTPUT} ${GEOMETRY:+-g "$GEOMETRY"} - |
135 | tee "$FILE" | wl-copy -t image/png
136 | notify "$TARGET copied to clipboard and saved to $FILE"
137 | ;;
138 | esac
139 |
--------------------------------------------------------------------------------
/sway/config:
--------------------------------------------------------------------------------
1 | set $LOCK 'swaylock --font-size 15 -eFi $(find ~/Pictures/wp/dark | shuf -n 1)'
2 | set $SWAY $XDG_CONFIG_HOME/sway
3 |
4 | exec {
5 | systemctl --user import-environment DISPLAY WAYLAND_DISPLAY SWAYSOCK
6 | dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY \
7 | SWAYSOCK XDG_CURRENT_DESKTOP=sway XDG_SESSION_DESKTOP=sway
8 |
9 | swayidle -w \
10 | timeout 200 $LOCK \
11 | timeout 300 'systemctl suspend' \
12 | before-sleep $LOCK
13 |
14 | mako
15 | wlsunset -l 39 -L 16
16 | }
17 |
18 | seat * {
19 | xcursor_theme Adwaita
20 | hide_cursor when-typing enable
21 | }
22 |
23 | input * {
24 | xkb_layout it
25 | repeat_delay 250
26 | repeat_rate 60
27 |
28 | accel_profile flat
29 | pointer_accel 0.7
30 | tap enabled
31 | }
32 |
33 | input 1133:49298:Logitech_G203_LIGHTSYNC_Gaming_Mouse {
34 | pointer_accel 0.05
35 | }
36 |
37 | output HDMI-A-2 resolution 2560x1440@59.951Hz position 0 0
38 | # output eDP-1 resolution 1920x1080@60Hz position 0 1440
39 | output eDP-1 disable
40 |
41 | bindsym {
42 | super+h focus left
43 | super+j focus down
44 | super+k focus up
45 | super+l focus right
46 |
47 | super+shift+h move left
48 | super+shift+j move down
49 | super+shift+k move up
50 | super+shift+l move right
51 |
52 | super+1 workspace 1
53 | super+2 workspace 2
54 | super+3 workspace 3
55 | super+4 workspace 4
56 | super+5 workspace 5
57 | super+6 workspace 6
58 | super+7 workspace 7
59 | super+8 workspace 8
60 | super+9 workspace 9
61 | super+0 workspace 10
62 |
63 | super+shift+1 move container to workspace 1
64 | super+shift+2 move container to workspace 2
65 | super+shift+3 move container to workspace 3
66 | super+shift+4 move container to workspace 4
67 | super+shift+5 move container to workspace 5
68 | super+shift+6 move container to workspace 6
69 | super+shift+7 move container to workspace 7
70 | super+shift+8 move container to workspace 8
71 | super+shift+9 move container to workspace 9
72 | super+shift+0 move container to workspace 10
73 |
74 | super+ctrl+h move workspace to output left
75 | super+ctrl+j move workspace to output down
76 | super+ctrl+k move workspace to output up
77 | super+ctrl+l move workspace to output right
78 |
79 | Super+t layout toggle split
80 | Super+p split horizontal
81 | Super+o split vertical
82 |
83 | super+plus resize grow width 10px
84 | super+minus resize shrink width 10px
85 | super+shift+plus resize grow height 10px
86 | super+shift+minus resize shrink height 10px
87 |
88 | super+space floating toggle
89 | super+shift+space focus mode_toggle
90 |
91 | super+shift+backspace move scratchpad
92 | super+backspace scratchpad show
93 |
94 | super+q kill
95 | super+f fullscreen toggle
96 |
97 | super+shift+r reload
98 | super+shift+q exec swaynag -t warning -m 'Manage session' \
99 | -Z Lock $LOCK \
100 | -Z Logout 'swaymsg exit' \
101 | -Z Suspend 'systemctl suspend' \
102 | -Z Reboot 'systemctl reboot' \
103 | -Z Poweroff 'systemctl poweroff'
104 |
105 | super+d exec wmenu-run
106 | super+return exec $TERMINAL
107 | super+c exec $TERMINAL qalc
108 |
109 | print exec pgrep scr.sh || $SWAY/scr.sh -ncst area
110 | shift+print exec $SWAY/scr.sh -ncst screen
111 | }
112 |
113 | bindsym --locked {
114 | XF86MonBrightnessUp exec brightnessctl set 5%+
115 | XF86MonBrightnessDown exec brightnessctl set 5%-
116 | XF86AudioRaiseVolume exec wpctl set-volume \@DEFAULT_SINK@ 0.05+
117 | XF86AudioLowerVolume exec wpctl set-volume \@DEFAULT_SINK@ 0.05-
118 | XF86AudioMute exec wpctl set-mute \@DEFAULT_SINK@ toggle
119 | XF86AudioMicMute exec wpctl set-mute \@DEFAULT_SOURCE@ toggle
120 | XF86AudioPrev exec playerctl previous
121 | XF86AudioNext exec playerctl next
122 | XF86AudioPlay exec playerctl play-pause
123 | }
124 |
125 | bar {
126 | position top
127 | status_command $SWAY/status.sh
128 | }
129 |
130 | xwayland enable
131 | default_orientation horizontal
132 | default_floating_border none
133 | default_border pixel 1
134 | smart_borders on
135 | focus_follows_mouse always
136 | floating_modifier Super
137 |
138 | client.focused #000000 #000000 #000000 #9a9996 #404040
139 | client.focused_inactive #000000 #000000 #000000 #5e5c64 #303030
140 | client.unfocused #000000 #000000 #000000 #3d3846 #282828
141 | client.urgent #000000 #000000 #000000 #cc241d #cc241d
142 |
143 | output * background $(find ~/Pictures/Backgrounds/Dark | shuf -n 1) fill
144 |
--------------------------------------------------------------------------------
/mimeapps.list:
--------------------------------------------------------------------------------
1 | [Default Applications]
2 | application/epub+zip=com.github.johnfactotum.Foliate.desktop
3 | application/pdf=org.gnome.Papers.desktop
4 | application/vnd.oasis.opendocument.text=libreoffice.desktop
5 | application/x-extension-htm=zen.desktop
6 | application/x-extension-html=zen.desktop
7 | application/x-extension-shtml=zen.desktop
8 | application/x-extension-xht=zen.desktop
9 | application/x-extension-xhtml=zen.desktop
10 | application/x-shellscript=helix.desktop;
11 | application/xhtml+xml=zen.desktop
12 | audio/mpeg=org.gnome.Decibels.desktop
13 | image/bmp=org.gnome.Loupe.desktop
14 | image/gif=org.gnome.Loupe.desktop
15 | image/jpeg=org.gnome.Loupe.desktop
16 | image/jpg=org.gnome.Loupe.desktop
17 | image/png=org.gnome.Loupe.desktop
18 | image/svg+xml=org.gnome.Loupe.desktop
19 | image/tiff=org.gnome.Loupe.desktop
20 | image/vnd.djvu=org.gnome.Papers.desktop
21 | image/webp=org.gnome.Loupe.desktop
22 | inode/x-emtpy=helix.desktop
23 | ionde/directory=org.gnome.Nautilus.desktop
24 | text/css=helix.desktop
25 | text/csv=libreoffice-calc.desktop
26 | text/english=helix.desktop;
27 | text/html=zen.desktop
28 | text/javascript=helix.desktop
29 | text/markdown=helix.desktop
30 | text/plain=helix.desktop
31 | text/vnd.trolltech.linguist=helix.desktop
32 | text/x-c++=helix.desktop;
33 | text/x-c++hdr=helix.desktop;
34 | text/x-c++src=helix.desktop;
35 | text/x-c=helix.desktop;
36 | text/x-chdr=helix.desktop;
37 | text/x-csrc=helix.desktop
38 | text/x-java=helix.desktop;
39 | text/x-kotlin=helix.desktop
40 | text/x-makefile=helix.desktop;
41 | text/x-moc=helix.desktop;
42 | text/x-pascal=helix.desktop;
43 | text/x-python=helix.desktop
44 | text/x-tcl=helix.desktop;
45 | text/x-tex=helix.desktop;
46 | text/xml=helix.desktop
47 | video/3gp=org.gnome.Showtime.desktop
48 | video/3gpp2=org.gnome.Showtime.desktop
49 | video/3gpp=org.gnome.Showtime.desktop
50 | video/divx=org.gnome.Showtime.desktop
51 | video/dv=org.gnome.Showtime.desktop
52 | video/fli=org.gnome.Showtime.desktop
53 | video/flv=org.gnome.Showtime.desktop
54 | video/mp2t=org.gnome.Showtime.desktop
55 | video/mp4=org.gnome.Showtime.desktop
56 | video/mp4v-es=org.gnome.Showtime.desktop
57 | video/mpeg-system=org.gnome.Showtime.desktop
58 | video/mpeg=org.gnome.Showtime.desktop
59 | video/msvideo=org.gnome.Showtime.desktop
60 | video/ogg=org.gnome.Showtime.desktop
61 | video/quicktime=org.gnome.Showtime.desktop
62 | video/vivo=org.gnome.Showtime.desktop
63 | video/vnd.divx=org.gnome.Showtime.desktop
64 | video/vnd.mpegurl=org.gnome.Showtime.desktop
65 | video/vnd.rn-realvideo=org.gnome.Showtime.desktop
66 | video/vnd.vivo=org.gnome.Showtime.desktop
67 | video/webm=org.gnome.Showtime.desktop
68 | video/x-anim=org.gnome.Showtime.desktop
69 | video/x-avi=org.gnome.Showtime.desktop
70 | video/x-flc=org.gnome.Showtime.desktop
71 | video/x-fli=org.gnome.Showtime.desktop
72 | video/x-flic=org.gnome.Showtime.desktop
73 | video/x-flv=org.gnome.Showtime.desktop
74 | video/x-m4v=org.gnome.Showtime.desktop
75 | video/x-matroska=org.gnome.Showtime.desktop
76 | video/x-mjpeg=org.gnome.Showtime.desktop
77 | video/x-mpeg2=org.gnome.Showtime.desktop
78 | video/x-mpeg=org.gnome.Showtime.desktop
79 | video/x-ms-asf-plugin=org.gnome.Showtime.desktop
80 | video/x-ms-asf=org.gnome.Showtime.desktop
81 | video/x-ms-asx=org.gnome.Showtime.desktop
82 | video/x-ms-wm=org.gnome.Showtime.desktop
83 | video/x-ms-wmv=org.gnome.Showtime.desktop
84 | video/x-ms-wvx=org.gnome.Showtime.desktop
85 | video/x-msvideo=org.gnome.Showtime.desktop
86 | video/x-nsv=org.gnome.Showtime.desktop
87 | video/x-ogm+ogg=org.gnome.Showtime.desktop
88 | video/x-theora+ogg=org.gnome.Showtime.desktop
89 | video/x-theora=org.gnome.Showtime.desktop
90 | x-scheme-handler/about=firefox.desktop
91 | x-scheme-handler/chrome=zen.desktop
92 | x-scheme-handler/discord-589393213723246592=discord-589393213723246592.desktop
93 | x-scheme-handler/eclipse+command=_usr_lib_dbeaver_.desktop
94 | x-scheme-handler/etcher=balena-etcher.desktop
95 | x-scheme-handler/gitkraken=GitKraken.desktop
96 | x-scheme-handler/http=zen.desktop
97 | x-scheme-handler/https=zen.desktop
98 | x-scheme-handler/jetbrains=jetbrains-toolbox.desktop
99 | x-scheme-handler/mailto=org.gnome.Geary.desktop
100 | x-scheme-handler/msteams=teams.desktop
101 | x-scheme-handler/obsidian=obsidian.desktop
102 | x-scheme-handler/postman=Postman.desktop
103 | x-scheme-handler/readest=readest-handler.desktop
104 | x-scheme-handler/tg=org.telegram.desktop.desktop
105 | x-scheme-handler/unknown=firefox.desktop
106 | x-scheme-handler/webcal=firefox.desktop
107 |
108 | [Added Associations]
109 | application/xhtml+xml=chromium.desktop;
110 | audio/mpeg=org.gnome.Decibels.desktop;
111 | text/html=chromium.desktop;
112 | text/markdown=helix.desktop;
113 | text/vnd.trolltech.linguist=helix.desktop;
114 | text/x-csrc=helix.desktop;
115 | text/x-kotlin=helix.desktop;
116 | text/x-python=helix.desktop;
117 | video/3gp=org.gnome.Showtime.desktop;
118 | video/3gpp2=org.gnome.Showtime.desktop;
119 | video/3gpp=org.gnome.Showtime.desktop;
120 | video/divx=org.gnome.Showtime.desktop;
121 | video/dv=org.gnome.Showtime.desktop;
122 | video/fli=org.gnome.Showtime.desktop;
123 | video/flv=org.gnome.Showtime.desktop;
124 | video/mp2t=org.gnome.Showtime.desktop;
125 | video/mp4=org.gnome.Showtime.desktop;vlc.desktop;io.github.celluloid_player.Celluloid.desktop;mpv.desktop;
126 | video/mp4v-es=org.gnome.Showtime.desktop;
127 | video/mpeg-system=org.gnome.Showtime.desktop;
128 | video/mpeg=org.gnome.Showtime.desktop;
129 | video/msvideo=org.gnome.Showtime.desktop;
130 | video/ogg=org.gnome.Showtime.desktop;
131 | video/quicktime=org.gnome.Showtime.desktop;
132 | video/vivo=org.gnome.Showtime.desktop;
133 | video/vnd.divx=org.gnome.Showtime.desktop;
134 | video/vnd.mpegurl=org.gnome.Showtime.desktop;
135 | video/vnd.rn-realvideo=org.gnome.Showtime.desktop;
136 | video/vnd.vivo=org.gnome.Showtime.desktop;
137 | video/webm=org.gnome.Showtime.desktop;
138 | video/x-anim=org.gnome.Showtime.desktop;
139 | video/x-avi=org.gnome.Showtime.desktop;
140 | video/x-flc=org.gnome.Showtime.desktop;
141 | video/x-fli=org.gnome.Showtime.desktop;
142 | video/x-flic=org.gnome.Showtime.desktop;
143 | video/x-flv=org.gnome.Showtime.desktop;
144 | video/x-m4v=org.gnome.Showtime.desktop;
145 | video/x-matroska=org.gnome.Showtime.desktop;
146 | video/x-mjpeg=org.gnome.Showtime.desktop;
147 | video/x-mpeg2=org.gnome.Showtime.desktop;
148 | video/x-mpeg=org.gnome.Showtime.desktop;
149 | video/x-ms-asf-plugin=org.gnome.Showtime.desktop;
150 | video/x-ms-asf=org.gnome.Showtime.desktop;
151 | video/x-ms-asx=org.gnome.Showtime.desktop;
152 | video/x-ms-wm=org.gnome.Showtime.desktop;
153 | video/x-ms-wmv=org.gnome.Showtime.desktop;
154 | video/x-ms-wvx=org.gnome.Showtime.desktop;
155 | video/x-msvideo=org.gnome.Showtime.desktop;
156 | video/x-nsv=org.gnome.Showtime.desktop;
157 | video/x-theora+ogg=org.gnome.Showtime.desktop;
158 | video/x-theora=org.gnome.Showtime.desktop;
159 | x-scheme-handler/http=zen.desktop;chromium.desktop;
160 | x-scheme-handler/https=zen.desktop;chromium.desktop;
161 | x-scheme-handler/mailto=org.gnome.Geary.desktop;
162 | x-scheme-handler/chrome=zen.desktop;
163 |
--------------------------------------------------------------------------------
/vivid/filetypes.yml:
--------------------------------------------------------------------------------
1 | core:
2 | normal_text: [$no]
3 | regular_file: [$fi]
4 | reset_to_normal: [$rs]
5 | directory: [$di]
6 | symlink: [$ln]
7 | multi_hard_link: [$mh]
8 | fifo: [$pi]
9 | socket: [$so]
10 | door: [$do]
11 | block_device: [$bd]
12 | character_device: [$cd]
13 | broken_symlink: [$or]
14 | missing_symlink_target: [$mi]
15 | setuid: [$su]
16 | setgid: [$sg]
17 | file_with_capability: [$ca]
18 | sticky_other_writable: [$tw]
19 | other_writable: [$ow]
20 | sticky: [$st]
21 | executable_file: [$ex]
22 |
23 | text:
24 | special:
25 | - AUTHORS
26 | - AUTHORS.md
27 | - AUTHORS.txt
28 | - changelog
29 | - ChangeLog
30 | - CHANGELOG
31 | - CHANGELOG.md
32 | - CHANGES
33 | - CHANGELOG.txt
34 | - CODE_OF_CONDUCT
35 | - CODE_OF_CONDUCT.md
36 | - CODE_OF_CONDUCT.txt
37 | - CONTRIBUTING
38 | - CONTRIBUTING.md
39 | - CONTRIBUTING.txt
40 | - CONTRIBUTORS
41 | - CONTRIBUTORS.md
42 | - CONTRIBUTORS.txt
43 | - CREDITS
44 | - FAQ
45 | - HACKING
46 | - INSTALL
47 | - INSTALL.md
48 | - INSTALL.txt
49 | - LEGACY
50 | - NEWS
51 | - NEWS.md
52 | - NEWS.txt
53 | - NOTES
54 | - NOTICE
55 | - MANIFEST
56 | - MANTEINERS
57 | - PLATFORMS
58 | - README
59 | - README.md
60 | - README.txt
61 | - THANKS
62 | - VERSION
63 |
64 | todo:
65 | - TODO
66 | - TODO.md
67 | - TODO.txt
68 |
69 | licenses:
70 | - COPYING
71 | - COPYRIGHT
72 | - LICENCE
73 | - LICENSE
74 | - LICENSE-APACHE
75 | - LICENSE-MIT
76 |
77 | configuration:
78 | generic:
79 | - .cfg
80 | - .conf
81 | - .config
82 | - .iml
83 | - .ini
84 | - .json
85 | - .jsonc
86 | - .tml
87 | - .toml
88 | - .webmanifest
89 | - .wrap
90 | - .yaml
91 | - .yml
92 | - .rasi
93 | - .zon
94 | - project.godot
95 | - .gmo
96 | - .po
97 | - .pot
98 | - rc
99 | - LINGUAS
100 | - .list
101 | - .dirs
102 |
103 | metadata:
104 | - .xmp
105 |
106 | bibtex:
107 | - .bib
108 | - .bst
109 |
110 | dockerfile:
111 | - Dockerfile
112 |
113 | nix:
114 | - .nix
115 |
116 | qt:
117 | - .ui
118 |
119 | desktop:
120 | - .desktop
121 |
122 | readline:
123 | - .inputrc
124 |
125 | system:
126 | - passwd
127 | - shadow
128 |
129 | systemd:
130 | - .service
131 | - .socket
132 | - .mount
133 | - .automount
134 | - .swap
135 | - .path
136 | - .device
137 | - .nspawn
138 | - .target
139 | - .timer
140 | - .slice
141 | - .scope
142 |
143 | other:
144 | - .txt
145 |
146 | markup:
147 | web:
148 | - .htm
149 | - .html
150 | - .shtml
151 | - .xhtml
152 |
153 | other:
154 | - ".1"
155 | - .csv
156 | - .dj # Djot
157 | - .doap
158 | - .fxml # JavaFX
159 | - .markdown
160 | - .md
161 | - .mdown
162 | - .info
163 | - .opml
164 | - .org
165 | - .rst
166 | - .scd
167 | - .typ
168 | - .x
169 | - .xml
170 |
171 | programming:
172 | source:
173 | actionscript: [.as]
174 | ada: [.adb, .ads]
175 | answer-set-programming: [.lp]
176 | applescript: [.applescript]
177 | asp: [.asa]
178 | assembly: [.asm, .s, .S]
179 | awk: [.awk]
180 | basic: [.vb]
181 | cabal: [.cabal]
182 | clojure: [.clj]
183 | crystal: [.cr]
184 | csharp: [.cs, .csx]
185 | css: [.css]
186 | cxx: [.c, .cpp, .cc, .cp, .cxx, .c++, .h, .hh, .hpp, .hxx, .h++, .ino, .inc, .inl, .ipp, .def]
187 | d: [.d, .di]
188 | dart: [.dart]
189 | diff: [.diff, .patch]
190 | elixir: [.ex, .exs]
191 | emacs: [.elc]
192 | elm: [.elm]
193 | erlang: [.erl]
194 | fsharp: [.fs, .fsi, .fsx]
195 | gcode: [.gcode]
196 | go: [.go]
197 | godot: [.gd]
198 | graphviz: [.dot, .gv]
199 | groovy: [.groovy, .gvy, .gradle]
200 | hack: [.hack]
201 | hare: [.ha]
202 | haskell: [.hs]
203 | ipython: [.ipynb]
204 | java: [.java, .bsh]
205 | javascript: [.js, .jsx, .htc]
206 | julia: [.jl]
207 | kotlin: [.kt, .kts]
208 | latex: [.tex, .ltx]
209 | less: [.less]
210 | llvm: [.ll, .mir]
211 | lisp: [.lisp, .el]
212 | lua: [.lua]
213 | mathematica: [.nb]
214 | matlab: [.matlab, .m, .mn]
215 | mojo: [.mojo]
216 | nim: [.nim, .nims, .nimble]
217 | ocaml: [.ml, .mli]
218 | odin: [.odin]
219 | openscad: [.scad]
220 | pascal: [.pas, .p, .dpr]
221 | perl: [.pl, .pm, .pod, .t, .cgi]
222 | php: [.php]
223 | powershell: [.ps1, .psm1, .psd1]
224 | prql: [.prql]
225 | puppet: [.pp, .epp]
226 | purescript: [.purs]
227 | python: [.py]
228 | r: [.r]
229 | raku: [.raku]
230 | ruby: [.rb]
231 | rust: [.rs]
232 | sass: [.sass, .scss]
233 | scala: [.scala, .sbt]
234 | shell: [.sh, .bash, .nu, .bashrc, .bash_profile, .zsh, .fish, .sed, .cmd]
235 | sql: [.sql]
236 | swift: [.swift]
237 | tablegen: [.td]
238 | tcl: [.tcl]
239 | typescript: [.ts, .tsx]
240 | v: [.v, .vsh]
241 | viml: [.vim]
242 | zig: [.zig]
243 |
244 | tooling:
245 | vcs:
246 | git:
247 | - .gitignore
248 | - .gitmodules
249 | - .gitattributes
250 | - .gitconfig
251 | - .mailmap
252 |
253 | hg:
254 | - .hgrc
255 | - hgrc
256 |
257 | other:
258 | - CODEOWNERS
259 | - .ignore
260 | - .fdignore
261 | - .rgignore
262 | - .tfignore
263 |
264 | # build:
265 | # automake:
266 | # - Makefile.am
267 | # - .m4
268 |
269 | make:
270 | - BSDmakefile
271 | - Makefile
272 | - makefile
273 | - .make
274 | - .mk
275 |
276 | cmake:
277 | - .cmake
278 | - CMakeLists.txt
279 | - .cmake.in
280 |
281 | configure:
282 | - configure
283 | - configure.ac
284 |
285 | meson:
286 | - meson.build
287 | - meson_options.txt
288 |
289 | ninja:
290 | - build.ninja
291 |
292 | pip:
293 | - requirements.txt
294 |
295 | scons:
296 | - SConscript
297 | - SConstruct
298 |
299 | packaging:
300 | go:
301 | - go.mod
302 | python:
303 | - MANIFEST.in
304 | - setup.py
305 | - pyproject.toml
306 | ruby:
307 | - .gemspec
308 | v:
309 | - v.mod
310 |
311 | code-style:
312 | python:
313 | - .flake8
314 |
315 | cxx:
316 | - .clang-format
317 |
318 | javascript:
319 | - .eslintrc
320 |
321 | editors:
322 | editorconfig:
323 | - .editorconfig
324 | qt:
325 | - .pro
326 | kdevelop:
327 | - .kdevelop
328 |
329 | documentation:
330 | doxygen:
331 | - Doxyfile
332 | - .dox
333 |
334 | continuous-integration:
335 | - appveyor.yml
336 | - azure-pipelines.yml
337 | - .cirrus.yml
338 | - .gitlab-ci.yml
339 | - .travis.yml
340 |
341 | media:
342 | image:
343 | application:
344 | - .ai # Illustrator
345 | - .excalidraw
346 | - .kra # Krita
347 | - .psd # Photoshop
348 | - .xcf # GIMP
349 | - .xvf # GIMP
350 |
351 | bitmap:
352 | - .avif
353 | - .bmp
354 | - .exr # OpenEXR
355 | - .gif
356 | - .heif
357 | - .ico
358 | - .jpeg
359 | - .jpg
360 | - .jxl
361 | - .pbm
362 | - .pcx
363 | - .pgm
364 | - .png
365 | - .ppm
366 | - .qoi
367 | - .tga
368 | - .tif
369 | - .tiff
370 | - .webp
371 | - .xpm
372 |
373 | raw: # Camera RAW files, based on https://en.wikipedia.org/wiki/Raw_image_format (.tif omitted to avoid duplication)
374 | - .3fr
375 | - .ari
376 | - .arw
377 | - .bay
378 | - .braw
379 | - .cap
380 | - .cr2
381 | - .cr3
382 | - .crw
383 | - .data
384 | - .dcr
385 | - .dcs
386 | - .dng
387 | - .drf
388 | - .eip
389 | - .erf
390 | - .fff
391 | - .gpr
392 | - .iiq
393 | - .k25
394 | - .kdc
395 | - .mdc
396 | - .mef
397 | - .mos
398 | - .mrw
399 | - .nef
400 | - .nrw
401 | - .obm
402 | - .orf
403 | - .pef
404 | - .ptx
405 | - .pxn
406 | - .r3d
407 | - .raf
408 | - .raw
409 | - .rw2
410 | - .rwl
411 | - .rwz
412 | - .sr2
413 | - .srf
414 | - .srw
415 | - .x3f
416 |
417 | vector:
418 | - .dxf
419 | - .eps
420 | - .svg
421 |
422 | audio:
423 | - .aif
424 | - .ape
425 | - .flac
426 | - .m3u
427 | - .m4a
428 | - .mid
429 | - .mp3
430 | - .ogg
431 | - .opus
432 | - .wav
433 | - .wma
434 | - .wv
435 |
436 | video:
437 | - .avi
438 | - .flv
439 | - .h264
440 | - .m4v
441 | - .mkv
442 | - .mov
443 | - .mp4
444 | - .mpeg
445 | - .mpg
446 | - .ogv
447 | - .rm
448 | - .swf
449 | - .vob
450 | - .webm
451 | - .wmv
452 |
453 | fonts:
454 | - .fnt
455 | - .fon
456 | - .otf
457 | - .ttf
458 | - .woff
459 | - .woff2
460 |
461 | 3d: # File formats relating to 3D data for computer graphics, CAD, 3D printing etc.
462 | application:
463 | - .blend # Blender scene file
464 | - .gdshader # Godot
465 | - .hda # Houdini Digital Assets
466 | - .hip # Houdini scene file
467 | - .ma # Maya scene file
468 | - .mb # Maya scene file
469 | - .otl # Houdini Operator Type Library
470 |
471 | mesh:
472 | - .3ds
473 | - .3mf # 3D manufacturing format
474 | - .alembic
475 | - .amf # Additive Manifacturing File
476 | - .dae # Collada
477 | - .fbx
478 | - .iges
479 | - .igs
480 | - .mtl # material for .obj
481 | - .obj
482 | - .step
483 | - .stl
484 | - .stp
485 | - .tscn
486 | - .usd # Universal Scene Description (stores many things)
487 | - .usda # .usd ASCII-format
488 | - .usdc # .usd binary-format
489 | - .usdz # .usd package
490 | - .wrl # VRML
491 | - .x3d
492 |
493 | office:
494 | document:
495 | - .djvu
496 | - .doc
497 | - .docx
498 | - .epub
499 | - .odt
500 | - .pdf
501 | - .ps
502 | - .rtf
503 | - .sxw
504 |
505 | spreadsheet:
506 | - .xls
507 | - .xlsx
508 | - .ods
509 | - .xlr
510 |
511 | presentation:
512 | - .ppt
513 | - .pptx
514 | - .odp
515 | - .sxi
516 | - .kex
517 | - .pps
518 |
519 | calendar:
520 | - .ics
521 |
522 | archives:
523 | # comic-books:
524 | # - .cb7
525 | # - .cba
526 | # - .cbr
527 | # - .cbt
528 | # - .cbz
529 |
530 | packages:
531 | - .apk
532 | - .deb
533 | - .msi
534 | - .rpm
535 | - .xbps
536 |
537 | ros:
538 | - .bag
539 |
540 | images:
541 | - .bin
542 | - .dmg
543 | - .img
544 | - .iso
545 | - .toast
546 | - .vcd
547 |
548 | other:
549 | - .7z
550 | - .arj
551 | - .bz
552 | - .bz2
553 | - .db
554 | - .gz
555 | - .jar
556 | - .pkg
557 | - .rar
558 | - .tar
559 | - .tbz
560 | - .tbz2
561 | - .tgz
562 | - .xz
563 | - .z
564 | - .zip
565 | - .zst
566 |
567 | executable:
568 | windows:
569 | - .bat
570 | - .com
571 | - .exe
572 |
573 | library:
574 | - .so
575 | - .a
576 | - .dll
577 | - .dylib
578 |
579 | linux:
580 | - .ko
581 |
582 | unimportant:
583 | build_artifacts:
584 | cxx:
585 | - .o
586 | - .la
587 | - .lo
588 | cmake:
589 | - CMakeCache.txt
590 | automake:
591 | - Makefile.in
592 | rust:
593 | - .rlib
594 | - .rmeta
595 | python:
596 | - .pyc
597 | - .pyd
598 | - .pyo
599 | haskell:
600 | - .dyn_hi
601 | - .dyn_o
602 | - .cache
603 | - .hi
604 | java:
605 | - .class
606 | scons:
607 | - .scons_opt
608 | - .sconsign.dblite
609 | latex:
610 | - .aux
611 | - .bbl
612 | - .bcf
613 | - .blg
614 | - .fdb_latexmk
615 | - .fls
616 | - .idx
617 | - .ilg
618 | - .ind
619 | - .out
620 | - .sty
621 | - .synctex.gz
622 | - .toc
623 | llvm:
624 | - .bc
625 |
626 | macos:
627 | - .CFUserTextEncoding
628 | - .DS_Store
629 | - .localized
630 | - Icon\r
631 |
632 | other:
633 | - "~"
634 | - .bak
635 | - .ctags
636 | - .dat
637 | - .git # only works for '.git' files (submodules)
638 | - .lock
639 | - .log
640 | - .orig
641 | - .pid
642 | - .swp
643 | - .stignore
644 | - .timestamp
645 | - .tmp
646 | - stderr
647 | - stdin
648 | - stdout
649 | - bun.lockb
650 | - go.sum
651 | - package-lock.json
652 |
--------------------------------------------------------------------------------
/fish/functions/fish_helix_key_bindings.fish:
--------------------------------------------------------------------------------
1 | # IMPORTANT!!!
2 | #
3 | # When defining your own bindings using fish_helix_command, be aware that it can break
4 | # stuff sometimes.
5 | #
6 | # It is safe to define a binding consisting of a lone call to fish_helix_command.
7 | # Calls to other functions and executables are allowed along with it, granted they don't mess
8 | # with fish's commandline buffer.
9 | #
10 | # Mixing multiple fish_helix_commandline and commandline calls in one binding MAY trigger issues.
11 | # Nothing serious, but don't be surprised. Just test it.
12 |
13 | function fish_helix_key_bindings --description 'helix-like key bindings for fish'
14 | if contains -- -h $argv
15 | or contains -- --help $argv
16 | echo "Sorry but this function doesn't support -h or --help"
17 | return 1
18 | end
19 |
20 | # Erase all bindings if not explicitly requested otherwise to
21 | # allow for hybrid bindings.
22 | # This needs to be checked here because if we are called again
23 | # via the variable handler the argument will be gone.
24 | set -l rebind true
25 | if test "$argv[1]" = --no-erase
26 | set rebind false
27 | set -e argv[1]
28 | else
29 | bind --erase --all --preset # clear earlier bindings, if any
30 | end
31 |
32 | # Allow just calling this function to correctly set the bindings.
33 | # Because it's a rather discoverable name, users will execute it
34 | # and without this would then have subtly broken bindings.
35 | if test "$fish_key_bindings" != fish_helix_key_bindings
36 | and test "$rebind" = true
37 | # Allow the user to set the variable universally.
38 | set -q fish_key_bindings
39 | or set -g fish_key_bindings
40 | # This triggers the handler, which calls us again and ensures the user_key_bindings
41 | # are executed.
42 | set fish_key_bindings fish_helix_key_bindings
43 | return
44 | end
45 |
46 | set -l init_mode insert
47 |
48 | if contains -- $argv[1] insert default visual
49 | set init_mode $argv[1]
50 | else if set -q argv[1]
51 | # We should still go on so the bindings still get set.
52 | echo "Unknown argument $argv" >&2
53 | end
54 |
55 | # Inherit shared key bindings.
56 | # Do this first so helix-bindings win over default.
57 | for mode in insert default visual
58 | __fish_shared_key_bindings -s -M $mode
59 | end
60 |
61 | bind -s --preset -M insert \r execute
62 | bind -s --preset -M insert \n execute
63 |
64 | bind -s --preset -M insert "" self-insert
65 |
66 | # Space and other command terminators expand abbrs _and_ inserts itself.
67 | bind -s --preset -M insert " " self-insert expand-abbr
68 | bind -s --preset -M insert ";" self-insert expand-abbr
69 | bind -s --preset -M insert "|" self-insert expand-abbr
70 | bind -s --preset -M insert "&" self-insert expand-abbr
71 | bind -s --preset -M insert "^" self-insert expand-abbr
72 | bind -s --preset -M insert ">" self-insert expand-abbr
73 | bind -s --preset -M insert "<" self-insert expand-abbr
74 | # Closing a command substitution expands abbreviations
75 | bind -s --preset -M insert ")" self-insert expand-abbr
76 | # Ctrl-space inserts space without expanding abbrs
77 | bind -s --preset -M insert -k nul 'commandline -i " "'
78 |
79 | # Switching to insert mode
80 | for mode in default visual
81 | bind -s --preset -M $mode -m insert \cc end-selection cancel-commandline repaint-mode
82 | bind -s --preset -M $mode -m insert \n end-selection execute
83 | bind -s --preset -M $mode -m insert \r end-selection execute
84 | bind -s --preset -M $mode -m insert o end-selection insert-line-under repaint-mode
85 | bind -s --preset -M $mode -m insert O end-selection insert-line-over repaint-mode
86 | # FIXME i/a should keep selection, maybe
87 | bind -s --preset -M $mode i "fish_helix_command insert_mode"
88 | bind -s --preset -M $mode I "fish_helix_command prepend_to_line"
89 | bind -s --preset -M $mode a "fish_helix_command append_mode"
90 | bind -s --preset -M $mode A "fish_helix_command append_to_line"
91 | end
92 |
93 | # Switching from insert mode
94 | # Note if we are paging, we want to stay in insert mode
95 | # See #2871
96 | bind -s --preset -M insert \e "if commandline -P; commandline -f cancel; else; set fish_bind_mode default; commandline -f begin-selection repaint-mode; end"
97 |
98 | # Switching between normal and visual mode
99 | bind -s --preset -M default -m visual v repaint-mode
100 | for key in v \e
101 | bind -s --preset -M visual -m default $key repaint-mode
102 | end
103 |
104 | # Motion and actions in normal/select mode
105 | for mode in default visual
106 | if test $mode = default
107 | set -f n_begin_selection begin-selection # only begin-selection if current mode is Normal
108 | set -f ns_move_extend move
109 | set -f commandline_v_repaint ""
110 | else
111 | set -f n_begin_selection
112 | set -f ns_move_extend extend
113 | set -f commandline_v_repaint "commandline -f repaint-mode"
114 | end
115 |
116 | for key in (seq 0 9)
117 | bind -s --preset -M $mode $key "fish_bind_count $key"
118 | # FIXME example to bind 0
119 | # FIXME backspace to edit count
120 | end
121 | for key in h \e\[D \eOD "-k left"
122 | bind -s --preset -M $mode $key "fish_helix_command "$ns_move_extend"_char_left"
123 | end
124 | for key in l \e\[C \eOC "-k right"
125 | bind -s --preset -M $mode $key "fish_helix_command "$ns_move_extend"_char_right"
126 | end
127 | for key in k \e\[A \eOA "-k up"
128 | bind -s --preset -M $mode $key "fish_helix_command char_up"
129 | end
130 | for key in j \e\[B \eOB "-k down"
131 | bind -s --preset -M $mode $key "fish_helix_command char_down"
132 | end
133 |
134 | bind -s --preset -M $mode w "fish_helix_command next_word_start"
135 | bind -s --preset -M $mode b "fish_helix_command prev_word_start"
136 | bind -s --preset -M $mode e "fish_helix_command next_word_end"
137 | bind -s --preset -M $mode W "fish_helix_command next_long_word_start"
138 | bind -s --preset -M $mode B "fish_helix_command prev_long_word_start"
139 | bind -s --preset -M $mode E "fish_helix_command next_long_word_end"
140 |
141 | bind -s --preset -M $mode t "fish_helix_command till_next_char"
142 | bind -s --preset -M $mode f "fish_helix_command find_next_char"
143 | bind -s --preset -M $mode T "fish_helix_command till_prev_char"
144 | bind -s --preset -M $mode F "fish_helix_command find_prev_char"
145 |
146 | bind -s --preset -M $mode t\e ""
147 | bind -s --preset -M $mode f\e ""
148 | bind -s --preset -M $mode T\e ""
149 | bind -s --preset -M $mode F\e ""
150 |
151 | for enter in \r \n
152 | bind -s --preset -M $mode t$enter "fish_helix_command till_next_cr"
153 | bind -s --preset -M $mode f$enter "fish_helix_command find_next_cr"
154 | bind -s --preset -M $mode T$enter "fish_helix_command till_prev_cr"
155 | bind -s --preset -M $mode F$enter "fish_helix_command find_prev_cr"
156 | end
157 |
158 | for key in gh \e\[H \eOH "-k home"
159 | bind -s --preset -M $mode $key "fish_helix_command goto_line_start"
160 | end
161 | for key in gl \e\[F \eOF "-k end"
162 | bind -s --preset -M $mode $key "fish_helix_command goto_line_end"
163 | end
164 | bind -s --preset -M $mode gs "fish_helix_command goto_first_nonwhitespace"
165 | bind -s --preset -M $mode gg "fish_helix_command goto_file_start"
166 | bind -s --preset -M $mode G "fish_helix_command goto_line"
167 | bind -s --preset -M $mode ge "fish_helix_command goto_last_line"
168 |
169 | # FIXME alt-. doesn't work with t/T
170 | # FIXME alt-. doesn't work with [ftFT][\n\r]
171 | bind -s --preset -M $mode \e. repeat-jump
172 |
173 | # FIXME reselect after undo/redo
174 | bind -s --preset -M $mode u undo begin-selection
175 | bind -s --preset -M $mode U redo begin-selection
176 |
177 | bind -s --preset -M $mode -m replace_one r repaint-mode
178 |
179 | # FIXME registers
180 | # bind -s --preset -M $mode y fish_clipboard_copy
181 | # bind -s --preset -M $mode P fish_clipboard_paste
182 | # bind -s --preset -M $mode R kill-selection begin-selection yank-pop yank
183 |
184 | bind -s --preset -M $mode -m default d "fish_helix_command delete_selection; $commandline_v_repaint"
185 | bind -s --preset -M $mode -m default \ed "fish_helix_command delete_selection_noyank; $commandline_v_repaint"
186 | bind -s --preset -M $mode -m insert c "fish_helix_command delete_selection; commandline -f end-selection repaint-mode"
187 | bind -s --preset -M $mode -m insert \ec "fish_helix_command delete_selection_noyank; commandline -f end-selection repaint-mode"
188 |
189 | bind -s --preset -M $mode -m default y "fish_helix_command yank"
190 | bind -s --preset -M $mode p "fish_helix_command paste_after"
191 | bind -s --preset -M $mode P "fish_helix_command paste_before"
192 | bind -s --preset -M $mode R "fish_helix_command replace_selection"
193 |
194 | bind -s --preset -M $mode -m default " y" "fish_clipboard_copy; $commandline_v_repaint"
195 | bind -s --preset -M $mode " p" "fish_helix_command paste_after_clip"
196 | bind -s --preset -M $mode " P" "fish_helix_command paste_before_clip"
197 | bind -s --preset -M $mode " R" "fish_helix_command replace_selection_clip"
198 |
199 | # FIXME keep selection
200 | bind -s --preset -M $mode ~ togglecase-selection
201 | # FIXME ` and \e`
202 |
203 | # FIXME .
204 | # FIXME < and >
205 | # FIXME =
206 |
207 | # FIXME \ca \cx
208 | # FIXME Qq
209 |
210 | ## Shell
211 | # FIXME
212 |
213 | ## Selection manipulation
214 | # FIXME & _
215 |
216 | bind -s --preset -M $mode \; begin-selection
217 | bind -s --preset -M $mode \e\; swap-selection-start-stop
218 | # FIXME \e:
219 |
220 | bind -s --preset -M $mode % "fish_helix_command select_all"
221 |
222 | # FIXME x X \ex
223 | # FIXME J
224 | # FIXME \cc
225 |
226 | ## Search
227 | # FIXME
228 |
229 | ## FIXME minor modes: g, m, space
230 |
231 | ## FIXME [ and ] motions
232 | end
233 |
234 | # FIXME should replace the whole selection
235 | # FIXME should be able to go back to visual mode
236 | bind -s --preset -M replace_one -m default '' delete-char self-insert backward-char repaint-mode
237 | bind -s --preset -M replace_one -m default \r 'commandline -f delete-char; commandline -i \n; commandline -f backward-char; commandline -f repaint-mode'
238 | bind -s --preset -M replace_one -m default \e cancel repaint-mode
239 |
240 | ## FIXME Insert mode keys
241 |
242 | ## Old config from vi:
243 |
244 | # Vi moves the cursor back if, after deleting, it is at EOL.
245 | # To emulate that, move forward, then backward, which will be a NOP
246 | # if there is something to move forward to.
247 | bind -s --preset -M insert -k dc delete-char forward-single-char backward-char
248 | bind -s --preset -M default -k dc delete-char forward-single-char backward-char
249 |
250 | # Backspace deletes a char in insert mode, but not in normal/default mode.
251 | bind -s --preset -M insert -k backspace backward-delete-char
252 | bind -s --preset -M default -k backspace backward-char
253 | bind -s --preset -M insert \ch backward-delete-char
254 | bind -s --preset -M default \ch backward-char
255 | bind -s --preset -M insert \x7f backward-delete-char
256 | bind -s --preset -M default \x7f backward-char
257 | bind -s --preset -M insert -k sdc backward-delete-char # shifted delete
258 | bind -s --preset -M default -k sdc backward-delete-char # shifted delete
259 |
260 | # bind -s --preset '~' togglecase-char forward-single-char
261 | # bind -s --preset gu downcase-word
262 | # bind -s --preset gU upcase-word
263 | #
264 | # bind -s --preset J end-of-line delete-char
265 | # bind -s --preset K 'man (commandline -t) 2>/dev/null; or echo -n \a'
266 | #
267 |
268 | # same vim 'pasting' note as upper
269 | bind -s --preset '"*p' forward-char "commandline -i ( xsel -p; echo )[1]"
270 | bind -s --preset '"*P' "commandline -i ( xsel -p; echo )[1]"
271 |
272 | #
273 | # visual mode
274 | #
275 |
276 | # bind -s --preset -M visual -m insert c kill-selection end-selection repaint-mode
277 | # bind -s --preset -M visual -m insert s kill-selection end-selection repaint-mode
278 | bind -s --preset -M visual -m default '"*y' "fish_clipboard_copy; commandline -f end-selection repaint-mode"
279 | bind -s --preset -M visual -m default '~' togglecase-selection end-selection repaint-mode
280 |
281 | # Set the cursor shape
282 | # After executing once, this will have defined functions listening for the variable.
283 | # Therefore it needs to be before setting fish_bind_mode.
284 | fish_vi_cursor
285 | set -g fish_cursor_selection_mode inclusive
286 |
287 | # set fish_bind_mode $init_mode
288 |
289 | # FIXME this can't be called in sequence in general case,
290 | # because of unsynchronized `commandline -f` and `commandline -C`
291 | function fish_helix_command
292 | argparse h/help -- $argv
293 | or return 1
294 | if test -n "$_flag_help"
295 | echo "Helper function to handle modal key bindings mostly outside of insert mode"
296 | return
297 | end
298 |
299 | # TODO only single command allowed really yet,
300 | # because `commandline -f` queues actions, while `commandline -C` is immediate
301 | for command in $argv
302 | set -f count (fish_bind_count -r)
303 | set -f count_defined $status
304 |
305 | switch $command
306 | case {move,extend}_char_left
307 | commandline -C (math max\(0, (commandline -C) - $count\))
308 | __fish_helix_extend_by_command $command
309 | case {move,extend}_char_right
310 | commandline -C (math (commandline -C) + $count)
311 | __fish_helix_extend_by_command $command
312 |
313 | case char_up
314 | __fish_helix_char_up $fish_bind_mode $count
315 | case char_down
316 | __fish_helix_char_down $fish_bind_mode $count
317 |
318 | case next_word_start
319 | # https://regex101.com/r/KXrl1x/1
320 | set -l regex (string join '' \
321 | '(?:.?\\n+|' \
322 | '[[:alnum:]_](?=[^[:alnum:]_\\s])|' \
323 | '[^[:alnum:]_\\s](?=[[:alnum:]_])|' \
324 | '[^\\S\\n](?=[\\S\\n])|)' \
325 | '((?:[[:alnum:]_]+|[^[:alnum:]_\\s]+|)[^\\S\\n]*)' \
326 | )
327 | __fish_helix_next_word $fish_bind_mode $count $regex
328 |
329 | case next_long_word_start
330 | set -l regex (string join '' \
331 | '(?:.?\\n+|' \
332 | '[^\\S\\n](?=[\\S\\n])|)' \
333 | '(\\S*[^\\S\\n]*)' \
334 | )
335 | __fish_helix_next_word $fish_bind_mode $count $regex
336 |
337 | case next_word_end
338 | # https://regex101.com/r/Gl0KP2/1
339 | set -l regex ' (?:
340 | .?\\n+ |
341 | [[:alnum:]_](?=[^[:alnum:]_]) |
342 | [^[:alnum:]_\\s](?=[[:alnum:]_\\s]) | )
343 | ( [^\\S\\n]*
344 | (?: [[:alnum:]_]+ | [^[:alnum:]_\\s]+ | ) ) '
345 | __fish_helix_next_word $fish_bind_mode $count $regex
346 |
347 | case next_long_word_end
348 | set -l regex ' (?: .?\\n+ | \\S(?=\\s) | )
349 | ( [^\\S\\n]* \\S* ) '
350 | __fish_helix_next_word $fish_bind_mode $count $regex
351 |
352 | case prev_word_start
353 | set -l regex ' ( (?:
354 | [[:alnum:]_]+ |
355 | [^[:alnum:]_\\s]+ | )
356 | [^\\S\\n]* )
357 | (?: \\n+.? |
358 | (?<=[^[:alnum:]_])[[:alnum:]_] |
359 | (?<=[[:alnum:]_\\s])[^[:alnum:]_\\s] | ) '
360 | __fish_helix_prev_word $fish_bind_mode $count $regex
361 |
362 | case prev_long_word_start
363 | set -l regex '
364 | ( \\S* [^\\S\\n]* )
365 | (?: \\n+.? | (?<=\\s)\\S | ) '
366 | __fish_helix_prev_word $fish_bind_mode $count $regex
367 |
368 | case till_next_char
369 | __fish_helix_find_char $fish_bind_mode $count forward-jump-till forward-char
370 | case find_next_char
371 | __fish_helix_find_char $fish_bind_mode $count forward-jump
372 | case till_prev_char
373 | __fish_helix_find_char $fish_bind_mode $count backward-jump-till backward-char
374 | case find_prev_char
375 | __fish_helix_find_char $fish_bind_mode $count backward-jump
376 |
377 | case till_next_cr
378 | __fish_helix_find_next_cr $fish_bind_mode $count 2
379 | case find_next_cr
380 | __fish_helix_find_next_cr $fish_bind_mode $count 1
381 | case till_prev_cr
382 | __fish_helix_find_prev_cr $fish_bind_mode $count 1
383 | case find_prev_cr
384 | __fish_helix_find_prev_cr $fish_bind_mode $count 0
385 |
386 | case goto_line_start
387 | commandline -f beginning-of-line
388 | __fish_helix_extend_by_mode
389 | case goto_line_end
390 | __fish_helix_goto_line_end
391 | __fish_helix_extend_by_mode
392 | case goto_first_nonwhitespace
393 | __fish_helix_goto_first_nonwhitespace
394 | __fish_helix_extend_by_mode
395 |
396 | case goto_file_start
397 | __fish_helix_goto_line $count
398 | case goto_line
399 | if test "$count_defined" = 0 # if true
400 | __fish_helix_goto_line $count
401 | end
402 | case goto_last_line
403 | commandline -f end-of-buffer beginning-of-line
404 | __fish_helix_extend_by_mode
405 |
406 | case insert_mode
407 | commandline -C (commandline -B)
408 | set fish_bind_mode insert
409 | commandline -f end-selection repaint-mode
410 |
411 | case append_mode
412 | commandline -C (commandline -E)
413 | set fish_bind_mode insert
414 | commandline -f end-selection repaint-mode
415 |
416 | case prepend_to_line
417 | __fish_helix_goto_first_nonwhitespace
418 | set fish_bind_mode insert
419 | commandline -f end-selection repaint-mode
420 |
421 | case append_to_line
422 | set fish_bind_mode insert
423 | commandline -f end-selection end-of-line repaint-mode
424 |
425 | case delete_selection
426 | commandline -f kill-selection begin-selection
427 | case delete_selection_noyank
428 | __fish_helix_delete_selection
429 |
430 | case yank
431 | __fish_helix_yank
432 | case paste_before
433 | __fish_helix_paste_before "commandline -f yank"
434 | case paste_after
435 | __fish_helix_paste_after "commandline -f yank"
436 | case replace_selection
437 | __fish_helix_replace_selection "$fish_killring[1]" true
438 |
439 | case paste_before_clip
440 | __fish_helix_paste_before fish_clipboard_paste
441 | case paste_after_clip
442 | __fish_helix_paste_after fish_clipboard_paste --clip
443 | case replace_selection_clip
444 | __fish_helix_replace_selection "" fish_clipboard_paste --clip
445 |
446 | case select_all
447 | commandline -f beginning-of-buffer begin-selection end-of-buffer end-of-line backward-char
448 |
449 | case '*'
450 | echo "[fish-helix]" Unknown command $command >&2
451 | end
452 | end
453 | end
454 |
455 | function __fish_helix_extend_by_command -a piece
456 | if not string match -qr extend_ $piece
457 | commandline -f begin-selection
458 | end
459 | end
460 |
461 | function __fish_helix_extend_by_mode
462 | if test $fish_bind_mode = default
463 | commandline -f begin-selection
464 | end
465 | end
466 |
467 | function __fish_helix_find_char -a mode count fish_cmdline till
468 | # FIXME don't reset selection if N/A
469 | if test $mode = default
470 | commandline -f begin-selection
471 | end
472 | commandline -f $till $fish_cmdline
473 | for i in (seq 2 $count)
474 | commandline -f $till repeat-jump
475 | end
476 | end
477 |
478 | function __fish_helix_find_next_cr -a mode count skip
479 | set -l cursor (commandline -C)
480 | commandline | # Include endling newline intentionally
481 | # Skip until cursor:
482 | sed -z 's/^.\{'(math $cursor + $skip)'\}\(.*\)$/\\1/' |
483 | # Count characters up to the target newline:
484 | sed -z 's/^\(\([^\\n]*\\n\)\{0,'$count'\}\).*/\\1/' |
485 | read -zl chars
486 |
487 | if test $mode = default -a -n "$chars"
488 | commandline -f begin-selection
489 | end
490 | for i in (seq 1 (string length -- "$chars"))
491 | commandline -f forward-char
492 | end
493 | end
494 |
495 | function __fish_helix_find_prev_cr -a mode count skip
496 | set -l cursor (commandline -C)
497 | commandline --cut-at-cursor |
498 | sed -z 's/.\{'$skip'\}\n$//' |
499 | read -zl buffer
500 |
501 | echo -n $buffer |
502 | # Drop characters up to the target newline:
503 | sed -z 's/\(\(\\n[^\\n]*\)\{0,'$count'\}\)$//' |
504 | read -zl chars
505 | set -l n_chars (math (string length -- "$buffer") - (string length -- "$chars"))
506 |
507 | if test $mode = default -a $n_chars != 0
508 | commandline -f begin-selection
509 | end
510 | for i in (seq 1 $n_chars)
511 | commandline -f backward-char
512 | end
513 | end
514 |
515 | function __fish_helix_goto_line_end
516 | # check if we are on an empty line first
517 | commandline | sed -n (commandline -L)'!b;/^$/q;q5' && return
518 | commandline -f end-of-line backward-char
519 | end
520 |
521 | function __fish_helix_goto_first_nonwhitespace
522 | # check if we are on whitespace line first
523 | commandline | sed -n (commandline -L)'!b;/^\\s*$/q;q5' && return
524 | commandline -f beginning-of-line forward-bigword backward-bigword
525 | end
526 |
527 | function __fish_helix_goto_line -a number
528 | set -l lines (math min\($number, (commandline | wc -l)\))
529 | commandline -f beginning-of-buffer
530 | for i in (seq 2 $lines)
531 | commandline -f down-line
532 | end
533 | __fish_helix_extend_by_mode
534 | end
535 |
536 | function __fish_helix_char_up -a mode count
537 | if commandline --paging-mode && not commandline --search-mode
538 | for i in (seq 1 $count)
539 | commandline -f up-line
540 | end
541 | return
542 | end
543 | set -l line (commandline -L)
544 | if commandline --search-mode || test $line = 1
545 | for i in (seq 1 (math min \($count, (count $history)\)))
546 | commandline -f history-search-backward
547 | end
548 | return
549 | end
550 | set -l count (math min\($count, $line-1\))
551 | for i in (seq 1 $count)
552 | commandline -f up-line
553 | end
554 | __fish_helix_extend_by_mode
555 | end
556 |
557 | function __fish_helix_char_down -a mode count
558 | if commandline --paging-mode && not commandline --search-mode
559 | for i in (seq 1 $count)
560 | commandline -f down-line
561 | end
562 | return
563 | end
564 | set -l line (commandline -L)
565 | set -l total (count (commandline))
566 | if commandline --search-mode || test $line = $total
567 | for i in (seq 1 (math min \($count, (count $history)\)))
568 | commandline -f history-search-forward
569 | end
570 | return
571 | end
572 | set -l count (math min\($count, $total - $line\))
573 | for i in (seq 1 $count)
574 | commandline -f down-line
575 | end
576 | __fish_helix_extend_by_mode
577 | end
578 |
579 | function __fish_helix_next_word -a mode count regex
580 | set -f cursor (commandline -C)
581 | commandline |
582 | perl -e '
583 | use open qw(:std :utf8);
584 | do { local $/; substr <>, '$cursor' } =~ m/(?:'$regex'){0,'$count'}/ux;
585 | print $-[1], " ", $+[1];' |
586 | read -f left right
587 | test "$left" = "$right" && return
588 | if test $mode = default
589 | commandline -C (math $cursor + $left)
590 | commandline -f begin-selection
591 | for i in (seq $left (math $right - 2))
592 | commandline -f forward-char
593 | end
594 | else
595 | commandline -C (math $cursor + $right - 1)
596 | end
597 | end
598 |
599 | function __fish_helix_prev_word -a mode count regex
600 | set -f left (math (commandline -C) + 1)
601 | set -f updated 0
602 | for i in (seq 1 $count)
603 | commandline |
604 | perl -e '
605 | use open qw(:std :utf8);
606 | do { local $/; substr <>, 0, '$left' } =~ /(?:'$regex')$/ux;
607 | print $-[1], " ", $+[1];' |
608 | read -l l r
609 | test "$l" = "$r" -o "$l" = 0 -a "$r" = 1 && break
610 | set -f left $l
611 | set -f right $r
612 | set -f updated 1
613 | end
614 | test $updated -eq 0; and return
615 | if test $mode = default
616 | commandline -C (math $right - 1)
617 | commandline -f begin-selection
618 | for i in (seq $left (math $right - 2))
619 | commandline -f backward-char
620 | end
621 | else
622 | commandline -C (math $left)
623 | end
624 | end
625 |
626 | function __fish_helix_delete_selection
627 | set start (commandline -B)
628 | set end (commandline -E)
629 | commandline |
630 | sed -zE 's/^(.{'$start'})(.{0,'(math $end - $start)'})(.*)\\n$/\\1\\3/' |
631 | read -l result
632 |
633 | commandline "$result"
634 | commandline -C $start
635 | commandline -f begin-selection
636 | end
637 |
638 | function __fish_helix_yank
639 | set -l end (commandline -E)
640 | set -l cursor (commandline -C)
641 | commandline -f kill-selection yank backward-char
642 |
643 | for i in (seq $cursor (math $end - 2))
644 | commandline -f backward-char
645 | end
646 | end
647 |
648 | function __fish_helix_paste_before -a cmd_paste
649 | set -l cmd_paste $(string split " " $cmd_paste)
650 | set -l cursor (commandline -C)
651 | set -l start (commandline -B)
652 | set -l end (commandline -E)
653 | commandline -C $start
654 | $cmd_paste
655 | commandline -f begin-selection
656 | for i in (seq $start (math $end - 2))
657 | commandline -f forward-char
658 | end
659 | if test $cursor = $start
660 | commandline -f swap-selection-start-stop
661 | end
662 | end
663 |
664 | function __fish_helix_paste_after -a cmd_paste
665 | set -l cmd_paste $(string split " " $cmd_paste)
666 | set -l cursor (commandline -C)
667 | set -l start (commandline -B)
668 | set -l end (commandline -E)
669 | commandline -C $end
670 | $cmd_paste
671 |
672 | if test "$argv[2]" = --clip
673 | commandline -C (math $end - 1)
674 | else
675 | for i in (seq 0 (string length "$fish_killring[1]"))
676 | commandline -f backward-char
677 | end
678 | end
679 | commandline -f begin-selection
680 | for i in (seq $start (math $end - 2))
681 | commandline -f backward-char
682 | end
683 | if test $cursor != $start
684 | commandline -f swap-selection-start-stop
685 | end
686 | end
687 |
688 | function __fish_helix_replace_selection -a replacement cmd_paste
689 | set -l cmd_paste $(string split " " $cmd_paste)
690 | set cursor (commandline -C)
691 | set start (commandline -B)
692 | set end (commandline -E)
693 | commandline |
694 | sed -zE 's/^(.{'$start'})(.{0,'(math $end - $start)'})(.*)\\n$/\\1'"$(string escape --style=regex "$replacement")"'\\3/' |
695 | read -l result
696 |
697 | commandline "$result"
698 | commandline -C $start
699 | $cmd_paste
700 |
701 | if test "$argv[3]" = --clip
702 | commandline -f backward-char begin-selection
703 | for i in (seq (math $start + 2) (commandline -C))
704 | commandline -f backward-char
705 | end
706 | if test $cursor != $start
707 | commandline -f swap-selection-start-stop
708 | end
709 | else
710 | commandline -f begin-selection
711 | for i in (seq 2 (string length "$replacement"))
712 | commandline -f forward-char
713 | end
714 | if test $cursor = $start
715 | commandline -f swap-selection-start-stop
716 | end
717 | end
718 | end
719 |
720 | function fish_bind_count
721 | argparse h/help z/zero r/read -- $argv
722 | or return 1
723 | if test -n "$_flag_help"
724 | echo "Helper function to track count modifier with modal key bindings"
725 | echo "Usage: $0 [-h] [-z] [DIGITS ...]"
726 | return
727 | end
728 | if test -n "$_flag_zero" || not string match -rq '[1-9]\d*' "$fish_bind_count"
729 | set -g fish_bind_count 0
730 | end
731 | # Iterate over given digits
732 | for arg in $argv
733 | for digit in (string split '' "$arg")
734 | set -g fish_bind_count $(math "$fish_bind_count" \* 10 \+ "$digit")
735 | end
736 | end
737 | if test -n "$_flag_read"
738 | set -l count "$fish_bind_count"
739 | set -g fish_bind_count 0
740 | if test "$count" = 0
741 | echo 1
742 | return 1
743 | else
744 | echo "$count"
745 | end
746 | end
747 | end
748 | end
749 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | GNU GENERAL PUBLIC LICENSE
2 | Version 3, 29 June 2007
3 |
4 | Copyright (C) 2007 Free Software Foundation, Inc.
5 | Everyone is permitted to copy and distribute verbatim copies
6 | of this license document, but changing it is not allowed.
7 |
8 | Preamble
9 |
10 | The GNU General Public License is a free, copyleft license for
11 | software and other kinds of works.
12 |
13 | The licenses for most software and other practical works are designed
14 | to take away your freedom to share and change the works. By contrast,
15 | the GNU General Public License is intended to guarantee your freedom to
16 | share and change all versions of a program--to make sure it remains free
17 | software for all its users. We, the Free Software Foundation, use the
18 | GNU General Public License for most of our software; it applies also to
19 | any other work released this way by its authors. You can apply it to
20 | your programs, too.
21 |
22 | When we speak of free software, we are referring to freedom, not
23 | price. Our General Public Licenses are designed to make sure that you
24 | have the freedom to distribute copies of free software (and charge for
25 | them if you wish), that you receive source code or can get it if you
26 | want it, that you can change the software or use pieces of it in new
27 | free programs, and that you know you can do these things.
28 |
29 | To protect your rights, we need to prevent others from denying you
30 | these rights or asking you to surrender the rights. Therefore, you have
31 | certain responsibilities if you distribute copies of the software, or if
32 | you modify it: responsibilities to respect the freedom of others.
33 |
34 | For example, if you distribute copies of such a program, whether
35 | gratis or for a fee, you must pass on to the recipients the same
36 | freedoms that you received. You must make sure that they, too, receive
37 | or can get the source code. And you must show them these terms so they
38 | know their rights.
39 |
40 | Developers that use the GNU GPL protect your rights with two steps:
41 | (1) assert copyright on the software, and (2) offer you this License
42 | giving you legal permission to copy, distribute and/or modify it.
43 |
44 | For the developers' and authors' protection, the GPL clearly explains
45 | that there is no warranty for this free software. For both users' and
46 | authors' sake, the GPL requires that modified versions be marked as
47 | changed, so that their problems will not be attributed erroneously to
48 | authors of previous versions.
49 |
50 | Some devices are designed to deny users access to install or run
51 | modified versions of the software inside them, although the manufacturer
52 | can do so. This is fundamentally incompatible with the aim of
53 | protecting users' freedom to change the software. The systematic
54 | pattern of such abuse occurs in the area of products for individuals to
55 | use, which is precisely where it is most unacceptable. Therefore, we
56 | have designed this version of the GPL to prohibit the practice for those
57 | products. If such problems arise substantially in other domains, we
58 | stand ready to extend this provision to those domains in future versions
59 | of the GPL, as needed to protect the freedom of users.
60 |
61 | Finally, every program is threatened constantly by software patents.
62 | States should not allow patents to restrict development and use of
63 | software on general-purpose computers, but in those that do, we wish to
64 | avoid the special danger that patents applied to a free program could
65 | make it effectively proprietary. To prevent this, the GPL assures that
66 | patents cannot be used to render the program non-free.
67 |
68 | The precise terms and conditions for copying, distribution and
69 | modification follow.
70 |
71 | TERMS AND CONDITIONS
72 |
73 | 0. Definitions.
74 |
75 | "This License" refers to version 3 of the GNU General Public License.
76 |
77 | "Copyright" also means copyright-like laws that apply to other kinds of
78 | works, such as semiconductor masks.
79 |
80 | "The Program" refers to any copyrightable work licensed under this
81 | License. Each licensee is addressed as "you". "Licensees" and
82 | "recipients" may be individuals or organizations.
83 |
84 | To "modify" a work means to copy from or adapt all or part of the work
85 | in a fashion requiring copyright permission, other than the making of an
86 | exact copy. The resulting work is called a "modified version" of the
87 | earlier work or a work "based on" the earlier work.
88 |
89 | A "covered work" means either the unmodified Program or a work based
90 | on the Program.
91 |
92 | To "propagate" a work means to do anything with it that, without
93 | permission, would make you directly or secondarily liable for
94 | infringement under applicable copyright law, except executing it on a
95 | computer or modifying a private copy. Propagation includes copying,
96 | distribution (with or without modification), making available to the
97 | public, and in some countries other activities as well.
98 |
99 | To "convey" a work means any kind of propagation that enables other
100 | parties to make or receive copies. Mere interaction with a user through
101 | a computer network, with no transfer of a copy, is not conveying.
102 |
103 | An interactive user interface displays "Appropriate Legal Notices"
104 | to the extent that it includes a convenient and prominently visible
105 | feature that (1) displays an appropriate copyright notice, and (2)
106 | tells the user that there is no warranty for the work (except to the
107 | extent that warranties are provided), that licensees may convey the
108 | work under this License, and how to view a copy of this License. If
109 | the interface presents a list of user commands or options, such as a
110 | menu, a prominent item in the list meets this criterion.
111 |
112 | 1. Source Code.
113 |
114 | The "source code" for a work means the preferred form of the work
115 | for making modifications to it. "Object code" means any non-source
116 | form of a work.
117 |
118 | A "Standard Interface" means an interface that either is an official
119 | standard defined by a recognized standards body, or, in the case of
120 | interfaces specified for a particular programming language, one that
121 | is widely used among developers working in that language.
122 |
123 | The "System Libraries" of an executable work include anything, other
124 | than the work as a whole, that (a) is included in the normal form of
125 | packaging a Major Component, but which is not part of that Major
126 | Component, and (b) serves only to enable use of the work with that
127 | Major Component, or to implement a Standard Interface for which an
128 | implementation is available to the public in source code form. A
129 | "Major Component", in this context, means a major essential component
130 | (kernel, window system, and so on) of the specific operating system
131 | (if any) on which the executable work runs, or a compiler used to
132 | produce the work, or an object code interpreter used to run it.
133 |
134 | The "Corresponding Source" for a work in object code form means all
135 | the source code needed to generate, install, and (for an executable
136 | work) run the object code and to modify the work, including scripts to
137 | control those activities. However, it does not include the work's
138 | System Libraries, or general-purpose tools or generally available free
139 | programs which are used unmodified in performing those activities but
140 | which are not part of the work. For example, Corresponding Source
141 | includes interface definition files associated with source files for
142 | the work, and the source code for shared libraries and dynamically
143 | linked subprograms that the work is specifically designed to require,
144 | such as by intimate data communication or control flow between those
145 | subprograms and other parts of the work.
146 |
147 | The Corresponding Source need not include anything that users
148 | can regenerate automatically from other parts of the Corresponding
149 | Source.
150 |
151 | The Corresponding Source for a work in source code form is that
152 | same work.
153 |
154 | 2. Basic Permissions.
155 |
156 | All rights granted under this License are granted for the term of
157 | copyright on the Program, and are irrevocable provided the stated
158 | conditions are met. This License explicitly affirms your unlimited
159 | permission to run the unmodified Program. The output from running a
160 | covered work is covered by this License only if the output, given its
161 | content, constitutes a covered work. This License acknowledges your
162 | rights of fair use or other equivalent, as provided by copyright law.
163 |
164 | You may make, run and propagate covered works that you do not
165 | convey, without conditions so long as your license otherwise remains
166 | in force. You may convey covered works to others for the sole purpose
167 | of having them make modifications exclusively for you, or provide you
168 | with facilities for running those works, provided that you comply with
169 | the terms of this License in conveying all material for which you do
170 | not control copyright. Those thus making or running the covered works
171 | for you must do so exclusively on your behalf, under your direction
172 | and control, on terms that prohibit them from making any copies of
173 | your copyrighted material outside their relationship with you.
174 |
175 | Conveying under any other circumstances is permitted solely under
176 | the conditions stated below. Sublicensing is not allowed; section 10
177 | makes it unnecessary.
178 |
179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
180 |
181 | No covered work shall be deemed part of an effective technological
182 | measure under any applicable law fulfilling obligations under article
183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or
184 | similar laws prohibiting or restricting circumvention of such
185 | measures.
186 |
187 | When you convey a covered work, you waive any legal power to forbid
188 | circumvention of technological measures to the extent such circumvention
189 | is effected by exercising rights under this License with respect to
190 | the covered work, and you disclaim any intention to limit operation or
191 | modification of the work as a means of enforcing, against the work's
192 | users, your or third parties' legal rights to forbid circumvention of
193 | technological measures.
194 |
195 | 4. Conveying Verbatim Copies.
196 |
197 | You may convey verbatim copies of the Program's source code as you
198 | receive it, in any medium, provided that you conspicuously and
199 | appropriately publish on each copy an appropriate copyright notice;
200 | keep intact all notices stating that this License and any
201 | non-permissive terms added in accord with section 7 apply to the code;
202 | keep intact all notices of the absence of any warranty; and give all
203 | recipients a copy of this License along with the Program.
204 |
205 | You may charge any price or no price for each copy that you convey,
206 | and you may offer support or warranty protection for a fee.
207 |
208 | 5. Conveying Modified Source Versions.
209 |
210 | You may convey a work based on the Program, or the modifications to
211 | produce it from the Program, in the form of source code under the
212 | terms of section 4, provided that you also meet all of these conditions:
213 |
214 | a) The work must carry prominent notices stating that you modified
215 | it, and giving a relevant date.
216 |
217 | b) The work must carry prominent notices stating that it is
218 | released under this License and any conditions added under section
219 | 7. This requirement modifies the requirement in section 4 to
220 | "keep intact all notices".
221 |
222 | c) You must license the entire work, as a whole, under this
223 | License to anyone who comes into possession of a copy. This
224 | License will therefore apply, along with any applicable section 7
225 | additional terms, to the whole of the work, and all its parts,
226 | regardless of how they are packaged. This License gives no
227 | permission to license the work in any other way, but it does not
228 | invalidate such permission if you have separately received it.
229 |
230 | d) If the work has interactive user interfaces, each must display
231 | Appropriate Legal Notices; however, if the Program has interactive
232 | interfaces that do not display Appropriate Legal Notices, your
233 | work need not make them do so.
234 |
235 | A compilation of a covered work with other separate and independent
236 | works, which are not by their nature extensions of the covered work,
237 | and which are not combined with it such as to form a larger program,
238 | in or on a volume of a storage or distribution medium, is called an
239 | "aggregate" if the compilation and its resulting copyright are not
240 | used to limit the access or legal rights of the compilation's users
241 | beyond what the individual works permit. Inclusion of a covered work
242 | in an aggregate does not cause this License to apply to the other
243 | parts of the aggregate.
244 |
245 | 6. Conveying Non-Source Forms.
246 |
247 | You may convey a covered work in object code form under the terms
248 | of sections 4 and 5, provided that you also convey the
249 | machine-readable Corresponding Source under the terms of this License,
250 | in one of these ways:
251 |
252 | a) Convey the object code in, or embodied in, a physical product
253 | (including a physical distribution medium), accompanied by the
254 | Corresponding Source fixed on a durable physical medium
255 | customarily used for software interchange.
256 |
257 | b) Convey the object code in, or embodied in, a physical product
258 | (including a physical distribution medium), accompanied by a
259 | written offer, valid for at least three years and valid for as
260 | long as you offer spare parts or customer support for that product
261 | model, to give anyone who possesses the object code either (1) a
262 | copy of the Corresponding Source for all the software in the
263 | product that is covered by this License, on a durable physical
264 | medium customarily used for software interchange, for a price no
265 | more than your reasonable cost of physically performing this
266 | conveying of source, or (2) access to copy the
267 | Corresponding Source from a network server at no charge.
268 |
269 | c) Convey individual copies of the object code with a copy of the
270 | written offer to provide the Corresponding Source. This
271 | alternative is allowed only occasionally and noncommercially, and
272 | only if you received the object code with such an offer, in accord
273 | with subsection 6b.
274 |
275 | d) Convey the object code by offering access from a designated
276 | place (gratis or for a charge), and offer equivalent access to the
277 | Corresponding Source in the same way through the same place at no
278 | further charge. You need not require recipients to copy the
279 | Corresponding Source along with the object code. If the place to
280 | copy the object code is a network server, the Corresponding Source
281 | may be on a different server (operated by you or a third party)
282 | that supports equivalent copying facilities, provided you maintain
283 | clear directions next to the object code saying where to find the
284 | Corresponding Source. Regardless of what server hosts the
285 | Corresponding Source, you remain obligated to ensure that it is
286 | available for as long as needed to satisfy these requirements.
287 |
288 | e) Convey the object code using peer-to-peer transmission, provided
289 | you inform other peers where the object code and Corresponding
290 | Source of the work are being offered to the general public at no
291 | charge under subsection 6d.
292 |
293 | A separable portion of the object code, whose source code is excluded
294 | from the Corresponding Source as a System Library, need not be
295 | included in conveying the object code work.
296 |
297 | A "User Product" is either (1) a "consumer product", which means any
298 | tangible personal property which is normally used for personal, family,
299 | or household purposes, or (2) anything designed or sold for incorporation
300 | into a dwelling. In determining whether a product is a consumer product,
301 | doubtful cases shall be resolved in favor of coverage. For a particular
302 | product received by a particular user, "normally used" refers to a
303 | typical or common use of that class of product, regardless of the status
304 | of the particular user or of the way in which the particular user
305 | actually uses, or expects or is expected to use, the product. A product
306 | is a consumer product regardless of whether the product has substantial
307 | commercial, industrial or non-consumer uses, unless such uses represent
308 | the only significant mode of use of the product.
309 |
310 | "Installation Information" for a User Product means any methods,
311 | procedures, authorization keys, or other information required to install
312 | and execute modified versions of a covered work in that User Product from
313 | a modified version of its Corresponding Source. The information must
314 | suffice to ensure that the continued functioning of the modified object
315 | code is in no case prevented or interfered with solely because
316 | modification has been made.
317 |
318 | If you convey an object code work under this section in, or with, or
319 | specifically for use in, a User Product, and the conveying occurs as
320 | part of a transaction in which the right of possession and use of the
321 | User Product is transferred to the recipient in perpetuity or for a
322 | fixed term (regardless of how the transaction is characterized), the
323 | Corresponding Source conveyed under this section must be accompanied
324 | by the Installation Information. But this requirement does not apply
325 | if neither you nor any third party retains the ability to install
326 | modified object code on the User Product (for example, the work has
327 | been installed in ROM).
328 |
329 | The requirement to provide Installation Information does not include a
330 | requirement to continue to provide support service, warranty, or updates
331 | for a work that has been modified or installed by the recipient, or for
332 | the User Product in which it has been modified or installed. Access to a
333 | network may be denied when the modification itself materially and
334 | adversely affects the operation of the network or violates the rules and
335 | protocols for communication across the network.
336 |
337 | Corresponding Source conveyed, and Installation Information provided,
338 | in accord with this section must be in a format that is publicly
339 | documented (and with an implementation available to the public in
340 | source code form), and must require no special password or key for
341 | unpacking, reading or copying.
342 |
343 | 7. Additional Terms.
344 |
345 | "Additional permissions" are terms that supplement the terms of this
346 | License by making exceptions from one or more of its conditions.
347 | Additional permissions that are applicable to the entire Program shall
348 | be treated as though they were included in this License, to the extent
349 | that they are valid under applicable law. If additional permissions
350 | apply only to part of the Program, that part may be used separately
351 | under those permissions, but the entire Program remains governed by
352 | this License without regard to the additional permissions.
353 |
354 | When you convey a copy of a covered work, you may at your option
355 | remove any additional permissions from that copy, or from any part of
356 | it. (Additional permissions may be written to require their own
357 | removal in certain cases when you modify the work.) You may place
358 | additional permissions on material, added by you to a covered work,
359 | for which you have or can give appropriate copyright permission.
360 |
361 | Notwithstanding any other provision of this License, for material you
362 | add to a covered work, you may (if authorized by the copyright holders of
363 | that material) supplement the terms of this License with terms:
364 |
365 | a) Disclaiming warranty or limiting liability differently from the
366 | terms of sections 15 and 16 of this License; or
367 |
368 | b) Requiring preservation of specified reasonable legal notices or
369 | author attributions in that material or in the Appropriate Legal
370 | Notices displayed by works containing it; or
371 |
372 | c) Prohibiting misrepresentation of the origin of that material, or
373 | requiring that modified versions of such material be marked in
374 | reasonable ways as different from the original version; or
375 |
376 | d) Limiting the use for publicity purposes of names of licensors or
377 | authors of the material; or
378 |
379 | e) Declining to grant rights under trademark law for use of some
380 | trade names, trademarks, or service marks; or
381 |
382 | f) Requiring indemnification of licensors and authors of that
383 | material by anyone who conveys the material (or modified versions of
384 | it) with contractual assumptions of liability to the recipient, for
385 | any liability that these contractual assumptions directly impose on
386 | those licensors and authors.
387 |
388 | All other non-permissive additional terms are considered "further
389 | restrictions" within the meaning of section 10. If the Program as you
390 | received it, or any part of it, contains a notice stating that it is
391 | governed by this License along with a term that is a further
392 | restriction, you may remove that term. If a license document contains
393 | a further restriction but permits relicensing or conveying under this
394 | License, you may add to a covered work material governed by the terms
395 | of that license document, provided that the further restriction does
396 | not survive such relicensing or conveying.
397 |
398 | If you add terms to a covered work in accord with this section, you
399 | must place, in the relevant source files, a statement of the
400 | additional terms that apply to those files, or a notice indicating
401 | where to find the applicable terms.
402 |
403 | Additional terms, permissive or non-permissive, may be stated in the
404 | form of a separately written license, or stated as exceptions;
405 | the above requirements apply either way.
406 |
407 | 8. Termination.
408 |
409 | You may not propagate or modify a covered work except as expressly
410 | provided under this License. Any attempt otherwise to propagate or
411 | modify it is void, and will automatically terminate your rights under
412 | this License (including any patent licenses granted under the third
413 | paragraph of section 11).
414 |
415 | However, if you cease all violation of this License, then your
416 | license from a particular copyright holder is reinstated (a)
417 | provisionally, unless and until the copyright holder explicitly and
418 | finally terminates your license, and (b) permanently, if the copyright
419 | holder fails to notify you of the violation by some reasonable means
420 | prior to 60 days after the cessation.
421 |
422 | Moreover, your license from a particular copyright holder is
423 | reinstated permanently if the copyright holder notifies you of the
424 | violation by some reasonable means, this is the first time you have
425 | received notice of violation of this License (for any work) from that
426 | copyright holder, and you cure the violation prior to 30 days after
427 | your receipt of the notice.
428 |
429 | Termination of your rights under this section does not terminate the
430 | licenses of parties who have received copies or rights from you under
431 | this License. If your rights have been terminated and not permanently
432 | reinstated, you do not qualify to receive new licenses for the same
433 | material under section 10.
434 |
435 | 9. Acceptance Not Required for Having Copies.
436 |
437 | You are not required to accept this License in order to receive or
438 | run a copy of the Program. Ancillary propagation of a covered work
439 | occurring solely as a consequence of using peer-to-peer transmission
440 | to receive a copy likewise does not require acceptance. However,
441 | nothing other than this License grants you permission to propagate or
442 | modify any covered work. These actions infringe copyright if you do
443 | not accept this License. Therefore, by modifying or propagating a
444 | covered work, you indicate your acceptance of this License to do so.
445 |
446 | 10. Automatic Licensing of Downstream Recipients.
447 |
448 | Each time you convey a covered work, the recipient automatically
449 | receives a license from the original licensors, to run, modify and
450 | propagate that work, subject to this License. You are not responsible
451 | for enforcing compliance by third parties with this License.
452 |
453 | An "entity transaction" is a transaction transferring control of an
454 | organization, or substantially all assets of one, or subdividing an
455 | organization, or merging organizations. If propagation of a covered
456 | work results from an entity transaction, each party to that
457 | transaction who receives a copy of the work also receives whatever
458 | licenses to the work the party's predecessor in interest had or could
459 | give under the previous paragraph, plus a right to possession of the
460 | Corresponding Source of the work from the predecessor in interest, if
461 | the predecessor has it or can get it with reasonable efforts.
462 |
463 | You may not impose any further restrictions on the exercise of the
464 | rights granted or affirmed under this License. For example, you may
465 | not impose a license fee, royalty, or other charge for exercise of
466 | rights granted under this License, and you may not initiate litigation
467 | (including a cross-claim or counterclaim in a lawsuit) alleging that
468 | any patent claim is infringed by making, using, selling, offering for
469 | sale, or importing the Program or any portion of it.
470 |
471 | 11. Patents.
472 |
473 | A "contributor" is a copyright holder who authorizes use under this
474 | License of the Program or a work on which the Program is based. The
475 | work thus licensed is called the contributor's "contributor version".
476 |
477 | A contributor's "essential patent claims" are all patent claims
478 | owned or controlled by the contributor, whether already acquired or
479 | hereafter acquired, that would be infringed by some manner, permitted
480 | by this License, of making, using, or selling its contributor version,
481 | but do not include claims that would be infringed only as a
482 | consequence of further modification of the contributor version. For
483 | purposes of this definition, "control" includes the right to grant
484 | patent sublicenses in a manner consistent with the requirements of
485 | this License.
486 |
487 | Each contributor grants you a non-exclusive, worldwide, royalty-free
488 | patent license under the contributor's essential patent claims, to
489 | make, use, sell, offer for sale, import and otherwise run, modify and
490 | propagate the contents of its contributor version.
491 |
492 | In the following three paragraphs, a "patent license" is any express
493 | agreement or commitment, however denominated, not to enforce a patent
494 | (such as an express permission to practice a patent or covenant not to
495 | sue for patent infringement). To "grant" such a patent license to a
496 | party means to make such an agreement or commitment not to enforce a
497 | patent against the party.
498 |
499 | If you convey a covered work, knowingly relying on a patent license,
500 | and the Corresponding Source of the work is not available for anyone
501 | to copy, free of charge and under the terms of this License, through a
502 | publicly available network server or other readily accessible means,
503 | then you must either (1) cause the Corresponding Source to be so
504 | available, or (2) arrange to deprive yourself of the benefit of the
505 | patent license for this particular work, or (3) arrange, in a manner
506 | consistent with the requirements of this License, to extend the patent
507 | license to downstream recipients. "Knowingly relying" means you have
508 | actual knowledge that, but for the patent license, your conveying the
509 | covered work in a country, or your recipient's use of the covered work
510 | in a country, would infringe one or more identifiable patents in that
511 | country that you have reason to believe are valid.
512 |
513 | If, pursuant to or in connection with a single transaction or
514 | arrangement, you convey, or propagate by procuring conveyance of, a
515 | covered work, and grant a patent license to some of the parties
516 | receiving the covered work authorizing them to use, propagate, modify
517 | or convey a specific copy of the covered work, then the patent license
518 | you grant is automatically extended to all recipients of the covered
519 | work and works based on it.
520 |
521 | A patent license is "discriminatory" if it does not include within
522 | the scope of its coverage, prohibits the exercise of, or is
523 | conditioned on the non-exercise of one or more of the rights that are
524 | specifically granted under this License. You may not convey a covered
525 | work if you are a party to an arrangement with a third party that is
526 | in the business of distributing software, under which you make payment
527 | to the third party based on the extent of your activity of conveying
528 | the work, and under which the third party grants, to any of the
529 | parties who would receive the covered work from you, a discriminatory
530 | patent license (a) in connection with copies of the covered work
531 | conveyed by you (or copies made from those copies), or (b) primarily
532 | for and in connection with specific products or compilations that
533 | contain the covered work, unless you entered into that arrangement,
534 | or that patent license was granted, prior to 28 March 2007.
535 |
536 | Nothing in this License shall be construed as excluding or limiting
537 | any implied license or other defenses to infringement that may
538 | otherwise be available to you under applicable patent law.
539 |
540 | 12. No Surrender of Others' Freedom.
541 |
542 | If conditions are imposed on you (whether by court order, agreement or
543 | otherwise) that contradict the conditions of this License, they do not
544 | excuse you from the conditions of this License. If you cannot convey a
545 | covered work so as to satisfy simultaneously your obligations under this
546 | License and any other pertinent obligations, then as a consequence you may
547 | not convey it at all. For example, if you agree to terms that obligate you
548 | to collect a royalty for further conveying from those to whom you convey
549 | the Program, the only way you could satisfy both those terms and this
550 | License would be to refrain entirely from conveying the Program.
551 |
552 | 13. Use with the GNU Affero General Public License.
553 |
554 | Notwithstanding any other provision of this License, you have
555 | permission to link or combine any covered work with a work licensed
556 | under version 3 of the GNU Affero General Public License into a single
557 | combined work, and to convey the resulting work. The terms of this
558 | License will continue to apply to the part which is the covered work,
559 | but the special requirements of the GNU Affero General Public License,
560 | section 13, concerning interaction through a network will apply to the
561 | combination as such.
562 |
563 | 14. Revised Versions of this License.
564 |
565 | The Free Software Foundation may publish revised and/or new versions of
566 | the GNU General Public License from time to time. Such new versions will
567 | be similar in spirit to the present version, but may differ in detail to
568 | address new problems or concerns.
569 |
570 | Each version is given a distinguishing version number. If the
571 | Program specifies that a certain numbered version of the GNU General
572 | Public License "or any later version" applies to it, you have the
573 | option of following the terms and conditions either of that numbered
574 | version or of any later version published by the Free Software
575 | Foundation. If the Program does not specify a version number of the
576 | GNU General Public License, you may choose any version ever published
577 | by the Free Software Foundation.
578 |
579 | If the Program specifies that a proxy can decide which future
580 | versions of the GNU General Public License can be used, that proxy's
581 | public statement of acceptance of a version permanently authorizes you
582 | to choose that version for the Program.
583 |
584 | Later license versions may give you additional or different
585 | permissions. However, no additional obligations are imposed on any
586 | author or copyright holder as a result of your choosing to follow a
587 | later version.
588 |
589 | 15. Disclaimer of Warranty.
590 |
591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
599 |
600 | 16. Limitation of Liability.
601 |
602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
610 | SUCH DAMAGES.
611 |
612 | 17. Interpretation of Sections 15 and 16.
613 |
614 | If the disclaimer of warranty and limitation of liability provided
615 | above cannot be given local legal effect according to their terms,
616 | reviewing courts shall apply local law that most closely approximates
617 | an absolute waiver of all civil liability in connection with the
618 | Program, unless a warranty or assumption of liability accompanies a
619 | copy of the Program in return for a fee.
620 |
621 | END OF TERMS AND CONDITIONS
622 |
623 | How to Apply These Terms to Your New Programs
624 |
625 | If you develop a new program, and you want it to be of the greatest
626 | possible use to the public, the best way to achieve this is to make it
627 | free software which everyone can redistribute and change under these terms.
628 |
629 | To do so, attach the following notices to the program. It is safest
630 | to attach them to the start of each source file to most effectively
631 | state the exclusion of warranty; and each file should have at least
632 | the "copyright" line and a pointer to where the full notice is found.
633 |
634 |
635 | Copyright (C)
636 |
637 | This program is free software: you can redistribute it and/or modify
638 | it under the terms of the GNU General Public License as published by
639 | the Free Software Foundation, either version 3 of the License, or
640 | (at your option) any later version.
641 |
642 | This program is distributed in the hope that it will be useful,
643 | but WITHOUT ANY WARRANTY; without even the implied warranty of
644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
645 | GNU General Public License for more details.
646 |
647 | You should have received a copy of the GNU General Public License
648 | along with this program. If not, see .
649 |
650 | Also add information on how to contact you by electronic and paper mail.
651 |
652 | If the program does terminal interaction, make it output a short
653 | notice like this when it starts in an interactive mode:
654 |
655 | Copyright (C)
656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
657 | This is free software, and you are welcome to redistribute it
658 | under certain conditions; type `show c' for details.
659 |
660 | The hypothetical commands `show w' and `show c' should show the appropriate
661 | parts of the General Public License. Of course, your program's commands
662 | might be different; for a GUI interface, you would use an "about box".
663 |
664 | You should also get your employer (if you work as a programmer) or school,
665 | if any, to sign a "copyright disclaimer" for the program, if necessary.
666 | For more information on this, and how to apply and follow the GNU GPL, see
667 | .
668 |
669 | The GNU General Public License does not permit incorporating your program
670 | into proprietary programs. If your program is a subroutine library, you
671 | may consider it more useful to permit linking proprietary applications with
672 | the library. If this is what you want to do, use the GNU Lesser General
673 | Public License instead of this License. But first, please read
674 | .
675 |
--------------------------------------------------------------------------------