Compare commits

...

212 Commits

Author SHA1 Message Date
Hoang Nguyen 0f2574a887
neovim + system
neovim:
    - highlight:
        + adjust treesitter groups for nord (TSField as fg doesn't look
          good in yaml files). Also add highlight for TSNote, TSWarning,
          TSDanger (notes such as 'TODO', 'FIXME', ...)
        + rewrite the way theme is set (now 'g:colors_name' is used
          properly instead of a hacky variable 'g:global_theme'). Also
          make setting theme more modular
        + add 'highlight_languages' groups for other syntaxes (html,
          markdown) that are not covered with treesitter
    - mappings: properly move ':Telescope lsp_range_code_action' to
      visual block + avoid mappings for <C-x> and <C-a> (number
      decrement/increment)
    - null-ls.nvim: add basic config, load before nvim-lspconfig
    - plugins: add nvim-treesitter/playground
    - feline.nvim: lazy loaded on VimEnter
    - nvim-lightbulb: only refresh on CursorHold (previously stopped
      working after entering INSERT mode)
system:
    - tlp: update config for v1.4.0
setup: add ani-cli to scripts.sh
2021-10-18 00:53:25 +07:00
Hoang Nguyen d8b8b179f5
neovim: update script to install sumneko_lua
--rebase might cause the update process to fail on submodules
2021-10-17 21:48:14 +07:00
Hoang Nguyen a74bba23c8
system: add resolvconf config 2021-10-17 21:48:14 +07:00
Hoang Nguyen c196180d0a
neovim: clean up
mappings: add doc for nvim-treesitter mappings
chore: unify the way mappings to a command is called
nvim-treesitter: load vim.opt for folding after setup()
nvim-lspconfig: emmet_ls is now officially supported upstream
2021-10-17 21:48:14 +07:00
Hoang Nguyen d09754811c
gallery-dl: update config to avoid filename collisions 2021-10-17 21:48:14 +07:00
Hoang Nguyen 61b5cb5b70
neovim: revamp
- packer: load vim-eft, nvim-spectre, nvim-dap, persistence.nvim on key
  press instead of on Vim event
- keybindings: redefine multiple, move keybindings for plugins loaded on
  key press to their configs
- plugins: add winshift.nvim, better-escape.nvim, window-picker.nvim,
  neogen, spellsitter.nvim, nvim-lightbulb, close-buffers.nvim
- init.lua: move autocmds back inside async loop (filetype events already
  got handled by filetype.nvim)
- zen-mode.nvim + twilight.nvim: move from 'tools' to 'editor' group
- lsp: change signs characters for unification
- dap: initial config, keybindings
- feline.nvim: reorder elements, add nvim-lightbulb signs
- chore: unify the way setup() is called, and format stuff
2021-10-17 21:48:14 +07:00
Hoang Nguyen a2a7caa279
neovim: bunch of changes again
- Fix commit 8a8e0db586 : vim.opt is a table, so it should have been
  vim.o -> vim.opt:get()
- Add filetype.nvim (improved startup time)
- Drop vimtex. Potentially will switch to tex.nvim
- Re-compile packer only inside '/modules' directory (less eager)
2021-10-17 21:48:14 +07:00
Hoang Nguyen ee9a615cfe
shells: drop z.lua, add fish completion for zoxide 2021-10-17 21:48:14 +07:00
Hoang Nguyen 5dcd5c16be
fzf: bind alt-j, alt-k to scroll preview window 2021-10-17 21:48:14 +07:00
Hoang Nguyen 7991b12511
neovim: make completion menu more colorful
Also change Telescope match highlight to be the same as nvim-cmp
2021-10-17 21:48:14 +07:00
Hoang Nguyen c9941850a2
neovim: breaking change in nvim-cmp config
nvim-cmp now uses floating window instead of pumsible.
See https://github.com/hrsh7th/nvim-cmp/issues/231
2021-10-17 21:48:14 +07:00
Hoang Nguyen 4508f2a819
neovim: replace nvim-lint + neoformat with null-ls.nvim
Also update config for jsonls and yamlls.
2021-10-17 21:48:14 +07:00
Hoang Nguyen 2248faa795
neovim: vim.o -> vim.opt 2021-10-17 21:48:13 +07:00
Hoang Nguyen 1f973f3850
neovim: add scripts to install lsp servers 2021-10-17 21:48:13 +07:00
Hoang Nguyen ef76692015
Various user configs
+ vifm: improve preview scripts
+ lite-xl: change fonts' locations
+ neovim: update config for nvim-tree.lua
2021-10-17 21:48:13 +07:00
Hoang Nguyen 68b4e1d59f
neovim: move autocmd out of async loop
setfiletype doesn't trigger when autocmd is lazy loaded
2021-10-17 21:48:13 +07:00
Hoang Nguyen 493e7d6c1c
Update user agent for various config 2021-10-17 21:48:13 +07:00
Hoang Nguyen 820929c2cb
neovim, emacs: manually configure sumneko_lua
Also neovim: disable options already set (see ':h nvim-defaults')
2021-10-17 21:48:13 +07:00
Hoang Nguyen 5b79df9f6f
scripts: fix syntax + use 0x0.st for url shortening 2021-10-17 21:48:13 +07:00
Hoang Nguyen 9b81f9b07b
Some user configs
- neovim:
    + update lspkind icons for completion
    + start migrating config for nvim-tree.lua
    + update lsp config for sumneko_lua
- scripts:
    + add POSIX clients for PurritoBin (https://bsd.ac)
    + add script to upload to https://0x0.st
2021-10-17 21:48:13 +07:00
Hoang Nguyen 12e151d3e1
Some system config changes
- startwl: move `chmod` out of if statement (ensure $XDG_RUNTIME_DIR
  properly has 0700 permission)
- doas: add Void specified config
- nftables: add note for future changes to block rules
- grub: disable submenu
2021-10-17 21:48:13 +07:00
Hoang Nguyen ea74e9076e
neovim: disable rarely used wilder.nvim + conjure 2021-10-17 21:48:13 +07:00
Hoang Nguyen dfcfbd004a
neovim: configure packer.nvim + add iswap.nvim 2021-10-17 21:48:12 +07:00
Hoang Nguyen a8e3fb728b
neovim: add a snippet for using pandoc 2021-10-17 21:48:12 +07:00
Hoang Nguyen 6f78887641
neovim: changes a bunch
- undodir: move to stdpath('data') to be more inline with other
- add todo-comments.nvim
- whichkey: rebind for hop.nvim (avoid conflicting with vim-sandwich
  blockwise)
- mappings: clean up and rearrange
2021-10-17 21:48:12 +07:00
Hoang Nguyen 8c725aa77c
Lots of changes. See comment :)
- firefox: add script to automate updating user.js
- Anime4K: update version in install script to 4.0.1
- neovim:
    + remove nnn plugin (telescope's file browser has hidden files now)
    + telescope.nvim: update horizontal layout
    + nvim-cmp: update config for lsp, add more sources
    + indent-blankline: update config to use setup()
    + toggleterm, bufferline: repos moved
    + plugins: update multiple small configurations
2021-10-17 21:48:12 +07:00
Hoang Nguyen 2e3a1b70a4
neovim: update highlights for nvim-tree 2021-10-17 21:48:12 +07:00
Hoang Nguyen 0b6f538235
Bunch of changes
- emacs: enable parinfer
- neovim:
    + add config for sniprun
    + replace lsp-rooter.nvim with project.nvim
    + replace galaxyline.nvim with feline.nvim
    + update config for gitsigns.nvim, nvimtree and alpha-nvim
2021-10-17 21:48:12 +07:00
Hoang Nguyen 22945505ed
neovim: update config for gitsigns.nvim 2021-10-17 21:48:12 +07:00
Hoang Nguyen fc2f231aaf
neovim: load persistence.nvim in BufEnter
This way it will still work in a readonly buffer (eg. alpha)
2021-10-17 21:48:12 +07:00
Hoang Nguyen b9d674767b
neovim: replace dashboard-nvim with alpha-nvim + persistence.nvim 2021-10-17 21:48:12 +07:00
Hoang Nguyen e9cdccb8a8
Another bunch of changes
emacs: update init.el following upstream
neovim: add conjure, update packer call for nvim-cmp
2021-10-17 21:48:12 +07:00
Hoang Nguyen 2a62792e2b
Bunch of changes
neovim: add more plugins
nushell, xonsh: update startup hook for starship
2021-10-17 21:48:11 +07:00
Hoang Nguyen 7889449676
neovim: move bufferline highlight to its setup{} 2021-10-17 21:48:11 +07:00
Hoang Nguyen a747daeacd
neovim: asynchronous loading in init.lua
Also fix luasnip mapping for nvim-cmp
2021-10-17 21:48:11 +07:00
Hoang Nguyen f6b969a931
river: update config 2021-10-17 21:48:11 +07:00
Hoang Nguyen fa5374bafe
neovim: reconfigure nvim-cmp mappings + vim.cmd -> vim.api.nvim_command
Also delete `news` script
2021-10-17 21:48:11 +07:00
Hoang Nguyen b45c8f2541
neovim: add editorconfig.vim and spectre.nvim 2021-10-17 21:48:11 +07:00
Hoang Nguyen 58598d112d
neovim: add asynctasks.vim 2021-10-17 21:48:11 +07:00
Hoang Nguyen ac38c5dcc9
neovim: support choice nodes for luasnip
Also turn on short keys for moving between windows
2021-10-17 21:48:11 +07:00
Hoang Nguyen af695b83db
neovim: add undotree and vim-eft
Also fix some cursor highlight groups
2021-10-17 21:48:11 +07:00
Hoang Nguyen 09cef9c60a
neovim: fix luasnip config
lazy_load() won't reload snippets when opening a new buffer, and will
only load general snippets (ft=all) first
2021-10-17 21:48:11 +07:00
Hoang Nguyen ac6be59e68
neovim: configure lsp_signature.nvim 2021-10-17 21:48:11 +07:00
Hoang Nguyen 78b6d2bf54
neovim: add nvim-lint, nvim-dap-ui, vimtex 2021-10-17 21:48:10 +07:00
Hoang Nguyen 3cefe864f4
neovim: big refractor
- nvim-compe -> nvim-cmp
- combine multple modules config into category files
- add some more plugins
2021-10-17 21:48:10 +07:00
Hoang Nguyen 418f3b462b
neovim: lspsaga highlight groups 2021-10-17 21:48:10 +07:00
Hoang Nguyen 7deb0d68f1
neovim: add more plugins 2021-10-17 21:48:10 +07:00
Hoang Nguyen c31868c416
README: mention deprecation of EXWM config 2021-10-17 21:48:10 +07:00
Hoang Nguyen e6e8689b57
Bunch of changes
- shells: set GOPROXY=direct (download sources directly instead of going
through proxy.golang.org)
- emacs: deprecated EXWM
- scripts: api_keys for `imdb` is not valid anymore, and I don't want to
subscribe for another key
2021-10-17 21:48:10 +07:00
Hoang Nguyen 5ecf79b424
neovim: remove deprecated config 2021-10-17 21:48:05 +07:00
Hoang Nguyen 7a33971f18
nftables: add wireguard rules template 2021-10-17 21:48:05 +07:00
Hoang Nguyen c4aa156dd1
river: change color format 2021-10-17 21:48:05 +07:00
Hoang Nguyen c2eee8ce71
river: put XKB env var in the config 2021-10-17 21:48:05 +07:00
Hoang Nguyen c933bc279c
river: update config 2021-10-17 21:48:05 +07:00
Hoang Nguyen b0d2122117
neovim: fix typo 2021-10-17 21:48:05 +07:00
Hoang Nguyen 7a4a5bdeb1
neovim: add translate-shell + orgmode 2021-10-17 21:48:05 +07:00
Hoang Nguyen 8b3da5fff0
starship: update config 2021-10-17 21:48:04 +07:00
Hoang Nguyen d3b5747f57
Some changes
river: remove opacity option
xonsh: add starship init
2021-10-17 21:48:04 +07:00
Hoang Nguyen 2501edc0ea
neovim: add zem-mode + symbol-outline 2021-10-17 21:48:04 +07:00
Hoang Nguyen be9665b0e6
neovim: add hop.nvim 2021-10-17 21:48:04 +07:00
Hoang Nguyen ab971ea6c7
neovim: update Nord for treesitter 2021-10-17 21:48:04 +07:00
Hoang Nguyen 024d62eca3
Add zellij themes 2021-10-17 21:48:04 +07:00
Hoang Nguyen 13b0482e0e
neovim: forgot to rebind lsp 2021-10-17 21:48:04 +07:00
Hoang Nguyen 84c528ddb1
neovim: add trouble.nvim
Also update treesitter highlight groups to be aligned with original
nord.vim
2021-10-17 21:48:04 +07:00
Hoang Nguyen ec3540565a
neovim: add lspkind and nnn.vim 2021-10-17 21:48:04 +07:00
Hoang Nguyen faaf42a125
neovim: fix bufferline TablineFill color
It was called twice.
2021-10-17 21:48:04 +07:00
Hoang Nguyen a0ca5c25b6
neovim: add Neogit config 2021-10-17 21:48:04 +07:00
Hoang Nguyen 26a8058564
neovim: nord highlight groups for lsp 2021-10-17 21:48:03 +07:00
Hoang Nguyen 584e77b933
shells: remove `extract` aliases
Use ~/.local/bin/extract instead
2021-10-17 21:48:03 +07:00
Hoang Nguyen 2dbf4079a5
neovim: minor improvement in lspconfig 2021-10-17 21:48:03 +07:00
Hoang Nguyen 5ab3184378
neovim: add lspconfig, move compe config 2021-10-17 21:48:03 +07:00
Hoang Nguyen e6e5b3149f
Update README 2021-10-17 21:48:03 +07:00
Hoang Nguyen bc7bdb2bdc
neovim: almost done 2021-10-17 21:48:03 +07:00
Hoang Nguyen d1be74ee0b
neovim: lazy-load some plugins
Also rebind mappings for GitSigns
2021-10-17 21:48:03 +07:00
Hoang Nguyen e1b2a23507
Bunch of changes
Credit https://git.sr.ht/~novakane/dotfiles
2021-10-17 21:48:03 +07:00
Hoang Nguyen 52b9be4bee
neovim: add indent-blankline, use which-key for mappings
Also add more nord highlight groups
2021-10-17 21:48:03 +07:00
Hoang Nguyen e03162b21a
neovim: add more config 2021-10-17 21:48:03 +07:00
Hoang Nguyen 0098bc351f
neovim: gitsigns, basic mappings and nord colors
Also update nushell startup hook
2021-10-17 21:48:02 +07:00
Hoang Nguyen c447ef8282
neovim: add bufferline and nvim-tree plugins 2021-10-17 21:48:02 +07:00
Hoang Nguyen 9e2fc5d4bd
emacs: add kokkoro.png splash image 2021-10-17 21:48:02 +07:00
Hoang Nguyen 04434a48d0
Remove gtk2 env, move theme to Matcha-dark-azul 2021-10-17 21:48:02 +07:00
Hoang Nguyen 736ea7fbbc
Comment out gtk-theme 2021-10-17 21:48:02 +07:00
Hoang Nguyen 474d27ec30
neovim: add galaxyline, ditch nord theme 2021-10-17 21:48:02 +07:00
Hoang Nguyen 64cc5e1f00
neovim: basic new config in lua 2021-10-17 21:48:02 +07:00
Hoang Nguyen b080c54e5b
Add glow config
Also deprecate neovim config.
2021-10-17 21:48:02 +07:00
Hoang Nguyen 3b6e1e931b
bash: remove shebang for sourced files 2021-10-17 21:48:02 +07:00
Hoang Nguyen b2ad295899
qutebrowser: update config to 2.3.0; lite-xl: additional font config 2021-10-17 21:48:01 +07:00
Hoang Nguyen f7b271fc59
Add xdg-desktop-portal-wlr config 2021-10-17 21:48:01 +07:00
Hoang Nguyen 432883e6cf
foot: update config to 1.8.0 2021-10-17 21:48:01 +07:00
Hoang Nguyen 8858fe03eb
river: add config for new option set-cursor-warp 2021-10-17 21:48:01 +07:00
Hoang Nguyen 02e98263ae
waybar: add tray module 2021-10-17 21:48:01 +07:00
Hoang Nguyen 4f17266b0b
nftables: move rate limit above established connections 2021-10-17 21:48:01 +07:00
Hoang Nguyen 7dfc942338
nftables: move nat to another table for visibility 2021-10-17 21:48:01 +07:00
Hoang Nguyen 85b24cdbe7
nftables: add libvirt rules for NAT 2021-10-17 21:48:01 +07:00
Hoang Nguyen 0e5f88739f
system: add network note 2021-10-17 21:48:01 +07:00
Hoang Nguyen 657c371abe
shells: update pyenv initial process
pyenv doesn't set path with `init -` anymore.
Also set PATH only once in login shell.
2021-10-17 21:48:01 +07:00
Hoang Nguyen 6adbf27693
river: add some input configuration 2021-10-17 21:48:01 +07:00
Hoang Nguyen 9340e3f9b5
Add qtcreator themes 2021-10-17 21:48:00 +07:00
Hoang Nguyen a13921809f
tlp: update config template for AC 2021-10-17 21:48:00 +07:00
Hoang Nguyen 7240be331e
system: add tlp config template 2021-10-17 21:48:00 +07:00
Hoang Nguyen 16c7177046
Set qutebrowser -> firefox as default browser 2021-10-17 21:48:00 +07:00
Hoang Nguyen 5ca2f568df
neovim/emacs: I'm a 4-space guy now 2021-10-17 21:48:00 +07:00
Hoang Nguyen 4e108abbbd
system: add configurations 2021-10-17 21:48:00 +07:00
Hoang Nguyen 4a8718a544
setup: install things to ~/.local instead of /usr
And some clean up
2021-10-17 21:48:00 +07:00
Hoang Nguyen c33b27332c
zoxide: move ranger.py to deploy.sh 2021-10-17 21:48:00 +07:00
Hoang Nguyen 33f9026493
river: add attach-mode 2021-10-17 21:48:00 +07:00
Hoang Nguyen 1c0e61cb2f
setup: revive nnn.sh setup script
Update READE, delete youbest shell alias
2021-10-17 21:48:00 +07:00
Hoang Nguyen a1fdf46ce2
emacs: vendor org-tree-slide config
Also some irc stuff
2021-10-17 21:47:59 +07:00
Hoang Nguyen 30ed001766
nnn: update settings for v4.1
Also WMs: clean up application rules
2021-10-17 21:47:59 +07:00
Hoang Nguyen 3d0e045de2
foot: use lowercase in key bindings 2021-10-17 21:47:59 +07:00
Hoang Nguyen 2e7f56c14a
Fix path to new Doom Emacs 2021-10-17 21:47:59 +07:00
Hoang Nguyen bd949936d5
emacs: use chemacs2 2021-10-17 21:47:59 +07:00
Hoang Nguyen c71508f34d
Various changes
- emacs: bye freenode
- nwg-bar: back to elogind (bug: can't use polkit)
- Wayland: start pulseaudio server in config (instead of system config)
- Update README
2021-10-17 21:47:59 +07:00
Hoang Nguyen e598aedd3f
Add Element custom themes 2021-10-17 21:47:59 +07:00
Hoang Nguyen f7ead96d6b
Steal weechat's theme + update lazygit config 2021-10-17 21:47:59 +07:00
Hoang Nguyen 64606281de
Add lite-xl basic config 2021-10-17 21:47:59 +07:00
Hoang Nguyen a8f6481710
kitty: update config 2021-10-17 21:47:59 +07:00
Hoang Nguyen e971b784d1
Remove words.txt
Use words-en (aspell) package instead
2021-10-17 21:47:59 +07:00
Hoang Nguyen 2ca7ebcb11
Add tg config
Also fix `dict` (words.txt is in Windows format)
2021-10-17 21:47:58 +07:00
Hoang Nguyen 11d1adce49
Avoid 13pt font size 2021-10-17 21:47:58 +07:00
Hoang Nguyen 09ec1653bd
setup: add words.txt 2021-10-17 21:47:58 +07:00
Hoang Nguyen 045fa07a15
Add fontconfig, umask and silent pyenv init 2021-10-17 21:47:58 +07:00
Hoang Nguyen f35ff9461c
setup: add cht.sh
Also drop termite config
2021-10-17 21:47:58 +07:00
Hoang Nguyen 7af335cfb7
emacs: add eshell-info-banner 2021-10-17 21:47:58 +07:00
Hoang Nguyen 4c996a6311
shell: set MANPATH in man() function instead 2021-10-17 21:47:58 +07:00
Hoang Nguyen 9164d14ff1
wayfire: add simple-tile plugin config 2021-10-17 21:47:58 +07:00
Hoang Nguyen 743b4b6445
shells: add custom manpath 2021-10-17 21:47:58 +07:00
Hoang Nguyen 622b6e4e63
forgit: fix setting env logic 2021-10-17 21:47:58 +07:00
Hoang Nguyen 0423ec56e6
setup: use sh -e; forgit: add clipboard env var 2021-10-17 21:47:58 +07:00
Hoang Nguyen 8688bd5364
greenclip: new config v4.0; delete stuff 2021-10-17 21:47:57 +07:00
Hoang Nguyen 05875b9a3b
shells: change default rsync flags 2021-10-17 21:47:57 +07:00
Hoang Nguyen d5b8b27fb2
nnn: update .nmv 2021-10-17 21:47:57 +07:00
Hoang Nguyen 7c2509c1c8
neovim: use custom parenthesis colors 2021-10-17 21:47:52 +07:00
Hoang Nguyen d2e4a05027
river: update config (river-options is gone) 2021-10-17 21:47:51 +07:00
Hoang Nguyen c56cd923d3
setup: add installer for waifu2x-converter-cpp 2021-10-17 21:47:51 +07:00
Hoang Nguyen ffdb51e5b1
emacs: update fonts 2021-10-17 21:47:51 +07:00
Hoang Nguyen 4f735592c6
nnn: update plugins 2021-10-17 21:47:51 +07:00
Hoang Nguyen cec99f521a
wayfire: add extra plugins 2021-10-17 21:47:51 +07:00
Hoang Nguyen 8b43e93a84
setup: add notes for Anime4K installer 2021-10-17 21:47:51 +07:00
Hoang Nguyen f37e651c10
setup: fix colorscript installer 2021-10-17 21:47:51 +07:00
Hoang Nguyen c09b86e0da
river: update config for river-options-v2
Also get rid of the colorscripts
2021-10-17 21:47:51 +07:00
Hoang Nguyen 6298f0c69a
anime-downloader: fix config 2021-10-17 21:47:51 +07:00
Hoang Nguyen bd6117c8b4
emacs: steal nice things from tecosaur's config 2021-10-17 21:47:50 +07:00
Hoang Nguyen 7120885076
emacs, fish: update package list 2021-10-17 21:47:50 +07:00
Hoang Nguyen 36f49bce52
Abuse fish-shell for XDG_RUNTIME_DIR 2021-10-17 21:47:50 +07:00
Hoang Nguyen 5573edd51b
fish: update fisher, various changes 2021-10-17 21:47:50 +07:00
Hoang Nguyen ca7de54b35
Clean up unnecessary stuff 2021-10-17 21:47:50 +07:00
Hoang Nguyen 3f981be233
emacs: update init.el to reflect upstream 2021-10-17 21:47:50 +07:00
Hoang Nguyen 4b9fd1ed30
emacs: update config for new commits 2021-10-17 21:47:50 +07:00
Hoang Nguyen fbda5add66
qutebrowser: update new config v2.2.0 2021-10-17 21:47:50 +07:00
Hoang Nguyen b8787b2c8d
emacs: add +hugo flag for org module 2021-10-17 21:47:50 +07:00
Hoang Nguyen 69df55f6ce
seatd: remove `loginctl` hardcoded 2021-10-17 21:47:50 +07:00
Hoang Nguyen 2e416c8842
xonsh: use XDG path 2021-10-17 21:47:50 +07:00
Hoang Nguyen 42089e295f
zoxide: add nushell + xonsh init 2021-10-17 21:47:49 +07:00
Hoang Nguyen 6dcec7b3ca
Emacs/Neovim: add tldr 2021-10-17 21:47:49 +07:00
Hoang Nguyen ea8f9b05d6
setup: add Anime4K stuff; fish: add colors setting 2021-10-17 21:47:49 +07:00
Hoang Nguyen 77e7b38ed8
setup: add installer for `afetch` 2021-10-17 21:47:49 +07:00
Hoang Nguyen fa91461823
direnv: tweak hook for fish shell 2021-10-17 21:47:49 +07:00
Hoang Nguyen c4906f8339
vifm: some tweaks 2021-10-17 21:47:49 +07:00
Hoang Nguyen 340c74170a
ranger: prefer qimgv for image files 2021-10-17 21:47:49 +07:00
Hoang Nguyen df64b5e7cc
exa: add --sort=type 2021-10-17 21:47:49 +07:00
Hoang Nguyen 90b894149a
Another 'Various changes' 2021-10-17 21:47:49 +07:00
Hoang Nguyen c46c2d8c04
Various changes 2021-10-17 21:47:49 +07:00
Hoang Nguyen 188cdc6b88
nnn: update plugins
Also drop `elvish` and `ion` config
2021-10-17 21:47:48 +07:00
Hoang Nguyen dd0784924a
wayfire: change default window decoration 2021-10-17 21:47:48 +07:00
Hoang Nguyen 8379927ec7
emacs: adjust some settings 2021-10-17 21:47:48 +07:00
Hoang Nguyen 3dc8848a53
wayfire: update config 2021-10-17 21:47:48 +07:00
Hoang Nguyen b7f4d23dbc
nnn: fix typo in env var 2021-10-17 21:47:48 +07:00
Hoang Nguyen 3c3eca3c12
emacs: adjust org-mode config 2021-10-17 21:47:48 +07:00
Hoang Nguyen 89fadd6b81
zoxide: fix curl link 2021-10-17 21:47:48 +07:00
Hoang Nguyen 1ae7955856
tree -> exa for previewing directories 2021-10-17 21:47:48 +07:00
Hoang Nguyen 1ba97b4a54
Simplify the fzf script for `yay` 2021-10-17 21:47:48 +07:00
Hoang Nguyen 9a3dae27c5
Add gitignore for setup dir 2021-10-17 21:47:48 +07:00
Hoang Nguyen 309a920067
Add -r for xargs 2021-10-17 21:47:48 +07:00
Hoang Nguyen 3e8194f5ee
forgot prefix in setup scripts 2021-10-17 21:47:47 +07:00
Hoang Nguyen 496ed55677
nnn: update flag 2021-10-17 21:47:47 +07:00
Hoang Nguyen b1f816c916
Casual cleanup 2021-10-17 21:47:47 +07:00
Hoang Nguyen 71241ad12b
elvish: add to deploy script 2021-10-17 21:47:47 +07:00
Hoang Nguyen cac1caa806
Add basic elvish shell config 2021-10-17 21:47:47 +07:00
Hoang Nguyen c71be40398
nnn: add to deploy.sh 2021-10-17 21:47:47 +07:00
Hoang Nguyen 7832e74c91
nnn: some tweaks 2021-10-17 21:47:47 +07:00
Hoang Nguyen 6cf209aac3
nnn: change default flags when opening 2021-10-17 21:47:47 +07:00
Hoang Nguyen 14e7b8399f
nnn: use better colors 2021-10-17 21:47:47 +07:00
Hoang Nguyen 04310da09e
neovim: reconfigure nnn.vim 2021-10-17 21:47:47 +07:00
Hoang Nguyen c50d0a100e
Improve integration for TUI file managers 2021-10-17 21:47:46 +07:00
Hoang Nguyen dcd525c8bb
foot: update config 2021-10-17 21:47:46 +07:00
Hoang Nguyen 8b9c2a2d30
Add a pandoc compile script 2021-10-17 21:47:46 +07:00
Hoang Nguyen e0a3568cb5
Update deploy.sh 2021-10-17 21:47:46 +07:00
Hoang Nguyen 1f81225ca4
neovim: translator.vim -> translate-shell.vim 2021-10-17 21:47:46 +07:00
Hoang Nguyen 70a255ad39
Add pipe-viewer config 2021-10-17 21:47:46 +07:00
Hoang Nguyen eed4f4c0b9
bat: use config file instead of multiple env vars 2021-10-17 21:47:46 +07:00
Hoang Nguyen 2a14e9b07d
qutebrowser: typo in config 2021-10-17 21:47:46 +07:00
Hoang Nguyen b6ddbcb73c
Pretify `dict` script 2021-10-17 21:47:46 +07:00
Hoang Nguyen 30cd42b7b2
Add jq to ipinfo 2021-10-17 21:47:46 +07:00
Hoang Nguyen 0823dfb1e6
Split curl scripts 2021-10-17 21:47:45 +07:00
Hoang Nguyen 21885bb001
emacs: add mu4e, circe, mozc 2021-10-17 21:47:45 +07:00
Hoang Nguyen a7712d50da
Half revert last commit 2021-10-17 21:47:45 +07:00
Hoang Nguyen 8e7e617baa
nnn: add `renamer` plugin 2021-10-17 21:47:45 +07:00
Hoang Nguyen a784801bad
x11: add `monitors.sh` script 2021-10-17 21:47:45 +07:00
Hoang Nguyen c40bc875bf
font: change Sarasa Fixed to Sarasa Mono 2021-10-17 21:47:45 +07:00
Hoang Nguyen ffdbba29bd
Add xlsx2csv 2021-10-17 21:47:45 +07:00
Hoang Nguyen a310411790
z: adjust fzf flags 2021-10-17 21:47:45 +07:00
Hoang Nguyen 766a8dedaa
z: use `zoxide` instead of `z.lua` 2021-10-17 21:47:45 +07:00
Hoang Nguyen dcc6d87aa3
emacs: turn on `latex` module 2021-10-17 21:47:45 +07:00
Hoang Nguyen 8b7d7766f9
emacs: revert default git-gutter style 2021-10-17 21:47:44 +07:00
Hoang Nguyen 2c192cfea6
emacs: prefer `emms` module 2021-10-17 21:47:44 +07:00
Hoang Nguyen fa8c927842
waybar: change the `useless` network config 2021-10-17 21:47:44 +07:00
Hoang Nguyen 475a804e96
fish: avoid `alias cat` for completion 2021-10-17 21:47:44 +07:00
Hoang Nguyen 4c6fdbceb2
emacs: adjust config for lua-language-server 2021-10-17 21:47:44 +07:00
Hoang Nguyen 2f350e4145
x11: add sanity check for starting exwm 2021-10-17 21:47:44 +07:00
Hoang Nguyen 312c2df5fe
emacs: add more bloats 2021-10-17 21:47:44 +07:00
Hoang Nguyen 40c9496e1f
emacs/neovim: add `lua-language-server` 2021-10-17 21:47:12 +07:00
383 changed files with 10781 additions and 4968 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
setup/*/

View File

@ -10,70 +10,37 @@
=> is bloated (I use a lot of programs, sometimes just to try out)
=> yet clean (follow XDG base directory specification)
=> for [bspwm](https://github.com/baskerville/bspwm), [spectrwm](https://github.com/conformal/spectrwm), [exwm](https://github.com/ch11ng/exwm), [sway](https://github.com/swaywm/sway), [wayfire](https://github.com/WayfireWM/wayfire), [river](https://github.com/ifreund/river), [hikari](https://hikari.acmelabs.space/)
=> and features [Nord](https://github.com/arcticicestudio/nord) and [OneDark](https://github.com/joshdick/onedark.vim) colorschemes
=> for [bspwm](https://github.com/baskerville/bspwm), [spectrwm](https://github.com/conformal/spectrwm), ~~[exwm](https://github.com/ch11ng/exwm)~~ (deprecated after commit 383de337f4), [sway](https://github.com/swaywm/sway), [wayfire](https://github.com/WayfireWM/wayfire), [river](https://github.com/ifreund/river), [hikari](https://hikari.acmelabs.space/)
=> and features [Nord](https://github.com/arcticicestudio/nord) + [OneDark](https://github.com/joshdick/onedark.vim) colorschemes
![sway](assets/sway.png)
### :package: Details
- Run `deploy.sh` to deploy the dotfiles.
- `setup/` directory contains installers for additional packages.
- Stuff I use:
- **Text editor:** [Emacs](http://www.gnu.org/software/emacs/) + [Neovim](https://github.com/neovim/neovim)
- **Fonts:** [Sarasa Gothic](https://github.com/be5invis/Sarasa-Gothic), [Iosevka Nerd Font](https://github.com/ryanoasis/nerd-fonts), [Iosevka](https://github.com/be5invis/Iosevka)
- **Backlight control:** [light](https://github.com/haikarainen/light) / [brightnessctl](https://github.com/Hummer12007/brightnessctl)
- **Notification daemon:** [mako](https://github.com/emersion/mako) / [dunst](https://github.com/dunst-project/dunst)
- **Clipboard manager:** [greenclip](https://github.com/erebe/greenclip) / [clipman](https://github.com/yory8/clipman)
- **Mixer:** [pulsemixer](https://github.com/GeorgeFilipkin/pulsemixer)
- **mpris:** [mpDris2](https://github.com/eonpatapon/mpDris2), [mpv-mpris](https://github.com/hoyon/mpv-mpris), [playerctl](https://github.com/altdesktop/playerctl)
- **Music:** [ncmpcpp](https://github.com/ncmpcpp/ncmpcpp), [mpd](https://github.com/MusicPlayerDaemon/MPD), [cava](https://github.com/karlstav/cava)
- **Launchers:** [nwg-launchers](https://github.com/nwg-piotr/nwg-launchers) / [wofi](https://hg.sr.ht/~scoopta/wofi), [rofi](https://github.com/davatorium/rofi) / [dmenu](https://git.disroot.org/FollieHiyuki/dmenu)
- **Terminal**: [alacritty](https://github.com/alacritty/alacritty), [foot](https://codeberg.org/dnkl/foot)
- **File manager:** [ranger](https://github.com/ranger/ranger), [vifm](https://github.com/vifm/vifm)
- **Web browser:** [qutebrowser](https://github.com/qutebrowser/qutebrowser)
- **Image viewer:** [feh](https://github.com/derf/feh), [imv](https://github.com/eXeC64/imv)
- **Video player:** [mpv](https://github.com/mpv-player/mpv)
- **Book viewer:** [zathura](https://git.pwmt.org/pwmt/zathura.git)
- **Screenshot tools:** [grim](https://github.com/emersion/grim) + [slurp](https://github.com/emersion/slurp), [scrot](https://github.com/dreamer/scrot)
- **Mail client:** [aerc](https://aerc-mail.org), [neomutt](https://neomutt.org)
- **Shell:** [fish](https://github.com/fish-shell/fish-shell)
- **Shell prompt:** [starship](https://starship.rs/)
- **Anime/Manga/Wallpaper:** [gallery-dl](https://github.com/mikf/gallery-dl) / [mangadl-bash](https://github.com/Akianonymus/mangadl-bash), [anime-downloader](https://github.com/anime-dl/anime-downloader) + [trackma](https://github.com/z411/trackma) + [adl](https://github.com/RaitaroH/adl) / [anigrab](https://github.com/ngomile/anigrab)
- **CLI/TUI for the Internet:** [translate-shell](https://github.com/soimort/translate-shell), [ddgr](https://github.com/jarun/ddgr), [howdoi](https://github.com/gleitz/howdoi), [amfora](https://github.com/makeworld-the-better-one/amfora), [cointop](https://github.com/miguelmota/cointop), [newsboat](https://github.com/newsboat/newsboat), [youtube-dl](https://github.com/ytdl-org/youtube-dl) + [ytmdl](https://github.com/deepjyoti30/ytmdl), [github-cli](https://github.com/cli/cli), [pup](https://github.com/ericchiang/pup), [weechat](https://github.com/weechat/weechat), [curl](https://curl.haxx.se) / [wget](https://www.gnu.org/software/wget/wget.html) / [aria2](https://github.com/aria2/aria2), [tremc](https://github.com/tremc/tremc) + [transmission](https://github.com/transmission/transmission) / [rtorrent](https://github.com/rakshasa/rtorrent), [goaccess](https://github.com/allinurl/goaccess)
- **CLI/TUI for other things:** [tt](https://github.com/runrin/tt), [forgit](https://github.com/wfxr/forgit), [borg](https://github.com/borgbackup/borg), [wendy](https://git.z3bra.org/wendy/log.html), [tokei](https://github.com/XAMPPRocky/tokei), [onefetch](https://github.com/o2sh/onefetch), [calcurse](https://github.com/lfos/calcurse), [qalculate](https://github.com/Qalculate/libqalculate), [fzf](https://github.com/junegunn/fzf), [fd](https://github.com/sharkdp/fd), [ripgrep](https://github.com/BurntSushi/ripgrep), [atool](http://www.nongnu.org/atool/), [rsync](https://rsync.samba.org/), [bottom](https://github.com/clementtsang/bottom), [hyperfine](https://github.com/sharkdp/hyperfine), [delta](https://github.com/dandavison/delta), [bat](https://github.com/sharkdp/bat), [glow](https://github.com/charmbracelet/glow) / [mdcat](https://github.com/lunaryorn/mdcat) / [mdr](https://github.com/MichaelMure/mdr), [exa](https://github.com/ogham/exa), [pandoc](https://github.com/jgm/pandoc), [csview](https://github.com/wfxr/csview), [libsixel](https://github.com/saitoha/libsixel), [buku](https://github.com/jarun/buku), [jq](https://github.com/stedolan/jq), sysstat, psmisc, wireless_tools, tree
> `Emacs` deserves its own set of dependencies listed, but I'm lazy -> Check my Doom config for details
> zsh requires adding `export ZDOTDIR=$HOME/.config/zsh` to **/etc/zsh/zshenv**
> Refer to [this gist](https://gist.github.com/st3r4g/6c681a28b0403b3b02636f510ff68039) for making `pipewire` work on Void Linux. The dotfiles works with `alsa` and `pulseaudio` too with some slightly changes.
### :clipboard: TODO
- [ ] ~~[Material](https://material-theme.site/) / [Ayu](https://github.com/ayu-theme/ayu-colors) palette~~
- [ ] ~~[dotdrop](https://github.com/deadc0de6/dotdrop)~~
- [ ] ~~Additional palette: [Material](https://material-theme.site/) / [Ayu](https://github.com/ayu-theme/ayu-colors)~~
- [ ] ~~[dotdrop](https://github.com/deadc0de6/dotdrop)~~ / ~~Org Babel~~ / Ansible
- [x] Migrate zsh to [zinit](https://github.com/zdharma/zinit)
- [x] Wayland compositors
- [ ] ion / oksh / nushell / osh / xonsh / elvish / oh
- [x] New Neovim config in Lua
- [ ] OneDark highlight groups
- [ ] ~~[ion](https://github.com/redox-os/ion)~~ / [oksh](https://github.com/ibara/oksh) / [nushell](https://www.nushell.sh/) / [oil](https://www.oilshell.org/) / [xonsh](https://xon.sh/) / ~~[elvish](https://elv.sh/)~~ / [oh](https://github.com/michaelmacinnis/oh)
- [ ] NixOS / Guix / Gentoo / FreeBSD
- [ ] New Neovim's config in Lua
- [ ] Independent ~/.emacs.d
- [ ] Org Babel to manage dotfiles
- [ ] [kakoune](https://github.com/mawww/kakoune) / [lite-xl](https://github.com/franko/lite-xl)
### :star2: Credits & License
### :star2: Credits
- [@ChristianChiarulli](https://github.com/ChristianChiarulli) for the Neovim's config
- [@glepnir](https://github.com/glepnir/nvim)'s Neovim config, also [NvChad](https://github.com/NvChad/NvChad) and [nord.nvim](https://github.com/shaunsingh/nord.nvim)
- [@novakane](https://git.sr.ht/~novakane/) for git aliases
- [@hlissner](https://github.com/hlissner)'s zsh config
- [@daviwil](https://github.com/daviwil)'s/[@tecosaur](https://tecosaur.github.io/emacs-config/config.html)'s Emacs configurations
- [@begs](https://git.sr.ht/~begs/dotfiles)'s Waybar config
- [@nathanielevan](https://github.com/nathanielevan/dotfiles)'s weechat config
- [@iohanaan](https://gitlab.com/iohanaan/qtcreator-onedark)'s qtcreator theme
- [some fzf scripts](https://github.com/DanielFGray/fzf-scripts)
- [sysctl.conf template](https://github.com/k4yt3x/sysctl). And also check out [this article](https://madaidans-insecurities.github.io/guides/linux-hardening.html)
- Artists for **kawaii** wallpapers: [@rimuu](https://rimuu.com/), [@hiten](https://www.pixiv.net/users/490219/artworks), [@Tiv](https://www.pixiv.net/en/users/35081), [@mery](https://www.pixiv.net/en/users/2750098), [@Mashima_saki](https://www.pixiv.net/en/users/18403608), [@Yuuki_Tatsuya](https://www.pixiv.net/en/users/27691), [@Bison倉鼠](https://www.pixiv.net/en/users/333556/artworks), [@Dana](https://twitter.com/hapong07), [@gomzi](https://twitter.com/gcmzi), [@Rella](https://twitter.com/Rellakinoko), [@dnwls3010](https://twitter.com/dnwls3010), [@Shigure_Ui](https://www.pixiv.net/en/users/431873), [@QuAn_](https://www.pixiv.net/en/users/6657532/artworks), [@杉87](https://twitter.com/k_su_keke1121), [@fuzichoco](https://twitter.com/fuzichoco), [@Astero](https://twitter.com/asteroid_ill), [@shin556](https://www.pixiv.net/en/users/642762), [@kaynimatic](https://twitter.com/kaynimatic)
- [@hlissner](https://github.com/hlissner) for a detailed zsh config (and Doom Emacs)
### :label: License
- [@daviwil](https://github.com/daviwil) for his Emacs streams
- My Waybar config is heavily inspired by [@begs](https://git.sr.ht/~begs/dotfiles)
- I use some scripts from other people:
- [some fzf scripts](https://github.com/DanielFGray/fzf-scripts)
- [colorscripts](https://gitlab.com/dwt1/shell-color-scripts)
- Artists for **kawaii** wallpapers: [@rimuu](https://rimuu.com/), [@hiten](https://www.pixiv.net/users/490219/artworks), [@Tiv](https://www.pixiv.net/en/users/35081), [@mery](https://www.pixiv.net/en/users/2750098), [@Mashima_saki](https://www.pixiv.net/en/users/18403608), [@Yuuki_Tatsuya](https://www.pixiv.net/en/users/27691), [@Bison倉鼠](https://www.pixiv.net/en/users/333556/artworks), [@Dana](https://twitter.com/hapong07), [@gomzi](https://twitter.com/gcmzi), [@Rella](https://twitter.com/Rellakinoko), [@dnwls3010](https://twitter.com/dnwls3010), [@Shigure_Ui](https://www.pixiv.net/en/users/431873), [@QuAn_](https://www.pixiv.net/en/users/6657532/artworks), [@杉87](https://twitter.com/k_su_keke1121), [@fuzichoco](https://twitter.com/fuzichoco), [@Astero](https://twitter.com/asteroid_ill), [@shin556](https://www.pixiv.net/en/users/642762)
- Others are under MIT license
MIT

103
deploy.sh
View File

@ -1,12 +1,12 @@
#!/bin/sh
echo "Shell (bash/zsh/fish): "
echo "Shell (bash/zsh/fish): " | tr -d '\n'
read -r shell
if [ -z "${shell}" ]
then exit
fi
echo "Display server (wayland/x11): "
echo "Display server (wayland/x11): " | tr -d '\n'
read -r server
if [ -z "${server}" ]
then exit
@ -17,20 +17,19 @@ echo "
"
case ${shell} in
bash)
cp -rfv ./home/.bashrc-bloated ~/.bashrc
cp -rfv ./home/.bash_profile ~/.bash_profile
cp -rfv ./home/.bashrc-bloated ~/.bashrc
cp -rfv ./home/.bash_profile ~/.bash_profile
cp -rfv ./home/.local/share/bash/ ~/.local/share/bash/
;;
zsh)
# Need to add `export ZDOTDIR=$HOME/.config/zsh` to /etc/zsh/zshenv
cp -rfv ./home/.bashrc ~/.bashrc
cp -rfv ./home/.bash_profile ~/.bash_profile
cp -rfv ./home/.config/zsh/ ~/.config/zsh/
cp -rfv ./home/.local/share/zsh/ ~/.local/share/zsh/
;;
fish)
cp -rfv ./home/.bashrc ~/.bashrc
cp -rfv ./home/.bash_profile ~/.bash_profile
cp -rfv ./home/.config/fish/ ~/.config/fish/
mkdir -pv ~/.config/fish/completions
;;
*)
exit ;;
@ -41,36 +40,40 @@ echo "
"
case ${server} in
wayland)
cp -rfv ./home/.config/foot/ ~/.config/foot/
cp -rfv ./home/.config/hikari/ ~/.config/hikari/
cp -rfv ./home/.config/foot/ ~/.config/foot/
cp -rfv ./home/.config/hikari/ ~/.config/hikari/
# Dunst is Wayland native too, since 1.6.0
if command -v dunst >/dev/null
then
cp -rfv ./home/.config/dunst/ ~/.config/dunst/
cp -rfv ./home/.config/dunst/ ~/.config/dunst/
else
cp -rfv ./home/.config/mako/ ~/.config/mako/
cp -rfv ./home/.config/mako/ ~/.config/mako/
fi
cp -rfv ./home/.config/nwg-launchers/ ~/.config/nwg-launchers/
cp -rfv ./home/.config/river/ ~/.config/river/
cp -rfv ./home/.config/sway/ ~/.config/sway/
cp -rfv ./home/.config/swaylock/ ~/.config/swaylock/
cp -rfv ./home/.config/waybar/ ~/.config/waybar/
cp -rfv ./home/.config/wofi/ ~/.config/wofi/
cp -rfv ./home/.config/imv/ ~/.config/imv/
cp -rfv ./home/.config/wayfire.ini ~/.config/wayfire.ini
cp -rfv ./home/.config/nwg-launchers/ ~/.config/nwg-launchers/
cp -rfv ./home/.config/river/ ~/.config/river/
cp -rfv ./home/.config/sway/ ~/.config/sway/
cp -rfv ./home/.config/swaylock/ ~/.config/swaylock/
cp -rfv ./home/.config/waybar/ ~/.config/waybar/
cp -rfv ./home/.config/wofi/ ~/.config/wofi/
cp -rfv ./home/.config/xdg-desktop-portal-wlr/ ~/.config/xdg-desktop-portal-wlr/
# qimgv is preferable
# cp -rfv ./home/.config/imv/ ~/.config/imv/
# cp -rfv ./home/.config/pqivrc ~/.config/pqivrc
cp -rfv ./home/.config/wayfire.ini ~/.config/wayfire.ini
;;
x11)
cp -rfv ./home/.config/bsp-layout/ ~/.config/bsp-layout/
cp -rfv ./home/.config/bspwm/ ~/.config/bspwm/
cp -rfv ./home/.config/dunst/ ~/.config/dunst/
cp -rfv ./home/.config/kitty/ ~/.config/kitty/
cp -rfv ./home/.config/polybar/ ~/.config/polybar/
cp -rfv ./home/.config/rofi/ ~/.config/rofi/
cp -rfv ./home/.config/spectrwm/ ~/.config/spectrwm/
cp -rfv ./home/.config/sxhkd/ ~/.config/sxhkd/
cp -rfv ./home/.config/X11/ ~/.config/X11/
cp -rfv ./home/.config/greenclip.cfg ~/.config/greenclip.cfg
cp -rfv ./home/.config/picom.conf ~/.config/picom.conf
cp -rfv ./home/.config/bsp-layout/ ~/.config/bsp-layout/
cp -rfv ./home/.config/bspwm/ ~/.config/bspwm/
cp -rfv ./home/.config/dunst/ ~/.config/dunst/
cp -rfv ./home/.config/gtk-3.0/ ~/.config/gtk-3.0/
cp -rfv ./home/.config/kitty/ ~/.config/kitty/
cp -rfv ./home/.config/polybar/ ~/.config/polybar/
cp -rfv ./home/.config/rofi/ ~/.config/rofi/
cp -rfv ./home/.config/spectrwm/ ~/.config/spectrwm/
cp -rfv ./home/.config/sxhkd/ ~/.config/sxhkd/
cp -rfv ./home/.config/X11/ ~/.config/X11/
cp -rfv ./home/.config/greenclip.toml ~/.config/greenclip.toml
cp -rfv ./home/.config/picom.conf ~/.config/picom.conf
;;
*)
exit ;;
@ -81,41 +84,58 @@ echo "
"
# Assests
mkdir -pv ~/Pictures
cp -rfv ./home/Pictures/Animated/ ~/Pictures/Animated/
cp -rfv ./home/Pictures/Wallpapers/ ~/Pictures/Wallpapers/
cp -rfv ./home/Pictures/Animated/ ~/Pictures/Animated/
cp -rfv ./home/Pictures/Wallpapers/ ~/Pictures/Wallpapers/
cp -rfv ./home/.local/share/fonts/ ~/.local/share/fonts/
# Scripts
cp -rfv ./home/.local/bin/ ~/.local/bin/
# The bloated dotfiles itself
cp -rfv ./home/.mbsyncrc ~/.mbsyncrc
cp -rfv ./home/.rtorrent.rc ~/.rtorrent.rc
cp -rfv ./home/.config/alacritty/ ~/.config/alacritty/
cp -rfv ./home/.config/amfora/ ~/.config/amfora/
cp -rfv ./home/.config/anime-downloader/ ~/.config/anime-downloader/
cp -rfv ./home/.config/aria2/ ~/.config/aria2/
cp -rfv ./home/.config/bat/ ~/.config/bat/
cp -rfv ./home/.config/bottom/ ~/.config/bottom/
cp -rfv ./home/.config/cava/ ~/.config/cava/
cp -rfv ./home/.config/chemacs/ ~/.config/chemacs/
cp -rfv ./home/.config/cht.sh/ ~/.config/cht.sh/
cp -rfv ./home/.config/cointop/ ~/.config/cointop/
cp -rfv ./home/.config/doom/ ~/.config/doom/
cp -rfv ./home/.config/Element/ ~/.config/Element/
cp -rfv ./home/.config/fontconfig/ ~/.config/fontconfig/
cp -rfv ./home/.config/gallery-dl/ ~/.config/gallery-dl/
cp -rfv ./home/.config/GIMP/ ~/.config/GIMP/
cp -rfv ./home/.config/git/ ~/.config/git/
cp -rfv ./home/.config/gtk-3.0/ ~/.config/gtk-3.0/
cp -rfv ./home/.config/glow/ ~/.config/glow/
# cp -rfv ./home/.config/lazygit/ ~/.config/lazygit/
# cp -rfv ./home/.config/lite-xl/ ~/.config/lite-xl/
cp -rfv ./home/.config/mpd/ ~/.config/mpd/
cp -rfv ./home/.config/mpDris2/ ~/.config/mpDris2/
cp -rfv ./home/.config/mpv/ ~/.config/mpv/
cp -rfv ./home/.config/ncmpcpp/ ~/.config/ncmpcpp/
cp -rfv ./home/.config/neofetch/ ~/.config/neofetch/
# cp -rfv ./home/.config/neofetch/ ~/.config/neofetch/
cp -rfv ./home/.config/newsboat/ ~/.config/newsboat/
cp -rfv ./home/.config/nnn/ ~/.config/nnn/
cp -rfv ./home/.config/npm/ ~/.config/npm/
cp -rfv ./home/.config/nvim/ ~/.config/nvim/
cp -rfv ./home/.config/qutebrowser/ ~/.config/qutebrowser/
cp -rfv ./home/.config/pipe-viewer/ ~/.config/pipe-viewer/
cp -rfv ./home/.config/QtProject/ ~/.config/QtProject/
# cp -rfv ./home/.config/qutebrowser/ ~/.config/qutebrowser/
cp -rfv ./home/.config/ranger/ ~/.config/ranger/
cp -rfv ./home/.config/ripgrep/ ~/.config/ripgrep/
# cp -rfv ./home/.config/tg/ ~/.config/tg/
cp -rfv ./home/.config/tmux/ ~/.config/tmux/
cp -rfv ./home/.config/translate-shell/ ~/.config/translate-shell/
cp -rfv ./home/.config/tridactyl/ ~/.config/tridactyl/
# cp -rfv ./home/.config/tridactyl/ ~/.config/tridactyl/
cp -rfv ./home/.config/vifm/ ~/.config/vifm/
cp -rfv ./home/.config/weechat/ ~/.config/weechat/
cp -rfv ./home/.config/wget/ ~/.config/wget/
cp -rfv ./home/.config/youtube-dl/ ~/.config/youtube-dl/
cp -rfv ./home/.config/ytmdl/ ~/.config/ytmdl/
cp -rfv ./home/.config/zathura/ ~/.config/zathura/
# cp -rfv ./home/.config/zellij/ ~/.config/zellij/
cp -rfv ./home/.config/mimeapps.list ~/.config/mimeapps.list
cp -rfv ./home/.config/pulsemixer.cfg ~/.config/pulsemixer.cfg
cp -rfv ./home/.config/starship.toml ~/.config/starship.toml
@ -125,9 +145,11 @@ cp -rfv ./home/.local/share/gnupg/ ~/.local/share/gnupg/
echo "
~~~ Cloning submodules ~~~
"
[ -d ~/.config/emacs ] || git clone https://github.com/hlissner/doom-emacs ~/.config/emacs
[ -d ~/.config/emacs ] || git clone https://github.com/plexus/chemacs2 ~/.config/emacs
[ -d ~/.config/emacs-config/doom ] || git clone https://github.com/hlissner/doom-emacs ~/.config/emacs-config/doom
[ -d ~/.config/tmux/plugins/tpm ] || git clone https://github.com/tmux-plugins/tpm ~/.config/tmux/plugins/tpm
[ -d ~/.config/ranger/plugins/ranger_devicons ] || git clone https://github.com/FollieHiyuki/ranger_devicons ~/.config/ranger/plugins/ranger_devicons
[ -d ~/.config/ranger/plugins/ranger-zoxide ] || git clone https://github.com/jchook/ranger-zoxide ~/.config/ranger/plugins/ranger-zoxide
echo "
~~~ Post deployment ~~~
@ -136,12 +158,13 @@ echo "
mkdir -pv ~/.local/share/bash
mkdir -pv ~/.local/share/mpd/playlists
mkdir -pv ~/.local/share/gallery-dl
# tridactyl needs `tridactylrc` to work
touch ~/.config/tridactyl/tridactylrc
# gpg directory needs strict permissions
# touch ~/.config/tridactyl/tridactylrc
# Strict permissions
chmod -v 700 ~/.local/share/gnupg
chmod -v 600 ~/.local/share/gnupg/*
# Just to be safe
chmod -v 600 ~/.config/aria2/aria2.conf
# chsh -s /usr/bin/${shell} ${USER}

View File

@ -1,7 +1,8 @@
#!/bin/bash
[ -f $HOME/.bashrc ] && . $HOME/.bashrc
# PATH
export PATH=$HOME/.local/bin:$HOME/.local/bin/fzf:$NODENV_ROOT/bin:$PYENV_ROOT/bin:$POETRY_HOME/bin:$CARGO_HOME/bin:$GOPATH/bin:$NPM_CONFIG_PREFIX/bin:$PATH
# if [[ "$(tty)" = "/dev/tty1" ]]; then
# exec startx $HOME/.config/X11/xinitrc
# fi

View File

@ -1,9 +1,7 @@
#!/usr/bin/env bash
# a minimal approach when bash is not a default shell
export BASH_COMPLETION_USER_DIR="$HOME/.local/share/bash"
export HISTFILE="$HOME/.local/share/bash/bash_history"
export HISTFILE="$BASH_COMPLETION_USER_DIR/bash_history"
# ________ _______________
# __ ___/______ /__ /___(_)_____________ ________
@ -14,6 +12,9 @@ export HISTFILE="$HOME/.local/share/bash/bash_history"
# vi mode
set -o vi
# Better default modes
umask 0027
# ignore upper and lowercase when TAB completion
bind "set completion-ignore-case on"

View File

@ -1,5 +1,3 @@
#!/usr/bin/env bash
# __________
# ___ ____/_________ __
# __ __/ __ __ \_ | / /
@ -12,11 +10,10 @@ export XDG_CACHE_HOME=$HOME/.cache
export XDG_DATA_HOME=$HOME/.local/share
export XDG_DATA_DIRS=$HOME/.local/share/flatpak/exports/share:/var/lib/flatpak/exports/share:/usr/local/share:/usr/share
# alternate paths
export HISTFILE="$XDG_DATA_HOME/bash/bash_history"
export BASH_COMPLETION_USER_DIR="$XDG_DATA_HOME/bash"
export HISTFILE="$BASH_COMPLETION_USER_DIR/bash_history"
export LESSHISTFILE=-
export MOST_INITFILE=$XDG_CONFIG_HOME/mostrc
export GTK2_RC_FILES=$XDG_CONFIG_HOME/gtk-2.0/gtkrc
export TERMINFO="$XDG_DATA_HOME/terminfo"
export TERMINFO_DIRS="$XDG_DATA_HOME/terminfo:/usr/share/terminfo"
export GOPATH=$XDG_DATA_HOME/go
@ -39,30 +36,33 @@ export IPYTHONDIR=$XDG_CONFIG_HOME/ipython
export XAUTHORITY=$XDG_RUNTIME_DIR/Xauthority
export XINITRC=$XDG_CONFIG_HOME/X11/xinitrc
export XSERVERRC=$XDG_CONFIG_HOME/X11/xserverrc
export WGETRC=$XDG_CONFIG_HOME/wget/wgetrc
export WEECHAT_HOME=$XDG_CONFIG_HOME/weechat
export RIPGREP_CONFIG_PATH=$XDG_CONFIG_HOME/ripgrep/config
# env
export PAGER=less
export PAGER="less -R"
export VISUAL=nvim
export EDITOR=nvim
export SVDIR=$HOME/.local/share/service
export _JAVA_AWT_WM_NONREPARENTING=1
export GPG_TTY="$(tty)"
# bat
export BAT_THEME="base16"
export GOPROXY=direct
# pfetch
export PF_INFO="ascii title kernel wm shell uptime pkgs memory"
# fzf
export FZF_DEFAULT_OPTS="--multi --layout=reverse --inline-info
--bind alt-j:preview-down,alt-k:preview-up
--color fg:#D8DEE9,bg:#2E3440,hl:#A3BE8C,fg+:#D8DEE9,bg+:#434C5E,hl+:#A3BE8C
--color pointer:#BF616A,info:#4C566A,spinner:#4C566A,header:#4C566A,prompt:#81A1C1,marker:#EBCB8B"
# export FZF_DEFAULT_OPTS="--multi --layout=reverse --inline-info
# --color dark
# --bind alt-j:preview-down,alt-k:preview-up
# --color fg:-1,bg:-1,hl:#c678dd,fg+:#ffffff,bg+:#4b5263,hl+:#d858fe
# --color info:#98c379,prompt:#61afef,pointer:#be5046,marker:#e5c07b,spinner:#61afef,header:#61afef"
export FZF_DEFAULT_COMMAND="fd --type f --follow --hidden --exclude .git"
export FZF_CTRL_T_OPTS="--no-height --preview-window 'left:60%' --preview '$HOME/.local/bin/garbage/preview {} 2>/dev/null'"
export FZF_CTRL_T_COMMAND="fd --follow --hidden --exclude .git"
export FZF_ALT_C_OPTS="--preview 'tree -La 1 -C --dirsfirst {} 2>/dev/null'"
export FZF_ALT_C_OPTS="--preview 'exa -1a --sort=type --color always --icons {} 2>/dev/null'"
export FZF_ALT_C_COMMAND="fd --type d --follow --hidden --exclude .git"
export FZF_TMUX=1
# ibus
@ -74,34 +74,33 @@ export QT_QPA_PLATFORMTHEME=qt5ct
export QT_PLATFORM_PLUGIN=qt5ct
# .NET
export DOTNET_CLI_TELEMETRY_OPTOUT=1
# z.lua
export _ZL_DATA="$HOME/.local/share/zlua/zlua"
export _ZL_HYPHEN=1
export _ZL_MATCH_MODE=1
export _ZL_FZF_FLAG="-e"
export _ZL_INT_SORT=1
export _ZL_ROOT_MARKERS=".git,.svn,.hg,.root,package.json,.projectile,.pro"
export RANGER_ZLUA="$HOME/.local/share/bash/z.lua"
# Basher
export BASHER_ROOT="$HOME/.local/share/bash/basher"
# zoxide
export _ZO_DATA_DIR="$HOME/.local/share/zoxide"
export _ZO_ECHO=1
export _ZO_FZF_OPTS="$FZF_DEFAULT_OPTS --no-multi"
export _ZO_RESOLVE_SYMLINKS=1
# nodenv
export NODENV_ROOT="$HOME/.local/share/nodenv"
# pyenv
export PYENV_ROOT="$HOME/.local/share/pyenv"
# poetry
export POETRY_HOME="$HOME/.local/share/poetry"
# cht.sh
export CHTSH="$XDG_CONFIG_HOME/cht.sh"
# nnn
if command -v nnn >/dev/null
then
export TERMINAL=alacritty # for the preview script
export NNN_PLUG='t:preview-tui;m:nmount;f:fzcd;c:chksum;n:nuke;z:fzz;b:bulknew;d:dups:h:hexview;o:organize;p:pdfview;s:suedit'
export NNN_OPTS="HUedx"
export NNN_PLUG='b:bulknew;c:fzcd;o:fzopen;z:fzz;d:gpgd;e:gpge;h:hexview;m:nmount;n:nuke;t:preview-tui;r:renamer;p:rsynccp;j:splitjoin;s:suedit;i:ringtone'
export NNN_FIFO="/tmp/nnn.fifo"
export NNN_ARCHIVE='\\.(7z|a|ace|alz|arc|arj|bz|bz2|cab|cpio|deb|gz|jar|lha|lz|lzh|lzma|lzo|rar|rpm|rz|t7z|tar|tbz|tbz2|tgz|tlz|txz|tZ|tzo|war|xpi|xz|Z|zip)$'
export NNN_OPENER="$XDG_CONFIG_HOME/nnn/plugins/nuke"
# export NNN_OPENER="$XDG_CONFIG_HOME/nnn/plugins/nuke"
# export NNN_TRASH=1 # Use trash-cli
export USE_SCOPE=1
export NNN_COLORS='2345'
export NNN_FCOLORS='c1e2272e006033f7c6d6abc4'
export NNN_BMS="h:~;C:~/Code;D:~/Downloads;P:~/Pictures;V:~/Videos;A:~/Media;U:~/Music;f:~/.config;l:~/.local/share;e:/etc;u:/usr/share;o:/opt;b:/boot;m:/media;M:/mnt;i:/run/media/$USER;v:/var;t:/tmp;d:/dev;s:/srv;r:/;k:/bedrock/strata"
export NNN_FCOLORS='c1e20402006006f7c6d6ab01'
export NNN_BMS="h:~;C:~/Code;D:~/Downloads;P:~/Pictures;V:~/Videos;A:~/Media;U:~/Music;f:~/.config;l:~/.local/share;e:/etc;u:/usr/share;o:/opt;b:/boot;m:/media;M:/mnt;i:/run/media/$USER;v:/var;t:/tmp;d:/dev;s:/srv;r:/"
export NNN_SSHFS="sshfs -o reconnect,idmap=user,follow_symlinks"
fi
# lf
@ -358,9 +357,6 @@ then
"
fi
# PATH
export PATH=$HOME/.local/bin:$HOME/.local/bin/fzf:$HOME/.local/share/bash/basher/bin:$NODENV_ROOT/bin:$PYENV_ROOT/bin:$POETRY_HOME/bin:$CARGO_HOME/bin:$GOPATH/bin:$NPM_CONFIG_PREFIX/bin:$PATH
# _________________
# ___ |__ /__(_)_____ ________
# __ /| |_ /__ /_ __ `/_ ___/
@ -368,7 +364,7 @@ export PATH=$HOME/.local/bin:$HOME/.local/bin/fzf:$HOME/.local/share/bash/basher
# /_/ |_/_/ /_/ \__,_/ /____/
#
# remap
alias doas="doas --"
alias x=extract
alias p="pulsemixer"
alias ls="exa -lF --icons --sort=type"
alias la="exa -laF --icons --sort=type"
@ -378,12 +374,8 @@ alias mv="mv -vi"
alias rm="rm -vr"
alias mkdir="mkdir -pv"
alias no="grep -viP"
alias wttr="curl wttr.in"
alias myip="curl ipinfo.io/geo"
alias latest_pkg="expac --timefmt='%Y-%m-%d %T' '%l\t%n' | sort | tail -n 30"
alias yarn="yarn --use-yarnrc $XDG_CONFIG_HOME/yarn/config"
alias tmux="TERM=screen-256color tmux"
alias cat="bat --style plain --color=always"
alias startx="startx $HOME/.config/X11/xinitrc"
alias fehwpp="feh --no-fehbg --bg-fill --randomize ~/Pictures/Wallpapers/*"
# colorizing
@ -395,27 +387,17 @@ alias ncdu="ncdu --color=dark"
alias ip="ip -color=always"
# vim
alias v="nvim"
alias vi='nvim -o "$(fzf)"'
alias vi='fzf | xargs -r nvim -o'
# emacs
alias doom="$HOME/.config/emacs/bin/doom"
alias doom="$HOME/.config/emacs-config/doom/bin/doom"
alias e="emacs -nw"
alias em="emacsclient -c -a 'emacs'"
# rsync
alias rsyncdir="rsync -uavP --delete-after"
alias rsyncfile="rsync -avP"
alias rsyncdir="rsync -avP --delete-after"
# youtube-dl
alias yoump3="youtube-dl --extract-audio --audio-format mp3 --embed-thumbnail"
alias youflac="youtube-dl --extract-audio --audio-format flac"
alias youbest="youtube-dl -f bestvideo+bestaudio"
alias youlist="youtube-dl -f bestvideo+bestaudio --yes-playlist"
# z.lua
alias zz='z -c' # restrict matches to subdirs of $PWD
alias zi='z -i' # cd with interactive selection
alias zf='z -I' # use fzf to select in multiple matches
alias zb='z -b' # quickly cd to the parent directory
# nnn
alias nnn="nnn -Hc"
alias ncp="cat ${NNN_SEL:-${XDG_CONFIG_HOME:-$HOME/.config}/nnn/.selection} | tr '\0' '\n'"
alias youlist="youtube-dl --yes-playlist"
# Lazy cd-ing
alias ..='cd ..'
@ -424,6 +406,7 @@ alias ....='cd ../../..'
# colorize man pages
man() {
MANPATH=$HOME/.local/share/man:$MANPATH \
LESS_TERMCAP_mb=$'\e[01;31m' \
LESS_TERMCAP_md=$'\e[01;36m' \
LESS_TERMCAP_me=$'\e[0m' \
@ -434,134 +417,44 @@ man() {
command man $@
}
alias x=extract
extract() {
local remove_archive
local success
local extract_dir
if (( $# == 0 )); then
cat <<-'EOF' >&2
Usage: extract [-option] [file ...]
Options:
-r, --remove Remove archive after unpacking.
EOF
fi
remove_archive=1
if [[ "$1" == "-r" ]] || [[ "$1" == "--remove" ]]; then
remove_archive=0
shift
fi
while (( $# > 0 )); do
if [[ ! -f "$1" ]]; then
echo "extract: '$1' is not a valid file" >&2
shift
continue
fi
success=0
extract_dir="${1:t:r}"
case "${1:l}" in
*.tar.gz|*.tgz) tar zxvf "$1" ;;
*.tar.bz2|*.tbz|*.tbz2) tar xvjf "$1" ;;
*.tar.xz|*.txz)
tar --xz -xvf "$1" || xzcat "$1" | tar xvf - ;;
*.tar.zma|*.tlz)
tar --lzma -xvf "$1" || lzcat "$1" | tar xvf - ;;
*.tar.zst|*.tzst)
tar --zstd -xvf "$1" || zstdcat "$1" | tar xvf - ;;
*.tar) tar xvf "$1" ;;
*.tar.lz) tar xvf "$1" ;;
*.tar.lz4) lz4 -c -d "$1" | tar xvf - ;;
*.tar.lrz) lrzuntar "$1" ;;
*.gz) gunzip -k "$1" ;;
*.bz2) bunzip2 "$1" ;;
*.xz) unxz "$1" ;;
*.lrz) lrunzip "$1" ;;
*.lz4) lz4 -d "$1" ;;
*.lzma) unlzma "$1" ;;
*.z) uncompress "$1" ;;
*.zip|*.war|*.jar|*.sublime-package|*.ipa|*.ipsw|*.xpi|*.apk|*.aar|*.whl) unzip "$1" -d "$extract_dir" ;;
*.rar) unrar x -ad "$1" ;;
*.rpm) mkdir "$extract_dir" && cd "$extract_dir" && rpm2cpio "../$1" | cpio --quiet -id && cd .. ;;
*.7z) 7za x "$1" ;;
*.deb)
mkdir -p "$extract_dir/control"
mkdir -p "$extract_dir/data"
cd "$extract_dir"; ar vx "../${1}" > /dev/null
cd control; tar xzvf ../control.tar.gz
cd ../data; extract ../data.tar.*
cd ..; rm *.tar.* debian-binary
cd ..
;;
*.zst) unzstd "$1" ;;
*)
echo "extract: '$1' cannot be extracted" >&2
success=1
;;
esac
(( success = $success > 0 ? $success : $? ))
(( $success == 0 )) && (( $remove_archive == 0 )) && rm "$1"
shift
done
}
# update Basher
basher_update() {
pushd $HOME/.local/share/bash/basher >/dev/null || exit
git pull
echo -e "\e[01;34mFinished updating Basher\e[0m"
popd >/dev/null || exit
}
# upgrade Basher's packages
basherpacks_update() {
packages=$(basher list)
for pack in $packages
do
echo -e "\e[01;34mUpgrading $pack\e[0m"
basher upgrade "$pack" >/dev/null 2>&1
done
}
# nnn with cd on quit
n ()
{
# Block nesting of nnn in subshells
if [[ -n $NNNLVL ]] && [ "${NNNLVL:-0}" -ge 1 ]; then
echo "nnn is already running"
return
fi
if command -v nnn >/dev/null; then
alias ncp="cat ${NNN_SEL:-${XDG_CONFIG_HOME:-$HOME/.config}/nnn/.selection} | tr '\0' '\n'"
# The default behaviour is to cd on quit (nnn checks if NNN_TMPFILE is set)
# To cd on quit only on ^G, remove the "export" as in:
# NNN_TMPFILE="${XDG_CONFIG_HOME:-$HOME/.config}/nnn/.lastd"
# NOTE: NNN_TMPFILE is fixed, should not be modified
export NNN_TMPFILE="${XDG_CONFIG_HOME:-$HOME/.config}/nnn/.lastd"
n () {
# Block nesting of nnn in subshells
if [[ -n $NNNLVL ]] && [ "${NNNLVL:-0}" -ge 1 ]; then
echo "nnn is already running"
return
fi
# Unmask ^Q (, ^V etc.) (if required, see `stty -a`) to Quit nnn
# stty start undef
# stty stop undef
# stty lwrap undef
# stty lnext undef
# The default behaviour is to cd on quit (nnn checks if NNN_TMPFILE is set)
# To cd on quit only on ^G, remove the "export" as in:
# NNN_TMPFILE="${XDG_CONFIG_HOME:-$HOME/.config}/nnn/.lastd"
# NOTE: NNN_TMPFILE is fixed, should not be modified
export NNN_TMPFILE="${XDG_CONFIG_HOME:-$HOME/.config}/nnn/.lastd"
nnn "$@"
# Unmask ^Q (, ^V etc.) (if required, see `stty -a`) to Quit nnn
# stty start undef
# stty stop undef
# stty lwrap undef
# stty lnext undef
if [ -f "$NNN_TMPFILE" ]; then
. "$NNN_TMPFILE"
rm -f "$NNN_TMPFILE" > /dev/null
fi
}
nnn "$@"
# nnn in dual pane mode (tmux)
n2() {
tmux new-session -d -s nnn -n nnn "nnn -Hc"
tmux split-window -h "nnn -Hc"
TERM=screen-256color tmux attach -t nnn:nnn
}
if [ -f "$NNN_TMPFILE" ]; then
. "$NNN_TMPFILE"
rm -f "$NNN_TMPFILE" > /dev/null
fi
}
# nnn in dual pane mode (tmux)
n2() {
tmux new-session -d -s nnn -n nnn "nnn -Hc"
tmux split-window -h "nnn -Hc"
TERM=screen-256color tmux attach -t nnn:nnn
}
fi
# typing speed testing
tt() {
@ -571,27 +464,6 @@ tt() {
command tt /tmp/tt.txt
}
# ________ ______
# ___ __ )_____ __________ /______________
# __ __ | __ `/_ ___/_ __ \ _ \_ ___/
# _ /_/ // /_/ /_(__ )_ / / / __/ /
# /_____/ \__,_/ /____/ /_/ /_/\___//_/
#
# Install Basher if missing
if [[ ! -d $HOME/.local/share/bash/basher ]]; then
git clone https://github.com/basherpm/basher.git $HOME/.local/share/bash/basher
fi
eval "$(basher init - bash)"
# Plugins
# [[ -d $HOME/.local/share/bash/basher/cellar/packages/kazhala/dotbare ]] || basher install kazhala/dotbare
[[ -d $HOME/.local/share/bash/basher/cellar/packages/wfxr/forgit ]] || basher install wfxr/forgit
[[ -d $HOME/.local/share/bash/basher/cellar/packages/holman/spark ]] || basher install holman/spark
[[ -d $HOME/.local/share/bash/basher/cellar/packages/unixorn/git-extra-commands ]] || basher install unixorn/git-extra-commands
# Plugins' init
# include kazhala/dotbare dotbare.plugin.bash && _dotbare_completion_cmd
include wfxr/forgit forgit.plugin.sh
# ________ _______________
# __ ___/______ /__ /___(_)_____________ ________
# _____ \_ _ \ __/ __/_ /__ __ \_ __ `/_ ___/
@ -602,21 +474,25 @@ include wfxr/forgit forgit.plugin.sh
mkdir -p "$BASH_COMPLETION_USER_DIR/completions"
# github cli completion
if command -v gh >/dev/null && [ ! -f "$BASH_COMPLETION_USER_DIR/completions/gh" ]; then
gh completion -s bash > "$BASH_COMPLETION_USER_DIR/completions/gh"
fi
# if command -v gh >/dev/null && [ ! -f "$BASH_COMPLETION_USER_DIR/completions/gh" ]; then
# gh completion -s bash > "$BASH_COMPLETION_USER_DIR/completions/gh"
# fi
# kitten from kitty
if command -v kitty > /dev/null; then
source <(kitty + complete setup bash)
fi
# Starship prompt
if command -v starship > /dev/null; then
eval "$(starship init bash --print-full-init)"
fi
# direnv
if command -v direnv >/dev/null ; then
eval "$(direnv hook bash)"
fi
# poetry
# if [ ! -d "$POETRY_HOME" ]; then
# curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python -
@ -624,14 +500,19 @@ fi
# if [[ ! -f $BASH_COMPLETION_USER_DIR/completions/poetry ]]; then
# poetry completions bash > "$BASH_COMPLETION_USER_DIR/completions/poetry"
# fi
# pyenv
# if [[ ! -d $PYENV_ROOT ]]; then
# git clone https://github.com/pyenv/pyenv.git $PYENV_ROOT
# git clone https://github.com/pyenv/pyenv-virtualenv.git $PYENV_ROOT/plugins/pyenv-virtualenv
# git clone https://github.com/pyenv/pyenv-update.git $PYENV_ROOT/plugins/pyenv-update
# fi
# if shopt -q login_shell; then
# eval "$(pyenv init --path)"
# fi
# eval "$(pyenv init -)"
# eval "$(pyenv virtualenv-init -)"
# nodenv
# if [[ ! -d $NODENV_ROOT ]]; then
# git clone https://github.com/nodenv/nodenv.git $NODENV_ROOT
@ -645,12 +526,12 @@ fi
# git clone https://github.com/nodenv/nodenv-vars.git $NODENV_ROOT/plugins/nodenv-vars
# fi
# eval "$(nodenv init -)"
# z.lua
if [[ ! -f "$HOME/.local/share/bash/z.lua" ]]; then
curl -sfLo $HOME/.local/share/bash/z.lua https://raw.githubusercontent.com/skywind3000/z.lua/master/z.lua
mkdir -p $HOME/.local/share/zlua
# zoxide
if command -v zoxide >/dev/null; then
eval "$(zoxide init bash)"
fi
eval "$(lua $HOME/.local/share/bash/z.lua --init bash fzf)"
# autostart gpg-agent at login
if ! pgrep -u "$USER" gpg-agent >/dev/null; then
gpg-agent --daemon --enable-ssh-support >/dev/null
@ -669,6 +550,9 @@ bind 'set vi-ins-mode-string "\e[01;32mI "'
# ignore upper and lowercase when TAB completion
bind "set completion-ignore-case on"
# Better default modes
umask 0027
# Shell options
shopt -s autocd
shopt -s cdspell
@ -678,10 +562,42 @@ shopt -s checkwinsize
shopt -s expand_aliases
shopt -s histappend
# this is overkilled but it works conveniently
[[ -d $HOME/.local/share/bash/basher/cellar/packages/junegunn/fzf ]] || basher install junegunn/fzf
include junegunn/fzf shell/key-bindings.bash
include junegunn/fzf shell/completion.bash
export PS2="\[\e[1;31m\]> "
# ______________ _____
# ___ __ \__ /___ ________ ___(_)______________
# __ /_/ /_ /_ / / /_ __ `/_ /__ __ \_ ___/
# _ ____/_ / / /_/ /_ /_/ /_ / _ / / /(__ )
# /_/ /_/ \__,_/ _\__, / /_/ /_/ /_//____/
# /____/
# forgit
if [ ! -f "$BASH_COMPLETION_USER_DIR/plugins/forgit.plugin.bash" ]; then
curl -fLo $BASH_COMPLETION_USER_DIR/plugins/forgit.plugin.bash https://github.com/wfxr/forgit/raw/master/forgit.plugin.zsh
fi
source $BASH_COMPLETION_USER_DIR/plugins/forgit.plugin.sh
if [ -n "$XDG_SESSION_TYPE" ]; then
if [ "$XDG_SESSION_TYPE" = "wayland" ]; then
export FORGIT_COPY_CMD="wl-copy"
else
if command -v xclip >/dev/null; then
export FORGIT_COPY_CMD="xclip -selection clipboard"
else
export FORGIT_COPY_CMD="xsel -i -b"
fi
fi
fi
# If I don't want starship
# source $BASH_COMPLETION_USER_DIR/plugins/prompt.bash
# fzf
if [ ! -f "$BASH_COMPLETION_USER_DIR/plugins/fzf-completion.bash" ] || [ ! -f "$BASH_COMPLETION_USER_DIR/plugins/fzf-bindings.bash" ]; then
curl -fLo $BASH_COMPLETION_USER_DIR/plugins/fzf-completion.bash https://github.com/junegunn/fzf/raw/master/shell/completion.bash
curl -fLo $BASH_COMPLETION_USER_DIR/plugins/fzf-bindings.bash https://github.com/junegunn/fzf/raw/master/shell/key-bindings.bash
fi
source $BASH_COMPLETION_USER_DIR/plugins/fzf-completion.bash
source $BASH_COMPLETION_USER_DIR/plugins/fzf-bindings.bash
export FZF_COMPLETION_OPTS='-x'
# Use fd instead of find for fzf_completion
@ -700,68 +616,4 @@ _fzf_setup_completion dir tree
# ^X^R
bind "$(bind -s | grep '^"\\C-r"' | sed 's/"/"\\C-x/' | sed 's/"$/\\C-m"/')"
# ________ _____
# ___ __ \___________________ _____________ /_
# __ /_/ /_ ___/ __ \_ __ `__ \__ __ \ __/
# _ ____/_ / / /_/ / / / / / /_ /_/ / /_
# /_/ /_/ \____//_/ /_/ /_/_ .___/\__/
# /_/
#
# get current branch in git repo
parse_git_branch() {
BRANCH=$(git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/')
if [ ! "${BRANCH}" = "" ]
then
STAT=$(parse_git_dirty)
echo "${BRANCH}${STAT}"
else
echo ""
fi
}
# get current status of git repo
parse_git_dirty() {
status=$(git status 2>&1 | tee)
dirty=$(echo -n "${status}" 2> /dev/null | grep "modified:" &> /dev/null; echo "$?")
untracked=$(echo -n "${status}" 2> /dev/null | grep "Untracked files" &> /dev/null; echo "$?")
ahead=$(echo -n "${status}" 2> /dev/null | grep "Your branch is ahead of" &> /dev/null; echo "$?")
newfile=$(echo -n "${status}" 2> /dev/null | grep "new file:" &> /dev/null; echo "$?")
renamed=$(echo -n "${status}" 2> /dev/null | grep "renamed:" &> /dev/null; echo "$?")
deleted=$(echo -n "${status}" 2> /dev/null | grep "deleted:" &> /dev/null; echo "$?")
bits=''
if [ "${ahead}" = "0" ]; then
bits="*${bits}"
fi
if [ "${renamed}" = "0" ]; then
bits=">${bits}"
fi
if [ "${newfile}" = "0" ]; then
bits="+${bits}"
fi
if [ "${untracked}" = "0" ]; then
bits="?${bits}"
fi
if [ "${deleted}" = "0" ]; then
bits="x${bits}"
fi
if [ "${dirty}" = "0" ]; then
bits="!${bits}"
fi
if [ ! "${bits}" = "" ]; then
echo " ${bits}"
else
echo ""
fi
}
# Prompt
export PS1="\[$(tput bold)\]\[$(tput setaf 1)\]╭─[\[$(tput setaf 3)\]\u\[$(tput setaf 2)\]@\[$(tput setaf 4)\]\h \$(if [[ \$? == 0 ]]; then echo \"\[$(tput setaf 2)\]\342\234\223\"; else echo \"\[$(tput setaf 1)\]\342\234\227\"; fi)\[$(tput setaf 1)\]] \[$(tput setaf 5)\]\w \[$(tput setaf 2)\]\`parse_git_branch\`\n\[$(tput setaf 1)\]╰\[$(tput sgr0)\] "
export PS2="\[\e[1;31m\]> "
# _________ __________
# __ ____/__________________ /___(_)_____________ _
# _ / __ __ ___/ _ \ _ \ __/_ /__ __ \_ __ `/
# / /_/ / _ / / __/ __/ /_ _ / _ / / / /_/ /
# \____/ /_/ \___/\___/\__/ /_/ /_/ /_/_\__, /
# /____/
$HOME/.local/bin/bunny

View File

@ -0,0 +1,47 @@
{
"settingDefaults": {
"custom_themes": [
{
"name": "Nord",
"is_dark": true,
"colors": {
"accent-color": "#a3be8c",
"primary-color": "#88c0d0",
"warning-color": "#bf616a",
"sidebar-color": "#2e3440",
"roomlist-background-color": "#434c5e",
"roomlist-text-color": "#ebcb8b",
"roomlist-text-secondary-color": "#e5e9f0",
"roomlist-highlights-color": "#2e3440",
"roomlist-separator-color": "#3b4252",
"timeline-background-color": "#3b4252",
"timeline-text-color": "#eceff4",
"timeline-text-secondary-color": "#81a1c1",
"timeline-highlights-color": "#434c5e",
"reaction-row-button-selected-bg-color": "#bf616a"
}
},
{
"name": "OneDark",
"is_dark": true,
"colors": {
"accent-color": "#98c379",
"primary-color": "#56b6c2",
"warning-color": "#e06c75",
"sidebar-color": "#282c34",
"roomlist-background-color": "#4b5263",
"roomlist-text-color": "#e5c07b",
"roomlist-text-secondary-color": "#bbc2cf",
"roomlist-highlights-color": "#282c34",
"roomlist-separator-color": "#3e4452",
"timeline-background-color": "#3e4452",
"timeline-text-color": "#bbc2cf",
"timeline-text-secondary-color": "#61afef",
"timeline-highlights-color": "#4b5263",
"reaction-row-button-selected-bg-color": "#e06c75"
}
}
]
},
"showLabsSettings": true
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 MiB

View File

@ -0,0 +1,73 @@
<?xml version="1.0" encoding="UTF-8"?>
<style-scheme version="1.0" name="Nord">
<style name="Text" foreground="#d8dee9" background="#2e3440"/>
<style name="Link" underlineStyle="SingleUnderline"/>
<style name="Selection" background="#3b4252"/>
<style name="LineNumber" foreground="#4c566a" background="#2e3440" bold="true"/>
<style name="SearchResult" foreground="#eceff4" background="#ebcb8b"/>
<style name="SearchScope" background="#2e3440"/>
<style name="Parentheses" foreground="#bf616a" background="#2e3440" bold="true"/>
<style name="ParenthesesMismatch" foreground="#d8dee9" background="#bf616a" bold="true"/>
<style name="AutoComplete" background="#3b4252"/>
<style name="CurrentLine" background="#3b4252"/>
<style name="CurrentLineNumber" foreground="#d8dee9" bold="true"/>
<style name="Occurrences" background="#5e81ac"/>
<style name="Occurrences.Unused" foreground="#d08770" underlineStyle="DashUnderline"/>
<style name="Occurrences.Rename" background="#434c5e"/>
<style name="Number" foreground="#b48ead"/>
<style name="String" foreground="#a3be8c"/>
<style name="Type" foreground="#8fbcbb"/>
<style name="Local"/>
<style name="Global"/>
<style name="Field" foreground="#d8dee9"/>
<style name="Static" foreground="#88c0d0" italic="true"/>
<style name="VirtualMethod" foreground="#88c0d0" italic="true"/>
<style name="Function" foreground="#88c0d0"/>
<style name="Keyword" foreground="#81a1c1"/>
<style name="PrimitiveType" foreground="#81a1c1"/>
<style name="Operator" foreground="#81a1c1"/>
<style name="Overloaded Operator" foreground="#81a1c1"/>
<style name="Punctuation"/>
<style name="Preprocessor" foreground="#81a1c1"/>
<style name="Label" foreground="#bf616a" bold="true"/>
<style name="Comment" foreground="#4c566a" italic="true"/>
<style name="Doxygen.Comment" foreground="#4c566a" italic="true"/>
<style name="Doxygen.Tag" foreground="#8fbcbb" bold="true"/>
<style name="VisualWhitespace" foreground="#3b4252"/>
<style name="QmlLocalId" foreground="#88c0d0" italic="true"/>
<style name="QmlExternalId" foreground="#81a1c1" bold="true" italic="true"/>
<style name="QmlTypeId" foreground="#8fbcbb"/>
<style name="QmlRootObjectProperty" foreground="#81a1c1" italic="true"/>
<style name="QmlScopeObjectProperty" foreground="#81a1c1" italic="true"/>
<style name="QmlExternalObjectProperty" foreground="#88c0d0" italic="true"/>
<style name="JsScopeVar" foreground="#b48ead" italic="true"/>
<style name="JsImportVar" foreground="#88c0d0" italic="true"/>
<style name="JsGlobalVar" foreground="#81a1c1"/>
<style name="QmlStateName" foreground="#81a1c1" italic="true"/>
<style name="Binding" foreground="#d8dee9" underlineColor="#000000"/>
<style name="DisabledCode" foreground="#4c566a" background="#2e3440"/>
<style name="AddedLine" foreground="#a3be8c"/>
<style name="RemovedLine" foreground="#bf616a"/>
<style name="DiffFile" foreground="#81a1c1"/>
<style name="DiffLocation" foreground="#d08770"/>
<style name="DiffFileLine" foreground="#2e3440" background="#ebcb8b"/>
<style name="DiffContextLine" foreground="#2e3440" background="#88c0d0"/>
<style name="DiffSourceLine" foreground="#2e3440" background="#e06c75"/>
<style name="DiffSourceChar" foreground="#2e3440" background="#bf616a"/>
<style name="DiffDestLine" foreground="#2e3440" background="#8fbcbb"/>
<style name="DiffDestChar" foreground="#2e3440" background="#a3be8c"/>
<style name="LogChangeLine" foreground="#bf616a"/>
<style name="LogAuthorName" foreground="#81a1c1"/>
<style name="LogCommitDate" foreground="#a3be8c"/>
<style name="LogCommitHash" foreground="#bf616a"/>
<style name="LogCommitSubject"/>
<style name="LogDecoration" foreground="#b48ead"/>
<style name="Warning" underlineColor="#d08770" underlineStyle="SingleUnderline"/>
<style name="WarningContext" underlineColor="#d08770" underlineStyle="DotLine"/>
<style name="Error" underlineColor="#bf616a" underlineStyle="SingleUnderline"/>
<style name="ErrorContext" underlineColor="#bf616a" underlineStyle="DotLine"/>
<style name="Declaration"/>
<style name="FunctionDefinition"/>
<style name="OutputArgument" foreground="#2e3440" background="#d8dee9" italic="true"/>
<style name="LastStyleSentinel"/>
</style-scheme>

View File

@ -0,0 +1,73 @@
<?xml version="1.0" encoding="UTF-8"?>
<style-scheme version="1.0" name="OneDark">
<style name="Text" foreground="#abb2bf" background="#282c34"/>
<style name="Link" underlineStyle="SingleUnderline"/>
<style name="Selection" background="#3e4451"/>
<style name="LineNumber" foreground="#4b5363"/>
<style name="SearchResult" background="#324365"/>
<style name="SearchScope" background="#3e4451"/>
<style name="Parentheses" underlineColor="#61afef" underlineStyle="SingleUnderline"/>
<style name="ParenthesesMismatch" foreground="#000000" background="#c678dd"/>
<style name="AutoComplete" background="#3e4451"/>
<style name="CurrentLine" background="#3a3f4b"/>
<style name="CurrentLineNumber" foreground="#777c87"/>
<style name="Occurrences" background="#324365"/>
<style name="Occurrences.Unused" underlineColor="#d19a66" underlineStyle="DashUnderline"/>
<style name="Occurrences.Rename" background="#e06c75"/>
<style name="Number" foreground="#d19a66"/>
<style name="String" foreground="#98c379"/>
<style name="Type" foreground="#61afef"/>
<style name="Local"/>
<style name="Global"/>
<style name="Field" foreground="#e06c75"/>
<style name="Static" foreground="#61afef" italic="true"/>
<style name="VirtualMethod" foreground="#61afef" italic="true"/>
<style name="Function" foreground="#61afef"/>
<style name="Keyword" foreground="#c678dd"/>
<style name="PrimitiveType" foreground="#c678dd"/>
<style name="Operator" foreground="#c678dd"/>
<style name="Overloaded Operator" foreground="#c678dd"/>
<style name="Punctuation"/>
<style name="Preprocessor" foreground="#c678dd"/>
<style name="Label" foreground="#e06c75" bold="true"/>
<style name="Comment" foreground="#5c6370" italic="true"/>
<style name="Doxygen.Comment" foreground="#5c6370" italic="true"/>
<style name="Doxygen.Tag" foreground="#61afef"/>
<style name="VisualWhitespace" foreground="#3c4049"/>
<style name="QmlLocalId" foreground="#61afef"/>
<style name="QmlExternalId"/>
<style name="QmlTypeId" foreground="#61afef"/>
<style name="QmlRootObjectProperty" foreground="#61afef"/>
<style name="QmlScopeObjectProperty" foreground="#61afef"/>
<style name="QmlExternalObjectProperty"/>
<style name="JsScopeVar"/>
<style name="JsImportVar" foreground="#d19a66"/>
<style name="JsGlobalVar" foreground="#d19a66"/>
<style name="QmlStateName" foreground="#61afef"/>
<style name="Binding" foreground="#c678dd"/>
<style name="DisabledCode" foreground="#5c6370"/>
<style name="AddedLine" foreground="#98c379"/>
<style name="RemovedLine" foreground="#e06c75"/>
<style name="DiffFile" foreground="#61afef"/>
<style name="DiffLocation" foreground="#d19a66"/>
<style name="DiffFileLine" foreground="#000000" background="#e5c07b"/>
<style name="DiffContextLine" foreground="#000000" background="#56b6c2"/>
<style name="DiffSourceLine" foreground="#000000" background="#be5046"/>
<style name="DiffSourceChar" foreground="#000000" background="#e06c75"/>
<style name="DiffDestLine" foreground="#000000" background="#789353"/>
<style name="DiffDestChar" foreground="#000000" background="#98c379"/>
<style name="LogChangeLine" foreground="#e06c75"/>
<style name="LogAuthorName" foreground="#61afef"/>
<style name="LogCommitDate" foreground="#98c379"/>
<style name="LogCommitHash" foreground="#e06c75"/>
<style name="LogCommitSubject"/>
<style name="LogDecoration" foreground="#c678dd"/>
<style name="Warning" underlineColor="#d19a66" underlineStyle="SingleUnderline"/>
<style name="WarningContext" underlineColor="#d19a66" underlineStyle="DotLine"/>
<style name="Error" underlineColor="#e06c75" underlineStyle="SingleUnderline"/>
<style name="ErrorContext" underlineColor="#e06c75" underlineStyle="DotLine"/>
<style name="Declaration"/>
<style name="FunctionDefinition"/>
<style name="OutputArgument" italic="true"/>
<style name="LastStyleSentinel"/>
</style-scheme>

View File

@ -0,0 +1,300 @@
[General]
ThemeName=Nord
PreferredStyles=Fusion
DefaultTextEditorColorScheme=nord.xml
[Palette]
shadowBackground=ff21252b
text=ffd8dee9
textDisabled=99d8dee9
textHighlighted=ffabb2bf
toolBarItem=ffd8dee9
toolBarItemDisabled=99d8dee9
fancyBarsNormalTextColor=ffd8dee9
fancyBarsBoldTextColor=ffd8dee9
hoverBackground=ff31363f
selectedBackground=ff3a3f4b
selectedBackgroundText=ffabb2bf
normalBackground=ff2e3440
alternateBackground=ff31363f
error=ffbf616a
warning=ffebcb8b
success=ffa3be8c
message=ff81a1c1
splitter=ff181a1f
textColorLink=81a1c1
textColorLinkVisited=b48ead
backgroundColorDisabled=ff21252b
[Colors]
;DS controls theme START
DScontrolBackground=normalBackground
DScontrolOutline=splitter
DStextColor=text
DSdisabledTextColor=textDisabled
DSpanelBackground=ff454444
DShoverHighlight=hoverBackground
DScolumnBackground=ff363636
DSfocusEdit=normalBackground
DSfocusDrag=ff565656
DScontrolBackgroundPressed=selectedBackground
DScontrolBackgroundChecked=selectedBackground
DSinteraction=selectedBackground
DSsliderActiveTrack=ff7a7a7a
DSsliderInactiveTrack=ff4d4d4d
DSsliderHandle=ff4c566a
DSsliderActiveTrackHover=ff7f7f7f
DSsliderInactiveTrackHover=ff505050
DSsliderHandleHover=ff7a7a7a
DSsliderActiveTrackFocus=ffaaaaaa
DSsliderInactiveTrackFocus=ff7a7a7a
DSsliderHandleFocus=ff1d545c
DSerrorColor=error
DScontrolBackgroundDisabled=backgroundColorDisabled
DScontrolOutlineDisabled=ff4d4d4d
DStextColorDisabled=textDisabled
DStextSelectionColor=selectedBackground
DStextSelectedTextColor=selectedBackgroundText
DSscrollBarTrack=ff4d4d4d
DSscrollBarHandle=ff4c566a
DScontrolBackgroundInteraction=ff4d4d4d
DStranslationIndicatorBorder=splitter
DSsectionHeadBackground=alternateBackground
DSchangedStateText=message
DS3DAxisXColor=error
DS3DAxisYColor=success
DS3DAxisZColor=message
;DS controls theme END
BackgroundColorAlternate=alternateBackground
BackgroundColorDark=shadowBackground
BackgroundColorHover=hoverBackground
BackgroundColorNormal=normalBackground
BackgroundColorDisabled=backgroundColorDisabled
BackgroundColorSelected=selectedBackground
BadgeLabelBackgroundColorChecked=text
BadgeLabelBackgroundColorUnchecked=text
BadgeLabelTextColorChecked=normalBackground
BadgeLabelTextColorUnchecked=normalBackground
CanceledSearchTextColor=error
ComboBoxArrowColor=toolBarItem
ComboBoxArrowColorDisabled=toolBarItemDisabled
ComboBoxTextColor=fancyBarsNormalTextColor
DetailsButtonBackgroundColorHover=hoverBackground
DetailsWidgetBackgroundColor=shadowBackground
DockWidgetResizeHandleColor=splitter
DoubleTabWidget1stSeparatorColor=splitter
DoubleTabWidget1stTabActiveTextColor=text
DoubleTabWidget1stTabBackgroundColor=normalBackground
DoubleTabWidget1stTabInactiveTextColor=text
DoubleTabWidget2ndSeparatorColor=toolBarItemDisabled
DoubleTabWidget2ndTabActiveTextColor=text
DoubleTabWidget2ndTabBackgroundColor=selectedBackground
DoubleTabWidget2ndTabInactiveTextColor=text
EditorPlaceholderColor=shadowBackground
FancyToolBarSeparatorColor=toolBarItemDisabled
FancyTabBarBackgroundColor=shadowBackground
FancyTabBarSelectedBackgroundColor=selectedBackground
FancyTabWidgetDisabledSelectedTextColor=toolBarItemDisabled
FancyTabWidgetDisabledUnselectedTextColor=toolBarItemDisabled
FancyTabWidgetEnabledSelectedTextColor=fancyBarsBoldTextColor
FancyTabWidgetEnabledUnselectedTextColor=fancyBarsBoldTextColor
FancyToolButtonHoverColor=hoverBackground
FancyToolButtonSelectedColor=selectedBackground
FutureProgressBackgroundColor=shadowBackground
IconsBaseColor=toolBarItem
IconsDisabledColor=toolBarItemDisabled
IconsInfoColor=message
IconsInfoToolBarColor=message
IconsWarningColor=warning
IconsWarningToolBarColor=warning
IconsErrorColor=error
IconsErrorToolBarColor=error
IconsRunColor=success
IconsRunToolBarColor=success
IconsStopColor=error
IconsStopToolBarColor=error
IconsInterruptColor=message
IconsInterruptToolBarColor=message
IconsDebugColor=toolBarItem
IconsNavigationArrowsColor=warning
IconsBuildHammerHandleColor=b06112
IconsBuildHammerHeadColor=toolBarItem
IconsModeWelcomeActiveColor=success
IconsModeEditActiveColor=message
IconsModeDesignActiveColor=warning
IconsModeDebugActiveColor=message
IconsModeProjectActiveColor=success
IconsModeAnalyzeActiveColor=message
IconsModeHelpActiveColor=warning
IconsCodeModelKeywordColor=ff777777
IconsCodeModelClassColor=ffc0b550
IconsCodeModelStructColor=ff53b053
IconsCodeModelFunctionColor=ffd34373
IconsCodeModelVariableColor=ff2bbbcc
IconsCodeModelEnumColor=ffc0b550
IconsCodeModelMacroColor=ff5e81ac
IconsCodeModelAttributeColor=ff316511
IconsCodeModelUniformColor=ff994899
IconsCodeModelVaryingColor=ffa08833
IconsCodeModelOverlayBackgroundColor=normalBackground
IconsCodeModelOverlayForegroundColor=text
InfoBarBackground=shadowBackground
InfoBarText=text
MenuBarEmptyAreaBackgroundColor=shadowBackground
MenuBarItemBackgroundColor=shadowBackground
MenuBarItemTextColorDisabled=textDisabled
MenuBarItemTextColorNormal=text
MenuItemTextColorDisabled=textDisabled
MenuItemTextColorNormal=text
MiniProjectTargetSelectorBackgroundColor=shadowBackground
MiniProjectTargetSelectorBorderColor=shadowBackground
MiniProjectTargetSelectorSummaryBackgroundColor=normalBackground
MiniProjectTargetSelectorTextColor=fancyBarsNormalTextColor
PanelStatusBarBackgroundColor=shadowBackground
PanelsWidgetSeparatorLineColor=splitter
PanelTextColorDark=text
PanelTextColorMid=text
PanelTextColorLight=textHighlighted
ProgressBarColorError=error
ProgressBarColorFinished=success
ProgressBarColorNormal=message
ProgressBarTitleColor=text
ProgressBarBackgroundColor=alternateBackground
SplitterColor=splitter
TextColorDisabled=textDisabled
TextColorError=error
TextColorHighlight=textHighlighted
TextColorHighlightBackground=hoverBackground
TextColorLink=textColorLink
TextColorLinkVisited=textColorLinkVisited
TextColorNormal=text
ToggleButtonBackgroundColor=shadowBackground
ToolBarBackgroundColor=shadowBackground
TreeViewArrowColorNormal=hoverBackground
TreeViewArrowColorSelected=text
OutputPanes_DebugTextColor=text
OutputPanes_ErrorMessageTextColor=error
OutputPanes_MessageOutput=message
OutputPanes_NormalMessageTextColor=text
OutputPanes_StdErrTextColor=error
OutputPanes_StdOutTextColor=text
OutputPanes_WarningMessageTextColor=warning
OutputPanes_TestPassTextColor=success
OutputPanes_TestFailTextColor=error
OutputPanes_TestXFailTextColor=error
OutputPanes_TestXPassTextColor=message
OutputPanes_TestSkipTextColor=message
OutputPanes_TestWarnTextColor=warning
OutputPanes_TestFatalTextColor=error
OutputPanes_TestDebugTextColor=text
OutputPaneButtonFlashColor=error
OutputPaneToggleButtonTextColorChecked=fancyBarsNormalTextColor
OutputPaneToggleButtonTextColorUnchecked=fancyBarsNormalTextColor
Debugger_LogWindow_LogInput=ff56b6c2
Debugger_LogWindow_LogStatus=message
Debugger_LogWindow_LogTime=error
Debugger_WatchItem_ValueNormal=text
Debugger_WatchItem_ValueInvalid=textDisabled
Debugger_WatchItem_ValueChanged=error
Debugger_Breakpoint_TextMarkColor=message
Welcome_TextColor=text
Welcome_ForegroundPrimaryColor=text
Welcome_ForegroundSecondaryColor=text
Welcome_BackgroundColor=normalBackground
Welcome_ButtonBackgroundColor=normalBackground
Welcome_DividerColor=splitter
Welcome_HoverColor=hoverBackground
Welcome_LinkColor=textColorLink
Welcome_DisabledLinkColor=textDisabled
Timeline_TextColor=text
Timeline_BackgroundColor1=normalBackground
Timeline_BackgroundColor2=shadowBackground
Timeline_DividerColor=splitter
Timeline_HighlightColor=selectedBackground
Timeline_PanelBackgroundColor=alternateBackground
Timeline_PanelHeaderColor=normalBackground
Timeline_HandleColor=ff4b5362
Timeline_RangeColor=selectedBackground
VcsBase_FileStatusUnknown_TextColor=text
VcsBase_FileAdded_TextColor=success
VcsBase_FileModified_TextColor=warning
VcsBase_FileDeleted_TextColor=error
VcsBase_FileRenamed_TextColor=message
VcsBase_FileUnmerged_TextColor=error
Bookmarks_TextMarkColor=message
TextEditor_SearchResult_ScrollBarColor=success
TextEditor_CurrentLine_ScrollBarColor=message
ProjectExplorer_TaskError_TextMarkColor=error
ProjectExplorer_TaskWarn_TextMarkColor=warning
CodeModel_Error_TextMarkColor=error
CodeModel_Warning_TextMarkColor=warning
QmlDesigner_BackgroundColor=normalBackground
QmlDesigner_HighlightColor=selectedBackground
QmlDesigner_FormEditorSelectionColor=message
QmlDesigner_FormEditorForegroundColor=normalBackground
QmlDesigner_BackgroundColorDarkAlternate=shadowBackground
QmlDesigner_BackgroundColorDarker=splitter
QmlDesigner_BorderColor=splitter
QmlDesigner_ButtonColor=normalBackground
QmlDesigner_TabDark=shadowBackground
QmlDesigner_TabLight=text
QmlDesigner_FormeditorBackgroundColor=normalBackground
QmlDesigner_AlternateBackgroundColor=alternateBackground
QmlDesigner_ScrollBarHandleColor=ff4c566a
PaletteWindow=shadowBackground
PaletteWindowText=text
PaletteBase=normalBackground
PaletteAlternateBase=alternateBackground
PaletteButton=shadowBackground
PaletteBrightText=error
PaletteText=text
PaletteButtonText=text
PaletteButtonTextDisabled=textDisabled
PaletteToolTipBase=hoverBackground
PaletteHighlight=selectedBackground
PaletteDark=shadowBackground
PaletteHighlightedText=selectedBackgroundText
PaletteToolTipText=text
PaletteLink=textColorLink
PaletteLinkVisited=textColorLinkVisited
PaletteWindowDisabled=backgroundColorDisabled
PaletteWindowTextDisabled=textDisabled
PaletteBaseDisabled=backgroundColorDisabled
PaletteTextDisabled=textDisabled
[Flags]
ComboBoxDrawTextShadow=false
DerivePaletteFromTheme=true
DrawIndicatorBranch=true
DrawSearchResultWidgetFrame=false
DrawTargetSelectorBottom=false
DrawToolBarHighlights=false
DrawToolBarBorders=false
ApplyThemePaletteGlobally=true
FlatToolBars=true
FlatSideBarIcons=true
FlatProjectsMode=true
FlatMenuBar=true
ToolBarIconShadow=true
WindowColorAsBase=true
DarkUserInterface=true
[Gradients]
DetailsWidgetHeaderGradient\1\color=normalBackground
DetailsWidgetHeaderGradient\1\pos=1
DetailsWidgetHeaderGradient\size=1

View File

@ -0,0 +1,300 @@
[General]
ThemeName=OneDark
PreferredStyles=Fusion
DefaultTextEditorColorScheme=onedark.xml
[Palette]
shadowBackground=ff21252b
text=ffabb2bf
textDisabled=99abb2bf
textHighlighted=ffd7dae0
toolBarItem=ffabb2bf
toolBarItemDisabled=99abb2bf
fancyBarsNormalTextColor=ffabb2bf
fancyBarsBoldTextColor=ffabb2bf
hoverBackground=ff31363f
selectedBackground=ff3a3f4b
selectedBackgroundText=ffd7dae0
normalBackground=ff282c34
alternateBackground=ff31363f
error=ffe06c75
warning=ffe5c07b
success=ff98c379
message=ff61afef
splitter=ff181a1f
textColorLink=61afef
textColorLinkVisited=c678dd
backgroundColorDisabled=ff21252b
[Colors]
;DS controls theme START
DScontrolBackground=normalBackground
DScontrolOutline=splitter
DStextColor=text
DSdisabledTextColor=textDisabled
DSpanelBackground=ff454444
DShoverHighlight=hoverBackground
DScolumnBackground=ff363636
DSfocusEdit=normalBackground
DSfocusDrag=ff565656
DScontrolBackgroundPressed=selectedBackground
DScontrolBackgroundChecked=selectedBackground
DSinteraction=selectedBackground
DSsliderActiveTrack=ff7a7a7a
DSsliderInactiveTrack=ff4d4d4d
DSsliderHandle=ff4b5362
DSsliderActiveTrackHover=ff7f7f7f
DSsliderInactiveTrackHover=ff505050
DSsliderHandleHover=ff7a7a7a
DSsliderActiveTrackFocus=ffaaaaaa
DSsliderInactiveTrackFocus=ff7a7a7a
DSsliderHandleFocus=ff1d545c
DSerrorColor=error
DScontrolBackgroundDisabled=backgroundColorDisabled
DScontrolOutlineDisabled=ff4d4d4d
DStextColorDisabled=textDisabled
DStextSelectionColor=selectedBackground
DStextSelectedTextColor=selectedBackgroundText
DSscrollBarTrack=ff4d4d4d
DSscrollBarHandle=ff4b5362
DScontrolBackgroundInteraction=ff4d4d4d
DStranslationIndicatorBorder=splitter
DSsectionHeadBackground=alternateBackground
DSchangedStateText=message
DS3DAxisXColor=error
DS3DAxisYColor=success
DS3DAxisZColor=message
;DS controls theme END
BackgroundColorAlternate=alternateBackground
BackgroundColorDark=shadowBackground
BackgroundColorHover=hoverBackground
BackgroundColorNormal=normalBackground
BackgroundColorDisabled=backgroundColorDisabled
BackgroundColorSelected=selectedBackground
BadgeLabelBackgroundColorChecked=text
BadgeLabelBackgroundColorUnchecked=text
BadgeLabelTextColorChecked=normalBackground
BadgeLabelTextColorUnchecked=normalBackground
CanceledSearchTextColor=error
ComboBoxArrowColor=toolBarItem
ComboBoxArrowColorDisabled=toolBarItemDisabled
ComboBoxTextColor=fancyBarsNormalTextColor
DetailsButtonBackgroundColorHover=hoverBackground
DetailsWidgetBackgroundColor=shadowBackground
DockWidgetResizeHandleColor=splitter
DoubleTabWidget1stSeparatorColor=splitter
DoubleTabWidget1stTabActiveTextColor=text
DoubleTabWidget1stTabBackgroundColor=normalBackground
DoubleTabWidget1stTabInactiveTextColor=text
DoubleTabWidget2ndSeparatorColor=toolBarItemDisabled
DoubleTabWidget2ndTabActiveTextColor=text
DoubleTabWidget2ndTabBackgroundColor=selectedBackground
DoubleTabWidget2ndTabInactiveTextColor=text
EditorPlaceholderColor=shadowBackground
FancyToolBarSeparatorColor=toolBarItemDisabled
FancyTabBarBackgroundColor=shadowBackground
FancyTabBarSelectedBackgroundColor=selectedBackground
FancyTabWidgetDisabledSelectedTextColor=toolBarItemDisabled
FancyTabWidgetDisabledUnselectedTextColor=toolBarItemDisabled
FancyTabWidgetEnabledSelectedTextColor=fancyBarsBoldTextColor
FancyTabWidgetEnabledUnselectedTextColor=fancyBarsBoldTextColor
FancyToolButtonHoverColor=hoverBackground
FancyToolButtonSelectedColor=selectedBackground
FutureProgressBackgroundColor=shadowBackground
IconsBaseColor=toolBarItem
IconsDisabledColor=toolBarItemDisabled
IconsInfoColor=message
IconsInfoToolBarColor=message
IconsWarningColor=warning
IconsWarningToolBarColor=warning
IconsErrorColor=error
IconsErrorToolBarColor=error
IconsRunColor=success
IconsRunToolBarColor=success
IconsStopColor=error
IconsStopToolBarColor=error
IconsInterruptColor=message
IconsInterruptToolBarColor=message
IconsDebugColor=toolBarItem
IconsNavigationArrowsColor=warning
IconsBuildHammerHandleColor=b06112
IconsBuildHammerHeadColor=toolBarItem
IconsModeWelcomeActiveColor=success
IconsModeEditActiveColor=message
IconsModeDesignActiveColor=warning
IconsModeDebugActiveColor=message
IconsModeProjectActiveColor=success
IconsModeAnalyzeActiveColor=message
IconsModeHelpActiveColor=warning
IconsCodeModelKeywordColor=ff777777
IconsCodeModelClassColor=ffc0b550
IconsCodeModelStructColor=ff53b053
IconsCodeModelFunctionColor=ffd34373
IconsCodeModelVariableColor=ff2bbbcc
IconsCodeModelEnumColor=ffc0b550
IconsCodeModelMacroColor=ff476ba0
IconsCodeModelAttributeColor=ff316511
IconsCodeModelUniformColor=ff994899
IconsCodeModelVaryingColor=ffa08833
IconsCodeModelOverlayBackgroundColor=normalBackground
IconsCodeModelOverlayForegroundColor=text
InfoBarBackground=shadowBackground
InfoBarText=text
MenuBarEmptyAreaBackgroundColor=shadowBackground
MenuBarItemBackgroundColor=shadowBackground
MenuBarItemTextColorDisabled=textDisabled
MenuBarItemTextColorNormal=text
MenuItemTextColorDisabled=textDisabled
MenuItemTextColorNormal=text
MiniProjectTargetSelectorBackgroundColor=shadowBackground
MiniProjectTargetSelectorBorderColor=shadowBackground
MiniProjectTargetSelectorSummaryBackgroundColor=normalBackground
MiniProjectTargetSelectorTextColor=fancyBarsNormalTextColor
PanelStatusBarBackgroundColor=shadowBackground
PanelsWidgetSeparatorLineColor=splitter
PanelTextColorDark=text
PanelTextColorMid=text
PanelTextColorLight=textHighlighted
ProgressBarColorError=error
ProgressBarColorFinished=success
ProgressBarColorNormal=message
ProgressBarTitleColor=text
ProgressBarBackgroundColor=alternateBackground
SplitterColor=splitter
TextColorDisabled=textDisabled
TextColorError=error
TextColorHighlight=textHighlighted
TextColorHighlightBackground=hoverBackground
TextColorLink=textColorLink
TextColorLinkVisited=textColorLinkVisited
TextColorNormal=text
ToggleButtonBackgroundColor=shadowBackground
ToolBarBackgroundColor=shadowBackground
TreeViewArrowColorNormal=hoverBackground
TreeViewArrowColorSelected=text
OutputPanes_DebugTextColor=text
OutputPanes_ErrorMessageTextColor=error
OutputPanes_MessageOutput=message
OutputPanes_NormalMessageTextColor=text
OutputPanes_StdErrTextColor=error
OutputPanes_StdOutTextColor=text
OutputPanes_WarningMessageTextColor=warning
OutputPanes_TestPassTextColor=success
OutputPanes_TestFailTextColor=error
OutputPanes_TestXFailTextColor=error
OutputPanes_TestXPassTextColor=message
OutputPanes_TestSkipTextColor=message
OutputPanes_TestWarnTextColor=warning
OutputPanes_TestFatalTextColor=error
OutputPanes_TestDebugTextColor=text
OutputPaneButtonFlashColor=error
OutputPaneToggleButtonTextColorChecked=fancyBarsNormalTextColor
OutputPaneToggleButtonTextColorUnchecked=fancyBarsNormalTextColor
Debugger_LogWindow_LogInput=ff56b6c2
Debugger_LogWindow_LogStatus=message
Debugger_LogWindow_LogTime=error
Debugger_WatchItem_ValueNormal=text
Debugger_WatchItem_ValueInvalid=textDisabled
Debugger_WatchItem_ValueChanged=error
Debugger_Breakpoint_TextMarkColor=message
Welcome_TextColor=text
Welcome_ForegroundPrimaryColor=text
Welcome_ForegroundSecondaryColor=text
Welcome_BackgroundColor=normalBackground
Welcome_ButtonBackgroundColor=normalBackground
Welcome_DividerColor=splitter
Welcome_HoverColor=hoverBackground
Welcome_LinkColor=textColorLink
Welcome_DisabledLinkColor=textDisabled
Timeline_TextColor=text
Timeline_BackgroundColor1=normalBackground
Timeline_BackgroundColor2=shadowBackground
Timeline_DividerColor=splitter
Timeline_HighlightColor=selectedBackground
Timeline_PanelBackgroundColor=alternateBackground
Timeline_PanelHeaderColor=normalBackground
Timeline_HandleColor=ff4b5362
Timeline_RangeColor=selectedBackground
VcsBase_FileStatusUnknown_TextColor=text
VcsBase_FileAdded_TextColor=success
VcsBase_FileModified_TextColor=warning
VcsBase_FileDeleted_TextColor=error
VcsBase_FileRenamed_TextColor=message
VcsBase_FileUnmerged_TextColor=error
Bookmarks_TextMarkColor=message
TextEditor_SearchResult_ScrollBarColor=success
TextEditor_CurrentLine_ScrollBarColor=message
ProjectExplorer_TaskError_TextMarkColor=error
ProjectExplorer_TaskWarn_TextMarkColor=warning
CodeModel_Error_TextMarkColor=error
CodeModel_Warning_TextMarkColor=warning
QmlDesigner_BackgroundColor=normalBackground
QmlDesigner_HighlightColor=selectedBackground
QmlDesigner_FormEditorSelectionColor=message
QmlDesigner_FormEditorForegroundColor=normalBackground
QmlDesigner_BackgroundColorDarkAlternate=shadowBackground
QmlDesigner_BackgroundColorDarker=splitter
QmlDesigner_BorderColor=splitter
QmlDesigner_ButtonColor=normalBackground
QmlDesigner_TabDark=shadowBackground
QmlDesigner_TabLight=text
QmlDesigner_FormeditorBackgroundColor=normalBackground
QmlDesigner_AlternateBackgroundColor=alternateBackground
QmlDesigner_ScrollBarHandleColor=ff4b5362
PaletteWindow=shadowBackground
PaletteWindowText=text
PaletteBase=normalBackground
PaletteAlternateBase=alternateBackground
PaletteButton=shadowBackground
PaletteBrightText=error
PaletteText=text
PaletteButtonText=text
PaletteButtonTextDisabled=textDisabled
PaletteToolTipBase=hoverBackground
PaletteHighlight=selectedBackground
PaletteDark=shadowBackground
PaletteHighlightedText=selectedBackgroundText
PaletteToolTipText=text
PaletteLink=textColorLink
PaletteLinkVisited=textColorLinkVisited
PaletteWindowDisabled=backgroundColorDisabled
PaletteWindowTextDisabled=textDisabled
PaletteBaseDisabled=backgroundColorDisabled
PaletteTextDisabled=textDisabled
[Flags]
ComboBoxDrawTextShadow=false
DerivePaletteFromTheme=true
DrawIndicatorBranch=true
DrawSearchResultWidgetFrame=false
DrawTargetSelectorBottom=false
DrawToolBarHighlights=false
DrawToolBarBorders=false
ApplyThemePaletteGlobally=true
FlatToolBars=true
FlatSideBarIcons=true
FlatProjectsMode=true
FlatMenuBar=true
ToolBarIconShadow=true
WindowColorAsBase=true
DarkUserInterface=true
[Gradients]
DetailsWidgetHeaderGradient\1\color=normalBackground
DetailsWidgetHeaderGradient\1\pos=1
DetailsWidgetHeaderGradient\size=1

View File

@ -90,7 +90,7 @@ URxvt.preeditType: OverTheSpot
URxvt.perl-ext-common:default,matcher,tabbed,clipboard,resize-font
! urls
URxvt.url-launcher: /usr/bin/qutebrowser
URxvt.url-launcher: /usr/bin/firefox
URxvt.matcher.button: 1
URxvt.matcher.rend.0: Uline Bold fg3
URxvt.underlineURLs: true

View File

@ -21,13 +21,12 @@ picom -b &
export XDG_SESSION_TYPE=x11
export PATH=$HOME/.local/bin/X11:$PATH
# $HOME/.config/emacs/bin/doom env
# $HOME/.config/emacs-config/doom/bin/doom env
session=${1:-spectrwm}
case $session in
bspwm ) exec bspwm ;;
spectrwm ) exec spectrwm -c ~/.config/spectrwm/spectrwm-nord.conf ;;
exwm ) exec dbus-run-session -- emacs -mm --debug-init -l ~/.config/doom/exwm.el ;;
* ) exec "$1" ;;
esac

View File

@ -11,7 +11,7 @@
[a-general]
# Press Ctrl-H to access it
home = "gemini://gemini.circumlunar.space"
home = "gemini://folliehiyuki.com"
# Follow up to 5 Gemini redirects without prompting.
# A prompt is always shown after the 5th redirect and for redirects to protocols other than Gemini.
@ -32,10 +32,11 @@ auto_redirect = false
# Note the use of single quotes, so that backslashes will not be escaped.
# Using just a string will also work, but it is deprecated, and will degrade if
# you use paths with spaces.
http = 'qutebrowser'
http = 'firefox'
# Any URL that will accept a query string can be put here
search = "gemini://gus.guru/search"
# search = "gemini://gus.guru/search"
search = "gemini://geminispace.info/search"
# Whether colors will be used in the terminal
color = true
@ -313,7 +314,7 @@ bottombar_bg = "#3b4252"
hdg_1 = "#5e81ac"
hdg_2 = "#81a1c1"
hdg_3 = "#8fbcbb"
hdg_3 = "#ebcb8b"
amfora_link = "#88c0d0"
foreign_link = "#b48ead"
link_number = "#a3be8c"
@ -366,7 +367,7 @@ bkmk_modal_field_text = "#eceff4"
# bottombar_label = "#282c34"
# hdg_1 = "#e06c75"
# hdg_2 = "#c678dd"
# hdg_2 = "#d19a66"
# hdg_3 = "#c678dd"
# amfora_link = "#61afef"
# foreign_link = "#56b6c2"

View File

@ -1,22 +1,33 @@
{
"dl": {
"aria2c_for_torrents": false,
"aria2c_for_torrents": true,
"chunk_size": "10",
"download_dir": "~/gallery-dl/Anime",
"external_downloader": "{aria2c}",
"download_dir": "gallery-dl/Anime",
"external_downloader": "",
"fallback_qualities": [
"720p",
"480p",
"360p"
],
"file_format": "{anime_title}/{anime_title}_{ep_no}",
"force_download": false,
"force_download": true,
"player": "mpv",
"provider": "anime8",
"provider": "4anime",
"quality": "1080p",
"skip_download": false,
"url": false
},
"ezdl": {
"download_metadata": false,
"fallback_providers": [
"vidstream",
"anime8"
],
"file_format": "{anime_title}/{anime_title}_{ep_no}",
"provider": "animebinge",
"quality": "1080p",
"ratio": 50
},
"siteconfig": {
"animedaisuki": {
"servers": [
@ -120,7 +131,7 @@
"360p"
],
"log_level": "INFO",
"provider": "anime8",
"provider": "animefreak",
"quality": "1080p"
}
}

5
home/.config/bat/config Normal file
View File

@ -0,0 +1,5 @@
--theme="base16"
--color=always
--italic-text=always
--pager="less -R"
--style="plain"

View File

@ -1,75 +1,41 @@
# Do something
# Config file for bottom
[flags]
hide_avg_cpu = true
dot_marker = true
rate = 1000
left_legend = true
current_usage = true
group_processes = true
case_sensitive = false
whole_word = false
regex = false
show_disabled_data = false
temperature_type = "c"
default_time_value = 60000
time_delta = 15000
default_widget_type = "proc"
default_widget_count = 1
basic = false
use_old_network_legend = false
hide_table_count = false
# Hide avg_cpu (doesn't work though)
hide_avg_cpu = true
dot_marker = true
rate = 1000
left_legend = true
current_usage = true
group_processes = true
case_sensitive = false
whole_word = false
regex = false
show_disabled_data = false
temperature_type = "c"
default_time_value = 60000
time_delta = 15000
default_widget_type = "proc"
default_widget_count = 1
basic = false
use_old_network_legend = false
hide_table_count = false
# Colors
[colors]
table_header_color="LightBlue"
widget_title_color="White"
avg_cpu_color="Red"
cpu_core_colors=["LightMagenta", "LightYellow", "White", "LightGreen", "LightBlue", "LightRed", "Cyan", "Yellow"]
ram_color="Green"
swap_color="Yellow"
rx_color="Green"
tx_color="Yellow"
border_color="Blue"
highlighted_border_color="Green"
text_color="Gray"
selected_text_color="Black"
selected_bg_color="LightBlue"
graph_color="Blue"
battery_colors = ["red", "yellow", "yellow", "green", "green", "green"]
table_header_color="LightBlue"
widget_title_color="White"
avg_cpu_color="Red"
cpu_core_colors=["LightMagenta", "LightYellow", "White", "LightGreen", "LightBlue", "LightRed", "Cyan", "Yellow"]
ram_color="Green"
swap_color="Yellow"
rx_color="Green"
tx_color="Yellow"
border_color="Blue"
highlighted_border_color="Green"
text_color="Gray"
selected_text_color="Black"
selected_bg_color="LightBlue"
graph_color="Blue"
battery_colors = ["red", "yellow", "yellow", "green", "green", "green"]
# The default widget layout:
#[[row]]

View File

@ -9,7 +9,7 @@ $HOME/.config/polybar/run_polybar.sh &
ibus-daemon -drx &
greenclip daemon &
# emacs --daemon &
# xrandr --output eDP-1 --primary --auto --output DP-2 --left-of eDP-1 --auto --output HDMI-2 --right-of eDP-1 --auto &
# $HOME/.local/bin/X11/monitors.sh
# animatedwall --full ~/Pictures/Animated/fubuki.mp4 &
feh --no-fehbg --bg-fill --randomize ~/Pictures/Wallpapers/* &
mpDris2 &
@ -54,14 +54,9 @@ bspc config presel_feedback_color "#d8dee9"
# bspc config presel_feedback_color "#abb2bf"
# Program rules
bspc rule -a "Gimp-2.10" state=floating follow=on
bspc rule -a "Gimp" state=floating follow=on
bspc rule -a "Thunderbird" desktop='^3' follow=on
bspc rule -a "Inkscape" state=floating follow=on
bspc rule -a "krita" state=floating follow=on
bspc rule -a "mpv" desktop='^6' state=tiled follow=on
bspc rule -a "Zathura" desktop='^4' follow=on
bspc rule -a "Element" desktop='^7' follow=on
bspc rule -a "TelegramDesktop" desktop='^7' follow=on
bspc rule -a "Emacs" state=tiled
bspc rule -a "Komikku" state=floating follow=on

View File

@ -0,0 +1,2 @@
(("default" . ((user-emacs-directory . "~/.config/emacs-config/doom")))
("myconfig" . ((user-emacs-directory . "~/.config/emacs-config/myconfig"))))

View File

@ -0,0 +1,3 @@
CHTSH_QUERY_OPTIONS="style=rrt"
CHTSH_URL=https://cht.sh
# CHTSH_CURL_OPTIONS="-A curl"

1
home/.config/cht.sh/mode Normal file
View File

@ -0,0 +1 @@
auto

View File

@ -0,0 +1 @@
$HOME/.local/share/cheat.sh

View File

@ -4,28 +4,87 @@
(setq user-full-name "FollieHiyuki"
user-mail-address "folliekazetani@protonmail.com")
;; Set qutebrowser as the default browser
;; Set firefox as the default browser
(setq browse-url-browser-function 'browse-url-generic
browse-url-generic-program "qutebrowser")
browse-url-generic-program "firefox")
;; Secrets
(setq auth-sources '("~/.config/doom/.authinfo.gpg"))
;; Better default settings
(setq-default
;; Tab vs space
indent-tabs-mode nil
tab-width 4
evil-shift-width 4
standard-indent 4
line-spacing 2
;; From @tecosaur
delete-by-moving-to-trash t
window-combination-resize t
x-stretch-cursor t)
(setq undo-limit 80000000
evil-want-fine-undo t
auto-save-default t
truncate-string-ellipsis "")
(global-subword-mode 1) ;; Use CamelCase words
;; Font settings
(setq doom-font (font-spec :family "Iosevka Nerd Font" :size 16)
doom-variable-pitch-font (font-spec :family "sans" :size 16)
doom-big-font (font-spec :family "Iosevka Nerd Font" :size 24))
(setq doom-font (font-spec :family "Iosevka" :size 16 :weight 'semi-light)
doom-serif-font (font-spec :family "Iosevka Slab" :size 16 :weight 'semi-light)
doom-variable-pitch-font (font-spec :family "IBM Plex Sans" :size 16)
doom-big-font (font-spec :family "Iosevka" :size 24 :weight 'semi-light))
(after! unicode-fonts
(setq doom-unicode-font doom-font)
(dolist (unicode-block '("CJK Compatibility"
"CJK Compatibility Forms"
"CJK Compatibility Ideographs"
"CJK Compatibility Ideographs Supplement"
"CJK Radicals Supplement"
"CJK Strokes"
"CJK Symbols and Punctuation"
"CJK Unified Ideographs"
"CJK Unified Ideographs Extension A"
"CJK Unified Ideographs Extension B"
"CJK Unified Ideographs Extension C"
"CJK Unified Ideographs Extension D"
"CJK Unified Ideographs Extension E"))
(push "Sarasa Mono J" (cadr (assoc unicode-block unicode-fonts-block-font-mapping)))))
;;(setq inhibit-compacting-font-caches t)
(custom-set-faces!
'(font-lock-comment-face :slant italic)
'(font-lock-keyword-face :weight bold))
;; Japanese input method
(use-package! mozc
:config
(setq default-input-method "japanese-mozc"))
;; (use-package! mozc-cand-posframe
;; :after mozc
;; :config
;; (setq mozc-candidate-style 'posframe)
;; (custom-set-faces!
;; '(mozc-cand-posframe-normal-face :inherit tooltip)
;; '(mozc-cand-posframe-focused-face :inherit highlight)
;; '(mozc-cand-posframe-footer-face :inherit default)))
;; Work around modeline cut off. See hlissner/doom-emacs#2967
(setq all-the-icons-scale-factor 1.0)
(after! doom-modeline
;; (custom-set-faces!
;; '(mode-line :height 0.97)
;; '(mode-line-inactive :height 0.97))
(custom-set-faces!
'(mode-line :height 0.98)
'(mode-line-inactive :height 0.98))
(setq doom-modeline-major-mode-icon t
doom-modeline-major-mode-color-icon t
doom-modeline-buffer-encoding t
doom-modeline-enable-word-count t
doom-modeline-unicode-fallback t))
(custom-set-faces!
'(doom-modeline-buffer-modified :foreground "orange"))
;; Window split position
(setq evil-vsplit-window-right t
evil-split-window-below t)
;; Emoji
(after! emojify
@ -46,7 +105,7 @@
;; (nth index items)))
;;(defvar *kawaii* (random-choice (delete "."
;; (delete ".." (directory-files (expand-file-name "images" doom-private-dir))))))
(setq +doom-dashboard-banner-file "yukino.png"
(setq +doom-dashboard-banner-file "kokkoro.png"
+doom-dashboard-banner-dir (expand-file-name "images" doom-private-dir)
+doom-dashboard-banner-padding '(0 . 2)
+doom-dashboard-functions '(doom-dashboard-widget-banner
@ -57,21 +116,18 @@
(setq display-line-numbers-type 'relative)
(setq global-hl-line-modes nil)
;; Git-gutter
(after! git-gutter
(setq +vc-gutter-default-style nil))
;; Indent
(setq-default
indent-tabs-mode nil
tab-width 2
evil-shift-width 2
standard-indent 2
line-spacing 2)
(after! highlight-indent-guides
(setq highlight-indent-guides-method 'character
highlight-indent-guides-responsive t))
;; Use ranger.el instead of default dired
(after! ranger
(setq ranger-override-dired-mode t
ranger-parent-depth 0
(setq ranger-parent-depth 0
ranger-cleanup-eagerly t
ranger-show-hidden t
ranger-max-preview-size 20
@ -83,24 +139,32 @@
projectile-auto-discover nil))
;; Ivy / Counsel
(setq +ivy-buffer-preview t)
(after! counsel
(setq counsel-linux-app-format-function #'counsel-linux-app-format-function-name-only))
(map! "C-M-j" 'counsel-switch-buffer)
(map! :map minibuffer-local-map
"C-r" 'counsel-minibuffer-history)
(use-package! all-the-icons-ivy-rich
:after counsel-projectile
:defer-incrementally counsel-projectile
:init (all-the-icons-ivy-rich-mode 1)
:config
(setq all-the-icons-ivy-rich-icon-size 1.0))
(use-package! ivy-rich
:after all-the-icons-ivy-rich)
;; Completion + lsp
;; Company
(after! company
;;(add-hook 'evil-normal-state-entry-hook #'company-abort)
(setq company-idle-delay 0.5
company-minimum-prefix-length 2
company-show-numbers nil))
;; lsp
(use-package! lsp-treemacs
:after (treemacs lsp)
:config
(lsp-treemacs-sync-mode 1))
(setq lsp-clients-clangd-args '("-j=2"
"--background-index"
"--clang-tidy"
@ -108,25 +172,58 @@
"--pch-storage=memory"
"--header-insertion=iwyu"
"--header-insertion-decorators"))
;;(after! lsp-clangd (set-lsp-priority! 'clangd 2)) ;; Prefer clangd instead of default ccls
(after! lsp-clangd (set-lsp-priority! 'clangd 2)) ;; Prefer clangd instead of default ccls
;; Self-built lua-language-server in .local/etc/lsp/lua-language-server
(after! lsp-lua
(setq lsp-clients-lua-language-server-bin (expand-file-name "lsp/lua-language-server/bin/Linux/lua-language-server" doom-etc-dir)
lsp-clients-lua-language-server-main-location (expand-file-name "lsp/lua-language-server/main.lua" doom-etc-dir)
lsp-lua-completion-call-snippet "Replace"
lsp-lua-hint-enable t
lsp-lua-runtime-path ["?.lua"
"?/init.lua"
"?/?.lua"
"/home/follie/.luarocks/share/lua/5.3/?.lua"
"/home/follie/.luarocks/share/lua/5.3/?/init.lua"
"/usr/share/lua/5.3/?/init.lua"
"/usr/share/5.3/?.lua"]
lsp-lua-runtime-version "Lua 5.3"
lsp-lua-telemetry-enable nil
lsp-lua-workspace-library '((/home/follie/.luarocks/share/lua/5.3 . t) (/usr/share/lua/5.3 . t))))
;; Quicker which-key
(after! which-key
(setq which-key-idle-delay 0.5))
;; Self-built parinfer-rust in .local/etc/parinfer-rust (cargo build --release --features emacs)
(use-package! parinfer-rust-mode
:init
(setq parinfer-rust-library
(concat doom-etc-dir "parinfer-rust/target/release/libparinfer_rust.so")
parinfer-rust-auto-download nil))
;; Org
(setq org-directory "~/Documents/Org/"
org-default-notes-file "~/Documents/Org/notes.org"
org-agenda-files '("~/Documents/Org/agenda/agenda.org" "~/Documents/Org/agenda/archive.org")
org-confirm-babel-evaluate nil
org-ellipsis ""
org-hide-emphasis-markers t)
(setq org-directory "~/Documents/Org/")
(after! org
(setq org-default-notes-file "~/Documents/Org/notes.org"
org-agenda-files '("~/Documents/Org/agenda/agenda.org" "~/Documents/Org/agenda/archive.org")
org-confirm-babel-evaluate nil
org-ellipsis ""
org-log-done t
org-log-into-drawser t
org-insert-heading-respect-content nil
org-hide-emphasis-markers t)
(add-to-list 'org-modules 'ol-info)
;; Org-noter
(setq org-noter-notes-search-path '("~/Documents/Org/noter/"))
;; Org-journal
(setq org-journal-dir "~/Documents/Org/journal/"))
(defun follie/comfy-org-editing ()
(setq visual-fill-column-width 120
(setq visual-fill-column-width 100
visual-fill-column-center-text t)
(visual-fill-column-mode 1)
(display-line-numbers-mode -1))
(add-hook 'org-mode-hook 'follie/comfy-org-editing)
(add-hook! org-mode (electric-indent-local-mode -1))
(defun follie/org-toggle-emphasis-markers ()
"Toggle emphasis markers in an Org buffer"
(interactive)
@ -137,23 +234,32 @@
(map! :map org-mode-map
:localleader :desc "org-toggle-emphasis-markers"
"z" #'follie/org-toggle-emphasis-markers)
;; Org-tree-slide
(defun follie/presentation-start ()
(text-scale-set 2)
(hide-mode-line-mode 1))
(defun follie/presentation-stop ()
(text-scale-set 0)
(hide-mode-line-mode -1))
(use-package! org-tree-slide
:commands org-tree-slide-mode
:config
(advice-remove 'org-tree-slide--display-tree-with-narrow #'+org-present--narrow-to-subtree-a)
(setq +org-present-text-scale 2
org-tree-slide-skip-outline-level 0
(setq org-tree-slide-skip-outline-level 0
org-image-actual-width nil
org-tree-slide-heading-emphasis t
org-tree-slide-modeline-display nil
org-tree-slide-header nil
org-tree-slide-header t
org-tree-slide-slide-in-effect t
org-tree-slide-breadcrumbs ""
org-tree-slide-activate-message "Presentation starto..."
org-tree-slide-deactivate-message "Thanks for listening!"))
;; Org-noter
(setq org-noter-notes-search-path '("~/Documents/Org/noter/"))
;; Org-journal
(setq org-journal-dir "~/Documents/Org/journal/")
org-tree-slide-deactivate-message "Thanks for listening!")
(add-hook! 'org-tree-slide-mode-hook #'evil-normalize-keymaps)
(add-hook! 'org-tree-slide-play-hook #'follie/presentation-start)
(add-hook! 'org-tree-slide-stop-hook #'follie/presentation-stop))
;; Latex
(setq +latex-viewers '(pdf-tools))
;; Spell checker
(after! flyspell
@ -162,6 +268,226 @@
;; Magit
(after! magit
(setq magit-diff-refine-hunk 'all))
;;(add-hook 'magit-mode-hook (lambda () (magit-delta-mode +1)))
;; Elfeed
(setq rmh-elfeed-org-files (list (expand-file-name "elfeed.org" doom-private-dir)))
;;(add-hook! 'elfeed-search-mode-hook 'elfeed-update)
(use-package! elfeed-goodies
:after elfeed
:config
(elfeed-goodies/setup)
(setq elfeed-goodies/entry-pane-size 0.5))
;; Elpher
(defun elpher--init-hook ()
(setq visual-fill-column-center-text t)
(visual-fill-column-mode 1))
(use-package! elpher
:defer t
:config
(setq elpher-use-tls t
elpher-auto-disengage-TLS t
elpher-connection-timeout 10
elpher-gemini-max-fill-width 80
elpher-gemini-TLS-cert-checks nil)
(add-hook 'elpher-mode-hook 'elpher--init-hook))
;; mu4e
(setq +mu4e-alert-bell-cmd nil
+mu4e-mu4e-mail-path "~/Mail")
(use-package! mu4e
:commands mu4e mu4e-compose-new
:config
(setq mu4e-update-interval (* 10 60)
mu4e-view-image-max-width 600
mu4e-context-policy 'always-ask
mu4e-compose-context-policy 'always-ask
mu4e-index-cleanup nil
mu4e-index-lazy-check t))
(set-email-account! "Gmail"
'((mu4e-sent-folder . "/Gmail/[Gmail]/Sent Mail")
(mu4e-drafts-folder . "/Gmail/[Gmail]/Drafts")
(mu4e-trash-folder . "/Gmail/[Gmail]/Trash")
(mu4e-refile-folder . "/Gmail/[Gmail]/All Mail")
(smtpmail-smtp-user . "example@gmail.com")
(smtpmail-smtp-server . "smtp.gmail.com")
(smtpmail-smtp-service . 465)
(smtpmail-stream-type . ssl)
(user-full-name . "FGoogle")
(user-mail-address . "example@gmail.com")
(mu4e-compose-signature . "---\nfgoogle"))
t)
;; circe
(defun my-fetch-password (&rest params)
(require 'auth-source)
(let ((match (car (apply #'auth-source-search params))))
(if match
(let ((secret (plist-get match :secret)))
(if (functionp secret)
(funcall secret)
secret))
(error "Password not found for %S" params))))
(after! circe
(set-irc-server! "irc.libera.chat"
'(:tls t
:port 6697
:nick "FollieHiyuki"
:sasl-username "FollieHiyuki"
:sasl-password (my-fetch-password :user "FollieHiyuki" :host "irc.libera.chat")
:channels ("#river", "#voidlinux", "#xbps", "artix", "#emacs", "#gentoo", "#guix", "##otaku"))))
;; Cheatsheet
;; (use-package! tldr
;; :commands tldr tldr-mode
;; :config
;; (setq tldr-directory-path "~/.local/share/tldr"))
;; Keycast
(use-package! keycast
:commands keycast-mode
:config
(define-minor-mode keycast-mode
"Show current command and its key binding in the mode line."
:global t
(if keycast-mode
(progn
(add-hook 'pre-command-hook 'keycast--update t)
(add-to-list 'global-mode-string '("" mode-line-keycast " ")))
(remove-hook 'pre-command-hook 'keycast--update)
(setq global-mode-string (remove '("" mode-line-keycast " ") global-mode-string))))
(custom-set-faces!
'(keycast-command :inherit doom-modeline-debug
:height 0.9)
'(keycast-key :inherit custom-modified
:height 1.1
:weight bold)))
;; To read big files
;; (use-package! vlf-setup
;; :defer-incrementally vlf-tune vlf-base vlf-write vlf-search vlf-occur vlf-follow vlf-ediff vlf)
;; Nicer page break
;; (use-package! page-break-lines
;; :commands page-break-lines-mode
;; :init
;; (autoload 'turn-on-page-break-lines-mode "page-break-lines"))
;; Like neofetch, but for eshell
(use-package! eshell-info-banner
:defer t
:after eshell
:hook (eshell-banner-load . eshell-info-banner-update-banner))
;; (buffer-expose-mode 1)
;; xbps but with Emacs
;;(use-package! system-packages
;; :defer t
;; :config
;; (setq system-packages-use-sudo t))
(use-package! symon
:commands symon-mode
:custom
(symon-sparkline-type 'gridded)
:config
(symon-display))
;; playerctl status on modeline
;; (use-package! doom-modeline-now-playing
;; :after doom-modeline
;; :config
;; (doom-modeline-now-playing-timer)
;; ;; Enable almost everywhere
;; (doom-modeline-def-modeline 'main
;; '(bar workspace-name window-number modals matches buffer-info remote-host buffer-position word-count parrot selection-info now-playing)
;; '(objed-state misc-info persp-name battery grip irc mu4e gnus github debug repl lsp minor-modes input-method indent-info buffer-encoding major-mode process vcs checker))
;; (doom-modeline-def-modeline 'special
;; '(bar window-number modals matches buffer-info buffer-position word-count parrot selection-info now-playing)
;; '(objed-state misc-info battery irc-buffers debug minor-modes input-method indent-info buffer-encoding major-mode process))
;; (doom-modeline-def-modeline 'project
;; '(bar window-number buffer-default-directory now-playing)
;; '(misc-info battery irc mu4e gnus github debug minor-modes input-method major-mode process))
;; (doom-modeline-def-modeline 'vcs
;; '(bar window-number modals matches buffer-info buffer-position parrot selection-info now-playing)
;; '(misc-info battery irc mu4e gnus github debug minor-modes buffer-encoding major-mode process))
;; (doom-modeline-def-modeline 'info
;; '(bar window-number buffer-info info-nodes buffer-position parrot selection-info now-playing)
;; '(misc-info buffer-encoding major-mode))
;; (doom-modeline-def-modeline 'media
;; '(bar window-number buffer-size buffer-info now-playing)
;; '(misc-info media-info major-mode process vcs))
;; (doom-modeline-def-modeline 'message
;; '(bar window-number modals matches buffer-info-simple buffer-position word-count parrot selection-info now-playing)
;; '(objed-state misc-info battery debug minor-modes input-method indent-info buffer-encoding major-mode))
;; (doom-modeline-def-modeline 'pdf
;; '(bar window-number matches buffer-info pdf-pages now-playing)
;; '(misc-info major-mode process vcs))
;; (doom-modeline-def-modeline 'org-src
;; '(bar window-number modals matches buffer-info-simple buffer-position word-count parrot selection-info now-playing)
;; '(objed-state misc-info debug lsp minor-modes input-method indent-info buffer-encoding major-mode process checker))
;; (doom-modeline-def-modeline 'timemachine
;; '(bar window-number matches git-timemachine buffer-position word-count parrot selection-info now-playing)
;; '(misc-info minor-modes indent-info buffer-encoding major-mode)))
;; EMMS
(use-package! emms
:defer t
:init
(setq emms-seek-seconds 10)
:config
(emms-playing-time -1)
(emms-mode-line -1)
;; Play music with emms directly
(setq emms-source-file-default-directory "~/Music/"
emms-info-asynchronously 1
emms-playlist-buffer-name "*EMMS-Music*"
emms-source-file-directory-tree-function 'emms-source-file-directory-tree-find
emms-browser-covers 'emms-browser-cache-thumbnail-async)
;; Use mpd backend
(setq emms-player-mpd-server-name "localhost"
emms-player-mpd-server-port "6600"
emms-player-mpd-music-directory "~/Music/")
(add-to-list 'emms-player-list 'emms-player-mpd)
(add-to-list 'emms-info-functions
'emms-info-mpd
'emms-info-exiftool)
(map! :map emms-playlist-mode-map
:localleader
"d" #'emms-insert-directory))
(use-package! ivy-emms
:after emms
:config
(setq ivy-emms-default-action #'ivy-emms-play-next)
(setq ivy-emms-default-multi-action #'ivy-emms-play-next-multi))
;;(use-package! emms-mode-line-cycle
;; :after emms
;; :config
;; (emms-playing-time 1)
;; (emms-mode-line 1)
;; (emms-mode-line-cycle 1))
;; Duck the web with ivy
(use-package! counsel-web
:after counsel
:config
(setq counsel-web-engine 'duckduckgo)
(setq counsel-web-search-action #'browse-url)
(setq counsel-web-search-alternate-action #'browse-url-firefox)
(setq counsel-web-search-dynamic-update nil)
(exwm-input-set-key (kbd "s-d") #'counsel-web-search))
;; Start pinentry
(pinentry-start)
;; System monitor in minibuffer
(symon-mode)
;; Additional status info on modeline
;;(setq display-time-day-and-date t)
(display-time-mode 1)
(if (not (equal "Battery status not available" (battery)))
(display-battery-mode 1))
;; Here are some additional functions/macros that could help you configure Doom:
;;

View File

@ -55,6 +55,7 @@
**** [[https://www.reddit.com/r/LightNovels/new.rss][r/LightNovels]]
**** [[https://www.reddit.com/r/PixelArt/new.rss][r/PixelArt]]
**** [[https://www.reddit.com/r/riprequests/new.rss][r/riprequests]]
**** [[https://www.reddit.com/r/dllinks/new.rss][r/dllinks]]
** News :news:
*** [[http://feeds.bbci.co.uk/news/rss.xml][BBC News]]
*** [[https://www.theguardian.com/world/rss][The Guardian]]

View File

@ -1,346 +0,0 @@
;;; exwm.el -*- lexical-binding: t; -*-
(defun follie/run-in-background (command)
(let ((command-parts (split-string command "[ ]+")))
(apply #'call-process `(,(car command-parts) nil 0 nil ,@(cdr command-parts)))))
(defun follie/set-wallpaper ()
(interactive)
(start-process-shell-command
"feh" nil "feh --no-fehbg --bg-fill --randomize ~/Pictures/Wallpapers/*"))
(defun follie/exwm-init-hook ()
;; Make workspace 1 the default at startup
;;(exwm-workspace-switch-create 1)
;; Start pinentry
(pinentry-start)
;; Additional status info on modeline
(setq display-time-day-and-date t)
(display-time-mode 1)
(if (not (equal "Battery status not available" (battery)))
(display-battery-mode 1))
;; Startup apps
(follie/run-in-background "pipewire")
(follie/run-in-background "dunst")
(follie/run-in-background "mpDris2")
(start-process-shell-command "xsetroot" nil "xsetroot -cursor_name left_ptr"))
(follie/run-in-background "greenclip daemon")
(defun follie/configure-window-by-class ()
(interactive)
(pcase exwm-class-name
("Komikku" (exwm-floating-toggle-floating)
(exwm-layout-hide-mode-line))))
(defun follie/update-displays ()
(lambda ()
(start-process-shell-command
"xrandr" nil "xrandr --output eDP-1 --mode 1920x1080 --pos 0x0 --rotate normal --output HDMI-1 --mode 1920x1080 --pos 1920x0 --rotate normal"))
(follie/set-wallpaper)
(message "Updated displays: %s"
(string-trim (shell-command-to-string "xrandr | grep \" connected\" | awk '{print $1}' | sed '$!N;s/\\n/ /'"))))
(defun follie/exwm-rename-buffer ()
(interactive)
(exwm-workspace-rename-buffer
(concat exwm-class-name ":"
(if (<= (length exwm-title) 30) exwm-title
(concat (substring exwm-title 0 29))))))
(use-package! exwm
:config
;; Number of workspaces
(setq exwm-workspace-number 6)
;; Extra stuff at startup
(add-hook 'exwm-init-hook #'follie/exwm-init-hook)
;; Update buffer name
(add-hook 'exwm-update-class-hook #'follie/exwm-rename-buffer)
(add-hook 'exwm-update-title-hook #'follie/exwm-rename-buffer)
;; Force tiling by default
;;(setq exwm-manage-force-tiling t)
;; Window rules
(add-hook 'exwm-manage-finish-hook #'follie/configure-window-by-class)
;; Automatically move EXWM buffer to current workspace
(setq exwm-layout-show-all-buffers t)
;; Display all buffers in every workspace buffer list
(setq exwm-workspace-show-all-buffers t)
;; Multi monitor
(require 'exwm-randr)
(setq exwm-randr-workspace-monitor-plist '(1 "HDMI-1"))
(add-hook 'exwm-randr-screen-change-hook #'follie/update-displays)
(exwm-randr-enable)
;; System tray on minibuffer
(require 'exwm-systemtray)
(setq exwm-systemtray-height 20)
(exwm-systemtray-enable)
;; Automatically send cursor to the selected display
(setq exwm-workspace-warp-cursor t)
;; Focus follows cursor
(setq mouse-autoselect-window t
focus-follows-mouse t)
;; Keys that always pass through to Emacs in line-mode
(setq exwm-input-prefix-keys
'(?\C-x
?\C-u
?\C-g ;; keyboard-quit
?\C-h
?\M-x
?\M-`
?\M-&
?\M-:
?\C-\M-j)) ;; Buffer list
;; Ctrl+q to enable next key to be sent directly
(define-key exwm-mode-map [?\C-q] 'exwm-input-send-next-key)
;; Global key bindings
(setq exwm-input-global-keys
`(
;; Reset to line-mode (C-c C-k switches to char-mode via exwm-input-release-keyboard)
([?\s-r] . exwm-reset)
;; Move between windows
([s-left] . windmove-left)
([s-right] . windmove-right)
([s-up] . windmove-up)
([s-down] . windmove-down)
([?\s-h] . windmove-left)
([?\s-l] . windmove-right)
([?\s-k] . windmove-up)
([?\s-j] . windmove-down)
;; Swap window position
([s-S-left] . windmove-swap-states-left)
([s-S-right] . windmove-swap-states-right)
([s-S-up] . windmove-swap-states-up)
([s-S-down] . windmove-swap-states-down)
([?\s-H] . windmove-swap-states-left)
([?\s-L] . windmove-swap-states-right)
([?\s-K] . windmove-swap-states-up)
([?\s-J] . windmove-swap-states-down)
;; Launch applications via shell command
([?\s-&] . (lambda (command)
(interactive (list (read-shell-command "$ ")))
(start-process-shell-command command nil command)))
;; Switch workspace
([?\s-w] . exwm-workspace-switch)
([?\s-`] . (lambda () (interactive) (exwm-workspace-switch-create 0)))
;; 's-N': Switch to certain workspace with Super (Win) plus a number key (0 - 9)
,@(mapcar (lambda (i)
`(,(kbd (format "s-%d" i)) .
(lambda ()
(interactive)
(exwm-workspace-switch-create ,i))))
(number-sequence 0 9))))
;; Additional bindings for convenience
(exwm-input-set-key (kbd "s-s") '+eshell/toggle)
(exwm-input-set-key (kbd "s-v") '+vterm/here)
(exwm-input-set-key (kbd "s-SPC") 'counsel-linux-app)
(exwm-input-set-key (kbd "s-t") 'exwm-floating-toggle-floating)
(exwm-input-set-key (kbd "s-f") 'exwm-layout-toggle-fullscreen)
;; Enable EXWM
(exwm-enable)
;; Work around ido frame
(require 'exwm-config)
(exwm-config-ido)
(ido-mode nil))
;; Edit everything in X windows with Emacs
(use-package! exwm-edit
:after exwm
:config
(exwm-input-set-key (kbd "s-e") #'exwm-edit--compose))
;; xbps but with Emacs
;;(use-package! system-packages
;; :config
;; (setq system-packages-use-sudo t))
;; Elfeed
(setq rmh-elfeed-org-files (list (expand-file-name "elfeed.org" doom-private-dir)))
;;(add-hook! 'elfeed-search-mode-hook 'elfeed-update)
;; Mapping for built-in mpc-mode
(map! :leader :desc "music" "e" nil
:leader :desc "MPC play track"
"e RET" #'mpc-play-at-point
:leader :desc "MPC select track"
"e v" #'mpc-select-toggle
:leader :desc "MPC next track"
"e >" #'mpc-next
:leader :desc "MPC previous track"
"e <" #'mpc-prev
:leader :desc "MPC seek within current track"
"e f" #'mpc-seek-current
:leader :desc "MPC pause track"
"e p" #'mpc-pause
:leader :desc "MPC quit"
"e q" #'mpc-quit
:leader :desc "MPC toggle playing"
"e s" #'mpc-toggle-play
:leader :desc "MPC toggle consume"
"e c" #'mpc-toggle-consume
:leader :desc "MPC toggle single"
"e 1" #'mpc-toggle-single
:leader :desc "MPC toggle repeat"
"e r" #'mpc-toggle-repeat
:leader :desc "MPC toggle shuffle"
"e z" #'mpc-toggle-shuffle
:leader :desc "MPC show playlist"
"e l" #'mpc-playlist)
;; EMMS
;; (use-package! emms
;; :after exwm
;; :init
;; (setq emms-seek-seconds 10)
;; :config
;; (require 'emms-setup)
;; (emms-all)
;; (emms-default-players)
;; ;; Play music with emms directly
;; (setq emms-source-file-default-directory "~/Music/"
;; emms-info-asynchronously 1
;; emms-playlist-buffer-name "*EMMS-Music*"
;; emms-source-file-directory-tree-function 'emms-source-file-directory-tree-find
;; emms-browser-covers 'emms-browser-cache-thumbnail-async)
;; ;; Use mpd backend
;; ;;(require 'emms-player-mpd)
;; ;;(setq emms-player-mpd-server-name "localhost"
;; ;; emms-player-mpd-server-port "6600"
;; ;; emms-player-mpd-music-directory "~/Music")
;; ;;(add-to-list 'emms-player-list 'emms-player-mpd)
;; (add-to-list 'emms-info-functions
;; ;;'emms-info-mpd
;; 'emms-info-exiftool)
;; (map! :leader :desc "EMMS playlist"
;; "e a" #'emms-playlist-mode-go
;; :leader :desc "EMMS browse by album"
;; "e b" #'emms-browse-by-album
;; :leader :desc "EMMS pause track"
;; "e x" #'emms-pause
;; :leader :desc "EMMS stop track"
;; "e g" #'emms-stop
;; :leader :desc "EMMS previous track"
;; "e j" #'emms-previous
;; :leader :desc "EMMS next track"
;; "e k" #'emms-next))
;; Truncate emms module on mode line
;;(use-package! emms-mode-line-cycle
;; :after emms
;; :config
;; (emms-playing-time 1)
;; (emms-mode-line 1)
;; (emms-mode-line-cycle 1))
;;(use-package! ivy-emms
;; :after emms
;; :config
;; (setq ivy-emms-default-action #'ivy-emms-play-next)
;; (setq ivy-emms-default-multi-action #'ivy-emms-play-next-multi))
;; Duck the web with ivy
(use-package! counsel-web
:after counsel
:config
(setq counsel-web-engine 'duckduckgo)
(setq counsel-web-search-action #'browse-url)
(setq counsel-web-search-alternate-action #'browse-url-firefox)
(setq counsel-web-search-dynamic-update nil)
(exwm-input-set-key (kbd "s-d") #'counsel-web-search))
;; Function keys
(use-package! desktop-environment
:after exwm
:diminish desktop-environment-mode
:config
;; Give me back Super+l
(progn
(setf
(alist-get (elt (kbd "s-l") 0) desktop-environment-mode-map nil t)
nil)
(desktop-environment-mode))
(exwm-input-set-key (kbd "s-x") #'desktop-environment-lock-screen)
:custom
;; Brightness
(desktop-environment-brightness-get-command "brightnessctl")
(desktop-environment-brightness-get-regexp "\\([0-9]+%\\)")
(desktop-environment-brightness-set-command "brightnessctl set %s")
(desktop-environment-brightness-small-increment "2%+")
(desktop-environment-brightness-small-decrement "2%-")
(desktop-environment-brightness-normal-increment "5%+")
(desktop-environment-brightness-normal-decrement "5%-")
;; Volume
(desktop-environment-volume-get-command "pulsemixer --get-volume")
(desktop-environment-volume-get-regexp "\\([0-9]+ \\)")
(desktop-environment-volume-toggle-command "pulsemixer --toggle-mute")
(desktop-environment-volume-toggle-microphone-command nil)
(desktop-environment-volume-set-command "pulsemixer --change-volume %s")
(desktop-environment-volume-small-increment "+2")
(desktop-environment-volume-small-decrement "-2")
(desktop-environment-volume-normal-increment "+5")
(desktop-environment-volume-normal-decrement "-5")
;; Screenshot
(desktop-environment-screenshot-directory "~/Screenshots")
(desktop-environment-screenshot-command "scrot -m -q 100 '%Y-%m-%d-%T_$wx$h.png'")
(desktop-environment-screenshot-partial-command
"scrot -s -f -l style=solid,width=2,color=\"red\" -q 100 '%Y-%m-%d-%T_$wx$h.png'")
;; Screenlock
(desktop-environment-screenlock-command "~/.local/bin/X11/i3lock.sh"))
;; Control dunst
(defun close-desktop-notifications ()
"Close all current notifications"
(interactive)
(start-process-shell-command "dunstctl" nil "dunstctl close-all"))
(defun toggle-desktop-notifications ()
"Toggle desktop notification on/off"
(interactive)
(start-process-shell-command "dunstctl" nil "dunstctl set-paused toggle"))
;; Clipboard management
(defun greenclip--select-item (str)
"Copy selected item to clipboard"
(setq str (replace-regexp-in-string "\u00a0" "\n" str))
;; (kill-new str)
(condition-case nil
(cond
((fboundp 'ns-set-pasteboard)
(ns-set-pasteboard str))
((fboundp 'gui-set-selection)
(gui-set-selection 'CLIPBOARD str))
(t
(error "No clipboard support")))
(error
(with-temp-buffer
(insert str)
(if (file-executable-p "xsel")
(call-process-region (point-min) (point-max) "xsel" nil nil nil "--clipboard" "--input")
(call-process-region (point-min) (point-max) "xclip" nil nil nil "-selection clipboard" "--input"))))))
(defun ivy-greenclip ()
"Select an item from X clipboard history"
(interactive)
(let* ((history (split-string (shell-command-to-string "greenclip print") "[\r\n]+")))
(ivy-read "Clipboard item: "
history
:action (lambda (str)
(greenclip--select-item str)))))
(defun greenclip-clear-history ()
"Clear clipboard history cache"
(interactive)
(start-process-shell-command "greenclip" nil "pkill greenclip && greenclip clear")
(follie/run-in-background "greenclip daemon"))

Binary file not shown.

After

Width:  |  Height:  |  Size: 285 KiB

View File

@ -26,8 +26,10 @@
;;ido ; the other *other* search engine...
(ivy ; a search engine for love and life
+fuzzy
;;+prescient
+prescient
;;+childframe
+icons)
;;vertico ; the search engine of the future
:ui
;;deft ; notational velocity for Emacs
@ -36,13 +38,12 @@
doom-quit ; DOOM quit-message prompts when you quit Emacs
(emoji ; :)
+unicode
+github
+ascii)
;;fill-column ; a `fill-column' indicator
+ascii
+github)
hl-todo ; highlight TODO/FIXME/NOTE/DEPRECATED/HACK/REVIEW
;;hydra
indent-guides ; highlighted indent columns
(ligatures +extra); ligatures and symbols to make your code pretty again
;;(ligatures +extra); ligatures and symbols to make your code pretty again
;;minimap ; show a map of the code on the side
modeline ; snazzy, Atom-inspired modeline, plus API
nav-flash ; blink cursor line after big motions
@ -52,7 +53,7 @@
+all
+defaults)
;;tabs ; a tab bar for Emacs
treemacs ; a project drawer, like neotree but cooler
(treemacs +lsp) ; a project drawer, like neotree but cooler
unicode ; extended unicode support for various languages
vc-gutter ; vcs diff in the fringe
vi-tilde-fringe ; fringe tildes to mark beyond EOB
@ -70,7 +71,7 @@
;;lispy ; vim for lisp, for people who don't like vim
multiple-cursors ; editing in many places at once
;;objed ; text object editing for the innocent
;;parinfer ; turn lisp into python, sort of
(parinfer +rust) ; turn lisp into python, sort of
;;rotate-text ; cycle region at point between text candidates
snippets ; my elves. They type so I don't have to
;;word-wrap ; soft wrapping with language-aware indent
@ -93,9 +94,9 @@
:checkers
syntax ; tasing you for every semicolon you forget
(spell ; tasing you for misspelling mispelling
+flyspell
;;+everywhere
+hunspell
+everywhere)
+flyspell)
grammar ; tasing grammar mistake every you make
:tools
@ -107,8 +108,11 @@
;;ein ; tame Jupyter notebooks with emacs
(eval +overlay) ; run code, run (also, repls)
;;gist ; interacting with github gists
lookup ; navigate your code and its documentation
lsp
(lookup ; navigate your code and its documentation
+dictionary
;;+offline
+docsets)
(lsp +peek)
(magit +forge) ; a git porcelain for Emacs
make ; run make tasks from Emacs
;;pass ; password manager for nerds
@ -117,7 +121,7 @@
rgb ; creating color strings
;;taskrunner ; taskrunner for all your projects
;;terraform ; infrastructure as code
;;tmux ; an API for interacting with tmux
tmux ; an API for interacting with tmux
;;upload ; map local to remote projects via ssh/ftp
:os
@ -126,6 +130,7 @@
:lang
;;agda ; types of types of types of types...
(beancount +lsp) ; the accounting system in Emacs
(cc +lsp) ; C/C++/Obj-C madness
;;clojure ; java with a lisp
common-lisp ; if you've seen one lisp, you've seen them all
@ -134,11 +139,13 @@
;;csharp ; unity, .NET, and mono shenanigans
data ; config/data formats
;;(dart +flutter) ; paint ui and not much else
;;dhall
;;elixir ; erlang done right
;;elm ; care for a cup of TEA?
emacs-lisp ; drown in parentheses
;;erlang ; an elegant language for a more civilized age
;;ess ; emacs speaks statistics
;;factor
;;faust ; dsp, but you get to keep your soul
;;fsharp ; ML stands for Microsoft's Language
;;fstar ; (dependent) types and (monadic) effects and Z3
@ -147,31 +154,33 @@
(haskell +dante) ; a language that's lazier than I am
;;hy ; readability of scheme w/ speed of python
;;idris ;
json ; At least it ain't XML
(json +lsp) ; At least it ain't XML
;;(java +meghanada) ; the poster child for carpal tunnel syndrome
(javascript +lsp) ; all(hope(abandon(ye(who(enter(here))))))
;;julia ; a better, faster MATLAB
;;kotlin ; a better, slicker Java(Script)
;;(latex ; writing papers in Emacs has never been so fun
;; +latexmk
;; +cdlatex
;; +fold)
;;lean
;;factor
;;ledger ; an accounting system in Emacs
lua ; one-based indices? one-based indices
(markdown ; writing docs for people to ignore
+grip)
(latex ; writing papers in Emacs has never been so fun
+latexmk
+cdlatex
+lsp
+fold)
;;lean ; for folks with too much to prove
;;ledger ; be audit you can be
(lua ; one-based indices? one-based indices
+moonscript
+lsp)
(markdown +grip) ; writing docs for people to ignore
;;nim ; python + lisp at the speed of c
nix ; I hereby declare "nix geht mehr!"
;;ocaml ; an objective camel
(org ; organize your plain life in plain text
+pretty
+dragndrop
+hugo
;;+gnuplot
;;+jupyter
+journal
+present
;;+present
+roam
+noter
+pandoc)
@ -184,7 +193,7 @@
+poetry
+pyright
+cpython)
;;qt ; the 'cutest' gui framework ever
qt ; the 'cutest' gui framework ever
;;racket ; a DSL for DSLs
;;raku ; the artist formerly known as perl6
rest ; Emacs as a REST client
@ -192,22 +201,26 @@
;;(ruby +rails) ; 1.step {|i| p "Ruby is #{i.even? ? 'love' : 'life'}"}
(rust +lsp) ; Fe2O3.unwrap().unwrap().unwrap().unwrap()
;;scala ; java, but good
;;scheme ; a fully conniving family of lisps
(sh +fish) ; she sells {ba,z,fi}sh shells on the C xor
(scheme +guile) ; a fully conniving family of lisps
(sh ; she sells {ba,z,fi}sh shells on the C xor
+lsp
+fish)
;;sml
;;solidity ; do you need a blockchain? No.
;;swift ; who asked for emoji variables?
;;terra ; Earth and Moon in alignment for performance.
web ; the tubes
yaml ; JSON, but readable
(yaml +lsp) ; JSON, but readable
;;zig ; C, but simpler
:email
(mu4e +gmail)
(mu4e +org +gmail)
;;notmuch
;;(wanderlust +gmail)
:app
calendar
emms
;;everywhere ; *leave* Emacs!? You must be joking
irc ; how neckbeards socialize
(rss +org) ; emacs as an RSS reader

View File

@ -49,23 +49,39 @@
;; ...Or *all* packages (NOT RECOMMENDED; will likely break things)
;(unpin! t)
;; Emacs is an OS
(package! exwm)
(package! exwm-edit)
(package! desktop-environment)
(package! ebuku)
(package! counsel-web)
(package! elpher)
(package! pinentry)
(package! sudoku)
;;(package! system-packages)
;;(package! emms)
;;(package! emms-mode-line-cycle)
;;(package! ivy-emms)
;;(package! edwina)
;; Improvements
(package! xonsh-mode)
(package! vimrc-mode)
(package! magit-delta)
(package! all-the-icons-ivy-rich)
(package! nerd-fonts
:recipe (:host github :repo "FollieHiyuki/nerd-fonts.el"))
(package! ivy-emms)
(package! elfeed-goodies)
(package! symon)
;;(package! tldr)
(package! lice)
(package! license-templates)
(package! keycast)
(package! eshell-info-banner
:recipe (:host github :repo "Phundrak/eshell-info-banner.el"))
(package! org-tree-slide)
;;(package! buffer-expose)
;;(package! gemini-mode)
;;(package! page-break-lines)
;;(package! vlf)
;;(package! ox-gfm)
;;(package! gif-screencase)
;;(package! magit-delta)
;;(package! sudoku)
;;(package! mentor)
;;(package! mozc-cand-posframe)
;;(package! 2048-game)
;;(package! org-ql)
;;(package! org-wild-notifier)
;;(package! system-packages)
;;(package! emms-mode-line-cycle)
;;(package! doom-modeline-now-playing)
;;(package! edwina)

View File

@ -29,7 +29,7 @@
# the top and down respectively.
# The width can be negative. In this case the actual width is the
# screen width minus the width defined in within the geometry option.
geometry = "0x5-5+30"
geometry = "300x5-20+30"
# Turn on the progess bar
progress_bar = true
@ -108,7 +108,7 @@
### Text ###
font = Sarasa Fixed J 12
font = Sarasa Mono J 12
# The spacing between lines. If the height is smaller than the
# font height, it will get raised to the font height.
@ -214,7 +214,7 @@
#dmenu = /usr/bin/dmenu -p dunst:
# Browser for opening urls in context menu.
browser = /usr/bin/qutebrowser
browser = /usr/bin/firefox
# Always run rule-defined scripts, even if the notification is suppressed
always_run_script = true

View File

@ -0,0 +1,7 @@
complete --command fisher --exclusive --long help --description "Print help"
complete --command fisher --exclusive --long version --description "Print version"
complete --command fisher --exclusive --condition __fish_use_subcommand --arguments install --description "Install plugins"
complete --command fisher --exclusive --condition __fish_use_subcommand --arguments update --description "Update installed plugins"
complete --command fisher --exclusive --condition __fish_use_subcommand --arguments remove --description "Remove installed plugins"
complete --command fisher --exclusive --condition __fish_use_subcommand --arguments list --description "List installed plugins matching regex"
complete --command fisher --exclusive --condition "__fish_seen_subcommand_from update remove" --arguments "(fisher list)"

View File

@ -0,0 +1,2 @@
complete z -f -a "(__fish_complete_directories (commandline -t) '')"
complete z -n "test -n (commandline -t)" -a "(zoxide query -l -- (commandline -t))" -k

View File

@ -5,7 +5,7 @@
# /_/ |_/_/ /_/ \__,_/ /____/
#
# remap
alias doas='doas --'
abbr x extract
abbr p pulsemixer
alias startx='startx $HOME/.config/X11/xinitrc'
alias fehwpp="feh --no-fehbg --bg-fill --randomize ~/Pictures/Wallpapers/*"
@ -17,11 +17,8 @@ alias mv='mv -vi'
alias rm='rm -vr'
alias mkdir='mkdir -pv'
abbr no 'grep -viP'
abbr latest_pkg "expac --timefmt='%Y-%m-%d %T' '%l\t%n' | sort | tail -n 30"
alias yarn='yarn --use-yarnrc $HOME/.config/yarn/config'
abbr tmux 'TERM=screen-256color command tmux'
alias cat='bat --style plain --color=always'
alias myip='curl ipinfo.io/geo'
# colorizing
alias grep='grep --color=auto'
alias fgrep='fgrep --color=auto'
@ -31,29 +28,60 @@ alias ncdu='ncdu --color=dark'
alias ip='ip -color=always'
# vim
abbr v nvim
abbr vi 'nvim -o (fzf)'
abbr vi 'fzf | xargs -r nvim -o'
# emacs
alias doom='$HOME/.config/emacs/bin/doom'
alias doom='$HOME/.config/emacs-config/doom/bin/doom'
abbr e 'emacs -nw'
abbr em "emacsclient -c -a 'emacs'"
# rsync
abbr rsyncdir "rsync -uavP --delete-after"
abbr rsyncfile "rsync -avP"
abbr rsyncdir "rsync -avP --delete-after"
# youtube-dl
abbr yoump3 'youtube-dl --extract-audio --audio-format mp3 --embed-thumbnail'
abbr youflac 'youtube-dl --extract-audio --audio-format flac'
abbr youbest 'youtube-dl -f bestvideo+bestaudio'
abbr youlist 'youtube-dl -f bestvideo+bestaudio --yes-playlist'
abbr youlist 'youtube-dl --yes-playlist'
# nnn
abbr nnn 'nnn -Hc'
alias ncp="cat $XDG_CONFIG_HOME/nnn/.selection | tr '\0' '\n'"
# zlua
alias zc='z -c' # restrict matches to subdirs of $PWD
alias zz='z -i' # cd with interactive selection
alias zf='z -I' # use fzf to select in multiple matches
alias zb='z -b' # quickly cd to the parent directory
alias zbi='z -b -i' # interactive jump backward
alias zbf='z -b -I' # interactive jump backward with fzf
if command -v nnn >/dev/null
alias ncp="cat $XDG_CONFIG_HOME/nnn/.selection | tr '\0' '\n'"
function n --wraps nnn --description 'support nnn quit and change directory'
# Block nesting of nnn in subshells
if test -n "$NNNLVL"
if [ (expr $NNNLVL + 0) -ge 1 ]
echo "nnn is already running"
return
end
end
# The default behaviour is to cd on quit (nnn checks if NNN_TMPFILE is set)
# To cd on quit only on ^G, remove the "-x" as in:
# set NNN_TMPFILE "$XDG_CONFIG_HOME/nnn/.lastd"
# NOTE: NNN_TMPFILE is fixed, should not be modified
if test -n "$XDG_CONFIG_HOME"
set -x NNN_TMPFILE "$XDG_CONFIG_HOME/nnn/.lastd"
else
set -x NNN_TMPFILE "$HOME/.config/nnn/.lastd"
end
# Unmask ^Q (, ^V etc.) (if required, see `stty -a`) to Quit nnn
# stty start undef
# stty stop undef
# stty lwrap undef
# stty lnext undef
nnn $argv
if test -e $NNN_TMPFILE
source $NNN_TMPFILE
rm $NNN_TMPFILE
end
end
function n2 -d "Start nnn in dual pane (tmux)"
tmux new-session -d -s nnn -n nnn "nnn -Hc"
tmux split-window -h "nnn -Hc"
TERM=screen-256color command tmux attach -t nnn:nnn
end
end
# Lazy cd-ing
function .. ; cd .. ; end

View File

@ -0,0 +1,49 @@
# -------------- Nord ----------------- #
set -g fish_color_autosuggestion 4c566a
set -g fish_color_cancel -r
set -g fish_color_command 81a1c1
set -g fish_color_comment 434c5e
set -g fish_color_cwd green
set -g fish_color_cwd_root red
set -g fish_color_end 88c0d0
set -g fish_color_error ebcb8b
set -g fish_color_escape 00a6b2
set -g fish_color_history_current --bold
set -g fish_color_host normal
set -g fish_color_host_remote yellow
set -g fish_color_match --background=brblue
set -g fish_color_normal normal
set -g fish_color_operator 00a6b2
set -g fish_color_param eceff4
set -g fish_color_quote a3be8c
set -g fish_color_redirection b48ead
set -g fish_color_search_match 'bryellow' '--background=brblack'
set -g fish_color_selection 'white' '--bold' '--background=brblack'
set -g fish_color_status red
set -g fish_color_user brgreen
set -g fish_color_valid_path --underline
# -------------- OneDark ----------------- #
# set -g fish_color_autosuggestion 4b5263
# set -g fish_color_cancel -r
# set -g fish_color_command 61afef
# set -g fish_color_comment 3e4452
# set -g fish_color_cwd green
# set -g fish_color_cwd_root red
# set -g fish_color_end 56b6c2
# set -g fish_color_error e5c07b
# set -g fish_color_escape 00a6b2
# set -g fish_color_history_current --bold
# set -g fish_color_host normal
# set -g fish_color_host_remote yellow
# set -g fish_color_match --background=brblue
# set -g fish_color_normal normal
# set -g fish_color_operator 00a6b2
# set -g fish_color_param dfdfdf
# set -g fish_color_quote 98c379
# set -g fish_color_redirection c678dd
# set -g fish_color_search_match 'bryellow' '--background=brblack'
# set -g fish_color_selection 'white' '--bold' '--background=brblack'
# set -g fish_color_status red
# set -g fish_color_user brgreen
# set -g fish_color_valid_path --underline

View File

@ -12,17 +12,19 @@ set -g fish_cursor_visual block
set -g fish_vi_force_cursor
# no greeting
set -g fish_greeting
# set -g fish_greeting
# XDG thingy
set -gx XDG_CONFIG_HOME $HOME/.config
set -gx XDG_CACHE_HOME $HOME/.cache
set -gx XDG_DATA_HOME $HOME/.local/share
set -gx XDG_DATA_DIRS $HOME/.local/share/flatpak/exports/share:/var/lib/flatpak/exports/share:/usr/local/share:/usr/share
if not command -v loginctl >/dev/null
set -gx XDG_RUNTIME_DIR /tmp/fish.$USER
end
# alternate paths
set -gx LESSHISTFILE -
set -gx MOST_INITFILE $XDG_CONFIG_HOME/mostrc
set -gx GTK2_RC_FILES $XDG_CONFIG_HOME/gtk-2.0/gtkrc
set -gx TERMINFO $XDG_DATA_HOME/terminfo
set -gx TERMINFO_DIRS $XDG_DATA_HOME/terminfo:/usr/share/terminfo
set -gx GOPATH $XDG_DATA_HOME/go
@ -45,30 +47,33 @@ set -gx JUPYTER_CONFIG_DIR $XDG_CONFIG_HOME/jupyter
set -gx XAUTHORITY $XDG_RUNTIME_DIR/Xauthority
set -gx XINITRC $XDG_CONFIG_HOME/X11/xinitrc
set -gx XSERVERRC $XDG_CONFIG_HOME/X11/xserverrc
set -gx WGETRC $XDG_CONFIG_HOME/wget/wgetrc
set -gx WEECHAT_HOME $XDG_CONFIG_HOME/weechat
set -gx RIPGREP_CONFIG_PATH $XDG_CONFIG_HOME/ripgrep/config
# env
set -gx EDITOR nvim
set -gx VISUAL nvim
set -gx PAGER less
set -gx PAGER "less -R"
set -gx SVDIR $HOME/.local/share/service
set -gx _JAVA_AWT_WM_NONREPARENTING 1
set -gx GPG_TTY (tty)
# bat
set -gx BAT_THEME "base16"
set -gx GOPROXY direct
# pfetch
set -gx PF_INFO "ascii title kernel wm shell uptime pkgs memory"
# fzf
set -gx FZF_DEFAULT_OPTS "--multi --layout=reverse --inline-info
--bind alt-j:preview-down,alt-k:preview-up
--color fg:#D8DEE9,bg:#2E3440,hl:#A3BE8C,fg+:#D8DEE9,bg+:#434C5E,hl+:#A3BE8C
--color pointer:#BF616A,info:#4C566A,spinner:#4C566A,header:#4C566A,prompt:#81A1C1,marker:#EBCB8B"
# set -gx FZF_DEFAULT_OPTS "--multi --layout=reverse --inline-info
# --color dark
# --bind alt-j:preview-down,alt-k:preview-up
# --color fg:-1,bg:-1,hl:#c678dd,fg+:#ffffff,bg+:#4b5263,hl+:#d858fe
# --color info:#98c379,prompt:#61afef,pointer:#be5046,marker:#e5c07b,spinner:#61afef,header:#61afef"
set -gx FZF_DEFAULT_COMMAND "fd --type f --follow --hidden --exclude .git"
set -gx FZF_CTRL_T_OPTS "--no-height --preview-window 'left:60%' --preview '$HOME/.local/bin/garbage/preview {} 2>/dev/null'"
set -gx FZF_CTRL_T_COMMAND "fd --follow --hidden --exclude .git"
set -gx FZF_ALT_C_OPTS "--preview 'tree -La 1 -C --dirsfirst {} 2>/dev/null'"
set -gx FZF_CTRL_T_COMMAND "fd . \$dir --follow --hidden --exclude .git"
set -gx FZF_ALT_C_OPTS "--preview 'exa -1a --sort=type --color always --icons {} 2>/dev/null'"
set -gx FZF_ALT_C_COMMAND "fd --type d --follow --hidden --exclude .git"
set -gx FZF_TMUX 1
# ibus
@ -86,25 +91,38 @@ set -gx NODENV_ROOT $XDG_DATA_HOME/nodenv
set -gx PYENV_ROOT $XDG_DATA_HOME/pyenv
# poetry
set -gx POETRY_HOME $XDG_DATA_HOME/poetry
# z.lua
set -gx _ZL_DATA $HOME/.local/share/zlua/zlua
set -gx _ZL_HYPHEN 1
set -gx _ZL_MATCH_MODE 1
set -gx _ZL_FZF_FLAG '-e'
set -gx _ZL_INT_SORT 1
set -gx _ZL_ROOT_MARKERS ".git,.svn,.hg,.root,package.json,.projectile,.pro"
set -gx RANGER_ZLUA $HOME/.config/fish/z.lua
# zoxide
set -gx _ZO_DATA_DIR $HOME/.local/share/zoxide
set -gx _ZO_ECHO 1
set -gx _ZO_FZF_OPTS "$FZF_DEFAULT_OPTS --no-multi"
set -gx _ZO_RESOLVE_SYMLINKS 1
# forgit
if test -n "$XDG_SESSION_TYPE"
if test $XDG_SESSION_TYPE = "wayland"
set -gx FORGIT_COPY_CMD wl-copy
else
if command -v xclip >/dev/null
set -gx FORGIT_COPY_CMD "xclip -selection clipboard"
else
set -gx FORGIT_COPY_CMD "xsel -i -b"
end
end
end
# cht.sh
set -gx CHTSH "$XDG_CONFIG_HOME/cht.sh"
# nnn
if command -v nnn >/dev/null
set -gx TERMINAL alacritty
set -gx NNN_PLUG 't:preview-tui;m:nmount;f:fzcd;c:chksum;n:nuke;z:fzz;b:bulknew;d:dups:h:hexview;o:organize;p:pdfview;s:suedit'
set -gx NNN_OPTS HUedx
set -gx NNN_PLUG 'b:bulknew;c:fzcd;o:fzopen;z:fzz;d:gpgd;e:gpge;h:hexview;m:nmount;n:nuke;t:preview-tui;r:renamer;p:rsynccp;j:splitjoin;s:suedit;i:ringtone'
set -gx NNN_FIFO /tmp/nnn.fifo
set -gx NNN_ARCHIVE '\\.(7z|a|ace|alz|arc|arj|bz|bz2|cab|cpio|deb|gz|jar|lha|lz|lzh|lzma|lzo|rar|rpm|rz|t7z|tar|tbz|tbz2|tgz|tlz|txz|tZ|tzo|war|xpi|xz|Z|zip)$'
set -gx NNN_OPENER $XDG_CONFIG_HOME/nnn/plugins/nuke
# set -gx NNN_OPENER $XDG_CONFIG_HOME/nnn/plugins/nuke
# set -gx NNN_TRASH=1
set -gx USE_SCOPE 1
set -gx NNN_FCOLORS 'c1e2272e006033f7c6d6abc4'
set -gx NNN_FCOLORS 'c1e20402006006f7c6d6ab01'
set -gx NNN_COLORS '2345'
set -gx NNN_BMS "h:~;C:~/Code;D:~/Downloads;P:~/Pictures;V:~/Videos;A:~/Media;U:~/Music;f:~/.config;l:~/.local/share;e:/etc;u:/usr/share;o:/opt;b:/boot;m:/media;M:/mnt;i:/run/media/$USER;v:/var;t:/tmp;d:/dev;s:/srv;r:/;k:/bedrock/strata"
set -gx NNN_BMS "h:~;C:~/Code;D:~/Downloads;P:~/Pictures;V:~/Videos;A:~/Media;U:~/Music;f:~/.config;l:~/.local/share;e:/etc;u:/usr/share;o:/opt;b:/boot;m:/media;M:/mnt;i:/run/media/$USER;v:/var;t:/tmp;d:/dev;s:/srv;r:/"
set -gx NNN_SSHFS "sshfs -o reconnect,idmap=user,follow_symlinks"
end
# lf

View File

@ -1,7 +1,7 @@
# Github cli completion
if command -v gh > /dev/null; and not test -f $HOME/.config/fish/completions/gh.fish
gh completion -s fish > $HOME/.config/fish/completions/gh.fish
end
# if command -v gh > /dev/null; and not test -f $HOME/.config/fish/completions/gh.fish
# gh completion -s fish > $HOME/.config/fish/completions/gh.fish
# end
# kitten from kitty
if command -v kitty > /dev/null
@ -15,7 +15,8 @@ end
# direnv
if command -v direnv > /dev/null
eval (direnv hook fish)
direnv hook fish | source
# set -g direnv_fish_mode eval_after_arrow
end
# poetry
@ -32,6 +33,7 @@ end
# git clone https://github.com/pyenv/pyenv-update.git $PYENV_ROOT/plugins/pyenv-update
# git clone https://github.com/pyenv/pyenv-virtualenv.git $PYENV_ROOT/plugins/pyenv-virtualenv
# end
# status is-login; and pyenv init --path | source
# pyenv init - | source
# pyenv virtualenv-init - | source
@ -54,13 +56,11 @@ fish_vi_key_bindings
# fzf
if not test -f "$HOME/.config/fish/functions/fzf_key_bindings.fish"
curl -sfLo $HOME/.config/fish/functions/fzf_key_bindings.fish https://raw.githubusercontent.com/junegunn/fzf/master/shell/key-bindings.fish
curl -fLo $HOME/.config/fish/functions/fzf_key_bindings.fish https://raw.githubusercontent.com/junegunn/fzf/master/shell/key-bindings.fish
end
fzf_key_bindings
# z.lua
if not test -f "$HOME/.config/fish/z.lua"
curl -sfLo $HOME/.config/fish/z.lua https://raw.githubusercontent.com/skywind3000/z.lua/master/z.lua
mkdir -p $HOME/.local/share/zlua
# zoxide
if command -v zoxide >/dev/null
zoxide init fish | source
end
lua $HOME/.config/fish/z.lua --init fish | source

View File

@ -0,0 +1 @@
umask 0027

View File

@ -1,9 +1,6 @@
jorgebucaran/fisher
jorgebucaran/spark.fish
oakninja/MakeMeFish
jorgebucaran/bax.fish
laughedelic/pisces
jorgebucaran/replay.fish
jorgebucaran/autopair.fish
wfxr/forgit
oh-my-fish/plugin-wttr
jorgebucaran/gitio.fish
oh-my-fish/plugin-license

View File

@ -1,86 +0,0 @@
function extract -d "Extract archives"
set -l remove_archive
set -l success
set -l extract_dir
if test -z "$argv[1]"
echo -e "\e[1;34mUsage:\e[0m extract [-option] [file...]
\e[1;33mOptions:\e[0m
-r, --remove Remove archive after unpacking."
end
set remove_archive 1
if [ "$argv[1]" = "-r" ] || [ "$argv[1]" = "--remove" ]
set remove_archive 0
set --erase argv[1]
end
while test -n "$argv[1]"
if not test -f "$argv[1]"
echo "extract: '$argv[1]' is not a valid file" >&2
set --erase argv[1]
continue
end
set success 0
set extract_dir (echo "$argv[1]" | cut -d'.' -f1)
switch "$argv[1]"
case "*.tar.gz" or "*.tgz"
tar zxvf "$argv[1]"
case "*.tar.bz2" or "*.tbz" or "*.tbz2"
tar xvjf "$argv[1]"
case "*.tar.xz" or "*.txz"
tar --xz -xvf "$argv[1]"; or xzcat "$argv[1]" | tar xvf -
case "*.tar.zma" or "*.tlz"
tar --lzma -xvf "$argv[1]"; or lzcat "$argv[1]" | tar xvf -
case "*.tar.zst" or "*.tzst"
tar --zstd -xvf "$argv[1]"; or zstdcat "$argv[1]" | tar xvf -
case "*.tar" or "*.tar.lz"
tar xvf "$argv[1]"
case "*.tar.lz4"
lz4 -c -d "$argv[1]" | tar xvf -
case "*.tar.lrz"
lrzuntar "$argv[1]"
case "*.gz"
gunzip -d "$argv[1]"
case "*.bz2"
bunzip2 "$argv[1]"
case "*.xz"
unxz "$argv[1]"
case "*.lrz"
lrunzip "$argv[1]"
case "*.lz4"
lz4 -d "$argv[1]"
case "*.lzma"
unlzma "$argv[1]"
case "*.z"
uncompress "$argv[1]"
case "*.zip" or "*.war" or "*.jar" or "*.sublime-package" or "*.ipa" or "*.ipsw" or "*.xpi" or "*.apk" or "*.aar" or "*.whl"
unzip "$argv[1]" -d "$extract_dir"
case "*.rar"
unrar x -ad "$argv[1]"
case "*.rpm"
mkdir "$extract_dir"; and cd "$extract_dir"; and rpm2cpio "../$argv[1]" | cpio --quiet -id; and cd ..
case "*.7z"
7za x "$argv[1]"
case "*.deb"
mkdir -p "$extract_dir/control"
mkdir -p "$extract_dir/data"
cd "$extract_dir"; ar vx "../$argv[1]" > /dev/null
cd control; tar xzvf ../control.tar.gz
cd ../data; extract ../data.tar.*
cd ..; rm *.tar.* debian-binary
cd ..
case "*.zst"
unzstd "$argv[1]"
case "*"
echo "extract: '$argv[1]' cannot be extracted" >&2
set success 1
end
if [ "$success" = 0 ] && [ "$remove_archive" = 0 ]
rm "$argv[1]"
end
set --erase argv[1]
end
end

View File

@ -1,206 +1,209 @@
set -g fisher_version 4.1.0
function fisher -a cmd -d "fish plugin manager"
set -q fisher_path || set -l fisher_path $__fish_config_dir
set -l fish_plugins $__fish_config_dir/fish_plugins
function fisher --argument-names cmd --description "A plugin manager for Fish"
set --query fisher_path || set --local fisher_path $__fish_config_dir
set --local fisher_version 4.3.0
set --local fish_plugins $__fish_config_dir/fish_plugins
switch "$cmd"
case -v --version
echo "fisher, version $fisher_version"
case "" -h --help
echo "usage: fisher install <plugins...> install plugins"
echo " fisher remove <plugins...> remove installed plugins"
echo " fisher update <plugins...> update installed plugins"
echo " fisher update update all installed plugins"
echo " fisher list [<regex>] list installed plugins matching regex"
echo "options:"
echo " -v or --version print fisher version"
echo " -h or --help print this help message"
echo "Usage: fisher install <plugins...> Install plugins"
echo " fisher remove <plugins...> Remove installed plugins"
echo " fisher update <plugins...> Update installed plugins"
echo " fisher update Update all installed plugins"
echo " fisher list [<regex>] List installed plugins matching regex"
echo "Options:"
echo " -v or --version Print version"
echo " -h or --help Print this help message"
case ls list
string match --entire --regex -- "$argv[2]" $_fisher_plugins
case install update remove
isatty || read -laz stdin && set -a argv $stdin
set -l install_plugins
set -l update_plugins
set -l remove_plugins
set -l arg_plugins $argv[2..-1]
set -l old_plugins $_fisher_plugins
set -l new_plugins
isatty || read --local --null --array stdin && set --append argv $stdin
if not set -q argv[2]
if test "$cmd" != update || test ! -e $fish_plugins
echo "fisher: not enough arguments for command: \"$cmd\"" >&2 && return 1
set --local install_plugins
set --local update_plugins
set --local remove_plugins
set --local arg_plugins $argv[2..-1]
set --local old_plugins $_fisher_plugins
set --local new_plugins
if ! set --query argv[2]
if test "$cmd" != update
echo "fisher: Not enough arguments for command: \"$cmd\"" >&2 && return 1
else if test ! -e $fish_plugins
echo "fisher: \"$fish_plugins\" file not found: \"$cmd\"" >&2 && return 1
end
set arg_plugins (string trim <$fish_plugins)
set arg_plugins (string match --regex -- '^[^\s]+$' <$fish_plugins)
end
for plugin in $arg_plugins
test -e "$plugin" && set plugin (realpath $plugin)
contains -- "$plugin" $new_plugins || set -a new_plugins $plugin
contains -- "$plugin" $new_plugins || set --append new_plugins $plugin
end
if set -q argv[2]
if set --query argv[2]
for plugin in $new_plugins
if contains -- "$plugin" $old_plugins
if test "$cmd" = remove
set -a remove_plugins $plugin
else
set -a update_plugins $plugin
end
else if test "$cmd" != install
echo "fisher: plugin not installed: \"$plugin\"" >&2 && return 1
test "$cmd" = remove &&
set --append remove_plugins $plugin ||
set --append update_plugins $plugin
else if test "$cmd" = install
set --append install_plugins $plugin
else
set -a install_plugins $plugin
echo "fisher: Plugin not installed: \"$plugin\"" >&2 && return 1
end
end
else
for plugin in $new_plugins
if contains -- "$plugin" $old_plugins
set -a update_plugins $plugin
else
set -a install_plugins $plugin
end
contains -- "$plugin" $old_plugins &&
set --append update_plugins $plugin ||
set --append install_plugins $plugin
end
for plugin in $old_plugins
if not contains -- "$plugin" $new_plugins
set -a remove_plugins $plugin
end
contains -- "$plugin" $new_plugins || set --append remove_plugins $plugin
end
end
set -l pid_list
set -l source_plugins
set -l fetch_plugins $update_plugins $install_plugins
echo -e "\x1b[1mfisher $cmd version $fisher_version\x1b[22m"
set --local pid_list
set --local source_plugins
set --local fetch_plugins $update_plugins $install_plugins
echo (set_color --bold)fisher $cmd version $fisher_version(set_color normal)
for plugin in $fetch_plugins
set -l source (command mktemp -d)
set -a source_plugins $source
set --local source (command mktemp -d)
set --append source_plugins $source
command mkdir -p $source/{completions,conf.d,functions}
fish -c "
if test -e $plugin
command cp -Rf $plugin/* $source
else
set temp (command mktemp -d)
set name (string split \@ $plugin) || set name[2] HEAD
set url https://codeload.github.com/\$name[1]/tar.gz/\$name[2]
set -q fisher_user_api_token && set opts -u $fisher_user_api_token
echo -e \"fetching \x1b[4m\$url\x1b[24m\"
if command curl $opts -Ss -w \"\" \$url 2>&1 | command tar -xzf- -C \$temp 2>/dev/null
command cp -Rf \$temp/*/* $source
fish --command "
if test -e $plugin
command cp -Rf $plugin/* $source
else
echo fisher: invalid plugin name or host unavailable: \\\"$plugin\\\" >&2
command rm -rf $source
set temp (command mktemp -d)
set name (string split \@ $plugin) || set name[2] HEAD
set url https://codeload.github.com/\$name[1]/tar.gz/\$name[2]
echo Fetching (set_color --underline)\$url(set_color normal)
if curl --silent \$url | tar -xzC \$temp -f - 2>/dev/null
command cp -Rf \$temp/*/* $source
else
echo fisher: Invalid plugin name or host unavailable: \\\"$plugin\\\" >&2
command rm -rf $source
end
command rm -rf \$temp
end
command rm -rf \$temp
end
test ! -e $source && exit
command mv -f (string match --entire --regex -- \.fish\\\$ $source/*) $source/functions 2>/dev/null" &
set files $source/* && string match --quiet --regex -- .+\.fish\\\$ \$files
" &
set -a pid_list (jobs --last --pid)
set --append pid_list (jobs --last --pid)
end
wait $pid_list 2>/dev/null
for plugin in $fetch_plugins
if set -l source $source_plugins[(contains --index -- "$plugin" $fetch_plugins)] && test ! -e $source
if set -l index (contains --index -- "$plugin" $install_plugins)
set -e install_plugins[$index]
if set --local source $source_plugins[(contains --index -- "$plugin" $fetch_plugins)] && test ! -e $source
if set --local index (contains --index -- "$plugin" $install_plugins)
set --erase install_plugins[$index]
else
set -e update_plugins[(contains --index -- "$plugin" $update_plugins)]
set --erase update_plugins[(contains --index -- "$plugin" $update_plugins)]
end
end
end
for plugin in $update_plugins $remove_plugins
if set -l index (contains --index -- "$plugin" $_fisher_plugins)
set -l plugin_files_var _fisher_(string escape --style=var $plugin)_files
if set --local index (contains --index -- "$plugin" $_fisher_plugins)
set --local plugin_files_var _fisher_(string escape --style=var -- $plugin)_files
if contains -- "$plugin" $remove_plugins && set --erase _fisher_plugins[$index]
for file in (string match --entire --regex -- "conf\.d/" $$plugin_files_var)
emit (string replace --all --regex -- '^.*/|\.fish$' "" $file)_uninstall
if contains -- "$plugin" $remove_plugins
for name in (string replace --filter --regex -- '.+/conf\.d/([^/]+)\.fish$' '$1' $$plugin_files_var)
emit {$name}_uninstall
end
echo -es "removing \x1b[1m$plugin\x1b[22m" \n" "$$plugin_files_var
printf "%s\n" Removing\ (set_color red --bold)$plugin(set_color normal) " "$$plugin_files_var
end
command rm -rf $$plugin_files_var
functions --erase (string match --entire --regex -- "functions/" $$plugin_files_var \
| string replace --all --regex -- '^.*/|\.fish$' "")
functions --erase (string replace --filter --regex -- '.+/functions/([^/]+)\.fish$' '$1' $$plugin_files_var)
for name in (string replace --filter --regex -- '.+/completions/([^/]+)\.fish$' '$1' $$plugin_files_var)
complete --erase --command $name
end
set --erase _fisher_plugins[$index]
set --erase $plugin_files_var
end
end
if set -q update_plugins[1] || set -q install_plugins[1]
if set --query update_plugins[1] || set --query install_plugins[1]
command mkdir -p $fisher_path/{functions,conf.d,completions}
end
for plugin in $update_plugins $install_plugins
set -l source $source_plugins[(contains --index -- "$plugin" $fetch_plugins)]
set -l files $source/{functions,conf.d,completions}/*
set -l plugin_files_var _fisher_(string escape --style=var $plugin)_files
set -q files[1] && set -U $plugin_files_var (string replace $source $fisher_path $files)
set --local source $source_plugins[(contains --index -- "$plugin" $fetch_plugins)]
set --local files $source/{functions,conf.d,completions}/*
for file in (string replace -- $source "" $files)
if set --local index (contains --index -- $plugin $install_plugins)
set --local user_files $fisher_path/{functions,conf.d,completions}/*
set --local conflict_files
for file in (string replace -- $source/ $fisher_path/ $files)
contains -- $file $user_files && set --append conflict_files $file
end
if set --query conflict_files[1] && set --erase install_plugins[$index]
echo -s "fisher: Cannot install \"$plugin\": please remove or move conflicting files first:" \n" "$conflict_files >&2
continue
end
end
for file in (string replace -- $source/ "" $files)
command cp -Rf $source/$file $fisher_path/$file
end
contains -- $plugin $_fisher_plugins || set -Ua _fisher_plugins $plugin
contains -- $plugin $install_plugins && set -l event "install" || set -l event "update"
echo -es "installing \x1b[1m$plugin\x1b[22m" \n" "$$plugin_files_var
set --local plugin_files_var _fisher_(string escape --style=var -- $plugin)_files
set --query files[1] && set --universal $plugin_files_var (string replace -- $source $fisher_path $files)
for file in (string match --entire --regex -- "[functions/|conf\.d/].*fish\$" $$plugin_files_var)
contains -- $plugin $_fisher_plugins || set --universal --append _fisher_plugins $plugin
contains -- $plugin $install_plugins && set --local event install || set --local event update
printf "%s\n" Installing\ (set_color --bold)$plugin(set_color normal) " "$$plugin_files_var
for file in (string match --regex -- '.+/[^/]+\.fish$' $$plugin_files_var)
source $file
if string match --quiet --regex -- "conf\.d/" $file
emit (string replace --all --regex -- '^.*/|\.fish$' "" $file)_$event
if set --local name (string replace --regex -- '.+conf\.d/([^/]+)\.fish$' '$1' $file)
emit {$name}_$event
end
end
end
command rm -rf $source_plugins
functions -q fish_prompt || source $__fish_data_dir/functions/fish_prompt.fish
set -q _fisher_plugins[1] || set -e _fisher_plugins
set -q _fisher_plugins && printf "%s\n" $_fisher_plugins >$fish_plugins || command rm -f $fish_plugins
set --query _fisher_plugins[1] || set --erase _fisher_plugins
set --query _fisher_plugins &&
printf "%s\n" $_fisher_plugins >$fish_plugins ||
command rm -f $fish_plugins
set -l total (count $install_plugins) (count $update_plugins) (count $remove_plugins)
set --local total (count $install_plugins) (count $update_plugins) (count $remove_plugins)
test "$total" != "0 0 0" && echo (string join ", " (
test $total[1] = 0 || echo "installed $total[1]") (
test $total[2] = 0 || echo "updated $total[2]") (
test $total[3] = 0 || echo "removed $total[3]")
) "plugin/s"
test $total[1] = 0 || echo "Installed $total[1]") (
test $total[2] = 0 || echo "Updated $total[2]") (
test $total[3] = 0 || echo "Removed $total[3]")
) plugin/s
case \*
echo "fisher: unknown flag or command: \"$cmd\" (see `fisher -h`)" >&2 && return 1
echo "fisher: Unknown command: \"$cmd\"" >&2 && return 1
end
end
## Migrations ##
if functions -q _fisher_self_update || test -e $__fish_config_dir/fishfile # 3.x
function _fisher_migrate
function _fisher_complete
fisher install jorgebucaran/fisher >/dev/null 2>/dev/null
functions --erase _fisher_complete
end
set -q XDG_DATA_HOME || set XDG_DATA_HOME ~/.local/share
set -q XDG_CACHE_HOME || set XDG_CACHE_HOME ~/.cache
set -q XDG_CONFIG_HOME || set XDG_CONFIG_HOME ~/.config
set -q fisher_path || set fisher_path $__fish_config_dir
test -e $__fish_config_dir/fishfile && command awk '/#|^gitlab|^ *$/ { next } $0' <$__fish_config_dir/fishfile >>$__fish_config_dir/fish_plugins
command rm -rf $__fish_config_dir/fishfile $fisher_path/{conf.d,completions}/fisher.fish {$XDG_DATA_HOME,$XDG_CACHE_HOME,$XDG_CONFIG_HOME}/fisher
functions --erase _fisher_migrate _fisher_copy_user_key_bindings _fisher_ls _fisher_fmt _fisher_self_update _fisher_self_uninstall _fisher_commit _fisher_parse _fisher_fetch _fisher_add _fisher_rm _fisher_jobs _fisher_now _fisher_help
fisher update
function _fisher_fish_postexec --on-event fish_postexec
if functions --query _fisher_list
fisher update >/dev/null 2>/dev/null
set --query XDG_DATA_HOME || set --local XDG_DATA_HOME ~/.local/share
test -e $XDG_DATA_HOME/fisher && command rm -rf $XDG_DATA_HOME/fisher
functions --erase _fisher_list _fisher_plugin_parse
set --erase fisher_data
end
echo "upgrading to fisher $fisher_version -- learn more at" (set_color --bold --underline)"https://git.io/fisher-4"(set_color normal)
_fisher_migrate >/dev/null 2>/dev/null
else if functions -q _fisher_list # 4.0
set -q XDG_DATA_HOME || set -l XDG_DATA_HOME ~/.local/share
test -e $XDG_DATA_HOME/fisher && command rm -rf $XDG_DATA_HOME/fisher
functions --erase _fisher_list _fisher_plugin_parse
echo -n "upgrading to fisher $fisher_version new in-memory state.."
fisher update >/dev/null 2>/dev/null
echo -ne "done\r\n"
end
functions --erase _fisher_fish_postexec
end

View File

@ -1,4 +1,10 @@
function man -d "man with colors"
if test -d $HOME/.local/share/man
set -x MANPATH "$HOME/.local/share/man:$__fish_data_dir/man:$MANPATH"
else
set -x MANPATH "$__fish_data_dir/man:$MANPATH"
end
set -x LESS_TERMCAP_mb (printf "\e[01;31m") # begin blink
set -x LESS_TERMCAP_md (printf "\e[01;36m") # begin bold
set -x LESS_TERMCAP_me (printf "\e[0m") # reset bold/blink

View File

@ -1,36 +0,0 @@
# Rename this file to match the name of the function
# e.g. ~/.config/fish/functions/n.fish
# or, add the lines to the 'config.fish' file.
function n --wraps nnn --description 'support nnn quit and change directory'
# Block nesting of nnn in subshells
if test -n "$NNNLVL"
if [ (expr $NNNLVL + 0) -ge 1 ]
echo "nnn is already running"
return
end
end
# The default behaviour is to cd on quit (nnn checks if NNN_TMPFILE is set)
# To cd on quit only on ^G, remove the "-x" as in:
# set NNN_TMPFILE "$XDG_CONFIG_HOME/nnn/.lastd"
# NOTE: NNN_TMPFILE is fixed, should not be modified
if test -n "$XDG_CONFIG_HOME"
set -x NNN_TMPFILE "$XDG_CONFIG_HOME/nnn/.lastd"
else
set -x NNN_TMPFILE "$HOME/.config/nnn/.lastd"
end
# Unmask ^Q (, ^V etc.) (if required, see `stty -a`) to Quit nnn
# stty start undef
# stty stop undef
# stty lwrap undef
# stty lnext undef
nnn $argv
if test -e $NNN_TMPFILE
source $NNN_TMPFILE
rm $NNN_TMPFILE
end
end

View File

@ -1,5 +0,0 @@
function n2 -d "Start nnn in dual pane (tmux)"
tmux new-session -d -s nnn -n nnn "nnn -Hc"
tmux split-window -h "nnn -Hc"
TERM=screen-256color command tmux attach -t nnn:nnn
end

View File

@ -0,0 +1,87 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<!-- Default font (no fc-match pattern) -->
<match>
<edit mode="prepend" name="family">
<string>Iosevka Aile</string>
</edit>
</match>
<!-- Default font for the ja_JP locale (no fc-match pattern) -->
<match>
<test compare="contains" name="lang">
<string>ja</string>
</test>
<edit mode="prepend" name="family">
<string>Sarasa Fixed J</string>
</edit>
</match>
<!-- Default sans-serif font -->
<match target="pattern">
<test qual="any" name="family"><string>sans-serif</string></test>
<edit name="family" mode="prepend" binding="same"><string>Iosevka Aile</string></edit>
<edit name="family" mode="append" binding="same"><string>Sarasa Fixed J</string></edit>
</match>
<!-- Default serif fonts -->
<match target="pattern">
<test qual="any" name="family"><string>serif</string></test>
<edit name="family" mode="prepend" binding="same"><string>Iosevka Etoile</string></edit>
<edit name="family" mode="append" binding="same"><string>Sarasa Fixed Slab J</string></edit>
</match>
<!-- Default monospace fonts -->
<match target="pattern">
<test qual="any" name="family"><string>monospace</string></test>
<edit name="family" mode="prepend" binding="same"><string>Iosevka</string></edit>
<edit name="family" mode="append" binding="same"><string>Sarasa Mono J</string></edit>
</match>
<!-- Fallback fonts preference order -->
<alias>
<family>sans-serif</family>
<prefer>
<family>Iosevka Aile</family>
<family>Noto Sans</family>
<family>FreeSans</family>
<family>Open Sans</family>
<family>Droid Sans</family>
<family>Ubuntu</family>
<family>Roboto</family>
<family>Sarasa Fixed J</family>
<family>NotoSansCJK</family>
<family>Source Han Sans JP</family>
<family>IPAPGothic</family>
<family>VL PGothic</family>
<family>Koruri</family>
</prefer>
</alias>
<alias>
<family>serif</family>
<prefer>
<family>Iosevka Etoile</family>
<family>Noto Serif</family>
<family>FreeSerif</family>
<family>Droid Serif</family>
<family>Roboto Slab</family>
<family>Sarasa Fixed Slab J</family>
<family>IPAPMincho</family>
</prefer>
</alias>
<alias>
<family>monospace</family>
<prefer>
<family>Iosevka</family>
<family>Noto Sans Mono</family>
<family>FreeMono</family>
<family>Inconsolatazi4</family>
<family>Ubuntu Mono</family>
<family>Droid Sans Mono</family>
<family>Roboto Mono</family>
<family>Sarasa Mono J</family>
<family>IPAGothic</family>
</prefer>
</alias>
</fontconfig>

View File

@ -1,22 +1,40 @@
# -*- conf -*-
font=Iosevka Nerd Font:style=Regular:size=12, Sarasa Fixed J:style=Regular:size=12
font-bold=Iosevka Nerd Font:style=Bold:size=12, Sarasa Fixed J:style=Bold:size=12
font-italic=Iosevka Nerd Font:style=Italic:size=12, Sarasa Fixed J:style=Italic:size=12
font-bold-italic=Iosevka Nerd Font:style=Bold Italic:size=12, Sarasa Fixed J:style=Bold Italic:size=12
# shell=$SHELL (if set, otherwise user's default shell from /etc/passwd)
# term=foot (or xterm-256color if built with -Dterminfo=disabled)
# login-shell=no
font=Iosevka Nerd Font:style=Regular:size=12, Sarasa Mono J:style=Regular:size=12
font-bold=Iosevka Nerd Font:style=Bold:size=12, Sarasa Mono J:style=Bold:size=12
font-italic=Iosevka Nerd Font:style=Italic:size=12, Sarasa Mono J:style=Italic:size=12
font-bold-italic=Iosevka Nerd Font:style=Bold Italic:size=12, Sarasa Mono J:style=Bold Italic:size=12
# line-height=<font metrics>
# letter-spacing=0
# horizontal-letter-offset=0
# vertical-letter-offset=0
# underline-offset=<font metrics>
# box-drawings-uses-font-glyphs=no
dpi-aware=no
initial-window-size-pixels=800x600 # Or,
# initial-window-size-chars=<COLSxROWS>
# initial-window-mode=windowed
# pad=2x2
# shell=$SHELL (if set, otherwise user's default shell from /etc/passwd)
# term=foot
# login-shell=no
# workers=<number of logical CPUs>
# pad=2x2 # optionally append 'center'
# resize-delay-ms=100
# notify=notify-send -a foot -i foot ${title} ${body}
# bold-text-in-bright=no
# bell=none
# word-delimiters=,│`|:"'()[]{}<>
# notify=notify-send -a foot -i foot ${title} ${body}
# selection-target=primary
# workers=<number of logical CPUs>
[bell]
# urgent=no
# notify=no
# command=
# command-focused=no
[scrollback]
lines=10000
@ -24,11 +42,19 @@ lines=10000
# indicator-position=relative
# indicator-format=
[url]
# launch=xdg-open ${url}
# label-letters=sadfjklewcmpgh
# osc8-underline=url-mode
# protocols = http, https, ftp, ftps, file, gemini, gopher
[cursor]
# style=block
color=2e3440 d8dee9
# color=282c34 bbc2cf
# blink=no
beam-thickness=1.0
# underline-thickness=<font underline thickness>
[mouse]
hide-when-typing=yes
@ -36,8 +62,6 @@ hide-when-typing=yes
[colors]
alpha=1.0
# selection-foreground=<inverse foreground/background>
# selection-background=<inverse foreground/background>
# --- Nord --- #
foreground=d8dee9
background=2e3440
@ -77,14 +101,20 @@ bright7=eceff4 # bright white
# bright6=56b6c2 # bright cyan
# bright7=bbc2cf # bright white
# selection-foreground=<inverse foreground/background>
# selection-background=<inverse foreground/background>
# jump-labels=<regular0> <regular3>
# urls=<regular3>
[csd]
# preferred=server
# size=26
# color=<foreground color>
# button-width=26
# button-minimize-color=ff0000ff
# button-maximize-color=ff00ff00
# button-close-color=ffff0000
# button-color=<background color>
# button-minimize-color=<regular4>
# button-maximize-color=<regular2>
# button-close-color=<regular1>
[key-bindings]
# scrollback-up-page=Shift+Page_Up
@ -104,19 +134,21 @@ bright7=eceff4 # bright white
# minimize=none
# maximize=none
fullscreen=F11
pipe-visible=[sh -c "xurls | wofi -d -i | xargs -r qutebrowser"] none
pipe-scrollback=[sh -c "xurls | wofi -d -i | xargs -r qutebrowser"] none
# pipe-selected=[xargs -r qutebrowser] none
pipe-visible=[sh -c "xurls | wofi -d -i | xargs -r firefox"] none
pipe-scrollback=[sh -c "xurls | wofi -d -i | xargs -r firefox"] none
pipe-selected=[xargs -r firefox] none
# show-urls-launch=Control+Shift+u
# show-urls-copy=none
[search-bindings]
# cancel=Control+g Escape
# commit=Return
# find-prev=Control+r
# find-next=Control+s
cursor-left=Left Shift+H
cursor-left-word=Control+Left Control+Shift+H
cursor-right=Right Shift+L
cursor-right-word=Control+Right Control+Shift+L
cursor-left=Left Shift+h
cursor-left-word=Control+Left Control+Shift+h
cursor-right=Right Shift+l
cursor-right-word=Control+Right Control+Shift+l
# cursor-home=Home Control+a
# cursor-end=End Control+e
# delete-prev=BackSpace
@ -128,11 +160,16 @@ delete-next-word=Control+Delete
# clipboard-paste=Control+v Control+y
# primary-paste=Shift+Insert
[url-bindings]
# cancel=Control+g Control+d Escape
# toggle-url-visible=t
[mouse-bindings]
# primary-paste=BTN_MIDDLE
# select-begin=BTN_LEFT
# select-begin-block=Control+BTN_LEFT
# select-extend=BTN_RIGHT
# select-extend-character-wise=Control+BTN_RIGHT
# select-word=BTN_LEFT-2
# select-word-whitespace=Control+BTN_LEFT-2
# select-row=BTN_LEFT-3

View File

@ -12,9 +12,9 @@
"path-restrict": "unix",
"retries": 4,
"skip": true,
"user-agent": "Mozilla/5.0 (Windows NT 10.0; rv:78.0) Gecko/20100101 Firefox/78.0",
"user-agent": "Mozilla/5.0 (Windows NT 10.0; rv:91.0) Gecko/20100101 Firefox/91.0",
"pixiv": {
"filename": "{id}.{extension}",
"filename": "{id}_p{num}.{extension}",
"directory": [
"Pixiv",
"{user[name]}-{user[id]}"
@ -51,7 +51,7 @@
"directory": [
"Manga",
"{manga}",
"c{chapter} - {title}"
"c{chapter}{chaper_minor} - {title}"
],
"postprocessors": [
{
@ -66,7 +66,7 @@
"directory": [
"Manga",
"{manga}",
"c{chapter} - {title}"
"c{chapter}{chaper_minor}"
],
"postprocessors": [
{
@ -77,11 +77,11 @@
}
]
},
"mangakakalot": {
"manganelo": {
"directory": [
"Manga",
"{manga}",
"c{chapter} - {title}"
"c{chapter}{chaper_minor} - {title}"
],
"postprocessors": [
{
@ -96,7 +96,7 @@
"directory": [
"Manga",
"{manga}",
"c{chapter} - {title}"
"c{chapter}{chaper_minor} - {title}"
],
"postprocessors": [
{
@ -111,37 +111,7 @@
"directory": [
"Manga",
"{manga}",
"c{chapter} - {title}"
],
"postprocessors": [
{
"name": "zip",
"compression": "store",
"extension": "cbz",
"keep-files": false
}
]
},
"mangareader": {
"directory": [
"Manga",
"{manga}",
"c{chapter} - {title}"
],
"postprocessors": [
{
"name": "zip",
"compression": "store",
"extension": "cbz",
"keep-files": false
}
]
},
"mangastream": {
"directory": [
"Manga",
"{manga}",
"c{chapter} - {title}"
"c{chapter}{chaper_minor} - {title}"
],
"postprocessors": [
{

View File

@ -38,19 +38,34 @@
smudge = git-lfs smudge -- %f
process = git-lfs filter-process
required = true
[pull]
rebase = true
[fetch]
prune = true
[init]
defaultBranch = main
[rebase]
autosquash = true
[push]
followTags = true
[submodule]
recurse = true
[help]
autocorrect = 1
[alias]
l = log --graph --pretty=format:'%C(italic)%t%Creset %C(bold)<%an>%Creset -> %C(bold)%d%Creset %C(blue)%s%Creset - %C(italic)(%cr)%Creset'
s = status -sbu
sbu = submodule update --remote --merge
unstage = reset HEAD
[url "https://github.com/"]
insteadOf = gh:
[url "https://gist.github.com/"]
insteadOf = gist:
[url "https://gitlab.com/"]
insteadOf = gl:
[url "https://git.disroot.org/"]
insteadOf = dr:
[url "https://gist.github.com/"]
insteadOf = gist:
[url "https://bitbucket.org/"]
insteadOf = bb:
[url "https://codeberg.org/"]
insteadOf = cb:
[url "https://git.sr.ht/~"]
insteadOf = sr:

44
home/.config/git/ignore Normal file
View File

@ -0,0 +1,44 @@
# Meson
/subprojects/*
!/subprojects/*.wrap
meson-logs
meson-private
meson_benchmark_setup.dat
meson_test_setup.dat
# Ninja
build.ninja
.ninja_deps
.ninja_logs
.ninja_log
# Compiled stuff
*.o
*.a
*.exe
*.class
*.elc
*.pyc
*.out
*.obj
*.so
*.so.*
*.dll
# OS files
.DS_Store?
.DS_Store
# Neovim
*.swp
.*.sw[a-z]
*.un~
.netrwhist
# Misc
compile_commands.json
*.orig
*.rej
# QtCreator
CMakeLists.txt.user

View File

@ -0,0 +1,10 @@
# style name or JSON path (default "auto")
style: "~/.config/glow/styles/nord.json"
# show local files only; no network (TUI-mode only)
local: false
# mouse support (TUI-mode only)
mouse: true
# use pager to display markdown
pager: false
# word-wrap at width
width: 80

View File

@ -0,0 +1,203 @@
{
"document": {
"block_prefix": "\n",
"block_suffix": "\n",
"color": "#d8dee9",
"margin": 2
},
"block_quote": {
"indent": 1,
"indent_token": "│ "
},
"paragraph": {},
"list": {
"level_indent": 2
},
"heading": {
"block_suffix": "\n",
"color": "#81a1c1",
"bold": true
},
"h1": {
"prefix": " ",
"suffix": " ",
"color": "#ebcb8b",
"background_color": "#5e81ac",
"bold": true
},
"h2": {
"prefix": "## "
},
"h3": {
"prefix": "### "
},
"h4": {
"prefix": "#### "
},
"h5": {
"prefix": "##### "
},
"h6": {
"prefix": "###### ",
"color": "#88c0d0",
"bold": false
},
"text": {},
"strikethrough": {
"crossed_out": true
},
"emph": {
"italic": true
},
"strong": {
"bold": true
},
"hr": {
"color": "#3b4252",
"format": "\n--------\n"
},
"item": {
"block_prefix": "• "
},
"enumeration": {
"block_prefix": ". "
},
"task": {
"ticked": "[✓] ",
"unticked": "[ ] "
},
"link": {
"color": "#8fbcbb",
"underline": true
},
"link_text": {
"color": "#a3be8c",
"bold": true
},
"image": {
"color": "#b48ead",
"underline": true
},
"image_text": {
"color": "#4c566a",
"format": "Image: {{.text}} →"
},
"code": {
"prefix": " ",
"suffix": " ",
"color": "#d08770",
"background_color": "#434c5e"
},
"code_block": {
"color": "#d8dee9",
"margin": 2,
"chroma": {
"text": {
"color": "#d8dee9"
},
"error": {
"color": "#bf616a"
},
"comment": {
"color": "#616e87",
"italic": true
},
"comment_preproc": {
"color": "#5e81ac"
},
"keyword": {
"color": "#81a1c1",
"bold": true
},
"keyword_reserved": {
"color": "#81a1c1",
"bold": false
},
"keyword_namespace": {
"color": "#81a1c1",
"bold": false
},
"keyword_type": {
"color": "#81a1c1",
"bold": false
},
"operator": {
"color": "#81a1c1"
},
"punctuation": {
"color": "#eceff4"
},
"name": {
"color": "#d8dee9"
},
"name_builtin": {
"color": "#81a1c1"
},
"name_tag": {
"color": "#81a1c1"
},
"name_attribute": {
"color": "#8fbcbb"
},
"name_class": {
"color": "#8fbcbb"
},
"name_constant": {
"color": "#8fbcbb"
},
"name_decorator": {
"color": "#d08770"
},
"name_exception": {
"color": "#bf616a"
},
"name_function": {
"color": "#88c0d0"
},
"name_other": {},
"literal": {},
"literal_number": {
"color": "#b48ead"
},
"literal_date": {},
"literal_string": {
"color": "#a3be8c"
},
"literal_string_escape": {
"color": "#ebcb8b"
},
"generic_deleted": {
"color": "#bf616a"
},
"generic_emph": {
"italic": true
},
"generic_inserted": {
"color": "#4c566a",
"bold": true
},
"generic_strong": {
"bold": true
},
"generic_subheading": {
"color": "#88c0d0",
"bold": true
},
"background": {
"background_color": "#2e3440"
}
}
},
"table": {
"center_separator": "┼",
"column_separator": "│",
"row_separator": "─"
},
"definition_list": {},
"definition_term": {},
"definition_description": {
"block_prefix": "\n🠶 "
},
"html_block": {},
"html_span": {}
}

View File

@ -0,0 +1,197 @@
{
"document": {
"block_prefix": "\n",
"block_suffix": "\n",
"color": "#abb2bf",
"margin": 2
},
"block_quote": {
"indent": 1,
"indent_token": "│ "
},
"paragraph": {},
"list": {
"level_indent": 2
},
"heading": {
"block_suffix": "\n",
"color": "#61afef",
"bold": true
},
"h1": {
"prefix": " ",
"suffix": " ",
"color": "#e5c07b",
"background_color": "#61afef",
"bold": true
},
"h2": {
"prefix": "## "
},
"h3": {
"prefix": "### "
},
"h4": {
"prefix": "#### "
},
"h5": {
"prefix": "##### "
},
"h6": {
"prefix": "###### ",
"color": "#56b6c2",
"bold": false
},
"text": {},
"strikethrough": {
"crossed_out": true
},
"emph": {
"italic": true
},
"strong": {
"bold": true
},
"hr": {
"color": "#3e4452",
"format": "\n--------\n"
},
"item": {
"block_prefix": "• "
},
"enumeration": {
"block_prefix": ". "
},
"task": {
"ticked": "[✓] ",
"unticked": "[ ] "
},
"link": {
"color": "#5699af",
"underline": true
},
"link_text": {
"color": "#98c379",
"bold": true
},
"image": {
"color": "#c678dd",
"underline": true
},
"image_text": {
"color": "#4b5263",
"format": "Image: {{.text}} →"
},
"code": {
"prefix": " ",
"suffix": " ",
"color": "#d19a66",
"background_color": "#4b5263"
},
"code_block": {
"color": "#b0c4de",
"margin": 2,
"chroma": {
"text": {
"color": "#b0c4de"
},
"error": {
"color": "#b0c4de"
},
"comment": {
"color": "#8a93a5",
"italic": true
},
"comment_preproc": {
"bold": true
},
"keyword": {
"color": "#c678dd"
},
"keyword_reserved": {},
"keyword_namespace": {
"color": "#b756ff",
"bold": true
},
"keyword_type": {
"color": "#ef8383"
},
"operator": {
"color": "#c7bf54"
},
"punctuation": {
"color": "#b0c4de"
},
"name": {
"color": "#c1abea"
},
"name_builtin": {
"color": "#ef8383"
},
"name_tag": {
"color": "#e06c75"
},
"name_attribute": {
"color": "#b3d23c"
},
"name_class": {
"color": "#76a9f9"
},
"name_constant": {
"color": "#b756ff",
"bold": true
},
"name_decorator": {
"color": "#e5c07b"
},
"name_exception": {
"color": "#fd7474",
"bold": true
},
"name_function": {
"color": "#00b1f7"
},
"name_other": {},
"literal": {},
"literal_number": {
"color": "#d19a66"
},
"literal_date": {},
"literal_string": {
"color": "#98c379"
},
"literal_string_escape": {
"color": "#d26464",
"bold": true
},
"generic_deleted": {},
"generic_emph": {
"italic": true
},
"generic_inserted": {
"color": "#a6e22e"
},
"generic_strong": {
"bold": true
},
"generic_subheading": {
"color": "#a2cbff"
},
"background": {
"background_color": "#282c34"
}
}
},
"table": {
"center_separator": "┼",
"column_separator": "│",
"row_separator": "─"
},
"definition_list": {},
"definition_term": {},
"definition_description": {
"block_prefix": "\n🠶 "
},
"html_block": {},
"html_span": {}
}

View File

@ -1,9 +0,0 @@
Config {
maxHistoryLength = 1000,
historyPath = "~/.cache/greenclip/history",
staticHistoryPath = "~/.cache/greenclip/staticHistory",
imageCachePath = "/tmp/greenclip/",
usePrimarySelectionAsInput = False,
blacklistedApps = [],
trimSpaceFromSelection = True
}

View File

@ -0,0 +1,13 @@
[greenclip]
history_file = "~/.cache/greenclip.history"
max_history_length = 1000
max_selection_size_bytes = 0
trim_space_from_selection = true
use_primary_selection_as_input = false
blacklisted_applications = []
enable_image_support = true
# path without ending / will generate mktemp directory at the prefix location
image_cache_directory = "/tmp/greenclip"
staticHistory = [
'''¯\_(ツ)_/¯''',
]

View File

@ -1,5 +1,5 @@
[Settings]
gtk-theme-name=Arc-Dark
# gtk-theme-name=Matcha-dark-azul
gtk-icon-theme-name=Papirus-Dark
gtk-application-prefer-dark-theme=true
gtk-cursor-theme-name=Breeze_Snow

View File

@ -1,16 +1,18 @@
#!/bin/sh
# Theme
gsettings set org.gnome.desktop.interface gtk-theme 'Arc-Dark' &
# gsettings set org.gnome.desktop.interface gtk-theme 'Matcha-dark-azul' &
gsettings set org.gnome.desktop.interface icon-theme 'Papirus-Dark' &
gsettings set org.gnome.desktop.interface cursor-theme 'Breeze_Snow'
gsettings set org.gnome.desktop.interface cursor-size '24'
# Autostart
pipewire &
pipewire-pulse &
mpd &
start_notify &
wl-paste -t text --watch clipman store &
waybar -c ~/.config/waybar/config-generic -s ~/.config/waybar/style-generic.css &
mpDris2 &
# /usr/libexec/xdg-desktop-portal-wlr
# emacs --daemon &

View File

@ -2,7 +2,7 @@ ui {
border = 2
gap = 5
step = 50
font = "Sarasa Fixed J 12"
font = "Sarasa Mono J 12"
colorscheme {
background = 0x2E3440

View File

@ -19,7 +19,7 @@ overlay_background_alpha = c3
initial_pan = 0 0
scaling_mode = full
overlay = true
overlay_font = Sarasa Fixed J:20
overlay_font = Sarasa Mono J:20
overlay_text = [$imv_current_index/$imv_file_count] $imv_current_file [${imv_width}x${imv_height}] [$imv_scaling_mode - $imv_scale%]
[aliases]

View File

@ -1,3 +0,0 @@
eval $(starship init ion --print-full-init)
~/.local/bin/bunny

View File

@ -1,143 +0,0 @@
confirmonquit: true
git:
autofetch: false
merging:
args: ""
manualcommit: true
paging:
colorarg: always
useconfig: true
skiphookprefix: WIP
gui:
commitlength:
show: true
mouseevents: false
scrollheight: 2
scrollpastbottom: true
sidepanelwidth: 0.3333
skipstashwarning: true
skipunstagelinewarning: false
theme:
activebordercolor:
- white
- bold
inactivebordercolor:
- blue
lighttheme: false
optionstextcolor:
- yellow
selectedlinebgcolor:
- default
selectedrangebgcolor:
- green
keybinding:
branches:
checkoutbranchbyname: c
createpullrequest: o
fastforward: f
fetchremote: f
forcecheckoutbranch: F
mergeintocurrentbranch: M
pushtag: P
rebasebranch: r
setupstream: u
viewgitflowoptions: i
commitfiles:
checkoutcommitfile: c
commits:
amendtocommit: A
checkoutcommit: <space>
cherrypickcopy: c
cherrypickcopyrange: C
createfixupcommit: F
markcommitasfixup: f
movedowncommit: <c-j>
moveupcommit: <c-k>
pastecommits: v
pickcommit: p
renamecommit: r
renamecommitwitheditor: R
resetcherrypick: <c-R>
revertcommit: t
squashabovecommits: S
squashdown: s
tagcommit: T
viewresetoptions: g
files:
amendlastcommit: A
commitchanges: c
commitchangeswitheditor: C
commitchangeswithouthook: w
fetch: f
ignorefile: i
refreshfiles: r
stashallchanges: s
togglestagedall: a
viewresetoptions: D
viewstashoptions: S
main:
pickbothhunks: b
toggledragselect: v
toggledragselect-alt: V
toggleselecthunk: a
stash:
popstash: g
status:
checkforupdate: u
recentrepos: <enter>
universal:
copytoclipboard: <c-o>
createpatchoptionsmenu: <c-p>
createrebaseoptionsmenu: m
diffingmenu: <c-e>
edit: e
executecustomcommand: ':'
filteringmenu: <c-s>
gointo: <enter>
gotobottom: '>'
gototop: <
new: "n"
nextblock: <right>
nextblock-alt: l
nextitem: <down>
nextitem-alt: j
nextmatch: "n"
nextpage: .
nextscreenmode: +
nexttab: ']'
openfile: o
optionmenu: x
optionmenu-alt1: '?'
prevblock: <left>
prevblock-alt: h
previtem: <up>
previtem-alt: k
prevmatch: "N"
prevpage: ','
prevscreenmode: _
prevtab: '['
pullfiles: p
pushfiles: P
quit: q
quit-alt1: <c-c>
quitwithoutchangingdirectory: Q
redo: <c-z>
refresh: R
remove: d
return: <esc>
scrolldownmain: <pgdown>
scrolldownmain-alt1: J
scrolldownmain-alt2: <c-d>
scrollupmain: <pgup>
scrollupmain-alt1: K
scrollupmain-alt2: <c-u>
select: <space>
togglepanel: <tab>
undo: z
reporting: "off"
startuppopupversion: 1
update:
days: 14
method: never
os:
openCommand: 'sh -c "xdg-open {{filename}} >/dev/null"'

View File

@ -1,34 +1,46 @@
# Font
font_family Iosevka Nerd Font
font_size 12.0
# url handler
scrollback_lines 10000
url_color #ebcb8b
# url_color #e5c07b
url_style curly
open_url_modifiers kitty_mod
open_url_with default
url_prefixes http https file ftp
# Ring
enable_audio_bell yes
bell_on_tab yes
strip_trailing_spaces always
enable_audio_bell no
window_alert_on_bell no
bell_on_tab no
allow_remote_control yes
update_check_interval 0
term xterm-kitty
remember_window_size no
raw_minimal_borders yes
tab_title_template "{index}:{title}"
remember_window_size no
initial_window_width 640
initial_window_height 480
window_border_width 1pt
background_opacity 0.95
tab_title_template "{index}:{title}"
active_tab_foreground #2e3440
active_tab_background #d8dee9
inactive_tab_foreground #2e3440
inactive_tab_background #81a1c1
# active_tab_foreground #282c34
# active_tab_background #bbc2cf
# inactive_tab_foreground #282c34
# inactive_tab_background #61afef
background_opacity 1.0
background_image none
dim_opacity 0.65
# --- Nord --- #
cursor #d8dee9
cursor_text_color #2e3440
active_border_color #81a1c1
inactive_border_color #d8dee9
bell_border_color #bf616a
foreground #d8dee9
background #2e3440
selection_foreground #2e3440
@ -49,9 +61,15 @@ color6 #88c0d0
color14 #8fbcbb
color7 #e5e9f0
color15 #eceff4
mark1_background #b48ead
mark2_background #a3be8c
mark3_background #88c0d0
# -- OneDark -- #
# cursor #bbc2cf
# cursor_text_color #282c34
# active_border_color #61afef
# inactive_border_color #abb2bf
# bell_border_color #be5046
# foreground #abb2bf
# background #282c34
# selection_foreground #282c34
@ -72,6 +90,9 @@ color15 #eceff4
# color14 #56b6c2
# color7 #abb2bf
# color15 #bbc2cf
# mark1_background #c678dd
# mark2_background #98c379
# mark3_background #56b6c2
map shift+up move_window up
map shift+left move_window left

View File

@ -0,0 +1,173 @@
gui:
# stuff relating to the UI
scrollHeight: 2 # how many lines you scroll by
scrollPastBottom: true # enable scrolling past the bottom
sidePanelWidth: 0.3333 # number from 0 to 1
expandFocusedSidePanel: false
mainPanelSplitMode: 'flexible' # one of 'horizontal' | 'flexible' | 'vertical'
theme:
lightTheme: false # For terminals with a light background
activeBorderColor:
- white
- bold
inactiveBorderColor:
- green
optionsTextColor:
- blue
selectedLineBgColor:
- default
selectedRangeBgColor:
- blue
commitLength:
show: true
mouseEvents: true
skipUnstageLineWarning: false
skipStashWarning: true
showFileTree: false # for rendering changes files in a tree format
showRandomTip: true
showCommandLog: true
commandLogSize: 8
git:
paging:
colorArg: always
useConfig: false
merging:
# only applicable to unix users
manualCommit: false
# extra args passed to `git merge`, e.g. --no-ff
args: ''
pull:
mode: 'merge' # one of 'merge' | 'rebase' | 'ff-only'
skipHookPrefix: WIP
autoFetch: true
branchLogCmd: 'git log --graph --color=always --abbrev-commit --decorate --date=relative --pretty=medium {{branchName}} --'
allBranchesLogCmd: 'git log --graph --all --color=always --abbrev-commit --decorate --date=relative --pretty=medium'
overrideGpg: false # prevents lazygit from spawning a separate process when using GPG
disableForcePushing: false
refresher:
refreshInterval: 10 # file/submodule refresh interval in seconds
fetchInterval: 60 # re-fetch interval in seconds
update:
method: never # can be: prompt | background | never
# days: 14 # how often an update is checked for
reporting: 'off' # one of: 'on' | 'off' | 'undetermined'
confirmOnQuit: true
# determines whether hitting 'esc' will quit the application when there is nothing to cancel/close
quitOnTopLevelReturn: false
disableStartupPopups: false
notARepository: 'prompt' # one of: 'prompt' | 'create' | 'skip'
keybinding:
universal:
quit: 'q'
quit-alt1: '<c-c>' # alternative/alias of quit
return: '<esc>' # return to previous menu, will quit if there's nowhere to return
quitWithoutChangingDirectory: 'Q'
togglePanel: '<tab>' # goto the next panel
prevItem: '<up>' # go one line up
nextItem: '<down>' # go one line down
prevItem-alt: 'k' # go one line up
nextItem-alt: 'j' # go one line down
prevPage: ',' # go to next page in list
nextPage: '.' # go to previous page in list
gotoTop: '<' # go to top of list
gotoBottom: '>' # go to bottom of list
prevBlock: '<left>' # goto the previous block / panel
nextBlock: '<right>' # goto the next block / panel
prevBlock-alt: 'h' # goto the previous block / panel
nextBlock-alt: 'l' # goto the next block / panel
nextMatch: 'n'
prevMatch: 'N'
optionMenu: 'x' # show help menu
optionMenu-alt1: '?' # show help menu
select: '<space>'
goInto: '<enter>'
confirm: '<enter>'
confirm-alt1: 'y'
remove: 'd'
new: 'n'
edit: 'e'
openFile: 'o'
scrollUpMain: '<pgup>' # main panel scroll up
scrollDownMain: '<pgdown>' # main panel scroll down
scrollUpMain-alt1: 'K' # main panel scroll up
scrollDownMain-alt1: 'J' # main panel scroll down
scrollUpMain-alt2: '<c-u>' # main panel scroll up
scrollDownMain-alt2: '<c-d>' # main panel scroll down
executeCustomCommand: ':'
createRebaseOptionsMenu: 'm'
pushFiles: 'P'
pullFiles: 'p'
refresh: 'R'
createPatchOptionsMenu: '<c-p>'
nextTab: ']'
prevTab: '['
nextScreenMode: '+'
prevScreenMode: '_'
undo: 'z'
redo: '<c-z>'
filteringMenu: '<c-s>'
diffingMenu: 'W'
diffingMenu-alt: '<c-e>' # deprecated
copyToClipboard: '<c-o>'
submitEditorText: '<enter>'
appendNewline: '<tab>'
status:
checkForUpdate: 'u'
recentRepos: '<enter>'
files:
commitChanges: 'c'
commitChangesWithoutHook: 'w' # commit changes without pre-commit hook
amendLastCommit: 'A'
commitChangesWithEditor: 'C'
ignoreFile: 'i'
refreshFiles: 'r'
stashAllChanges: 's'
viewStashOptions: 'S'
toggleStagedAll: 'a' # stage/unstage all
viewResetOptions: 'D'
fetch: 'f'
toggleTreeView: '`'
branches:
createPullRequest: 'o'
checkoutBranchByName: 'c'
forceCheckoutBranch: 'F'
rebaseBranch: 'r'
mergeIntoCurrentBranch: 'M'
viewGitFlowOptions: 'i'
fastForward: 'f' # fast-forward this branch from its upstream
pushTag: 'P'
setUpstream: 'u' # set as upstream of checked-out branch
fetchRemote: 'f'
commits:
squashDown: 's'
renameCommit: 'r'
renameCommitWithEditor: 'R'
viewResetOptions: 'g'
markCommitAsFixup: 'f'
createFixupCommit: 'F' # create fixup commit for this commit
squashAboveCommits: 'S'
moveDownCommit: '<c-j>' # move commit down one
moveUpCommit: '<c-k>' # move commit up one
amendToCommit: 'A'
pickCommit: 'p' # pick commit (when mid-rebase)
revertCommit: 't'
cherryPickCopy: 'c'
cherryPickCopyRange: 'C'
pasteCommits: 'v'
tagCommit: 'T'
checkoutCommit: '<space>'
resetCherryPick: '<c-R>'
copyCommitMessageToClipboard: '<c-y>'
stash:
popStash: 'g'
commitFiles:
checkoutCommitFile: 'c'
main:
toggleDragSelect: 'v'
toggleDragSelect-alt: 'V'
toggleSelectHunk: 'a'
pickBothHunks: 'b'
submodules:
init: 'i'
update: 'u'
bulkMenu: 'b'

View File

@ -16,7 +16,7 @@ set hidden
set info 'size'
set icons
set preview
set previewer '~/.config/lf/preview 2>/dev/null'
set previewer '~/.local/bin/scope.sh 2>/dev/null'
# General
set globsearch
@ -197,9 +197,9 @@ cmd Link %{{
fi
}}
# fzf + zlua
cmd zlua ${{
sel=$(awk -F "|" '{print $1}' "$HOME/.local/share/zlua/zlua" | fzf | awk '{$1=$1};1')
# fzf + zoxide
cmd fzz ${{
sel=$(zoxide query --list | fzf --no-multi)
lf -remote "send $id cd \"$sel\""
}}
@ -229,7 +229,7 @@ map o open-with
# fzf
map <c-f> $vi $(fzf)
map <a-f> zlua
map <a-f> fzz
map f :fzf_jump
# archives

View File

@ -1,44 +0,0 @@
#!/bin/sh
case "$1" in
# First check common extensions
*.png|*.jpg|*.bmp|*.jpeg|*.gif|*.xpm|*.svg) mediainfo "$1" || exiftool "$1" || identify "$1" ;;
*.wav|*.mp3|*.flac|*.m4a|*.ape|*.ac3|*.og[agx]|*.spx|*.dsf|*.opus|*.dff|*.wma|*.wvc?) mediainfo "$1" || exiftool "$1" ;;
*.avi|*.mp4|*.wmv|*.dat|*.3gp|*.vob|*.ogv|*.mkv|*.mpe?g|*.fl[icv]|*.m2v|*.webm|*.m?ts|*.r[am]|*.qt|*.divx|*.as[fx]|*.m4v|*.mov) mediainfo "$1" || exiftool "$1" || fprobe -pretty "$1" 2>&1 ;;
*.pdf) mutool draw -F txt -i -- "$1" 1-10 || pdftotext -l 10 -nopgbrk -q -- "$1" - || exiftool "$1" ;;
*.ps) pstotext "$1" || ps2ascii "$1" ;;
*.epub|*.fb2) pandoc -s -t markdown -- "$1" ;;
*.djvu) djvutxt "$1" || exiftool "$1" ;;
# *.ttf|*.otf) otfinfo --info "$1" ;;
*.html|*.xhtml|*.htm) pandoc -s -t markdown -- "$1" || lynx -dump -- "$1" ;;
*.mkd|*.md|*.markdown) glow -s dark "$1" || mdcat "$1" ;;
*.ipynb) notedown --from notebook "$1" --to markdown | pandoc -f markdown -t plain ;;
*.torrent) dumptorrent -v "$1" || transmission-show -- "$1" ;;
*.zip|*.war|*.ear|*.oxt|*.tar|*.tgz|*.tar.gz|*.tbz2|*.tar.bz2|*.tar.txz|*.txz|*.rar|*.7z|*.ace|*.rpm|*.deb|*.xbps|*.Z|*.lzo|*.lzma|*.lha|*.cpio|*.jar|*.lz|*.lzh)
atool -l -q "$1" | tail -n +3 | awk -F' ' '{print $NF}' ;;
*.iso) isoinfo -l -i "$1" ;;
*.doc) catdoc -- "$1" ;;
*.docx) pandoc -s -t markdown -- "$1" ;;
*.odt|*.ott|*.s[xt]w|*.sxc) pandoc -s -t markdown -- "$1" || odt2txt "$1" ;;
*.xls) xls2csv -- "$1" ;;
*.xlsx) xlsx2csv -- "$1" ;;
*.ods|*.odp|*.sxw) pandoc -s -t markdown -- "$1" ;;
*.json) jq --color-output . "$1" || python -m json.tool -- "$1" ;;
# Then fallback to mimetypes
*)
mimetype=$(file --dereference --brief --mime-type -- "$1")
case "$mimetype" in
application/zip | application/x-tar | application/x-rar | application/x-7z-compressed | application/x-xz | application/x-bzip2 | application/x-gzip)
atool -l -q "$1" | tail -n +3 | awk -F' ' '{print $NF}' ;;
image/vnd.djvu)
djvutxt "$1" || exiftool "$1" ;;
image/*)
mediainfo "$1" || exiftool "$1" || identify "$1" ;;
video/*)
mediainfo "$1" || exiftool "$1" || fprobe -pretty "$1" 2>&1 ;;
text/* | */xml)
bat --style=plain --color=always "$1" ;;
*)
echo '----- File Type Classification -----' && file --dereference --brief -- "$1" ;;
esac ;;
esac

View File

@ -0,0 +1,28 @@
local style = require "core.style"
local common = require "core.common"
style.background = { common.color "#2E3440" }
style.background2 = { common.color "#3B4252" }
style.background3 = { common.color "#3B4252" }
style.text = { common.color "#D8DEE9" }
style.caret = { common.color "#D8DEE9" }
style.accent = { common.color "#88C0D0" }
style.dim = { common.color "#5E81AC" }
style.divider = { common.color "#3B4252" }
style.selection = { common.color "#434C5E" }
style.line_number = { common.color "#4C566A" }
style.line_number2 = { common.color "#D8DEE9" }
style.line_highlight = { common.color "#3B4252" }
style.scrollbar = { common.color "#4C566A" }
style.scrollbar2 = { common.color "#D8DEE9" }
style.syntax["normal"] = { common.color "#ECEFF4" }
style.syntax["symbol"] = { common.color "#D8DEE9" }
style.syntax["comment"] = { common.color "#4C566A" }
style.syntax["keyword"] = { common.color "#81A1C1" }
style.syntax["keyword2"] = { common.color "#81A1C1" }
style.syntax["number"] = { common.color "#B48EAD" }
style.syntax["literal"] = { common.color "#81A1C1" }
style.syntax["string"] = { common.color "#A3BE8C" }
style.syntax["operator"] = { common.color "#81A1C1" }
style.syntax["function"] = { common.color "#88C0D0" }

View File

@ -0,0 +1,29 @@
local style = require "core.style"
local common = require "core.common"
style.background = { common.color "#282c34" }
style.background2 = { common.color "#21252B" }
style.background3 = { common.color "#21252B" }
style.text = { common.color "#abb2bf" }
style.caret = { common.color "#528bff" }
style.accent = { common.color "#ffffff" }
style.dim = { common.color "#4f5873" }
style.divider = { common.color "#181A1F" }
style.selection = { common.color "#383D49" }
style.line_number = { common.color "#53576e" }
style.line_number2 = { common.color "#666B76" }
style.line_highlight = { common.color "#2C333E" }
style.scrollbar = { common.color "#353B45" }
style.scrollbar2 = { common.color "#353B45" }
style.syntax["normal"] = { common.color "#abb2bf" }
style.syntax["symbol"] = { common.color "#abb2bf" }
style.syntax["comment"] = { common.color "#5f697a" }
style.syntax["keyword"] = { common.color "#cd74e8" }
style.syntax["keyword2"] = { common.color "#eb6772" }
style.syntax["number"] = { common.color "#db9d63" }
style.syntax["literal"] = { common.color "#db9d63" }
style.syntax["string"] = { common.color "#9acc76" }
style.syntax["operator"] = { common.color "#abb2bf" }
style.syntax["function"] = { common.color "#5cb3fa" }

View File

@ -0,0 +1,60 @@
-- put user settings here
-- this module will be loaded after everything else when the application starts
-- it will be automatically reloaded when saved
local core = require "core"
local keymap = require "core.keymap"
local config = require "core.config"
local style = require "core.style"
------------------------------ Themes ----------------------------------------
core.reload_module("colors.nord")
--------------------------- Key bindings -------------------------------------
keymap.add { ["ctrl+q"] = "core:quit" }
------------------------------- Fonts ----------------------------------------
-- customize fonts:
style.font = renderer.font.load(HOME .. "/.config/lite-xl/fonts/iosevka-regular.ttf", 14 * SCALE)
style.big_font = renderer.font.load(HOME .. "/.config/lite-xl/fonts/iosevka-regular.ttf", 16 * SCALE)
style.code_font = renderer.font.load(HOME .. "/.config/lite-xl/fonts/iosevka-regular.ttf", 14 * SCALE)
style.icon_font = renderer.font.load("/usr/share/lite-xl/fonts/icons.ttf", 18 * SCALE)
style.icon_big_font = renderer.font.load("/usr/share/lite-xl/fonts/icons.ttf", 24 * SCALE)
local italic = renderer.font.load(HOME .. "/.config/lite-xl/fonts/iosevka-ss14-italic.ttf", 14 * SCALE)
style.syntax_fonts["comment"] = italic
local bolditalic = renderer.font.load(HOME .. "/.config/lite-xl/fonts/iosevka-ss14-bolditalic.ttf", 14 * SCALE)
style.syntax_fonts["keyword"] = bolditalic
style.syntax_fonts["keyword2"] = bolditalic
local bold = renderer.font.load(HOME .. "/.config/lite-xl/fonts/iosevka-ss14-bold.ttf", 14 * SCALE)
style.syntax_fonts["function"] = bold
--
-- font names used by lite:
-- style.font : user interface
-- style.big_font : big text in welcome screen
-- style.icon_font : icons
-- style.icon_big_font : toolbar icons
-- style.code_font : code
--
-- the function to load the font accept a 3rd optional argument like:
--
-- {antialiasing="grayscale", hinting="full"}
--
-- possible values are:
-- antialiasing: grayscale, subpixel
-- hinting: none, slight, full
------------------------------ Plugins ----------------------------------------
-- enable or disable plugin loading setting config entries:
-- enable trimwhitespace, otherwise it is disable by default:
-- config.trimwhitespace = true
--
-- disable detectindent, otherwise it is enabled by default
-- config.detectindent = false

View File

@ -120,8 +120,8 @@ theme.gopher_light = { bg = base06, fg = base00, link = base0D }
theme.gopher_dark = { bg = base00, fg = base06, link = base0A }
-- Font
theme.font = "13pt Sarasa Fixed J"
theme.hint_font = "12pt Sarasa Fixed J"
theme.font = "14pt Sarasa Mono J"
theme.hint_font = "12pt Sarasa Mono J"
return theme
@ -247,8 +247,8 @@ return theme
-- theme.gopher_dark = { bg = base00, fg = base06, link = base0A }
-- -- Font
-- theme.font = "13pt Sarasa Fixed J"
-- theme.hint_font = "12pt Sarasa Fixed J"
-- theme.font = "14pt Sarasa Mono J"
-- theme.hint_font = "12pt Sarasa Mono J"
-- return theme

View File

@ -6,7 +6,7 @@ settings.completion.history.order = "title"
settings.webview.default_charset = "utf-8"
settings.webview.enable_caret_browsing = true
settings.webview.enable_developer_extras = true
settings.webview.user_agent = "Mozilla/5.0 (Windows NT 10.0; rv:78.0) Gecko/20100101 Firefox/78.0"
settings.webview.user_agent = "Mozilla/5.0 (Windows NT 10.0; rv:91.0) Gecko/20100101 Firefox/91.0"
settings.window.home_page = "file:///home/follie/Code/Startpage/index.html"
local engines = settings.window.search_engines

View File

@ -1,7 +1,8 @@
font=Sarasa Fixed J 12
border-size=4
font=Sarasa Mono J 12
border-size=2
border-radius=10
margin=10,10,10
margin=20,20,10
width=300
max-visible=10
default-timeout=5000
ignore-timeout=1

View File

@ -1,10 +1,12 @@
[Default Applications]
text/html=org.qutebrowser.qutebrowser.desktop
x-scheme-handler/http=org.qutebrowser.qutebrowser.desktop
x-scheme-handler/https=org.qutebrowser.qutebrowser.desktop
x-scheme-handler/about=org.qutebrowser.qutebrowser.desktop
x-scheme-handler/unknown=org.qutebrowser.qutebrowser.desktop
text/html=firefox.desktop
x-scheme-handler/http=firefox.desktop
x-scheme-handler/https=firefox.desktop
x-scheme-handler/about=firefox.desktop
x-scheme-handler/unknown=firefox.desktop
video/*=mpv.desktop
application/pdf=org.pwmt.zathura-pdf-mupdf.desktop
[Added Associations]
video/*=mpv.desktop;
application/pdf=org.pwmt.zathura-pdf-mupdf.desktop;

View File

@ -0,0 +1,17 @@
# Low-end computer
CTRL+1 no-osd change-list glsl-shaders set "~~/shaders/Anime4K_Clamp_Highlights.glsl:~~/shaders/Anime4K_Restore_CNN_M.glsl:~~/shaders/Anime4K_Upscale_CNN_x2_M.glsl:~~/shaders/Anime4K_AutoDownscalePre_x2.glsl:~~/shaders/Anime4K_AutoDownscalePre_x4.glsl:~~/shaders/Anime4K_Upscale_CNN_x2_S.glsl"; show-text "Anime4K: Mode A (Fast)"
CTRL+2 no-osd change-list glsl-shaders set "~~/shaders/Anime4K_Clamp_Highlights.glsl:~~/shaders/Anime4K_Restore_CNN_Soft_M.glsl:~~/shaders/Anime4K_Upscale_CNN_x2_M.glsl:~~/shaders/Anime4K_AutoDownscalePre_x2.glsl:~~/shaders/Anime4K_AutoDownscalePre_x4.glsl:~~/shaders/Anime4K_Upscale_CNN_x2_S.glsl"; show-text "Anime4K: Mode B (Fast)"
CTRL+3 no-osd change-list glsl-shaders set "~~/shaders/Anime4K_Clamp_Highlights.glsl:~~/shaders/Anime4K_Upscale_Denoise_CNN_x2_M.glsl:~~/shaders/Anime4K_AutoDownscalePre_x2.glsl:~~/shaders/Anime4K_AutoDownscalePre_x4.glsl:~~/shaders/Anime4K_Upscale_CNN_x2_S.glsl"; show-text "Anime4K: Mode C (Fast)"
CTRL+4 no-osd change-list glsl-shaders set "~~/shaders/Anime4K_Clamp_Highlights.glsl:~~/shaders/Anime4K_Restore_CNN_M.glsl:~~/shaders/Anime4K_Upscale_CNN_x2_M.glsl:~~/shaders/Anime4K_Restore_CNN_S.glsl:~~/shaders/Anime4K_AutoDownscalePre_x2.glsl:~~/shaders/Anime4K_AutoDownscalePre_x4.glsl:~~/shaders/Anime4K_Upscale_CNN_x2_S.glsl"; show-text "Anime4K: Mode A+A (Fast)"
CTRL+5 no-osd change-list glsl-shaders set "~~/shaders/Anime4K_Clamp_Highlights.glsl:~~/shaders/Anime4K_Restore_CNN_Soft_M.glsl:~~/shaders/Anime4K_Upscale_CNN_x2_M.glsl:~~/shaders/Anime4K_AutoDownscalePre_x2.glsl:~~/shaders/Anime4K_AutoDownscalePre_x4.glsl:~~/shaders/Anime4K_Restore_CNN_Soft_S.glsl:~~/shaders/Anime4K_Upscale_CNN_x2_S.glsl"; show-text "Anime4K: Mode B+B (Fast)"
CTRL+6 no-osd change-list glsl-shaders set "~~/shaders/Anime4K_Clamp_Highlights.glsl:~~/shaders/Anime4K_Upscale_Denoise_CNN_x2_M.glsl:~~/shaders/Anime4K_AutoDownscalePre_x2.glsl:~~/shaders/Anime4K_AutoDownscalePre_x4.glsl:~~/shaders/Anime4K_Restore_CNN_S.glsl:~~/shaders/Anime4K_Upscale_CNN_x2_S.glsl"; show-text "Anime4K: Mode C+A (Fast)"
CTRL+0 no-osd change-list glsl-shaders clr ""; show-text "GLSL shaders cleared"
# High-end computer
# CTRL+1 no-osd change-list glsl-shaders set "~~/shaders/Anime4K_Clamp_Highlights.glsl:~~/shaders/Anime4K_Restore_CNN_VL.glsl:~~/shaders/Anime4K_Upscale_CNN_x2_VL.glsl:~~/shaders/Anime4K_AutoDownscalePre_x2.glsl:~~/shaders/Anime4K_AutoDownscalePre_x4.glsl:~~/shaders/Anime4K_Upscale_CNN_x2_M.glsl"; show-text "Anime4K: Mode A (HQ)"
# CTRL+2 no-osd change-list glsl-shaders set "~~/shaders/Anime4K_Clamp_Highlights.glsl:~~/shaders/Anime4K_Restore_CNN_Soft_VL.glsl:~~/shaders/Anime4K_Upscale_CNN_x2_VL.glsl:~~/shaders/Anime4K_AutoDownscalePre_x2.glsl:~~/shaders/Anime4K_AutoDownscalePre_x4.glsl:~~/shaders/Anime4K_Upscale_CNN_x2_M.glsl"; show-text "Anime4K: Mode B (HQ)"
# CTRL+3 no-osd change-list glsl-shaders set "~~/shaders/Anime4K_Clamp_Highlights.glsl:~~/shaders/Anime4K_Upscale_Denoise_CNN_x2_VL.glsl:~~/shaders/Anime4K_AutoDownscalePre_x2.glsl:~~/shaders/Anime4K_AutoDownscalePre_x4.glsl:~~/shaders/Anime4K_Upscale_CNN_x2_M.glsl"; show-text "Anime4K: Mode C (HQ)"
# CTRL+4 no-osd change-list glsl-shaders set "~~/shaders/Anime4K_Clamp_Highlights.glsl:~~/shaders/Anime4K_Restore_CNN_VL.glsl:~~/shaders/Anime4K_Upscale_CNN_x2_VL.glsl:~~/shaders/Anime4K_Restore_CNN_M.glsl:~~/shaders/Anime4K_AutoDownscalePre_x2.glsl:~~/shaders/Anime4K_AutoDownscalePre_x4.glsl:~~/shaders/Anime4K_Upscale_CNN_x2_M.glsl"; show-text "Anime4K: Mode A+A (HQ)"
# CTRL+5 no-osd change-list glsl-shaders set "~~/shaders/Anime4K_Clamp_Highlights.glsl:~~/shaders/Anime4K_Restore_CNN_Soft_VL.glsl:~~/shaders/Anime4K_Upscale_CNN_x2_VL.glsl:~~/shaders/Anime4K_AutoDownscalePre_x2.glsl:~~/shaders/Anime4K_AutoDownscalePre_x4.glsl:~~/shaders/Anime4K_Restore_CNN_Soft_M.glsl:~~/shaders/Anime4K_Upscale_CNN_x2_M.glsl"; show-text "Anime4K: Mode B+B (HQ)"
# CTRL+6 no-osd change-list glsl-shaders set "~~/shaders/Anime4K_Clamp_Highlights.glsl:~~/shaders/Anime4K_Upscale_Denoise_CNN_x2_VL.glsl:~~/shaders/Anime4K_AutoDownscalePre_x2.glsl:~~/shaders/Anime4K_AutoDownscalePre_x4.glsl:~~/shaders/Anime4K_Restore_CNN_M.glsl:~~/shaders/Anime4K_Upscale_CNN_x2_M.glsl"; show-text "Anime4K: Mode C+A (HQ)"
# CTRL+0 no-osd change-list glsl-shaders clr ""; show-text "GLSL shaders cleared"

12
home/.config/mpv/mpv.conf Normal file
View File

@ -0,0 +1,12 @@
sub-auto=fuzzy
sub-bold=yes
scale=ewa_lanczossharp
cscale=ewa_lanczossharp
# video-sync=display-resample
# interpolation
# tscale=oversample
profile=gpu-hq
# gpu-context=wayland
vo=gpu
hwdec=vaapi
user-agent="Mozilla/5.0 (Windows NT 10.0; rv:91.0) Gecko/20100101 Firefox/91.0"

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/bin/sh
MUSIC_DIR=$HOME/Music/
COVER=/tmp/cover.jpg
@ -13,17 +13,17 @@ fi
{
file="$(mpc --format %file% current -p 6600)"
album_dir="${file%/*}"
[[ -z "$album_dir" ]] && exit 1
if [ -z "$album_dir" ]; then exit 1; fi
album_dir="$MUSIC_DIR/$album_dir"
covers="$(find "$album_dir" -type d -exec find {} -maxdepth 1 -type f -iregex ".*/.*\(Album\|album\|Cover\|cover\|Folder\|folder\|Artwork\|artwork\|Front\|front\).*[.]\(jpe?g\|png\|gif\|bmp\)" \; )"
src="$(echo -n "$covers" 2>/dev/null | head -n1)"
src="$(echo "$covers" 2>/dev/null | tr -d '\n' | head -n1)"
rm -f "$COVER"
# For Notifications
if [[ -n "$src" ]] ; then
if [ -n "$src" ] ; then
# Resize the image's width to 64px
convert "$src" -resize 64x "$COVER"
if [[ -f "$COVER" ]] ; then
if [ -f "$COVER" ] ; then
notify-send -u low -i ${COVER} " Now Playing" "$(mpc --format '%title% \n%artist% - %album%' current)"
fi
else

View File

@ -12,9 +12,9 @@ unbind-key g
unbind-key m
unbind-key f
browser "qutebrowser %u"
macro m set browser "mpv %u" ; open-in-browser ; set browser "qutebrowser %u"
macro f set browser "firefox --new-tab %u" ; open-in-browser ; set browser "qutebrowser %u"
browser "firefox %u"
macro m set browser "mpv %u" ; open-in-browser ; set browser "firefox %u"
macro q set browser "qutebrowser %u" ; open-in-browser ; set browser "firefox %u"
bind-key , macro-prefix
bind-key j down
@ -25,6 +25,8 @@ bind-key d pagedown
bind-key u pageup
bind-key l open
bind-key h quit
bind-key RIGHT open
bind-key LEFT quit
bind-key BACKSPACE quit
bind-key q hard-quit
bind-key H prev-feed

View File

@ -1,77 +1,81 @@
-------Linux/BSD-------
https://distrowatch.com/news/dw.xml "~DistroWatch" news
https://www.reddit.com/r/linux/new.rss "~r/linux" reddit
https://distrowatch.com/news/dw.xml "~DistroWatch" news
https://www.reddit.com/r/linux/new.rss "~r/linux" reddit
https://www.reddit.com/r/linuxquestions/new.rss "~r/linuxquestions" reddit
https://www.reddit.com/r/linux_gaming/new.rss "~r/linux_gaming" reddit
https://www.reddit.com/r/openbsd/new.rss "~r/openbsd" reddit
https://www.reddit.com/r/freebsd/new.rss "~r/freebsd" reddit
https://www.reddit.com/r/Gentoo/new.rss "~r/Gentoo" reddit
https://www.reddit.com/r/archlinux/new.rss "~r/archlinux" reddit
https://www.reddit.com/r/voidlinux/new.rss "~r/voidlinux" reddit
https://www.reddit.com/r/NixOS/new.rss "~r/NixOS" reddit
https://www.reddit.com/r/bedrocklinux/new.rss "~r/bedrocklinux" reddit
https://www.reddit.com/r/Fedora/new.rss "~r/Fedora" reddit
https://www.reddit.com/r/gnome/new.rss "~r/gnome" reddit
https://www.reddit.com/r/kde/new.rss "~r/kde" reddit
https://www.reddit.com/r/swaywm/new.rss "~r/swaywm" reddit
https://www.reddit.com/r/flatpak/new.rss "~r/flatpak" reddit
https://www.reddit.com/r/linux_gaming/new.rss "~r/linux_gaming" reddit
https://www.reddit.com/r/openbsd/new.rss "~r/openbsd" reddit
https://www.reddit.com/r/freebsd/new.rss "~r/freebsd" reddit
https://www.reddit.com/r/Gentoo/new.rss "~r/Gentoo" reddit
https://www.reddit.com/r/archlinux/new.rss "~r/archlinux" reddit
https://www.reddit.com/r/voidlinux/new.rss "~r/voidlinux" reddit
https://www.reddit.com/r/NixOS/new.rss "~r/NixOS" reddit
https://www.reddit.com/r/bedrocklinux/new.rss "~r/bedrocklinux" reddit
https://www.reddit.com/r/Fedora/new.rss "~r/Fedora" reddit
https://www.reddit.com/r/gnome/new.rss "~r/gnome" reddit
https://www.reddit.com/r/kde/new.rss "~r/kde" reddit
https://www.reddit.com/r/swaywm/new.rss "~r/swaywm" reddit
https://www.reddit.com/r/flatpak/new.rss "~r/flatpak" reddit
--------Software-------
https://www.reddit.com/r/emacs/new.rss "~r/emacs" reddit
https://www.reddit.com/r/neovim/new.rss "~r/neovim" reddit
https://www.reddit.com/r/GnuPG/new.rss "~r/GnuPG" reddit
https://www.reddit.com/r/emacs/new.rss "~r/emacs" reddit
https://www.reddit.com/r/neovim/new.rss "~r/neovim" reddit
https://www.reddit.com/r/GnuPG/new.rss "~r/GnuPG" reddit
https://www.reddit.com/r/commandline/new.rss "~r/commandline" reddit
--------Privacy--------
https://www.reddit.com/r/privacytoolsIO/new.rss "~r/privacytoolsIO" reddit
https://www.reddit.com/r/privacy/new.rss "~r/privacy" reddit
https://www.reddit.com/r/TOR/new.rss "~r/TOR" reddit
https://www.reddit.com/r/Monero/new.rss "~r/Monero" reddit
https://www.reddit.com/r/privacy/new.rss "~r/privacy" reddit
https://www.reddit.com/r/TOR/new.rss "~r/TOR" reddit
https://www.reddit.com/r/Monero/new.rss "~r/Monero" reddit
---------Fluff---------
https://www.reddit.com/r/unixporn/new.rss "~r/unixporn" reddit
https://www.reddit.com/r/Rainmeter/new.rss "~r/Rainmeter" reddit
https://www.reddit.com/r/FirefoxCSS/new.rss "~r/FirefoxCSS" reddit
https://www.reddit.com/r/startpages/new.rss "~r/startpages" reddit
https://www.reddit.com/r/wallpaper/new.rss "~r/wallpaper" reddit
https://www.reddit.com/r/Animewallpaper/new.rss "~r/Animewallpaper" reddit
https://www.reddit.com/r/AnimewallpapersSFW/new.rss "~r/AnimewallpaperSFW" reddit
https://www.reddit.com/r/awwnime/new.rss "~r/awwnime" reddit
https://www.reddit.com/r/Lolirefugees/new.rss "~r/Lolirefugees" reddit
https://www.reddit.com/r/unixporn/new.rss "~r/unixporn" reddit
https://www.reddit.com/r/Rainmeter/new.rss "~r/Rainmeter" reddit
https://www.reddit.com/r/FirefoxCSS/new.rss "~r/FirefoxCSS" reddit
https://www.reddit.com/r/startpages/new.rss "~r/startpages" reddit
https://www.reddit.com/r/wallpaper/new.rss "~r/wallpaper" reddit
https://www.reddit.com/r/Animewallpaper/new.rss "~r/Animewallpaper" reddit
https://www.reddit.com/r/AnimewallpapersSFW/new.rss "~r/AnimewallpaperSFW" reddit
https://www.reddit.com/r/awwnime/new.rss "~r/awwnime" reddit
https://www.reddit.com/r/Lolirefugees/new.rss "~r/Lolirefugees" reddit
https://www.reddit.com/r/AnimeGirlsInKimonos/new.rss "~r/AnimeGirlsInKimono" reddit
https://www.reddit.com/r/fatestaynight/new.rss "~r/fatestaynight" reddit
https://www.reddit.com/r/Saber/new.rss "~r/Saber" reddit
https://www.reddit.com/r/OneTrueTohsaka/new.rss "~r/OneTrueTohsaka" reddit
https://www.reddit.com/r/formalwaifus/new.rss "~r/formalwaifus" reddit
https://www.reddit.com/r/LightNovels/new.rss "~r/LightNovels" reddit
https://www.reddit.com/r/PixelArt/new.rss "~r/PixelArt" reddit
https://www.reddit.com/r/riprequests/new.rss "~r/riprequests" reddit
https://www.reddit.com/r/fatestaynight/new.rss "~r/fatestaynight" reddit
https://www.reddit.com/r/Saber/new.rss "~r/Saber" reddit
https://www.reddit.com/r/OneTrueTohsaka/new.rss "~r/OneTrueTohsaka" reddit
https://www.reddit.com/r/formalwaifus/new.rss "~r/formalwaifus" reddit
https://www.reddit.com/r/LightNovels/new.rss "~r/LightNovels" reddit
https://www.reddit.com/r/PixelArt/new.rss "~r/PixelArt" reddit
https://www.reddit.com/r/riprequests/new.rss "~r/riprequests" reddit
https://www.reddit.com/r/dllinks/new.rss "~r/dllinks" reddit
------Programming------
https://www.reddit.com/r/learnprogramming/new.rss "~r/learnprogramming" reddit
https://www.reddit.com/r/programming/new.rss "~r/programming" reddit
https://www.reddit.com/r/dailyprogrammer/new.rss "~r/dailyprogrammer" reddit
https://www.reddit.com/r/badcode/new.rss "~r/badcode" reddit
https://www.reddit.com/r/programming/new.rss "~r/programming" reddit
https://www.reddit.com/r/dailyprogrammer/new.rss "~r/dailyprogrammer" reddit
https://www.reddit.com/r/badcode/new.rss "~r/badcode" reddit
---------News----------
https://news.ycombinator.com/rss "~Hacker News" news
https://www.phoronix.com/rss.php "~Phoronix" news
https://news.ycombinator.com/rss "~Hacker News" news
https://www.phoronix.com/rss.php "~Phoronix" news
https://www.nytimes.com/svc/collections/v1/publish/https://www.nytimes.com/section/world/rss.xml "~The NewYork Times" news
https://www.cbsnews.com/latest/rss/world "~CBS News" news
https://www.theguardian.com/world/rss "~The Guardian" news
https://www.cbsnews.com/latest/rss/world "~CBS News" news
https://www.theguardian.com/world/rss "~The Guardian" news
-------Youtube---------
https://www.youtube.com/feeds/videos.xml?channel_id=UCVls1GmFKf6WlTraIb_IaJg "~Youtube: DistroTube" youtube
https://www.youtube.com/feeds/videos.xml?channel_id=UCVls1GmFKf6WlTraIb_IaJg "~Youtube: DistroTube" youtube
https://www.youtube.com/feeds/videos.xml?channel_id=UCld68syR8Wi-GY_n4CaoJGA "~Youtube: Brodie Robertson" youtube
https://www.youtube.com/feeds/videos.xml?channel_id=UC7YOGHUfC1Tb6E4pudI9STA "~Youtube: Mental Outlaw" youtube
https://www.youtube.com/feeds/videos.xml?channel_id=UC2eYFnH61tmytImy1mTYvhA "~Youtube: Luke Smith" youtube
https://www.youtube.com/feeds/videos.xml?channel_id=UCZWadyLVO4ZnMgLrRVtS6VA "~Youtube: baby WOGUE" youtube
https://www.youtube.com/feeds/videos.xml?channel_id=UCgTNupxATBfWmfehv21ym-g "~Youtube: Null Byte" youtube
https://www.youtube.com/feeds/videos.xml?channel_id=UC3s0BtrBJpwNDaflRSoiieQ "~Youtube: Hak5" youtube
https://www.youtube.com/feeds/videos.xml?channel_id=UC7YOGHUfC1Tb6E4pudI9STA "~Youtube: Mental Outlaw" youtube
https://www.youtube.com/feeds/videos.xml?channel_id=UC2eYFnH61tmytImy1mTYvhA "~Youtube: Luke Smith" youtube
https://www.youtube.com/feeds/videos.xml?channel_id=UCZWadyLVO4ZnMgLrRVtS6VA "~Youtube: baby WOGUE" youtube
https://www.youtube.com/feeds/videos.xml?channel_id=UCAiiOTio8Yu69c3XnR7nQBQ "~Youtube: System Crafters" youtube
------
https://www.youtube.com/feeds/videos.xml?channel_id=UCHnyfMqiRRG1u-2MsSQLbXA "~Youtube: Veritasium" youtube
https://www.youtube.com/feeds/videos.xml?channel_id=UC6nSFpj9HTCZ5t-N3Rm3-HA "~Youtube: Vsauce" youtube
https://www.youtube.com/feeds/videos.xml?channel_id=UCzen_5NiIRsC_f97HVaB7bA "~Youtube: Otaku-Vs" youtube
https://www.youtube.com/feeds/videos.xml?channel_id=UCO5Jvsc_sKuZi3MhnJxrlzQ "~Youtube: Nyanners" youtube
https://www.youtube.com/feeds/videos.xml?channel_id=UCdn5BQ06XqgXoAxIhbqw5Rg "~Youtube: Fubuki" youtube
------
https://www.youtube.com/feeds/videos.xml?channel_id=UCHnyfMqiRRG1u-2MsSQLbXA "~Youtube: Veritasium" youtube
https://www.youtube.com/feeds/videos.xml?channel_id=UC6nSFpj9HTCZ5t-N3Rm3-HA "~Youtube: Vsauce" youtube
https://www.youtube.com/feeds/videos.xml?channel_id=UCoxcjq-8xIDTYp3uz647V5A "~Youtube: Numberphile" youtube
https://www.youtube.com/feeds/videos.xml?channel_id=UC2C_jShtL725hvbm1arSV9w "~Youtube: CGP Grey" youtube
https://www.youtube.com/feeds/videos.xml?channel_id=UCOGeU-1Fig3rrDjhm9Zs_wg "~Youtube: Vihart" youtube
https://www.youtube.com/feeds/videos.xml?channel_id=UClq42foiSgl7sSpLupnugGA "~Youtube: D!NG" youtube
https://www.youtube.com/feeds/videos.xml?channel_id=UC2C_jShtL725hvbm1arSV9w "~Youtube: CGP Grey" youtube
https://www.youtube.com/feeds/videos.xml?channel_id=UCOGeU-1Fig3rrDjhm9Zs_wg "~Youtube: Vihart" youtube
https://www.youtube.com/feeds/videos.xml?channel_id=UClq42foiSgl7sSpLupnugGA "~Youtube: D!NG" youtube
https://www.youtube.com/feeds/videos.xml?channel_id=UCBa659QWEk1AI4Tg--mrJ2A "~Youtube: Tom Scott" youtube
------
https://www.youtube.com/feeds/videos.xml?channel_id=UC8butISFwT-Wl7EV0hUK0BQ "~Youtube: freeCodeCamp.org" youtube
https://www.youtube.com/feeds/videos.xml?channel_id=UCEbYhDd6c6vngsF5PQpFVWg "~Youtube: Tsoding" youtube
https://www.youtube.com/feeds/videos.xml?channel_id=UCd3dNckv1Za2coSaHGHl5aA "~Youtube: TJ DeVries" youtube
https://www.youtube.com/feeds/videos.xml?channel_id=UCAiiOTio8Yu69c3XnR7nQBQ "~Youtube: System Crafters" youtube
https://www.youtube.com/feeds/videos.xml?channel_id=UC8butISFwT-Wl7EV0hUK0BQ "~Youtube: freeCodeCamp.org" youtube
https://www.youtube.com/feeds/videos.xml?channel_id=UCEbYhDd6c6vngsF5PQpFVWg "~Youtube: Tsoding" youtube
https://www.youtube.com/feeds/videos.xml?channel_id=UCd3dNckv1Za2coSaHGHl5aA "~Youtube: TJ DeVries" youtube
https://www.youtube.com/feeds/videos.xml?channel_id=UC5Qw7uMu8_QMJHBw3mQJ62w "~Youtube: Georges Basile Stavracas Neto" youtube

50
home/.config/nnn/plugins/.cbcp Executable file
View File

@ -0,0 +1,50 @@
#!/usr/bin/env sh
# Description: Copy selection to system clipboard as newline-separated entries
# Dependencies:
# - tr
# - xclip/xsel (Linux)
# - pbcopy (macOS)
# - termux-clipboard-set (Termux)
# - clip.exe (WSL)
# - clip (Cygwin)
# - wl-copy (Wayland)
# - clipboard (Haiku)
#
# Limitation: breaks if a filename has newline in it
#
# Note: For a space-separated list:
# xargs -0 < "$SELECTION"
#
# Shell: POSIX compliant
# Author: Arun Prakash Jana
IFS="$(printf '%b_' '\n')"; IFS="${IFS%_}" # protect trailing \n
selection=${NNN_SEL:-${XDG_CONFIG_HOME:-$HOME/.config}/nnn/.selection}
if which xsel >/dev/null 2>&1; then
# Linux
tr '\0' '\n' < "$selection" | xsel -bi
elif which xclip >/dev/null 2>&1; then
# Linux
tr '\0' '\n' < "$selection" | xclip -sel clip
elif which pbcopy >/dev/null 2>&1; then
# macOS
tr '\0' '\n' < "$selection" | pbcopy
elif which termux-clipboard-set >/dev/null 2>&1; then
# Termux
tr '\0' '\n' < "$selection" | termux-clipboard-set
elif which clip.exe >/dev/null 2>&1; then
# WSL
tr '\0' '\n' < "$selection" | clip.exe
elif which clip >/dev/null 2>&1; then
# Cygwin
tr '\0' '\n' < "$selection" | clip
elif which wl-copy >/dev/null 2>&1; then
# Wayland
tr '\0' '\n' < "$selection" | wl-copy
elif which clipboard >/dev/null 2>&1; then
# Haiku
tr '\0' '\n' < "$selection" | clipboard --stdin
fi

153
home/.config/nnn/plugins/.nmv Executable file
View File

@ -0,0 +1,153 @@
#!/usr/bin/env bash
# Description: An almost fully POSIX compliant batch file renamer
#
# Note: nnn auto-detects and invokes this plugin if available
# Whitespace is used as delimiter for read.
# The plugin doesn't support filenames with leading or trailing whitespace
#
# Capabilities:
# 1. Basic file rename
# 2. Detects order change
# 3. Can move files
# 4. Can remove files
# 5. Switch number pairs to swap filenames
#
# Shell: bash
# Author: KlzXS
EDITOR="${EDITOR:-vi}"
TMPDIR="${TMPDIR:-/tmp}"
INCLUDE_HIDDEN="${INCLUDE_HIDDEN:-1}"
VERBOSE="${VERBOSE:-0}"
selection=${NNN_SEL:-${XDG_CONFIG_HOME:-$HOME/.config}/nnn/.selection}
exit_status=0
dst_file=$(mktemp "$TMPDIR/.nnnXXXXXX")
if [ -s "$selection" ]; then
printf "Rename 'c'urrent / 's'election? "
read -r resp
if ! [ "$resp" = "c" ] && ! [ "$resp" = "s" ]; then
exit 1
fi
fi
if [ "$resp" = "s" ]; then
arr=$(tr '\0' '\n' < "$selection")
else
if [ "$INCLUDE_HIDDEN" -eq 0 ]; then
arr=$(find . ! -name . -prune ! -name ".*" -print | sort)
else
arr=$(find . ! -name . -prune -print | sort)
fi
fi
lines=$(printf "%s\n" "$arr" | wc -l)
width=${#lines}
printf "%s" "$arr" | awk '{printf("%'"${width}"'d %s\n", NR, $0)}' > "$dst_file"
items=("~")
while IFS='' read -r line; do
items+=("$line");
done < <(printf "%s\n" "$arr")
$EDITOR "$dst_file"
while read -r num name; do
if [ -z "$name" ]; then
if [ -z "$num" ]; then
continue
fi
printf "%s: unable to parse line, aborting\n" "$0"
exit 1
fi
# check if $num is an integer
if [ ! "$num" -eq "$num" ] 2> /dev/null; then
printf "%s: unable to parse line, aborting\n" "$0"
exit 1
fi
src=${items[$num]}
if [ -z "$src" ]; then
printf "%s: unknown item number %s\n" "$0" "$num" > /dev/stderr
continue
elif [ "$name" != "$src" ]; then
if [ -z "$name" ]; then
continue
fi
if [ ! -e "$src" ] && [ ! -L "$src" ]; then
printf "%s: %s does not exit\n" "$0" "$src" > /dev/stderr
unset "items[$num]"
continue
fi
# handle swaps
if [ -e "$name" ] || [ -L "$name" ]; then
tmp="$name~"
c=0
while [ -e "$tmp" ] || [ -L "$tmp" ]; do
c=$((c+1))
tmp="$tmp~$c"
done
if mv "$name" "$tmp"; then
if [ "$VERBOSE" -ne 0 ]; then
printf "'%s' -> '%s'\n" "$name" "$tmp"
fi
else
printf "%s: failed to rename %s to %s: %s\n" "$0" "$name" "$tmp" "$!" > /dev/stderr
exit_status=1
fi
for key in "${!items[@]}"; do
if [ "${items[$key]}" = "$name" ]; then
items[$key]="$tmp"
fi
done
fi
dir=$(dirname "$name")
if [ ! -d "$dir" ] && ! mkdir -p "$dir"; then
printf "%s: failed to create directory tree %s\n" "$0" "$dir" > /dev/stderr
exit_status=1
elif ! mv -i "$src" "$name"; then
printf "%s: failed to rename %s to %s: %s\n" "$0" "$name" "$tmp" "$!" > /dev/stderr
exit_status=1
else
if [ -d "$name" ]; then
for key in "${!items[@]}"; do
items[$key]=$(printf "%s" "${items[$key]}" | sed "s|^$src\(\$\|\/\)|$name\1|")
done
if [ "$VERBOSE" -ne 0 ]; then
printf "'%s' => '%s'\n" "$src" "$name"
fi
else
true
if [ "$VERBOSE" -ne 0 ]; then
printf "'%s' -> '%s'\n" "$src" "$name"
fi
fi
fi
fi
unset "items[$num]"
done <"$dst_file"
unset "items[0]"
for item in "${items[@]}"; do
rm -ri "$item"
done
rm "$dst_file"
exit $exit_status

View File

@ -0,0 +1,38 @@
#!/usr/bin/env sh
# Description: Helper script for plugins
#
# Shell: POSIX compliant
# Author: Anna Arad
selection=${NNN_SEL:-${XDG_CONFIG_HOME:-$HOME/.config}/nnn/.selection}
export selection
## Set CUR_CTX to 1 to open directory in current context
CUR_CTX=0
export CUR_CTX
## Ask nnn to switch to directory $1 in context $2.
## If $2 is not provided, the function asks explicitly.
nnn_cd () {
dir="$1"
if [ -z "$NNN_PIPE" ]; then
echo "No pipe file found" 1>&2
return
fi
if [ -n "$2" ]; then
context=$2
elif [ $CUR_CTX -ne 1 ]; then
printf "Choose context 1-4 (blank for current): "
read -r context
fi
printf "%s" "${context:-0}c$dir" > "$NNN_PIPE"
}
cmd_exists () {
which "$1" > /dev/null 2>&1
echo $?
}

22
home/.config/nnn/plugins/.ntfy Executable file
View File

@ -0,0 +1,22 @@
#!/usr/bin/env sh
# Description: Show a notification
#
# Details: nnn invokes this plugin to show notification when a cp/mv/rm operation is complete.
#
# Dependencies: notify-send (Ubuntu)/ntfy (https://github.com/dschep/ntfy)/osascript (macOS)/notify (Haiku)
#
# Shell: POSIX compliant
# Author: Anna Arad
OS="$(uname)"
if which notify-send >/dev/null 2>&1; then
notify-send nnn "Done!"
elif [ "$OS" = "Darwin" ]; then
osascript -e 'display notification "Done!" with title "nnn"'
elif which ntfy >/dev/null 2>&1; then
ntfy -t nnn send "Done!"
elif [ "$OS" = "Haiku" ]; then
notify --title "nnn" "Done!"
fi

View File

@ -1,7 +1,7 @@
#!/usr/bin/env sh
# Description: Allows for creation of multiple files/directories at the same time.
# Plugin opens a temp file where each entry is to be written on a separate line
# Description: Allows for creation of multiple files/dirs simultaneously
# Creates a tmp file to write each entry in a separate line
#
# Note: Only relative paths are supported. Absolute paths are ignored
# Leading and trailing whitespace in path names is also ignored

View File

@ -1,66 +0,0 @@
#!/usr/bin/env sh
# Description: Create and verify checksums
#
# For selection: it will generate one file containing the checksums with file names
# [and with paths if they are in another directory]
# the output checksum filename will be checksum_timestamp.checksum_type
# For file: if the file is a checksum, the plugin does the verification
# if the file is not a checksum, checksum will be generated for it
# the output checksum filename will be filename.checksum_type
# For directory: recursively calculates checksum for all the files in the directory
# the output checksum filename will be directory.checksum_type
#
# Shell: POSIX compliant
# Authors: ath3, Arun Prakash Jana
selection=${NNN_SEL:-${XDG_CONFIG_HOME:-$HOME/.config}/nnn/.selection}
resp=f
chsum=md5
checksum_type()
{
echo "possible checksums: md5, sha1, sha224, sha256, sha384, sha512"
printf "create md5 (m), sha256 (s), sha512 (S) (or type one of the above checksums) [default=m]: "
read -r chsum_resp
for chks in md5 sha1 sha224 sha256 sha384 sha512
do
if [ "$chsum_resp" = "$chks" ]; then
chsum=$chsum_resp
return
fi
done
if [ "$chsum_resp" = "s" ]; then
chsum=sha256
elif [ "$chsum_resp" = "S" ]; then
chsum=sha512
fi
}
if [ -s "$selection" ]; then
printf "work with selection (s) or current file (f) [default=f]: "
read -r resp
fi
if [ "$resp" = "s" ]; then
checksum_type
sed 's|'"$PWD/"'||g' < "$selection" | xargs -0 -I{} ${chsum}sum {} > "checksum_$(date '+%Y%m%d%H%M').$chsum"
elif [ -n "$1" ]; then
if [ -f "$1" ]; then
for chks in md5 sha1 sha224 sha256 sha384 sha512
do
if echo "$1" | grep -q \.${chks}$; then
${chks}sum -c < "$1"
read -r _
return
fi
done
checksum_type
file=$(basename "$1").$chsum
${chsum}sum "$1" > "$file"
elif [ -d "$1" ]; then
checksum_type
file=$(basename "$1").$chsum
find "$1" -type f -exec ${chsum}sum "{}" + > "$file"
fi
fi

View File

@ -1,15 +0,0 @@
#!/usr/bin/env sh
# Description: List non-empty duplicate files in the current directory (based on size followed by MD5)
#
# Source: https://www.commandlinefu.com/commands/view/3555/find-duplicate-files-based-on-size-first-then-md5-hash
#
# Dependencies: find md5sum sort uniq xargs
#
# Shell: POSIX compliant
# Authors: syssyphus, KlzXS
find . -size +0 -type f -printf "%s %p\n" | sort -rn | sed -n 'N; /^\([0-9]*\) .*\n\1.*$/p;$d;D' | awk '{printf("%s\0", substr($0, index($0, $2)))}' | xargs -0 md5sum | sort | uniq -w32 --all-repeated=separate
printf "Press any key to exit"
read -r _

View File

@ -1,22 +1,99 @@
#!/usr/bin/env sh
# Description: Run fzf and go to the directory of the file selected
# Description: Fuzzy search multiple locations read-in from a path-list file
# (or $PWD) and open the selected file's dir in a smart context.
# Dependencies: fzf, fd (only for multi-location search)
#
# Details: Paths in list file should be newline-separated absolute paths.
# Paths can be file paths; the script will scan the parent dirs.
#
# The path-list file precedence is:
# - "$1" (the hovered file) if it exists, is plain-text and the
# first line points to an existing file
# - "$LIST" if set below
# - "$2" (the current directory) [mimics plugin fzcd behaviour]
#
# The path-list file can be generated easily:
# - pick the (file)paths in picker mode to path-list file
# - OR, edit selection in nnn and save as path-list file
#
# The plugin clears nnn selection as the user can be tempted to delete
# duplicate files after finding copies and remove selection by mistake.
#
# Shell: POSIX compliant
# Author: Anna Arad
# Author: Anna Arad, Arun Prakash Jana
IFS="$(printf '\n\r')"
. "$(dirname "$0")"/.nnn-plugin-helper
if [ "$(cmd_exists fzf)" -eq "0" ]; then
sel=$(fd --type d --follow --hidden --exclude .git | fzf --preview 'tree -La 1 -C --dirsfirst {} 2>/dev/null')
else
CTX=+
LIST="$LIST"
if ! type fzf >/dev/null 2>&1; then
printf "fzf missing"
read -r _
exit 1
fi
if [ -n "$sel" ]; then
# Check if selected path returned by fzf command is absolute
case $sel in
/*) nnn_cd "$sel" ;;
*) nnn_cd "$PWD/$sel" ;;
esac
if [ -n "$1" ] && [ "$(file -b --mime-type "$1")" = 'text/plain' ] && [ -e "$(head -1 "$1")" ]; then
LIST="$1"
elif ! [ -s "$LIST" ]; then
# Clear selection
if [ -p "$NNN_PIPE" ]; then
printf "-" >"$NNN_PIPE"
fi
sel=$(fzf)
# Show only the file and parent dir
# sel=$(fzf --delimiter / --with-nth=-2,-1 --tiebreak=begin --info=hidden)
LIST=''
fi
if [ -n "$LIST" ]; then
if type fd >/dev/null 2>&1; then
tmpfile=$(mktemp /tmp/abc-script.XXXXXX)
while IFS= read -r path; do
if [ -d "$path" ]; then
printf "%s\n" "$path" >> "$tmpfile"
elif [ -f "$path" ]; then
printf "%s\n" "$(dirname "$path")" >> "$tmpfile"
fi
done < "$LIST"
# Clear selection
if [ -p "$NNN_PIPE" ]; then
printf "-" >"$NNN_PIPE"
fi
sel=$(xargs -d '\n' -a "$tmpfile" fd -H . | fzf --delimiter / --tiebreak=begin --info=hidden)
rm "$tmpfile"
else
printf "fd missing"
read -r _
exit 1
fi
fi
if [ -n "$sel" ]; then
if [ "$sel" = "." ] || { ! [ -d "$sel" ] && ! [ -f "$sel" ]; }; then
exit 0
fi
# Check if the selected path returned by fzf command is absolute
case $sel in
/*) nnn_cd "$sel" "$CTX" ;;
*)
# Remove "./" prefix if it exists
sel="${sel#./}"
if [ "$PWD" = "/" ]; then
nnn_cd "/$sel" "$CTX"
else
nnn_cd "$PWD/$sel" "$CTX"
fi;;
esac
fi

65
home/.config/nnn/plugins/fzopen Executable file
View File

@ -0,0 +1,65 @@
#!/usr/bin/env sh
# Description: Regular mode:
# Fuzzy find a file in directory subtree.
# Opens in $VISUAL or $EDITOR if text.
# Opens other type of files with xdg-open.
# Work only with a single file selected.
#
# Picker mode:
# If picker mode output file is passed, it
# will be overwritten with any picked files.
# Leaves untouched if no file is picked.
# Works with single/multiple files selected.
#
# Dependencies: fd/find, fzf/skim, xdg-open
#
# Shell: POSIX compliant
# Author: Arun Prakash Jana
. "$(dirname "$0")"/.nnn-plugin-helper
if type fzf >/dev/null 2>&1; then
cmd="$FZF_DEFAULT_COMMAND"
if type fd >/dev/null 2>&1; then
[ -z "$cmd" ] && cmd="fd -t f 2>/dev/null"
else
[ -z "$cmd" ] && cmd="find . -type f 2>/dev/null"
fi
entry="$(eval "$cmd" | fzf -m --delimiter / --nth=-1 --tiebreak=begin --info=hidden)"
# To show only the file name
# entry=$(find . -type f 2>/dev/null | fzf --delimiter / --with-nth=-1 --tiebreak=begin --info=hidden)
elif type sk >/dev/null 2>&1; then
entry=$(find . -type f 2>/dev/null | sk)
else
exit 1
fi
# Check for picker mode
if [ "$3" ]; then
if [ "$entry" ]; then
if [ "-" = "$3" ]; then
printf "%s\n" "$entry"
else
printf "%s\n" "$entry" > "$3"
fi
# Tell `nnn` to clear its internal selection
printf "%s" "0p" > "$NNN_PIPE"
fi
exit 0
fi
# Open the file (works for a single file only)
case "$(file -biL "$entry")" in
*text*)
"${VISUAL:-$EDITOR}" "$entry" ;;
*)
if uname | grep -q "Darwin"; then
open "$entry" >/dev/null 2>&1
else
xdg-open "$entry" >/dev/null 2>&1
fi
;;
esac

View File

@ -1,24 +1,17 @@
#!/usr/bin/env sh
# Description: cd to any dir in the z database using an fzf pane
#
# Shell: POSIX compliant
# Author: Nick Waywood
. "$(dirname "$0")"/.nnn-plugin-helper
if which fzf >/dev/null 2>&1; then
fuzzy=fzf
if type fzf >/dev/null 2>&1; then
fuzzy="fzf --no-multi"
else
exit 1
fi
datafile="${_ZL_DATA:-$HOME/.local/share/zlua/zlua}"
if [ -f "$datafile" ]; then
# I read the data from z's file instead of calling the z command so that the data doesn't need to be processed twice
sel=$(awk -F "|" '{print $1}' "$datafile" | "$fuzzy" | awk '{$1=$1};1')
# NOTE: Uncomment this line and comment out the line above if you want to see the weightings of the dir's in the fzf pane
# sel=$(awk -F "|" '{printf "%s %s\n", $2, $1}' "$datafile" | "$fuzzy" | sed 's/^[0-9,.]* *//' | awk '{$1=$1};1')
if command -v zoxide >/dev/null; then
sel=$(zoxide query --list | $fuzzy)
else
exit 1
fi

28
home/.config/nnn/plugins/gpgd Executable file
View File

@ -0,0 +1,28 @@
#!/usr/bin/env sh
# Description: Decrypts selected files using gpg. The contents of the
# decrypted file are stored in a file with extension .dec
#
# Note: If an appropriate private key cannot be found gpg silently
# prints a message in the background and no files are written.
#
# Shell: POSIX compliant
# Author: KlzXS
selection=${NNN_SEL:-${XDG_CONFIG_HOME:-$HOME/.config}/nnn/.selection}
printf "(s)election/(c)urrent? [default=c] "
read -r resp
if [ "$resp" = "s" ]; then
files=$(tr '\0' '\n' < "$selection")
else
files=$1
fi
printf "%s" "$files" | xargs -n1 -I{} gpg --decrypt --output "{}.dec" {}
# Clear selection
if [ "$resp" = "s" ] && [ -p "$NNN_PIPE" ]; then
printf "-" > "$NNN_PIPE"
fi

44
home/.config/nnn/plugins/gpge Executable file
View File

@ -0,0 +1,44 @@
#!/usr/bin/env sh
# Description: Encrypts selected files using gpg. Can encrypt
# asymmetrically (key) or symmetrically (passphrase).
# If asymmetric encryption is chosen a key can be
# chosen from the list of capable public keys using fzf.
#
# Note: Symmetric encryption only works for a single (current) file as per gpg limitations
#
# Shell: POSIX compliant
# Author: KlzXS
selection=${NNN_SEL:-${XDG_CONFIG_HOME:-$HOME/.config}/nnn/.selection}
printf "(s)ymmetric, (a)symmetric? [default=a] "
read -r symmetry
if [ "$symmetry" = "s" ]; then
gpg --symmetric "$1"
else
printf "(s)election/(c)urrent? [default=c] "
read -r resp
if [ "$resp" = "s" ]; then
files=$(tr '\0' '\n' < "$selection")
else
files=$1
fi
keyids=$(gpg --list-public-keys --with-colons | grep -E "pub:(.*:){10}.*[eE].*:" | awk -F ":" '{print $5}')
#awk needs literal $10
#shellcheck disable=SC2016
keyuids=$(printf "%s" "$keyids" | xargs -n1 -I{} sh -c 'gpg --list-key --with-colons "{}" | grep "uid" | awk -F ":" '\''{printf "%s %s\n", "{}", $10}'\''')
recipient=$(printf "%s" "$keyuids" | fzf | awk '{print $1}')
printf "%s" "$files" | xargs -n1 gpg --encrypt --recipient "$recipient"
# Clear selection
if [ "$resp" = "s" ] && [ -p "$NNN_PIPE" ]; then
printf "-" > "$NNN_PIPE"
fi
fi

View File

@ -1,13 +1,14 @@
#!/usr/bin/env sh
# Description: View a file in hex
#
# Dependencies: hx (https://github.com/krpors/hx)/xxd and $PAGER
#
# Shell: POSIX compliant
# Author: Arun Prakash Jana
if ! [ -z "$1" ]; then
if which hx >/dev/null 2>&1; then
if [ -n "$1" ]; then
if type hx >/dev/null 2>&1; then
hx "$1"
else
xxd "$1" | $PAGER

View File

@ -4,19 +4,21 @@
# If the device is not mounted, it will be mounted.
# If the device is mounted, it will be unmounted and powered down.
#
# Runs `lsblk` if 'l' is entered, exits on 'Return`.
# Dependencies: lsblk, pmount
#
# Note:
# - The script uses Linux-specific lsblk to list block devices. Alternatives:
# Usage: Runs `lsblk` on 'l', exits on 'Return`.
#
# Notes:
# - The script uses Linux-specific lsblk to list block devices. Alternatives:
# macOS: "diskutil list"
# BSD: "geom disk list"
# - The script uses udisksctl (from udisks2) to pwoer down devices. This is also Linux-specific.
# Users on non-Linux platforms can comment it and use an alterntive to power-down disks.
# - The script uses udisksctl (from udisks2) to power down devices. This is also Linux-specific.
# Users on non-Linux platforms can comment it and use an alterntive to power-down disks.
#
# Shell: POSIX compliant
# Author: Arun Prakash Jana
prompt="device name ['l' lists]: "
prompt="device name [e.g. sdXn] ('l'ist, 'q'uit): "
lsblk
@ -24,7 +26,7 @@ printf "\nEnsure you aren't still in the mounted device.\n"
printf "%s" "$prompt"
read -r dev
while ! [ -z "$dev" ]
while [ -n "$dev" ]
do
if [ "$dev" = "l" ]; then
lsblk

View File

@ -1,6 +1,5 @@
#!/usr/bin/env sh
# #############################################################################
# Description: Sample script to play files in apps by file type or mime
#
# Shell: POSIX compliant
@ -14,7 +13,7 @@
# 2. Run nnn with the program option to indicate a CLI opener
# nnn -c
# # The -c program option overrides option -e
# 3. nuke can use nnn plugins (e.g. mocplay is used for audio), $PATH is updated.
# 3. nuke can use nnn plugins (e.g. mocq is used for audio), $PATH is updated.
#
# Details:
# Inspired by ranger's scope.sh, modified for usage with nnn.
@ -42,7 +41,7 @@
# rar: list with unrar
# 7-zip: list with 7z
# pdf: zathura (GUI), pdftotext, mutool, exiftool
# audio: mocplay (nnn plugin using MOC), mpv, media_client (Haiku), mediainfo, exiftool
# audio: mocq (nnn plugin using MOC), mpv, media_client (Haiku), mediainfo, exiftool
# avi|mkv|mp4: smplayer, mpv (GUI), ffmpegthumbnailer, mediainfo, exiftool
# log: vi
# torrent: rtorrent, transmission-show
@ -53,17 +52,16 @@
# Multimedia by mime:
# image/*: imv/sxiv (GUI), viu (https://github.com/atanunq/viu), img2txt, exiftool
# video/*: smplayer, mpv (GUI), ffmpegthumbnailer, mediainfo, exiftool
# audio/*: mocplay (nnn plugin using MOC), mpv, media_client (Haiku), mediainfo, exiftool
# audio/*: mocq (nnn plugin using MOC), mpv, media_client (Haiku), mediainfo, exiftool
# application/pdf: zathura (GUI), pdftotext, mutool, exiftool
# Other mimes:
# text/troff: man -l
# text/* | */xml: vi
# image/vnd.djvu): djvutxt, exiftool
#
# ToDo:
# TODO:
# 1. Adapt, test and enable all mimes
# 2. Clean-up the unnecessary exit codes
# #############################################################################
# set to 1 to enable GUI apps
GUI="${GUI:-0}"
@ -76,69 +74,80 @@ IMAGE_CACHE_PATH="$(dirname "$1")"/.thumbs
FPATH="$1"
FNAME=$(basename "$1")
EDITOR="${EDITOR:-vi}"
EDITOR="${VISUAL:-${EDITOR:-vi}}"
PAGER="${PAGER:-less -R}"
ext="${FNAME##*.}"
if ! [ -z "$ext" ]; then
if [ -n "$ext" ]; then
ext="$(printf "%s" "${ext}" | tr '[:upper:]' '[:lower:]')"
fi
is_mac() {
uname | grep -q "Darwin"
}
handle_pdf() {
if [ "$GUI" -ne 0 ] && which zathura >/dev/null 2>&1; then
zathura "${FPATH}" >/dev/null 2>&1 &
exit 0
elif which pdftotext >/dev/null 2>&1; then
if [ "$GUI" -ne 0 ]; then
if is_mac; then
nohup open "${FPATH}" >/dev/null 2>&1 &
elif type zathura >/dev/null 2>&1; then
nohup zathura "${FPATH}" >/dev/null 2>&1 &
else
return
fi
elif type pdftotext >/dev/null 2>&1; then
## Preview as text conversion
pdftotext -l 10 -nopgbrk -q -- "${FPATH}" - | eval "$PAGER"
exit 0
elif which mutool >/dev/null 2>&1; then
elif type mutool >/dev/null 2>&1; then
mutool draw -F txt -i -- "${FPATH}" 1-10 | eval "$PAGER"
exit 0
elif which exiftool >/dev/null 2>&1; then
elif type exiftool >/dev/null 2>&1; then
exiftool "${FPATH}" | eval "$PAGER"
exit 0
else
return
fi
exit 0
}
handle_audio() {
if which mocp >/dev/null 2>&1 && which mocplay >/dev/null 2>&1; then
mocplay "${FPATH}" "opener" >/dev/null 2>&1
exit 0
elif which mpv >/dev/null 2>&1; then
if type mocp >/dev/null 2>&1 && type mocq >/dev/null 2>&1; then
mocq "${FPATH}" "opener" >/dev/null 2>&1
elif type mpv >/dev/null 2>&1; then
mpv "${FPATH}" >/dev/null 2>&1 &
exit 0
elif which media_client >/dev/null 2>&1; then
elif type media_client >/dev/null 2>&1; then
media_client play "${FPATH}" >/dev/null 2>&1 &
exit 0
elif which mediainfo >/dev/null 2>&1; then
elif type mediainfo >/dev/null 2>&1; then
mediainfo "${FPATH}" | eval "$PAGER"
exit 0
elif which exiftool >/dev/null 2>&1; then
elif type exiftool >/dev/null 2>&1; then
exiftool "${FPATH}"| eval "$PAGER"
exit 0
else
return
fi
exit 0
}
handle_video() {
if [ "$GUI" -ne 0 ] && which smplayer >/dev/null 2>&1; then
smplayer "${FPATH}" >/dev/null 2>&1 &
exit 0
elif [ "$GUI" -ne 0 ] && which mpv >/dev/null 2>&1; then
mpv "${FPATH}" >/dev/null 2>&1 &
exit 0
elif which ffmpegthumbnailer >/dev/null 2>&1; then
if [ "$GUI" -ne 0 ]; then
if is_mac; then
nohup open "${FPATH}" >/dev/null 2>&1 &
elif type smplayer >/dev/null 2>&1; then
nohup smplayer "${FPATH}" >/dev/null 2>&1 &
elif type mpv >/dev/null 2>&1; then
nohup mpv "${FPATH}" >/dev/null 2>&1 &
else
return
fi
elif type ffmpegthumbnailer >/dev/null 2>&1; then
# Thumbnail
[ -d "${IMAGE_CACHE_PATH}" ] || mkdir "${IMAGE_CACHE_PATH}"
ffmpegthumbnailer -i "${FPATH}" -o "${IMAGE_CACHE_PATH}/${FNAME}.jpg" -s 0
viu -n "${IMAGE_CACHE_PATH}/${FNAME}.jpg" | eval "$PAGER"
exit 0
elif which mediainfo >/dev/null 2>&1; then
elif type mediainfo >/dev/null 2>&1; then
mediainfo "${FPATH}" | eval "$PAGER"
exit 0
elif which exiftool >/dev/null 2>&1; then
elif type exiftool >/dev/null 2>&1; then
exiftool "${FPATH}"| eval "$PAGER"
exit 0
else
return
fi
exit 0
}
# handle this extension and exit
@ -147,22 +156,22 @@ handle_extension() {
## Archive
a|ace|alz|arc|arj|bz|bz2|cab|cpio|deb|gz|jar|lha|lz|lzh|lzma|lzo|\
rpm|rz|t7z|tar|tbz|tbz2|tgz|tlz|txz|tZ|tzo|war|xpi|xz|Z|zip)
if which atool >/dev/null 2>&1; then
if type atool >/dev/null 2>&1; then
atool --list -- "${FPATH}" | eval "$PAGER"
exit 0
elif which bsdtar >/dev/null 2>&1; then
elif type bsdtar >/dev/null 2>&1; then
bsdtar --list --file "${FPATH}" | eval "$PAGER"
exit 0
fi
exit 1;;
rar)
if which unrar >/dev/null 2>&1; then
if type unrar >/dev/null 2>&1; then
## Avoid password prompt by providing empty password
unrar lt -p- -- "${FPATH}" | eval "$PAGER"
fi
exit 1;;
7z)
if which 7z >/dev/null 2>&1; then
if type 7z >/dev/null 2>&1; then
## Avoid password prompt by providing empty password
7z l -p -- "${FPATH}" | eval "$PAGER"
exit 0
@ -191,10 +200,10 @@ handle_extension() {
## BitTorrent
torrent)
if which rtorrent >/dev/null 2>&1; then
if type rtorrent >/dev/null 2>&1; then
rtorrent "${FPATH}"
exit 0
elif which transmission-show >/dev/null 2>&1; then
elif type transmission-show >/dev/null 2>&1; then
transmission-show -- "${FPATH}"
exit 0
fi
@ -202,7 +211,7 @@ handle_extension() {
## OpenDocument
odt|ods|odp|sxw)
if which odt2txt >/dev/null 2>&1; then
if type odt2txt >/dev/null 2>&1; then
## Preview as text conversion
odt2txt "${FPATH}" | eval "$PAGER"
exit 0
@ -211,10 +220,10 @@ handle_extension() {
## Markdown
md)
if which glow >/dev/null 2>&1; then
if type glow >/dev/null 2>&1; then
glow -sdark "${FPATH}" | eval "$PAGER"
exit 0
elif which lowdown >/dev/null 2>&1; then
elif type lowdown >/dev/null 2>&1; then
lowdown -Tterm "${FPATH}" | eval "$PAGER"
exit 0
fi
@ -223,13 +232,13 @@ handle_extension() {
## HTML
htm|html|xhtml)
## Preview as text conversion
if which w3m >/dev/null 2>&1; then
if type w3m >/dev/null 2>&1; then
w3m -dump "${FPATH}" | eval "$PAGER"
exit 0
elif which lynx >/dev/null 2>&1; then
elif type lynx >/dev/null 2>&1; then
lynx -dump -- "${FPATH}" | eval "$PAGER"
exit 0
elif which elinks >/dev/null 2>&1; then
elif type elinks >/dev/null 2>&1; then
elinks -dump "${FPATH}" | eval "$PAGER"
exit 0
fi
@ -237,10 +246,10 @@ handle_extension() {
## JSON
json)
if which jq >/dev/null 2>&1; then
if type jq >/dev/null 2>&1; then
jq --color-output . "${FPATH}" | eval "$PAGER"
exit 0
elif which python >/dev/null 2>&1; then
elif type python >/dev/null 2>&1; then
python -m json.tool -- "${FPATH}" | eval "$PAGER"
exit 0
fi
@ -257,7 +266,7 @@ abspath() {
listimages() {
find -L "$(dirname "$target")" -maxdepth 1 -type f -iregex \
'.*\(jpe?g\|bmp\|webp\|png\|gif\)$' -print0 | sort -z
'.*\(jpe?g\|bmp\|webp\|ico\|svg\|png\|gif\)$' -print0 | sort -z
}
load_dir() {
@ -265,7 +274,11 @@ load_dir() {
count="$(listimages | grep -a -m 1 -ZznF "$target" | cut -d: -f1)"
if [ -n "$count" ]; then
listimages | xargs -0 "$1" -n "$count" --
if [ "$GUI" -ne 0 ]; then
listimages | xargs -0 nohup "$1" -n "$count" --
else
listimages | xargs -0 "$1" -n "$count" --
fi
else
shift
"$1" -- "$@" # fallback
@ -294,19 +307,24 @@ handle_multimedia() {
## Image
image/*)
if [ "$GUI" -ne 0 ] && which imvr >/dev/null 2>&1; then
load_dir imvr "${FPATH}" >/dev/null 2>&1 &
exit 0
elif [ "$GUI" -ne 0 ] && which sxiv >/dev/null 2>&1; then
load_dir sxiv "${FPATH}" >/dev/null 2>&1 &
exit 0
elif which viu >/dev/null 2>&1; then
if [ "$GUI" -ne 0 ]; then
if is_mac; then
nohup open "${FPATH}" >/dev/null 2>&1 &
exit 0
elif type imvr >/dev/null 2>&1; then
load_dir imvr "${FPATH}" >/dev/null 2>&1 &
exit 0
elif type sxiv >/dev/null 2>&1; then
load_dir sxiv "${FPATH}" >/dev/null 2>&1 &
exit 0
fi
elif type viu >/dev/null 2>&1; then
viu -n "${FPATH}" | eval "$PAGER"
exit 0
elif which img2txt >/dev/null 2>&1; then
elif type img2txt >/dev/null 2>&1; then
img2txt --gamma=0.6 -- "${FPATH}" | eval "$PAGER"
exit 0
elif which exiftool >/dev/null 2>&1; then
elif type exiftool >/dev/null 2>&1; then
exiftool "${FPATH}" | eval "$PAGER"
exit 0
fi
@ -449,11 +467,11 @@ handle_mime() {
## DjVu
image/vnd.djvu)
if which djvutxt >/dev/null 2>&1; then
if type djvutxt >/dev/null 2>&1; then
## Preview as text conversion (requires djvulibre)
djvutxt "${FPATH}" | eval "$PAGER"
exit 0
elif which exiftool >/dev/null 2>&1; then
elif type exiftool >/dev/null 2>&1; then
exiftool "${FPATH}" | eval "$PAGER"
exit 0
fi
@ -462,12 +480,14 @@ handle_mime() {
}
handle_fallback() {
if [ "$GUI" -ne 0 ] && which xdg-open >/dev/null 2>&1; then
xdg-open "${FPATH}" >/dev/null 2>&1 &
exit 0
elif [ "$GUI" -ne 0 ] && which open >/dev/null 2>&1; then
open "${FPATH}" >/dev/null 2>&1 &
exit 0
if [ "$GUI" -ne 0 ]; then
if type xdg-open >/dev/null 2>&1; then
nohup xdg-open "${FPATH}" >/dev/null 2>&1 &
exit 0
elif type open >/dev/null 2>&1; then
nohup open "${FPATH}" >/dev/null 2>&1 &
exit 0
fi
fi
echo '----- File details -----' && file --dereference --brief -- "${FPATH}"
@ -493,7 +513,7 @@ handle_blocked() {
esac
}
MIMETYPE="$( file --dereference --brief --mime-type -- "${FPATH}" )"
MIMETYPE="$( file -bL --mime-type -- "${FPATH}" )"
handle_extension
handle_multimedia "${MIMETYPE}"
handle_mime "${MIMETYPE}"

View File

@ -1,53 +0,0 @@
#!/usr/bin/env sh
# Description: Organize files in directories by category
#
# Shell: POSIX compliant
# Author: th3lusive
organize() {
case "$(file -biL "$1")" in
*video*)
[ ! -d "Videos" ] && mkdir "Videos"
mv "$1" "Videos/$1"
printf "Moved %s to Videos\n" "$1" ;;
*audio*) [ ! -d "Audio" ] && mkdir "Audio"
mv "$1" "Audio/$1"
printf "Moved %s to Audio\n" "$1" ;;
*image*)
[ ! -d "Images" ] && mkdir "Images"
mv "$1" "Images/$1"
printf "Moved %s to Images\n" "$1" ;;
*pdf*|*document*|*epub*|*djvu*|*cb*)
[ ! -d "Documents" ] && mkdir "Documents"
mv "$1" "Documents/$1"
printf "Moved %s to Documents\n" "$1" ;;
*text*)
[ ! -d "Plaintext" ] && mkdir "Plaintext"
mv "$1" "Plaintext/$1"
printf "Moved %s to Plaintext\n" "$1" ;;
*tar*|*xz*|*compress*|*7z*|*rar*|*zip*)
[ ! -d "Archives" ] && mkdir "Archives"
mv "$1" "Archives/$1"
printf "Moved %s to Archives\n" "$1" ;;
*binary*)
[ ! -d "Binaries" ] && mkdir "Binaries"
mv "$1" "Binaries/$1"
printf "Moved %s to Binaries\n" "$1" ;;
esac
}
main() {
for file in *
do
[ -f "$file" ] && organize "$file"
done
}
main "$@"

View File

@ -1,24 +0,0 @@
#!/usr/bin/env sh
# Description: View a PDF file in pager
#
# Notes:
# - $PAGER must be 'less -R' or 'most'
# - To use mutool, uncomment the relevant lines and comment the pdftotext line
#
# Shell: POSIX compliant
# Author: Arun Prakash Jana
if ! [ -z "$1" ]; then
if [ "$(head -c 4 "$1")" = "%PDF" ]; then
# Convert using pdftotext
pdftotext -nopgbrk -layout "$1" - | sed 's/\xe2\x80\x8b//g' | $PAGER
# Convert using mutool
# file=`basename "$1"`
# txt=/tmp/"$file".txt
# mutool convert -o "$txt" "$1"
# eval $PAGER $txt
# rm "$txt"
fi
fi

View File

@ -3,11 +3,13 @@
# Description: Terminal based file previewer
#
# Note: This plugin needs a "NNN_FIFO" to work. See man.
# For a more extended version of this script with additional optional dependencies, see preview-tui-ext.
#
# Dependencies:
# - Supports 3 independent methods to preview with:
# - Supports 4 independent methods to preview with:
# - tmux (>=3.0), or
# - kitty with allow_remote_control on, or
# - QuickLook on WSL (https://github.com/QL-Win/QuickLook)
# - $TERMINAL set to a terminal (it's xterm by default).
# - less or $PAGER
# - tree or exa or ls
@ -17,7 +19,7 @@
# - tar
# - man
# - optional: bat for code syntax highlighting
# - optional: kitty terminal or catimg for images
# - optional: ueberzug, kitty terminal, viu or catimg for images.
# - optional: scope.sh file viewer from ranger.
# To use:
# 1. drop scope.sh executable in $PATH
@ -57,13 +59,20 @@
# without extra dependencies.
#
# Shell: POSIX compliant
# Authors: Todd Yamakawa, Léo Villeveygoux, @Recidiviste, Mario Ortiz Manero
# Authors: Todd Yamakawa, Léo Villeveygoux, @Recidiviste, Mario Ortiz Manero, Luuk van Baal
SPLIT="$SPLIT" # you can set a permanent split here
TERMINAL="$TERMINAL" # same goes for the terminal
USE_SCOPE="${USE_SCOPE:-0}"
USE_PISTOL="${USE_PISTOL:-0}"
PAGER="${PAGER:-less -R}"
PAGER="${PAGER:-less -P?n -R}"
TMPDIR="${TMPDIR:-/tmp}"
NUMPREVIEWTUI="$(($(find "$TMPDIR" -maxdepth 1 -name 'nnn-preview-tui-pagerpid*' 2>/dev/null | wc -l) + 1))"
PAGERPID="$TMPDIR/nnn-preview-tui-pagerpid.$NUMPREVIEWTUI"
GIFPID="$TMPDIR/nnn-preview-tui-gifpid.$NUMPREVIEWTUI"
CURSEL="$TMPDIR/nnn-preview-tui-selection.$NUMPREVIEWTUI"
FIFO_UEBERZUG="$TMPDIR/nnn-preview-tui-ueberzug-fifo.$NUMPREVIEWTUI"
[ "$PAGER" = "most" ] && PAGER="less -R"
if [ -e "${TMUX%%,*}" ] && tmux -V | grep -q '[ -][3456789]\.'; then
@ -81,7 +90,7 @@ elif [ "$SPLIT" != 'h' ]; then
fi
exists() {
command -v "$1" >/dev/null 2>&1
which "$1" >/dev/null 2>&1
}
fifo_pager() {
@ -113,9 +122,7 @@ print_bin_info() {
}
preview_file () {
kill %- %+ 2>/dev/null && wait %- %+ 2>/dev/null
clear
# Trying to use pistol if it's available.
if [ "$USE_PISTOL" -ne 0 ] && exists pistol; then
fifo_pager pistol "$1"
@ -131,46 +138,42 @@ preview_file () {
# Detecting the exact type of the file: the encoding, mime type, and
# extension in lowercase.
encoding="$(file -Lb --mime-encoding -- "$1")"
mimetype="$(file -Lb --mime-type -- "$1")"
encoding="$(file -bL --mime-encoding -- "$1")"
mimetype="$(file -bL --mime-type -- "$1")"
ext="${1##*.}"
if [ -n "$ext" ]; then
ext="$(printf "%s" "${ext}" | tr '[:upper:]' '[:lower:]')"
fi
lines=$(($(tput lines)-1))
lines=$(tput lines)
cols=$(tput cols)
# Otherwise, falling back to the defaults.
if [ -d "$1" ]; then
if [ -n "$QUICKLOOK" ]; then
if exists QuickLook.exe && stat "$1" >/dev/null 2>&1; then
f="$(wslpath -w "$1" 2>&1)" && QuickLook.exe "$f" &
elif exists Bridge.exe && stat "$1" >/dev/null 2>&1; then
f="$(wslpath -w "$1" 2>&1)" && Bridge.exe "$f" &
fi
elif [ -d "$1" ]; then
cd "$1" || return
if exists tree; then
fifo_pager tree -L 3 -F
fifo_pager tree -L 3 --dirsfirst -C -F --noreport -i
elif exists exa; then
fifo_pager exa -G --colour=always 2>/dev/null
exa -G --colour=always 2>/dev/null
else
fifo_pager ls --color=always
fi
elif [ "$encoding" = "binary" ]; then
if [ "${mimetype%%/*}" = "image" ] ; then
if [ "$TERMINAL" = "kitty" ]; then
# Kitty terminal users can use the native image preview method.
kitty +kitten icat --silent --transfer-mode=stream --stdin=no \
"$1" &
elif exists catimg; then
catimg "$1"
elif exists viu; then
viu -t "$1"
else
fifo_pager print_bin_info "$1"
fi
elif [ "$mimetype" = "application/zip" ] ; then
if [ "${mimetype%%/*}" = "image" ]; then
image_preview "$cols" "$lines" "$1"
elif [ "$mimetype" = "application/zip" ]; then
fifo_pager unzip -l "$1"
elif [ "$ext" = "gz" ] || [ "$ext" = "bz2" ] ; then
elif [ "$ext" = "gz" ] || [ "$ext" = "bz2" ]; then
fifo_pager tar -tvf "$1"
else
fifo_pager print_bin_info "$1"
fi
elif [ "$mimetype" = "text/troff" ] ; then
elif [ "$mimetype" = "text/troff" ]; then
fifo_pager man -Pcat -l "$1"
else
if exists bat; then
@ -182,21 +185,84 @@ preview_file () {
fi
}
if [ "$PREVIEW_MODE" ] ; then
if [ ! -r "$NNN_FIFO" ] ; then
image_preview() {
if [ "$TERMINAL" = "kitty" ]; then
# Kitty terminal users can use the native image preview method.
kitty +kitten icat --silent --place "$1"x"$2"@0x0 --transfer-mode=stream --stdin=no \
"$3"
elif exists QuickLook.exe && stat "$3" >/dev/null 2>&1; then
f="$(wslpath -w "$3" 2>&1)" && QuickLook.exe "$f"
elif exists Bridge.exe && stat "$3" >/dev/null 2>&1; then
f="$(wslpath -w "$3" 2>&1)" && Bridge.exe "$f"
elif exists ueberzug; then
ueberzug_layer "$1" "$2" "$3"
elif exists catimg; then
catimg "$3" &
echo "$!" > "$GIFPID"
elif exists viu; then
viu -t "$3" &
echo "$!" > "$GIFPID"
else
fifo_pager print_bin_info "$3"
fi
}
ueberzug_layer() {
printf '{"action": "add", "identifier": "nnn_ueberzug", "x": 0, "y": 0, "width": "%s", "height": "%s", "path": "%s"}\n' "$1" "$2" "$3" > "$FIFO_UEBERZUG"
}
ueberzug_remove() {
printf '{"action": "remove", "identifier": "nnn_ueberzug"}\n' > "$FIFO_UEBERZUG"
}
ueberzug_refresh() {
clear
kill "$(cat "$GIFPID" 2>/dev/null)" >/dev/null 2>&1
pkill -P "$$" >/dev/null 2>&1
pkill -f -n preview-tui-ext >/dev/null 2>&1
tail --follow "$FIFO_UEBERZUG" | ueberzug layer --silent --parser json &
preview_file "$(cat "$CURSEL")"
echo > "$NNN_FIFO"
preview_fifo &
wait
}
if [ "$TERMINAL" != "kitty" ] && [ "$PREVIEW_MODE" ] && exists ueberzug; then
trap 'ueberzug_refresh' WINCH
trap 'rm "$FIFO_UEBERZUG" "$PAGERPID" "$GIFPID" "$CURSEL"' INT HUP EXIT
fi
preview_fifo() {
# use cat instead of 'exec <' to avoid issues with dash shell
# shellcheck disable=SC2002
cat "$NNN_FIFO" |\
while read -r selection; do
kill "$(cat "$GIFPID" 2>/dev/null)" >/dev/null 2>&1
kill "$(cat "$PAGERPID" 2>/dev/null)" >/dev/null 2>&1
[ "$TERMINAL" != "kitty" ] && exists ueberzug && ueberzug_remove
preview_file "$selection"
echo "$selection" > "$CURSEL"
done
[ "$TERMINAL" != "kitty" ] && exists ueberzug && rm "$FIFO_UEBERZUG"
rm "$PAGERPID" "$GIFPID" "$CURSEL" >/dev/null 2>&1
pkill -P "$$" >/dev/null 2>&1
}
if [ "$PREVIEW_MODE" ]; then
if [ ! -r "$NNN_FIFO" ]; then
echo "No FIFO available! (\$NNN_FIFO='$NNN_FIFO')" >&2
read -r
exit 1
fi
preview_file "$1"
if [ "$TERMINAL" != "kitty" ] && exists ueberzug; then
FIFO_UEBERZUG="$TMPDIR/nnn-ueberzug-fifo.$$"
mkfifo "$FIFO_UEBERZUG"
tail --follow "$FIFO_UEBERZUG" | ueberzug layer --silent --parser json &
fi
# use cat instead of 'exec <' to avoid issues with dash shell
# shellcheck disable=SC2002
cat "$NNN_FIFO" |\
while read -r selection ; do
preview_file "$selection"
done
preview_file "$1"
preview_fifo &
wait
# Restoring the previous layout for kitty users. This will only work for
# kitty >= 0.18.0.
@ -207,11 +273,22 @@ if [ "$PREVIEW_MODE" ] ; then
exit 0
fi
if pgrep -f "cat $NNN_FIFO" >/dev/null; then
if exists QuickLook.exe && stat "$1" >/dev/null 2>&1; then
f="$(wslpath -w "$1" 2>&1)" && QuickLook.exe "$f" &
elif exists Bridge.exe && stat "$1" >/dev/null 2>&1; then
f="$(wslpath -w "$1" 2>&1)" && Bridge.exe "$f" &
fi
pkill -f "cat $NNN_FIO"
exit 0
fi
if [ "$TERMINAL" = "tmux" ]; then
# tmux splits are inverted
if [ "$SPLIT" = "v" ]; then SPLIT="h"; else SPLIT="v"; fi
tmux split-window -e "NNN_FIFO=$NNN_FIFO" -e "PREVIEW_MODE=1" -d"$SPLIT" "$0" "$1"
tmux split-window -e "NNN_FIFO=$NNN_FIFO" -e "PREVIEW_MODE=1" -e "PAGER=$PAGER" \
-e "USE_SCOPE=$USE_SCOPE" -e "SPLIT=$SPLIT" -e "USE_PISTOL=$USE_PISTOL" \
-d"$SPLIT" "$0" "$1"
elif [ "$TERMINAL" = "kitty" ]; then
# Setting the layout for the new window. It will be restored after the
# script ends.
@ -226,6 +303,8 @@ elif [ "$TERMINAL" = "kitty" ]; then
--env "USE_SCOPE=$USE_SCOPE" --env "SPLIT=$SPLIT" \
--env "USE_PISTOL=$USE_PISTOL" \
--location "${SPLIT}split" "$0" "$1" >/dev/null
elif exists QuickLook.exe || exists Bridge.exe; then
QUICKLOOK=1 PREVIEW_MODE=1 "$0" "$1" >/dev/null &
else
PREVIEW_MODE=1 $TERMINAL -e "$0" "$1" &
fi

View File

@ -0,0 +1,45 @@
#!/usr/bin/env sh
# Description: Batch rename selection or current directory with qmv
#
# Notes:
# - Try to mimic current batch rename functionality but with correct
# handling of edge cases by qmv or vidir.
# - Qmv opens with hidden files if no selection is used. Selected
# directories are shown.
# - Vidir don't show directories nor hidden files.
#
# Shell: POSIX compliant
# Author: José Neder
selection=${NNN_SEL:-${XDG_CONFIG_HOME:-$HOME/.config}/nnn/.selection}
if type qmv >/dev/null 2>&1; then
batchrenamesel="qmv -fdo -da"
batchrename="qmv -fdo -a"
elif type vidir >/dev/null 2>&1; then
batchrenamesel="vidir"
batchrename="vidir"
else
printf "there is not batchrename program installed."
exit
fi
if [ -s "$selection" ]; then
printf "rename selection? "
read -r resp
fi
if [ "$resp" = "y" ]; then
# -o flag is necessary for interactive editors
xargs -o -0 $batchrenamesel < "$selection"
# Clear selection
if [ -p "$NNN_PIPE" ]; then
printf "-" > "$NNN_PIPE"
fi
elif [ ! "$(LC_ALL=C ls -a)" = ".
.." ]; then
# On older systems that don't have ls -A
$batchrename
fi

View File

@ -0,0 +1,36 @@
#!/usr/bin/env sh
# Description: Create an mp3 ringtone out of an audio file in any format
# Needs user to provide start and end where to cut the file
# Input file audio.ext results in audio_ringtone.mp3
#
# Tip: To convert a complete media file, set start as 0 and
# the runtime of the file as end.
#
# Dependencies: date, ffmpeg
#
# Shell: POSIX compliant
# Author: Arun Prakash Jana
if [ -n "$1" ]; then
printf "start (hh:mm:ss): "
read -r start
st=$(date -d "$start" +%s) || exit 1
printf "end (hh:mm:ss): "
read -r end
et=$(date -d "$end" +%s) || exit 1
if [ "$st" -ge "$et" ]; then
printf "error: start >= end "
read -r _
exit 1
fi
interval=$(( et - st ))
outfile=$(basename "$1")
outfile="${outfile%.*}"_ringtone.mp3
ffmpeg -i "$1" -ss "$start" -t "$interval" -vn -sn -acodec libmp3lame -q:a 2 "$outfile"
fi

View File

@ -0,0 +1,26 @@
#!/usr/bin/env sh
# Description: Simple script to give copy-paste a progress percentage
# by utilizing rsync.
#
# LIMITATION: this won't work when pasting to MTP device.
#
# Dependencies: rsync
#
# Shell: POSIX compliant
# Author: Benawi Adha
sel=${NNN_SEL:-${XDG_CONFIG_HOME:-$HOME/.config}/nnn/.selection}
# Choose one of these two schemes by commenting
# more verbose
# xargs -0 -a "$sel" -I % rsync -ah --progress % "$PWD"
# less verbose
xargs -0 -a "$sel" -I % rsync -ah --info=progress2 % "$PWD"
# Clear selection
if [ -p "$NNN_PIPE" ]; then
printf "-" > "$NNN_PIPE"
fi

View File

@ -0,0 +1,52 @@
#!/usr/bin/env sh
# Description: Splits the file passed as argument or joins selection
#
# Note: Adds numeric suffix to split files
# Adds '.out suffix to the first file to be joined and saves as output file for join
#
# Shell: POSIX compliant
# Authors: Arun Prakash Jana, ath3
selection=${NNN_SEL:-${XDG_CONFIG_HOME:-$HOME/.config}/nnn/.selection}
resp=s
if [ -s "$selection" ]; then
printf "press 's' (split current file) or 'j' (join selection): "
read -r resp
fi
if [ "$resp" = "j" ]; then
if [ -s "$selection" ]; then
arr=$(tr '\0' '\n' < "$selection")
if [ "$(echo "$arr" | wc -l)" -lt 2 ]; then
echo "joining needs at least 2 files"
exit
fi
for entry in $arr
do
if [ -d "$entry" ]; then
echo "cant join directories"
exit
fi
done
file="$(basename "$(echo "$arr" | sed -n '1p' | sed -e 's/[0-9][0-9]$//')")"
sort -z < "$selection" | xargs -0 -I{} cat {} > "${file}.out"
# Clear selection
if [ -p "$NNN_PIPE" ]; then
printf "-" > "$NNN_PIPE"
fi
fi
elif [ "$resp" = "s" ]; then
if [ -n "$1" ] && [ -f "$1" ]; then
# a single file is passed
printf "split size in MB: "
read -r size
if [ -n "$size" ]; then
split -d -b "$size"M "$1" "$1"
fi
fi
fi

View File

@ -7,15 +7,10 @@
EDITOR="${EDITOR:-vim}"
is_cmd_exists () {
which "$1" > /dev/null 2>&1
echo $?
}
if [ "$(is_cmd_exists sudo)" -eq "0" ]; then
if type sudo >/dev/null 2>&1; then
sudo "$EDITOR" "$1"
elif [ "$(is_cmd_exists sudoedit)" -eq "0" ]; then
elif type sudoedit >/dev/null 2>&1; then
sudoedit "$1"
elif [ "$(is_cmd_exists doas)" -eq "0" ]; then
elif type doas >/dev/null 2>&1; then
doas "$EDITOR" "$1"
fi

View File

@ -0,0 +1,18 @@
skip_welcome_message = true
startup = [
"zoxide init nushell --hook prompt | save ~/.local/share/nu/zoxide.nu",
"source ~/.local/share/nu/zoxide.nu",
"starship init nu | save ~/.local/share/nu/starship.nu",
"source ~/.local/share/nu/starship.nu"
]
prompt = "starship_prompt"
[line_editor]
completion_type = "list"
edit_mode = "vi"
[textview]
pager = "less -R"
paging_mode = "quitifonescreen"
true_color = true
theme = "base16"

Some files were not shown because too many files have changed in this diff Show More