From 448d5096d00325dc3d6c8f4e43d0d4d7afe06715 Mon Sep 17 00:00:00 2001 From: Bertrand Benjamin Date: Wed, 5 Jan 2022 11:25:33 +0100 Subject: [PATCH] Feat: init refact with test --- BV_boutique.yml | 25 - Choux.yml | 50 - Combava.yml | 42 - Panais.yml | 25 - Poivre.yml | 41 - README.md | 41 +- abertrand.yml | 25 - files/ansible.cfg | 497 -- files/autofs.choux | 1 - files/autofs.nas | 3 - files/choux_borg.service | 13 - files/choux_borg.sh | 54 - files/choux_borg.timer | 11 - files/dd_borg/40-backup.rules | 3 - files/dd_borg/automatic-backup.service | 7 - files/dd_borg/run.sh | 100 - files/dotfiles/Xdefaults | 99 - files/dotfiles/alacritty/alacritty.yml | 93 - files/dotfiles/config.fish | 12 - files/dotfiles/fishfile | 2 - files/dotfiles/gitconfig | 3 - files/dotfiles/mbsyncrc | 68 - files/dotfiles/moc/config | 654 -- files/dotfiles/moc/equalizer | 2 - files/dotfiles/moc/keymap | 183 - files/dotfiles/moc/softmixer | 4 - .../benjamin.jm.bertrand@gmail.com.muttrc | 43 - files/dotfiles/mutt/config.muttrc | 21 - files/dotfiles/mutt/dracula.muttrc | 44 - files/dotfiles/mutt/keybinding.muttrc | 17 - .../dotfiles/mutt/lafrite26@gmail.com.muttrc | 45 - files/dotfiles/mutt/muttrc | 8 - files/dotfiles/mutt/opytex.muttrc | 39 - files/dotfiles/newsboat/config | 28 - files/dotfiles/newsboat/urls | 51 - files/dotfiles/nvim/coc-settings.json | 11 - files/dotfiles/nvim/general/completion.vim | 18 - files/dotfiles/nvim/general/mappings.vim | 19 - files/dotfiles/nvim/general/settings.vim | 66 - files/dotfiles/nvim/init.vim | 18 - files/dotfiles/nvim/lua/lsp.lua | 58 - .../nvim/plug-config/coc-snippets.vim | 25 - files/dotfiles/nvim/plug-config/coc.vim | 0 files/dotfiles/nvim/plug-config/fzf.vim | 70 - files/dotfiles/nvim/plug-config/lightline.vim | 10 - .../nvim/plug-config/nvim-colorize.lua.vim | 1 - files/dotfiles/nvim/plug-config/ultisnips.vim | 1 - files/dotfiles/nvim/plug-config/vimtex.vim | 25 - files/dotfiles/nvim/vim-plug/plugins.vim | 41 - files/dotfiles/ssh/config_admin | 33 - files/dotfiles/ssh/config_me | 63 - files/dotfiles/tmux.conf | 199 - files/dotfiles/tmuxinator/bopytex.yml | 43 - files/dotfiles/tmuxinator/enseignement.yml | 39 - files/dotfiles/tmuxinator/mapytex.yml | 43 - files/dotfiles/tmuxinator/marbenj_sigal.yml | 38 - .../dotfiles/tmuxinator/marbenj_sigal_dev.yml | 38 - files/dotfiles/tmuxinator/marksEditor.yml | 38 - files/dotfiles/tmuxinator/notes_analysis.yml | 43 - files/dotfiles/tmuxinator/opytex.yml | 43 - files/dotfiles/tmuxinator/pymath.yml | 43 - files/dotfiles/tmuxinator/pytex.yml | 43 - files/dotfiles/tmuxinator/repytex.yml | 43 - files/dotfiles/tmuxinator/site_opytex.yml | 38 - files/dotfiles/tmuxp/bopytex.yml | 19 - files/dotfiles/tmuxp/enseignement.yml | 19 - files/dotfiles/tmuxp/mail.yml | 16 - files/dotfiles/tmuxp/mapytex.yml | 19 - files/dotfiles/tmuxp/viescopytex.yml | 20 - files/dotfiles/ultisnips/python.snippets | 25 - files/dotfiles/ultisnips/rst.snippets | 45 - files/dotfiles/ultisnips/tex.snippets | 52 - files/dotfiles/vdirsyncer/config | 102 - files/dotfiles/vifm/colors/Default.vifm | 80 - files/dotfiles/vifm/colors/zenburn_1.vifm | 29 - files/dotfiles/vifm/scripts/README | 6 - files/dotfiles/vifm/vifm-help.txt | 5899 ----------------- files/dotfiles/vifm/vifmrc | 476 -- files/dotfiles/vim/.netrwhist | 6 - files/dotfiles/vim/UltiSnips/python.snippets | 19 - files/dotfiles/vim/UltiSnips/rst.snippets | 15 - files/dotfiles/vim/config/base.vim | 118 - files/dotfiles/vim/config/plugins.vim | 88 - files/dotfiles/vim/templates/skeleton.py | 14 - files/dotfiles/vimrc | 124 - files/dotfiles/zsh/.zshrc | 81 - files/dotfiles/zsh/completion.zsh | 329 - files/dotfiles/zsh/key-bindings.zsh | 114 - files/dotfiles/zshenv | 17 - files/mpd.conf | 257 - files/nginx.conf | 51 - files/sshd_config | 117 - files/sshpubs/id_ed25519_choux2bv_admin.pub | 1 - .../sshpubs/id_ed25519_choux2panais_admin.pub | 1 - .../id_ed25519_choux2panais_content.pub | 1 - .../id_ed25519_combava2abertrand_admin.pub | 1 - files/sshpubs/id_ed25519_combava2bv_admin.pub | 1 - .../id_ed25519_combava2panais_admin.pub | 1 - .../id_ed25519_combava2panais_content.pub | 1 - files/sshpubs/id_ed25519_embrevade.pub | 1 - files/sshpubs/id_rsa_embrevade.pub | 1 - files/sshpubs/id_rsa_nas2bv_backup.pub | 1 - files/sshpubs/id_rsa_nas2panais_backup.pub | 1 - files/sshpubs/id_rsa_poivre_borg.pub | 1 - files/sshpubs/id_rsa_rpi3.pub | 1 - files/sudoers | 7 - requirements.txt | 49 + roles/.vagrant/bundler/global.sol | 1 + .../default/virtualbox/action_provision | 1 + .../default/virtualbox/action_set_name | 1 + .../machines/default/virtualbox/box_meta | 1 + .../machines/default/virtualbox/creator_uid | 1 + roles/.vagrant/machines/default/virtualbox/id | 1 + .../machines/default/virtualbox/index_uuid | 1 + .../machines/default/virtualbox/private_key | 27 + .../default/virtualbox/synced_folders | 1 + .../machines/default/virtualbox/vagrant_cwd | 1 + .../inventory/vagrant_ansible_inventory | 3 + roles/.vagrant/rgloader/loader.rb | 9 + roles/Vagrantfile | 73 + roles/arch_aur/.travis.yml | 29 + roles/arch_aur/.yamllint | 33 + roles/arch_aur/README.md | 38 + roles/arch_aur/defaults/main.yml | 2 + roles/arch_aur/handlers/main.yml | 2 + roles/arch_aur/molecule/default/INSTALL.rst | 23 + roles/arch_aur/molecule/default/converge.yml | 7 + roles/arch_aur/molecule/default/molecule.yml | 11 + .../tests/__pycache__/conftest.cpython-39.pyc | Bin 0 -> 974 bytes .../__pycache__/test_default.cpython-39.pyc | Bin 0 -> 601 bytes .../molecule/default/tests/conftest.py | 22 + .../molecule/default/tests/test_default.py | 10 + roles/arch_aur/tasks/main.yml | 47 + roles/arch_aur/tests/inventory | 2 + roles/arch_aur/tests/test.yml | 5 + roles/arch_aur/vars/main.yml | 2 + roles/arch_pkg_install/.travis.yml | 29 + roles/arch_pkg_install/.yamllint | 33 + roles/arch_pkg_install/README.md | 38 + roles/arch_pkg_install/defaults/main.yml | 136 + roles/arch_pkg_install/handlers/main.yml | 2 + .../molecule/default/INSTALL.rst | 23 + .../molecule/default/converge.yml | 7 + .../molecule/default/molecule.yml | 11 + .../tests/__pycache__/conftest.cpython-39.pyc | Bin 0 -> 982 bytes .../__pycache__/test_default.cpython-39.pyc | Bin 0 -> 609 bytes .../molecule/default/tests/conftest.py | 22 + .../molecule/default/tests/test_default.py | 10 + roles/arch_pkg_install/tasks/main.yml | 14 + roles/arch_pkg_install/tests/inventory | 2 + roles/arch_pkg_install/tests/test.yml | 5 + roles/arch_pkg_install/vars/main.yml | 2 + roles/dotfiles/.yamllint | 33 + roles/dotfiles/defaults/main.yml | 7 + roles/dotfiles/molecule/.yamllint | 33 + roles/dotfiles/molecule/default/INSTALL.rst | 23 + roles/dotfiles/molecule/default/converge.yml | 7 + roles/dotfiles/molecule/default/molecule.yml | 14 + .../conftest.cpython-39-pytest-6.2.5.pyc | Bin 0 -> 950 bytes .../tests/__pycache__/conftest.cpython-39.pyc | Bin 0 -> 974 bytes .../test_default.cpython-39-pytest-6.2.5.pyc | Bin 0 -> 1832 bytes .../__pycache__/test_default.cpython-39.pyc | Bin 0 -> 601 bytes .../molecule/default/tests/conftest.py | 22 + .../molecule/default/tests/test_default.py | 23 + roles/dotfiles/tasks/arch.yml | 14 + roles/dotfiles/tasks/debian.yml | 14 + roles/dotfiles/tasks/main.yml | 20 + roles/gnome/.travis.yml | 29 + roles/gnome/.yamllint | 33 + roles/gnome/README.md | 38 + roles/gnome/defaults/main.yml | 4 + roles/gnome/handlers/main.yml | 2 + roles/gnome/molecule/default/INSTALL.rst | 23 + roles/gnome/molecule/default/converge.yml | 7 + roles/gnome/molecule/default/molecule.yml | 11 + .../tests/__pycache__/conftest.cpython-39.pyc | Bin 0 -> 982 bytes .../__pycache__/test_default.cpython-39.pyc | Bin 0 -> 609 bytes .../gnome/molecule/default/tests/conftest.py | 22 + .../molecule/default/tests/test_default.py | 10 + roles/gnome/tasks/arch.yml | 53 + .../gnome/tasks/main.yml | 58 +- roles/gnome/tests/inventory | 2 + roles/gnome/tests/test.yml | 5 + roles/gnome/vars/main.yml | 2 + roles/mopidy-server/.travis.yml | 29 + roles/mopidy-server/.yamllint | 33 + roles/mopidy-server/README.md | 38 + roles/mopidy-server/defaults/main.yml | 2 + roles/mopidy-server/handlers/main.yml | 2 + .../molecule/default/INSTALL.rst | 23 + .../molecule/default/converge.yml | 7 + .../molecule/default/molecule.yml | 12 + .../conftest.cpython-39-pytest-6.2.5.pyc | Bin 0 -> 955 bytes .../tests/__pycache__/conftest.cpython-39.pyc | Bin 0 -> 974 bytes .../test_default.cpython-39-pytest-6.2.5.pyc | Bin 0 -> 1302 bytes .../__pycache__/test_default.cpython-39.pyc | Bin 0 -> 601 bytes .../molecule/default/tests/conftest.py | 22 + .../molecule/default/tests/test_default.py | 10 + roles/mopidy-server/tasks/main.yml | 28 + roles/mopidy-server/tests/inventory | 2 + roles/mopidy-server/tests/test.yml | 5 + roles/mopidy-server/vars/main.yml | 2 + roles/users/.yamllint | 33 + roles/users/README.md | 38 + roles/users/defaults/main.yml | 21 + .../users/files/id_encrypt_fool.pub | 2 +- roles/users/handlers/main.yml | 2 + roles/users/molecule/default/INSTALL.rst | 23 + roles/users/molecule/default/converge.yml | 7 + roles/users/molecule/default/molecule.yml | 14 + .../__pycache__/conftest.cpython-310.pyc | Bin 0 -> 981 bytes .../__pycache__/test_default.cpython-310.pyc | Bin 0 -> 604 bytes .../users/molecule/default/tests/conftest.py | 22 + .../molecule/default/tests/test_default.py | 10 + tasks/users.yml => roles/users/tasks/main.yml | 15 +- roles/users/tests/inventory | 2 + roles/users/tests/test.yml | 5 + roles/users/vars/main.yml | 2 + roles/vagrant_playbook.yml | 8 + rpi3.yml | 23 - tasks/NAS_mounts.yml | 61 - tasks/ansible.yml | 11 - tasks/arch_CLI_music.yml | 16 - tasks/arch_CLI_packages.yml | 91 - tasks/arch_aur.yml | 44 - tasks/arch_docker.yml | 12 - tasks/arch_graphicals.yml | 107 - tasks/arch_programming.yml | 26 - tasks/arch_teacher.yml | 22 - tasks/arch_virtualbox.yml | 33 - tasks/borg_server.yml | 68 - tasks/choux_arch_hardware.yml | 9 - tasks/choux_borg_backup.yml | 45 - tasks/dd_backup.yml | 47 - tasks/deb_CLI_packages.yml | 36 - tasks/deb_docker.yml | 63 - tasks/dotfiles.yml | 199 - tasks/dotfiles_desktop.yml | 111 - tasks/epaper_driver.yml | 37 - tasks/gaming.yml | 34 - tasks/home_autofs.yml | 43 - tasks/laptop.yml | 13 - tasks/nfs_share.yml | 38 - tasks/pacman_cache_server.yml | 25 - tasks/prompt.yml | 24 - tasks/ssh.yml | 50 - tasks/sudo.yml | 15 - tasks/test.yml | 5 - tasks/wine.yml | 30 - tasks/zsh.yml | 70 - vars/BV_boutique.yml | 8 - vars/Choux.yml | 30 - vars/Combava.yml | 14 - vars/Panais.yml | 12 - vars/abertrand.yml | 12 - vars/common.yml | 22 - vars/home.yml | 9 - vars/rpi3.yml | 4 - vars/server.yml | 8 - vars/users.yml | 27 - 260 files changed, 1606 insertions(+), 13294 deletions(-) delete mode 100644 BV_boutique.yml delete mode 100644 Choux.yml delete mode 100644 Combava.yml delete mode 100644 Panais.yml delete mode 100644 Poivre.yml delete mode 100644 abertrand.yml delete mode 100644 files/ansible.cfg delete mode 100644 files/autofs.choux delete mode 100644 files/autofs.nas delete mode 100644 files/choux_borg.service delete mode 100644 files/choux_borg.sh delete mode 100644 files/choux_borg.timer delete mode 100644 files/dd_borg/40-backup.rules delete mode 100644 files/dd_borg/automatic-backup.service delete mode 100644 files/dd_borg/run.sh delete mode 100644 files/dotfiles/Xdefaults delete mode 100644 files/dotfiles/alacritty/alacritty.yml delete mode 100644 files/dotfiles/config.fish delete mode 100644 files/dotfiles/fishfile delete mode 100644 files/dotfiles/gitconfig delete mode 100644 files/dotfiles/mbsyncrc delete mode 100755 files/dotfiles/moc/config delete mode 100644 files/dotfiles/moc/equalizer delete mode 100644 files/dotfiles/moc/keymap delete mode 100644 files/dotfiles/moc/softmixer delete mode 100644 files/dotfiles/mutt/benjamin.jm.bertrand@gmail.com.muttrc delete mode 100644 files/dotfiles/mutt/config.muttrc delete mode 100644 files/dotfiles/mutt/dracula.muttrc delete mode 100644 files/dotfiles/mutt/keybinding.muttrc delete mode 100644 files/dotfiles/mutt/lafrite26@gmail.com.muttrc delete mode 100644 files/dotfiles/mutt/muttrc delete mode 100644 files/dotfiles/mutt/opytex.muttrc delete mode 100644 files/dotfiles/newsboat/config delete mode 100644 files/dotfiles/newsboat/urls delete mode 100644 files/dotfiles/nvim/coc-settings.json delete mode 100644 files/dotfiles/nvim/general/completion.vim delete mode 100644 files/dotfiles/nvim/general/mappings.vim delete mode 100644 files/dotfiles/nvim/general/settings.vim delete mode 100644 files/dotfiles/nvim/init.vim delete mode 100644 files/dotfiles/nvim/lua/lsp.lua delete mode 100644 files/dotfiles/nvim/plug-config/coc-snippets.vim delete mode 100644 files/dotfiles/nvim/plug-config/coc.vim delete mode 100644 files/dotfiles/nvim/plug-config/fzf.vim delete mode 100644 files/dotfiles/nvim/plug-config/lightline.vim delete mode 100644 files/dotfiles/nvim/plug-config/nvim-colorize.lua.vim delete mode 100644 files/dotfiles/nvim/plug-config/ultisnips.vim delete mode 100644 files/dotfiles/nvim/plug-config/vimtex.vim delete mode 100644 files/dotfiles/nvim/vim-plug/plugins.vim delete mode 100755 files/dotfiles/ssh/config_admin delete mode 100755 files/dotfiles/ssh/config_me delete mode 100644 files/dotfiles/tmux.conf delete mode 100644 files/dotfiles/tmuxinator/bopytex.yml delete mode 100644 files/dotfiles/tmuxinator/enseignement.yml delete mode 100644 files/dotfiles/tmuxinator/mapytex.yml delete mode 100644 files/dotfiles/tmuxinator/marbenj_sigal.yml delete mode 100644 files/dotfiles/tmuxinator/marbenj_sigal_dev.yml delete mode 100644 files/dotfiles/tmuxinator/marksEditor.yml delete mode 100644 files/dotfiles/tmuxinator/notes_analysis.yml delete mode 100644 files/dotfiles/tmuxinator/opytex.yml delete mode 100644 files/dotfiles/tmuxinator/pymath.yml delete mode 100644 files/dotfiles/tmuxinator/pytex.yml delete mode 100644 files/dotfiles/tmuxinator/repytex.yml delete mode 100644 files/dotfiles/tmuxinator/site_opytex.yml delete mode 100644 files/dotfiles/tmuxp/bopytex.yml delete mode 100644 files/dotfiles/tmuxp/enseignement.yml delete mode 100644 files/dotfiles/tmuxp/mail.yml delete mode 100644 files/dotfiles/tmuxp/mapytex.yml delete mode 100644 files/dotfiles/tmuxp/viescopytex.yml delete mode 100644 files/dotfiles/ultisnips/python.snippets delete mode 100644 files/dotfiles/ultisnips/rst.snippets delete mode 100644 files/dotfiles/ultisnips/tex.snippets delete mode 100644 files/dotfiles/vdirsyncer/config delete mode 100644 files/dotfiles/vifm/colors/Default.vifm delete mode 100644 files/dotfiles/vifm/colors/zenburn_1.vifm delete mode 100644 files/dotfiles/vifm/scripts/README delete mode 100644 files/dotfiles/vifm/vifm-help.txt delete mode 100644 files/dotfiles/vifm/vifmrc delete mode 100644 files/dotfiles/vim/.netrwhist delete mode 100644 files/dotfiles/vim/UltiSnips/python.snippets delete mode 100644 files/dotfiles/vim/UltiSnips/rst.snippets delete mode 100644 files/dotfiles/vim/config/base.vim delete mode 100644 files/dotfiles/vim/config/plugins.vim delete mode 100644 files/dotfiles/vim/templates/skeleton.py delete mode 100644 files/dotfiles/vimrc delete mode 100644 files/dotfiles/zsh/.zshrc delete mode 100644 files/dotfiles/zsh/completion.zsh delete mode 100644 files/dotfiles/zsh/key-bindings.zsh delete mode 100644 files/dotfiles/zshenv delete mode 100644 files/mpd.conf delete mode 100644 files/nginx.conf delete mode 100644 files/sshd_config delete mode 100644 files/sshpubs/id_ed25519_choux2bv_admin.pub delete mode 100755 files/sshpubs/id_ed25519_choux2panais_admin.pub delete mode 100644 files/sshpubs/id_ed25519_choux2panais_content.pub delete mode 100644 files/sshpubs/id_ed25519_combava2abertrand_admin.pub delete mode 100644 files/sshpubs/id_ed25519_combava2bv_admin.pub delete mode 100644 files/sshpubs/id_ed25519_combava2panais_admin.pub delete mode 100644 files/sshpubs/id_ed25519_combava2panais_content.pub delete mode 100644 files/sshpubs/id_ed25519_embrevade.pub delete mode 100644 files/sshpubs/id_rsa_embrevade.pub delete mode 100644 files/sshpubs/id_rsa_nas2bv_backup.pub delete mode 100644 files/sshpubs/id_rsa_nas2panais_backup.pub delete mode 100644 files/sshpubs/id_rsa_poivre_borg.pub delete mode 100644 files/sshpubs/id_rsa_rpi3.pub delete mode 100644 files/sudoers create mode 100644 requirements.txt create mode 100644 roles/.vagrant/bundler/global.sol create mode 100644 roles/.vagrant/machines/default/virtualbox/action_provision create mode 100644 roles/.vagrant/machines/default/virtualbox/action_set_name create mode 100644 roles/.vagrant/machines/default/virtualbox/box_meta create mode 100644 roles/.vagrant/machines/default/virtualbox/creator_uid create mode 100644 roles/.vagrant/machines/default/virtualbox/id create mode 100644 roles/.vagrant/machines/default/virtualbox/index_uuid create mode 100644 roles/.vagrant/machines/default/virtualbox/private_key create mode 100644 roles/.vagrant/machines/default/virtualbox/synced_folders create mode 100644 roles/.vagrant/machines/default/virtualbox/vagrant_cwd create mode 100644 roles/.vagrant/provisioners/ansible/inventory/vagrant_ansible_inventory create mode 100644 roles/.vagrant/rgloader/loader.rb create mode 100644 roles/Vagrantfile create mode 100644 roles/arch_aur/.travis.yml create mode 100644 roles/arch_aur/.yamllint create mode 100644 roles/arch_aur/README.md create mode 100644 roles/arch_aur/defaults/main.yml create mode 100644 roles/arch_aur/handlers/main.yml create mode 100644 roles/arch_aur/molecule/default/INSTALL.rst create mode 100644 roles/arch_aur/molecule/default/converge.yml create mode 100644 roles/arch_aur/molecule/default/molecule.yml create mode 100644 roles/arch_aur/molecule/default/tests/__pycache__/conftest.cpython-39.pyc create mode 100644 roles/arch_aur/molecule/default/tests/__pycache__/test_default.cpython-39.pyc create mode 100644 roles/arch_aur/molecule/default/tests/conftest.py create mode 100644 roles/arch_aur/molecule/default/tests/test_default.py create mode 100644 roles/arch_aur/tasks/main.yml create mode 100644 roles/arch_aur/tests/inventory create mode 100644 roles/arch_aur/tests/test.yml create mode 100644 roles/arch_aur/vars/main.yml create mode 100644 roles/arch_pkg_install/.travis.yml create mode 100644 roles/arch_pkg_install/.yamllint create mode 100644 roles/arch_pkg_install/README.md create mode 100644 roles/arch_pkg_install/defaults/main.yml create mode 100644 roles/arch_pkg_install/handlers/main.yml create mode 100644 roles/arch_pkg_install/molecule/default/INSTALL.rst create mode 100644 roles/arch_pkg_install/molecule/default/converge.yml create mode 100644 roles/arch_pkg_install/molecule/default/molecule.yml create mode 100644 roles/arch_pkg_install/molecule/default/tests/__pycache__/conftest.cpython-39.pyc create mode 100644 roles/arch_pkg_install/molecule/default/tests/__pycache__/test_default.cpython-39.pyc create mode 100644 roles/arch_pkg_install/molecule/default/tests/conftest.py create mode 100644 roles/arch_pkg_install/molecule/default/tests/test_default.py create mode 100644 roles/arch_pkg_install/tasks/main.yml create mode 100644 roles/arch_pkg_install/tests/inventory create mode 100644 roles/arch_pkg_install/tests/test.yml create mode 100644 roles/arch_pkg_install/vars/main.yml create mode 100644 roles/dotfiles/.yamllint create mode 100644 roles/dotfiles/defaults/main.yml create mode 100644 roles/dotfiles/molecule/.yamllint create mode 100644 roles/dotfiles/molecule/default/INSTALL.rst create mode 100644 roles/dotfiles/molecule/default/converge.yml create mode 100644 roles/dotfiles/molecule/default/molecule.yml create mode 100644 roles/dotfiles/molecule/default/tests/__pycache__/conftest.cpython-39-pytest-6.2.5.pyc create mode 100644 roles/dotfiles/molecule/default/tests/__pycache__/conftest.cpython-39.pyc create mode 100644 roles/dotfiles/molecule/default/tests/__pycache__/test_default.cpython-39-pytest-6.2.5.pyc create mode 100644 roles/dotfiles/molecule/default/tests/__pycache__/test_default.cpython-39.pyc create mode 100644 roles/dotfiles/molecule/default/tests/conftest.py create mode 100644 roles/dotfiles/molecule/default/tests/test_default.py create mode 100644 roles/dotfiles/tasks/arch.yml create mode 100644 roles/dotfiles/tasks/debian.yml create mode 100644 roles/dotfiles/tasks/main.yml create mode 100644 roles/gnome/.travis.yml create mode 100644 roles/gnome/.yamllint create mode 100644 roles/gnome/README.md create mode 100644 roles/gnome/defaults/main.yml create mode 100644 roles/gnome/handlers/main.yml create mode 100644 roles/gnome/molecule/default/INSTALL.rst create mode 100644 roles/gnome/molecule/default/converge.yml create mode 100644 roles/gnome/molecule/default/molecule.yml create mode 100644 roles/gnome/molecule/default/tests/__pycache__/conftest.cpython-39.pyc create mode 100644 roles/gnome/molecule/default/tests/__pycache__/test_default.cpython-39.pyc create mode 100644 roles/gnome/molecule/default/tests/conftest.py create mode 100644 roles/gnome/molecule/default/tests/test_default.py create mode 100644 roles/gnome/tasks/arch.yml rename tasks/arch_gnome.yml => roles/gnome/tasks/main.yml (62%) create mode 100644 roles/gnome/tests/inventory create mode 100644 roles/gnome/tests/test.yml create mode 100644 roles/gnome/vars/main.yml create mode 100644 roles/mopidy-server/.travis.yml create mode 100644 roles/mopidy-server/.yamllint create mode 100644 roles/mopidy-server/README.md create mode 100644 roles/mopidy-server/defaults/main.yml create mode 100644 roles/mopidy-server/handlers/main.yml create mode 100644 roles/mopidy-server/molecule/default/INSTALL.rst create mode 100644 roles/mopidy-server/molecule/default/converge.yml create mode 100644 roles/mopidy-server/molecule/default/molecule.yml create mode 100644 roles/mopidy-server/molecule/default/tests/__pycache__/conftest.cpython-39-pytest-6.2.5.pyc create mode 100644 roles/mopidy-server/molecule/default/tests/__pycache__/conftest.cpython-39.pyc create mode 100644 roles/mopidy-server/molecule/default/tests/__pycache__/test_default.cpython-39-pytest-6.2.5.pyc create mode 100644 roles/mopidy-server/molecule/default/tests/__pycache__/test_default.cpython-39.pyc create mode 100644 roles/mopidy-server/molecule/default/tests/conftest.py create mode 100644 roles/mopidy-server/molecule/default/tests/test_default.py create mode 100644 roles/mopidy-server/tasks/main.yml create mode 100644 roles/mopidy-server/tests/inventory create mode 100644 roles/mopidy-server/tests/test.yml create mode 100644 roles/mopidy-server/vars/main.yml create mode 100644 roles/users/.yamllint create mode 100644 roles/users/README.md create mode 100644 roles/users/defaults/main.yml rename files/sshpubs/id_ed25519_home.pub => roles/users/files/id_encrypt_fool.pub (66%) create mode 100644 roles/users/handlers/main.yml create mode 100644 roles/users/molecule/default/INSTALL.rst create mode 100644 roles/users/molecule/default/converge.yml create mode 100644 roles/users/molecule/default/molecule.yml create mode 100644 roles/users/molecule/default/tests/__pycache__/conftest.cpython-310.pyc create mode 100644 roles/users/molecule/default/tests/__pycache__/test_default.cpython-310.pyc create mode 100644 roles/users/molecule/default/tests/conftest.py create mode 100644 roles/users/molecule/default/tests/test_default.py rename tasks/users.yml => roles/users/tasks/main.yml (62%) create mode 100644 roles/users/tests/inventory create mode 100644 roles/users/tests/test.yml create mode 100644 roles/users/vars/main.yml create mode 100644 roles/vagrant_playbook.yml delete mode 100644 rpi3.yml delete mode 100644 tasks/NAS_mounts.yml delete mode 100644 tasks/ansible.yml delete mode 100644 tasks/arch_CLI_music.yml delete mode 100644 tasks/arch_CLI_packages.yml delete mode 100644 tasks/arch_aur.yml delete mode 100644 tasks/arch_docker.yml delete mode 100644 tasks/arch_graphicals.yml delete mode 100644 tasks/arch_programming.yml delete mode 100644 tasks/arch_teacher.yml delete mode 100644 tasks/arch_virtualbox.yml delete mode 100644 tasks/borg_server.yml delete mode 100644 tasks/choux_arch_hardware.yml delete mode 100644 tasks/choux_borg_backup.yml delete mode 100644 tasks/dd_backup.yml delete mode 100644 tasks/deb_CLI_packages.yml delete mode 100644 tasks/deb_docker.yml delete mode 100644 tasks/dotfiles.yml delete mode 100644 tasks/dotfiles_desktop.yml delete mode 100644 tasks/epaper_driver.yml delete mode 100644 tasks/gaming.yml delete mode 100644 tasks/home_autofs.yml delete mode 100644 tasks/laptop.yml delete mode 100644 tasks/nfs_share.yml delete mode 100644 tasks/pacman_cache_server.yml delete mode 100644 tasks/prompt.yml delete mode 100644 tasks/ssh.yml delete mode 100644 tasks/sudo.yml delete mode 100644 tasks/test.yml delete mode 100644 tasks/wine.yml delete mode 100644 tasks/zsh.yml delete mode 100644 vars/BV_boutique.yml delete mode 100644 vars/Choux.yml delete mode 100644 vars/Combava.yml delete mode 100644 vars/Panais.yml delete mode 100644 vars/abertrand.yml delete mode 100644 vars/common.yml delete mode 100644 vars/home.yml delete mode 100644 vars/rpi3.yml delete mode 100644 vars/server.yml delete mode 100644 vars/users.yml diff --git a/BV_boutique.yml b/BV_boutique.yml deleted file mode 100644 index 3b823d2..0000000 --- a/BV_boutique.yml +++ /dev/null @@ -1,25 +0,0 @@ ---- -- hosts: localhost - connection: local - - vars_files: - - vars/common.yml - - vars/users.yml - - vars/server.yml - - vars/BV_boutique.yml - - tasks: - - include: tasks/ansible.yml - - include: tasks/deb_CLI_packages.yml - - include: tasks/prompt.yml - - include: tasks/users.yml - - include: tasks/sudo.yml - - include: tasks/ssh.yml - - include: tasks/dotfiles.yml - - include: tasks/deb_docker.yml - - handlers: - - name: restart sshd - service: - name: sshd - state: restarted diff --git a/Choux.yml b/Choux.yml deleted file mode 100644 index 21b6c18..0000000 --- a/Choux.yml +++ /dev/null @@ -1,50 +0,0 @@ ---- -- hosts: localhost - connection: local - - vars_files: - - vars/common.yml - - vars/users.yml - #- vars/home.yml - - vars/Choux.yml - - tasks: - # - include: tasks/test.yml - - include: tasks/ansible.yml - - include: tasks/arch_aur.yml - - include: tasks/pacman_cache_server.yml - - include: tasks/arch_CLI_packages.yml - - include: tasks/prompt.yml - - include: tasks/sudo.yml - - include: tasks/users.yml - - include: tasks/ssh.yml - - include: tasks/arch_programming.yml - - include: tasks/arch_teacher.yml - - include: tasks/arch_gnome.yml - - include: tasks/arch_graphicals.yml - - include: tasks/dotfiles.yml - - include: tasks/dotfiles_desktop.yml - - include: tasks/nfs_share.yml - - include: tasks/wine.yml - - include: tasks/gaming.yml - - include: tasks/choux_borg_backup.yml - - include: tasks/arch_virtualbox.yml - - include: tasks/arch_docker.yml - - handlers: - - name: restart sshd - service: - name: sshd - state: restarted - - name: restart nfs-server - service: - name: nfs-server - state: restarted - - name: restart nfs-client - service: - name: nfs-client - state: restarted - - name: restart autofs - service: - name: autofs - state: restarted diff --git a/Combava.yml b/Combava.yml deleted file mode 100644 index ec741bf..0000000 --- a/Combava.yml +++ /dev/null @@ -1,42 +0,0 @@ ---- -- hosts: localhost - connection: local - - vars_files: - - vars/common.yml - - vars/users.yml - # - vars/home.yml - - vars/Combava.yml - - tasks: - - include: tasks/ansible.yml - - include: tasks/arch_aur.yml - - include: tasks/arch_CLI_packages.yml - - include: tasks/dd_backup.yml - - include: tasks/prompt.yml - # - include: tasks/users.yml - - include: tasks/sudo.yml - # - include: tasks/ssh.yml - - include: tasks/arch_programming.yml - - include: tasks/arch_teacher.yml - - include: tasks/arch_gnome.yml - - include: tasks/arch_graphicals.yml - - include: tasks/dotfiles.yml - - include: tasks/dotfiles_desktop.yml - - include: tasks/home_autofs.yml - - include: tasks/laptop.yml - - include: tasks/gaming.yml - - include: tasks/arch_docker.yml - # - include: tasks/nfs_share.yml - #- include: tasks/wine.yml - # - include: tasks/arch_virtualbox.yml - - handlers: - - name: restart sshd - systemd: - name: sshd - state: restarted - - name: restart nfs - systemd: - name: nfs-server - state: restarted diff --git a/Panais.yml b/Panais.yml deleted file mode 100644 index cb8c803..0000000 --- a/Panais.yml +++ /dev/null @@ -1,25 +0,0 @@ ---- -- hosts: localhost - connection: local - - vars_files: - - vars/common.yml - - vars/users.yml - - vars/server.yml - - vars/Panais.yml - - tasks: - - include: tasks/ansible.yml - - include: tasks/deb_CLI_packages.yml - - include: tasks/prompt.yml - - include: tasks/users.yml - - include: tasks/sudo.yml - - include: tasks/ssh.yml - - include: tasks/dotfiles.yml - - include: tasks/deb_docker.yml - - handlers: - - name: restart sshd - service: - name: sshd - state: restarted diff --git a/Poivre.yml b/Poivre.yml deleted file mode 100644 index 711f65d..0000000 --- a/Poivre.yml +++ /dev/null @@ -1,41 +0,0 @@ ---- -- hosts: localhost - connection: local - - vars_files: - - vars/common.yml - - vars/home.yml - - vars/users.yml - - vars/Combava.yml - - tasks: - - include: tasks/ansible.yml - - include: tasks/arch_CLI_packages.yml - - include: tasks/sudo.yml - - include: tasks/arch_aur.yml - #- include: tasks/dd_backup.yml - - include: tasks/prompt.yml - - include: tasks/users.yml - - include: tasks/ssh.yml - - include: tasks/arch_programming.yml - - include: tasks/arch_teacher.yml - - include: tasks/arch_gnome.yml - - include: tasks/arch_graphicals.yml - - include: tasks/dotfiles.yml - - include: tasks/dotfiles_desktop.yml - - include: tasks/home_autofs.yml - - include: tasks/laptop.yml - - include: tasks/arch_docker.yml - # - include: tasks/nfs_share.yml - # - include: tasks/wine.yml - # - include: tasks/arch_virtualbox.yml - - handlers: - - name: restart sshd - systemd: - name: sshd - state: restarted - - name: restart nfs - systemd: - name: nfs-server - state: restarted diff --git a/README.md b/README.md index 848663c..e773977 100644 --- a/README.md +++ b/README.md @@ -1,40 +1,3 @@ -# Ansible workstation - -Ansible script to deploy my workstation with a ansible-pull. - - -## Automatic install - -Before call ansible-pull, git and ansible are required - - apt-get install git ansible - pacman install git ansible - -Installing Choux - - # Need aur module for some tasks - git clone https://github.com/kewlfft/ansible-aur.git ~/.ansible/plugins/modules/aur - ansible-pull -U https://git.opytex.org/lafrite/Ansible_workstation.git Choux.yml - -Depuis peu, il y a un bug entre pacman et ansible: - - LC_ALL=C ansible-pull -U https://git.opytex.org/lafrite/Ansible_workstation.git --vault-id @prompt Choux.yml - -Il y a un soucis avec le rôle users. Si on le joue plusieurs fois, ils n'apparaissent plus dans GDM. Donc au premier lancement, il faut ajouter - - --extra-vars "create_user=True" - -### On Debian - -After running the script, there is a bug with $TERM which makes BACKSPACE and TAB to have strange behavior. To solve it, from an other computer run: - - infocmp -x | ssh -t root@remote-host 'cat > "$TERM.info" && tic -x "$TERM.info"' - - -## By hand for Choux - -- Install vim plugin -- Copy PrivateKeys -- Copy PGP keys -- Clone password-store repository to .password-store +# Ansible Molecule Vagrant - test +## 2021-12-22: diff --git a/abertrand.yml b/abertrand.yml deleted file mode 100644 index db12a10..0000000 --- a/abertrand.yml +++ /dev/null @@ -1,25 +0,0 @@ ---- -- hosts: localhost - connection: local - - vars_files: - - vars/common.yml - - vars/users.yml - - vars/server.yml - - vars/abertrand.yml - - tasks: - - include: tasks/ansible.yml - - include: tasks/deb_CLI_packages.yml - - include: tasks/prompt.yml - - include: tasks/users.yml - - include: tasks/sudo.yml - - include: tasks/ssh.yml - - include: tasks/dotfiles.yml - - include: tasks/deb_docker.yml - - handlers: - - name: restart sshd - service: - name: sshd - state: restarted diff --git a/files/ansible.cfg b/files/ansible.cfg deleted file mode 100644 index 5bacf49..0000000 --- a/files/ansible.cfg +++ /dev/null @@ -1,497 +0,0 @@ -# config file for ansible -- https://ansible.com/ -# =============================================== - -# nearly all parameters can be overridden in ansible-playbook -# or with command line flags. ansible will read ANSIBLE_CONFIG, -# ansible.cfg in the current working directory, .ansible.cfg in -# the home directory or /etc/ansible/ansible.cfg, whichever it -# finds first - -[defaults] - -# some basic default values... - -#inventory = /etc/ansible/hosts -#library = /usr/share/my_modules/ -#module_utils = /usr/share/my_module_utils/ -#remote_tmp = ~/.ansible/tmp -#local_tmp = ~/.ansible/tmp -#plugin_filters_cfg = /etc/ansible/plugin_filters.yml -#forks = 5 -#poll_interval = 15 -#sudo_user = root -#ask_sudo_pass = True -#ask_pass = True -#transport = smart -#remote_port = 22 -#module_lang = C -#module_set_locale = False - -# plays will gather facts by default, which contain information about -# the remote system. -# -# smart - gather by default, but don't regather if already gathered -# implicit - gather by default, turn off with gather_facts: False -# explicit - do not gather by default, must say gather_facts: True -#gathering = implicit - -# This only affects the gathering done by a play's gather_facts directive, -# by default gathering retrieves all facts subsets -# all - gather all subsets -# network - gather min and network facts -# hardware - gather hardware facts (longest facts to retrieve) -# virtual - gather min and virtual facts -# facter - import facts from facter -# ohai - import facts from ohai -# You can combine them using comma (ex: network,virtual) -# You can negate them using ! (ex: !hardware,!facter,!ohai) -# A minimal set of facts is always gathered. -#gather_subset = all - -# some hardware related facts are collected -# with a maximum timeout of 10 seconds. This -# option lets you increase or decrease that -# timeout to something more suitable for the -# environment. -# gather_timeout = 10 - -# Ansible facts are available inside the ansible_facts.* dictionary -# namespace. This setting maintains the behaviour which was the default prior -# to 2.5, duplicating these variables into the main namespace, each with a -# prefix of 'ansible_'. -# This variable is set to True by default for backwards compatibility. It -# will be changed to a default of 'False' in a future release. -# ansible_facts. -# inject_facts_as_vars = True - -# additional paths to search for roles in, colon separated -#roles_path = /etc/ansible/roles - -# uncomment this to disable SSH key host checking -#host_key_checking = False - -# change the default callback, you can only have one 'stdout' type enabled at a time. -stdout_callback = skippy - - -## Ansible ships with some plugins that require whitelisting, -## this is done to avoid running all of a type by default. -## These setting lists those that you want enabled for your system. -## Custom plugins should not need this unless plugin author specifies it. - -# enable callback plugins, they can output to stdout but cannot be 'stdout' type. -#callback_whitelist = timer, mail - -# Determine whether includes in tasks and handlers are "static" by -# default. As of 2.0, includes are dynamic by default. Setting these -# values to True will make includes behave more like they did in the -# 1.x versions. -#task_includes_static = False -#handler_includes_static = False - -# Controls if a missing handler for a notification event is an error or a warning -#error_on_missing_handler = True - -# change this for alternative sudo implementations -#sudo_exe = sudo - -# What flags to pass to sudo -# WARNING: leaving out the defaults might create unexpected behaviours -#sudo_flags = -H -S -n - -# SSH timeout -#timeout = 10 - -# default user to use for playbooks if user is not specified -# (/usr/bin/ansible will use current user as default) -#remote_user = root - -# logging is off by default unless this path is defined -# if so defined, consider logrotate -#log_path = /var/log/ansible.log - -# default module name for /usr/bin/ansible -#module_name = command - -# use this shell for commands executed under sudo -# you may need to change this to bin/bash in rare instances -# if sudo is constrained -#executable = /bin/sh - -# if inventory variables overlap, does the higher precedence one win -# or are hash values merged together? The default is 'replace' but -# this can also be set to 'merge'. -#hash_behaviour = replace - -# by default, variables from roles will be visible in the global variable -# scope. To prevent this, the following option can be enabled, and only -# tasks and handlers within the role will see the variables there -#private_role_vars = yes - -# list any Jinja2 extensions to enable here: -#jinja2_extensions = jinja2.ext.do,jinja2.ext.i18n - -# if set, always use this private key file for authentication, same as -# if passing --private-key to ansible or ansible-playbook -#private_key_file = /path/to/file - -# If set, configures the path to the Vault password file as an alternative to -# specifying --vault-password-file on the command line. -#vault_password_file = /path/to/vault_password_file - -# format of string {{ ansible_managed }} available within Jinja2 -# templates indicates to users editing templates files will be replaced. -# replacing {file}, {host} and {uid} and strftime codes with proper values. -#ansible_managed = Ansible managed: {file} modified on %Y-%m-%d %H:%M:%S by {uid} on {host} -# {file}, {host}, {uid}, and the timestamp can all interfere with idempotence -# in some situations so the default is a static string: -#ansible_managed = Ansible managed - -# by default, ansible-playbook will display "Skipping [host]" if it determines a task -# should not be run on a host. Set this to "False" if you don't want to see these "Skipping" -# messages. NOTE: the task header will still be shown regardless of whether or not the -# task is skipped. -#display_skipped_hosts = True - -# by default, if a task in a playbook does not include a name: field then -# ansible-playbook will construct a header that includes the task's action but -# not the task's args. This is a security feature because ansible cannot know -# if the *module* considers an argument to be no_log at the time that the -# header is printed. If your environment doesn't have a problem securing -# stdout from ansible-playbook (or you have manually specified no_log in your -# playbook on all of the tasks where you have secret information) then you can -# safely set this to True to get more informative messages. -#display_args_to_stdout = False - -# by default (as of 1.3), Ansible will raise errors when attempting to dereference -# Jinja2 variables that are not set in templates or action lines. Uncomment this line -# to revert the behavior to pre-1.3. -#error_on_undefined_vars = False - -# by default (as of 1.6), Ansible may display warnings based on the configuration of the -# system running ansible itself. This may include warnings about 3rd party packages or -# other conditions that should be resolved if possible. -# to disable these warnings, set the following value to False: -#system_warnings = True - -# by default (as of 1.4), Ansible may display deprecation warnings for language -# features that should no longer be used and will be removed in future versions. -# to disable these warnings, set the following value to False: -#deprecation_warnings = True - -# (as of 1.8), Ansible can optionally warn when usage of the shell and -# command module appear to be simplified by using a default Ansible module -# instead. These warnings can be silenced by adjusting the following -# setting or adding warn=yes or warn=no to the end of the command line -# parameter string. This will for example suggest using the git module -# instead of shelling out to the git command. -# command_warnings = False - - -# set plugin path directories here, separate with colons -#action_plugins = /usr/share/ansible/plugins/action -#cache_plugins = /usr/share/ansible/plugins/cache -#callback_plugins = /usr/share/ansible/plugins/callback -#connection_plugins = /usr/share/ansible/plugins/connection -#lookup_plugins = /usr/share/ansible/plugins/lookup -#inventory_plugins = /usr/share/ansible/plugins/inventory -#vars_plugins = /usr/share/ansible/plugins/vars -#filter_plugins = /usr/share/ansible/plugins/filter -#test_plugins = /usr/share/ansible/plugins/test -#terminal_plugins = /usr/share/ansible/plugins/terminal -#strategy_plugins = /usr/share/ansible/plugins/strategy - - -# by default, ansible will use the 'linear' strategy but you may want to try -# another one -#strategy = free - -# by default callbacks are not loaded for /bin/ansible, enable this if you -# want, for example, a notification or logging callback to also apply to -# /bin/ansible runs -#bin_ansible_callbacks = False - - -# don't like cows? that's unfortunate. -# set to 1 if you don't want cowsay support or export ANSIBLE_NOCOWS=1 -#nocows = 1 - -# set which cowsay stencil you'd like to use by default. When set to 'random', -# a random stencil will be selected for each task. The selection will be filtered -# against the `cow_whitelist` option below. -#cow_selection = default -#cow_selection = random - -# when using the 'random' option for cowsay, stencils will be restricted to this list. -# it should be formatted as a comma-separated list with no spaces between names. -# NOTE: line continuations here are for formatting purposes only, as the INI parser -# in python does not support them. -#cow_whitelist=bud-frogs,bunny,cheese,daemon,default,dragon,elephant-in-snake,elephant,eyes,\ -# hellokitty,kitty,luke-koala,meow,milk,moofasa,moose,ren,sheep,small,stegosaurus,\ -# stimpy,supermilker,three-eyes,turkey,turtle,tux,udder,vader-koala,vader,www - -# don't like colors either? -# set to 1 if you don't want colors, or export ANSIBLE_NOCOLOR=1 -#nocolor = 1 -force_color = 1 - -# if set to a persistent type (not 'memory', for example 'redis') fact values -# from previous runs in Ansible will be stored. This may be useful when -# wanting to use, for example, IP information from one group of servers -# without having to talk to them in the same playbook run to get their -# current IP information. -#fact_caching = memory - -#This option tells Ansible where to cache facts. The value is plugin dependent. -#For the jsonfile plugin, it should be a path to a local directory. -#For the redis plugin, the value is a host:port:database triplet: fact_caching_connection = localhost:6379:0 - -#fact_caching_connection=/tmp - - - -# retry files -# When a playbook fails by default a .retry file will be created in ~/ -# You can disable this feature by setting retry_files_enabled to False -# and you can change the location of the files by setting retry_files_save_path - -#retry_files_enabled = False -#retry_files_save_path = ~/.ansible-retry - -# squash actions -# Ansible can optimise actions that call modules with list parameters -# when looping. Instead of calling the module once per with_ item, the -# module is called once with all items at once. Currently this only works -# under limited circumstances, and only with parameters named 'name'. -#squash_actions = apk,apt,dnf,homebrew,pacman,pkgng,yum,zypper - -# prevents logging of task data, off by default -#no_log = False - -# prevents logging of tasks, but only on the targets, data is still logged on the master/controller -#no_target_syslog = False - -# controls whether Ansible will raise an error or warning if a task has no -# choice but to create world readable temporary files to execute a module on -# the remote machine. This option is False by default for security. Users may -# turn this on to have behaviour more like Ansible prior to 2.1.x. See -# https://docs.ansible.com/ansible/become.html#becoming-an-unprivileged-user -# for more secure ways to fix this than enabling this option. -#allow_world_readable_tmpfiles = False - -# controls the compression level of variables sent to -# worker processes. At the default of 0, no compression -# is used. This value must be an integer from 0 to 9. -#var_compression_level = 9 - -# controls what compression method is used for new-style ansible modules when -# they are sent to the remote system. The compression types depend on having -# support compiled into both the controller's python and the client's python. -# The names should match with the python Zipfile compression types: -# * ZIP_STORED (no compression. available everywhere) -# * ZIP_DEFLATED (uses zlib, the default) -# These values may be set per host via the ansible_module_compression inventory -# variable -#module_compression = 'ZIP_DEFLATED' - -# This controls the cutoff point (in bytes) on --diff for files -# set to 0 for unlimited (RAM may suffer!). -#max_diff_size = 1048576 - -# This controls how ansible handles multiple --tags and --skip-tags arguments -# on the CLI. If this is True then multiple arguments are merged together. If -# it is False, then the last specified argument is used and the others are ignored. -# This option will be removed in 2.8. -#merge_multiple_cli_flags = True - -# Controls showing custom stats at the end, off by default -#show_custom_stats = True - -# Controls which files to ignore when using a directory as inventory with -# possibly multiple sources (both static and dynamic) -#inventory_ignore_extensions = ~, .orig, .bak, .ini, .cfg, .retry, .pyc, .pyo - -# This family of modules use an alternative execution path optimized for network appliances -# only update this setting if you know how this works, otherwise it can break module execution -#network_group_modules=eos, nxos, ios, iosxr, junos, vyos - -# When enabled, this option allows lookups (via variables like {{lookup('foo')}} or when used as -# a loop with `with_foo`) to return data that is not marked "unsafe". This means the data may contain -# jinja2 templating language which will be run through the templating engine. -# ENABLING THIS COULD BE A SECURITY RISK -#allow_unsafe_lookups = False - -# set default errors for all plays -#any_errors_fatal = False - -[inventory] -# enable inventory plugins, default: 'host_list', 'script', 'yaml', 'ini', 'auto' -#enable_plugins = host_list, virtualbox, yaml, constructed - -# ignore these extensions when parsing a directory as inventory source -#ignore_extensions = .pyc, .pyo, .swp, .bak, ~, .rpm, .md, .txt, ~, .orig, .ini, .cfg, .retry - -# ignore files matching these patterns when parsing a directory as inventory source -#ignore_patterns= - -# If 'true' unparsed inventory sources become fatal errors, they are warnings otherwise. -#unparsed_is_failed=False - -[privilege_escalation] -#become=True -#become_method=sudo -#become_user=root -#become_ask_pass=False - -[paramiko_connection] - -# uncomment this line to cause the paramiko connection plugin to not record new host -# keys encountered. Increases performance on new host additions. Setting works independently of the -# host key checking setting above. -#record_host_keys=False - -# by default, Ansible requests a pseudo-terminal for commands executed under sudo. Uncomment this -# line to disable this behaviour. -#pty=False - -# paramiko will default to looking for SSH keys initially when trying to -# authenticate to remote devices. This is a problem for some network devices -# that close the connection after a key failure. Uncomment this line to -# disable the Paramiko look for keys function -#look_for_keys = False - -# When using persistent connections with Paramiko, the connection runs in a -# background process. If the host doesn't already have a valid SSH key, by -# default Ansible will prompt to add the host key. This will cause connections -# running in background processes to fail. Uncomment this line to have -# Paramiko automatically add host keys. -#host_key_auto_add = True - -[ssh_connection] - -# ssh arguments to use -# Leaving off ControlPersist will result in poor performance, so use -# paramiko on older platforms rather than removing it, -C controls compression use -#ssh_args = -C -o ControlMaster=auto -o ControlPersist=60s - -# The base directory for the ControlPath sockets. -# This is the "%(directory)s" in the control_path option -# -# Example: -# control_path_dir = /tmp/.ansible/cp -#control_path_dir = ~/.ansible/cp - -# The path to use for the ControlPath sockets. This defaults to a hashed string of the hostname, -# port and username (empty string in the config). The hash mitigates a common problem users -# found with long hostames and the conventional %(directory)s/ansible-ssh-%%h-%%p-%%r format. -# In those cases, a "too long for Unix domain socket" ssh error would occur. -# -# Example: -# control_path = %(directory)s/%%h-%%r -#control_path = - -# Enabling pipelining reduces the number of SSH operations required to -# execute a module on the remote server. This can result in a significant -# performance improvement when enabled, however when using "sudo:" you must -# first disable 'requiretty' in /etc/sudoers -# -# By default, this option is disabled to preserve compatibility with -# sudoers configurations that have requiretty (the default on many distros). -# -#pipelining = False - -# Control the mechanism for transferring files (old) -# * smart = try sftp and then try scp [default] -# * True = use scp only -# * False = use sftp only -#scp_if_ssh = smart - -# Control the mechanism for transferring files (new) -# If set, this will override the scp_if_ssh option -# * sftp = use sftp to transfer files -# * scp = use scp to transfer files -# * piped = use 'dd' over SSH to transfer files -# * smart = try sftp, scp, and piped, in that order [default] -#transfer_method = smart - -# if False, sftp will not use batch mode to transfer files. This may cause some -# types of file transfer failures impossible to catch however, and should -# only be disabled if your sftp version has problems with batch mode -#sftp_batch_mode = False - -# The -tt argument is passed to ssh when pipelining is not enabled because sudo -# requires a tty by default. -#use_tty = True - -# Number of times to retry an SSH connection to a host, in case of UNREACHABLE. -# For each retry attempt, there is an exponential backoff, -# so after the first attempt there is 1s wait, then 2s, 4s etc. up to 30s (max). -#retries = 3 - -[persistent_connection] - -# Configures the persistent connection timeout value in seconds. This value is -# how long the persistent connection will remain idle before it is destroyed. -# If the connection doesn't receive a request before the timeout value -# expires, the connection is shutdown. The default value is 30 seconds. -#connect_timeout = 30 - -# Configures the persistent connection retry timeout. This value configures the -# the retry timeout that ansible-connection will wait to connect -# to the local domain socket. This value must be larger than the -# ssh timeout (timeout) and less than persistent connection idle timeout (connect_timeout). -# The default value is 15 seconds. -#connect_retry_timeout = 15 - -# The command timeout value defines the amount of time to wait for a command -# or RPC call before timing out. The value for the command timeout must -# be less than the value of the persistent connection idle timeout (connect_timeout) -# The default value is 10 second. -#command_timeout = 10 - -[accelerate] -#accelerate_port = 5099 -#accelerate_timeout = 30 -#accelerate_connect_timeout = 5.0 - -# The daemon timeout is measured in minutes. This time is measured -# from the last activity to the accelerate daemon. -#accelerate_daemon_timeout = 30 - -# If set to yes, accelerate_multi_key will allow multiple -# private keys to be uploaded to it, though each user must -# have access to the system via SSH to add a new key. The default -# is "no". -#accelerate_multi_key = yes - -[selinux] -# file systems that require special treatment when dealing with security context -# the default behaviour that copies the existing context or uses the user default -# needs to be changed to use the file system dependent context. -#special_context_filesystems=nfs,vboxsf,fuse,ramfs,9p - -# Set this to yes to allow libvirt_lxc connections to work without SELinux. -#libvirt_lxc_noseclabel = yes - -[colors] -highlight = white -verbose = blue -warn = bright purple -error = red -debug = dark gray -deprecate = purple -skip = cyan -unreachable = red -ok = green -changed = yellow -diff_add = green -diff_remove = red -diff_lines = cyan - - -[diff] -# Always print diff when running ( same as always running with -D/--diff ) -# always = no - -# Set how many context lines to show in diff -# context = 3 diff --git a/files/autofs.choux b/files/autofs.choux deleted file mode 100644 index 4c5968e..0000000 --- a/files/autofs.choux +++ /dev/null @@ -1 +0,0 @@ -doc_choux -rw,default,nls=utf8,uid=100,users Choux:/export/documents diff --git a/files/autofs.nas b/files/autofs.nas deleted file mode 100644 index 28b8ba9..0000000 --- a/files/autofs.nas +++ /dev/null @@ -1,3 +0,0 @@ -Nas_commun -rw,soft,intr,rsize=8192,wsize=8192 nas:/mnt/DocNas/Commun -Nas_perso -rw,soft,intr,rsize=8192,wsize=8192 nas:/mnt/DocNas/Benjamin -#Nas_config -rw,soft,intr,rsize=8192,wsize=8192 nas:/export/Config diff --git a/files/choux_borg.service b/files/choux_borg.service deleted file mode 100644 index 35fdf4c..0000000 --- a/files/choux_borg.service +++ /dev/null @@ -1,13 +0,0 @@ -[Unit] -Description=Borg Backup - -[Service] -Type=oneshot -Nice=19 -IOSchedulingClass=2 -IOSchedulingPriority=7 -ExecStartPre=notify-send "Backup starts" -ExecStartPre=/usr/bin/borg break-lock {{ borg_backup_repo }} -ExecStart={{ borg_script_path }}/{{ borg_script_filename }} -ExecStopPost=-bash -c '[[ $EXIT_STATUS == 0 ]] && notify-send "Backup finished"' -ExecStopPost=-bash -c '[[ $EXIT_STATUS != 0 ]] && notify-send "Backup failed." -u critical' diff --git a/files/choux_borg.sh b/files/choux_borg.sh deleted file mode 100644 index 7066670..0000000 --- a/files/choux_borg.sh +++ /dev/null @@ -1,54 +0,0 @@ -#!/bin/sh -# -# Script de sauvegarde. -# -# Envoie les sauvegardes sur un serveur distant, via le programme borg. -# Les sauvegardes sont chiffrées -# -# http://borgbackup.readthedocs.or/g -# -# Est lancé quotidiennement. - -set -e - -ts_log() -{ - echo `date '+%Y-%m-%d %H:%m:%S'` $1 >> ${LOG_PATH} -} - -# Trap on non-zero exit -# trap '[ "$?" -eq 0 ] || cleanup' EXIT - -BACKUP_DATE=`date +%Y-%m-%d` -LOG_PATH=/var/log/borg-backup.log - -BORG=/usr/bin/borg -# Fichier dans lequel est stocké la passphrase du dépôt borg -# (attention aux permissions) -export BORG_PASSPHRASE="`cat /root/.borg/passphrase`" -BORG_REPOSITORY={{ borg_backup_repo }} -# BORG_REPOSITORY=/media/backup/Choux -BORG_ARCHIVE=${BORG_REPOSITORY}::${BACKUP_DATE} - -BACKUPED_DIR="/media/local_documents /home/" - -ts_log "Starting new backup ${BACKUP_DATE}..." - -ts_log "Pushing archive ${BORG_ARCHIVE}" -$BORG create \ - -v --stats --compression none \ - $BORG_ARCHIVE \ - $BACKUPED_DIR \ - --exclude 'lost+found' \ - --exclude '/home/*/.cache' \ - --exclude '/home/*/.ccache' - >> ${LOG_PATH} 2>&1 - -ts_log "Rotating old backups." -$BORG prune -v $BORG_REPOSITORY \ - --keep-daily=7 \ - --keep-weekly=4 \ - --keep-monthly=6 \ - >> ${LOG_PATH} 2>&1 - -ts_log "Backup done" diff --git a/files/choux_borg.timer b/files/choux_borg.timer deleted file mode 100644 index 9a3b3e4..0000000 --- a/files/choux_borg.timer +++ /dev/null @@ -1,11 +0,0 @@ -[Unit] -Description=Borg Backup Timer - -[Timer] -WakeSystem=false -OnCalendar=daily -Persistent=true -RandomizedDelaySec=10min - -[Install] -WantedBy=timers.target diff --git a/files/dd_borg/40-backup.rules b/files/dd_borg/40-backup.rules deleted file mode 100644 index b172ac4..0000000 --- a/files/dd_borg/40-backup.rules +++ /dev/null @@ -1,3 +0,0 @@ -ACTION=="add", SUBSYSTEM=="bdi", DEVPATH=="/devices/virtual/bdi/*", -TAG+="systemd", ENV{SYSTEMD_WANTS}="automatic-backup.service" - diff --git a/files/dd_borg/automatic-backup.service b/files/dd_borg/automatic-backup.service deleted file mode 100644 index 2692112..0000000 --- a/files/dd_borg/automatic-backup.service +++ /dev/null @@ -1,7 +0,0 @@ -[Service] -Type=oneshot -ExecStartPre=notify-send "Backup starts" -ExecStart=/etc/backups/run.sh -ExecStopPost=-bash -c '[[ $EXIT_STATUS == 0 ]] && notify-send "Backup finished: Drive can be removed."' -ExecStopPost=-bash -c '[[ $EXIT_STATUS != 0 ]] && notify-send "Backup failed." -u critical' - diff --git a/files/dd_borg/run.sh b/files/dd_borg/run.sh deleted file mode 100644 index 9528f3e..0000000 --- a/files/dd_borg/run.sh +++ /dev/null @@ -1,100 +0,0 @@ -#!/bin/bash -ue - -# The udev rule is not terribly accurate and may trigger our service before -# the kernel has finished probing partitions. Sleep for a bit to ensure -# the kernel is done. -# -# This can be avoided by using a more precise udev rule, e.g. matching -# a specific hardware path and partition. -sleep 5 - -# -# Script configuration -# - -# The backup partition is mounted there -MOUNTPOINT=/mnt - -# This is the location of the Borg repository -TARGET=$MOUNTPOINT/Combava - -# Archive name schema -DATE=$(date --iso-8601)-$(hostname) - -# This is the file that will later contain UUIDs of registered backup drives -DISKS=/etc/backups/backup.disks - -# Find whether the connected block device is a backup drive -for uuid in $(lsblk --noheadings --list --output uuid) -do - if grep --quiet --fixed-strings $uuid $DISKS; then - break - fi - uuid= -done - -if [ ! $uuid ]; then - echo "No backup disk found, exiting" - exit 0 -fi - -echo "Disk $uuid is a backup disk" -partition_path=/dev/disk/by-uuid/$uuid -# Mount file system if not already done. This assumes that if something is already -# mounted at $MOUNTPOINT, it is the backup drive. It won't find the drive if -# it was mounted somewhere else. -(mount | grep $MOUNTPOINT) || mount $partition_path $MOUNTPOINT -drive=$(lsblk --inverse --noheadings --list --paths --output name $partition_path | head --lines 1) -echo "Drive path: $drive" - -# -# Create backups -# - -# Options for borg create -BORG_OPTS="--stats --one-file-system --compression lz4 --checkpoint-interval 86400" - -# Set BORG_PASSPHRASE or BORG_PASSCOMMAND somewhere around here, using export, -# if encryption is used. -export BORG_PASSPHRASE="`cat /etc/backups/passphrase`" - -# No one can answer if Borg asks these questions, it is better to just fail quickly -# instead of hanging. -export BORG_RELOCATED_REPO_ACCESS_IS_OK=no -export BORG_UNKNOWN_UNENCRYPTED_REPO_ACCESS_IS_OK=no - -# Log Borg version -borg --version - -echo "Starting backup for $DATE" - -# This is just an example, change it however you see fit -borg create $BORG_OPTS \ - --exclude /media/documents/games/ \ - --exclude /media/documents/musique/ \ - --exclude /media/documents/photos/ \ - $TARGET::$DATE-$$-documents \ - /media/documents/ - -# /home is often a separate partition / file system. -# Even if it isn't (add --exclude /home above), it probably makes sense -# to have /home in a separate archive. -borg create $BORG_OPTS \ - --exclude 'sh:/home/*/.cache' \ - $TARGET::$DATE-$$-home \ - /home/lafrite - -echo "Completed backup for $DATE" - -# Just to be completely paranoid -sync - -if [ -f /etc/backups/autoeject ]; then - umount $MOUNTPOINT - hdparm -Y $drive -fi - -if [ -f /etc/backups/backup-suspend ]; then - systemctl suspend -fi - diff --git a/files/dotfiles/Xdefaults b/files/dotfiles/Xdefaults deleted file mode 100644 index 6d994b2..0000000 --- a/files/dotfiles/Xdefaults +++ /dev/null @@ -1,99 +0,0 @@ -!*.font: xft:monospace:size=9 -! URxvt*font: xft:Ubuntu Mono derivative Powerline:size=9 -URxvt*font: xft:Hack Nerd Font:pixelsize=12,xft:UbuntuMono Nerd Font:pixelsize=12 -URxvt*letterSpace: -1 -! URxvt*font: xft:Ubuntu Mono derivative Powerline:pixelsize=14,xft:Droid Sans Mono for Powerline:pixelsize=14,xft:DejaVu Sans Mono:pixelsize=14,xft:Droid Sans Fallback:pixelsize=14,xft:FreeSans:pixelsize=14,xft:FreeSans:pixelsize=14 -URxvt*scrollBar: false - -URxvt.perl-ext-common: default,fullscreen,resize-font -! fullscreen with F11 -URxvt.keysym.F11: perl:fullscreen:switch - -! `font-size` plugin -URxvt.resize-font.smaller: C-Down -URxvt.resize-font.bigger: C-Up - - -! ! URxvt.foreground: #f6f3e8 -! ! URxvt.background: #242424 -! ! URxvt.cursorColor: #f6f3e8 -! *.foreground: #fcfae1 -! *.background: #404040 -! *.cursorColor: #f595a7 -! *.color0: #404040 -! *.color8: #262626 -! *.color1: #b9454b -! *.color9: #e75252 -! *.color2: #bd8d46 -! *.color10: #dea552 -! *.color3: #f6e497 -! *.color11: #d1c180 -! *.color4: #f595a7 -! *.color12: #d1a5ad -! *.color5: #d28e2a -! *.color13: #b47a24 -! *.color6: #ebcd4f -! *.color14: #b9a659 -! *.color7: #fcfae1 -! *.color15: #f3f2e7 -! -! -! ! ! ANSI colours -! ! ! black -! ! URxvt.color0: #073642 -! ! URxvt.color8: #002636 -! ! ! red -! ! URxvt.color1: #dc322f -! ! URxvt.color9: #cb4b16 -! ! ! green -! ! URxvt.color2: #859900 -! ! URxvt.color10: #586e75 -! ! ! yellow -! ! URxvt.color3: #b58900 -! ! URxvt.color11: #657b83 -! ! ! blue -! ! URxvt.color4: #268bd2 -! ! URxvt.color12: #839496 -! ! ! magenta -! ! URxvt.color5: #d33682 -! ! URxvt.color13: #6c71c4 -! ! ! cyan -! ! URxvt.color6: #2aa198 -! ! URxvt.color14: #93a1a1 -! ! ! white -! ! URxvt.color7: #eee8d5 -! ! URxvt.color15: #fdf6e3 -! -! ! Colored man -! URxvt.colorIT: #87af5f -! URxvt.colorBD: #d7d7d7 -! URxvt.colorUL: #87afd7 - -! hard contrast: *background: #1d2021 -*background: #282828 -! soft contrast: *background: #32302f -*foreground: #ebdbb2 -! Black + DarkGrey -*color0: #282828 -*color8: #928374 -! DarkRed + Red -*color1: #cc241d -*color9: #fb4934 -! DarkGreen + Green -*color2: #98971a -*color10: #b8bb26 -! DarkYellow + Yellow -*color3: #d79921 -*color11: #fabd2f -! DarkBlue + Blue -*color4: #458588 -*color12: #83a598 -! DarkMagenta + Magenta -*color5: #b16286 -*color13: #d3869b -! DarkCyan + Cyan -*color6: #689d6a -*color14: #8ec07c -! LightGrey + White -*color7: #a89984 -*color15: #ebdbb2 diff --git a/files/dotfiles/alacritty/alacritty.yml b/files/dotfiles/alacritty/alacritty.yml deleted file mode 100644 index 20d781d..0000000 --- a/files/dotfiles/alacritty/alacritty.yml +++ /dev/null @@ -1,93 +0,0 @@ -# Colors (Gruvbox dark) -colors: - # Default colors - primary: - # hard contrast: background = '#1d2021' - # background: '#282828' - # soft contrast: background = '#32302f' - background: '#32302f' - foreground: '#ebdbb2' - - # Normal colors - normal: - black: '#282828' - red: '#cc241d' - green: '#98971a' - yellow: '#d79921' - blue: '#458588' - magenta: '#b16286' - cyan: '#689d6a' - white: '#a89984' - - # Bright colors - bright: - black: '#928374' - red: '#fb4934' - green: '#b8bb26' - yellow: '#fabd2f' - blue: '#83a598' - magenta: '#d3869b' - cyan: '#8ec07c' - white: '#ebdbb2' - -font: - normal: - family: "UbuntuMono Nerd Font" - style: Regular - bold: - family: "UbuntuMono Nerd Font" - style: Bold - italic: - family: "UbuntuMono Nerd Font" - style: Italic - bold_italic: - family: "UbuntuMono Nerd Font" - style: Bold Italic - - # Point size - size: 11.0 - - offset: - x: 0 - y: 0 - glyph_offset: - x: 0 - y: 0 - -window: - decorations: none - padding: - x: 2 - y: 2 - - dimensions: - columns: 100 - lines: 20 - -scrolling: - # Maximum number of lines in the scrollback buffer. - # Specifying '0' will disable scrolling. - history: 10000 - - # Number of lines the viewport will move for every line scrolled when - # scrollback is enabled (history > 0). - multiplier: 10 - -# If `true`, bold text is drawn using the bright color variants. -draw_bold_text_with_bright_colors: true - -selection: - semantic_escape_chars: ',│`|:"'' ()[]{}<>' - save_to_clipboard: true - -live_config_reload: true - -key_bindings: - - { key: V, mods: Control|Shift, action: Paste } - - { key: C, mods: Control|Shift, action: Copy } - - { key: Key0, mods: Control, action: ResetFontSize } - - { key: Equals, mods: Control, action: IncreaseFontSize } - - { key: NumpadAdd, mods: Control, action: IncreaseFontSize } - - { key: NumpadSubtract, mods: Control, action: DecreaseFontSize } - - { key: Minus, mods: Control, action: DecreaseFontSize } - - { key: N, mods: Control, action: SpawnNewInstance } diff --git a/files/dotfiles/config.fish b/files/dotfiles/config.fish deleted file mode 100644 index 5cc9a7b..0000000 --- a/files/dotfiles/config.fish +++ /dev/null @@ -1,12 +0,0 @@ -if not functions -q fisher - set -q XDG_CONFIG_HOME; or set XDG_CONFIG_HOME ~/.config - curl https://git.io/fisher --create-dirs -sLo $XDG_CONFIG_HOME/fish/functions/fisher.fish - fish -c fisher -end - -set -Ux EDITOR vim - -set -Ux FZF_DEFAULT_OPTS '--height 40% --layout=reverse --border' - -#fisher add jethrokuan/fzf - diff --git a/files/dotfiles/fishfile b/files/dotfiles/fishfile deleted file mode 100644 index ec1d1df..0000000 --- a/files/dotfiles/fishfile +++ /dev/null @@ -1,2 +0,0 @@ -jethrokuan/fzf -oh-my-fish/plugin-bang-bang diff --git a/files/dotfiles/gitconfig b/files/dotfiles/gitconfig deleted file mode 100644 index 9b6b97d..0000000 --- a/files/dotfiles/gitconfig +++ /dev/null @@ -1,3 +0,0 @@ -[user] - name = Bertrand Benjamin - email = benjamin.bertrand@opytex.org diff --git a/files/dotfiles/mbsyncrc b/files/dotfiles/mbsyncrc deleted file mode 100644 index 3c01c3d..0000000 --- a/files/dotfiles/mbsyncrc +++ /dev/null @@ -1,68 +0,0 @@ -IMAPAccount opytex -Host imap.mailfence.com -User Takanuva -PassCmd "pass show mail/mailfence/Takanuva | head -n 1" -SSLType IMAPS -CertificateFile /etc/ssl/certs/ca-certificates.crt - -IMAPStore opytex-remote -Account opytex - -MaildirStore opytex-local -Subfolders Verbatim -Path ~/.mail/opytex/ -Inbox ~/.mail/opytex/INBOX - -Channel opytex -Master :opytex-remote: -Slave :opytex-local: -Create Both -Expunge Both -Patterns * -SyncState * - -IMAPAccount lafrite26 -Host imap.gmail.com -User lafrite26 -PassCmd "pass show mail/lafrite26@gmail.com | head -n 1" -SSLType IMAPS -CertificateFile /etc/ssl/certs/ca-certificates.crt - -IMAPStore lafrite26-remote -Account lafrite26 - -MaildirStore lafrite26-local -Subfolders Verbatim -Path ~/.mail/lafrite26/ -Inbox ~/.mail/lafrite26/INBOX - -Channel lafrite26 -Master :lafrite26-remote: -Slave :lafrite26-local: -Create Both -Expunge Both -Patterns * -SyncState * - -IMAPAccount benjamin.jm.bertrand -Host imap.gmail.com -User benjamin.jm.bertrand -PassCmd "pass show mail/benjamin.jm.bertrand@gmail.com | head -n 1" -SSLType IMAPS -CertificateFile /etc/ssl/certs/ca-certificates.crt - -IMAPStore benjamin.jm.bertrand-remote -Account benjamin.jm.bertrand - -MaildirStore benjamin.jm.bertrand-local -Subfolders Verbatim -Path ~/.mail/benjamin.jm.bertrand/ -Inbox ~/.mail/benjamin.jm.bertrand/INBOX - -Channel benjamin.jm.bertrand -Master :benjamin.jm.bertrand-remote: -Slave :benjamin.jm.bertrand-local: -Create Both -Expunge Both -Patterns * -SyncState * diff --git a/files/dotfiles/moc/config b/files/dotfiles/moc/config deleted file mode 100755 index d43056b..0000000 --- a/files/dotfiles/moc/config +++ /dev/null @@ -1,654 +0,0 @@ -# This is a configuration file for the MOC player. It should be named -# 'config' and placed in the ~/.moc directory. As this file can specify -# commands which invoke other applications, MOC will refuse to start if it -# is not owned by either root or the current user, or if it is writable by -# anyone other than it's owner. All options are given with their default -# values, and therefore commented. - -# Comments begin with '#'. -# You can use quotes and escape ('\') in parameters. -# -# You can have variable values substituted by enclosing the variable name -# as "${...}". (This only applies to the portion of the option following -# the ' ='.) Variables are substituted first from the environment then, -# if not found, from the configuration options. (Note that the value of -# a configuration option substituted is that which it has at the time the -# substitution variable is encountered.) If there is a naming conflict -# between an environment and configuration variable, you may be able to -# resolve it by using lowercase as the environment variable matches are -# case-sensitive whereas the configuration variables are not. -# -# You can also use the form "${...:-...}" where the value in the second -# position will be substituted if the variable name given in the first -# position is unset or null. -# -# So, for example: -# -# MusicDir = /music/${USER:-public} -# Fastdir1 = ${MusicDir}/mp3/rock -# Fastdir2 = ${MusicDir}/mp3/electronic -# Fastdir3 = ${MusicDir}/mp3/rap -# Fastdir4 = ${MusicDir}/mp3/etc -# -# Variable names are limited to those accepted by the BASH shell; that -# is, those comprising the upper- and lowercase ASCII characters, digits -# and the underscore. -# -# If you need to use the "${" sequence for any other purpose, write "$${" -# and it will be replaced by "${" and not treated as a substitution. -# -# Some options take lists of strings as their values. The strings are -# separated by colons. Additional strings can be appended to the list -# using "+ =" in place of a plain "=" to assign the value. For an example, -# see the XTerms option. -# -# You can override any configuration option when you run MOC using the -# '-O' command line option: -# -# mocp -O AutoNext =no -O messagelingertime=1 -O XTerms+=xxt:xwt -# -# This command line option can be repeated as many times as needed and -# the configuration option name is not case sensitive. (Note that MOC -# does not perform variable substitution on the value of such overridden -# configuration options.) Most option values are set before the -# configuration file is processed (which allows the new values to be -# picked up by substitutions), however list-valued options are overridden -# afterwards (which gives the choice of whether the configured values are -# replaced or added to). - -# Remember that the client and server are separate processes and the -# server will retain the configuration values formed from the environment -# within which it was originally started. - -# Show file titles (title, author, album) instead of file names? -#ReadTags = yes - -# In which directory do you store your music files? If you specify it -# you will be able to jump straight to this directory with the '-m' -# parameter or the 'm' command. This can also point to a playlist. -# -# Example: MusicDir = "/home/joe/music" -# -MusicDir = "/media/documents/musique/" - -# Start in the music directory by default? If set to 'no', start -# in the current directory by default. A single directory on -# the command line takes precedence. -#StartInMusicDir = no - -# How to sort? FileName is the option's only value for now. -#Sort = FileName - -# Show errors in the streams (for example, broken frames in MP3 files)? -#ShowStreamErrors = no - -# Ignore CRC errors in MP3 files? Most players do that, so the default -# value is 'yes'. -#MP3IgnoreCRCErrors = yes - -# Set playback toggles. -#Repeat = no -#Shuffle = no -#AutoNext = yes - -# Default FormatString: -# -# %n - Track number -# %a - Artist -# %A - Album -# %t - Title -# %(X:TRUE:FALSE) - Ternary expression: if X exists, do TRUE, -# otherwise FALSE. The escape character must -# be doubled (i.e., '\\'). (See zshmisc -# documentation for more information.) -# -#FormatString = "%(n:%n :)%(a:%a - :)%(t:%t:)%(A: \(%A\):)" - -# Input and ouput buffer sizes (in kilobytes). -#InputBuffer = 512 # Minimum value is 32KB -#OutputBuffer = 512 # Minimum value is 128KB - -# How much to fill the input buffer before playing (in kilobytes)? -# This can't be greater than the value of InputBuffer. While this has -# a positive effect for network streams, it also causes the broadcast -# audio to be delayed. -#Prebuffering = 64 - -# Use this HTTP proxy server for internet streams. If not set, the -# environment variables http_proxy and ALL_PROXY will be used if present. -# -# Format: HTTPProxy = PROXY_NAME:PORT -# -#HTTPProxy = - -# Sound driver - OSS, ALSA, JACK, SNDIO (on OpenBSD) or null (only for -# debugging). You can enter more than one driver as a colon-separated -# list. The first working driver will be used. -#SoundDriver = JACK:ALSA:OSS - -# Jack output settings. -#JackClientName = "moc" -#JackStartServer = no -#JackOutLeft = "system:playback_1" -#JackOutRight = "system:playback_2" - -# OSS output settings. -#OSSDevice = /dev/dsp -#OSSMixerDevice = /dev/mixer -#OSSMixerChannel1 = pcm # 'pcm', 'master' or 'speaker' -#OSSMixerChannel2 = master # 'pcm', 'master' or 'speaker' - -# ALSA output settings. -#ALSADevice = default -#ALSAMixer1 = PCM -#ALSAMixer2 = Master - -# Save software mixer state? -# If enabled, a file 'softmixer' will be created in '~/.moc/' storing the -# mixersetting set when the server is shut down. -# Note that there is a "hidden" 'Amplification' setting in that file. -# Amplification (0-200) is used to scale the mixer setting (0-100). This -# results in a higher signal amplitude but may also produce clipping. -#Softmixer_SaveState = yes - -# Save equalizer state? -# If enabled, a file 'equalizer' will be created in '~/.moc/' storing the -# equalizer settings when the server is shut down. -# Note that there is a "hidden" 'Mixin' setting in that file. -# Mixin (0.0-1.0) is used to determine how much of the original signal is -# used after equalizing. 0 means to only use the equalized sound, while 1 -# effectively disabled the mixer. The default is 0.25. -#Equalizer_SaveState = yes - -# Show files with dot at the beginning? -#ShowHiddenFiles = no - -# Hide file name extensions? -#HideFileExtension = no - -# Show file format in menu? -#ShowFormat = yes - -# Show file time in menu? Possible values: 'yes', 'no' and 'IfAvailable' -# (meaning show the time only when it is already known, which often works -# faster). -#ShowTime = IfAvailable - -# Show time played as a percentage in the time progress bar. -#ShowTimePercent = no - -# Values of the TERM environment variable which are deemed to be xterms. -#XTerms = xterm -#XTerms + = xterm-colour:xterm-color -#XTerms + = xterm-256colour:xterm-256color -#XTerms + = rxvt:rxvt-unicode -#XTerms + = rxvt-unicode-256colour:rxvt-unicode-256color -#XTerms + = eterm - -# Theme file to use. This can be absolute path or relative to -# /usr/share/moc/themes/ (depends on installation prefix) or -# ~/.moc/themes/ . -# -# Example: Theme = laras_theme -# -Theme = "moca_theme" - -# The theme used when running on an xterm. -# -# Example: XTermTheme = transparent-background -# -#XTermTheme = - -# Should MOC try to autoload the default lyrics file for an audio? (The -# default lyrics file is a text file with the same file name as the audio -# file name with any trailing "extension" removed.) -#AutoLoadLyrics = yes - -# MOC directory (where pid file, socket and state files are stored). -# You can use ~ at the beginning. -#MOCDir = ~/.moc - -# Use mmap() to read files. mmap() is much slower on NFS. -#UseMMap = no - -# Use MIME to identify audio files. This can make for slower loading -# of playlists but is more accurate than using "extensions". -#UseMimeMagic = no - -# Assume this encoding for ID3 version 1/1.1 tags (MP3 files). Unlike -# ID3v2, UTF-8 is not used here and MOC can't guess how tags are encoded. -# Another solution is using librcc (see the next option). This option is -# ignored if UseRCC is set to 'yes'. -#ID3v1TagsEncoding = WINDOWS-1250 - -# Use librcc to fix ID3 version 1/1.1 tags encoding. -#UseRCC = yes - -# Use librcc to filenames and directory names encoding. -#UseRCCForFilesystem = yes - -# When this option is set the player assumes that if the encoding of -# ID3v2 is set to ISO-8859-1 then the ID3v1TagsEncoding is actually -# that and applies appropriate conversion. -#EnforceTagsEncoding = no - -# Enable the conversion of filenames from the local encoding to UTF-8. -#FileNamesIconv = no - -# Enable the conversion of the xterm title from UTF-8 to the local encoding. -#NonUTFXterm = no - -# Remember the playlist after exit? -#SavePlaylist = yes - -# When using more than one client (interface) at a time, do they share -# the playlist? -#SyncPlaylist = yes - -# Choose a keymap file (relative to '~/.moc/' or using an absolute path). -# An annotated example keymap file is included ('keymap.example'). -# -# Example: Keymap = my_keymap -# -Keymap = keymap - -# Use ASCII rather than graphic characters for drawing lines. This -# helps on some terminals. -#ASCIILines = no - -# FastDirs, these allow you to jump directly to a directory, the key -# bindings are in the keymap file. -# -# Examples: Fastdir1 = /mp3/rock -# Fastdir2 = /mp3/electronic -# Fastdir3 = /mp3/rap -# Fastdir4 = /mp3/etc -# -#Fastdir1 = -#Fastdir2 = -#Fastdir3 = -#Fastdir4 = -#Fastdir5 = -#Fastdir6 = -#Fastdir7 = -#Fastdir8 = -#Fastdir9 = -#Fastdir10 = - -# How fast to seek (in number of seconds per keystroke). The first -# option is for normal seek and the second for silent seek. -#SeekTime = 1 -#SilentSeekTime = 5 - -# PreferredDecoders allows you to specify which decoder should be used -# for any given audio format. It is a colon-separated list in which -# each entry is of the general form 'code(decoders)', where 'code' -# identifies the audio format and 'decoders' is a comma-separated list -# of decoders in order of preference. -# -# The audio format identifier may be either a filename extension or a -# MIME media type. If the latter, the format is 'type/subtype' (e.g., -# 'audio/flac'). Because different systems may give different MIME -# media types, any 'x-' prefix of the subtype is ignored both here and -# in the actual file MIME type (so all combinations of 'audio/flac' and -# 'audio/x-flac' match each other). -# -# For Internet streams the matching is done on MIME media type and on -# actual content. For files the matches are made on MIME media type -# (if the 'UseMimeMagic' option is set) and on filename extension. The -# MIME media type of a file is not determined until the first entry for -# MIME is encountered in the list. -# -# The matching is done in the order of appearance in the list with any -# entries added from the command line being matched before those listed -# here. Therefore, if you place all filename extension entries before -# all MIME entries you will speed up MOC's processing of directories -# (which could be significant for remote file systems). -# -# The decoder list may be empty, in which case no decoders will be used -# for files (and files with that audio format ignored) while Internet -# streams will be assessed on the actual content. Any decoder position -# may contain an asterisk, in which case any decoder not otherwise listed -# which can handle the audio format will be used. It is not an error to -# list the same decoder twice, but neither does it make sense to do so. -# -# If you have a mix of audio and non-audio files in your directories, you -# may wish to include entries at top of the list which ignore non-audio -# files by extension. -# -# In summary, the PreferredDecoders option provides fine control over the -# type of matching which is performed (filename extension, MIME media -# type and streamed media content) and which decoder(s) (if any) are used -# based on the option's list entries and their ordering. -# -# Examples: aac(aac,ffmpeg) first try FAAD2 for AACs then FFmpeg -# mp3() ignore MP3 files -# wav(*,sndfile) use sndfile for WAV as a last resort -# ogg(vorbis,*):flac(flac,*) try Xiph decoders first -# ogg():audio/ogg() ignore OGG files, and -# force Internet selection by content -# gz():html() ignore some non-audio files -# -# Any unspecified audio formats default to trying all decoders. -# Any unknown (or misspelt) drivers are ignored. -# All names are case insensitive. -# The default setting reflects the historical situation modified by -# the experience of users. -# -#PreferredDecoders = aac(aac,ffmpeg):m4a(ffmpeg) -#PreferredDecoders += mpc(musepack,*,ffmpeg):mpc8(musepack,*,ffmpeg) -#PreferredDecoders += sid(sidplay2):mus(sidplay2) -#PreferredDecoders += wav(sndfile,*,modplug,ffmpeg) -#PreferredDecoders += wv(wavpack,*,ffmpeg) -#PreferredDecoders += audio/aac(aac):audio/aacp(aac):audio/m4a(ffmpeg) -#PreferredDecoders += audio/wav(sndfile,*,modplug) - -# The following PreferredDecoders attempt to handle the ambiguity surrounding -# container types such as OGG for files. The first two entries will force -# a local file to the correct decoder (assuming the .ogg file contains Vorbis -# audio), while the MIME media types will cause Internet audio streams to -# be assessed on content (which may be either Vorbis or Speex). -# -#PreferredDecoders += ogg(vorbis,ffmpeg):oga(vorbis,ffmpeg):ogv(ffmpeg) -#PreferredDecoders += opus(ffmpeg) -#PreferredDecoders += spx(speex) -#PreferredDecoders += application/ogg(vorbis):audio/ogg(vorbis) - -# Which resampling method to use. There are a few methods of resampling -# sound supported by libresamplerate. The default is 'Linear') which is -# also the fastest. A better description can be found at: -# -# http://www.mega-nerd.com/libsamplerate/api_misc.html#Converters -# -# but briefly, the following methods are based on bandlimited interpolation -# and are higher quality, but also slower: -# -# SincBestQuality - really slow (I know you probably have an xx GHz -# processor, but it's still not enough to not see -# this in the top output :) The worst case -# Signal-to-Noise Ratio is 97dB. -# SincMediumQuality - much faster. -# SincFastest - the fastest bandlimited interpolation. -# -# And these are lower quality, but much faster methods: -# -# ZeroOrderHold - really poor quality, but it's really fast. -# Linear - a bit better and a bit slower. -# -#ResampleMethod = Linear - -# Always use this sample rate (in Hz) when opening the audio device (and -# resample the sound if necessary). When set to 0 the device is opened -# with the file's rate. -#ForceSampleRate = 0 - -# By default, even if the sound card reports that it can output 24bit samples -# MOC converts 24bit PCM to 16bit. Setting this option to 'yes' allows MOC -# to use 24bit output. (The MP3 decoder, for example, uses this format.) -# This is disabled by default because there were reports that it prevents -# MP3 files from playing on some soundcards. -#Allow24bitOutput = no - -# Use realtime priority for output buffer thread. This will prevent gaps -# while playing even with heavy load. The user who runs MOC must have -# permissions to set such a priority. This could be dangerous, because it -# is possible that a bug in MOC will freeze your computer. -#UseRealtimePriority = no - -# The number of audio files for which MOC will cache tags. When this limit -# is reached, file tags are discarded on a least recently used basis (with -# one second resolution). You can disable the cache by giving it a size of -# zero. Note that if you decrease the cache size below the number of items -# currently in the cache, the number will not decrease immediately (if at -# all). -#TagsCacheSize = 256 - -# Number items in the playlist. -#PlaylistNumbering = yes - -# Main window layouts can be configured. You can change the position and -# size of the menus (directory and playlist). You have three layouts and -# can switch between then using the 'l' key (standard mapping). By default, -# only two layouts are configured. -# -# The format is as follows: -# -# - Each layout is described as a list of menu entries. -# - Each menu entry is of the form: -# -# menu(position_x, position_y, width, height) -# -# where 'menu' is either 'directory' or 'playlist'. -# - The parameters define position and size of the menu. They can -# be absolute numbers (like 10) or a percentage of the screen size -# (like 45%). -# - 'width' and 'height' can have also value of 'FILL' which means -# fill the screen from the menu's position to the border. -# - Menus may overlap. -# -# You must describe at least one menu (default is to fill the whole window). -# There must be at least one layout (Layout1) defined; others can be empty. -# -# Example: Layout1 = playlist(50%,50%,50%,50%) -# Layout2 = "" -# Layout3 = "" -# -# Just one layout, the directory will occupy the whole -# screen, the playlist will have 1/4 of the screen size -# and be positioned at lower right corner. (Note that -# because the playlist will be hidden by the directory -# you will have to use the TAB key to make the playlist -# visible.) -# -# Example: Layout1 = playlist(0,0,100%,10):directory(0,10,100%,FILL) -# -# The screen is split into two parts: playlist at the top -# and the directory menu at the bottom. Playlist will -# occupy 10 lines and the directory menu the rest. -# -#Layout1 = directory(0,0,50%,100%):playlist(50%,0,FILL,100%) -#Layout2 = directory(0,0,100%,100%):playlist(0,0,100%,100%) -#Layout3 = "" - -# When the song changes, should the menu be scrolled so that the currently -# played file is visible? -#FollowPlayedFile = yes - -# What to do if the interface was started and the server is already playing -# something from the playlist? If CanStartInPlaylist is set to 'yes', the -# interface will switch to the playlist. When set to 'no' it will start -# from the last directory. -#CanStartInPlaylist = yes - -# Executing external commands (1 - 10) invoked with key commands (F1 - F10 -# by default). -# -# Some arguments are substituted before executing: -# -# %f - file path -# %i - title made from tags -# %S - start block mark (in seconds) -# %E - end block mark (in seconds) -# -# Data from tags can also be substituted: -# -# %t - title -# %a - album -# %r - artist -# %n - track -# %m - time of the file (in seconds) -# -# The parameters above apply to the currently selected file. If you change -# them to capital letters, they are taken from the file currently playing. -# -# Programs are run using execv(), not a shell, so you can't do things like -# redirecting the output to a file. The command string is split using blank -# characters as separators; the first element is the command to be executed -# and the rest are its parameters, so if you use "echo Playing: %I" we run -# program 'echo' (from $PATH) with 2 parameters: the string 'Playing:' and -# the title of the file currently playing. Even if the title contains -# spaces, it's still one parameter and it's safe if it contains `rm -rf /`. -# -# Examples: ExecCommand1 = "cp %f /mnt/usb_drive" -# ExecCommand2 = "/home/joe/now_playing %I" -# -#ExecCommand1 = -#ExecCommand2 = -#ExecCommand3 = -#ExecCommand4 = -#ExecCommand5 = -#ExecCommand6 = -#ExecCommand7 = -#ExecCommand8 = -#ExecCommand9 = -#ExecCommand10 = - -# Display the cursor in the line with the selected file. Some braille -# readers (the Handy Tech modular series ZMU 737, for example) use the -# cursor to focus and can make use of it to present the file line even -# when other fields are changing. -#UseCursorSelection = no - -# Set the terminal title when running under xterm. -#SetXtermTitle = yes - -# Set the terminal title when running under screen. -#SetScreenTitle = yes - -# Display full paths instead of just file names in the playlist. -#PlaylistFullPaths = yes - -# The following setting describes how block markers are displayed in -# the play time progress bar. Its value is a string of exactly three -# characters. The first character is displayed in a position which -# corresponds to the time marked as the start of a block and the last -# character to the time marked as the end of the block. The middle -# character is displayed instead if both the start and the end of the block -# would fall in the same position (within the resolution of the interface). -# You can turn off the displaying of these block marker positions by using -# three space characters. -#BlockDecorators = "`\"'" - -# How long (in seconds) to leave a message displayed on the screen. -# Setting this to a high value allows you to scroll through the messages -# using the 'hide_message' key. Setting it to zero means you'll have to -# be quick to see any message at all. Any new messages will be queued up -# and displayed after the current message's linger time expires. -#MessageLingerTime = 3 - -# Does MOC display a prefix on delayed messages indicating -# the number of queued messages still to be displayed? -#PrefixQueuedMessages = yes - -# String to append to the queued message count if any -# error messages are still waiting to be displayed. -#ErrorMessagesQueued = "!" - -# Self-describing ModPlug options (with 'yes' or 'no' values). -#ModPlug_Oversampling = yes -#ModPlug_NoiseReduction = yes -#ModPlug_Reverb = no -#ModPlug_MegaBass = no -#ModPlug_Surround = no - -# ModPlug resampling mode. -# Valid values are: -# -# FIR - 8 tap fir filter (extremely high quality) -# SPLINE - Cubic spline interpolation (high quality) -# LINEAR - Linear interpolation (fast, good quality) -# NEAREST - No interpolation (very fast, extremely bad sound quality) -# -#ModPlug_ResamplingMode = FIR - -# Other self-describing ModPlug audio characteristic options. -# (Note that the 32 bit sample size seems to be buggy.) -#ModPlug_Channels = 2 # 1 or 2 channels -#ModPlug_Bits = 16 # 8, 16 or 32 bits -#ModPlug_Frequency = 44100 # 11025, 22050, 44100 or 48000 Hz -#ModPlug_ReverbDepth = 0 # 0 (quiet) to 100 (loud) -#ModPlug_ReverbDelay = 0 # Delay in ms (usually 40-200ms) -#ModPlug_BassAmount = 0 # 0 (quiet) to 100 (loud). -#ModPlug_BassRange = 10 # Cutoff in Hz (10-100). -#ModPlug_SurroundDepth = 0 # Surround level 0(quiet)-100(heavy). -#ModPlug_SurroundDelay = 0 # Surround delay in ms, usually 5-40ms. -#ModPlug_LoopCount = 0 # 0 (never), n (times) or -1 (forever) - -# Self-describing TiMidity audio characteristic options. -#TiMidity_Rate = 44100 # Between 8000 and 48000 -#TiMidity_Bits = 16 # 8 or 16 -#TiMidity_Channels = 2 # 1 or 2 -#TiMidity_Volume = 100 # 0 to 800 - -# You can setup a TiMidity-Config-File here. -# Leave it unset to use library defaults (/etc/timidity.cfg mostly). -# Setting it to 'yes' also uses the library defaults. -# Set it to 'no' if you don't have any configuration file. -# Otherwise set it to the name of a specific file. -#TiMidity_Config = - -# Self-describing SidPlay2 audio characteristic options. -#SidPlay2_DefaultSongLength = 180 # If not in database (in seconds) -#SidPlay2_MinimumSongLength = 0 # Play at least n (in seconds) -#SidPlay2_Frequency = 44100 # 4000 to 48000 -#SidPlay2_Bits = 16 # 8 or 16 -#SidPlay2_Optimisation = 0 # 0 (worst quality) to 2 (best quality) - -# Set path to a HVSC-compatible database (if not set, database is disabled). -#SidPlay2_Database = - -# SidPlay2 playback Mode: -# -# "M": Mono (best for many SIDs) -# "S": Stereo -# "L"/"R": Left / Right -# -#SidPlay2_PlayMode = "M" - -# Use start-song information from SID ('yes') or start at first song -# ('no'). Songs before the start-song won't be played. (Note that this -# option previously took the values 1 and 0; these are now deprecated -# in favour of 'yes' and 'no'.) -#SidPlay2_StartAtStart = yes - -# Play sub-tunes. (Note that this option previously took the values 1 -# and 0; these are now deprecated in favour of 'yes' and 'no'.) -#SidPlay2_PlaySubTunes = yes - -# Run the OnSongChange command when a new song starts playing. -# Specify the full path (i.e. no leading '~') of an executable to run. -# Arguments will be passed, and you can use the following escapes: -# -# %a artist -# %r album -# %f filename -# %t title -# %n track -# %d file duration in XX:YY form -# %D file duration, number of seconds -# -# No pipes/redirects can be used directly, but writing a shell script -# can do the job. -# -# Example: OnSongChange = "/home/jack/.moc/myscript %a %r" -# -#OnSongChange = - -# If RepeatSongChange is 'yes' then MOC will execute the command every time -# a song starts playing regardless of whether or not it is just repeating. -# Otherwise the command will only be executed when a different song is -# started. -#RepeatSongChange = no - -# Run the OnStop command (full path, no arguments) when MOC changes state -# to stopped (i.e., when user stopped playing or changes a song). -#OnStop = "/home/jack/.moc/myscript_on_stop" - -# This option determines which song to play after finishing all the songs -# in the queue. Setting this to 'yes' causes MOC to play the song which -# follows the song being played before queue playing started. If set to -# 'no', MOC will play the song following the last song in the queue if it -# is in the playlist. The default is 'yes' because this is the way other -# players usually behave. (Note that this option previously took the -# values 1 and 0; these are now deprecated in favour of 'yes' and 'no'.) -#QueueNextSongReturn = yes diff --git a/files/dotfiles/moc/equalizer b/files/dotfiles/moc/equalizer deleted file mode 100644 index 7efeafd..0000000 --- a/files/dotfiles/moc/equalizer +++ /dev/null @@ -1,2 +0,0 @@ -Active: 1 -Mixin: 0.250000 diff --git a/files/dotfiles/moc/keymap b/files/dotfiles/moc/keymap deleted file mode 100644 index 7d02062..0000000 --- a/files/dotfiles/moc/keymap +++ /dev/null @@ -1,183 +0,0 @@ -# This is the example keymap file for MOC. You can define your own key -# bindings for MOC commands by creating your own keymap file and setting -# the 'Keymap' option in ~/.moc/config. -# -# The format of this file is: -# -# - Lines beginning with # are comments. -# - Blank lines are ignored. -# - Every other line is expected to be in one of the formats: -# -# COMMAND = [KEY ...] -# COMMAND += KEY ... -# -# The KEY can be: -# -# - Just a char, like i, L, ", * -# - CTRL-KEY sequence: ^k (CTRL-k), ^4 -# - ALT-KEY (meta) sequence: M-j (ALT-j), M-/ -# - Special keys: DOWN, UP -# LEFT, RIGHT -# HOME, END -# BACKSPACE -# INS, DEL -# ENTER -# PAGE_UP, PAGE_DOWN -# SPACE, TAB -# KEYPAD_CENTER -# ESCAPE -# F1 - F12 -# -# Note that the use of a digit as a KEY is deprecated. -# -# Maximum number of KEYs for one COMMAND is 5. -# -# Omitting the KEY for a COMMAND will unbind all its default keys. They -# will also be automatically unbound when you bind new KEYs to it. Individual -# default KEYs will be automatically unbound when they are explicitly bound -# to some other COMMAND. -# -# Using the '+=' form will cause the KEYs to be appended to any existing -# (default or explicit) bindings for the COMMAND. Appending an existing -# default binding for the same COMMAND will cause MOC to think of that KEY -# as then being explicitly bound. -# -# Only one binding for any given COMMAND can appear in the keymap file. One -# exception to this is that if the default keys for a COMMAND are explicitly -# unbound then a subsequent binding may appear for it. A second exception -# is that multiple appending bindings may appear. -# -# Meta-key detection is sensitive to the ESCDELAY environment variable (see -# the manpage for ncurses(3)). In its absence, MOC resets the default -# delay to 25ms. If you need to emulate meta-key sequences using the ESC -# key, then you may need to set the value of ESCDELAY back to its ncurses -# default of 1000ms (but doing so will make the response to the ESC key -# sluggish). -# -# If MOC's keypresses are being filtered through some other program (in a -# GUI environment, for example) which also does meta-key detection, then -# MOC is at the mercy of the timings with which that program presents them. -# -# Default key configuration for MOC (and a list of all available commands): - -# MOC control keys: -quit_client = q -quit = Q - -# Menu and interface control keys: -go = ENTER l -menu_down = DOWN j -menu_up = UP k -menu_page_down = PAGE_DOWN -menu_page_up = PAGE_UP -menu_first_item = HOME -menu_last_item = END -search_menu = / -toggle_read_tags = f -toggle_show_time = ^t -toggle_show_format = ^f -toggle_menu = TAB -toggle_hidden_files = H -next_search = ^g ^n -show_lyrics = L -theme_menu = T -help = ? -refresh = ^r -reload = r - -# Audio playing and positioning keys: -seek_forward = RIGHT -seek_backward = LEFT -seek_forward_fast = ] -seek_backward_fast = [ -pause = p SPACE -stop = s -next = n -previous = b -toggle_shuffle = S -toggle_repeat = R -toggle_auto_next = X -toggle_mixer = x -go_url = o - -# Volume control keys: -volume_down_1 = < -volume_up_1 = > -volume_down_5 = , -volume_up_5 = . -volume_10 = M-1 -volume_20 = M-2 -volume_30 = M-3 -volume_40 = M-4 -volume_50 = M-5 -volume_60 = M-6 -volume_70 = M-7 -volume_80 = M-8 -volume_90 = M-9 - -# Directory navigation keys: defaults are Shift-number -# (i.e., 'shift 1' -> '!' -> 'Fastdir1'). -go_to_a_directory = i -go_to_music_directory = m -go_to_fast_dir1 = ! -go_to_fast_dir2 = @ -go_to_fast_dir3 = # -go_to_fast_dir4 = $ -go_to_fast_dir5 = % -go_to_fast_dir6 = ^ -go_to_fast_dir7 = & -go_to_fast_dir8 = * -go_to_fast_dir9 = ( -go_to_fast_dir10 = ) -go_to_playing_file = G -go_up = h - -# Playlist specific keys: -add_file = a -add_directory = A -plist_add_stream = ^u -delete_from_playlist = d -playlist_full_paths = P -save_playlist = V -remove_dead_entries = Y -clear_playlist = C - -# Queue manipulation keys: -enqueue_file = z -clear_queue = Z - -# User interaction control: -history_up = UP -history_down = DOWN -delete_to_start = ^u -delete_to_end = ^k -cancel = ^x ESCAPE -hide_message = M - -# Softmixer specific keys: -toggle_softmixer = w -toggle_make_mono = J - -# Equalizer specific keys: -toggle_equalizer = E -equalizer_refresh = e - -# External commands: -mark_start = ' -mark_end = " -exec_command1 = F1 -exec_command2 = F2 -exec_command3 = F3 -exec_command4 = F4 -exec_command5 = F5 -exec_command6 = F6 -exec_command7 = F7 -exec_command8 = F8 -exec_command9 = F9 -exec_command10 = F10 - -# The following commands are available but not assigned to any keys by -# default: -# -# toggle_percent Switch on/off play progress bar time percentage -# diff --git a/files/dotfiles/moc/softmixer b/files/dotfiles/moc/softmixer deleted file mode 100644 index ae858e1..0000000 --- a/files/dotfiles/moc/softmixer +++ /dev/null @@ -1,4 +0,0 @@ -Active: 0 -Amplification: 100 -Value: 100 -Mono: 0 diff --git a/files/dotfiles/mutt/benjamin.jm.bertrand@gmail.com.muttrc b/files/dotfiles/mutt/benjamin.jm.bertrand@gmail.com.muttrc deleted file mode 100644 index c5022ea..0000000 --- a/files/dotfiles/mutt/benjamin.jm.bertrand@gmail.com.muttrc +++ /dev/null @@ -1,43 +0,0 @@ -set realname = "Benjamin Bertrand" -set from = "benjamin.jm.bertrand@gmail.com" -set my_pass = `pass show mail/benjamin.jm.bertrand@gmail.com | head -n 1` - -set smtp_url = "smtps://benjamin.jm.bertrand@gmail.com@smtp.gmail.com:465" -set smtp_pass = $my_pass - -set ssl_force_tls = yes -set ssl_starttls = yes - - -set folder = "~/.mail/benjamin.jm.bertrand" -set spoolfile = "$folder/INBOX" -set postponed = "$folder/Drafts" -set record = "$folder/Sent" -set mbox = "$folder/Archive" -set trash = "$folder/Corbeille" - -mailboxes =INBOX =Sent =Archive =Trash =Drafts - -bind index,pager,attach g noop -bind index,pager,attach gi noop -bind index,pager,attach ga noop -bind index,pager,attach gd noop -bind index,pager,attach gt noop -bind index,pager,attach gs noop -macro index gi "=INBOX" "Go to inbox" -macro index ga "=Archive" "Go to all mail" -macro index gd "=Drafts" "Go to drafts" -macro index gt "=Trash" "Go to trash" -macro index gs "=Sent\ Items" "Go to trash" - -bind index,pager m noop -bind index,pager mt noop -bind index,pager ma noop -macro index,pager mt "=Trash" "Trash" -macro index,pager ma "=Archive" "Archive" - -source ~/.config/mutt/config.muttrc -source ~/.config/mutt/keybinding.muttrc -source ~/.config/mutt/dracula.muttrc - -# vim: ft=muttrc diff --git a/files/dotfiles/mutt/config.muttrc b/files/dotfiles/mutt/config.muttrc deleted file mode 100644 index c36324e..0000000 --- a/files/dotfiles/mutt/config.muttrc +++ /dev/null @@ -1,21 +0,0 @@ -set mail_check = 120 -set imap_keepalive = 300 - -set editor = "vim -c Goyo" -set sort = threads -set sort_aux = reverse-last-date-received - -set fast_reply = yes -set include = yes # include message in replies - -set pager_stop = yes # don't go to next message automatically - -set query_command = "khard email --parsable %s" -bind editor complete-query -bind editor ^T complete -macro index,pager A \ - "khard add-email" \ - "add the sender email address to khard" - -set index_format = "%4C %Z %-15.15L %{%d%b%y} %s" -# vim: ft=muttrc diff --git a/files/dotfiles/mutt/dracula.muttrc b/files/dotfiles/mutt/dracula.muttrc deleted file mode 100644 index 49aec97..0000000 --- a/files/dotfiles/mutt/dracula.muttrc +++ /dev/null @@ -1,44 +0,0 @@ -############################################################################### -# Dracula Theme for Mutt: https://draculatheme.com/ -# -# @author Paul Townsend - -# general ------------ foreground ---- background ----------------------------- -color error color231 color212 -color indicator color231 color241 -color markers color210 default -color message default default -color normal default default -color prompt default default -color search color84 default -color status color141 color236 -color tilde color231 default -color tree color141 default - -# message index ------ foreground ---- background ----------------------------- -color index color210 default ~D # deleted messages -color index color84 default ~F # flagged messages -color index color117 default ~N # new messages -color index color212 default ~Q # messages which have been replied to -color index color215 default ~T # tagged messages -color index color141 default ~v # messages part of a collapsed thread - -# message headers ---- foreground ---- background ----------------------------- -color hdrdefault color117 default -color header color231 default ^Subject:.* - -# message body ------- foreground ---- background ----------------------------- -color attachment color228 default -color body color231 default [\-\.+_a-zA-Z0-9]+@[\-\.a-zA-Z0-9]+ # email addresses -color body color228 default (https?|ftp)://[\-\.,/%~_:?&=\#a-zA-Z0-9]+ # URLs -color body color231 default (^|[[:space:]])\\*[^[:space:]]+\\*([[:space:]]|$) # *bold* text -color body color231 default (^|[[:space:]])_[^[:space:]]+_([[:space:]]|$) # _underlined_ text -color body color231 default (^|[[:space:]])/[^[:space:]]+/([[:space:]]|$) # /italic/ text -color quoted color61 default -color quoted1 color117 default -color quoted2 color84 default -color quoted3 color215 default -color quoted4 color212 default -color signature color212 default -# -# vim: ft=muttrc diff --git a/files/dotfiles/mutt/keybinding.muttrc b/files/dotfiles/mutt/keybinding.muttrc deleted file mode 100644 index 43a8d32..0000000 --- a/files/dotfiles/mutt/keybinding.muttrc +++ /dev/null @@ -1,17 +0,0 @@ -bind pager j next-line -bind pager k previous-line -bind pager h next-undeleted -bind pager l previous-undeleted -bind attach,index,pager \CD next-page -bind attach,index,pager \CU previous-page -bind pager gg top -bind pager G bottom -bind attach,index gg first-entry -bind attach,index G last-entry - -bind index,pager,attach,compose H "display-toggle-weed" -bind index w mail - -macro index S "mbsync -Va" "Synchronize mailbox with mbsync" - -# vim: ft=muttrc diff --git a/files/dotfiles/mutt/lafrite26@gmail.com.muttrc b/files/dotfiles/mutt/lafrite26@gmail.com.muttrc deleted file mode 100644 index b950199..0000000 --- a/files/dotfiles/mutt/lafrite26@gmail.com.muttrc +++ /dev/null @@ -1,45 +0,0 @@ -set realname = "Benjamin Bertrand" -set from = "lafrite26@gmail.com" -set my_pass = `pass show mail/lafrite26@gmail.com | head -n 1` - -set folder = "imaps://lafrite26@gmail.com@imap.gmail.com:993" -set imap_pass = $my_pass -set smtp_url = "smtps://lafrite26@gmail.com@smtp.gmail.com:465" -set smtp_pass = $my_pass - -set ssl_force_tls = yes -set ssl_starttls = yes - -set folder = "~/.mail/lafrite26" -set spoolfile = "$folder/INBOX" -set postponed = "$folder/Drafts" -set record = "$folder/Sent" -set mbox = "$folder/Archive" -set trash = "$folder/Trash" - -mailboxes =INBOX =Sent =Archive =Trash =Drafts - -bind index,pager,attach g noop -bind index,pager,attach gi noop -bind index,pager,attach ga noop -bind index,pager,attach gd noop -bind index,pager,attach gt noop -bind index,pager,attach gs noop -macro index gi "=INBOX" "Go to inbox" -macro index ga "=Archive" "Go to all mail" -macro index gd "=Drafts" "Go to drafts" -macro index gt "=Trash" "Go to trash" -macro index gs "=Sent\ Items" "Go to trash" - -bind index,pager m noop -bind index,pager mt noop -bind index,pager ma noop -macro index,pager mt "=Trash" "Trash" -macro index,pager ma "=Archive" "Archive" - - -source ~/.config/mutt/config.muttrc -source ~/.config/mutt/keybinding.muttrc -source ~/.config/mutt/dracula.muttrc - -# vim: ft=muttrc diff --git a/files/dotfiles/mutt/muttrc b/files/dotfiles/mutt/muttrc deleted file mode 100644 index 71fb9d3..0000000 --- a/files/dotfiles/mutt/muttrc +++ /dev/null @@ -1,8 +0,0 @@ -source ~/.config/mutt/opytex.muttrc - -source ~/.config/mutt/config.muttrc -source ~/.config/mutt/keybinding.muttrc -source ~/.config/mutt/dracula.muttrc - -folder-hook opytex/* source ~/.config/mutt/opytex.muttrc -folder-hook lafrite26/* source ~/.config/mutt/lafrite26.muttrc diff --git a/files/dotfiles/mutt/opytex.muttrc b/files/dotfiles/mutt/opytex.muttrc deleted file mode 100644 index 24b07bb..0000000 --- a/files/dotfiles/mutt/opytex.muttrc +++ /dev/null @@ -1,39 +0,0 @@ -set from = "benjamin.bertrand@opytex.org" -set realname = "Benjamin Bertrand" -set my_pass = `pass show mail/mailfence/Takanuva | head -n 1` - -set smtp_url = "smtps://benjamin.bertrand@opytex.org@smtp.mailfence.com:465" -set smtp_pass = $my_pass - -set ssl_force_tls = yes -set ssl_starttls = yes -set folder = "~/.mail/opytex" -set spoolfile = "$folder/INBOX" -set postponed = "$folder/Drafts" -set record = "$folder/Sent\ Items" -set mbox = "$folder/Archive" -set trash = "$folder/Trash" - -mailboxes =INBOX =Sent\ Items =Archive =Trash =Drafts - -bind index,pager,attach g noop -bind index,pager,attach gi noop -bind index,pager,attach ga noop -bind index,pager,attach gd noop -bind index,pager,attach gt noop -bind index,pager,attach gs noop -macro index gi "=INBOX" "Go to inbox" -macro index ga "=Archive" "Go to all mail" -macro index gd "=Drafts" "Go to drafts" -macro index gt "=Trash" "Go to trash" -macro index gs "=Sent\ Items" "Go to trash" - -bind index,pager m noop -bind index,pager mt noop -bind index,pager ma noop -macro index,pager mt "=Trash" "Trash" -macro index,pager ma "=Archive" "Archive" - - - -# vim: ft=muttrc diff --git a/files/dotfiles/newsboat/config b/files/dotfiles/newsboat/config deleted file mode 100644 index 3bfa1d6..0000000 --- a/files/dotfiles/newsboat/config +++ /dev/null @@ -1,28 +0,0 @@ -auto-reload yes -reload-time 30 -browser chromium -macro y set browser "tmux new-window mpv %u"; open-in-browser ; set browser chromium -macro Y set browser "mpv %u"; open-in-browser ; set browser chromium - -unbind-key h -unbind-key j -unbind-key k -unbind-key l - -bind-key h quit -bind-key j down -bind-key k up -bind-key l open - -color background default default -color listnormal default default -color listnormal_unread default default -color listfocus black yellow -color listfocus_unread black yellow -color info default black -color article default default - -# highlights -highlight article "^(Title):.*$" blue default -highlight article "https?://[^ ]+" red default -highlight article "\\[image\\ [0-9]+\\]" green default diff --git a/files/dotfiles/newsboat/urls b/files/dotfiles/newsboat/urls deleted file mode 100644 index ca1ceb1..0000000 --- a/files/dotfiles/newsboat/urls +++ /dev/null @@ -1,51 +0,0 @@ -https://www.youtube.com/feeds/videos.xml?channel_id=UC2eYFnH61tmytImy1mTYvhA "Tech" -https://www.youtube.com/feeds/videos.xml?channel_id=UCXuqSBlHAE6Xw-yeJA0Tunw "Tech" -https://www.youtube.com/feeds/videos.xml?channel_id=UCeeFfhMcJa1kjtfZAGskOCA "Tech" -https://www.youtube.com/feeds/videos.xml?channel_id=UCsRIv1fsbnQRIPKmUQbRzZg "Tech" -https://www.youtube.com/feeds/videos.xml?channel_id=UCUQo7nzH1sXVpzL92VesANw "Tech" - -https://www.youtube.com/feeds/videos.xml?channel_id=UC9C07cryUrKzLuAzwITPA3A "SC2" "SC2HL" - - -https://www.youtube.com/feeds/videos.xml?channel_id=UCg7HRuQ93hl9v8dTSt_XDHA "Ferme" "~Banabé" -https://www.youtube.com/feeds/videos.xml?channel_id=UCsM4_jihNFYe4CtSkXvDR-Q "Ferme" "~permaculture agroécologie etc..." -https://www.youtube.com/feeds/videos.xml?channel_id=UC2avy3Pwc3yVtt-tPKJn33A "Ferme" "~Ma ferme autonome" -https://www.youtube.com/feeds/videos.xml?channel_id=UCleSLCKdAEovKJxX-Kgbccw "Ferme" "~Ma ferme autonome2" -https://www.youtube.com/feeds/videos.xml?channel_id=UCNqADXg6dTqov4klT703jYg "Ferme" "Les Jérômes" -https://www.youtube.com/feeds/videos.xml?channel_id=UC9Q8WeyCb3yxySC3P3mGpBw "Ferme" "Le jardin d'Emerveille" -https://www.youtube.com/feeds/videos.xml?channel_id=UC3-gwlrYQi5Q3t00Tyr2tmQ "Ferme" "Le jardin d'Olivier" -https://www.youtube.com/feeds/videos.xml?channel_id=UCSKdJoK73RLL-zOs4Sq_tTQ "Ferme" "Loic le jardineur" -https://www.youtube.com/feeds/videos.xml?channel_id=UCJfcABj0bAqFrK3tjhGsSpw "Ferme" "Theud Bald" - -https://www.youtube.com/feeds/videos.xml?channel_id=UCL_r1ELEvAuN0peKUxI0Umw "Permaculture" "Geoff Lawton" - - -https://www.youtube.com/feeds/videos.xml?channel_id=UCzVy7DiPyVvfiOvXF_XMs4Q "Apnée" "~Adam Freediver" - - -https://www.youtube.com/feeds/videos.xml?channel_id=UCJNItGjNhUx3Zz6W4OCVfHA "Bois" "~Passion renovation" -https://www.youtube.com/feeds/videos.xml?channel_id=UCvDpfkniGG6WkX5L7DwyGaA "Bois" "Olivier Verdier" -https://www.youtube.com/feeds/videos.xml?channel_id=UC7TiJ6Tnxc_dSE42byTPMug "Bois" "Copain des copeaux" -https://www.youtube.com/feeds/videos.xml?channel_id=UC9fGq2-6FaftcegcIadLf6A "Bois" "Samuel Mamias" -https://www.youtube.com/feeds/videos.xml?channel_id=UCOuow_HIYmeaIqi42zVs3qg "Bois" "Kirby Meets Audio" -https://www.youtube.com/feeds/videos.xml?channel_id=UC7FkqjV8SU5I8FCHXQSQe9Q "Bois" "Ishitani furniture" -https://www.youtube.com/feeds/videos.xml?channel_id=UCjaudhGC0gBfEtMyQYzT3pA "Bois" "Atelier Floky" - -https://www.youtube.com/feeds/videos.xml?channel_id=UCRix1GJvSBNDpEFY561eSzw "DIY" "Laura Kampf" - -https://www.youtube.com/feeds/videos.xml?channel_id=UC6mIxFTvXkWQVEHPsEdflzQ "Electronique" "GreatScott!" - -https://www.youtube.com/feeds/videos.xml?channel_id=UCP6qAy9q_Lkhzu2reZfun9g "Ski" "~WINTERACTIVITY" -https://www.youtube.com/feeds/videos.xml?channel_id=UCjHh3N6jUJKdrtTqNorpRhg "Ski" "Bon appetit" -https://www.youtube.com/feeds/videos.xml?channel_id=UCdtrhMQTlTWNLGcmx1Qy80Q "Ski" "Fabien Maierhofer" -https://www.youtube.com/feeds/videos.xml?channel_id=UChkpEJqHjX-tGmYoGf8jdGA "Escalade" "EpicTV Relais Vertical" - - -https://www.youtube.com/feeds/videos.xml?channel_id=UCgkhWgBGRp0sdFy2MHDWfSg "Math" "El Ji" -https://www.youtube.com/feeds/videos.xml?channel_id=UCYO_jab_esuFRV4b17AJtAw "Math" "3Blue1Brown" - -https://www.youtube.com/feeds/videos.xml?channel_id=UC8ENHE5xdFSwx71u3fDH5Xw "Vim" "ThePrimeagen" -https://www.youtube.com/feeds/videos.xml?channel_id=UCXPHFM88IlFn68OmLwtPmZA "Vim" "Greg Hurrel" -https://www.youtube.com/feeds/videos.xml?channel_id=UCs_AZuYXi6NA9tkdbhjItHQ "AdminSys" "Xavki" -https://www.youtube.com/feeds/videos.xml?channel_id=UCvjgXvBlbQiydffZU7m1_aw "Programmation" "~Coding Train" -https://www.youtube.com/feeds/videos.xml?channel_id=UCj_iGliGCkLcHSZ8eqVNPDQ "Programmation" "~Grafikart.fr" diff --git a/files/dotfiles/nvim/coc-settings.json b/files/dotfiles/nvim/coc-settings.json deleted file mode 100644 index 4202505..0000000 --- a/files/dotfiles/nvim/coc-settings.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "coc.preferences.formatOnSaveFiletypes": [ - "rst", - "javascript", - "python", - "json", - "yaml" - ], - "python.jediEnabled": false, - "python.formatting.provider": "black" -} diff --git a/files/dotfiles/nvim/general/completion.vim b/files/dotfiles/nvim/general/completion.vim deleted file mode 100644 index e914599..0000000 --- a/files/dotfiles/nvim/general/completion.vim +++ /dev/null @@ -1,18 +0,0 @@ -" Use completion-nvim in every buffer -autocmd BufEnter * lua require'completion'.on_attach() - -let g:completion_enable_snippet = 'UltiSnips' -let g:completion_matching_strategy_list = ['exact', 'substring', 'fuzzy'] - -" Use and to navigate through popup menu -" inoremap pumvisible() ? "\" : "\" -" inoremap pumvisible() ? "\" : "\" - -"map to manually trigger completion -"imap (completion_trigger) - -" Set completeopt to have a better completion experience -set completeopt=menuone,noinsert,noselect - -" Avoid showing message extra message when using completion -set shortmess+=c diff --git a/files/dotfiles/nvim/general/mappings.vim b/files/dotfiles/nvim/general/mappings.vim deleted file mode 100644 index d9453b9..0000000 --- a/files/dotfiles/nvim/general/mappings.vim +++ /dev/null @@ -1,19 +0,0 @@ -" Better window navigation -" nnoremap h -" nnoremap j -" nnoremap k -" nnoremap l - -" Align blocks of text and keep them selected -vmap < >gv - -" Automatically spell check last error in insert mode -inoremap u[s1z=`]au - -" Find files using Telescope command-line sugar. -nnoremap e Telescope find_files -nnoremap g Telescope live_grep -nnoremap b Telescope buffers -nnoremap h Telescope help_tags - diff --git a/files/dotfiles/nvim/general/settings.vim b/files/dotfiles/nvim/general/settings.vim deleted file mode 100644 index 43f522b..0000000 --- a/files/dotfiles/nvim/general/settings.vim +++ /dev/null @@ -1,66 +0,0 @@ -" set leader key -let g:mapleader = "\" - -syntax enable " Enables syntax highlighing -set hidden " Required to keep multiple buffers open multiple buffers -set wrap " Display long lines as just one line -set pumheight=10 " Makes popup menu smaller -set encoding=utf-8 " The encoding displayed -set fileencoding=utf-8 " The encoding written to file -set ruler " Show the cursor position all the time -set cmdheight=1 " More space for displaying messages -set iskeyword+=- " treat dash separated words as a word text object" -set mouse=a " Enable your mouse -set t_Co=256 " Support 256 colors - -set conceallevel=0 " So that I can see `` in markdown files -set tabstop=4 " Insert 2 spaces for a tab -set shiftwidth=4 " Change the number of space characters inserted for indentation -set smarttab " Makes tabbing smarter will realize you have 2 vs 4 -set expandtab " Converts tabs to spaces -set smartindent " Makes indenting smart -set autoindent " Good auto indent -set foldmethod=indent - -set laststatus=2 " Always display the status line - -set number " Line number -set relativenumber " Relative line number -set cursorline " Enable highlighting of the current line -set showtabline=1 " show tabs only when there are some - -set background=dark " tell vim what the background color looks like - -set nobackup " This is recommended by coc -set nowritebackup " This is recommended by coc -set noswapfile - -set updatetime=300 " Faster completion -set timeoutlen=500 " By default timeoutlen is 1000 ms - -set clipboard=unnamedplus " Copy paste between vim and everything else - -set showmode " Display edition mode -"set noshowmode " We don't need to see things like -- INSERT -- anymore - -set incsearch " hightlight while searching -set ignorecase " Ignore case while searching -set smartcase " Override ignorecase if search patern contains upper case -set wildmenu " Enable wildmenu - -set spell " Enable spell checking -set spelllang=fr,en - -set nrformats+=alpha " letter concidered as number for Ctrl-A or Ctrl-X - -"set autochdir " Your working directory will always be the same as your working directory - -execute "set colorcolumn=" . join(range(81,335), ',') - -colorscheme zenburn - -" Set completeopt to have a better completion experience -set completeopt=menuone,noinsert,noselect - -" Avoid showing message extra message when using completion -set shortmess+=c diff --git a/files/dotfiles/nvim/init.vim b/files/dotfiles/nvim/init.vim deleted file mode 100644 index 7f29c13..0000000 --- a/files/dotfiles/nvim/init.vim +++ /dev/null @@ -1,18 +0,0 @@ -source $HOME/.config/nvim/vim-plug/plugins.vim -source $HOME/.config/nvim/general/settings.vim -source $HOME/.config/nvim/general/mappings.vim -source $HOME/.config/nvim/general/completion.vim - -" source $HOME/.config/nvim/plug-config/fzf.vim -" source $HOME/.config/nvim/plug-config/coc.vim -" source $HOME/.config/nvim/plug-config/coc-snippets.vim -" source $HOME/.config/nvim/plug-config/vimtex.vim -source $HOME/.config/nvim/plug-config/lightline.vim - -lua < - buf_set_option('omnifunc', 'v:lua.vim.lsp.omnifunc') - - -- Mappings. - local opts = { noremap=true, silent=true } - - -- See `:help vim.lsp.*` for documentation on any of the below functions - -- See references - buf_set_keymap('n', 'gr', 'lua vim.lsp.buf.references()', opts) - -- show documentation - buf_set_keymap('n', 'K', 'lua vim.lsp.buf.hover()', opts) - -- Rename - buf_set_keymap('n', 'rn', 'lua vim.lsp.buf.rename()', opts) - - -- je sais pas ce c'est que ces workspaces - buf_set_keymap('n', 'wa', 'lua vim.lsp.buf.add_workspace_folder()', opts) - buf_set_keymap('n', 'wr', 'lua vim.lsp.buf.remove_workspace_folder()', opts) - buf_set_keymap('n', 'wl', 'lua print(vim.inspect(vim.lsp.buf.list_workspace_folders()))', opts) - -- ?? - buf_set_keymap('n', 'ca', 'lua vim.lsp.buf.code_action()', opts) - -- Details on diagnostics - buf_set_keymap('n', 'd', 'lua vim.lsp.diagnostic.show_line_diagnostics()', opts) - -- Cycle over diagnostics - buf_set_keymap('n', '[d', 'lua vim.lsp.diagnostic.goto_prev()', opts) - buf_set_keymap('n', ']d', 'lua vim.lsp.diagnostic.goto_next()', opts) - -- Get diagnostic on local list - buf_set_keymap('n', 'q', 'lua vim.lsp.diagnostic.set_loclist()', opts) - buf_set_keymap("n", "f", "lua vim.lsp.buf.formatting()", opts) - - buf_set_keymap('n', 'gD', 'lua vim.lsp.buf.declaration()', opts) - buf_set_keymap('n', 'gd', 'lua vim.lsp.buf.definition()', opts) - buf_set_keymap('n', 'gi', 'lua vim.lsp.buf.implementation()', opts) - buf_set_keymap('n', '', 'lua vim.lsp.buf.signature_help()', opts) - buf_set_keymap('n', 'D', 'lua vim.lsp.buf.type_definition()', opts) -end - --- Use a loop to conveniently call 'setup' on multiple servers and --- map buffer local keybindings when the language server attaches -local servers = { "pyright" } -for _, lsp in ipairs(servers) do - nvim_lsp[lsp].setup { - on_attach = on_attach, - flags = { - debounce_text_changes = 150, - } - } -end diff --git a/files/dotfiles/nvim/plug-config/coc-snippets.vim b/files/dotfiles/nvim/plug-config/coc-snippets.vim deleted file mode 100644 index 1975e69..0000000 --- a/files/dotfiles/nvim/plug-config/coc-snippets.vim +++ /dev/null @@ -1,25 +0,0 @@ -inoremap - \ pumvisible() ? coc#_select_confirm() : - \ coc#expandableOrJumpable() ? "\=coc#rpc#request('doKeymap', ['snippets-expand-jump',''])\" : - \ check_back_space() ? "\" : - \ coc#refresh() - -function! s:check_back_space() abort - let col = col('.') - 1 - return !col || getline('.')[col - 1] =~# '\s' -endfunction - -let g:coc_snippet_next = '' - -" and to navigate between choices -inoremap pumvisible() ? "\" : "\" -inoremap pumvisible() ? "\" : "\" - -" to validate selected autocompletion -inoremap pumvisible() ? "\" : "\u\" - -" Use for jump to next placeholder, it's default of coc.nvim -let g:coc_snippet_next = '' - -" Use for jump to previous placeholder, it's default of coc.nvim -let g:coc_snippet_prev = '' diff --git a/files/dotfiles/nvim/plug-config/coc.vim b/files/dotfiles/nvim/plug-config/coc.vim deleted file mode 100644 index e69de29..0000000 diff --git a/files/dotfiles/nvim/plug-config/fzf.vim b/files/dotfiles/nvim/plug-config/fzf.vim deleted file mode 100644 index 7b9e8b8..0000000 --- a/files/dotfiles/nvim/plug-config/fzf.vim +++ /dev/null @@ -1,70 +0,0 @@ -" This is the default extra key bindings -let g:fzf_action = { - \ 'ctrl-t': 'tab split', - \ 'ctrl-x': 'split', - \ 'ctrl-v': 'vsplit' } - -" Enable per-command history. -" CTRL-N and CTRL-P will be automatically bound to next-history and -" previous-history instead of down and up. If you don't like the change, -" explicitly bind the keys to down and up in your $FZF_DEFAULT_OPTS. -let g:fzf_history_dir = '~/.local/share/fzf-history' - -map b :Buffers -nnoremap e :Files -nnoremap g :Rg -nnoremap t :Tags -nnoremap m :Marks - - -let g:fzf_tags_command = 'ctags -R' -" Border color -let g:fzf_layout = {'up':'~90%', 'window': { 'width': 0.8, 'height': 0.8,'yoffset':0.5,'xoffset': 0.5, 'highlight': 'Todo', 'border': 'sharp' } } - -let $FZF_DEFAULT_OPTS = '--layout=reverse --info=inline' -let $FZF_DEFAULT_COMMAND="rg --files --hidden" - - -" Customize fzf colors to match your color scheme -let g:fzf_colors = -\ { 'fg': ['fg', 'Normal'], - \ 'bg': ['bg', 'Normal'], - \ 'hl': ['fg', 'Comment'], - \ 'fg+': ['fg', 'CursorLine', 'CursorColumn', 'Normal'], - \ 'bg+': ['bg', 'CursorLine', 'CursorColumn'], - \ 'hl+': ['fg', 'Statement'], - \ 'info': ['fg', 'PreProc'], - \ 'border': ['fg', 'Ignore'], - \ 'prompt': ['fg', 'Conditional'], - \ 'pointer': ['fg', 'Exception'], - \ 'marker': ['fg', 'Keyword'], - \ 'spinner': ['fg', 'Label'], - \ 'header': ['fg', 'Comment'] } - -"Get Files -command! -bang -nargs=? -complete=dir Files - \ call fzf#vim#files(, fzf#vim#with_preview({'options': ['--layout=reverse', '--info=inline']}), 0) - - -" Get text in files with Rg -command! -bang -nargs=* Rg - \ call fzf#vim#grep( - \ 'rg --column --line-number --no-heading --color=always --smart-case '.shellescape(), 1, - \ fzf#vim#with_preview(), 0) - -" Ripgrep advanced -function! RipgrepFzf(query, fullscreen) - let command_fmt = 'rg --column --line-number --no-heading --color=always --smart-case %s || true' - let initial_command = printf(command_fmt, shellescape(a:query)) - let reload_command = printf(command_fmt, '{q}') - let spec = {'options': ['--phony', '--query', a:query, '--bind', 'change:reload:'.reload_command]} - call fzf#vim#grep(initial_command, 1, fzf#vim#with_preview(spec), a:fullscreen) -endfunction - -command! -nargs=* -bang RG call RipgrepFzf(, 0) - -" Git grep -command! -bang -nargs=* GGrep - \ call fzf#vim#grep( - \ 'git grep --line-number '.shellescape(), 0, - \ fzf#vim#with_preview({'dir': systemlist('git rev-parse --show-toplevel')[0]}), 0) diff --git a/files/dotfiles/nvim/plug-config/lightline.vim b/files/dotfiles/nvim/plug-config/lightline.vim deleted file mode 100644 index 328e353..0000000 --- a/files/dotfiles/nvim/plug-config/lightline.vim +++ /dev/null @@ -1,10 +0,0 @@ -let g:lightline = { - \ 'colorscheme': 'wombat', - \ 'active': { - \ 'left': [ [ 'mode', 'paste' ], - \ [ 'gitbranch', 'readonly', 'relativepath', 'modified'] ] - \ }, - \ 'component_function': { - \ 'gitbranch': 'FugitiveHead' - \ }, - \ } diff --git a/files/dotfiles/nvim/plug-config/nvim-colorize.lua.vim b/files/dotfiles/nvim/plug-config/nvim-colorize.lua.vim deleted file mode 100644 index b7d2445..0000000 --- a/files/dotfiles/nvim/plug-config/nvim-colorize.lua.vim +++ /dev/null @@ -1 +0,0 @@ -lua require'colorizer'.setup() diff --git a/files/dotfiles/nvim/plug-config/ultisnips.vim b/files/dotfiles/nvim/plug-config/ultisnips.vim deleted file mode 100644 index a89fdc1..0000000 --- a/files/dotfiles/nvim/plug-config/ultisnips.vim +++ /dev/null @@ -1 +0,0 @@ -let g:completion_enable_snippet = 'UltiSnips' diff --git a/files/dotfiles/nvim/plug-config/vimtex.vim b/files/dotfiles/nvim/plug-config/vimtex.vim deleted file mode 100644 index 210236f..0000000 --- a/files/dotfiles/nvim/plug-config/vimtex.vim +++ /dev/null @@ -1,25 +0,0 @@ -let maplocalleader = "\" - -let g:tex_conceal = "" -set conceallevel=0 - -let g:vimtex_compiler_latexmk = { - \ 'backend' : 'nvim', - \ 'background' : 1, - \ 'build_dir' : '', - \ 'callback' : 0, - \ 'continuous' : 1, - \ 'options' : [ - \ '-pdf', - \ '-verbose', - \ '-file-line-error', - \ '-synctex=1', - \ '-interaction=nonstopmode', - \ '-silent', - \ '-shell-escape', - \ ], - \} -let g:vimtex_view_method = 'zathura' - -" Les fichiers sty et cls sont vus comme des fichiers tex -autocmd BufRead,BufNewFile *.{sty,cls} setlocal syntax=tex diff --git a/files/dotfiles/nvim/vim-plug/plugins.vim b/files/dotfiles/nvim/vim-plug/plugins.vim deleted file mode 100644 index 47f2874..0000000 --- a/files/dotfiles/nvim/vim-plug/plugins.vim +++ /dev/null @@ -1,41 +0,0 @@ -" auto-install vim-plug -if empty(glob('~/.config/nvim/autoload/plug.vim')) - silent !curl -fLo ~/.config/nvim/autoload/plug.vim --create-dirs - \ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim - "autocmd VimEnter * PlugInstall - "autocmd VimEnter * PlugInstall | source $MYVIMRC -endif - -call plug#begin('~/.config/nvim/autoload/plugged') - - Plug 'jnurmine/Zenburn' - Plug 'itchyny/lightline.vim' - - "Plug 'tpope/vim-sensible' - Plug 'tpope/vim-fugitive' - Plug 'tpope/vim-surround' - Plug 'tpope/vim-repeat' - - Plug 'junegunn/goyo.vim' - Plug 'christoomey/vim-tmux-navigator' - Plug 'Yggdroot/indentLine' - - Plug 'neovim/nvim-lspconfig' - " Plug 'hrsh7th/nvim-compe' - Plug 'nvim-lua/completion-nvim' - - Plug 'nvim-lua/popup.nvim' - Plug 'nvim-lua/plenary.nvim' - Plug 'nvim-telescope/telescope.nvim' - - "Plug 'lervag/vimtex' - - Plug 'SirVer/ultisnips' - Plug 'honza/vim-snippets' - - Plug 'mhinz/vim-signify' - Plug 'tpope/vim-fugitive' - - Plug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'} - -call plug#end() diff --git a/files/dotfiles/ssh/config_admin b/files/dotfiles/ssh/config_admin deleted file mode 100755 index 3639cc8..0000000 --- a/files/dotfiles/ssh/config_admin +++ /dev/null @@ -1,33 +0,0 @@ -Host Manioc - HostName ns331481.ip-37-187-121.eu - User waha - ForwardAgent yes - PubkeyAcceptedKeyTypes * - identityfile ~/.ssh/id_ed25519_Manioc - -Host Embrevade - HostName 5.196.95.88 - User waha - Port 22 - ForwardAgent yes - PubkeyAcceptedKeyTypes * - identityfile ~/.ssh/id_ed25519_Embrevade - IdentitiesOnly yes - -Host Panais - HostName 91.121.90.228 - User waha - Port 22 - ForwardAgent yes - PubkeyAcceptedKeyTypes * - identityfile ~/.ssh/id_ed25519_Panais - IdentitiesOnly yes - -Host BV_boutique - HostName vps789921.ovh.net - User waha - Port 22 - ForwardAgent yes - PubkeyAcceptedKeyTypes * - identityfile ~/.ssh/id_ed25519_BV_boutique - IdentitiesOnly yes diff --git a/files/dotfiles/ssh/config_me b/files/dotfiles/ssh/config_me deleted file mode 100755 index ecfe46b..0000000 --- a/files/dotfiles/ssh/config_me +++ /dev/null @@ -1,63 +0,0 @@ -PreferredAuthentications keyboard-interactive,password,publickey,hostbased,gssapi-with-mic - -Host Manioc - HostName ns331481.ip-37-187-121.eu - User sshcontent - ForwardAgent yes - PubkeyAcceptedKeyTypes * - identityfile ~/.ssh/id_ed25519_Manioc - -Host Embrevade - HostName 5.196.95.88 - User sshcontent - Port 22 - ForwardAgent yes - PubkeyAcceptedKeyTypes * - identityfile ~/.ssh/id_ed25519_Embrevade - IdentitiesOnly yes - -Host Panais - HostName 91.121.90.228 - User sshcontent - Port 22 - ForwardAgent yes - PubkeyAcceptedKeyTypes * - identityfile ~/.ssh/id_ed25519_Panais - IdentitiesOnly yes - -Host BV_boutique - HostName vps789921.ovh.net - User sshcontent - Port 22 - ForwardAgent yes - PubkeyAcceptedKeyTypes * - identityfile ~/.ssh/id_ed25519_BV_boutique - IdentitiesOnly yes - -Host git_opytex - HostName git.opytex.org - User git - Port 2222 - identityfile ~/.ssh/id_rsa_gitopytex - IdentitiesOnly yes - -Host github - HostName github.com - User git - ForwardAgent yes - PubkeyAcceptedKeyTypes * - identityfile ~/.ssh/id_dsa_noPass - -Host Choux - HostName Choux - User lafrite - ForwardAgent yes - identityfile ~/.ssh/id_ed25519_home - PubkeyAcceptedKeyTypes * - -Host Combava - HostName Combava - User lafrite - ForwardAgent yes - identityfile ~/.ssh/id_ed25519_home - PubkeyAcceptedKeyTypes * diff --git a/files/dotfiles/tmux.conf b/files/dotfiles/tmux.conf deleted file mode 100644 index b0e11bb..0000000 --- a/files/dotfiles/tmux.conf +++ /dev/null @@ -1,199 +0,0 @@ -set -g default-terminal "screen-256color" - -## Vim user config - -#Prefix is Ctrl-a -unbind C-b -set -g prefix C-space -bind C-space send-prefix - - -# C-space C-space will swap to last used window -bind-key C-space last-window - -set -sg escape-time 1 -#set -g base-index 1 -#setw -g pane-base-index 1 - -#Mouse works as expected -set -g mouse on -#setw -g mode-mouse on -#set -g mouse-select-pane on -#set -g mouse-resize-pane on -#set -g mouse-select-window on - -set -g monitor-activity on -set -g visual-activity on - -setw -g mode-keys vi -set -g history-limit 10000 - -# y and p as in vim -bind Escape copy-mode -unbind p -bind p paste-buffer -#bind -t vi-copy 'v' begin-selection -#bind -t vi-copy 'y' copy-selection -#bind -t vi-copy 'Space' halfpage-down -#bind -t vi-copy 'Bspace' halfpage-up -bind-key -T copy-mode-vi 'v' send -X begin-selection -bind-key -T copy-mode-vi 'y' send -X copy-selection -bind-key -T copy-mode-vi 'Space' send -X halfpage-down -bind-key -T copy-mode-vi 'Bspace' send -X halfpage-up - -# Remap previous window -bind b previous-window - -# extra commands for interacting with the ICCCM clipboard -bind C-c run "tmux save-buffer - | xclip -i -sel clipboard" -bind C-v run "tmux set-buffer \"$(xclip -o -sel clipboard)\"; tmux paste-buffer" - -# easy-to-remember split pane commands -bind | split-window -h -bind - split-window -v -unbind '"' -unbind % - -# # moving between panes with vim movement keys -# bind h select-pane -L -# bind j select-pane -D -# bind k select-pane -U -# bind l select-pane -R -# Smart pane switching with awareness of Vim splits. -# See: https://github.com/christoomey/vim-tmux-navigator -is_vim="ps -o state= -o comm= -t '#{pane_tty}' \ - | grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|n?vim?x?)(diff)?$'" -bind-key -n C-h if-shell "$is_vim" "send-keys C-h" "select-pane -L" -bind-key -n C-j if-shell "$is_vim" "send-keys C-j" "select-pane -D" -bind-key -n C-k if-shell "$is_vim" "send-keys C-k" "select-pane -U" -bind-key -n C-l if-shell "$is_vim" "send-keys C-l" "select-pane -R" -bind-key -n C-\ if-shell "$is_vim" "send-keys C-\\" "select-pane -l" -bind-key -T copy-mode-vi C-h select-pane -L -bind-key -T copy-mode-vi C-j select-pane -D -bind-key -T copy-mode-vi C-k select-pane -U -bind-key -T copy-mode-vi C-l select-pane -R -bind-key -T copy-mode-vi C-\ select-pane -l - -# moving between windows with vim movement keys -bind -r C-h select-window -t :- -bind -r C-l select-window -t :+ - -# resize panes with vim movement keys -bind -r H resize-pane -L 5 -bind -r J resize-pane -D 5 -bind -r K resize-pane -U 5 -bind -r L resize-pane -R 5 - -###################### -### DESIGN CHANGES ### -###################### - -# panes -set -g pane-border-fg black -set -g pane-active-border-fg brightred - -## Status bar design -# status line -# set -g status-utf8 on -set -g status-justify left -set -g status-bg default -set -g status-fg colour12 -set -g status-interval 2 - -# messaging -set -g message-fg black -set -g message-bg yellow -set -g message-command-fg blue -set -g message-command-bg black - -#window mode -setw -g mode-bg colour6 -setw -g mode-fg colour0 - -# window status -setw -g window-status-format " #F#I:#W#F " -setw -g window-status-current-format " #F#I:#W#F " -setw -g window-status-format "#[fg=magenta]#[bg=black] #I #[bg=cyan]#[fg=colour8] #W " -setw -g window-status-current-format "#[bg=brightmagenta]#[fg=colour8] #I #[fg=colour8]#[bg=colour14] #W " -setw -g window-status-current-bg colour0 -setw -g window-status-current-fg colour11 -setw -g window-status-current-attr dim -setw -g window-status-bg green -setw -g window-status-fg black -setw -g window-status-attr reverse - -# Info on left (I don't have a session display for now) -set -g status-left '' - -# loud or quiet? -set-option -g visual-activity off -set-option -g visual-bell off -set-option -g visual-silence off -set-window-option -g monitor-activity off -set-option -g bell-action none - -set -g default-terminal "screen-256color" - -# The modes { -setw -g clock-mode-colour colour135 -setw -g mode-attr bold -setw -g mode-fg colour196 -setw -g mode-bg colour238 - -# } -# The panes { - -set -g pane-border-bg colour235 -set -g pane-border-fg colour238 -set -g pane-active-border-bg colour236 -set -g pane-active-border-fg colour51 - -# } -# The statusbar { - -set -g status-position bottom -set -g status-bg colour234 -set -g status-fg colour137 -set -g status-attr dim -set -g status-left '#[fg=colour81,bg=colour241,bold] #S ' -set -g status-right '#[fg=colour233,bg=colour241,bold] %d/%m #[fg=colour233,bg=colour245,bold] %H:%M:%S ' -set -g status-right-length 50 -set -g status-left-length 20 - -setw -g window-status-current-fg colour81 -setw -g window-status-current-bg colour238 -setw -g window-status-current-attr bold -setw -g window-status-current-format ' #I#[fg=colour250]:#[fg=colour255]#W#[fg=colour50]#F ' - -setw -g window-status-fg colour138 -setw -g window-status-bg colour235 -setw -g window-status-attr none -setw -g window-status-format ' #I#[fg=colour237]:#[fg=colour250]#W#[fg=colour244]#F ' - -setw -g window-status-bell-attr bold -setw -g window-status-bell-fg colour255 -setw -g window-status-bell-bg colour1 - -# } -# The messages { - -set -g message-attr bold -set -g message-fg colour232 -set -g message-bg colour166 - -# } - - -## Plugins -# Supports `github_username/repo` or full git repo URLs -set -g @tpm_plugins 'tmux-plugins/tpm' -set -g @tpm_plugins 'tmux-plugins/tmux-sensible' -# tmux-plugins/tmux-resurrect \ -# tmux-plugins/tmux-continuum \ - -## tmux-continuum: automatic restore -#set -g @continuum-restore 'on' - - -# Keep this line at the very bottom of tmux.conf. -run-shell '~/.tmux/plugins/tpm/tpm' diff --git a/files/dotfiles/tmuxinator/bopytex.yml b/files/dotfiles/tmuxinator/bopytex.yml deleted file mode 100644 index 6a847dd..0000000 --- a/files/dotfiles/tmuxinator/bopytex.yml +++ /dev/null @@ -1,43 +0,0 @@ -# ~/.tmuxinator/pymath.yml - -name: bopytex -root: ~/scripts/Bopytex - -# Optional tmux socket -# socket_name: foo - -# Runs before everything. Use it to start daemons etc. -# pre: sudo /etc/rc.d/mysqld start - -# Runs in each window and pane before window/pane specific commands. Useful for setting up interpreter versions. -# pre_window: rbenv shell 2.0.0-p247 -pre_window: workon bopytex - -# Pass command line options to tmux. Useful for specifying a different tmux.conf. -# tmux_options: -f ~/.tmux.mac.conf - -# Change the command to call tmux. This can be used by derivatives/wrappers like byobu. -# tmux_command: byobu - -# Specifies (by name or index) which window will be selected on project startup. If not set, the first window is used. -# startup_window: logs - -# Controls whether the tmux session should be attached to automatically. Defaults to true. -# attach: false - -# Runs after everything. Use it to attach to tmux with custom options etc. -# post: tmux -CC attach -t pymath - -windows: - - editor: - - vim - - giting: - layout: main-vertical - panes: - - git fetch && git status - - tig - - testing: - layout: main-vertical - panes: - - #empty - - #empty diff --git a/files/dotfiles/tmuxinator/enseignement.yml b/files/dotfiles/tmuxinator/enseignement.yml deleted file mode 100644 index c50e76c..0000000 --- a/files/dotfiles/tmuxinator/enseignement.yml +++ /dev/null @@ -1,39 +0,0 @@ -# ~/.tmuxinator/marbenj_sigal.yml - -name: enseignement -root: /home/lafrite/Cours/Prof/Enseignements/2018-2019/ -#root: /media/documents/Cours/Prof/Enseignements - -# Optional tmux socket -# socket_name: foo - -# Runs before everything. Use it to start daemons etc. -# pre: sudo /etc/rc.d/mysqld start -# pre: workon marbenj_sigal - -# Runs in each window and pane before window/pane specific commands. Useful for setting up interpreter versions. -# pre_window: rbenv shell 2.0.0-p247 -pre_window: . ./config.sh - -# Pass command line options to tmux. Useful for specifying a different tmux.conf. -# tmux_options: -f ~/.tmux.mac.conf - -# Change the command to call tmux. This can be used by derivatives/wrappers like byobu. -# tmux_command: byobu - -# Specifies (by name or index) which window will be selected on project startup. If not set, the first window is used. -# startup_window: logs - -# Controls whether the tmux session should be attached to automatically. Defaults to true. -# attach: false - -# Runs after everything. Use it to attach to tmux with custom options etc. -# post: tmux -CC attach -t marbenj_sigal - -windows: - - editor: vim -c NERDTree - - server: - layout: main-vertical - panes: - - - - diff --git a/files/dotfiles/tmuxinator/mapytex.yml b/files/dotfiles/tmuxinator/mapytex.yml deleted file mode 100644 index d64f29c..0000000 --- a/files/dotfiles/tmuxinator/mapytex.yml +++ /dev/null @@ -1,43 +0,0 @@ -# ~/.tmuxinator/pymath.yml - -name: mapytex -root: ~/scripts/Mapytex/ - -# Optional tmux socket -# socket_name: foo - -# Runs before everything. Use it to start daemons etc. -# pre: sudo /etc/rc.d/mysqld start - -# Runs in each window and pane before window/pane specific commands. Useful for setting up interpreter versions. -# pre_window: rbenv shell 2.0.0-p247 -pre_window: source .venv/bin/activate - -# Pass command line options to tmux. Useful for specifying a different tmux.conf. -# tmux_options: -f ~/.tmux.mac.conf - -# Change the command to call tmux. This can be used by derivatives/wrappers like byobu. -# tmux_command: byobu - -# Specifies (by name or index) which window will be selected on project startup. If not set, the first window is used. -# startup_window: logs - -# Controls whether the tmux session should be attached to automatically. Defaults to true. -# attach: false - -# Runs after everything. Use it to attach to tmux with custom options etc. -# post: tmux -CC attach -t pymath - -windows: - - editor: - - vim -c NERDTree - - giting: - layout: main-vertical - panes: - - git fetch && git status - - tig - - testing: - layout: main-vertical - panes: - - #empty - - #empty diff --git a/files/dotfiles/tmuxinator/marbenj_sigal.yml b/files/dotfiles/tmuxinator/marbenj_sigal.yml deleted file mode 100644 index dcd2652..0000000 --- a/files/dotfiles/tmuxinator/marbenj_sigal.yml +++ /dev/null @@ -1,38 +0,0 @@ -# ~/.tmuxinator/marbenj_sigal.yml - -name: marbenj_sigal -root: /media/documents/marbenj/ - -# Optional tmux socket -# socket_name: foo - -# Runs before everything. Use it to start daemons etc. -# pre: sudo /etc/rc.d/mysqld start -#pre: workon marbenj_sigal - -# Runs in each window and pane before window/pane specific commands. Useful for setting up interpreter versions. -# pre_window: rbenv shell 2.0.0-p247 -pre_window: workon marbenj_sigal - -# Pass command line options to tmux. Useful for specifying a different tmux.conf. -# tmux_options: -f ~/.tmux.mac.conf - -# Change the command to call tmux. This can be used by derivatives/wrappers like byobu. -# tmux_command: byobu - -# Specifies (by name or index) which window will be selected on project startup. If not set, the first window is used. -# startup_window: logs - -# Controls whether the tmux session should be attached to automatically. Defaults to true. -# attach: false - -# Runs after everything. Use it to attach to tmux with custom options etc. -# post: tmux -CC attach -t marbenj_sigal - -windows: - - editor: vim - - server: - layout: main-vertical - panes: - - - - diff --git a/files/dotfiles/tmuxinator/marbenj_sigal_dev.yml b/files/dotfiles/tmuxinator/marbenj_sigal_dev.yml deleted file mode 100644 index 8fbff63..0000000 --- a/files/dotfiles/tmuxinator/marbenj_sigal_dev.yml +++ /dev/null @@ -1,38 +0,0 @@ -# ~/.tmuxinator/marbenj_sigal.yml - -name: marbenj_sigal -root: ~/scripts/marbenj_signal - -# Optional tmux socket -# socket_name: foo - -# Runs before everything. Use it to start daemons etc. -# pre: sudo /etc/rc.d/mysqld start -#pre: workon marbenj_sigal - -# Runs in each window and pane before window/pane specific commands. Useful for setting up interpreter versions. -# pre_window: rbenv shell 2.0.0-p247 -pre_window: workon marbenj_sigal - -# Pass command line options to tmux. Useful for specifying a different tmux.conf. -# tmux_options: -f ~/.tmux.mac.conf - -# Change the command to call tmux. This can be used by derivatives/wrappers like byobu. -# tmux_command: byobu - -# Specifies (by name or index) which window will be selected on project startup. If not set, the first window is used. -# startup_window: logs - -# Controls whether the tmux session should be attached to automatically. Defaults to true. -# attach: false - -# Runs after everything. Use it to attach to tmux with custom options etc. -# post: tmux -CC attach -t marbenj_sigal - -windows: - - editor: vim - - server: - layout: main-vertical - panes: - - - - diff --git a/files/dotfiles/tmuxinator/marksEditor.yml b/files/dotfiles/tmuxinator/marksEditor.yml deleted file mode 100644 index dfa7485..0000000 --- a/files/dotfiles/tmuxinator/marksEditor.yml +++ /dev/null @@ -1,38 +0,0 @@ -# ~/.tmuxinator/marbenj_sigal.yml - -name: markseditor -root: ~/scripts/marksEditor - -# Optional tmux socket -# socket_name: foo - -# Runs before everything. Use it to start daemons etc. -# pre: sudo /etc/rc.d/mysqld start -#pre: workon marbenj_sigal - -# Runs in each window and pane before window/pane specific commands. Useful for setting up interpreter versions. -# pre_window: rbenv shell 2.0.0-p247 -pre_window: workon marksEditor - -# Pass command line options to tmux. Useful for specifying a different tmux.conf. -# tmux_options: -f ~/.tmux.mac.conf - -# Change the command to call tmux. This can be used by derivatives/wrappers like byobu. -# tmux_command: byobu - -# Specifies (by name or index) which window will be selected on project startup. If not set, the first window is used. -# startup_window: logs - -# Controls whether the tmux session should be attached to automatically. Defaults to true. -# attach: false - -# Runs after everything. Use it to attach to tmux with custom options etc. -# post: tmux -CC attach -t marbenj_sigal - -windows: - - editor: vim - - server: - layout: main-vertical - panes: - - - - diff --git a/files/dotfiles/tmuxinator/notes_analysis.yml b/files/dotfiles/tmuxinator/notes_analysis.yml deleted file mode 100644 index 7cfbcf4..0000000 --- a/files/dotfiles/tmuxinator/notes_analysis.yml +++ /dev/null @@ -1,43 +0,0 @@ -# ~/.tmuxinator/pymath.yml - -name: notes_analysis -root: ~/scripts/notes_analysis/ - -# Optional tmux socket -# socket_name: foo - -# Runs before everything. Use it to start daemons etc. -# pre: sudo /etc/rc.d/mysqld start - -# Runs in each window and pane before window/pane specific commands. Useful for setting up interpreter versions. -# pre_window: rbenv shell 2.0.0-p247 -pre_window: workon notes_analysis - -# Pass command line options to tmux. Useful for specifying a different tmux.conf. -# tmux_options: -f ~/.tmux.mac.conf - -# Change the command to call tmux. This can be used by derivatives/wrappers like byobu. -# tmux_command: byobu - -# Specifies (by name or index) which window will be selected on project startup. If not set, the first window is used. -# startup_window: logs - -# Controls whether the tmux session should be attached to automatically. Defaults to true. -# attach: false - -# Runs after everything. Use it to attach to tmux with custom options etc. -# post: tmux -CC attach -t pymath - -windows: - - editor: - - vim - - giting: - layout: main-vertical - panes: - - git fetch && git status - - tig - - testing: - layout: main-vertical - panes: - - #empty - - #empty diff --git a/files/dotfiles/tmuxinator/opytex.yml b/files/dotfiles/tmuxinator/opytex.yml deleted file mode 100644 index 42397a4..0000000 --- a/files/dotfiles/tmuxinator/opytex.yml +++ /dev/null @@ -1,43 +0,0 @@ -# ~/.tmuxinator/pymath.yml - -name: opytex -root: ~/scripts/Opytex - -# Optional tmux socket -# socket_name: foo - -# Runs before everything. Use it to start daemons etc. -# pre: sudo /etc/rc.d/mysqld start - -# Runs in each window and pane before window/pane specific commands. Useful for setting up interpreter versions. -# pre_window: rbenv shell 2.0.0-p247 -pre_window: workon opytex - -# Pass command line options to tmux. Useful for specifying a different tmux.conf. -# tmux_options: -f ~/.tmux.mac.conf - -# Change the command to call tmux. This can be used by derivatives/wrappers like byobu. -# tmux_command: byobu - -# Specifies (by name or index) which window will be selected on project startup. If not set, the first window is used. -# startup_window: logs - -# Controls whether the tmux session should be attached to automatically. Defaults to true. -# attach: false - -# Runs after everything. Use it to attach to tmux with custom options etc. -# post: tmux -CC attach -t pymath - -windows: - - editor: - - vim - - giting: - layout: main-vertical - panes: - - git fetch && git status - - tig - - testing: - layout: main-vertical - panes: - - #empty - - #empty diff --git a/files/dotfiles/tmuxinator/pymath.yml b/files/dotfiles/tmuxinator/pymath.yml deleted file mode 100644 index 3496e57..0000000 --- a/files/dotfiles/tmuxinator/pymath.yml +++ /dev/null @@ -1,43 +0,0 @@ -# ~/.tmuxinator/pymath.yml - -name: pymath -root: ~/scripts/pyMath/ - -# Optional tmux socket -# socket_name: foo - -# Runs before everything. Use it to start daemons etc. -# pre: sudo /etc/rc.d/mysqld start - -# Runs in each window and pane before window/pane specific commands. Useful for setting up interpreter versions. -# pre_window: rbenv shell 2.0.0-p247 -pre_window: workon pymath - -# Pass command line options to tmux. Useful for specifying a different tmux.conf. -# tmux_options: -f ~/.tmux.mac.conf - -# Change the command to call tmux. This can be used by derivatives/wrappers like byobu. -# tmux_command: byobu - -# Specifies (by name or index) which window will be selected on project startup. If not set, the first window is used. -# startup_window: logs - -# Controls whether the tmux session should be attached to automatically. Defaults to true. -# attach: false - -# Runs after everything. Use it to attach to tmux with custom options etc. -# post: tmux -CC attach -t pymath - -windows: - - editor: - - vim - - giting: - layout: main-vertical - panes: - - git fetch && git status - - tig - - testing: - layout: main-vertical - panes: - - #empty - - #empty diff --git a/files/dotfiles/tmuxinator/pytex.yml b/files/dotfiles/tmuxinator/pytex.yml deleted file mode 100644 index 7ac64af..0000000 --- a/files/dotfiles/tmuxinator/pytex.yml +++ /dev/null @@ -1,43 +0,0 @@ -# ~/.tmuxinator/pymath.yml - -name: Pytex -root: ~/scripts/Pytex - -# Optional tmux socket -# socket_name: foo - -# Runs before everything. Use it to start daemons etc. -# pre: sudo /etc/rc.d/mysqld start - -# Runs in each window and pane before window/pane specific commands. Useful for setting up interpreter versions. -# pre_window: rbenv shell 2.0.0-p247 -pre_window: workon pytex - -# Pass command line options to tmux. Useful for specifying a different tmux.conf. -# tmux_options: -f ~/.tmux.mac.conf - -# Change the command to call tmux. This can be used by derivatives/wrappers like byobu. -# tmux_command: byobu - -# Specifies (by name or index) which window will be selected on project startup. If not set, the first window is used. -# startup_window: logs - -# Controls whether the tmux session should be attached to automatically. Defaults to true. -# attach: false - -# Runs after everything. Use it to attach to tmux with custom options etc. -# post: tmux -CC attach -t pymath - -windows: - - editor: - - vim - - giting: - layout: main-vertical - panes: - - git fetch && git status - - tig - - testing: - layout: main-vertical - panes: - - #empty - - #empty diff --git a/files/dotfiles/tmuxinator/repytex.yml b/files/dotfiles/tmuxinator/repytex.yml deleted file mode 100644 index 3b1ef8f..0000000 --- a/files/dotfiles/tmuxinator/repytex.yml +++ /dev/null @@ -1,43 +0,0 @@ -# ~/.tmuxinator/pymath.yml - -name: repytex -root: ~/scripts/Repytex/ - -# Optional tmux socket -# socket_name: foo - -# Runs before everything. Use it to start daemons etc. -# pre: sudo /etc/rc.d/mysqld start - -# Runs in each window and pane before window/pane specific commands. Useful for setting up interpreter versions. -# pre_window: rbenv shell 2.0.0-p247 -pre_window: workon repytex - -# Pass command line options to tmux. Useful for specifying a different tmux.conf. -# tmux_options: -f ~/.tmux.mac.conf - -# Change the command to call tmux. This can be used by derivatives/wrappers like byobu. -# tmux_command: byobu - -# Specifies (by name or index) which window will be selected on project startup. If not set, the first window is used. -# startup_window: logs - -# Controls whether the tmux session should be attached to automatically. Defaults to true. -# attach: false - -# Runs after everything. Use it to attach to tmux with custom options etc. -# post: tmux -CC attach -t pymath - -windows: - - editor: - - vim - - giting: - layout: main-vertical - panes: - - git fetch && git status - - tig - - testing: - layout: main-vertical - panes: - - #empty - - #empty diff --git a/files/dotfiles/tmuxinator/site_opytex.yml b/files/dotfiles/tmuxinator/site_opytex.yml deleted file mode 100644 index f5bffdf..0000000 --- a/files/dotfiles/tmuxinator/site_opytex.yml +++ /dev/null @@ -1,38 +0,0 @@ -# ~/.tmuxinator/site_opytex.yml - -name: site_opytex -root: ~/scripts/site_opytex/ - -# Optional tmux socket -# socket_name: foo - -# Runs before everything. Use it to start daemons etc. -# pre: sudo /etc/rc.d/mysqld start - -# Runs in each window and pane before window/pane specific commands. Useful for setting up interpreter versions. -# pre_window: rbenv shell 2.0.0-p247 -pre_window: workon site_opytex - -# Pass command line options to tmux. Useful for specifying a different tmux.conf. -# tmux_options: -f ~/.tmux.mac.conf - -# Change the command to call tmux. This can be used by derivatives/wrappers like byobu. -# tmux_command: byobu - -# Specifies (by name or index) which window will be selected on project startup. If not set, the first window is used. -# startup_window: logs - -# Controls whether the tmux session should be attached to automatically. Defaults to true. -# attach: false - -# Runs after everything. Use it to attach to tmux with custom options etc. -# post: tmux -CC attach -t site_opytex - -windows: - - editor: vim - - server: - layout: main-vertical - panes: - - cd output && python -m http.server - - - - git: tig diff --git a/files/dotfiles/tmuxp/bopytex.yml b/files/dotfiles/tmuxp/bopytex.yml deleted file mode 100644 index dc7e3db..0000000 --- a/files/dotfiles/tmuxp/bopytex.yml +++ /dev/null @@ -1,19 +0,0 @@ -session_name: bopytex -start_directory: ~/scripts/Bopytex/ - - -windows: - - window_name: Editor - focus: true - panes: - - nvim - - window_name: Server - layout: main-vertical - panes: - - git fetch && git status - - tig - - window_name: Testing - layout: main-vertical - panes: - - source ~/.venv/bopytex/bin/activate.fish - - source ~/.venv/bopytex/bin/activate.fish diff --git a/files/dotfiles/tmuxp/enseignement.yml b/files/dotfiles/tmuxp/enseignement.yml deleted file mode 100644 index 057c59a..0000000 --- a/files/dotfiles/tmuxp/enseignement.yml +++ /dev/null @@ -1,19 +0,0 @@ -session_name: enseignement -start_directory: ~/Cours/2020-2021/Contenus/ -shell_command_before: source config.fish - -windows: - - window_name: Editor - focus: true - panes: - - nvim - - window_name: Commands - layout: tiled - panes: - - git status - - blank - - vifm . . - - window_name: Notes - focus: true - panes: - - cd ../Notes diff --git a/files/dotfiles/tmuxp/mail.yml b/files/dotfiles/tmuxp/mail.yml deleted file mode 100644 index 39adfd1..0000000 --- a/files/dotfiles/tmuxp/mail.yml +++ /dev/null @@ -1,16 +0,0 @@ -session_name: mail - -windows: - - window_name: Opytex - focus: true - panes: - - neomutt - - window_name: Bjb - panes: - - neomutt -F ~/.config/mutt/benjamin.jm.bertrand@gmail.com.muttrc - - window_name: lafrite26 - panes: - - neomutt -F ~/.config/mutt/lafrite26@gmail.com.muttrc - - window_name: tools - panes: - - blank diff --git a/files/dotfiles/tmuxp/mapytex.yml b/files/dotfiles/tmuxp/mapytex.yml deleted file mode 100644 index d108c35..0000000 --- a/files/dotfiles/tmuxp/mapytex.yml +++ /dev/null @@ -1,19 +0,0 @@ -session_name: mapytex -start_directory: ~/scripts/Mapytex/ - - -windows: - - window_name: Editor - focus: true - panes: - - nvim - - window_name: Server - layout: main-vertical - panes: - - git fetch && git status - - tig - - window_name: Testing - layout: main-vertical - panes: - - source ~/.venv/mapytex/bin/activate.fish - - source ~/.venv/mapytex/bin/activate.fish diff --git a/files/dotfiles/tmuxp/viescopytex.yml b/files/dotfiles/tmuxp/viescopytex.yml deleted file mode 100644 index 5aec9d0..0000000 --- a/files/dotfiles/tmuxp/viescopytex.yml +++ /dev/null @@ -1,20 +0,0 @@ -session_name: viescopytex -start_directory: ~/scripts/viescopytex/ -shell_command_before: source venv/bin/activate.fish - - -windows: - - window_name: Editor - focus: true - panes: - - vim -c NERDTree - - window_name: Server - layout: main-vertical - panes: - - git fetch && git status - - tig - - window_name: Testing - layout: main-vertical - panes: - - blank - - blank diff --git a/files/dotfiles/ultisnips/python.snippets b/files/dotfiles/ultisnips/python.snippets deleted file mode 100644 index caf3f05..0000000 --- a/files/dotfiles/ultisnips/python.snippets +++ /dev/null @@ -1,25 +0,0 @@ -# A valid snippet should starts with: -# -# snippet trigger_word [ "description" [ options ] ] -# -# and end with: -# -# endsnippet -# -# Snippet options: -# -# b - Beginning of line. -# i - In-word expansion. -# w - Word boundary. -# r - Regular expression -# e - Custom context snippet -# A - Snippet will be triggered automatically, when condition matches. -# -# Basic example: -# -# snippet emitter "emitter properties" b -# private readonly ${1} = new Emitter<$2>() -# public readonly ${1/^_(.*)/$1/}: Event<$2> = this.$1.event -# endsnippet -# -# Online reference: https://github.com/SirVer/ultisnips/blob/master/doc/UltiSnips.txt diff --git a/files/dotfiles/ultisnips/rst.snippets b/files/dotfiles/ultisnips/rst.snippets deleted file mode 100644 index c5a82d6..0000000 --- a/files/dotfiles/ultisnips/rst.snippets +++ /dev/null @@ -1,45 +0,0 @@ -# A valid snippet should starts with: -# -# snippet trigger_word [ "description" [ options ] ] -# -# and end with: -# -# endsnippet -# -# Snippet options: -# -# b - Beginning of line. -# i - In-word expansion. -# w - Word boundary. -# r - Regular expression -# e - Custom context snippet -# A - Snippet will be triggered automatically, when condition matches. -# -# Basic example: -# -# snippet emitter "emitter properties" b -# private readonly ${1} = new Emitter<$2>() -# public readonly ${1/^_(.*)/$1/}: Event<$2> = this.$1.event -# endsnippet -# -# Online reference: https://github.com/SirVer/ultisnips/blob/master/doc/UltiSnips.txt -snippet index "Structure for an index file" b -${1:title} -${1/./#/g} - -:date: ${2:`date +%Y-%m-%d`} -:modified: ${2} -:authors: Bertrand Benjamin -:category: ${3} -:summary: ${1} -endsnippet - -snippet link "link" i -\`${1:link title} <${2:link target}>\`_ -endsnippet - -snippet img "Image" b -.. image:: ${1:filename} - :height: 200px - :alt: ${2:Description} -endsnippet diff --git a/files/dotfiles/ultisnips/tex.snippets b/files/dotfiles/ultisnips/tex.snippets deleted file mode 100644 index a24a456..0000000 --- a/files/dotfiles/ultisnips/tex.snippets +++ /dev/null @@ -1,52 +0,0 @@ -# A valid snippet should starts with: -# -# snippet trigger_word [ "description" [ options ] ] -# -# and end with: -# -# endsnippet -# -# Snippet options: -# -# b - Beginning of line. -# i - In-word expansion. -# w - Word boundary. -# r - Regular expression -# e - Custom context snippet -# A - Snippet will be triggered automatically, when condition matches. -# -# Basic example: -# -# snippet emitter "emitter properties" b -# private readonly ${1} = new Emitter<$2>() -# public readonly ${1/^_(.*)/$1/}: Event<$2> = this.$1.event -# endsnippet -# -# Online reference: https://github.com/SirVer/ultisnips/blob/master/doc/UltiSnips.txt - -snippet signe "tableau de signes avec tikz" -\begin{tikzpicture}[baseline=(a.north)] - \tkzTabInit[lgt=2,espcl=2]{$ ${1:variable} $/1,$ ${2:function} $/2}{${3:start}, ${4:zeros}, ${5:end} } - \tkzTabLine{, ${6:signe and zeros} , } -\end{tikzpicture} -endsnippet - -snippet varia "tableau de variations avec tikz" -\begin{tikzpicture}[baseline=(a.north)] - \tkzTabInit[lgt=3,espcl=3]{$ ${1:variable} $/1, $ ${2:fonction} $/2}{${3: valeurs notables} } - \tkzTabVar{ ${4:signe/element ou signe*2 /element G/ element D}} -\end{tikzpicture} -endsnippet - -snippet graph "Graphique avec tikz" b -\begin{tikzpicture}[baseline=(a.north), xscale=1, yscale=1] - \tkzInit[xmin=-5,xmax=5,xstep=1, - ymin=-5,ymax=5,ystep=1] - \tkzGrid - \tkzAxeXY - \tkzFct[domain=-5:5,color=red,very thick]% - { ${1:fonction} }; -\end{tikzpicture} -endsnippet - - diff --git a/files/dotfiles/vdirsyncer/config b/files/dotfiles/vdirsyncer/config deleted file mode 100644 index 3066443..0000000 --- a/files/dotfiles/vdirsyncer/config +++ /dev/null @@ -1,102 +0,0 @@ -# An example configuration for vdirsyncer. -# -# Move it to ~/.vdirsyncer/config or ~/.config/vdirsyncer/config and edit it. -# Run `vdirsyncer --help` for CLI usage. -# -# Optional parameters are commented out. -# This file doesn't document all available parameters, see -# http://vdirsyncer.pimutils.org/ for the rest of them. - -[general] -# A folder where vdirsyncer can store some metadata about each pair. -status_path = "~/.config/vdirsyncer/status/" - -# CALDAV -[pair Cours_cal] -a = "cours_cal_local" -b = "cours_cal_remote" -collections = ["from a", "from b"] - -# Calendars also have a color property -metadata = ["displayname", "color"] - -[storage cours_cal_local] -type = "filesystem" -path = "~/.calendars/Cours1/" -fileext = ".ics" - -[storage cours_cal_remote] -type = "caldav" -url = "https://cloud.poneyworld.net/remote.php/dav/calendars/lafrite/cours1/" -username = "lafrite" -password.fetch = ["command", "pass", "OVH/Embrevade/docker/nextcloud/lafrite"] - -[pair perso_cal] -a = "perso_cal_local" -b = "perso_cal_remote" -collections = ["from a", "from b"] - -# Calendars also have a color property -metadata = ["displayname", "color"] - -[storage perso_cal_local] -type = "filesystem" -path = "~/.calendars/Perso/" -fileext = ".ics" - -[storage perso_cal_remote] -type = "caldav" -url = "https://cloud.poneyworld.net/remote.php/dav/calendars/lafrite/personal/" -username = "lafrite" -password.fetch = ["command", "pass", "OVH/Embrevade/docker/nextcloud/lafrite"] - -[pair vacancesA] -a = "vacancesA_public" -b = "vacancesA_private" -collections = null -[storage vacancesA_public] -type = "http" -# The URL to your iCalendar file. -url = "https://www.data.gouv.fr/fr/datasets/r/b580138b-ae5c-4b4d-8cbf-110ffd373192" -[storage vacancesA_private] -type = "filesystem" -path = "~/.calendars/Vacances/" -fileext = ".ics" - -# CARDAV -[pair nextcloud_contacts] -# A `[pair ]` block defines two storages `a` and `b` that should be -# synchronized. The definition of these storages follows in `[storage ]` -# blocks. This is similar to accounts in OfflineIMAP. -a = "nextcloud_contacts_local" -b = "nextcloud_contacts_remote" - -# Synchronize all collections that can be found. -# You need to run `vdirsyncer discover` if new calendars/addressbooks are added -# on the server. - -collections = ["from a", "from b"] - -# Synchronize the "display name" property into a local file (~/.contacts/displayname). -metadata = ["displayname"] - -# To resolve a conflict the following values are possible: -# `null` - abort when collisions occur (default) -# `"a wins"` - assume a's items to be more up-to-date -# `"b wins"` - assume b's items to be more up-to-date -#conflict_resolution = null - -[storage nextcloud_contacts_local] -# A storage references actual data on a remote server or on the local disk. -# Similar to repositories in OfflineIMAP. -type = "filesystem" -path = "~/.contacts/" -fileext = ".vcf" - -[storage nextcloud_contacts_remote] -type = "carddav" -url = "https://cloud.poneyworld.net/remote.php/dav/addressbooks/users/lafrite/contacts/" -username = "lafrite" -password.fetch = ["command", "pass", "OVH/Embrevade/docker/nextcloud/lafrite"] -# The password can also be fetched from the system password storage, netrc or a -# custom command. See http://vdirsyncer.pimutils.org/en/stable/keyring.html diff --git a/files/dotfiles/vifm/colors/Default.vifm b/files/dotfiles/vifm/colors/Default.vifm deleted file mode 100644 index 7434b36..0000000 --- a/files/dotfiles/vifm/colors/Default.vifm +++ /dev/null @@ -1,80 +0,0 @@ -" You can edit this file by hand. -" The " character at the beginning of a line comments out the line. -" Blank lines are ignored. - -" The Default color scheme is used for any directory that does not have -" a specified scheme and for parts of user interface like menus. A -" color scheme set for a base directory will also -" be used for the sub directories. - -" The standard ncurses colors are: -" Default = -1 = None, can be used for transparency or default color -" Black = 0 -" Red = 1 -" Green = 2 -" Yellow = 3 -" Blue = 4 -" Magenta = 5 -" Cyan = 6 -" White = 7 - -" Light versions of colors are also available (set bold attribute): -" LightBlack -" LightRed -" LightGreen -" LightYellow -" LightBlue -" LightMagenta -" LightCyan -" LightWhite - -" Available attributes (some of them can be combined): -" bold -" underline -" reverse or inverse -" standout -" italic (on unsupported systems becomes reverse) -" none - -" Vifm supports 256 colors you can use color numbers 0-255 -" (requires properly set up terminal: set your TERM environment variable -" (directly or using resources) to some color terminal name (e.g. -" xterm-256color) from /usr/lib/terminfo/; you can check current number -" of colors in your terminal with tput colors command) - -" highlight group cterm=attrs ctermfg=foreground_color ctermbg=background_color - -highlight clear - -highlight Win cterm=none ctermfg=white ctermbg=black -highlight Directory cterm=bold ctermfg=cyan ctermbg=default -highlight Link cterm=bold ctermfg=yellow ctermbg=default -highlight BrokenLink cterm=bold ctermfg=red ctermbg=default -highlight Socket cterm=bold ctermfg=magenta ctermbg=default -highlight Device cterm=bold ctermfg=red ctermbg=default -highlight Fifo cterm=bold ctermfg=cyan ctermbg=default -highlight Executable cterm=bold ctermfg=green ctermbg=default -highlight Selected cterm=bold ctermfg=magenta ctermbg=default -highlight CurrLine cterm=bold,reverse ctermfg=default ctermbg=default -highlight TopLine cterm=none ctermfg=black ctermbg=white -highlight TopLineSel cterm=bold ctermfg=black ctermbg=default -highlight StatusLine cterm=bold ctermfg=black ctermbg=white -highlight WildMenu cterm=underline,reverse ctermfg=white ctermbg=black -highlight CmdLine cterm=none ctermfg=white ctermbg=black -highlight ErrorMsg cterm=none ctermfg=red ctermbg=black -highlight Border cterm=none ctermfg=black ctermbg=white -highlight JobLine cterm=bold,reverse ctermfg=black ctermbg=white -highlight SuggestBox cterm=bold ctermfg=default ctermbg=default -highlight CmpMismatch cterm=bold ctermfg=white ctermbg=red -highlight AuxWin cterm=bold,underline,reverse,standout,italic ctermfg=default ctermbg=default -highlight TabLine cterm=none ctermfg=white ctermbg=black -highlight TabLineSel cterm=bold,reverse ctermfg=default ctermbg=default -highlight User1 cterm=bold,underline,reverse,standout,italic ctermfg=default ctermbg=default -highlight User2 cterm=bold,underline,reverse,standout,italic ctermfg=default ctermbg=default -highlight User3 cterm=bold,underline,reverse,standout,italic ctermfg=default ctermbg=default -highlight User4 cterm=bold,underline,reverse,standout,italic ctermfg=default ctermbg=default -highlight User5 cterm=bold,underline,reverse,standout,italic ctermfg=default ctermbg=default -highlight User6 cterm=bold,underline,reverse,standout,italic ctermfg=default ctermbg=default -highlight User7 cterm=bold,underline,reverse,standout,italic ctermfg=default ctermbg=default -highlight User8 cterm=bold,underline,reverse,standout,italic ctermfg=default ctermbg=default -highlight User9 cterm=bold,underline,reverse,standout,italic ctermfg=default ctermbg=default diff --git a/files/dotfiles/vifm/colors/zenburn_1.vifm b/files/dotfiles/vifm/colors/zenburn_1.vifm deleted file mode 100644 index 86b4338..0000000 --- a/files/dotfiles/vifm/colors/zenburn_1.vifm +++ /dev/null @@ -1,29 +0,0 @@ -" zenburn like color scheme for vifm -" http://kippura.org/zenburnpage/ - -" Reset all styles first -highlight clear - -highlight Border cterm=none ctermfg=235 ctermbg=237 - -highlight TopLine cterm=none ctermfg=108 ctermbg=235 -highlight TopLineSel cterm=bold ctermfg=186 ctermbg=235 - -highlight Win cterm=none ctermfg=188 ctermbg=237 -highlight Directory cterm=none ctermfg=108 ctermbg=237 -highlight CurrLine cterm=none ctermfg=223 ctermbg=235 -highlight OtherLine cterm=none ctermfg=247 ctermbg=237 -highlight Selected cterm=none ctermfg=116 ctermbg=238 - -highlight JobLine cterm=bold ctermfg=116 ctermbg=238 -highlight StatusLine cterm=bold ctermfg=144 ctermbg=236 -highlight ErrorMsg cterm=bold ctermfg=115 ctermbg=237 -highlight WildMenu cterm=bold ctermfg=235 ctermbg=144 -highlight CmdLine cterm=none ctermfg=188 ctermbg=237 - -highlight Executable cterm=none ctermfg=172 ctermbg=237 -highlight Link cterm=none ctermfg=142 ctermbg=237 -highlight BrokenLink cterm=none ctermfg=174 ctermbg=237 -highlight Device cterm=none ctermfg=228 ctermbg=237 -highlight Fifo cterm=none ctermfg=109 ctermbg=237 -highlight Socket cterm=none ctermfg=110 ctermbg=237 diff --git a/files/dotfiles/vifm/scripts/README b/files/dotfiles/vifm/scripts/README deleted file mode 100644 index 7694952..0000000 --- a/files/dotfiles/vifm/scripts/README +++ /dev/null @@ -1,6 +0,0 @@ -This directory is dedicated for user-supplied scripts/executables. -vifm modifies its PATH environment variable to let user run those -scripts without specifying full path. All subdirectories are added -as well. File in a subdirectory overrules file with the same name -in parent directories. Restart might be needed to recognize files -in newly created or renamed subdirectories. \ No newline at end of file diff --git a/files/dotfiles/vifm/vifm-help.txt b/files/dotfiles/vifm/vifm-help.txt deleted file mode 100644 index 59550f6..0000000 --- a/files/dotfiles/vifm/vifm-help.txt +++ /dev/null @@ -1,5899 +0,0 @@ -VIFM(1) General Commands Manual VIFM(1) - - - -NAME - vifm - vi file manager - -SYNOPSIS - vifm [OPTION]... - vifm [OPTION]... path - vifm [OPTION]... path path - -DESCRIPTION - Vifm is an ncurses based file manager with vi like keybindings. If you - use vi, vifm gives you complete keyboard control over your files with- - out having to learn a new set of commands. - -OPTIONS - vifm starts in the current directory unless it is given a different - directory on the command line or 'vifminfo' option includes "savedirs" - (in which case last visited directories are used as defaults). - - - Read list of files from standard input stream and compose custom - view out of them (see "Custom views" section). Current working - directory is used as a base for relative paths. - - Starts Vifm in the specified path. - - - Starts Vifm in the specified paths. - - Specifying two directories triggers split view even when vifm was in - single-view mode on finishing previous session. To suppress this be- - haviour :only command can be put in the vifmrc file. - - When only one path argument is found on command-line, the left/top pane - is automatically set as the current view. - - Paths to files are also allowed in case you want vifm to start with - some archive opened. - - --select - Open parent directory of the given path and select specified - file in it. - - -f Makes vifm instead of opening files write selection to - $VIFM/vimfiles and quit. - - --choose-files |- - Sets output file to write selection into on exit instead of - opening files. "-" means standard output. Use empty value to - disable it. - - --choose-dir |- - Sets output file to write last visited directory into on exit. - "-" means standard output. Use empty value to disable it. - - --delimiter - Sets separator for list of file paths written out by vifm. - Empty value means null character. Default is new line charac- - ter. - - --on-choose - Sets command to be executed on selected files instead of opening - them. The command may use any of macros described in "Command - macros" section below. The command is executed once for whole - selection. - - --logging[=] - Log some operational details $VIFM/log. If the optional startup - log path is specified and permissions allow to open it for writ- - ing, then logging of early initialization (before value of $VIFM - is determined) is put there. - - --server-list - List available server names and exit. - - --server-name - Name of target or this instance (sequential numbers are appended - on name conflict). - - --remote - Sends the rest of the command line to another instance of vifm, - --server-name is treated just like any other argument and should - precede --remote on the command line. When there is no server, - quits silently. There is no limit on how many arguments can be - processed. One can combine --remote with -c or + to execute commands in already running instance of vifm. - See also "Client-Server" section below. - - --remote-expr - passes expression to vifm server and prints result. See also - "Client-Server" section below. - - -c or + - Run command-line mode on startup. Commands in such - arguments are executed in the order they appear in command line. - Commands with spaces or special symbols must be enclosed in dou- - ble or single quotes or all special symbols should be escaped - (the exact syntax strongly depends on shell). "+" argument is - equivalent to "$" and thus picks last item of of the view. - - --help, -h - Show a brief command summary and exit vifm. - - --version, -v - Show version information and quit. - - --no-configs - Skip reading vifmrc and vifminfo. - - - See "Startup" section below for the explanations on $VIFM. - -General keys - Ctrl-C or Escape - cancel most operations (see "Cancellation" section below), clear - all selected files. - - Ctrl-L clear and redraw the screen. - -Basic Movement - The basic vi key bindings are used to move through the files and pop-up - windows. - - k, gk, or Ctrl-P - move cursor up one line. - - j, gj or Ctrl-N - move cursor down one line. - - h when 'lsview' is off move up one directory (moves to parent - directory node in tree view), otherwise move left one file. - - l when 'lsview' is off move into a directory or launches a file, - otherwise move right one file. - - gg move to the first line of the file list. - - G move to the last line in the file list. - - gh go up one directory regardless of view representation (regular, - ls-like). Also can be used to leave custom views including tree - view. - - gl or Enter - enter directory or launch a file. - - H move to the first file in the window. - - M move to the file in the middle of the window. - - L move to the last file in the window. - - Ctrl-F or Page Down - move forward one page. - - Ctrl-B or Page Up - move back one page. - - Ctrl-D jump back one half page. - - Ctrl-U jump forward one half page. - - n% move to the file that is n percent from the top of the list (for - example 25%). - - 0 or ^ move cursor to the first column. See 'lsview' option descrip- - tion. - - $ move cursor to the last column. See 'lsview' option descrip- - tion. - - Space switch file lists. - - gt switch to the next tab (wrapping around). - - {n}gt switch to the tab number {n} (wrapping around). - - gT switch to the previous tab (wrapping around). - - {n}gT switch to {n}-th previous tab. - -Movement with Count - Most movement commands also accept a count, 12j would move down 12 - files. - - [count]% - move to percent of the file list. - - [count]j - move down [count] files. - - [count]k - move up [count] files. - - [count]G or [count]gg - move to list position [count]. - - [count]h - go up [count] directories. - -Scrolling panes - zt redraw pane with file in top of list. - - zz redraw pane with file in center of list. - - zb redraw pane with file in bottom of list. - - Ctrl-E scroll pane one line down. - - Ctrl-Y scroll pane one line up. - -Pane manipulation - Second character can be entered with or without Control key. - - Ctrl-W H - move the pane to the far left. - - Ctrl-W J - move the pane to the very bottom. - - Ctrl-W K - move the pane to the very top. - - Ctrl-W L - move the pane to the far right. - - - Ctrl-W h - switch to the left pane. - - Ctrl-W j - switch to the pane below. - - Ctrl-W k - switch to the pane above. - - Ctrl-W l - switch to the right pane. - - - Ctrl-W b - switch to bottom-right window. - - Ctrl-W t - switch to top-left window. - - - Ctrl-W p - switch to previous window. - - Ctrl-W w - switch to other pane. - - - Ctrl-W o - leave only one pane. - - Ctrl-W s - split window horizontally. - - Ctrl-W v - split window vertically. - - - Ctrl-W x - exchange panes. - - Ctrl-W z - quit preview pane or view modes. - - - Ctrl-W - - decrease size of the view by count. - - Ctrl-W + - increase size of the view by count. - - Ctrl-W < - decrease size of the view by count. - - Ctrl-W > - increase size of the view by count. - - - Ctrl-W | - set current view size to count. - - Ctrl-W _ - set current view size to count. - - Ctrl-W = - make size of two views equal. - - For Ctrl-W +, Ctrl-W -, Ctrl-W <, Ctrl-W >, Ctrl-W | and Ctrl-W _ com- - mands count can be given before and/or after Ctrl-W. The resulting - count is a multiplication of those two. So "2 Ctrl-W 2 -" decreases - window size by 4 lines or columns. - - Ctrl-W | and Ctrl-W _ maximise current view by default. - -Marks - Marks are set the same way as they are in vi. - - You can use these characters for marks [a-z][A-Z][0-9]. - - m[a-z][A-Z][0-9] - set a mark for the file at the current cursor position. - - '[a-z][A-Z][0-9] - navigate to the file set for the mark. - - - There are also several special marks that can't be set manually: - - - ' (single quote) - previously visited directory of the view, thus - hitting '' allows switching between two last locations - - - < - the first file of the last visually selected block - - - > - the last file of the last visually selected block - -Searching - /regular expression pattern - search for files matching regular expression in forward direc- - tion and advance cursor to next match. - - / perform forward search with top item of search pattern history. - - ?regular expression pattern - search for files matching regular expression in backward direc- - tion and advance cursor to previous match. - - ? perform backward search with top item of search pattern history. - - Trailing slash for directories is taken into account, so /\/ searches - for directories and symbolic links to directories. At the moment // - works too, but this can change in the future, so consider escaping the - slash if not typing pattern by hand. - - Matches are automatically selected if 'hlsearch' is set. Enabling - 'incsearch' makes search interactive. 'ignorecase' and 'smartcase' - options affect case sensitivity of search queries. - - - [count]n - go to the next file matching last search pattern. Takes last - search direction into account. - - [count]N - go to the previous file matching last search pattern. Takes - last search direction into account. - - If 'hlsearch' option is set, hitting n/N to perform search and go to - the first matching item resets current selection in normal mode. It is - not the case if search was already performed on files in the directory, - thus selection is not reset after clearing selection with escape key - and hitting n/N key again. - - Note: vifm uses extended regular expressions for / and ?. - - - [count]f[character] - search forward for file with [character] as first character in - name. Search wraps around the end of the list. - - [count]F[character] - search backward for file with [character] as first character in - name. Search wraps around the end of the list. - - [count]; - find the next match of f or F. - - [count], - find the previous match of f or F. - - Note: f, F, ; and , wrap around list beginning and end when they are - used alone and they don't wrap when they are used as selectors. - -File Filters - There are three basic file filters: - - - dot files filter (excluding "." and ".." special directories, whose - appearance is controlled by the 'dotdirs' option); - - - manual filter for file names; - - - automatic filter for file names; - - - local filter for file names (see description of the "=" normal mode - command). - - Performing operations on manual filter for file names automatically - does the same on automatic one. The file name filter is separated - mainly for convenience purpose and to get more deterministic behaviour. - - The basic vim folding key bindings are used for filtering files. - - Each file list has its own copy of each filter. - - Filtered files are not checked in / search or :commands. - - Files and directories are filtered separately. For this a slash is - appended to a directory name before testing whether it matches the fil- - ter. Examples: - - - " filter directories which names end with '.files' - :filter /^.*\.files\/$/ - - " filter files which names end with '.d' - :filter /^.*\.d$/ - - " filter files and directories which names end with '.o' - :filter /^.*\.o\/?$/ - - Note: vifm uses extended regular expressions. - - za toggle visibility of dot files. - - zo show dot files. - - zm hide dot files. - - zf add selected files to file name filter. - - zO show files hidden by file name filter. - - zM restore all filters. - - zR remove all filters. - - zr remove local filter. - - zd exclude selection or current file from a custom view. Does - nothing for regular view. For tree view excluding directory - excludes that sub-tree. For compare views zd hides group of - adjacent identical files, count can be specified as 1 to exclude - just single file or selected items instead. Files excluded this - way are not counted as filtered out and can't be returned unless - view is reloaded. - - =regular expression pattern - filter out files that don't match regular expression. Whether - view is updated as regular expression is changed depends on the - value of the 'incsearch' option. This kind of filter is auto- - matically reset when directory is changed. - -Other Normal Mode Keys - [count]: - enter command line mode. [count] generates range. - - q: open external editor to prompt for command-line command. See - "Command line editing" section for details. - - q/ open external editor to prompt for search pattern to be searched - in forward direction. See "Command line editing" section for - details. - - q? open external editor to prompt for search pattern to be searched - in backward direction. See "Command line editing" section for - details. - - q= open external editor to prompt for filter pattern. See "Command - line editing" section for details. Unlike other q{x} commands - this one doesn't work in Visual mode. - - [count]!! and [count]! - enter command line mode with entered ! command. [count] modi- - fies range. - - Ctrl-O go backwards through directory history of current view. Nonex- - istent directories are automatically skipped. - - Ctrl-I if 'cpoptions' contains "t" flag, and switch active - pane just like does, otherwise it goes forward through - directory history of current view. Nonexistent directories are - automatically skipped. - - Ctrl-G create a window showing detailed information about the current - file. - - Shift-Tab - enters view mode (works only after activating view pane with - :view command). - - ga calculate directory size. Uses cached directory sizes when pos- - sible for better performance. As a special case calculating - size of ".." entry results in calculation of size of current - directory. - - gA like ga, but force update. Ignores old values of directory - sizes. - - If file under cursor is selected, each selected item is processed, oth- - erwise only current file is updated. - - gf find link destination (like l with 'followlinks' off, but also - finds directories). - - gr only for MS-Windows - same as l key, but tries to run program with administrative - privileges. - - av go to visual mode into selection amending state preserving cur- - rent selection. - - gv go to visual mode restoring last selection. - - [reg]gs - when no register is specified, restore last t selection (similar - to what gv does for visual mode selection). If register is - present, then all files listed in that register and which are - visible in current view are selected. - - gu - make names of selected files lowercase. - - [count]guu and [count]gugu - make names of [count] files starting from the current one lower- - case. Without [count] only current file is affected. - - gU - make names of selected files uppercase. - - [count]gUU and [count]gUgU - make names of [count] files starting from the current one upper- - case. Without [count] only current file is affected. - - e explore file in the current pane. - - i handle file (even if it's an executable and 'runexec' option is - set). - - cw change word is used to rename a file or files. - - cW change WORD is used to change only name of file (without exten- - sion). - - cl change link target. - - co only for *nix - change file owner. - - cg only for *nix - change file group. - - [count]cp - change file attributes (permission on *nix and properties on - Windows). If [count] is specified, it's treated as numerical - argument for non-recursive `chmod` command (of the form - [0-7]{3,4}). - - [count]C - clone file [count] times. - - [count]dd or d[count]selector - move selected file or files to trash directory (if 'trash' - option is set, otherwise delete). See "Trash directory" section - below. - - [count]DD or D[count]selector - like dd and d, but omitting trash directory (even when - 'trash' option is set). - - Y, [count]yy or y[count]selector - yank selected files. - - p copy yanked files to the current directory or move the files to - the current directory if they were deleted with dd or :d[elete] - or if the files were yanked from trash directory. See "Trash - directory" section below. - - P move the last yanked files. The advantage of using P instead of - d followed by p is that P moves files only once. This isn't - important in case you're moving files in the same file system - where your home directory is, but using P to move files on some - other file system (or file systems, in case you want to move - files from fs1 to fs2 and your home is on fs3) can save your - time. - - al put symbolic links with absolute paths. - - rl put symbolic links with relative paths. - - t select or unselect (tag) the current file. - - u undo last change. - - Ctrl-R redo last change. - - dp in compare view of "ofboth grouppaths" kind, makes corresponding - entry of the other pane equal to the current one. The semantics - is as follows: - - nothing done for identical entries - - if file is missing in current view, its pair gets removed - - if file is missing or differs in other view, it's replaced - - file pairs are defined by matching relative paths - File removal obeys 'trash' option. When the option is enabled, - the operation can be undone/redone (although results won't be - visible automatically). - Unlike in Vim, this operation is performed on a single line - rather than a set of adjacent changes. - - do same as dp, but applies changes in the opposite direction. - - v or V enter visual mode, clears current selection. - - [count]Ctrl-A - increment first number in file name by [count] (1 by default). - - [count]Ctrl-X - decrement first number in file name by [count] (1 by default). - - ZQ same as :quit!. - - ZZ same as :quit. - - . repeat last command-line command (not normal mode command) of - this session (does nothing right after startup or :restart com- - mand). The command doesn't depend on command-line history and - can be used with completely disabled history. - - ( go to previous group. Groups are defined by primary sorting - key. For name and iname members of each group have same first - letter, for all other sorting keys vifm uses size, uid, ... - - ) go to next group. See ( key description above. - - { speeds up navigation to closest previous entry of the opposite - type by moving to the first file backwards when cursor is on a - directory and to the first directory backwards when cursor is on - a file. This is essentially a special case of ( that is locked - on "dirs". - - } same as {, but in forward direction. - - [c go to previous mismatched entry in directory comparison view or - do nothing. - - ]c go to next mismatched entry in directory comparison view or do - nothing. - - [d go to previous directory entry or do nothing. - - ]d go to next directory entry or do nothing. - - [r same as :siblprev. - - ]r same as :siblnext. - - [R same as :siblprev!. - - ]R same as :siblnext!. - - [s go to previous selected entry or do nothing. - - ]s go to next selected entry or do nothing. - - [z go to first sibling of current entry. - - ]z go to last sibling of current entry. - - zj go to next directory sibling of current entry or do nothing. - - zk go to previous directory sibling of current entry or do nothing. - -Using Count - You can use count with commands like yy. - - [count]yy - yank count files starting from current cursor position downward. - - Or you can use count with motions passed to y, d or D. - - d[count]j - delete (count + 1) files starting from current cursor position - upward. - -Registers - vifm supports multiple registers for temporary storing list of yanked - or deleted files. - - Registers should be specified by hitting double quote key followed by a - register name. Count is specified after register name. By default - commands use unnamed register, which has double quote as its name. - - Though all commands accept registers, most of commands ignores them - (for example H or Ctrl-U). Other commands can fill register or append - new files to it. - - Presently vifm supports ", _, a-z and A-Z characters as register names. - - As mentioned above " is unnamed register and has special meaning of the - default register. Every time when you use named registers (a-z and A- - Z) unnamed register is updated to contain same list of files as the - last used register. - - _ is black hole register. It can be used for writing, but its list is - always empty. - - Registers with names from a to z and from A to Z are named ones. Low- - ercase registers are cleared before adding new files, while uppercase - aren't and should be used to append new files to the existing file list - of appropriate lowercase register (A for a, B for b, ...). - - Registers can be changed on :empty command if they contain files under - trash directory (see "Trash directory" section below). - - Registers do not contain one file more than once. - - Example: - - "a2yy - - puts names of two files to register a (and to the unnamed register), - - "Ad - - removes one file and append its name to register a (and to the unnamed - register), - - p or "ap or "Ap - - inserts previously yanked and deleted files into current directory. - -Selectors - y, d, D, !, gu and gU commands accept selectors. You can combine them - with any of selectors below to quickly remove or yank several files. - - Most of selectors are like vi motions: j, k, gg, G, H, L, M, %, f, F, - ;, comma, ', ^, 0 and $. But there are some additional ones. - - a all files in current view. - - s selected files. - - S all files except selected. - - Examples: - - - dj - delete file under cursor and one below; - - - d2j - delete file under cursor and two below; - - - y6gg - yank all files from cursor position to 6th file in the list. - - When you pass a count to whole command and its selector they are multi- - plied. So: - - - 2d2j - delete file under cursor and four below; - - - 2dj - delete file under cursor and two below; - - - 2y6gg - yank all files from cursor position to 12th file in the - list. - -Visual Mode - Visual mode has to generic operating submodes: - - - plain selection as it is in Vim; - - - selection editing submode. - - Both modes select files in range from cursor position at which visual - mode was entered to current cursor position (let's call it "selection - region"). Each of two borders can be adjusted by swapping them via "o" - or "O" keys and updating cursor position with regular cursor motion - keys. Obviously, once initial cursor position is altered this way, - real start position becomes unavailable. - - Plain Vim-like visual mode starts with cleared selection, which is not - restored on rejecting selection ("Escape", "Ctrl-C", "v", "V"). Con- - trary to it, selection editing doesn't clear previously selected files - and restores them after reject. Accepting selection by performing an - operation on selected items (e.g. yanking them via "y") moves cursor to - the top of current selection region (not to the top most selected file - of the view). - - In turn, selection editing supports three types of editing (look at - statusbar to know which one is currently active): - - - append - amend selection by selecting elements in selection region; - - - remove - amend selection by deselecting elements in selection - region; - - - invert - amend selection by inverting selection of elements in - selection region. - - No matter how you activate selection editing it starts in "append". - One can switch type of operation (in the order given above) via "Ctrl- - G" key. - - Almost all normal mode keys work in visual mode, but instead of accept- - ing selectors they operate on selected items. - - Enter save selection and go back to normal mode not moving cursor. - - av leave visual mode if in amending mode (restores previous selec- - tion), otherwise switch to amending selection mode. - - gv restore previous visual selection. - - v, V, Ctrl-C or Escape - leave visual mode if not in amending mode, otherwise switch to - normal visual selection. - - Ctrl-G switch type of amending by round robin scheme: append -> remove - -> invert. - - : enter command line mode. Selection is cleared on leaving the - mode. - - o switch active selection bound. - - O switch active selection bound. - - gu, u make names of selected files lowercase. - - gU, U make names of selected files uppercase. - -View Mode - This mode tries to imitate the less program. List of builtin shortcuts - can be found below. Shortcuts can be customized using :qmap, :qnoremap - and :qunmap command-line commands. - - Shift-Tab, Tab, q, Q, ZZ - return to normal mode. - - [count]e, [count]Ctrl-E, [count]j, [count]Ctrl-N, [count]Enter - scroll forward one line (or [count] lines). - - [count]y, [count]Ctrl-Y, [count]k, [count]Ctrl-K, [count]Ctrl-P - scroll backward one line (or [count] lines). - - [count]f, [count]Ctrl-F, [count]Ctrl-V, [count]Space - scroll forward one window (or [count] lines). - - [count]b, [count]Ctrl-B, [count]Alt-V - scroll backward one window (or [count] lines). - - [count]z - scroll forward one window (and set window to [count]). - - [count]w - scroll backward one window (and set window to [count]). - - [count]Alt-Space - scroll forward one window, but don't stop at end-of-file. - - [count]d, [count]Ctrl-D - scroll forward one half-window (and set half-window to [count]). - - [count]u, [count]Ctrl-U - scroll backward one half-window (and set half-window to - [count]). - - r, Ctrl-R, Ctrl-L - repaint screen. - - R reload view preserving scroll position. - - F toggle automatic forwarding. Roughly equivalent to periodic - file reload and scrolling to the bottom. The behaviour is simi- - lar to `tail -F` or F key in less. - - [count]/pattern - search forward for ([count]-th) matching line. - - [count]?pattern - search backward for ([count]-th) matching line. - - [count]n - repeat previous search (for [count]-th occurrence). - - [count]N - repeat previous search in reverse direction (for [count]-th - occurrence). - - [count]g, [count]<, [count]Alt-< - scroll to the first line of the file (or line [count]). - - [count]G, [count]>, [count]Alt-> - scroll to the last line of the file (or line [count]). - - [count]p, [count]% - scroll to the beginning of the file (or N percent into file). - - v invoke an editor to edit the current file being viewed. The - command for editing is taken from the 'vicmd'/'vixcmd' option - value and extended with middle line number prepended by a plus - sign and name of the current file. - - All "Ctrl-W x" keys work the same was as in Normal mode. Active mode - is automatically changed on navigating among windows. When less-like - mode activated on file preview is left using one by "Ctrl-W x" keys, - its state is stored until another file is displayed using preview (it's - possible to leave the mode, hide preview pane, do something else, then - get back to the file and show preview pane again with previously stored - state in it). - -Command line Mode - These keys are available in all submodes of the command line mode: com- - mand, search, prompt and filtering. - - Down, Up, Left, Right, Home, End and Delete are extended keys and they - are not available if vifm is compiled with --disable-extended-keys - option. - - Esc, Ctrl-C - leave command line mode, cancels input. Cancelled input is - saved into appropriate history and can be recalled later. - - Ctrl-M, Enter - execute command and leave command line mode. - - Ctrl-I, Tab - complete command or its argument. - - Shift-Tab - complete in reverse order. - - Ctrl-_ stop completion and return original input. - - Ctrl-B, Left - move cursor to the left. - - Ctrl-F, Right - move cursor to the right. - - Ctrl-A, Home - go to line beginning. - - Ctrl-E, End - go to line end. - - Alt-B go to the beginning of previous word. - - Alt-F go to the end of next word. - - Ctrl-U remove characters from cursor position till the beginning of - line. - - Ctrl-K remove characters from cursor position till the end of line. - - Ctrl-H, Backspace - remove character before the cursor. - - Ctrl-D, Delete - remove character under the cursor. - - Ctrl-W remove characters from cursor position till the beginning of - previous word. - - Alt-D remove characters from cursor position till the beginning of - next word. - - Ctrl-T swap the order of current and previous character and move cursor - forward or, if cursor past the end of line, swap the order of - two last characters in the line. - - Alt-. insert last part of previous command to current cursor position. - Each next call will insert last part of older command. - - Ctrl-G edit command-line content in external editor. See "Command line - editing" section for details. - - Ctrl-N recall more recent command-line from history. - - Ctrl-P recall older command-line from history. - - Up recall more recent command-line from history, that begins as the - current command-line. - - Down recall older command-line from history, that begins as the cur- - rent command-line. - - Ctrl-] trigger abbreviation expansion. - -Pasting special values - The shortcuts listed below insert specified values into current cursor - position. Last key of every shortcut references value that it inserts: - - c - [c]urrent file - - d - [d]irectory path - - e - [e]xtension of a file name - - r - [r]oot part of a file name - - t - [t]ail part of directory path - - - a - [a]utomatic filter - - m - [m]anual filter - - = - local filter, which is bound to "=" in normal mode - - Values related to filelist in current pane are available through Ctrl-X - prefix, while values from the other pane have doubled Ctrl-X key as - their prefix (doubled Ctrl-X is presumably easier to type than upper- - case letters; it's still easy to remap the keys to correspond to names - of similar macros). - - Ctrl-X c - name of the current file of the active pane. - - Ctrl-X d - path to the current directory of the active pane. - - Ctrl-X e - extension of the current file of the active pane. - - Ctrl-X r - name root of current file of the active pane. - - Ctrl-X t - the last component of path to the current directory of the - active pane. - - Ctrl-X Ctrl-X c - name of the current file of the inactive pane. - - Ctrl-X Ctrl-X d - path to the current directory of the inactive pane. - - Ctrl-X Ctrl-X e - extension of the current file of the inactive pane. - - Ctrl-X Ctrl-X r - name root of current file of the inactive pane. - - Ctrl-X Ctrl-X t - the last component of path to the current directory of the inac- - tive pane. - - - Ctrl-X a - value of automatic filter of the active pane. - - Ctrl-X m - value of manual filter of the active pane. - - Ctrl-X = - value of local filter of the active pane. - - - Ctrl-X / - last pattern from search history. - -Command line editing - vifm provides a facility to edit several kinds of data, that is usually - edited in command-line mode, in external editor (using command speci- - fied by 'vicmd' or 'vixcmd' option). This has at least two advantages - over built-in command-line mode: - - one can use full power of Vim to edit text; - - finding and reusing history entries becomes possible. - - The facility is supported by four input submodes of the command-line: - - command; - - forward search; - - backward search; - - file rename (see description of cw and cW normal mode keys). - - Editing command-line using external editor is activated by the Ctrl-G - shortcut. It's also possible to do almost the same from Normal and - Visual modes using q:, q/ and q? commands. - - Temporary file created for the purpose of editing the line has the fol- - lowing structure: - - 1. First line, which is either empty or contains text already entered - in command-line. - - 2. 2nd and all other lines with history items starting with the most - recent one. Altering this lines in any way won't change history - items stored by vifm. - - After editing application is finished the first line of the file is - taken as the result of operation, when the application returns zero - exit code. If the application returns an error (see :cquit command in - Vim), all the edits made to the file are ignored, but the initial value - of the first line is saved in appropriate history. - -More Mode - This is the mode that appears when status bar content is so big that it - doesn't fit on the screen. One can identify the mode by "-- More --" - message at the bottom. - - The following keys are handled in this mode: - - - Enter, Ctrl-J, j or Down - scroll one line down. - - Backspace, k or Up - scroll one line up. - - - d scroll one page (half of a screen) down. - - u scroll one page (half of a screen) up. - - - Space, f or PageDown - scroll down a screen. - - b or PageUp - scroll up a screen. - - - G scroll to the bottom. - - g scroll to the top. - - - q, Escape or Ctrl-C - quit the mode. - - : switch to command-line mode. - -Commands - Commands are executed with :command_name - - Commented out lines should start with the double quote symbol ("), - which may be preceded by whitespace characters intermixed with colons. - Inline comments can be added at the end of the line after double quote - symbol, only last line of a multi-line command can contain such com- - ment. Not all commands support inline comments as their syntax con- - flicts with names of registers and fields where double quotes are - allowed. - - Most of the commands have two forms: complete and the short one. Exam- - ple: - - :noh[lsearch] - - This means the complete command is nohlsearch, and the short one is - noh. - - Most of command-line commands completely reset selection in the current - view. However, there are several exceptions: - - - `:invert s` most likely leaves some files selected; - - - :normal command (when it doesn't leave command-line mode); - - - :if and :else commands don't affect selection on successful execu- - tion. - - '|' can be used to separate commands, so you can give multiple commands - in one line. If you want to use '|' in an argument, precede it with - '\'. - - These commands see '|' as part of their arguments even when it's - escaped: - - :[range]! - :autocmd - :cabbrev - :cmap - :cnoreabbrev - :cnoremap - :command - :dmap - :dnoremap - :filetype - :fileviewer - :filextype - :map - :mmap - :mnoremap - :nmap - :nnoremap - :noremap - :normal - :qmap - :qnoremap - :vmap - :vnoremap - :wincmd - :windo - :winrun - - To be able to use another command after one of these, wrap it with the - :execute command. An example: - - if filetype('.') == 'reg' | execute '!!echo regular file' | endif - - :[count] - - :number - move to the file number. - :12 would move to the 12th file in the list. - :0 move to the top of the list. - :$ move to the bottom of the list. - - :[count]command - The only builtin :[count]command are :[count]d[elete] and - :[count]y[ank]. - - :d3 would delete three files starting at the current file position - moving down. - - :3d would delete one file at the third line in the list. - - :command [args] - - :[range]!program - execute command via shell. Accepts macros. - - :[range]!command & - - same as above, but the command is run in the background using vifm's - means. - - Programs that write to stdout like "ls" create an error message showing - partial output of the command. - - Note the space before ampersand symbol, if you omit it, command will be - run in the background using job control of your shell. - - Accepts macros. - - :!! - - :[range]!!command - same as :!, but pauses before returning. - - :!! repeat the last command. - - :alink - - :[range]alink[!?] - create absolute symbolic links to files in directory of inactive - view. With "?" prompts for destination file names in an edi- - tor. "!" forces overwrite. - - :[range]alink[!] path - create absolute symbolic links to files in directory specified - by the path (absolute or relative to directory of inactive - view). - - :[range]alink[!] name1 name2... - create absolute symbolic links of files in directory of other - view giving each next link a corresponding name from the argu- - ment list. - - :apropos - - :apropos keyword... - create a menu of items returned by the apropos command. Select- - ing an item in the menu opens corresponding man page. By - default the command relies on the external "apropos" utility, - which can be customized by altering value of the 'aproposprg' - option. - - :autocmd - - :au[tocmd] {event} {pat} {cmd} - register autocommand for the {event}, which can be: - - DirEnter - performed on entering a directory - Event name is case insensitive. - - {pat} is a comma-separated list of modified globs patterns, - which can contain tilde or environment variables. All paths use - slash ('/') as directory separator. The pattern can start with - a '!', which negates it. Patterns that do not contain slashes - are matched against the last item of the path only (e.g. "dir" - in "/path/dir"). Literal comma can be entered by doubling it. - Two modifications to globs matching are as follows: - - * - never matches a slash (i.e., can signify single direc- - tory level) - - ** - matches any character (i.e., can match path of arbi- - trary depth) - - {cmd} is a :command or several of them separated with '|'. - - Examples of patterns: - - conf.d - matches conf.d directory anywhere - - *.d - matches directories ending with ".d" anywhere - - **.git - matches something.git, but not .git anywhere - - **/.git/** - matches /path/.git/objects, but not /path/.git - - **/.git/**/ - matches /path/.git/ only (because of trailing - slash) - - /etc/* - matches /etc/conf.d/, /etc/X11, but not - /etc/X11/fs - - /etc/**/*.d - matches /etc/conf.d, /etc/X11/conf.d, etc. - - /etc/**/* - matches /etc/ itself and any file below it - - /etc/**/** - matches /etc/ itself and any file below it - - :au[tocmd] [{event}] [{pat}] - list those autocommands that match given event-pattern combina- - tion. - {event} and {pat} can be omitted to list all autocommands. To - list any autocommands for specific pattern one can use * place- - holder in place of {event}. - - :au[tocmd]! [{event}] [{pat}] - remove autocommands that match given event-pattern combination. - Syntax is the same as for listing above. - - :apropos - repeat last :apropos command. - - :bmark - - :bmark tag1 [tag2 [tag3...]] - bookmark current directory with specified tags. - - :bmark! path tag1 [tag2 [tag3...]] - same as :bmark, but allows bookmarking specific path instead of - current directory. This is for use in vifmrc and for bookmark- - ing files. - - Path can contain macros that expand to single path (%c, %C, %d, - %D) or those that can expand to multiple paths, but contain only - one (%f, %F, %rx). The latter is done for convenience on using - the command interactively. Complex macros that include spaces - (e.g. "%c:gs/ /_") should be escaped. - - :bmarks - - :bmarks - display all bookmarks in a menu. - - :bmarks [tag1 [tag2...]] - display menu of bookmarks that include all of the specified - tags. - - :bmgo - - :bmgo [tag1 [tag2...]] - when there are more than one match acts exactly like :bmarks, - otherwise navigates to single match immediately (and fails if - there is no match). - - :cabbrev - - :ca[bbrev] - display menu of command-line mode abbreviations. - - :ca[bbrev] lhs-prefix - display command-line mode abbreviations which left-hand side - starts with specified prefix. - - :ca[bbrev] lhs rhs - register new or overwrites existing abbreviation for command- - line mode. rhs can contain spaces and any special sequences - accepted in rhs of mappings (see "Mappings" section below). - Abbreviations are expanded non-recursively. - - :cnoreabbrev - - :cnorea[bbrev] - display menu of command-line mode abbreviations. - - :cnorea[bbrev] lhs-prefix - display command-line mode abbreviations which left-hand side - starts with specified prefix. - - :cnorea[bbrev] lhs rhs - same as :cabbrev, but mappings in rhs are ignored during expan- - sion. - - :cd - - :cd or :cd ~ or :cd $HOME - change to home directory. - - :cd - go to the last visited directory. - - :cd ~/dir - change directory to ~/dir. - - :cd /curr/dir /other/dir - change directory of the current pane to /curr/dir and directory - of the other pane to /other/dir. Relative paths are assumed to - be relative to directory of current view. Command won't fail if - one of directories is invalid. All forms of the command accept - macros. - - :cd! /dir - same as :cd /dir /dir. - - :change - - :c[hange] - create a menu window to alter a files properties. - - :chmod - - :[range]chmod - display file attributes (permission on *nix and properties on - Windows) change dialog. - - :[range]chmod[!] arg... - only for *nix - change permissions for files. See `man 1 chmod` for arg format. - "!" means set permissions recursively. - - :chown - - :[range]chown - only for *nix - same as co key in normal mode. - - :[range]chown [user][:][group] - only for *nix - change owner and/or group of files. Operates on directories - recursively. - - :clone - - :[range]clone[!?] - clones files in current directory. With "?" vifm will open vi - to edit file names. "!" forces overwrite. Macros are expanded. - - :[range]clone[!] path - clones files to directory specified with the path (absolute or - relative to current directory). "!" forces overwrite. Macros - are expanded. - - :[range]clone[!] name1 name2... - clones files in current directory giving each next clone a cor- - responding name from the argument list. "!" forces overwrite. - Macros are expanded. - - :colorscheme - - :colo[rscheme]? - print current color scheme name on the status bar. - - :colo[rscheme] - display a menu with a list of available color schemes. You can - choose primary color scheme here. It is used for view if no - directory specific colorscheme fits current path. It's also - used to set border color (except view titles) and colors in - menus and dialogs. - - :colo[rscheme] color_scheme_name - change primary color scheme to color_scheme_name. In case of - errors (e.g. some colors are not supported by terminal) either - nothing is changed or color scheme is reset to builtin colors to - ensure that TUI is left in a usable state. - - :colo[rscheme] color_scheme_name directory - associate directory with the color scheme. The directory argu- - ment can be either absolute or relative path when :colorscheme - command is executed from command line, but mandatory should be - an absolute path when the command is executed in scripts loaded - at startup (until vifm is completely loaded). - - :comclear - - :comc[lear] - remove all user defined commands. - - :command - - :com[mand] - display a menu of user commands. - - :com[mand] beginning - display user defined commands that start with the beginning. - - :com[mand] name action - set a new user command. - Trying to use a reserved command name will result in an error - message. - Use :com[mand]! to overwrite a previously set command. - Unlike vim user commands do not have to start with a capital - letter. User commands are run in a shell by default. To run a - command in the background you must set it as a background com- - mand with & at the end of the commands action (:com rm rm %f &). - Command name cannot contain numbers or special symbols (except - '?' and '!'). - - :com[mand] name /pattern - set search pattern. - - :com[mand] name =pattern - set local filter value. - - :com[mand] name filter{:filter args} - set file name filter (see :filter command description). For - example: - - " display only audio files - :command onlyaudio filter/.+.\(mp3|wav|mp3|flac|ogg|m4a|wma|ape\)$/i - " display everything except audio files - :command noaudio filter!/.+.\(mp3|wav|mp3|flac|ogg|m4a|wma|ape\)$/i - - :com[mand] cmd :commands - set kind of an alias for internal command (like in a shell). - Passes range given to alias to an aliased command, so running - :%cp after - :command cp :copy %a - equals - :%copy - - :compare - - :compare [byname | bysize | bycontents | listall | listunique | - listdups | ofboth | ofone | groupids | grouppaths | skipempty]... - compare files in one or two views according the arguments. The - default is "bycontents listall ofboth grouppaths". See "Compare - views" section below for details. Tree structure is incompati- - ble with alternative representations, so values of 'lsview' and - 'millerview' options are ignored. - - :copen - - :cope[n] - opens menu with contents of the last displayed menu with naviga- - tion to files by default, if any. - - :copy - - :[range]co[py][!?][ &] - copy files to directory of other view. With "?" prompts for - destination file names in an editor. "!" forces overwrite. - - :[range]co[py][!] path[ &] - copy files to directory specified with the path (absolute or - relative to directory of other view). "!" forces overwrite. - - :[range]co[py][!] name1 name2...[ &] - copy files to directory of other view giving each next file a - corresponding name from the argument list. "!" forces over- - write. - - :cquit - - :cq[uit][!] - same as :quit, but also aborts directory choosing via - --choose-dir (empties output file) and returns non-zero exit - code. - - :cunabbrev - - :cuna[bbrev] lhs - unregister command-line mode abbreviation by its lhs. - - :cuna[bbrev] rhs - unregister command-line mode abbreviation by its rhs, so that - abbreviation could be removed even after expansion. - - :delbmarks - - :delbmarks - remove bookmarks from current directory. - - :delbmarks tag1 [tag2 [tag3...]] - remove set of bookmarks that include all of the specified tags. - - :delbmarks! - remove all bookmarks. - - :delbmarks! path1 [path2 [path3...]] - remove bookmarks of listed paths. - - :delcommand - - :delc[ommand] user_command - remove user defined command named user_command. - - :delete - - :[range]d[elete][!][ &] - delete selected file or files. "!" means complete removal - (omitting trash). - - :[range]d[elete][!] [reg] [count][ &] - delete selected or [count] files to the reg register. "!" means - complete removal (omitting trash). - - :delmarks - - :delm[arks]! - delete all marks. - - :delm[arks] marks ... - delete specified marks, each argument is treated as a set of - marks. - - :display - - :di[splay] - display menu with registers content. - - :di[splay] list ... - display the contents of the numbered and named registers that - are mentioned in list (for example "az to display "", "a and "z - content). - - :dirs - - :dirs display directory stack. - - :echo - - :ec[ho] [...] - evaluate each argument as an expression and output them sepa- - rated with a space. See help on :let command for a definition - of . - - :edit - - :[range]e[dit] [file...] - open selected or passed file(s) in editor. Macros and environ- - ment variables are expanded. - - :else - - :el[se] - execute commands until next matching :endif if all other condi- - tions didn't match. See also help on :if and :endif commands. - - :elseif - - :elsei[f] {expr1} - execute commands until next matching :elseif, :else or :endif if - conditions of previous :if and :elseif branches were evaluated - to zero. See also help on :if and :endif commands. - - :empty - - :empty permanently remove files from all existing non-empty trash - directories (see "Trash directory" section below). Trash direc- - tories which are specified via %r and/or %u also get deleted - completely. Also remove all operations from undolist that have - no sense after :empty and remove all records about files located - inside directories from all registers. Removal is performed as - background task with undetermined amount of work and can be - checked via :jobs menu. - - :endif - - :en[dif] - end conditional block. See also help on :if and :else commands. - - :execute - - :exe[cute] [...] - evaluate each argument as an expression and join results sepa- - rated by a space to get a single string which is then executed - as a command-line command. See help on :let command for a defi- - nition of . - - :exit - - :exi[t][!] - same as :quit. - - :file - - :f[ile][ &] - display menu of programs set for the file type of the current - file. " &" forces running associated program in background. - - :f[ile] arg[ &] - run associated command that begins with the arg skipping opening - menu. " &" forces running associated program in background. - - :filetype - - :filet[ype] pattern-list [{descr}]def_prog[ &],[{descr}]prog2[ &],... - associate given program list to each of the patterns. Associ- - ated program (command) is used by handlers of l and Enter keys - (and also in the :file menu). If you need to insert comma into - command just double it (",,"). Space followed by an ampersand - as two last characters of a command means running of the command - in the background. Optional description can be given to each - command to ease understanding of what command will do in the - :file menu. Vifm will try the rest of the programs for an asso- - ciation when the default isn't found. When program entry - doesn't contain any of vifm macros, name of current file is - appended as if program entry ended with %c macro on *nix and %"c - on Windows. On Windows path to executables containing spaces - can (and should be for correct work with such paths) be double - quoted. See "Patterns" section below for pattern definition. - See also "Automatic FUSE mounts" section below. Example for zip - archives and several actions: - - filetype *.zip,*.jar,*.war,*.ear - \ {Mount with fuse-zip} - \ FUSE_MOUNT|fuse-zip %SOURCE_FILE %DESTINATION_DIR, - \ {View contents} - \ zip -sf %c | less, - \ {Extract here} - \ tar -xf %c, - - Note that on OS X when `open` is used to call an app, vifm is - unable to check whether that app is actually available. So if - automatic skipping of programs that aren't there is desirable, - `open` should be replaced with an actual command. - - :filet[ype] filename - list (in menu mode) currently registered patterns that match - specified file name. Same as ":filextype filename". - - :filextype - - :filex[type] pattern-list [{ description }] def_program,program2,... - same as :filetype, but this command is ignored if not running in - X. In X :filextype is equal to :filetype. See "Patterns" sec- - tion below for pattern definition. See also "Automatic FUSE - mounts" section below. - - For example, consider the following settings (the order might - seem strange, but it's for the demonstration purpose): - - filetype *.html,*.htm - \ {View in lynx} - \ lynx - filextype *.html,*.htm - \ {Open with dwb} - \ dwb %f %i &, - filetype *.html,*.htm - \ {View in links} - \ links - filextype *.html,*.htm - \ {Open with firefox} - \ firefox %f &, - \ {Open with uzbl} - \ uzbl-browser %f %i &, - - If you're using vifm inside a terminal emulator that is running - in graphical environment (when X is used on *nix; always on Win- - dows), vifm attempts to run application in this order: - - 1. lynx - 2. dwb - 3. links - 4. firefox - 5. uzbl - - If there is no graphical environment (checked presence of $DIS- - PLAY environment variable on *nix; never happens on Windows), - the list will look like: - - 1. lynx - 2. links - - Just as if all :filextype commands were not there. - - The purpose of such differentiation is to allow comfortable use - of vifm with same settings in desktop environment/through remote - connection (SSH)/in native console. - - Note that on OS X $DISPLAY isn't defined unless you define it, - so :filextype should be used only if you set $DISPLAY in some - way. - - :filext[ype] filename - list (in menu mode) currently registered patterns that match - specified file name. Same as ":filetype filename". - - :fileviewer - - :filev[iewer] pattern-list command1,command2,... - register specified list of commands as viewers for each of the - patterns. Viewer is a command which output is captured and dis- - played in one of the panes of vifm after pressing "e" or running - :view command. When the command doesn't contain any of vifm - macros, name of current file is appended as if command ended - with %c macro. Comma escaping and missing commands processing - rules as for :filetype apply to this command. See "Patterns" - section below for pattern definition. - - Example for zip archives: - - fileviewer *.zip,*.jar,*.war,*.ear zip -sf %c, echo "No zip to preview:" - - :filev[iewer] filename - list (in menu mode) currently registered patterns that match - specified filename. - - :filter - - :filter[!] {pattern} - filter files matching the pattern out of directory listings. - '!' controls state of filter inversion after updating filter - value (see also 'cpoptions' description). Filter is matched - case sensitively on *nix and case insensitively on Windows. See - "File Filters" and "Patterns" sections. - - Example: - - " filter all files ending in .o from the filelist. - :filter /.o$/ - - - :filter[!] {empty-pattern} - same as above, but use last search pattern as pattern value. - - Example: - - :filter //I - - - :filter - reset filter (set it to an empty string) and show all files. - - :filter! - same as :invert. - - :filter? - show information on local, name and auto filters. - - :find - - :[range]fin[d] pattern - display results of find command in the menu. Searches among - selected files if any. Accepts macros. By default the command - relies on the external "find" utility, which can be customized - by altering value of the 'findprg' option. - - :[range]fin[d] -opt... - same as :find above, but user defines all find arguments. - Searches among selected files if any. - - :[range]fin[d] path -opt... - same as :find above, but user defines all find arguments. - Ignores selection and range. - - :[range]fin[d] - repeat last :find command. - - :finish - - :fini[sh] - stop sourcing a script. Can only be used in a vifm script file. - This is a quick way to skip the rest of the file. - - :goto - - :go[to] - change directory if necessary and put specified path under the - cursor. The path should be existing non-root path. Macros and - environment variables are expanded. - - :grep - - :[range]gr[ep][!] pattern - will show results of grep command in the menu. Add "!" to - request inversion of search (look for lines that do not match - pattern). Searches among selected files if any and no range - given. Ignores binary files by default. By default the command - relies on the external "grep" utility, which can be customized - by altering value of the 'grepprg' option. - - :[range]gr[ep][!] -opt... - same as :grep above, but user defines all grep arguments, which - are not escaped. Searches among selected files if any. - - :[range]gr[ep][!] - repeats last :grep command. "!" of this command inverts "!" in - repeated command. - - :help - - :h[elp] - show the help file. - - :h[elp] argument - is the same as using ':h argument' in vim. Use vifm- - to get help on vifm (tab completion works). This form of the - command doesn't work when 'vimhelp' option is off. - - :highlight - - :hi[ghlight] - display information about all highlight groups active at the - moment. - - :hi[ghlight] clear - reset all highlighting to builtin defaults and removed all file- - name-specific rules. - - :hi[ghlight] clear ( {pat1,pat2,...} | /regexp/ ) - removes specified rule. - - :hi[ghlight] ( group-name | {pat1,pat2,...} | /regexp/ ) - display information on given highlight group or file name pat- - tern of color scheme used in the active view. - - :hi[ghlight] ( group-name | {pat1,pat2,...} | /regexp/[iI] ) - cterm=style | ctermfg=color | ctermbg=color - set style (cterm), foreground (ctermfg) or/and background - (ctermbg) parameters of highlight group or file name pattern for - color scheme used in the active view. - - All style values as well as color names are case insensitive. - - Available style values (some of them can be combined): - - bold - - underline - - reverse or inverse - - standout - - italic (on unsupported systems becomes reverse) - - none - - Available group-name values: - - Win - color of all windows (views, dialogs, menus) and default color - for their content (e.g. regular files in views) - - AuxWin - color of auxiliary areas of windows - - Border - color of vertical parts of the border - - TabLine - tab line color - - TabLineSel - color of the tip of selected tab - - TopLineSel - top line color of the current pane - - TopLine - top line color of the other pane - - CmdLine - the command line/status bar color - - ErrorMsg - color of error messages in the status bar - - StatusLine - color of the line above the status bar - - JobLine - color of job line that appears above the status line - - WildMenu - color of the wild menu items - - SuggestBox - color of key suggestion box - - CurrLine - line at cursor position in active view - - OtherLine - line at cursor position in inactive view - - Selected - color of selected files - - Directory - color of directories - - Link - color of symbolic links in the views - - BrokenLink - color of broken symbolic links - - Socket - color of sockets - - Device - color of block and character devices - - Executable - color of executable files - - Fifo - color of fifo pipes - - CmpMismatch - color of mismatched files in side-by-side comparison - by path - - User1..User9 - 9 colors which can be used via %* 'statusline' macro - - Available colors: - - -1 or default or none - default or transparent - - black and lightblack - - red and lightred - - green and lightgreen - - yellow and lightyellow - - blue and lightblue - - magenta and lightmagenta - - cyan and lightcyan - - white and lightwhite - - 0-255 - corresponding colors from 256-color palette - - Light versions of colors are regular colors with bold attribute set. - So order of arguments of :highlight command is important and it's bet- - ter to put "cterm" in front of others to prevent it from overwriting - attributes set by "ctermfg" or "ctermbg" arguments. - - For convenience of color scheme authors xterm-like names for 256 color - palette is also supported. The mapping is taken from - http://vim.wikia.com/wiki/Xterm256_color_names_for_console_Vim Dupli- - cated entries were altered by adding an underscore followed by numeri- - cal suffix. - - 0 Black 86 Aquamarine1 172 Orange3 - 1 Red 87 DarkSlateGray2 173 LightSalmon3_2 - 2 Green 88 DarkRed_2 174 LightPink3 - 3 Yellow 89 DeepPink4_2 175 Pink3 - 4 Blue 90 DarkMagenta 176 Plum3 - 5 Magenta 91 DarkMagenta_2 177 Violet - 6 Cyan 92 DarkViolet 178 Gold3_2 - 7 White 93 Purple 179 LightGoldenrod3 - 8 LightBlack 94 Orange4_2 180 Tan - 9 LightRed 95 LightPink4 181 MistyRose3 - 10 LightGreen 96 Plum4 182 Thistle3 - 11 LightYellow 97 MediumPurple3 183 Plum2 - 12 LightBlue 98 MediumPurple3_2 184 Yellow3_2 - 13 LightMagenta 99 SlateBlue1 185 Khaki3 - 14 LightCyan 100 Yellow4 186 LightGoldenrod2 - 15 LightWhite 101 Wheat4 187 LightYellow3 - 16 Grey0 102 Grey53 188 Grey84 - 17 NavyBlue 103 LightSlateGrey 189 LightSteelBlue1 - 18 DarkBlue 104 MediumPurple 190 Yellow2 - 19 Blue3 105 LightSlateBlue 191 DarkOliveGreen1 - 20 Blue3_2 106 Yellow4_2 192 DarkOliveG- - reen1_2 - 21 Blue1 107 DarkOliveGreen3 193 DarkSeaGreen1_2 - 22 DarkGreen 108 DarkSeaGreen 194 Honeydew2 - 23 DeepSkyBlue4 109 LightSkyBlue3 195 LightCyan1 - 24 DeepSkyBlue4_2 110 LightSkyBlue3_2 196 Red1 - 25 DeepSkyBlue4_3 111 SkyBlue2 197 DeepPink2 - 26 DodgerBlue3 112 Chartreuse2_2 198 DeepPink1 - 27 DodgerBlue2 113 DarkOliveGreen3_2 199 DeepPink1_2 - 28 Green4 114 PaleGreen3_2 200 Magenta2_2 - 29 SpringGreen4 115 DarkSeaGreen3 201 Magenta1 - 30 Turquoise4 116 DarkSlateGray3 202 OrangeRed1 - 31 DeepSkyBlue3 117 SkyBlue1 203 IndianRed1 - 32 DeepSkyBlue3_2 118 Chartreuse1 204 IndianRed1_2 - 33 DodgerBlue1 119 LightGreen_2 205 HotPink - 34 Green3 120 LightGreen_3 206 HotPink_2 - 35 SpringGreen3 121 PaleGreen1 207 MediumOrchid1_2 - 36 DarkCyan 122 Aquamarine1_2 208 DarkOrange - 37 LightSeaGreen 123 DarkSlateGray1 209 Salmon1 - 38 DeepSkyBlue2 124 Red3 210 LightCoral - 39 DeepSkyBlue1 125 DeepPink4_3 211 PaleVioletRed1 - 40 Green3_2 126 MediumVioletRed 212 Orchid2 - 41 SpringGreen3_2 127 Magenta3 213 Orchid1 - 42 SpringGreen2 128 DarkViolet_2 214 Orange1 - 43 Cyan3 129 Purple_2 215 SandyBrown - 44 DarkTurquoise 130 DarkOrange3 216 LightSalmon1 - 45 Turquoise2 131 IndianRed 217 LightPink1 - 46 Green1 132 HotPink3 218 Pink1 - 47 SpringGreen2_2 133 MediumOrchid3 219 Plum1 - 48 SpringGreen1 134 MediumOrchid 220 Gold1 - 49 MediumSpringGreen 135 MediumPurple2 221 LightGolden- - rod2_2 - 50 Cyan2 136 DarkGoldenrod 222 LightGolden- - rod2_3 - 51 Cyan1 137 LightSalmon3 223 NavajoWhite1 - 52 DarkRed 138 RosyBrown 224 MistyRose1 - 53 DeepPink4 139 Grey63 225 Thistle1 - 54 Purple4 140 MediumPurple2_2 226 Yellow1 - 55 Purple4_2 141 MediumPurple1 227 LightGoldenrod1 - 56 Purple3 142 Gold3 228 Khaki1 - 57 BlueViolet 143 DarkKhaki 229 Wheat1 - 58 Orange4 144 NavajoWhite3 230 Cornsilk1 - 59 Grey37 145 Grey69 231 Grey100 - 60 MediumPurple4 146 LightSteelBlue3 232 Grey3 - 61 SlateBlue3 147 LightSteelBlue 233 Grey7 - 62 SlateBlue3_2 148 Yellow3 234 Grey11 - 63 RoyalBlue1 149 DarkOliveGreen3_3 235 Grey15 - 64 Chartreuse4 150 DarkSeaGreen3_2 236 Grey19 - 65 DarkSeaGreen4 151 DarkSeaGreen2 237 Grey23 - 66 PaleTurquoise4 152 LightCyan3 238 Grey27 - 67 SteelBlue 153 LightSkyBlue1 239 Grey30 - 68 SteelBlue3 154 GreenYellow 240 Grey35 - 69 CornflowerBlue 155 DarkOliveGreen2 241 Grey39 - 70 Chartreuse3 156 PaleGreen1_2 242 Grey42 - 71 DarkSeaGreen4_2 157 DarkSeaGreen2_2 243 Grey46 - 72 CadetBlue 158 DarkSeaGreen1 244 Grey50 - 73 CadetBlue_2 159 PaleTurquoise1 245 Grey54 - 74 SkyBlue3 160 Red3_2 246 Grey58 - 75 SteelBlue1 161 DeepPink3 247 Grey62 - 76 Chartreuse3_2 162 DeepPink3_2 248 Grey66 - 77 PaleGreen3 163 Magenta3_2 249 Grey70 - 78 SeaGreen3 164 Magenta3_3 250 Grey74 - 79 Aquamarine3 165 Magenta2 251 Grey78 - 80 MediumTurquoise 166 DarkOrange3_2 252 Grey82 - 81 SteelBlue1_2 167 IndianRed_2 253 Grey85 - 82 Chartreuse2 168 HotPink3_2 254 Grey89 - 83 SeaGreen2 169 HotPink2 255 Grey93 - 84 SeaGreen1 170 Orchid - 85 SeaGreen1_2 171 MediumOrchid1 - - There are two colors (foreground and background) and only one bold - attribute. Thus single bold attribute affects both colors when - "reverse" attribute is used in vifm run inside terminal emulator. At - the same time linux native console can handle boldness of foreground - and background colors independently, but for consistency with terminal - emulators this is available only implicitly by using light versions of - colors. This behaviour might be changed in the future. - - Although vifm supports 256 colors in a sense they are supported by UI - drawing library, whether you will be able to use all of them highly - depends on your terminal. To set up terminal properly, make sure that - $TERM in the environment you run vifm is set to name of 256-color ter- - minal (on *nixes it can also be set via X resources), e.g. - xterm-256color. One can find list of available terminal names by list- - ing /usr/lib/terminfo/. Number of colors supported by terminal with - current settings can be checked via "tput colors" command. - - Here is the hierarchy of highlight groups, which you need to know for - using transparency: - JobLine - SuggestBox - StatusLine - WildMenu - User1..User9 - Border - CmdLine - ErrorMsg - Win - AuxWin - File name specific highlights - Directory - Link - BrokenLink - Socket - Device - Fifo - Executable - Selected - CurrLine - OtherLine - TopLine - TopLineSel - TabLine - TabLineSel - - "none" means default terminal color for highlight groups at the first - level of the hierarchy and transparency for all others. - - Here file name specific highlights mean those configured via globs ({}) - or regular expressions (//). At most one of them is applied per file - entry, namely the first that matches file name, hence order of :high- - light commands might be important in certain cases. - - :history - - :his[tory] - creates a pop-up menu of directories visited. - - :his[tory] x - x can be: - d[ir] or . show directory history. - c[md] or : show command line history. - s[earch] or / show search history and search forward on l key. - f[search] or / show search history and search forward on l key. - b[search] or ? show search history and search backward on l key. - i[nput] or @ show prompt history (e.g. on one file renaming). - fi[lter] or = show filter history (see description of the "=" - normal mode command). - - :histnext - - :histnext - same as . The main use case for this command is to work - around the common pain point of and being the same - ASCII character: one could alter the terminal emulator settings - to emit, for example, the `F1` keycode when Ctrl-I is pressed, - then `:noremap :histnext` in vifm, add "t" flag to the - 'cpoptions', and thus have both and working as - expected. - - :histprev - - :histprev - same as . - - :if - - :if {expr1} - starts conditional block. Commands are executed until next - matching :elseif, :else or :endif command if {expr1} evaluates - to non-zero, otherwise they are ignored. See also help on :else - and :endif commands. - - Example: - - if $TERM == 'screen.linux' - highlight CurrLine ctermfg=lightwhite ctermbg=lightblack - elseif $TERM == 'tmux' - highlight CurrLine cterm=reverse ctermfg=black ctermbg=white - else - highlight CurrLine cterm=bold,reverse ctermfg=black ctermbg=white - endif - - :invert - - :invert [f] - invert file name filter. - - :invert? [f] - show current filter state. - - :invert s - invert selection. - - :invert o - invert sorting order of the primary sorting key. - - :invert? o - show sorting order of the primary sorting key. - - :jobs - - :jobs shows menu of current backgrounded processes. - - :let - - :let $ENV_VAR = - sets environment variable. Warning: setting environment vari- - able to an empty string on Windows removes it. - - :let $ENV_VAR .= - append value to environment variable. - - :let &[l:|g:]opt = - sets option value. - - :let &[l:|g:]opt .= - append value to string option. - - :let &[l:|g:]opt += - increasing option value, adding sub-values. - - :let &[l:|g:]opt -= - decreasing option value, removing sub-values. - - Where could be a single-quoted string, double-quoted string, an - environment variable, function call or a concatanation of any of them - in any order using the '.' operator. Any whitespace is ignored. - - :locate - - :locate filename - use "locate" command to create a menu of filenames. Selecting a - file from the menu will reload the current file list in vifm to - show the selected file. By default the command relies on the - external "locate" utility (it's assumed that its database is - already built), which can be customized by altering value of the - 'locateprg' option. - - :locate - repeats last :locate command. - - :ls - - :ls lists windows of active terminal multiplexer (only when terminal - multiplexer is used). This is achieved by issuing proper com- - mand for active terminal multiplexer, thus the list is not han- - dled by vifm. - - :lstrash - - :lstrash - displays a menu with list of files in trash. Each element of - the list is original path of a deleted file, thus the list can - contain duplicates. - - :mark - - :[range]ma[rk][?] x [/full/path] [filename] - Set mark x (a-zA-Z0-9) at /full/path and filename. By default - current directory is being used. If no filename was given and - /full/path is current directory then last file in [range] is - used. Using of macros is allowed. Question mark will stop com- - mand from overwriting existing marks. - - :marks - - :marks create a pop-up menu of marks. - - :marks list ... - display the contents of the marks that are mentioned in list. - - :media - - :media only for *nix - display media management menu. See also 'mediaprg' option. - - :messages - - :mes[sages] - shows previously given messages (up to 50). - - :mkdir - - :[line]mkdir[!] dir ... - create directories at specified paths. The [line] can be used - to pick node in a tree-view. "!" means make parent directories - as needed. Macros are expanded. - - :move - - :[range]m[ove][!?][ &] - move files to directory of other view. With "?" prompts for - destination file names in an editor. "!" forces overwrite. - - :[range]m[ove][!] path[ &] - move files to directory specified with the path (absolute or - relative to directory of other view). "!" forces overwrite. - - :[range]m[ove][!] name1 name2...[ &] - move files to directory of other view giving each next file a - corresponding name from the argument list. "!" forces over- - write. - - :nohlsearch - - :noh[lsearch] - clear selection in current pane. - - :normal - - :norm[al][!] commands - execute normal mode commands. If "!" is used, user defined map- - pings are ignored. Unfinished last command is aborted as if - or was typed. A ":" should be completed as well. - Commands can't start with a space, so put a count of 1 (one) - before it. - - :only - - :on[ly] - switch to a one window view. - - :popd - - :popd remove pane directories from stack. - - :pushd - - :pushd[!] /curr/dir [/other/dir] - add pane directories to stack and process arguments like :cd - command. - - :pushd exchange the top two items of the directory stack. - - :put - - :[line]pu[t][!] [reg] [ &] - puts files from specified register (" by default) into current - directory. The [line] can be used to pick node in a tree-view. - "!" moves files "!" moves files from their original location - instead of copying them. During this operation no confirmation - dialogs will be shown, all checks are performed beforehand. - - :pwd - - :pw[d] show the present working directory. - - :qall - - :qa[ll][!] - exit vifm (add ! to skip saving changes and checking for active - backgrounded commands). - - :quit - - :q[uit][!] - if there is more than one tab, close the current one, otherwise - exit vifm (add ! to skip saving changes and checking for active - backgrounded commands). - - :redraw - - :redr[aw] - redraw the screen immediately. - - :registers - - :reg[isters] - display menu with registers content. - - :reg[isters] list ... - display the contents of the numbered and named registers that - are mentioned in list (for example "az to display "", "a and "z - content). - - :regular - - :regular - - switch to regular view leaving custom view. - :rename - - :[range]rename[!] - rename files using vi to edit names. ! means go recursively - through directories. - - :[range]rename name1 name2... - rename each of selected files to a corresponding name. - - :restart - - :restart - free a lot of things (histories, commands, etc.), reread - vifminfo and vifmrc files and run startup commands passed in the - argument list, thus losing all unsaved changes (e.g. recent his- - tory or keys mapped in current session). - - :restore - - :[range]restore - restore file from trash directory, doesn't work outside one of - trash directories. See "Trash directory" section below. - - :rlink - - :[range]rlink[!?] - create relative symbolic links to files in directory of other - view. With "?" prompts for destination file names in an editor. - "!" forces overwrite. - - :[range]rlink[!] path - create relative symbolic links of files in directory specified - with the path (absolute or relative to directory of other view). - "!" forces overwrite. - - :[range]rlink[!] name1 name2... - create relative symbolic links of files in directory of other - view giving each next link a corresponding name from the argu- - ment list. "!" forces overwrite. - - :screen - - :screen - toggle whether to use the terminal multiplexer or not. - A terminal multiplexer uses pseudo terminals to allow multiple - windows to be used in the console or in a single xterm. Start- - ing vifm from terminal multiplexer with appropriate support - turned on will cause vifm to open a new terminal multiplexer - window for each new file edited or program launched from vifm. - This requires screen version 3.9.9 or newer for the screen -X - argument or tmux (1.8 version or newer is recommended). - - :screen! - enable integration with terminal multiplexers. - - :screen? - display whether integration with terminal multiplexers is - enabled. - - Note: the command is called screen for historical reasons (when tmux - wasn't yet supported) and might be changed in future releases, or get - an alias. - - :select - - :[range]select - select files in the given range (current file if no range is - given). - - :select {pattern} - select files that match specified pattern. Possible {pattern} - forms are described in "Patterns" section below. Trailing slash - for directories is taken into account, so `:select! */ | invert - s` selects only files. - - :select //[iI] - same as item above, but reuses last search pattern. - - :select !{external command} - select files from the list supplied by external command. Files - are matched by full paths, relative paths are converted to abso- - lute ones beforehand. - - :[range]select! [{pattern}] - same as above, but resets previously selected items before pro- - ceeding. - - :set - - :se[t] display all options that differ from their default value. - - :se[t] all - display all options. - - :se[t] opt1=val1 opt2='val2' opt3="val3" ... - sets given options. For local options both values are set. - You can use following syntax: - - for all options - option, option? and option& - - for boolean options - nooption, invoption and option! - - for integer options - option=x, option+=x and option-=x - - for string options - option=x and option+=x - - for string list options - option=x, option+=x and option-=x - - for enumeration options - option=x, option+=x and option-=x - - for set options - option=x, option+=x and option-=x - - for charset options - option=x, option+=x, option-=x and - option^=x - - the meaning: - - option - turn option on (for boolean) or print its value (for - all others) - - nooption - turn option off - - invoption - invert option state - - option! - invert option state - - option? - print option value - - option& - reset option to its default value - - option=x or option:x - set option to x - - option+=x - add/append x to option - - option-=x - remove (or subtract) x from option - - option^=x - toggle x presence among values of the option - - Option name can be prepended and appended by any number of - whitespace characters. - - :setglobal - - :setg[lobal] - display all global options that differ from their default value. - - :setg[lobal] all - display all global options. - - :setg[lobal] opt1=val1 opt2='val2' opt3="val3" ... - same as :set, but changes/prints only global options or global - values of local options. Changes to the latter might be not - visible until directory is changed. - - :setlocal - - :setl[ocal] - display all local options that differ from their default value. - - :setl[ocal] all - display all local options. - - :setl[ocal] opt1=val1 opt2='val2' opt3="val3" ... - same as :set, but changes/prints only local values of local - options. - - :shell - - :sh[ell][!] - start a shell in current directory. "!" suppresses spawning - dedicated window of terminal multiplexer for a shell. To make - vifm adaptive to environment it uses $SHELL if it's defined, - otherwise 'shell' value is used. - - - :siblnext - - :[count]siblnext[!] - - change directory to [count]th next sibling directory after cur- - rent path using value of global sort option of current pane. - "!" enables wrapping. - - For example, say, you're at /boot and root listing starts like - this: - - bin/ - boot/ - dev/ - ... - - Issuing :siblnext will navigate to /dev. - - - :siblprev - - :[count]siblprev[!] - same as :siblnext, but in the opposite direction. - - :sort - - :sor[t] - display dialog with different sorting methods, when one can - select primary sorting key. When 'viewcolumns' options is empty - and 'lsview' is off, changing primary sorting key will also - affect view look (in particular the second column of the view - will be changed). - - :source - - :so[urce] file - read command-line commands from the file. - - :split - - :sp[lit] - switch to a two window horizontal view. - - :sp[lit]! - toggle horizontal window splitting. - - :sp[lit] path - splits the window horizontally to show both file directories. - Also changes other pane to path (absolute or relative to current - directory of active pane). - - :substitute - - :[range]s[ubstitute]/pattern/string/[flags] - for each file in range replace a match of pattern with string. - - String can contain \0...\9 to link to capture groups (\0 - all match, - \1 - first group, etc.). - - Pattern is stored in search history. - - Available flags: - - - i - ignore case (the 'ignorecase' and 'smartcase' options are not - used) - - - I - don't ignore case (the 'ignorecase' and 'smartcase' options are - not used) - - - g - substitute all matches in each file name (each g toggles this) - - :[range]s[ubstitute]/pattern - substitute pattern with an empty string. - - :[range]s[ubstitute]//string/[flags] - use last pattern from search history. - - :[range]s[ubstitute] - repeat previous substitution command. - - :sync - - :sync [relative path] - change the other pane to the current pane directory or to some - path relative to the current directory. Using macros is - allowed. - - :sync! change the other pane to the current pane directory and synchro- - nize cursor position. If current pane displays custom list of - files, position before entering it is used (current one might - not make any sense). - - - :sync! [location | cursorpos | localopts | filters | filelist | tree | - all]... - change enumerated properties of the other pane to match corre- - sponding properties of the current pane. Arguments have the - following meanings: - - - location - current directory of the pane; - - - cursorpos - cursor position (doesn't make sense without - "location"); - - - localopts - all local options; - - - filters - all filters; - - - filelist - list of files for custom view (implies "loca- - tion"); - - - tree - tree structure for tree view (implies "location"); - - - all - all of the above. - - :tabclose - - :tabc[lose] - close current tab, unless it's the only one open at current - scope. - - :tabmove - - :tabm[ove] [N] - without the argument or with `$` as the argument, current tab - becomes the last tab. With the argument, current tab is moved - after the tab with the specified number. Argument of `0` moves - current tab to the first position. - - :tabname - - :tabname [name] - set, update or reset (when no argument is provided) name of the - current tab. - - :tabnew - - :tabnew [path] - create new tab. Accepts optional path for the new tab. Macros - and environment variables are expanded. - - :tabnext - - :tabn[ext] - switch to the next tab (wrapping around). - - :tabn[ext] {n} - go to the tab number {n}. Tab numeration starts with 1. - - :tabprevious - - :tabp[revious] - switch to the previous tab (wrapping around). - - :tabp[revious] {n} - go to the {n}-th previous tab. Note that :tabnext handles its - argument differently. - - :touch - - :[line]touch file... - create files at specified paths. Aborts on errors. Doesn't - update time of existing files. The [line] can be used to pick - node in a tree-view. Macros are expanded. - - :tr - - :[range]tr/pattern/string/ - for each file in range transliterate the characters which appear - in pattern to the corresponding character in string. When - string is shorter than pattern, it's padded with its last char- - acter. - - :trashes - - :trashes - lists all valid trash directories in a menu. Only non-empty and - writable trash directories are shown. This is exactly the list - of directories that are cleared when :empty command is executed. - - :trashes? - same as :trashes, but also displays size of each trash direc- - tory. - - :tree - - :tree turn pane into tree view with current directory as its root. - The tree view is implemented on top of a custom view, but is - automatically kept in sync with file system state and considers - all the filters. Thus the structure corresponds to what one - would see on visiting the directories manually. As a special - case for trees built out of custom view file-system tracking - isn't performed. - - To leave tree view go up from its root or use gh at any level of - the tree. Any command that changes directory will also do, in - particular, `:cd ..`. - - Tree structure is incompatible with alternative representations, - so values of 'lsview' and 'millerview' options are ignored. - - :tree! toggle current view in and out of tree mode. - - :undolist - - :undol[ist] - display list of latest changes. Use "!" to see actual commands. - - :unlet - - :unl[et][!] $ENV_VAR1 $ENV_VAR2 ... - remove environment variables. Add ! to omit displaying of warn- - ings about nonexistent variables. - - :unselect - - :[range]unselect - unselect files in the given range (current file if no range is - given). - - :unselect {pattern} - unselect files that match specified pattern. Possible {pattern} - forms are described in "Patterns" section below. Trailing slash - for directories is taken into account, so `:unselect */` unse- - lects directories. - - :unselect !{external command} - unselect files from the list supplied by external command. - Files are matched by full paths, relative paths are converted to - absolute ones beforehand. - - :unselect //[iI] - same as item above, but reuses last search pattern. - - :version - - :ve[rsion] - show menu with version information. - - :vifm - - :vifm same as :version. - - :view - - :vie[w] - toggle on and off the quick file view. See also 'quickview' - option. - - :vie[w]! - turn on quick file view if it's off. - - :volumes - - :volumes - only for MS-Windows - display menu with volume list. Hitting l (or Enter) key opens - appropriate volume in the current pane. - - :vsplit - - :vs[plit] - switch to a two window vertical view. - - :vs[plit]! - toggle window vertical splitting. - - :vs[plit] path - split the window vertically to show both file directories. And - changes other pane to path (absolute or relative to current - directory of active pane). - - :wincmd - - :[count]winc[md] {arg} - same as running Ctrl-W [count] {arg}. - - :windo - - :windo [command...] - execute command for each pane (same as :winrun % command). - - :winrun - - :winrun type [command...] - execute command for pane(s), which is determined by type argu- - ment: - - ^ - top-left pane - - $ - bottom-right pane - - % - all panes - - . - current pane - - , - other pane - - :write - - :w[rite] - write vifminfo file. - - :wq - - :wq[!] same as :quit, but ! only disables check of backgrounded com- - mands. :wqall - - :wqa[ll][!] - same as :qall, but ! only disables check of backgrounded com- - mands. - - :xall - - :xa[ll][!] - same as :qall. - - :xit - - :x[it][!] - same as :quit. - - :yank - - :[range]y[ank] [reg] [count] - will yank files to the reg register. - - :map lhs rhs - - :map lhs rhs - map lhs key sequence to rhs in normal and visual modes. - - :map! lhs rhs - map lhs key sequence to rhs in command line mode. - - - :cmap :dmap :mmap :nmap :qmap - :vmap - - :cm[ap] lhs rhs - map lhs to rhs in command line mode. - - :dm[ap] lhs rhs - map lhs to rhs in dialog modes. - - :mm[ap] lhs rhs - map lhs to rhs in menu mode. - - :nm[ap] lhs rhs - map lhs to rhs in normal mode. - - :qm[ap] lhs rhs - map lhs to rhs in view mode. - - :vm[ap] lhs rhs - map lhs to rhs in visual mode. - - - :*map - - :cm[ap] - list all maps in command line mode. - - :dm[ap] - list all maps in dialog modes. - - :mm[ap] - list all maps in menu mode. - - :nm[ap] - list all maps in normal mode. - - :qm[ap] - list all maps in view mode. - - :vm[ap] - list all maps in visual mode. - - :*map beginning - - :cm[ap] beginning - list all maps in command line mode that start with the begin- - ning. - - :dm[ap] beginning - list all maps in dialog modes that start with the beginning. - - :mm[ap] beginning - list all maps in menu mode that start with the beginning. - - :nm[ap] beginning - list all maps in normal mode that start with the beginning. - - :qm[ap] beginning - list all maps in view mode that start with the beginning. - - :vm[ap] beginning - list all maps in visual mode that start with the beginning. - - :noremap - - :no[remap] lhs rhs - map the key sequence lhs to rhs for normal and visual modes, but - disallow mapping of rhs. - - :no[remap]! lhs rhs - map the key sequence lhs to rhs for command line mode, but dis- - allow mapping of rhs. - - :cnoremap :dnoremap :mnoremap :nnoremap :qnoremap - :vnoremap - - :cno[remap] lhs rhs - map the key sequence lhs to rhs for command line mode, but dis- - allow mapping of rhs. - - :dn[oremap] lhs rhs - map the key sequence lhs to rhs for dialog modes, but disallow - mapping of rhs. - - :mn[oremap] lhs rhs - map the key sequence lhs to rhs for menu mode, but disallow map- - ping of rhs. - - :nn[oremap] lhs rhs - map the key sequence lhs to rhs for normal mode, but disallow - mapping of rhs. - - :qn[oremap] lhs rhs - map the key sequence lhs to rhs for view mode, but disallow map- - ping of rhs. - - :vn[oremap] lhs rhs - map the key sequence lhs to rhs for visual mode, but disallow - mapping of rhs. - - :unmap - - :unm[ap] lhs - remove the mapping of lhs from normal and visual modes. - - :unm[ap]! lhs - remove the mapping of lhs from command line mode. - - :cunmap :dunmap :munmap :nunmap :qunmap - :vunmap - - :cu[nmap] lhs - remove the mapping of lhs from command line mode. - - :du[nmap] lhs - remove the mapping of lhs from dialog modes. - - :mu[nmap] lhs - remove the mapping of lhs from menu mode. - - :nun[map] lhs - remove the mapping of lhs from normal mode. - - :qun[map] lhs - remove the mapping of lhs from view mode. - - :vu[nmap] lhs - remove the mapping of lhs from visual mode. - -Ranges - The ranges implemented include: - 2,3 - from second to third file in the list (including it) - % - the entire directory. - . - the current position in the filelist. - $ - the end of the filelist. - 't - the mark position t. - - Examples: - - :%delete - - would delete all files in the directory. - - :2,4delete - - would delete the files in the list positions 2 through 4. - - :.,$delete - - would delete the files from the current position to the end of the - filelist. - - :3delete4 - - would delete the files in the list positions 3, 4, 5, 6. - - If a backward range is given :4,2delete - an query message is given and - user can chose what to do next. - - The builtin commands that accept a range are :d[elete] and :y[ank]. - -Command macros - The command macros may be used in user commands. - - %a User arguments. When user arguments contain macros, they are - expanded before preforming substitution of %a. - - %c %"c The current file under the cursor. - - %C %"C The current file under the cursor in the other directory. - - %f %"f All of the selected files. - - %F %"F All of the selected files in the other directory list. - - %b %"b Same as %f %F. - - %d %"d Full path to current directory. - - %D %"D Full path to other file list directory. - - %rx %"rx - Full paths to files in the register {x}. In case of invalid - symbol in place of {x}, it's processed with the rest of the line - and default register is used. - - %m Show command output in a menu. - - %M Same as %m, but l (or Enter) key is handled like for :locate and - :find commands. - - %u Process command output as list of paths and compose custom view - out of it. - - %U Same as %u, but implies less list updates inside vifm, which is - absence of sorting at the moment. - - %Iu same as %u, but gives up terminal before running external com- - mand. - - %IU same as %U, but gives up terminal before running external com- - mand. - - %S Show command output in the status bar. - - %q redirect command output to quick view, which is activated if - disabled. - - %s Execute command in split window of active terminal multiplexer - (ignored if not running inside one). - - %n Forbid using of terminal multiplexer to run the command. - - %i Completely ignore command output. - - - %pc Marks end of the main command and beginning of the clear command - for graphical preview, which is invoked on closing preview of a - file. - - The following dimensions and coordinates are in characters: - - %px x coordinate of top-left corner of preview area. - - %py y coordinate of top-left corner of preview area. - - %pw width of preview area. - - %ph height of preview area. - - - Use %% if you need to put a percent sign in your command. - - Note that %m, %M, %s, %S, %i, %u and %U macros are mutually exclusive. - Only the last one of them on the command will take effect. - - You can use file name modifiers after %c, %C, %f, %F, %b, %d and %D - macros. Supported modifiers are: - - - :p - full path - - - :u - UNC name of path (e.g. "\\server" in - "\\server\share"), Windows only. Expands to current computer name - for not UNC paths. - - - :~ - relative to the home directory - - - :. - relative to current directory - - - :h - head of the file name - - - :t - tail of the file name - - - :r - root of the file name (without last extension) - - - :e - extension of the file name (last one) - - - :s?pat?sub? - substitute the first occurrence of pat with sub. - You can use any character for '?', but it must not occur in pat or - sub. - - - :gs?pat?sub? - like :s, but substitutes all occurrences of pat with - sub. - - See ':h filename-modifiers' in Vim's documentation for the detailed - description. - - Using %x means expand corresponding macro escaping all characters that - have special meaning. And %"x means using of double quotes and escape - only backslash and double quote characters, which is more useful on - Windows systems. - - Position and quantity (if there is any) of %m, %M, %S or %s macros in - the command is unimportant. All their occurrences are removed from the - resulting command. - - %c and %f macros are expanded to file names only, when %C and %F are - expanded to full paths. %f and %F follow this in %b too. - - :com move mv %f %D - set the :move command to move all of the files selected in the - current directory to the other directory. - - The %a macro is replaced with any arguments given to an alias command. - All arguments are considered optional. - :com lsl !!ls -l %a - set the lsl command to execute ls -l with - or without an argument. - - :lsl - will list the directory contents of the current directory. - - :lsl filename - will list only the given filename. - - The macros can also be used in directly executing commands. ":!mv %f - %D" would move the current directory selected files to the other direc- - tory. - - Appending & to the end of a command causes it to be executed in the - background. Typically you want to run two kinds of external commands - in the background: - - - GUI applications that doesn't fork thus block vifm (:!sxiv %f &); - - - console tools that do not work with terminal (:!mv %f %D &). - - You don't want to run terminal commands, which require terminal input - or output something in background because they will mess up vifm's TUI. - Anyway, if you did run such a command, you can use Ctrl-L key to update - vifm's TUI. - - Rewriting the example command with macros given above with background- - ing: - - %m, %M, %s, %S, %u and %U macros cannot be combined with background - mark (" &") as it doesn't make much sense. - -Command backgrounding - Copy and move operation can take a lot of time to proceed. That's why - vifm supports backgrounding of this two operations. To run :copy, - :move or :delete command in the background just add " &" at the end of - a command. - - For each background operation a new thread is created. Currently job - cannot be stopped or paused. - - You can see if command is still running in the :jobs menu. Back- - grounded commands have progress instead of process id at the line - beginning. - - Background operations cannot be undone. - -Cancellation - Note that cancellation works somewhat different on Windows platform due - to different mechanism of break signal propagation. One also might - need to use Ctrl-Break shortcut instead of Ctrl-C. - - There are two types of operations that can be cancelled: - - - file system operations; - - - mounting with FUSE (but not unmounting as it can cause loss of - data); - - - calls of external applications. - - Note that vifm never terminates applications, it sends SIGINT signal - and lets the application quit normally. - - When one of set of operations is cancelled (e.g. copying of 5th file of - 10 files), further operations are cancelled too. In this case undo - history will contain only actually performed operations. - - Cancelled operations are indicated by "(cancelled)" suffix appended to - information message on statusbar. - - File system operations - - Currently the following commands can be cancelled: :alink, :chmod, - :chown, :clone, :copy, :delete, :mkdir, :move, :restore, :rlink, - :touch. File putting (on p/P key) can be cancelled as well. It's not - hard to see that these are mainly long-running operations. - - Cancelling commands when they are repeated for undo/redo operations is - allowed for convenience, but is not recommended as further undo/redo - operations might get blocked by side-effects of partially cancelled - group of operations. - - These commands can't be cancelled: :empty, :rename, :substitute, :tr. - - Mounting with FUSE - - It's not considered to be an error, so only notification on the status - bar is shown. - - External application calls - - Each of this operations can be cancelled: :apropos, :find, :grep, - :locate. - -Patterns - :highlight, :filetype, :filextype, :fileviewer commands and 'classify' - option support globs, regular expressions and mime types to match file - names or their paths. - - There are six possible ways to write a single pattern: - - 1. [!]{comma-separated-name-globs} - - 2. [!]{{comma-separated-path-globs}} - - 3. [!]/name-regular-expression/[iI] - - 4. [!]//path-regular-expression//[iI] - - 5. [!] - - 6. undecorated-pattern - - Flags of regular expressions mean the following: - - "i" makes filter case insensitive; - - "I" makes filter case sensitive. They can be repeated multiple - times, but the later one takes precedence (e.g. "iiiI" is equivalent - to "I" and "IiIi" is the same as "i"). - - To combine several patterns (AND them), make sure you're using one of - the first five forms and write patterns one after another, like this: - {*.vifm} - Mind that if you make a mistake the whole string will be treated as the - sixth form. - - :filetype, :filextype and :fileviewer commands accept comma-separated - list of patterns instead of a single pattern, thus effectively handling - OR operation on them: - {*.vifm},{*.pdf} - - Five first forms can include leading exclamation mark that negates pat- - tern matching. - - The last form is implicitly refers to one of others. :highlight does - not accept undecorated form, while :filetype, :filextype, :fileviewer, - :select, :unselect and 'classify' treat it as list of name globs. - - Regular expression patterns are case insensitive by default, see - description of commands, which might override default behaviour. - - "Globs" section below provides short overview of globs and some impor- - tant points that one needs to know about them. - - Mime type matching is essentially globs matching applied to mime type - of a file instead of its name/path. Note: mime types aren't detected - on Windows. - -Globs - Globs are always case insensitive as it makes sense in general case. - - *, ?, [ and ] are treated as special symbols in the pattern. E.g. - - :filetype * less %c - - matches all files. One can use character classes for escaping, so - - :filetype [*] less %c - - matches only one file name, the one which contains only asterisk sym- - bol. - - * means any number of any characters (possibly an empty substring), - with one exception: asterisk at the pattern beginning doesn't match dot - in the first position. E.g. - - :fileviewer *.zip,*.jar zip -sf %c - - associates using of zip program to preview all files with zip or jar - extensions as listing of their content. - - ? means any character at this position. E.g. - - :fileviewer ?.out file %c - - calls file tool for all files which has exactly one character before - their extension (e.g. a.out, b.out). - - Square brackets designate character class, which means that whole char- - acter class matches against any of characters listed in it. For exam- - ple - - :fileviewer *.[ch] highlight -O xterm256 -s dante --syntax c %c - - makes vifm call highlight program to colorize source and header files - in C language for a 256-color terminal. Equal command would be - - :fileviewer *.c,*.h highlight -O xterm256 -s dante --syntax c %c - - - Inside square brackets ^ or ! can be used for symbol class negotiation - and the - symbol to set a range. ^ and ! should appear right after the - opening square bracket. For example - - :filetype *.[!d]/ inspect_dir - - associates inspect_dir as additional handler for all directories that - have one character extension unless it's "d" letter. And - - :filetype [0-9].jpg sxiv - - associates sxiv picture viewer only for JPEG-files that contain single - digit in their name. - -:set options - Local options - These are kind of options that are local to a specific view. So - you can set ascending sorting order for left pane and descending - order for right pane. - - In addition to being local to views, each such option also has - two values: - - - local to current directory (value associated with current - location); - - - global to current directory (value associated with the - pane). - - The idea is that current directory can be made a temporary - exception to regular configuration of the view, until directory - change. Use :setlocal for that. :setglobal changes view value - not affecting settings until directory change. :set applies - changes immediately to all values. - - - 'aproposprg' - type: string - default: "apropos %a" - Specifies format for an external command to be invoked by the - :apropos command. The format supports expanding of macros, spe- - cific for a particular *prg option, and %% sequence for insert- - ing percent sign literally. This option should include the %a - macro to specify placement of arguments passed to the :apropos - command. If the macro is not used, it will be implicitly added - after a space to the value of this option. - - 'autochpos' - type: boolean - default: true - When disabled vifm will set cursor to the first line in the view - after :cd and :pushd commands instead of saved cursor position. - Disabling this will also make vifm clear information about cur- - sor position in the view history on :cd and :pushd commands (and - on startup if 'autochpos' is disabled in the vifmrc). l key in - the ":history ." and ":trashes" menus are treated like :cd com- - mand. This option also affects marks so that navigating to a - mark doesn't restore cursor position. - - When this option is enabled, more fine grained control over cur- - sor position is available via 'histcursor' option. - - 'columns' 'co' - type: integer - default: terminal width on startup - Terminal width in characters. - - 'caseoptions' - type: charset - default: "" - This option gives additional control over case sensitivity by - allowing overriding default behaviour to either always be case - sensitive or always be case insensitive. Possible values form - pairs of lower and upper case letters that configure specific - aspect of behaviour: - p - always ignore case of paths during completion. - P - always match case of paths during completion. - g - always ignore case of characters for f/F/;/,. - G - always match case of characters for f/F/;/,. - - At most one item of each pair takes affect, if both or more are - present, only the last one matters. When none of pair's ele- - ments are present, the behaviour is default (depends on operat- - ing system for path completion and on values of 'ignorecase' and - 'smartcase' options for file navigation). - - 'cdpath' 'cd' - type: string list - default: value of $CDPATH with commas instead of colons - Specifies locations to check on changing directory with relative - path that doesn't start with "./" or "../". When non-empty, - current directory is examined after directories listed in the - option. - - This option doesn't affect completion of :cd command. - - Example: - - set cdpath=~ - - This way ":cd bin" will switch to "~/bin" even if directory - named "bin" exists in current directory, while ":cd ./bin" com- - mand will ignore value of 'cdpath'. - - 'chaselinks' - type: boolean - default: false - When enabled path of view is always resolved to real path (with - all symbolic links expanded). - - 'classify' - type: string list - default: ":dir:/" - Specifies file name prefixes and suffixes depending on file type - or name. The format is either of: - - [{prefix}]:{filetype}:[{suffix}] - - [{prefix}]::{pattern}::[{suffix}] - Possible {pattern} forms are described in "Patterns" section - above. - - Priority rules: - - file name patterns have priority over type patterns - - file name patterns are matched in left-to-right order of - their appearance in this option - - Either {prefix} or {suffix} or both can be omitted (which is the - default for all unspecified file types), this means empty {pre- - fix} and/or {suffix}. {prefix} and {suffix} should consist of - at most eight characters. Elements are separated by commas. - Neither prefixes nor suffixes are part of file names, so they - don't affect commands which operate on file names in any way. - Comma (',') character can be inserted by doubling it. List of - file type names can be found in the description of filetype() - function. - - 'confirm' 'cf' - type: set - default: delete,permdelete - Defines which operations require confirmation: - - delete - moving files to trash (on d or :delete); - - permdelete - permanent deletion of files (on D or :delete! - command or on undo/redo operation). - - 'cpoptions' 'cpo' - type: charset - default: "fst" - Contains a sequence of single-character flags. Each flag - enables behaviour of older versions of vifm. Flags: - - f - when included, running :filter command results in not - inverted (matching files are filtered out) and :filter! in - inverted (matching files are left) filter, when omitted, meaning - of the exclamation mark changes to the opposite; - - s - when included, yy, dd and DD normal mode commands act on - selection, otherwise they operate on current file only; - - t - when included, (thus ) behave as and - switches active pane, otherwise and go forward in - the view history. It's possible to make both and to - work as expected by setting up the terminal to emit a custom - sequence when is pressed; see :histnext for details. - - 'cvoptions' - type: set - default: - Specifies whether entering/leaving custom views triggers events - that normally happen on entering/leaving directories: - - autocmds - trigger autocommands on entering/leaving custom - views; - - localopts - reset local options on entering/leaving custom - views; - - localfilter - reset local filter on entering/leaving custom - views. - - 'deleteprg' - type: string - default: "" - Specifies program to run on files that are permanently removed. - When empty, files are removed as usual, otherwise this command - is invoked on each file by appending its name. If the command - doesn't remove files, they will remain on the file system. - - 'dirsize' - type: enumeration - default: size - Controls how size of directories is displayed in file views. - The following values are possible: - - size - size of directory (i.e., size used to store list of - files) - - nitems - number of entries in the directory (excluding . and - ..) - - Size obtained via ga/gA overwrites this setting so seeing count - of files and occasionally size of directories is possible. - - 'dotdirs' - type: set - default: nonrootparent - Controls displaying of dot directories. The following values - are possible: - - rootparent - show "../" in root directory of file system - - nonrootparent - show "../" in non-root directories of file - system - - Note that empty directories always contain "../" entry regard- - less of value of this option. "../" disappears at the moment at - least one file is created. - - 'dotfiles' - type: boolean - default: false - Whether dot files are shown in the view. Can be controlled with - z* bindings. - - 'fastrun' - type: boolean - default: false - With this option turned on you can run partially entered com- - mands with unambiguous beginning using :! (e.g. :!Te instead of - :!Terminal or :!Te). - - 'fillchars' 'fcs' - type: string list - default: "" - Sets characters used to fill borders. - - item default used for - vborder:c ' ' left, middle and right vertical bor- - ders - - If value is omitted, its default value is used. Example: - - set fillchars=vborder:. - - 'findprg' - type: string - default: "find %s %a -print , -type d \( ! -readable -o ! -exe- - cutable \) -prune" - Specifies format for an external command to be invoked by the - :find command. The format supports expanding of macros, spe- - cific for a particular *prg option, and %% sequence for insert- - ing percent sign literally. This option should include the %s - macro to specify placement of list of paths to search in and %a - or %A macro to specify placement of arguments passed to the - :find command. If some of the macros are not used, they will be - implicitly added after a space to the value of the option in the - following order: %s, %a. Note that when neither %a nor %A are - specified, it's %a which is added implicitly. - - The macros can slightly change their meaning depending on :find - command arguments. When the first argument points to an exist- - ing directory, %s is assigned all arguments and %a/%A are left - empty. Otherwise, %s is assigned a dot (".") meaning current - directory or list of selected file names, if any. %a/%A are - assigned arguments when first argument starts with a dash ("-"), - otherwise %a gets an escaped version of arguments, prepended by - "-name" (on *nix) or "-iname" (on Windows) predicate. - - %a and %A macros contain almost the same value, the difference - is that %a can be escaped and %A is never escaped. %A is to be - used mainly on Windows, where shell escaping is a mess and can - break command execution. - - Optional %u or %U macro could be used (if both specified %U is - chosen) to force redirection to custom or unsorted custom view - respectively. - - Starting from Windows Server 2003 a where command is available, - one can configure vifm to use it in the following way: - - set findprg="where /R %s %A" - - As the syntax of this command is rather limited, one can't use - :find command with selection of more than one item in this case. - The command looks for files only completely ignoring directo- - ries. - - When using find port on Windows, another option is to setup - 'findprg' like this: - - set findprg="find %s %a" - - 'followlinks' - type: boolean - default: true - Follow links on l or Enter. That is navigate to destination - file instead of treating the link as if it were target file. - Doesn't affects links to directories, which are always entered - (use gf key for directories). - - 'fusehome' - type: string - default: "($XDG_DATA_HOME/.local/share | $VIFM)/fuse/" - Directory to be used as a root dir for FUSE mounts. Value of - the option can contain environment variables (in form - "$envname"), which will be expanded (prepend it with a slash to - prevent expansion). The value should expand to an absolute - path. - - If you change this option, vifm won't remount anything. It - affects future mounts only. See "Automatic FUSE mounts" section - below for more information. - - 'gdefault' 'gd' - type: boolean - default: false - When on, 'g' flag is on for :substitute by default. - - 'grepprg' - type: string - default: "grep -n -H -I -r %i %a %s" - Specifies format for an external command to be invoked by the - :grep command. The format supports expanding of macros, spe- - cific for a particular *prg option, and %% sequence for insert- - ing percent sign literally. This option should include the %i - macro to specify placement of "-v" string when inversion of - results is requested, %a or %A macro to specify placement of - arguments passed to the :grep command and the %s macro to spec- - ify placement of list of files to search in. If some of the - macros are not used, they will be implicitly added after a space - to the value of the 'grepprg' option in the following order: %i, - %a, %s. Note that when neither %a nor %A are specified, it's %a - which is added implicitly. - - Optional %u or %U macro could be used (if both specified %U is - chosen) to force redirection to custom or unsorted custom view - respectively. - - See 'findprg' option for description of difference between %a - and %A. - - Example of setup to use ack (http://beyondgrep.com/) instead of - grep: - - set grepprg='ack -H -r %i %a %s' - - or The Silver Searcher (https://github.com/ggreer/the_sil- - ver_searcher): - - set grepprg='ag --line-numbers %i %a %s' - - - - 'histcursor' - type: set - default: startup,dirmark,direnter - Defines situations when cursor should be moved according to - directory history: - - startup - on loading file lists during startup - - dirmark - after navigating to a mark that doesn't specify - file - - direnter - on opening directory from a file list - - This option has no effect when 'autochpos' is disabled. - - Note that the list is not exhaustive and there are other situa- - tions when cursor is positioned automatically. - - 'history' 'hi' - type: integer - default: 15 - Maximum number of stored items in all histories. - - 'hlsearch' 'hls' - type: boolean - default: true - Highlight all matches of search pattern. - - 'iec' type: boolean - default: false - Use KiB, MiB, ... suffixes instead of K, M, ... when printing - size in human-friendly format. - - 'ignorecase' 'ic' - type: boolean - default: false - Ignore case in search patterns (:substitute, / and ? commands) - and characters after f and F commands. It doesn't affect file - filtering. - - 'incsearch' 'is' - type: boolean - default: false - When this option is set, search and view update for local filter - is be performed starting from initial cursor position each time - search pattern is changed. - - 'iooptions' - type: set - default: - Controls details of file operations. The following values are - available: - - fastfilecloning - perform fast file cloning (copy-on-write), - when available - (available on Linux and btrfs file system). - - 'laststatus' 'ls' - type: boolean - default: true - Controls if status bar is visible. - - 'lines' - type: integer - default: terminal height on startup - Terminal height in lines. - - 'locateprg' - type: string - default: "locate %a" - Specifies format for an external command to be invoked by the - :locate command. The format supports expanding of macros, spe- - cific for a particular *prg option, and %% sequence for insert- - ing percent sign literally. This option should include the %a - macro to specify placement of arguments passed to the :locate - command. If the macro is not used, it will be implicitly added - after a space to the value of this option. - - Optional %u or %U macro could be used (if both specified %U is - chosen) to force redirection to custom or unsorted custom view - respectively. - - 'mediaprg' - type: string - default: path to bundled script that supports udevil and udisks - {only for *nix} - Specifies command to be used to manage media devices. Used by - :media command. - - The command can be passed the following parameters: - - list -- list media - - mount {device} -- mount a device - - unmount {path} -- unmount given mount point - - The output of `list` subcommand is parsed in search of lines - that start with one of the following prefixes: - - device= - specifies device path (e.g., "/dev/sde") - - label= - specifies optional device label (e.g., "Memory - card") - - mount-point= - specifies a mount point (can be absent or - appear more than once) - - All other lines are ignored. Each `device=` starts a new sec- - tion describing a device which should include two other possible - prefixes. - - `list` subcommand is assumed to always succeed, while error - stream and exit code of `mount` and `unmount` is taken into - account to determine whether operation was performed success- - fully. - - 'lsoptions' - type: string list - default: "" - scope: local - - Configures ls-like view. - - item used for - transposed filling view grid by columns rather than by - lines - - - 'lsview' - type: boolean - default: false - scope: local - When this option is set, directory view will be displayed in - multiple columns with file names similar to output of `ls -x` - command. See "ls-like view" section below for format descrip- - tion. This option has no effect if 'millerview' is on. - - 'milleroptions' - type: string list - default: "lsize:1,csize:1,rsize:1" - scope: local - - Configures miller view. - - item default used for - lsize:num 0 left column - csize:num 1 center column (can't be disabled) - rsize:num 0 right column - - *size specifies ratios of columns. Each ratio is in the range - from 0 to 100 and values are adjusted to fit the limits. Zero - disables a column, but central (main) column can't be disabled. - - Example of two-column mode which is useful in combination with - :view command: - - set milleroptions=lsize:1,csize:2 - - - 'millerview' - type: boolean - default: false - scope: local - When this option is set, directory view will be displayed in - multiple cascading columns. Ignores 'lsview'. - - 'mintimeoutlen' - type: integer - default: 150 - The fracture of 'timeoutlen' in milliseconds that is waited - between subsequent input polls, which affects various asynchro- - nous operations (detecting changes made by external applica- - tions, monitoring background jobs, redrawing UI). There are no - strict guarantees, however the higher this value is, the less is - CPU load in idle mode. - - 'number' 'nu' - type: boolean - default: false - scope: local - Print line number in front of each file name when 'lsview' - option is turned off. Use 'numberwidth' to control width of - line number. Also see 'relativenumber'. - - 'numberwidth' 'nuw' - type: integer - default: 4 - scope: local - Minimal number of characters for line number field. - - 'previewprg' - type: string - default: "" - scope: local - - External command to be used instead of preview programs config- - ured via :fileviewer command. - - Example: - - " always show git log in preview of files inside some repository - au DirEnter '~/git-repo/**/*' setl previewprg='git log --color -- %c 2>&1' - - 'quickview' - type: boolean - default: false - Whether quick view (:view) is currently active or not. - - 'relativenumber' 'rnu' - type: boolean - default: false - scope: local - Print relative line number in front of each file name when - 'lsview' option is turned off. Use 'numberwidth' to control - width of line number. Various combinations of 'number' and - 'relativenumber' lead to such results: - - nonumber number - - norelativenumber | first | 1 first - | second | 2 second - | third | 3 third - - relativenumber | 1 first | 1 first - | 0 second |2 second - | 1 third | 1 third - - - 'rulerformat' 'ruf' - type: string - default: "%l/%S " - Determines the content of the ruler. Its minimal width is 13 - characters and it's right aligned. Following macros are sup- - ported: - %= - separation point between left and right aligned halves of - the line - %l - file number - %L - total number of files in view (including filtered out - ones) - %x - number of files excluded by filters - %0- - old name for %x macro - %S - number of displayed files - %= - separation point between left and right align items - %% - percent sign - %[ - designates beginning of an optional block - %] - designates end of an optional block - - Percent sign can be followed by optional minimum field width. - Add '-' before minimum field width if you want field to be right - aligned. - - Example: - - set rulerformat='%2l-%S%[ +%x%]' - - 'runexec' - type: boolean - default: false - Run executable file on Enter or l. - - 'scrollbind' 'scb' - type: boolean - default: false - When this option is set, vifm will try to keep difference of - scrolling positions of two windows constant. - - 'scrolloff' 'so' - type: integer - default: 0 - Minimal number of screen lines to keep above and below the cur- - sor. If you want cursor line to always be in the middle of the - view (except at the beginning or end of the file list), set this - option to some large value (e.g. 999). - - 'shell' 'sh' - type: string - default: $SHELL or "/bin/sh" or "cmd" (on MS-Windows) - Full path to the shell to use to run external commands. On *nix - a shell argument can be supplied. - - 'shortmess' 'shm' - type: charset - default: "p" - Contains a sequence of single-character flags. Each flag - enables shortening of some message displayed by vifm in the TUI. - Flags: - - M - shorten titles in windows of terminal multiplexers cre- - ated by vifm down to file name instead of using full path. - - T - truncate status-bar messages in the middle if they are - too long to fit on the command line. "..." will appear in the - middle. - - p - use tilde shortening in view titles. - - - 'showtabline' 'stal' - type: enumeration - default: multiple - Specifies when tab line should be displayed. Possible values: - - never - never display tab line - - multiple - show tab line only when there are at least two - tabs - - always - display tab line always - - Alternatively 0, 1 and 2 Vim-like values are also accepted and - correspond to "never", "multiple" and "always" respectively. - - - 'sizefmt' - type: string list - default: "units:iec" - Configures the way size is formatted in human-friendly way. - - item value meaning - units: iec Use 1024 byte units (K or KiB, - etc.). - See 'iec' option. - si Use 1000 byte units (KB, etc.). - precision: i > 0 How many fraction digits to con- - sider. - {not set} Precision of 1 for integer part - < 10, - 0 otherwise (provides old behav- - iour). - - Numbers are rounded from zero. Trailing zeros are dropped. - - Example: - - set sizefmt=units:iec,precision:2 - - - 'slowfs' - type: string list - default: "" - only for *nix - A list of mounter fs name beginnings (first column in /etc/mtab - or /proc/mounts) or paths prefixes for fs/directories that work - too slow for you. This option can be used to stop vifm from - making some requests to particular kinds of file systems that - can slow down file browsing. Currently this means don't check - if directory has changed, skip check if target of symbolic links - exists, assume that link target located on slow fs to be a - directory (allows entering directories and navigating to files - via gf). If you set the option to "*", it means all the systems - are considered slow (useful for cygwin, where all the checks - might render vifm very slow if there are network mounts). - - Example for autofs root /mnt/autofs: - - set slowfs+=/mnt/autofs - - 'smartcase' 'scs' - type: boolean - default: false - Overrides the ignorecase option if the search pattern contains - at least one upper case character. Only used when ignorecase - option is enabled. It doesn't affect file filtering. - - 'sort' type: string list - default: +name on *nix and +iname on Windows - scope: local - Sets list of sorting keys (first item is primary key, second is - secondary key, etc.): - [+-]ext - extension of files and directories - [+-]fileext - extension of files only - [+-]name - name (including extension) - [+-]iname - name (including extension, ignores case) - [+-]type - file type - (dir/reg/exe/link/char/block/sock/fifo) - [+-]dir - directory grouping (directory < file) - [+-]gid - group id (*nix only) - [+-]gname - group name (*nix only) - [+-]mode - file type derived from its mode (*nix only) - [+-]perms - permissions string (*nix only) - [+-]uid - owner id (*nix only) - [+-]uname - owner name (*nix only) - [+-]nlinks - number of hard links (*nix only) - [+-]inode - inode number (*nix only) - [+-]size - size - [+-]nitems - number of items in a directory (zero for files) - [+-]groups - groups extracted via regexps from 'sortgroups' - [+-]target - symbolic link target (empty for other file - types) - [+-]atime - time accessed (e.g. read, executed) - [+-]ctime - time changed (changes in metadata, e.g. mode) - [+-]mtime - time modified (when file contents is changed) - - Note: look for st_atime, st_ctime and st_mtime in "man 2 stat" - for more information on time keys. - - '+' means ascending sort for this key, and '-' means descending - sort. - - "dir" key is somewhat similar in this regard but it's added - implicitly: when "dir" is not specified, sorting behaves as if - it was the first key in the list. That's why if one wants sort- - ing algorithm to mix directories and files, "dir" should be - appended to sorting option, for example like this: - - set sort+=dir - - or - - set sort=-size,dir - - Value of the option is checked to include dir key and default - sorting key (name on *nix, iname on Windows). Here is what hap- - pens if one of them is missing: - - - type key is added at the beginning; - - - default key is added at the end; - - all other keys are left untouched (at most they are moved). - - This option also changes view columns according to primary sort- - ing key set, unless 'viewcolumns' option is not empty. - - 'sortnumbers' - type: boolean - default: false - scope: local - Natural sort of (version) numbers within text. - - 'sortgroups' - type: string - default: "" - scope: local - Sets comma-separated list of regular expressions to use for - group sorting, double comma is literal comma. Each expression - should contain at least one group or its value will be consid- - ered to be always empty. Only first match of each regular - expression is considered. Groups are considered from right to - first similar to 'sort', first group divides list of files into - sub-groups, each of which is sorted by the second group and so - on. - - Example: - set sortgroups=-(done|todo).* - this would put files with "-done" in their names above all files - with "-todo". - - 'sortorder' - type: enumeration - default: ascending - Sets sort order for primary key: ascending, descending. - - 'statusline' 'stl' - type: string - default: "" - Determines the content of the status line (the line right above - command-line). Empty string means use same format like in pre- - vious versions. Following macros are supported: - - - %t - file name (considering value of the 'classify' option) - - - %T - symbolic link target (empty for other filetypes) - - - %f - file name relative to current directory (considers 'clas- - sify') - - - %A - file attributes (permissions on *nix or properties on - Windows) %u - user name or uid (if it cannot be resolved) - - - %g - group name or gid (if it cannot be resolved) - - - %s - file size in human readable format - - - %E - size of selected files in human readable format, same as - %s when no files are selected, except that it will never show - size of ../ in visual mode, since it cannot be selected - - - %d - file modification date (uses 'timefmt' option) - - - %D - path of the other pane for single-pane layout - - - %a - amount of free space available at current partition - - - %z - short tips/tricks/hints that chosen randomly after one - minute period - - - %{} - evaluate arbitrary vifm expression '', e.g. - '&sort' - - - %* - resets or applies one of User1..User9 highlight groups; - reset happens when width field is 0 or not specified, one of - groups gets picked when width field is in the range from 1 to - 9 - - - all 'rulerformat' macros - - Percent sign can be followed by optional minimum field width. - Add '-' before minimum field width if you want field to be right - aligned. - - On Windows file properties include the following flags (upper - case means flag is on): - A - archive - H - hidden - I - content isn't indexed - R - readonly - S - system - C - compressed - D - directory - E - encrypted - P - reparse point (e.g. symbolic link) - Z - sparse file - - Example without colors: - - set statusline=" %t%= %A %10u:%-7g %15s %20d %{&sort} " - - Example with colors: - - highlight User1 ctermbg=yellow - highlight User2 ctermbg=blue ctermfg=white cterm=bold - set statusline="%1* %-26t %2* %= %1* %A %2* %7u:%-7g %1* %-5s %2* %d " - - - 'suggestoptions' - type: string list - default: - Controls when, for what and how suggestions are displayed. The - following values are available: - - normal - in normal mode; - - visual - in visual mode; - - view - in view mode; - - otherpane - use other pane to display suggestions, when - available; - - delay[:num] - display suggestions after a small delay (to - do not annoy if you just want to type a fast shortcut consisting - of multiple keys), num specifies the delay in ms (500 by - default), 'timeoutlen' at most; - - keys - include shortcuts (commands and selectors); - - foldsubkeys - fold multiple keys with common prefix; - - marks - include marks; - - registers[:num] - include registers, at most num files (5 by - default). - - 'syncregs' - type: string - default: - Specifies identifier of group of instances that share registers - between each other. When several instances of vifm have this - option set to identical value, they automatically synchronize - contents of their registers on operations which use them. - - 'syscalls' - type: boolean - default: false - When disabled, vifm will rely on external applications to per- - form file-system operations, otherwise system calls are used - instead (much faster and supports progress tracking). The - option should eventually be removed. Mostly *nix-like systems - are affected. - - 'tabscope' - type: enumeration - default: global - Picks style of tabs, which defines what a single tab contains. - Possible values: - - global - tab describes complete UI of two views and how they - are arranged - - pane - tab is located "inside" a pane and manages it and - quick view - - 'tabstop' 'ts' - type: integer - default: value from curses library - Number of spaces that a Tab in the file counts for. - - 'timefmt' - type: string - default: "%m/%d %H:%M" - Format of time in file list. See "man 1 date" or "man 3 strf- - time" for details. - - 'timeoutlen' 'tm' - type: integer - default: 1000 - The time in milliseconds that is waited for a mapped key in case - of already typed key sequence is ambiguous. - - 'title' - type: boolean - default: true when title can be restored, false otherwise - When enabled title of the terminal or terminal multiplexer's - window is updated according to current location. - - 'trash' - type: boolean - default: true - Use trash directory. See "Trash directory" section below. - - 'trashdir' - type: string - default: on *nix: - "%r/.vifm-Trash-%u,$VIFM/Trash,%r/.vifm-Trash" - or if $VIFM/Trash doesn't exist - "%r/.vifm-Trash-%u,$XDG_DATA_HOME/vifm/Trash,%r/.vifm-Trash" - on Windows: - "%r/.vifm-Trash,$XDG_DATA_HOME/vifm/Trash" - List of trash directory path specifications, separated with com- - mas. Each list item either defines an absolute path to trash - directory or a path relative to a mount point root when list - element starts with "%r/". Value of the option can contain - environment variables (of form "$envname"), which will be - expanded (prepend $ with a slash to prevent expansion). Envi- - ronment variables are expanded when the option is set. - - On *nix, if element ends with "%u", the mark is replaced with - real user ID and permissions are set so that only that only - owner is able to use it. - Note that even this setup is not completely secure when combined - with "%r/" and it's overall safer to keep files in home direc- - tory, but that implies cost of copying files between partitions. - - When new file gets cut (deleted) vifm traverses each element of - the option in the order of their appearance and uses first trash - directory that it was able to create or that is already - writable. - - Default value tries to use trash directory per mount point and - falls back to ~/.vifm/Trash on failure. - - Will attempt to create the directory if it does not exist. See - "Trash directory" section below. - - 'tuioptions' 'to' - type: charset - default: "ps" - Each flag configures some aspect of TUI appearance. The flags - are: - p - when included: - * file list inside a pane gets additional single character - padding on left and right sides; - * quick view and view mode get single character padding. - s - when included, left and right borders (side borders, hence - "s" character) are visible. - u - use Unicode characters in the TUI (Unicode ellipsis instead - of "..."). - - 'undolevels' 'ul' - type: integer - default: 100 - Maximum number of changes that can be undone. Note that here - single file operation is used as a unit, not operation, i.e. - deletion of 101 files will exceed default limit. - - 'vicmd' - type: string - default: "vim" - The actual command used to start vi. Ampersand sign at the end - (regardless whether it's preceded by space or not) means back- - grounding of command. - - Background flag is ignored in certain context where vifm waits - for the editor to finish. Such contexts include any command - that spawns editor to change list of file names or a command, - with :rename being one example. `-f` is also appended to pre- - vent forking in such cases, so the command needs to handle the - flag. - - Additionally `+{num}` and `+'call cursor()'` arguments are used - to position cursor when location is known. - - 'viewcolumns' - type: string - default: "" - scope: local - Format string containing list of columns in the view. When this - option is empty, view columns to show are chosen automatically - using sorting keys (see 'sort') as a base. Value of this option - is ignored if 'lsview' is set. See "Column view" section below - for format description. - - An example of setting the options for both panes (note :windo - command): - - windo set viewcolumns=-{name}..,6{size},11{perms} - - 'vixcmd' - type: string - default: value of 'vicmd' - Same as 'vicmd', but takes precedence over it when running in X. - - 'vifminfo' - type: set - default: bookmarks,bmarks - Controls what will be saved in the $VIFM/vifminfo file. - - bmarks - named bookmarks - bookmarks - marks, except special ones like '< and '> - tui - state of the user interface (sorting, number of - windows, quick - view state, active view) - dhistory - directory history - state - file name and dot filters and terminal multiplex- - ers integration - state - cs - primary color scheme - savedirs - save last visited directory (requires dhistory) - chistory - command line history - shistory - search history (/ and ? commands) - phistory - prompt history - fhistory - history of local filter (see description of the - "=" normal mode - command) - dirstack - directory stack overwrites previous stack, unless - stack of - current session is empty - registers - registers content - options - all options that can be set with the :set command - (obsolete) - filetypes - associated programs and viewers (obsolete) - commands - user defined commands (see :command description) - (obsolete) - - 'vimhelp' - type: boolean - default: false - Use vim help format. - - 'wildmenu' 'wmnu' - type: boolean - default: false - Controls whether possible matches of completion will be shown - above the command line. - - 'wildstyle' - type: enumeration - default: bar - Picks presentation style of wild menu. Possible values: - - bar - one-line with left-to-right cursor - - popup - multi-line with top-to-bottom cursor - - 'wordchars' - type: string list - default: "1-8,14-31,33-255" (that is all non-whitespace charac- - ters) - Specifies which characters in command-line mode should be con- - sidered as part of a word. Value of the option is comma-sepa- - rated list of ranges. If both endpoints of a range match, sin- - gle endpoint is enough (e.g. "a" = "a-a"). Both endpoints are - inclusive. There are two accepted forms: character representing - itself or number encoding character according to ASCII table. - In case of ambiguous characters (dash, comma, digit) use numeric - form. Accepted characters are in the range from 0 to 255. Any - Unicode character with code greater than 255 is considered to be - part of a word. - - The option affects Alt-D, Alt-B and Alt-F, but not Ctrl-W. This - is intentionally to allow two use cases: - - - Moving by WORDS and deletion by words. - - Moving by words and deletion by WORDS. - - To get the latter use the following mapping: - - cnoremap - - Also used for abbreviations. - - 'wrap' type: boolean - default: true - Controls whether to wrap text in quick view. - - 'wrapscan' 'ws' - type: boolean - default: true - Searches wrap around end of the list. - -Mappings - Map arguments - - LHS of mappings can be preceded by arguments which take the form of - special sequences: - - - Postpone UI updates until RHS is completely processed. - - In case of builtin mapping causing conflict for a user-defined - mapping (e.g., `t` builtin to a partially typed `ta` user- - defined mapping), ignore the builtin mapping and wait for input - indefinitely as opposed to default behaviour of triggering the - builtin mapping after a delay defined by 'timeoutlen'. Example: - - nnoremap tw :set wrap! - nnoremap tn :set number! - nnoremap tr :set relativenumber! - - Special sequences - - Since it's not easy to enter special characters there are several spe- - cial sequences that can be used in place of them. They are: - - Enter key. - - Escape key. - - - Space key. - - Less-than character (<). - - provides a way to disable a mapping (by mapping it to ). - - Backspace key (see key conflict description below). - - - Tabulation and Shift+Tabulation keys. - - - Home/End. - - - Arrow keys. - - - PageUp/PageDown. - - - Delete key. and mean different codes, but - is more common. - - - Insert key. - - ,,...,,,,,, - Control + some key (see key conflict description below). - - only for *nix - Control + Space. - - ,,..., - ,,..., Alt + some key. - - ,,..., - ,,..., only for *nix - Alt + Ctrl + some key. - - - - Functional keys. - - - - only for MS-Windows - functional keys with Control key pressed. - - - - only for MS-Windows - functional keys with Alt key pressed. - - - - only for MS-Windows - functional keys with Shift key pressed. - - Note that due to the way terminals process their input, several key- - board keys might be mapped to single key code, for example: - - - and ; - - - and ; - - - and ; - - - etc. - - Most of the time they are defined consistently and don't cause sur- - prises, but and are treated differently in different envi- - ronments (although they match each other all the time), that's why they - correspond to different keys in vifm. As a consequence, if you map or be sure to repeat the mapping with the other one so that it - works in all environments. Alternatively, provide your mapping in one - form and add one of the following: - - " if mappings with in the LHS work - map - " if mappings with in the LHS work - map - - Whitespace - - vifm removes whitespace characters at the beginning and end of com- - mands. That's why you may want to use at the end of rhs in - mappings. For example: - - cmap man - - will put "man " in line when you hit the key in the command line - mode. - -Expression syntax - Supported expressions is a subset of what VimL provides. - - Expression syntax summary, from least to most significant: - - expr1 expr2 - expr2 || expr2 .. logical OR - - expr2 expr3 - expr3 && expr3 .. logical AND - - expr3 expr4 - expr4 == expr4 equal - expr4 != expr4 not equal - expr4 > expr4 greater than - expr4 >= expr4 greater than or equal - expr4 < expr4 smaller than - expr4 <= expr4 smaller than or equal - - expr4 expr5 - expr5 + expr5 .. number addition - expr5 - expr5 .. number subtraction - - expr5 expr6 - expr6 . expr6 .. string concatenation - - expr6 expr7 - - expr6 unary minus - + expr6 unary plus - ! expr6 logical NOT - - expr7 number number constant - "string" string constant, \ is special - 'string' string constant, ' is doubled - &option option value - $VAR environment variable - v:var builtin variable - function(expr1, ...) function call - (expr1) nested expression - - ".." indicates that the operations in this level can be concatenated. - - expr1 - ----- - expr2 || expr2 - - Arguments are converted to numbers before evaluation. - - Result is non-zero if at least one of arguments is non-zero. - - It's right associative and with short-circuiting, so sub-expressions - are evaluated from left to right until result of whole expression is - determined (i.e., until first non-zero) or end of the expression. - - expr2 - ----- - expr3 && expr3 - - Arguments are converted to numbers before evaluation. - - Result is non-zero only if both arguments are non-zero. - - It's right associative and with short-circuiting, so sub-expressions - are evaluated from left to right until result of whole expression is - determined (i.e., until first zero) or end of the expression. - - expr3 - ----- - expr4 {cmp} expr4 - - Compare two expr4 expressions, resulting in a 0 if it evaluates to - false or 1 if it evaluates to true. - - equal == - not equal != - greater than > - greater than or equal >= - smaller than < - smaller than or equal <= - - Examples: - - 'a' == 'a' == 1 - 'a' > 'b' == 1 - 'a' == 'b' == 0 - '2' > 'b' == 0 - 2 > 'b' == 1 - 2 > '1b' == 1 - 2 > '9b' == 0 - -1 == -'1' == 1 - 0 == '--1' == 1 - - expr4 - ----- - expr5 + expr5 .. number addition expr5 - expr5 .. number sub- - traction - - Examples: - - 1 + 3 - 3 == 1 - 1 + '2' == 3 - - expr5 - ----- - expr6 . expr6 .. string concatenation - - Examples: - - 'a' . 'b' == 'ab' - 'aaa' . '' . 'c' == 'aaac' - - expr6 - ----- - - - expr6 unary minus - + expr6 unary plus - ! expr6 logical NOT - - For '-' the sign of the number is changed. - For '+' the number is unchanged. - For '!' non-zero becomes zero, zero becomes one. - - A String will be converted to a Number first. - - These operations can be repeated and mixed. Examples: - - --9 == 9 - ---9 == -9 - -+9 == 9 - !-9 == 0 - !'' == 1 - !'x' == 0 - !!9 == 1 - - expr7 - ----- - - number number constant - ----- - - Decimal number. Examples: - - 0 == 0 - 0000 == 0 - 01 == 1 - 123 == 123 - 10000 == 10000 - - string - ------ - "string" string constant - - Note that double quotes are used. - - A string constant accepts these special characters: - \b backspace - \e escape - \n newline - \r return - \t tab - \\ backslash - \" double quote - - Examples: - - "\"Hello,\tWorld!\"" - "Hi,\nthere!" - - literal-string - -------------- - 'string' string constant - - Note that single quotes are used. - - This string is taken as it is. No backslashes are removed or have a - special meaning. The only exception is that two quotes stand for one - quote. - - Examples: - - 'All\slashes\are\saved.' - 'This string contains doubled single quotes ''here''' - - option - ------ - &option option value (local one is preferred, if exists) - &g:option global option value &l:option local - option value - - Examples: - - echo 'Terminal size: '.&columns.'x'.&lines - if &columns > 100 - - Any valid option name can be used here (note that "all" in ":set all" - is a pseudo option). See ":set options" section above. - - environment variable - -------------------- - $VAR environment variable - - The String value of any environment variable. When it is not defined, - the result is an empty string. - - Examples: - - 'This is my $PATH env: ' . $PATH - 'vifmrc at ' . $MYVIFMRC . ' is used.' - - builtin variable - -------------------- - v:var builtin variable - - Information exposed by vifm for use in scripting. - - v:count - count passed to : command, 0 by default. Can be used in mappings to - pass - count to a different command. - v:count1 - same as v:count, but 1 by default. - v:servername - See below. - - function call - ------------- - function(expr1, ...) function call - - See "Functions" section below. - - Examples: - - "'" . filetype('.') . "'" - filetype('.') == 'reg' - - expression nesting - ------------------ - (expr1) nested expression - - Groups any other expression of arbitrary complexity enforcing order in - which operators are applied. - - -Functions - USAGE RESULT DESCRIPTION - - chooseopt({opt}) String Queries choose parameters passed on - startup. - executable({expr}) Integer Checks whether {expr} command avail- - able. - expand({expr}) String Expands special keywords in {expr}. - filetype({fnum} [, {resolve}]) - String Returns file type from position. - fnameescape({expr}) String Escapes {expr} for use in a :command. - getpanetype() String Returns type of current pane. - has({property}) Integer Checks whether instance has {prop- - erty}. - layoutis({type}) Integer Checks whether layout is of type - {type}. - paneisat({loc}) Integer Checks whether current pane is at - {loc}. - system({command}) String Executes shell command and returns - its output. - tabpagenr([{arg}]) Integer Returns number of current or last - tab. - term({command}) String Like system(), but for interactive - commands. - - chooseopt({opt}) - - Retrieves values of options related to file choosing. {opt} can be one - of: - files returns argument of --choose-files or empty string - dir returns argument of --choose-dir or empty string - cmd returns argument of --on-choose or empty string - delimiter returns argument of --delimiter or the default one (\n) - - executable({expr}) - - If {expr} is absolute or relative path, checks whether path destination - exists and refers to an executable, otherwise checks whether command - named {expr} is present in directories listed in $PATH. Checks for - various executable extensions on Windows. Returns boolean value - describing result of the check. - - Example: - - " use custom default viewer script if it's available and installed - " in predefined system directory, otherwise try to find it elsewhere - if executable('/usr/local/bin/defviewer') - fileview * /usr/local/bin/defviewer %c - else - if executable('defviewer') - fileview * defviewer %c - endif - endif - - expand({expr}) - - Expands environment variables and macros in {expr} just like it's done - for command-line commands. Returns a string. See "Command macros" - section above. - - Examples: - - " percent sign - :echo expand('%%') - " the last part of directory name of the other pane - :echo expand('%D:t') - " $PATH environment variable (same as `:echo $PATH`) - :echo expand('$PATH') - - filetype({fnum}[,{resolve}]) - - The result is a string, which represents file type and is one of the - list: - exe executables - reg regular files - link symbolic links - broken broken symbolic links (appears only when resolving) - dir directories - char character devices - block block devices - fifo pipes - sock *nix domain sockets - ? unknown file type (should not normally appear) - - The result can also be an empty string in case of invalid argument. - - Parameter {fnum} can have following values: - - '.' to get type of file under the cursor in the active pane - - numerical value base 1 to get type of file on specified line num- - ber - - Optional parameter {resolve} is treated as a boolean and specifies - whether symbolic links should be resolved. - - fnameescape({expr}) - - Escapes parameter to make it suitable for use as an argument of a :com- - mand. List of escaped characters includes %, which is doubled. - - Usage example: - - " navigate to most recently modified file in current directory - execute 'goto' fnameescape(system('ls -t | head -1')) - - getpanetype() - - Retrieves string describing type of current pane. Possible return val- - ues: - regular regular file listing of some directory - custom custom file list (%u) - very-custom very custom file list (%U) - tree tree view - - has({property}) - - Allows examining internal parameters from scripts to e.g. figure out - environment in which application is running. Returns 1 if property is - true/present, otherwise 0 is returned. Currently the following proper- - ties are supported (anything else will yield 0): - unix runs in *nix-like environment (including Cygwin) - win runs on Windows - - Usage example: - - " skip user/group on Windows - if !has('win') - let $RIGHTS = '%10u:%-7g ' - endif - - execute 'set' 'statusline=" %t%= %A '.$RIGHTS.'%15E %20d "' - - layoutis({type}) - - Checks whether current interface layout is {type} or not, where {type} - can be: - only single-pane mode - split double-pane mode (either vertical or horizon split) - vsplit vertical split (left and right panes) - hsplit horizontal split (top and bottom panes) - - Usage example: - - " automatically split vertically before enabling preview - :nnoremap w :if layoutis('only') | vsplit | endif | view! - - paneisat({loc}) - - Checks whether position of active pane in current layout matches one of - the following locations: - top pane reaches top border - bottom pane reaches bottom border - left pane reaches left border - right pane reaches right border - - system({command}) - - Runs the command in shell and returns its output (joined standard out- - put and standard error streams). All trailing newline characters are - stripped to allow easy appending to command output. Ctrl-C should - interrupt the command. - - Use this function to consume output of external commands that don't - require user interaction and term() for interactive commands that make - use of terminal and are capable of handling stream redirection. - - Usage example: - - " command to enter .git/ directory of git-repository (when ran inside one) - command! cdgit :execute 'cd' system('git rev-parse --git-dir') - - tabpagenr([{arg}]) - - When called without arguments returns number of current tab page base - one. - - When called with "$" as an argument returns number of the last tab page - base one, which is the same as number of tabs. - - term({command}) - - Same as system() function, but user interface is shutdown during the - execution of the command, which makes sure that external interactive - applications won't affect the way terminal is used by vifm. - - Usage example: - - " command to change directory by picking it via fzf - command! fzfcd :execute 'cd' "'".term('find -type d | fzf 2> /dev/tty')."'" - -Menus and dialogs - When navigating to some path from a menu there is a difference in end - location depending on whether path has trailing slash or not. Files - normally don't have trailing slashes so "file/" won't work and one can - only navigate to a file anyway. On the other hand with directories - there are two options: navigate to a directory or inside of it. To - allow both use cases, the first one is used on paths like "dir" and the - second one for "dir/". - - Commands - - :range navigate to a menu line. - - :exi[t][!] :q[uit][!] :x[it][!] - leave menu mode. - - :noh[lsearch] - reset search match highlighting. - - :w[rite] {dest} - write all menu lines into file specified by {dest}. - - General - - j, Ctrl-N - move down. - k, Ctrl-P - move up. - Enter, l - select and exit the menu. - Ctrl-L - redraw the menu. - - Escape, Ctrl-C, ZZ, ZQ, q - quit. - - In all menus - - The following set of keys has the same meaning as in normal mode. - - Ctrl-B, Ctrl-F - Ctrl-D, Ctrl-U - Ctrl-E, Ctrl-Y - /, ? - n, N - [count]G, [count]gg - H, M, L - zb, zt, zz - - zh - scroll menu items [count] characters to the right. - zl - scroll menu items [count] characters to the left. - zH - scroll menu items half of screen width characters to the right. - zL - scroll menu items half of screen width characters to the left. - - : - enter command line mode for menus (currently only :exi[t], :q[uit], - :x[it] and :{range} are supported). - - b - interpret content of the menu as list of paths and use it to create - custom view in place of previously active pane. See "Custom views" - section below. - B - same as above, but creates unsorted view. - - v - load menu content into quickfix list of the editor (Vim compatible - by assumption) or if list doesn't have separators after file names - (colons) open each line as a file name. - - - Below is description of additional commands and reaction on selection - in some menus and dialogs. - - Apropos menu - - Selecting menu item runs man on a given topic. Menu won't be closed - automatically to allow view several pages one by one. - - Command-line mode abbreviations menu - - Type dd on an abbreviation to remove it. - - c leaves menu preserving file selection and inserts right-hand side of - selected command into command-line. - - Color scheme menu - - Selecting name of a color scheme applies it the same way as if ":col- - orscheme " was executed on the command-line. - - Commands menu - - Selecting command executes it with empty arguments (%a). - - dd on a command to remove. - - Marks menu - - Selecting mark navigates to it. - - dd on a mark to remove it. - - Bookmarks menu - - Selecting a bookmark navigates to it. - - Type dd on a bookmark to remove it. - - gf and e also work to make it more convenient to bookmark files. - - Trash (:lstrash) menu - - r on a file name to restore it from trash. - - dd deletes file under the cursor. - - Trashes menu - - dd empties selected trash in background. - - Directory history and Trashes menus - - Selecting directory name will change directory of the current view as - if :cd command was used. - - Directory stack menu - - Selecting directory name will rotate stack to put selected directory - pair at the top of the stack. - - Filetype menu - - Commands from vifmrc or typed in command-line are displayed above empty - line. All commands below empty line are from .desktop files. - - c leaves menu preserving file selection and inserts command after :! in - command-line mode. - - Grep, find, locate, bookmarks and user menu with navigation (%M macro) - - gf - navigate previously active view to currently selected item. - Leaves menu mode except for grep menu. Pressing Enter key has the same - effect. - - e - open selected path in the editor, stays in menu mode. - - c - leave menu preserving file selection and insert file name after :! - in command-line mode. - - User menu without navigation (%m macro) - - c leaves menu preserving file selection and inserts whole line after :! - in command-line mode. - - Grep menu - - Selecting file (via Enter or l key) opens it in editor set by 'vicmd' - at given line number. Menu won't be closed automatically to allow - viewing more than one result. - - See above for "gf" and "e" keys description. - - Command-line history menu - - Selecting an item executes it as command-line command, search query or - local filter. - - c leaves menu preserving file selection and inserts line into command- - line of appropriate kind. - - Volumes menu - - Selecting a drive navigates previously active pane to the root of that - drive. - - Fileinfo dialog - - Enter, q - close dialog - - Sort dialog - - h, Space - switch ascending/descending. - q - close dialog - - One shortcut per sorting key (see the dialog). - - Attributes (permissions or properties) dialog - - h, Space - check/uncheck. - q - close dialog - - Item states: - - - * - checked flag. - - - X - means that it has different value for files in selection. - - - d (*nix only) - (only for execute flags) means u-x+X, g-x+X or o-x+X - argument for the chmod program. If you're not on OS X and want to - remove execute permission bit from all files, but preserve it for - directories, set all execute flags to 'd' and check 'Set Recursively' - flag. - - Jobs menu - - dd requests cancellation of job under cursor. The job won't be removed - from the list, but marked as being cancelled (if cancellation was suc- - cessfully requested). A message will pop up if the job has already - stopped. Note that on Windows cancelling external programs like this - might not work, because their parent shell doesn't have any windows. - - e key displays errors of selected job if any were collected. They are - displayed in a new menu, but you can get back to jobs menu by pressing - h. - - - Undolist menu - - r - reset undo position to group under the cursor. - - - Media menu - - r - reload the list. - - m - mount/unmount device (cursor should be positioned on lines under - device information). - - -Custom views - Definition - - Normally file views contain list of files from a single directory, but - sometimes it's useful to populate them with list of files that do not - belong to the same directory, which is what custom views are for. - - Presentation - - Custom views are still related to directory they were in before custom - list was loaded. Path to that directory (original directory) can be - seen in the title of a custom view. - - Files in same directory have to be named differently, this doesn't hold - for custom views thus seeing just file names might be rather confusing. - In order to give an idea where files come from and when possible, rela- - tive paths to original directory of the view is displayed, otherwise - full path is used instead. - - Custom views normally don't contain any inexistent files. - - Navigation - - Custom views have some differences related to navigation in regular - views. - - gf - acts similar to gf on symbolic links and navigates to the file at - its real - location. - - h - go to closes parent node in tree view, otherwise return to the - original directory. - - gh - return to the original directory. - - Opening ".." entry also causes return to the original directory. - - History - - Custom list exists only while it's visible, once left one can't return - to it, so there is no appearances of it in any history. - - Filters - - Only local filter affects content of the view. This is intentional, - presumably if one loads list, precisely that list should be displayed - (except for inexistent paths, which are ignored). - - Search - - Although directory names are visible in listing, they are not search- - able. Only file names are taken into account (might be changed in - future, searching whole lines seems quite reasonable). - - Sorting - - Contrary to search sorting by name works on whole visible part of file - path. - - Highlight - - Whole file name is highlighted as one entity, even if there are direc- - tory elements. - - Updates - - Reloads can occur, though they are not automatic due to files being - scattered among different places. On a reload, inexistent files are - removed and meta-data of all other files is updated. - - Once custom view forgets about the file, it won't add it back even if - it's created again. So not seeing file previously affected by an oper- - ation, which was undone is normal. - - Operations - - All operations that add files are forbidden for custom views. For - example, moving/copying/putting files into a custom view doesn't work, - because it doesn't make much sense. - - On the other hand, operations that use files of a custom view as a - source (e.g. yanking, copying, moving file from custom view, deletion) - and operations that modify names are all allowed. - -Compare views - Kinds - - :compare can produce four different results depending on arguments: - - single compare view (ofone and either listall or listdups); - - single custom view (ofone and listunique); - - two compare views (ofboth and either listall or listdups); - - two custom views (ofboth and listunique). - - The first two display files of one file system tree. Here duplicates - are files that have at least one copy in the same tree. The other two - kinds of operation compare two trees, in which duplicates are files - that are found in both trees. - - Lists of unique files are presented in custom views because there is no - file grouping to preserve as all file ids are guaranteed to be dis- - tinct. - - Creation - - Arguments passed to :compare form four categories each with its own - prefix and is responsible for particular property of operation. - - Which files to compare: - - ofboth - compares files of two panes against each other; - - ofone - compares files of the same directory. - - How files are compared: - - byname - by their name only; - - bysize - only by their size; - - bycontents - by combination of size and hash of file contents. - - Which files to display: - - listall - all files; - - listunique - unique files only; - - listdups - only duplicated files. - - How results are grouped (has no effect if "ofone" specified): - - groupids - files considered identical are always adjacent in out- - put; - - grouppaths - file system ordering is preferred (this also enables - displaying identically named files as mismatches). - - Which files to omit: - - skipempty - ignore empty files. - - Each argument can appear multiple times, the rightmost one of the group - is considered. Arguments alter default behaviour instead of substitut- - ing it. - - Examples - - The defaults corresponds to probably the most common use case of com- - paring files in two trees with grouping by paths, so the following are - equivalent: - - :compare - :compare bycontents grouppaths - :compare bycontents listall ofboth grouppaths - - Another use case is to find duplicates in the current sub-tree: - - :compare listdups ofone - - The following command lists files that are unique to each pane: - - :compare listunique - - Look - - The view can't switch to ls-like view as it's unable to display diff- - like data. - - Comparison views have second column displaying id of the file, files - with same id are considered to be equal. The view columns configura- - tion is predefined. - - Behaviour - - When two views are being compared against each other the following - changes to the regular behaviour apply: - - views are scrolled synchronously (as if 'scrollbind' was set); - - views' cursors are synchronized; - - local filtering is disabled (its results wouldn't be meaningful); - - zd excludes groups of adjacent identical files, 1zd gives usual be- - haviour; - - sorting is permanently disabled (ordering is fixed); - - removed files hide their counter pairs; - - exiting one of the views terminates the other immediately; - - renaming files isn't blocked, but isn't taken into account and might - require regeneration of comparison; - - entries which indicate absence of equivalent file have empty names - and can be matched as such; - - when unique files of both views are listed custom views can be - empty, this absence of unique files is stated clearly. - - One compare view has similar properties (those that are applicable for - single pane). - - Files are gathered in this way: - - recursively starting at current location of the view; - - dot files are excluded if view hides them at the moment of compari- - son; - - directories are not taken into account; - - symbolic links to directories are ignored. - -Startup - On startup vifm determines several variables that are used during the - session. They are determined in the order they appear below. - - On *nix systems $HOME is normally present and used as is. On Windows - systems vifm tries to find correct home directory in the following - order: - - $HOME variable; - - $USERPROFILE variable (on Windows only); - - a combination of $HOMEDRIVE and $HOMEPATH variables (on Windows - only). - - vifm tries to find correct configuration directory by checking the fol- - lowing places: - - $VIFM variable; - - parent directory of the executable file (on Windows only); - - $HOME/.vifm directory; - - $APPDATA/Vifm directory (on Windows only); - - $XDG_CONFIG_HOME/vifm directory; - - $HOME/.config/vifm directory. - - vifm tries to find correct configuration file by checking the following - places: - - $MYVIFMRC variable; - - vifmrc in parent directory of the executable file (on Windows only); - - $VIFM/vifmrc file. - -Configure - See "Startup" section above for the explanations on $VIFM and $MYV- - IFMRC. - - The vifmrc file contains commands that will be executed on vifm - startup. There are two such files: global and local. Global one is at - {prefix}/etc/vifm/vifmrc, see $MYVIFMRC variable description for the - search algorithm used to find local vifmrc. Global vifmrc is loaded - before the local one, so that the later one can redefine anything con- - figured globally. - - Use vifmrc to set settings, mappings, filetypes etc. To use multi line - commands precede each next line with a slash (whitespace before slash - is ignored, but all spaces at the end of the lines are saved). For - example: - - set - \smartcase - - equals "setsmartcase". When - - set - \ smartcase - - equals "set smartcase". - - The $VIFM/vifminfo file contains session settings. You may edit it by - hand to change the settings, but it's not recommended to do that, edit - vifmrc instead. You can control what settings will be saved in - vifminfo by setting 'vifminfo' option. Vifm always writes this file on - exit unless 'vifminfo' option is empty. Marks, bookmarks, commands, - histories, filetypes, fileviewers and registers in the file are merged - with vifm configuration (which has bigger priority). - - Generally, runtime configuration has bigger priority during merging, - but there are some exceptions: - - - directory stack stored in the file is not overwritten unless some- - thing is changed in vifm session that performs merge; - - - each mark or bookmark is marked with a timestamp, so that newer - value is not overwritten by older one, thus no matter from where it - comes, the newer one wins. - - The $VIFM/scripts directory can contain shell scripts. vifm modifies - its PATH environment variable to let user run those scripts without - specifying full path. All subdirectories of the $VIFM/scripts will be - added to PATH too. Script in a subdirectory overlaps script with the - same name in all its parent directories. - - The $VIFM/colors/ and {prefix}/etc/vifm/colors/ directories contain - color schemes. Available color schemes are searched in that order, so - on name conflict the one in $VIFM/colors/ wins. - - Each color scheme should have ".vifm" extension. This wasn't the case - before and for this reason the following rules apply during lookup: - - - if there is no file with .vifm extension, all regular files are - listed; - - - otherwise only files with .vifm extension are listed (with the - extension being truncated). - -Automatic FUSE mounts - vifm has a builtin support of automated FUSE file system mounts. It is - implemented using file associations mechanism. To enable automated - mounts, one needs to use a specially formatted program line in filetype - or filextype commands. Currently two formats are supported: - - 1) FUSE_MOUNT This format should be used in case when all information - needed for mounting all files of a particular type is the same. E.g. - mounting of tar files don't require any file specific options. - - Format line: - FUSE_MOUNT|mounter %SOURCE_FILE %DESTINATION_DIR [%FOREGROUND] - - Example filetype command: - - :filetype FUSE_MOUNT|fuse-zip %SOURCE_FILE %DESTINATION_DIR - - 2) FUSE_MOUNT2 This format allows one to use specially formatted files - to perform mounting and is useful for mounting remotes, for example - remote file systems over ftp or ssh. - - Format line: - FUSE_MOUNT2|mounter %PARAM %DESTINATION_DIR [%FOREGROUND] - - Example filetype command: - - :filetype FUSE_MOUNT2|sshfs %PARAM %DESTINATION_DIR - - Example file content: - - root@127.0.0.1:/ - - All % macros are expanded by vifm at runtime and have the following - meaning: - - %SOURCE_FILE is replaced by full path to selected file; - - %DESTINATION_DIR is replaced by full path to mount directory, which - is created by vifm basing on the value of 'fusehome' option; - - %PARAM value is filled from the first line of file (whole line), - though in the future it can be changed to whole file content; - - %FOREGROUND means that you want to run mount command as a regular - command (required to be able to provide input for communication with - mounter in interactive way). - - %FOREGROUND is an optional macro. Other macros are not mandatory, but - mount commands likely won't work without them. - - %CLEAR is obsolete name of %FOREGROUND, which is still supported, but - might be removed in future. Its use is discouraged. - - The mounted FUSE file systems will be automatically unmounted in two - cases: - - - when vifm quits (with ZZ, :q, etc. or when killed by signal); - - - when you explicitly leave mount point going up to its parent direc- - tory (with h, Enter on "../" or ":cd ..") and other pane is not in - the same directory or its child directories. - -View look - vifm supports displaying of file list view in two different ways: - - - in a table mode, when multiple columns can be set using 'view- - columns' option (see "Column view" section below for details); - - - in a multicolumn list manner which looks almost like `ls -x` com- - mand output (see "ls-like view" section below for details). - - The look is local for each view and can be chosen by changing value of - the 'lsview' boolean option. - - Depending on view look some of keys change their meaning to allow more - natural cursor moving. This concerns mainly h, j, k, l and other simi- - lar navigation keys. - - Also some of options can be ignored if they don't affect view display- - ing in selected look. For example value of 'viewcolumns' when 'lsview' - is set. - -ls-like view - When this view look is enabled by setting 'lsview' option on, vifm will - display files in multiple columns. Number of columns depends on the - length of the longest file name present in current directory of the - view. Whole file list is automatically reflowed on directory change, - terminal or view resize. - - View looks close to output of `ls -x` command, so files are listed left - to right in rows. - - In this mode file manipulation commands (e.g. d) don't work line-wise - like they do in Vim, since such operations would be uncommon for file - manipulation tasks. Thus, for example, dd will remove only current - file. - - By default the view is filled by lines, 'lsoptions' can be used to get - filling by columns. - - Note that tree-view and compare view inhibit ls-like view. - -Column view - View columns are described by a comma-separated list of column descrip- - tions, each of which has the following format - [ '-' ] [ fw ( [ '.' tw ] | '%' ) ] '{' type '}' '.'{0,3} - where fw stands for full width and tw stands for text width. - - So it basically consists of four parts: - 1. Optional alignment specifier - 2. Optional width specifier - 3. Mandatory column name - 4. Optional cropping specifier - - Alignment specifier - - It's an optional minus or asterisk sign as the first symbol of the - string. - - Specifies type of text alignment within a column. Three types are sup- - ported: - - - left align - - set viewcolumns=-{name} - - - right align (default) - - set viewcolumns={name} - - - dynamic align - - It's like left alignment, but when the text is bigger than the col- - umn, the alignment is made at the right (so the part of the field is - always visible). - - set viewcolumns=*{name} - - Width specifier - - It's a number followed by a percent sign, two numbers (second one - should be less than or equal to the first one) separated with a dot or - a single number. - - Specifies column width and its units. There are three size types: - - - absolute size - column width is specified in characters - - set viewcolumns=-100{name},20.15{ext} - - results in two columns with lengths of 100 and 20 and a reserved - space of five characters on the left of second column. - - - relative (percent) size - column width is specified in percents of - view width - - set viewcolumns=-80%{name},15%{ext},5%{mtime} - - results in three columns with lengths of 80/100, 15/100 and 5/100 of - view width. - - - auto size (default) - column width is automatically determined - - set viewcolumns=-{name},{ext},{mtime} - - results in three columns with length of one third of view width. - There is no size adjustment to content, since it will slow down ren- - dering. - - Columns of different sizing types can be freely mixed in one view. - Though sometimes some of columns can be seen partly or be completely - invisible if there is not enough space to display them. - - Column name - - This is just a sort key surrounded with curly braces or {root}, e.g. - - {name},{ext},{mtime} - - {name} and {iname} keys are the same and present both for consistency - with 'sort' option. - - Following keys don't have corresponding sorting keys: - - - {root} - display name without extension (as a complement for {ext}) - - Empty curly braces ({}) are replaced with the default secondary column - for primary sort key. So after the next command view will be displayed - almost as if 'viewcolumns' is empty, but adding ellipsis for long file - names: - - set viewcolumns=-{name}..,6{}. - - Cropping specifier - - It's from one to three dots after closing curly brace in column format. - - Specifies type of text truncation if it doesn't fit in the column. - Currently three types are supported: - - - truncation - text is truncated - - set viewcolumns=-{name}. - - results in truncation of names that are too long too fit in the - view. - - - adding of ellipsis - ellipsis on the left or right are added when - needed - - set viewcolumns=-{name}.. - - results in that ellipsis are added at the end of too long file - names. - - - none (default) - text can pass column boundaries - - set viewcolumns=-{name}...,{ext} - - results in that long file names can partially be written on the ext - column. - -Color schemes - The color schemes in vifm can be applied in two different ways: - - - as the primary color scheme; - - - as local to a pane color scheme. - - Both types are set using :colorscheme command, but of different forms: - - - :colorscheme color_scheme_name - for the primary color scheme; - - - :colorscheme color_scheme_name directory - for local color schemes. - - Look of different parts of the TUI (Text User Interface) is determined - in this way: - - - Border, TabLine, TabLineSel, TopLineSel, TopLine, CmdLine, - ErrorMsg, StatusLine, JobLine, SuggestBox and WildMenu are always - determined by the primary color scheme; - - - CurrLine, Selected, Directory, Link, BrokenLink, Socket, Device, - Executable, Fifo, CmpMismatch, Win and AuxWin are determined by - primary color scheme and a set of local color schemes, which can be - empty. - - There might be a set of local color schemes because they are structured - hierarchically according to file system structure. For example, having - the following piece of file system: - - ~ - `-- bin - | - `-- my - - Two color schemes: - - # ~/.vifm/colors/for_bin - highlight Win cterm=none ctermfg=white ctermbg=red - highlight CurrLine cterm=none ctermfg=red ctermbg=black - - # ~/.vifm/colors/for_bin_my - highlight CurrLine cterm=none ctermfg=green ctermbg=black - - And these three commands in the vifmrc file: - - colorscheme Default - colorscheme for_bin ~/bin - colorscheme for_bin_my ~/bin/my - - File list will look in the following way for each level: - - - ~/ - Default color scheme - black background - cursor with blue background - - - ~/bin/ - mix of Default and for_bin color schemes - red background - cursor with black background and red foreground - - - ~/bin/my/ - mix of Default, for_bin and for_bin_my color schemes - red background - cursor with black background and green foreground - -Trash directory - vifm has support of trash directory, which is used as temporary storage - for deleted files or files that were cut. Using trash is controlled by - the 'trash' option, and exact path to the trash can be set with - 'trashdir' option. Trash directory in vifm differs from the system- - wide one by default, because of possible incompatibilities of storing - deleted files among different file managers. But one can set - 'trashdir' to "~/.local/share/Trash" to use a "standard" trash direc- - tory. - - There are two scenarios of using trash in vifm: - - 1. As a place for storing files that were cut by "d" and may be - inserted to some other place in file system. - - 2. As a storage of files, that are deleted but not purged yet. - - The first scenario uses deletion ("d") operations to put files to trash - and put ("p") operations to restore files from trash directory. Note - that such operations move files to and from trash directory, which can - be long term operations in case of different partitions or remote - drives mounted locally. - - The second scenario uses deletion ("d") operations for moving files to - trash directory and :empty command-line command to purge all previously - deleted files. - - Deletion and put operations depend on registers, which can point to - files in trash directory. Normally, there are no nonexistent files in - registers, but vifm doesn't keep track of modifications under trash - directory, so one shouldn't expect value of registers to be absolutely - correct if trash directory was modified not by operation that are meant - for it. But this won't lead to any issues with operations, since they - ignore nonexistent files. - -Client-Server - vifm supports remote execution of command-line mode commands, remote - changing of directories and expression evaluation. This is possible - using --remote and --remote-expr command-line arguments. - - To execute a command remotely combine --remote argument with -c or +. For example: - - vifm --remote -c 'cd /' - vifm --remote '+cd /' - - To change directory not using command-line mode commands one can spec- - ify paths right after --remote argument, like this: - - vifm --remote / - vifm --remote ~ - vifm --remote /usr/bin /tmp - - Evaluating expression remotely might be useful to query information - about an instance, for example its location: - - vifm --remote-expr 'expand("%d")' - - If there are several running instances, the target can be specified - with --server-name option (otherwise, the first one lexicographically - is used): - - vifm --server-name work --remote ~/work/project - - List of names of running instances can be obtained via --server-list - option. Name of the current one is available via v:servername. - - - v:servername - server name of the running vifm instance. Empty if client- - server feature is disabled. - -Plugin - Plugin for using vifm in vim as a file selector. - - Commands: - - :EditVifm select a file or files to open in the current buffer. - :SplitVifm split buffer and select a file or files to open. - :VsplitVifm vertically split buffer and select a file or files to - open. - :DiffVifm select a file or files to compare to the current file - with - :vert diffsplit. - :TabVifm select a file or files to open in tabs. - - Each command accepts up to two arguments: left pane directory and right - pane directory. After arguments are checked, vifm process is spawned - in a special "file-picker" mode. To pick files just open them either - by pressing l, i or Enter keys, or by running :edit command. If no - files are selected, file under the cursor is opened, otherwise whole - selection is passed to the plugin and opened in vim. - - The plugin have only two settings. It's a string variable named - g:vifm_term to let user specify command to run GUI terminal. By - default it's equal to 'xterm -e'. And another string variable named - g:vifm_exec, which equals "vifm" by default and specifies path to - vifm's executable. To pass arguments to vifm use g:vifm_exec_args, - which is empty by default. - - To use the plugin copy the vifm.vim file to either the system wide - vim/plugin directory or into ~/.vim/plugin. - - If you would prefer not to use the plugin and it is in the system wide - plugin directory add - - let loaded_vifm=1 - - to your ~/.vimrc file. - -Reserved - The following command names are reserved and shouldn't be used for user - commands. - - g[lobal] - v[global] - -ENVIRONMENT - VIFM Points to main configuration directory (usually ~/.vifm/). - - MYVIFMRC - Points to main configuration file (usually ~/.vifm/vifmrc). - - These environment variables are valid inside vifm and also can be used - to configure it by setting some of them before running vifm. - - When $MYVIFMRC isn't set, it's made as $VIFM/vifmrc (exception for Win- - dows: vifmrc in the same directory as vifm.exe has higher priority than - $VIFM/vifmrc). - - See "Startup" section above for more details. - - VIFM_FUSE_FILE - On execution of external commands this variable is set to the - full path of file used to initiate FUSE mount of the closes - mount point from current pane directory up. It's not set when - outside FUSE mount point. When vifm is used inside terminal - multiplexer, it tries to set this variable as well (it doesn't - work this way on its own). - -SEE ALSO - vifm-convert-dircolors(1), vifm-pause(1) - - Website: https://vifm.info/ - Wiki: https://wiki.vifm.info/ - - Esperanto translation of the documentation by Sebastian Cyprych: - http://cyprych.neostrada.pl/tekstoj/komputiloj/vifm-help.eo.html - -AUTHOR - Vifm was written by ksteen - And currently is developed by xaizek - - - -vifm 0.10 November 11, 2018 VIFM(1) diff --git a/files/dotfiles/vifm/vifmrc b/files/dotfiles/vifm/vifmrc deleted file mode 100644 index f0f0f3f..0000000 --- a/files/dotfiles/vifm/vifmrc +++ /dev/null @@ -1,476 +0,0 @@ -" vim: filetype=vifm : -" Sample configuration file for vifm (last updated: 20 July, 2018) -" You can edit this file by hand. -" The " character at the beginning of a line comments out the line. -" Blank lines are ignored. -" The basic format for each item is shown with an example. - -" ------------------------------------------------------------------------------ - -" This is the actual command used to start vi. The default is vim. -" If you would like to use another vi clone such as Elvis or Vile -" you will need to change this setting. - -set vicmd=nvim -" set vicmd=elvis\ -G\ termcap -" set vicmd=vile - -" This makes vifm perform file operations on its own instead of relying on -" standard utilities like `cp`. While using `cp` and alike is a more universal -" solution, it's also much slower when processing large amounts of files and -" doesn't support progress measuring. - -set syscalls - -" Trash Directory -" The default is to move files that are deleted with dd or :d to -" the trash directory. If you change this you will not be able to move -" files by deleting them and then using p to put the file in the new location. -" I recommend not changing this until you are familiar with vifm. -" This probably shouldn't be an option. - -set trash - -" This is how many directories to store in the directory history. - -set history=100 - -" Automatically resolve symbolic links on l or Enter. - -set nofollowlinks - -" With this option turned on you can run partially entered commands with -" unambiguous beginning using :! (e.g. :!Te instead of :!Terminal or :!Te). - -" set fastrun - -" Natural sort of (version) numbers within text. - -set sortnumbers - -" Maximum number of changes that can be undone. - -set undolevels=100 - -" If you installed the vim.txt help file set vimhelp. -" If would rather use a plain text help file set novimhelp. - -set novimhelp - -" If you would like to run an executable file when you -" press return on the file name set this. - -set norunexec - -" Selected color scheme - -colorscheme zenburn_1 - -" Format for displaying time in file list. For example: -" TIME_STAMP_FORMAT=%m/%d-%H:%M -" See man date or man strftime for details. - -set timefmt=%m/%d\ %H:%M - -" Show list of matches on tab completion in command-line mode - -set wildmenu - -" Display completions in a form of popup with descriptions of the matches - -set wildstyle=popup - -" Display suggestions in normal, visual and view modes for keys, marks and -" registers (at most 5 files). In other view, when available. - -set suggestoptions=normal,visual,view,otherpane,keys,marks,registers - -" Ignore case in search patterns unless it contains at least one uppercase -" letter - -set ignorecase -set smartcase - -" Don't highlight search results automatically - -set nohlsearch - -" Use increment searching (search while typing) -set incsearch - -" Try to leave some space from cursor to upper/lower border in lists - -set scrolloff=4 - -" Don't do too many requests to slow file systems - -if !has('win') - set slowfs=curlftpfs -endif - -" Set custom status line look - -set statusline=" Hint: %z%= %A %10u:%-7g %15s %20d " - -" ------------------------------------------------------------------------------ - -" :mark mark /full/directory/path [filename] - -mark b ~/bin/ -mark h ~/ -mark e /media/documents/Cours/Prof/Enseignements/ -mark m ~/Musique/ - -" ------------------------------------------------------------------------------ - -" :com[mand][!] command_name action -" The following macros can be used in a command -" %a is replaced with the user arguments. -" %c the current file under the cursor. -" %C the current file under the cursor in the other directory. -" %f the current selected file, or files. -" %F the current selected file, or files in the other directory. -" %b same as %f %F. -" %d the current directory name. -" %D the other window directory name. -" %m run the command in a menu window - -command! df df -h %m 2> /dev/null -command! diff vim -d %f %F -command! zip zip -r %f.zip %f -command! run !! ./%f -command! make !!make %a -command! mkcd :mkdir %a | cd %a -command! vgrep vim "+grep %a" -command! reload :write | restart -command ln ln -s %f:p %D - -" ------------------------------------------------------------------------------ - -" The file type is for the default programs to be used with -" a file extension. -" :filetype pattern1,pattern2 defaultprogram,program2 -" :fileviewer pattern1,pattern2 consoleviewer -" The other programs for the file type can be accessed with the :file command -" The command macros %f, %F, %d, %F may be used in the commands. -" The %a macro is ignored. To use a % you must put %%. - -" For automated FUSE mounts, you must register an extension with :file[x]type -" in one of following formats: -" -" :filetype extensions FUSE_MOUNT|some_mount_command using %SOURCE_FILE and %DESTINATION_DIR variables -" %SOURCE_FILE and %DESTINATION_DIR are filled in by vifm at runtime. -" A sample line might look like this: -" :filetype *.zip,*.jar,*.war,*.ear FUSE_MOUNT|fuse-zip %SOURCE_FILE %DESTINATION_DIR -" -" :filetype extensions FUSE_MOUNT2|some_mount_command using %PARAM and %DESTINATION_DIR variables -" %PARAM and %DESTINATION_DIR are filled in by vifm at runtime. -" A sample line might look like this: -" :filetype *.ssh FUSE_MOUNT2|sshfs %PARAM %DESTINATION_DIR -" %PARAM value is filled from the first line of file (whole line). -" Example first line for SshMount filetype: root@127.0.0.1:/ -" -" You can also add %CLEAR if you want to clear screen before running FUSE -" program. - -" Pdf -filextype *.pdf zathura %c %i &, apvlv %c, xpdf %c -fileviewer *.pdf pdftotext -nopgbrk %c - - -" PostScript -filextype *.ps,*.eps,*.ps.gz - \ {View in zathura} - \ zathura %f, - \ {View in gv} - \ gv %c %i &, - -" Djvu -filextype *.djvu - \ {View in zathura} - \ zathura %f, - \ {View in apvlv} - \ apvlv %f, - -" Audio -filetype *.wav,*.mp3,*.flac,*.m4a,*.wma,*.ape,*.ac3,*.og[agx],*.spx,*.opus - \ {Play using ffplay} - \ ffplay -nodisp -autoexit %c, - \ {Play using MPlayer} - \ mplayer %f, -fileviewer *.mp3 mp3info -fileviewer *.flac soxi - -" Video -filextype *.avi,*.mp4,*.wmv,*.dat,*.3gp,*.ogv,*.mkv,*.mpg,*.mpeg,*.vob, - \*.fl[icv],*.m2v,*.mov,*.webm,*.ts,*.mts,*.m4v,*.r[am],*.qt,*.divx, - \*.as[fx] - \ {View using ffplay} - \ ffplay -fs -autoexit %f, - \ {View using Dragon} - \ dragon %f:p, - \ {View using mplayer} - \ mplayer %f, -fileviewer *.avi,*.mp4,*.wmv,*.dat,*.3gp,*.ogv,*.mkv,*.mpg,*.mpeg,*.vob, - \*.fl[icv],*.m2v,*.mov,*.webm,*.ts,*.mts,*.m4v,*.r[am],*.qt,*.divx, - \*.as[fx] - \ ffprobe -pretty %c 2>&1 - -" Web -filextype *.html,*.htm - \ {Open with dwb} - \ dwb %f %i &, - \ {Open with firefox} - \ firefox %f &, - \ {Open with uzbl} - \ uzbl-browser %f %i &, -filetype *.html,*.htm links, lynx - -" Object -filetype *.o nm %f | less - -" Man page -filetype *.[1-8] man ./%c -fileviewer *.[1-8] man ./%c | col -b - -" Images -filextype *.bmp,*.jpg,*.jpeg,*.png,*.gif,*.xpm - \ {View in sxiv} - \ sxiv %f, - \ {View in gpicview} - \ gpicview %c, - \ {View in shotwell} - \ shotwell, -fileviewer *.bmp,*.jpg,*.jpeg,*.png,*.gif,*.xpm - \ convert -identify %f -verbose /dev/null - -" OpenRaster -filextype *.ora - \ {Edit in MyPaint} - \ mypaint %f, - -" Mindmap -filextype *.vym - \ {Open with VYM} - \ vym %f &, - -" MD5 -filetype *.md5 - \ {Check MD5 hash sum} - \ md5sum -c %f %S, - -" SHA1 -filetype *.sha1 - \ {Check SHA1 hash sum} - \ sha1sum -c %f %S, - -" SHA256 -filetype *.sha256 - \ {Check SHA256 hash sum} - \ sha256sum -c %f %S, - -" SHA512 -filetype *.sha512 - \ {Check SHA512 hash sum} - \ sha512sum -c %f %S, - -" GPG signature -filetype *.asc - \ {Check signature} - \ !!gpg --verify %c, - -" Torrent -filetype *.torrent ktorrent %f & -fileviewer *.torrent dumptorrent -v %c - -" FuseZipMount -filetype *.zip,*.jar,*.war,*.ear,*.oxt,*.apkg - \ {Mount with fuse-zip} - \ FUSE_MOUNT|fuse-zip %SOURCE_FILE %DESTINATION_DIR, - \ {View contents} - \ zip -sf %c | less, - \ {Extract here} - \ tar -xf %c, -fileviewer *.zip,*.jar,*.war,*.ear,*.oxt zip -sf %c - -" ArchiveMount -filetype *.tar,*.tar.bz2,*.tbz2,*.tgz,*.tar.gz,*.tar.xz,*.txz - \ {Mount with archivemount} - \ FUSE_MOUNT|archivemount %SOURCE_FILE %DESTINATION_DIR, -fileviewer *.tgz,*.tar.gz tar -tzf %c -fileviewer *.tar.bz2,*.tbz2 tar -tjf %c -fileviewer *.tar.txz,*.txz xz --list %c -fileviewer *.tar tar -tf %c - -" Rar2FsMount and rar archives -filetype *.rar - \ {Mount with rar2fs} - \ FUSE_MOUNT|rar2fs %SOURCE_FILE %DESTINATION_DIR, -fileviewer *.rar unrar v %c - -" IsoMount -filetype *.iso - \ {Mount with fuseiso} - \ FUSE_MOUNT|fuseiso %SOURCE_FILE %DESTINATION_DIR, - -" SshMount -filetype *.ssh - \ {Mount with sshfs} - \ FUSE_MOUNT2|sshfs %PARAM %DESTINATION_DIR %FOREGROUND, - -" FtpMount -filetype *.ftp - \ {Mount with curlftpfs} - \ FUSE_MOUNT2|curlftpfs -o ftp_port=-,,disable_eprt %PARAM %DESTINATION_DIR %FOREGROUND, - -" Fuse7z and 7z archives -filetype *.7z - \ {Mount with fuse-7z} - \ FUSE_MOUNT|fuse-7z %SOURCE_FILE %DESTINATION_DIR, -fileviewer *.7z 7z l %c - -" Office files -filextype *.odt,*.doc,*.docx,*.xls,*.xlsx,*.odp,*.pptx libreoffice %f & -fileviewer *.doc catdoc %c -fileviewer *.docx docx2txt.pl %f - - -" TuDu files -filetype *.tudu tudu -f %c - -" Qt projects -filextype *.pro qtcreator %f & - -" Directories -filextype */ - \ {View in thunar} - \ Thunar %f &, - -" Syntax highlighting in preview -" -" Explicitly set highlight type for some extensions -" -" 256-color terminal -" fileviewer *.[ch],*.[ch]pp highlight -O xterm256 -s dante --syntax c %c -" fileviewer Makefile,Makefile.* highlight -O xterm256 -s dante --syntax make %c -" -" 16-color terminal -" fileviewer *.c,*.h highlight -O ansi -s dante %c -" -" Or leave it for automatic detection -" -" fileviewer *[^/] pygmentize -O style=monokai -f console256 -g - -" Displaying pictures in terminal -" -" fileviewer *.jpg,*.png shellpic %c - -" Open all other files with default system programs (you can also remove all -" :file[x]type commands above to ensure they don't interfere with system-wide -" settings). By default all unknown files are opened with 'vi[x]cmd' -" uncommenting one of lines below will result in ignoring 'vi[x]cmd' option -" for unknown file types. -" For *nix: -" filetype * xdg-open -" For OS X: -" filetype * open -" For Windows: -" filetype * start, explorer - -" ------------------------------------------------------------------------------ - -" What should be saved automatically between vifm runs -" Like in previous versions of vifm -" set vifminfo=options,filetypes,commands,bookmarks,dhistory,state,cs -" Like in vi -set vifminfo= -" set vifminfo=dhistory,savedirs,chistory,state,tui,shistory, -" \phistory,fhistory,dirstack,registers,bookmarks,bmarks - -" ------------------------------------------------------------------------------ - -" Examples of configuring both panels - -" Customize view columns a bit (enable ellipsis for truncated file names) -" -" set viewcolumns=-{name}..,6{}. - -" Filter-out build and temporary files -" -" filter! /^.*\.(lo|o|d|class|py[co])$|.*~$/ - -" ------------------------------------------------------------------------------ - -" Sample mappings - -" Start shell in current directory -" nnoremap s :shell - -" Display sorting dialog -nnoremap s :sort -nnoremap S :sort - -" Toggle visibility of preview window -nnoremap w :view -vnoremap w :viewgv - -" Open file in existing instance of gvim -nnoremap o :!gvim --remote-tab-silent %f -" Open file in new instance of gvim -" nnoremap O :!gvim %f - -" Open file in the background using its default program -" nnoremap gb :file &l - -" Yank current directory path into the clipboard -nnoremap yd :!echo %d | xclip %i - -" Yank current file path into the clipboard -nnoremap yf :!echo %c:p | xclip %i - -" Mappings for faster renaming -nnoremap I cw -nnoremap cc cw -nnoremap A cw - -" Open console in current directory -nnoremap ,t :!st & - -" Open editor to edit vifmrc and apply settings after returning to vifm -nnoremap ,c :write | edit $MYVIFMRC | restart -" Open gvim to edit vifmrc -" nnoremap ,C :!gvim --remote-tab-silent $MYVIFMRC & - -" Toggle wrap setting on ,w key -nnoremap ,w :set wrap! - -" Example of standard two-panel file managers mappings -nnoremap :!less %f -nnoremap :edit -nnoremap :copy -nnoremap :move -nnoremap :mkdir -nnoremap :delete - -" ------------------------------------------------------------------------------ - -" Various customization examples - -" Use ag (the silver searcher) instead of grep -" -" set grepprg='ag --line-numbers %i %a %s' - -" Add additional place to look for executables -" -" let $PATH = $HOME.'/bin/fuse:'.$PATH - -" Block particular shortcut -" -" nnoremap - -" Export IPC name of current instance as environment variable and use it to -" communicate with the instance later. -" -" It can be used in some shell script that gets run from inside vifm, for -" example, like this: -" vifm --server-name "$VIFM_SERVER_NAME" --remote +"cd '$PWD'" -" -" let $VIFM_SERVER_NAME = v:servername diff --git a/files/dotfiles/vim/.netrwhist b/files/dotfiles/vim/.netrwhist deleted file mode 100644 index da74a91..0000000 --- a/files/dotfiles/vim/.netrwhist +++ /dev/null @@ -1,6 +0,0 @@ -let g:netrw_dirhistmax =10 -let g:netrw_dirhist_cnt =4 -let g:netrw_dirhist_1='/home/lafrite/Cours/Prof/Enseignements/2017-2018/6e' -let g:netrw_dirhist_2='/home/lafrite/Cours/Prof/Enseignements/2017-2018/6e/Nombres_Calculs' -let g:netrw_dirhist_3='/home/lafrite/Cours/Prof/Enseignements/2017-2018/6e/Nombres_Calculs/Numerations_divers' -let g:netrw_dirhist_4='/home/lafrite/scripts/config/vim/bundle/TTCoach/macros/ttcoach/en' diff --git a/files/dotfiles/vim/UltiSnips/python.snippets b/files/dotfiles/vim/UltiSnips/python.snippets deleted file mode 100644 index 315772a..0000000 --- a/files/dotfiles/vim/UltiSnips/python.snippets +++ /dev/null @@ -1,19 +0,0 @@ -snippet todo "A python todo mark" b -# TODO: ${1:desc} |`date` -endsnippet - -snippet tvar "testing a variable" b -print("${1:Varname} -> ", $1) -endsnippet - - -# Unittest - -snippet deftest "test function without docstrings" b -def test_${1:function}(`!p -if snip.indent: - snip.rv = 'self' `): - ${0:pass} -endsnippet - - diff --git a/files/dotfiles/vim/UltiSnips/rst.snippets b/files/dotfiles/vim/UltiSnips/rst.snippets deleted file mode 100644 index 5f196fd..0000000 --- a/files/dotfiles/vim/UltiSnips/rst.snippets +++ /dev/null @@ -1,15 +0,0 @@ -snippet index -${1: Title} -${1/./#/g} - -:date: ${2: `date +%Y-%m-%d`} -:modified: $2 -:authors: Bertrand Benjamin -:category: ${3:Classe/niveau} -:tags: ${4:Themes} -:summary: $1 - - -Étape 1: ${5} -=========${5/./=/g} -endsnippet diff --git a/files/dotfiles/vim/config/base.vim b/files/dotfiles/vim/config/base.vim deleted file mode 100644 index 739c066..0000000 --- a/files/dotfiles/vim/config/base.vim +++ /dev/null @@ -1,118 +0,0 @@ -" Lines number -set number - -" Always show the statusline -set laststatus=2 - -" Necessary to show Unicode glyphs -set encoding=utf8 - -" smart tab -set smartindent - -" Tab to..? -set shiftround - -" Display edition mode -set showmode - -" Ignore case in search mode -set ignorecase - -" Override the 'ignorecase' option if the search pattern -" contains upper case characters. -set smartcase - -" Display uncomplete commands (??) -set showcmd - -" Vim file name completion relative to current file -set autochdir - -" While typing a search command, show immediately where the -" so far typed pattern matches. -set incsearch - -" Use to clear the highlighting of :set hlsearch. -set hlsearch -if maparg('', 'n') ==# '' - nnoremap :nohlsearch=has('diff')?'diffupdate':'' -endif - -" Turn on the WiLd menu -set wildmenu - -" Ignore compiled files -set wildignore=*.o,*~,*.pyc,*.swp - -" Wrap lines -set wrap - -" Turn backup off, since most stuff is in SVN, git et.c anyway... -set nobackup -set noswapfile - -" Having relative number for lines -set relativenumber - -" Display tab and ends of lines -" Shortcut to rapidly toggle `set list` -nmap L :set list! - -" Behaviour of tab -set tabstop=4 -set shiftwidth=4 -set softtabstop=4 -set expandtab - -" Folding -set foldmethod=indent - -" Use the same symbols as TextMate for tabstops and EOLs -" set listchars=tab:▸\ ,eol:¬ -set listchars=nbsp:¤,tab:··,trail:¤,extends:▶,precedes:◀ - -" allow backspacing over everything in insert mode -set backspace=indent,eol,start - -set history=50 " keep 50 lines of command line history -set ruler " show the cursor position all the time -" -" In many terminal emulators the mouse works just fine, thus enable it. -if has('mouse') - set mouse=a -endif - -" Decorations -" ==================== -" Switch syntax highlighting on, when the terminal has colors -" Also switch on highlighting the last used search pattern. -if &t_Co > 2 || has("gui_running") - syntax on -endif - -" When set to "dark", Vim will try to use colors that look -" good on a dark background. When set to "light", Vim will -" try to use colors that look good on a light background. -" Any other value is illegal. -set background=dark - -" Color Scheme -colorscheme zenburn - -set cursorline - -" Align blocks of text and keep them selected -vmap < >gv - -" Spelling -" set spelllang=fr -autocmd BufRead,BufNewFile *.{md,tex,rst} setlocal spell spelllang=fr -autocmd FileType tex,latex,markdown,md,rst setlocal spell spelllang=fr - -" Remove trailing whitespace at the end of lines -autocmd BufWritePre * %s/\s\+$//e - -" Different color for far columns -execute "set colorcolumn=" . join(range(81,335), ',') diff --git a/files/dotfiles/vim/config/plugins.vim b/files/dotfiles/vim/config/plugins.vim deleted file mode 100644 index eb0a03a..0000000 --- a/files/dotfiles/vim/config/plugins.vim +++ /dev/null @@ -1,88 +0,0 @@ -" lightline -> no need showmod -set noshowmode -let g:lightline = { - \ 'colorscheme': 'selenized_dark', - \ 'active': { - \ 'left': [ [ 'mode', 'paste' ], - \ [ 'gitbranch', 'readonly', 'filename', 'modified' ] ] - \ }, - \ 'component_function': { - \ 'gitbranch': 'FugitiveHead' - \ }, - \ } - -" Supertab -let g:SuperTabDefaultCompletionType = "context" - -" Ultisnips -let g:ultisnips_python_style='sphinx' -let g:UltiSnipsEditSplit='vertical' -" Trigger configuration. Do not use if you use https://github.com/Valloric/YouCompleteMe. -" let g:UltiSnipsExpandTrigger="tab" -let g:UltiSnipsExpandTrigger="" -let g:UltiSnipsJumpForwardTrigger="" -let g:UltiSnipsJumpBackwardTrigger="" - -" Airline -let g:airline_powerline_fonts = 1 -let g:tmuxline_powerline_separators = 0 - -" Nerdtree -let NERDTreeIgnore = ['.pyc$'] -"autocmd VimEnter * NERDTree - -" Vim-notes -let g:notes_directories = ['~/Documents/Notes'] -let g:notes_suffix = '.md' - -" Ale -let g:ale_sign_column_always = 1 -let g:ale_sign_error = '⚑' -let g:ale_sign_warning = '⚐' - -" fzf -" Search and switch buffers -nmap b :Buffers -" Find files by name under the current directory -nmap f :GFiles -" Find files by name under the home directory -nmap h :Files ~/ -" Search content in the current file -" nmap l :BLines -" Search content in the current file and in files under the current directory -" nmap g :Ag - -" IndentLine -let g:indentLine_fileTypeExclude = ['tex'] -" let g:indentLine_concealcursor = '' -" let g:indentLine_conceallevel = 1 -" -" Vim-polyglot -" let g:LatexBox_no_mappings = 1 -let g:polyglot_disabled = ["latex"] - -" Vimtex -let g:vimtex_compiler_latexmk = { - \ 'backend' : 'jobs', - \ 'background' : 1, - \ 'build_dir' : '', - \ 'callback' : 0, - \ 'continuous' : 1, - \ 'options' : [ - \ '-pdf', - \ '-verbose', - \ '-file-line-error', - \ '-synctex=1', - \ '-interaction=nonstopmode', - \ '-silent', - \ '-shell-escape', - \ ], - \} -let g:vimtex_view_method = 'zathura' - -" Les fichiers sty et cls sont vus comme des fichiers tex -autocmd BufRead,BufNewFile *.{sty,cls} setlocal syntax=tex - -autocmd FileType latex unmap ll -autocmd FileType latex nmap ll (vimtex-compile) - diff --git a/files/dotfiles/vim/templates/skeleton.py b/files/dotfiles/vim/templates/skeleton.py deleted file mode 100644 index 66e5936..0000000 --- a/files/dotfiles/vim/templates/skeleton.py +++ /dev/null @@ -1,14 +0,0 @@ -#!/usr/bin/env python -# encoding: utf-8 - - -__all__ = [] - - - - - -# ----------------------------- -# Reglages pour 'vim' -# vim:set autoindent expandtab tabstop=4 shiftwidth=4: -# cursor: 16 del diff --git a/files/dotfiles/vimrc b/files/dotfiles/vimrc deleted file mode 100644 index d6c4dbd..0000000 --- a/files/dotfiles/vimrc +++ /dev/null @@ -1,124 +0,0 @@ -set nocompatible " be iMproved, required -noremap -map -let mapleader = "\" -let localleader = "\" - -" set the runtime path to include plug.com and initialize -call plug#begin('~/.vim/plugged') - -"" plug.vim management -Plug 'junegunn/vim-plug' - -" Airline statusline -" Plug 'vim-airline/vim-airline' -" Plug 'vim-airline/vim-airline-themes' -Plug 'itchyny/lightline.vim' - - -"" Basic config for vim -Plug 'tpope/vim-sensible' - -" Git integration -Plug 'tpope/vim-fugitive' - -" Nerdtree -Plug 'scrooloose/nerdtree' -Plug 'Xuyuanp/nerdtree-git-plugin' -"Plug 'jistr/vim-nerdtree-tabs' - -" Supertab (tab instead of ctrl-n or p -Plug 'ervandew/supertab' - -" Special autocompletion -" Plug 'SirVer/ultisnips' -" Plug 'honza/vim-snippets' -"Plug 'ctrlpvim/ctrlp.vim' -"Plug 'Valloric/YouCompleteMe' - -" Change surround -Plug 'tpope/vim-surround' - -"" Plug vimtex -" Plug 'lervag/vimtex' - -" Asynchronous Lint Engine -" Plug 'w0rp/ale' - -" Completion for python -" Plug 'davidhalter/jedi-vim' - -" Code formating for python -" Plug 'python/black' - -" Vim note taking plugin -" Plug 'xolox/vim-misc' -" Plug 'xolox/vim-notes' - -" vuejs syntax -" Plug 'posva/vim-vue' - -" Clever substitute -Plug 'tpope/tpope-vim-abolish' - -" Repeat -Plug 'tpope/vim-repeat' - -" Git on lines -Plug 'airblade/vim-gitgutter' - -" Emmet -" Plug 'mattn/emmet-vim' - -" Polyglot synthax hightlight autodetect -Plug 'sheerun/vim-polyglot' - -" Show indent lines -Plug 'Yggdroot/indentLine' - -" fzf -" Plug 'junegunn/fzf.vim' - -" Tmux integration -Plug 'christoomey/vim-tmux-navigator' - -" Python folding -" Plug 'kalekundert/vim-coiled-snake' -" Plug 'Konfekt/FastFold' - -" Touch typing -" Plug 'vim-scripts/TTCoach' - -" Distraction free writing -Plug 'junegunn/goyo.vim' - - -""Plug 'edkolev/tmuxline.vim' -"Plug 'nvie/vim-flake8' -"Plug 'chriskempson/base16-vim' -"Plug 'chase/vim-ansible-yaml' -"Plug 'tmhedberg/SimpylFold' -"Plug 'vim-pandoc/vim-pandoc' -"Plug 'vim-pandoc/vim-pandoc-syntax' -"Plug 'Rykka/riv.vim' -"Plug 'aperezdc/vim-template' -" -" -"" Color scheme -"Plug 'vim-scripts/Wombat' -"Plug 'fugalh/desert.vim' -Plug 'jnurmine/Zenburn' -"Plug 'altercation/vim-colors-solarized' -"Plug 'blockloop/vim-codeschool' -"Plug 'ryanoasis/vim-devicons' - -" All of your Plugs must be added before the following line -call plug#end() " required -" - -" import config from ./config -" runtime! config/**/*.vim -"runtime! config/*.vim -runtime! config/base.vim -runtime! config/plugins.vim -set conceallevel=0 diff --git a/files/dotfiles/zsh/.zshrc b/files/dotfiles/zsh/.zshrc deleted file mode 100644 index a5eb894..0000000 --- a/files/dotfiles/zsh/.zshrc +++ /dev/null @@ -1,81 +0,0 @@ -fpath+=$ZDOTDIR/pure - -autoload -U compinit -zstyle ':completion:*' matcher-list 'm:{a-z}={A-Za-z}' # menu select=2 -zmodload zsh/complist -compinit -_comp_options+=(globdots) # Include hidden files. - -# Prompt theme -# git clone https://github.com/sindresorhus/pure ~/.config/zsh/ -autoload -U promptinit; promptinit -prompt pure - -# Cursor for vimode -# ZLE hooks for prompt's vi mode status -function zle-line-init zle-keymap-select { - # Change the cursor style depending on keymap mode. - case $KEYMAP { - vicmd) - printf '\e[0 q' # Box. - ;; - - viins|main) - printf '\e[6 q' # Vertical bar. - ;; - } -} -zle -N zle-line-init -zle -N zle-keymap-select - -# Switch between vimode quickly -export KEYTIMEOUT=1 - -# Alias -## Colors -alias ls='ls --color' -alias grep='grep --color=auto' -alias fgrep='fgrep --color=auto' -alias egrep='egrep --color=auto' -## Prompt when over right -alias cp='cp -iv' -alias mv='mv -iv' -alias rm='rm -i' - -alias newsboat='tmux new -As newsboat newsboat' - - -# Autosuggestions -# git clone https://github.com/zsh-users/zsh-autosuggestions ~/.config/zsh/ -source ~/.config/zsh/zsh-autosuggestions/zsh-autosuggestions.zsh -ZSH_AUTOSUGGEST_STRATEGY=(history completion) - -# Syntax Highlight -# git clone https://github.com/zsh-users/zsh-syntax-highlighting ~/.config/zsh/ -source ~/.config/zsh/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh - -# Substring search -# git clone https://github.com/zsh-users/zsh-history-substring-search ~/.config/zsh -source ~/.config/zsh/zsh-history-substring-search/zsh-history-substring-search.zsh - -# Ignore duplicate commands in history -setopt HIST_IGNORE_DUPS -bindkey '^[[A' history-substring-search-up -bindkey '^[[B' history-substring-search-down -bindkey -M vicmd 'k' history-substring-search-up -bindkey -M vicmd 'j' history-substring-search-down - -# Auto-ls -source ~/.config/zsh/auto-ls/auto-ls.zsh - - -source ~/.config/zsh/completion.zsh -source ~/.config/zsh/key-bindings.zsh - -_fzf_complete_pass() { - ARGS="$@" - _fzf_complete '' "$@" < <( - command find ~/.password-store/ -name "*.gpg" | sed -r 's,(.*)\.password-store/(.*)\.gpg,\2,' - ) -} - diff --git a/files/dotfiles/zsh/completion.zsh b/files/dotfiles/zsh/completion.zsh deleted file mode 100644 index f12afca..0000000 --- a/files/dotfiles/zsh/completion.zsh +++ /dev/null @@ -1,329 +0,0 @@ -# ____ ____ -# / __/___ / __/ -# / /_/_ / / /_ -# / __/ / /_/ __/ -# /_/ /___/_/ completion.zsh -# -# - $FZF_TMUX (default: 0) -# - $FZF_TMUX_OPTS (default: '-d 40%') -# - $FZF_COMPLETION_TRIGGER (default: '**') -# - $FZF_COMPLETION_OPTS (default: empty) - -# Both branches of the following `if` do the same thing -- define -# __fzf_completion_options such that `eval $__fzf_completion_options` sets -# all options to the same values they currently have. We'll do just that at -# the bottom of the file after changing options to what we prefer. -# -# IMPORTANT: Until we get to the `emulate` line, all words that *can* be quoted -# *must* be quoted in order to prevent alias expansion. In addition, code must -# be written in a way works with any set of zsh options. This is very tricky, so -# careful when you change it. -# -# Start by loading the builtin zsh/parameter module. It provides `options` -# associative array that stores current shell options. -if 'zmodload' 'zsh/parameter' 2>'/dev/null' && (( ${+options} )); then - # This is the fast branch and it gets taken on virtually all Zsh installations. - # - # ${(kv)options[@]} expands to array of keys (option names) and values ("on" - # or "off"). The subsequent expansion# with (j: :) flag joins all elements - # together separated by spaces. __fzf_completion_options ends up with a value - # like this: "options=(shwordsplit off aliases on ...)". - __fzf_completion_options="options=(${(j: :)${(kv)options[@]}})" -else - # This branch is much slower because it forks to get the names of all - # zsh options. It's possible to eliminate this fork but it's not worth the - # trouble because this branch gets taken only on very ancient or broken - # zsh installations. - () { - # That `()` above defines an anonymous function. This is essentially a scope - # for local parameters. We use it to avoid polluting global scope. - 'local' '__fzf_opt' - __fzf_completion_options="setopt" - # `set -o` prints one line for every zsh option. Each line contains option - # name, some spaces, and then either "on" or "off". We just want option names. - # Expansion with (@f) flag splits a string into lines. The outer expansion - # removes spaces and everything that follow them on every line. __fzf_opt - # ends up iterating over option names: shwordsplit, aliases, etc. - for __fzf_opt in "${(@)${(@f)$(set -o)}%% *}"; do - if [[ -o "$__fzf_opt" ]]; then - # Option $__fzf_opt is currently on, so remember to set it back on. - __fzf_completion_options+=" -o $__fzf_opt" - else - # Option $__fzf_opt is currently off, so remember to set it back off. - __fzf_completion_options+=" +o $__fzf_opt" - fi - done - # The value of __fzf_completion_options here looks like this: - # "setopt +o shwordsplit -o aliases ..." - } -fi - -# Enable the default zsh options (those marked with in `man zshoptions`) -# but without `aliases`. Aliases in functions are expanded when functions are -# defined, so if we disable aliases here, we'll be sure to have no pesky -# aliases in any of our functions. This way we won't need prefix every -# command with `command` or to quote every word to defend against global -# aliases. Note that `aliases` is not the only option that's important to -# control. There are several others that could wreck havoc if they are set -# to values we don't expect. With the following `emulate` command we -# sidestep this issue entirely. -'emulate' 'zsh' '-o' 'no_aliases' - -# This brace is the start of try-always block. The `always` part is like -# `finally` in lesser languages. We use it to *always* restore user options. -{ - -# Bail out if not interactive shell. -[[ -o interactive ]] || return 0 - -# To use custom commands instead of find, override _fzf_compgen_{path,dir} -if ! declare -f _fzf_compgen_path > /dev/null; then - _fzf_compgen_path() { - echo "$1" - command find -L "$1" \ - -name .git -prune -o -name .hg -prune -o -name .svn -prune -o \( -type d -o -type f -o -type l \) \ - -a -not -path "$1" -print 2> /dev/null | sed 's@^\./@@' - } -fi - -if ! declare -f _fzf_compgen_dir > /dev/null; then - _fzf_compgen_dir() { - command find -L "$1" \ - -name .git -prune -o -name .hg -prune -o -name .svn -prune -o -type d \ - -a -not -path "$1" -print 2> /dev/null | sed 's@^\./@@' - } -fi - -########################################################### - -__fzf_comprun() { - if [[ "$(type _fzf_comprun 2>&1)" =~ function ]]; then - _fzf_comprun "$@" - elif [ -n "$TMUX_PANE" ] && { [ "${FZF_TMUX:-0}" != 0 ] || [ -n "$FZF_TMUX_OPTS" ]; }; then - shift - if [ -n "$FZF_TMUX_OPTS" ]; then - fzf-tmux ${(Q)${(Z+n+)FZF_TMUX_OPTS}} -- "$@" - else - fzf-tmux -d ${FZF_TMUX_HEIGHT:-40%} -- "$@" - fi - else - shift - fzf "$@" - fi -} - -# Extract the name of the command. e.g. foo=1 bar baz** -__fzf_extract_command() { - local token tokens - tokens=(${(z)1}) - for token in $tokens; do - token=${(Q)token} - if [[ "$token" =~ [[:alnum:]] && ! "$token" =~ "=" ]]; then - echo "$token" - return - fi - done - echo "${tokens[1]}" -} - -__fzf_generic_path_completion() { - local base lbuf cmd compgen fzf_opts suffix tail dir leftover matches - base=$1 - lbuf=$2 - cmd=$(__fzf_extract_command "$lbuf") - compgen=$3 - fzf_opts=$4 - suffix=$5 - tail=$6 - - setopt localoptions nonomatch - eval "base=$base" - [[ $base = *"/"* ]] && dir="$base" - while [ 1 ]; do - if [[ -z "$dir" || -d ${dir} ]]; then - leftover=${base/#"$dir"} - leftover=${leftover/#\/} - [ -z "$dir" ] && dir='.' - [ "$dir" != "/" ] && dir="${dir/%\//}" - matches=$(eval "$compgen $(printf %q "$dir")" | FZF_DEFAULT_OPTS="--height ${FZF_TMUX_HEIGHT:-40%} --reverse --bind=ctrl-z:ignore $FZF_DEFAULT_OPTS $FZF_COMPLETION_OPTS" __fzf_comprun "$cmd" ${(Q)${(Z+n+)fzf_opts}} -q "$leftover" | while read item; do - echo -n "${(q)item}$suffix " - done) - matches=${matches% } - if [ -n "$matches" ]; then - LBUFFER="$lbuf$matches$tail" - fi - zle reset-prompt - break - fi - dir=$(dirname "$dir") - dir=${dir%/}/ - done -} - -_fzf_path_completion() { - __fzf_generic_path_completion "$1" "$2" _fzf_compgen_path \ - "-m" "" " " -} - -_fzf_dir_completion() { - __fzf_generic_path_completion "$1" "$2" _fzf_compgen_dir \ - "" "/" "" -} - -_fzf_feed_fifo() ( - command rm -f "$1" - mkfifo "$1" - cat <&0 > "$1" & -) - -_fzf_complete() { - setopt localoptions ksh_arrays - # Split arguments around -- - local args rest str_arg i sep - args=("$@") - sep= - for i in {0..${#args[@]}}; do - if [[ "${args[$i]}" = -- ]]; then - sep=$i - break - fi - done - if [[ -n "$sep" ]]; then - str_arg= - rest=("${args[@]:$((sep + 1)):${#args[@]}}") - args=("${args[@]:0:$sep}") - else - str_arg=$1 - args=() - shift - rest=("$@") - fi - - local fifo lbuf cmd matches post - fifo="${TMPDIR:-/tmp}/fzf-complete-fifo-$$" - lbuf=${rest[0]} - cmd=$(__fzf_extract_command "$lbuf") - post="${funcstack[1]}_post" - type $post > /dev/null 2>&1 || post=cat - - _fzf_feed_fifo "$fifo" - matches=$(FZF_DEFAULT_OPTS="--height ${FZF_TMUX_HEIGHT:-40%} --reverse --bind=ctrl-z:ignore $FZF_DEFAULT_OPTS $FZF_COMPLETION_OPTS $str_arg" __fzf_comprun "$cmd" "${args[@]}" -q "${(Q)prefix}" < "$fifo" | $post | tr '\n' ' ') - if [ -n "$matches" ]; then - LBUFFER="$lbuf$matches" - fi - command rm -f "$fifo" -} - -_fzf_complete_telnet() { - _fzf_complete +m -- "$@" < <( - command grep -v '^\s*\(#\|$\)' /etc/hosts | command grep -Fv '0.0.0.0' | - awk '{if (length($2) > 0) {print $2}}' | sort -u - ) -} - -_fzf_complete_ssh() { - _fzf_complete +m -- "$@" < <( - setopt localoptions nonomatch - command cat <(command tail -n +1 ~/.ssh/config ~/.ssh/config.d/* /etc/ssh/ssh_config 2> /dev/null | command grep -i '^\s*host\(name\)\? ' | awk '{for (i = 2; i <= NF; i++) print $1 " " $i}' | command grep -v '[*?]') \ - <(command grep -oE '^[[a-z0-9.,:-]+' ~/.ssh/known_hosts | tr ',' '\n' | tr -d '[' | awk '{ print $1 " " $1 }') \ - <(command grep -v '^\s*\(#\|$\)' /etc/hosts | command grep -Fv '0.0.0.0') | - awk '{if (length($2) > 0) {print $2}}' | sort -u - ) -} - -_fzf_complete_export() { - _fzf_complete -m -- "$@" < <( - declare -xp | sed 's/=.*//' | sed 's/.* //' - ) -} - -_fzf_complete_unset() { - _fzf_complete -m -- "$@" < <( - declare -xp | sed 's/=.*//' | sed 's/.* //' - ) -} - -_fzf_complete_unalias() { - _fzf_complete +m -- "$@" < <( - alias | sed 's/=.*//' - ) -} - -_fzf_complete_kill() { - _fzf_complete -m --preview 'echo {}' --preview-window down:3:wrap --min-height 15 -- "$@" < <( - command ps -ef | sed 1d - ) -} - -_fzf_complete_kill_post() { - awk '{print $2}' -} - -fzf-completion() { - local tokens cmd prefix trigger tail matches lbuf d_cmds - setopt localoptions noshwordsplit noksh_arrays noposixbuiltins - - # http://zsh.sourceforge.net/FAQ/zshfaq03.html - # http://zsh.sourceforge.net/Doc/Release/Expansion.html#Parameter-Expansion-Flags - tokens=(${(z)LBUFFER}) - if [ ${#tokens} -lt 1 ]; then - zle ${fzf_default_completion:-expand-or-complete} - return - fi - - cmd=$(__fzf_extract_command "$LBUFFER") - - # Explicitly allow for empty trigger. - trigger=${FZF_COMPLETION_TRIGGER-'**'} - [ -z "$trigger" -a ${LBUFFER[-1]} = ' ' ] && tokens+=("") - - # When the trigger starts with ';', it becomes a separate token - if [[ ${LBUFFER} = *"${tokens[-2]}${tokens[-1]}" ]]; then - tokens[-2]="${tokens[-2]}${tokens[-1]}" - tokens=(${tokens[0,-2]}) - fi - - lbuf=$LBUFFER - tail=${LBUFFER:$(( ${#LBUFFER} - ${#trigger} ))} - # Kill completion (do not require trigger sequence) - if [ "$cmd" = kill -a ${LBUFFER[-1]} = ' ' ]; then - tail=$trigger - tokens+=$trigger - lbuf="$lbuf$trigger" - fi - - # Trigger sequence given - if [ ${#tokens} -gt 1 -a "$tail" = "$trigger" ]; then - d_cmds=(${=FZF_COMPLETION_DIR_COMMANDS:-cd pushd rmdir}) - - [ -z "$trigger" ] && prefix=${tokens[-1]} || prefix=${tokens[-1]:0:-${#trigger}} - [ -n "${tokens[-1]}" ] && lbuf=${lbuf:0:-${#tokens[-1]}} - - if eval "type _fzf_complete_${cmd} > /dev/null"; then - prefix="$prefix" eval _fzf_complete_${cmd} ${(q)lbuf} - zle reset-prompt - elif [ ${d_cmds[(i)$cmd]} -le ${#d_cmds} ]; then - _fzf_dir_completion "$prefix" "$lbuf" - else - _fzf_path_completion "$prefix" "$lbuf" - fi - # Fall back to default completion - else - zle ${fzf_default_completion:-expand-or-complete} - fi -} - -[ -z "$fzf_default_completion" ] && { - binding=$(bindkey '^I') - [[ $binding =~ 'undefined-key' ]] || fzf_default_completion=$binding[(s: :w)2] - unset binding -} - -zle -N fzf-completion -bindkey '^I' fzf-completion - -} always { - # Restore the original options. - eval $__fzf_completion_options - 'unset' '__fzf_completion_options' -} diff --git a/files/dotfiles/zsh/key-bindings.zsh b/files/dotfiles/zsh/key-bindings.zsh deleted file mode 100644 index 8efa6af..0000000 --- a/files/dotfiles/zsh/key-bindings.zsh +++ /dev/null @@ -1,114 +0,0 @@ -# ____ ____ -# / __/___ / __/ -# / /_/_ / / /_ -# / __/ / /_/ __/ -# /_/ /___/_/ key-bindings.zsh -# -# - $FZF_TMUX_OPTS -# - $FZF_CTRL_T_COMMAND -# - $FZF_CTRL_T_OPTS -# - $FZF_CTRL_R_OPTS -# - $FZF_ALT_C_COMMAND -# - $FZF_ALT_C_OPTS - -# Key bindings -# ------------ - -# The code at the top and the bottom of this file is the same as in completion.zsh. -# Refer to that file for explanation. -if 'zmodload' 'zsh/parameter' 2>'/dev/null' && (( ${+options} )); then - __fzf_key_bindings_options="options=(${(j: :)${(kv)options[@]}})" -else - () { - __fzf_key_bindings_options="setopt" - 'local' '__fzf_opt' - for __fzf_opt in "${(@)${(@f)$(set -o)}%% *}"; do - if [[ -o "$__fzf_opt" ]]; then - __fzf_key_bindings_options+=" -o $__fzf_opt" - else - __fzf_key_bindings_options+=" +o $__fzf_opt" - fi - done - } -fi - -'emulate' 'zsh' '-o' 'no_aliases' - -{ - -[[ -o interactive ]] || return 0 - -# CTRL-T - Paste the selected file path(s) into the command line -__fsel() { - local cmd="${FZF_CTRL_T_COMMAND:-"command find -L . -mindepth 1 \\( -path '*/\\.*' -o -fstype 'sysfs' -o -fstype 'devfs' -o -fstype 'devtmpfs' -o -fstype 'proc' \\) -prune \ - -o -type f -print \ - -o -type d -print \ - -o -type l -print 2> /dev/null | cut -b3-"}" - setopt localoptions pipefail no_aliases 2> /dev/null - local item - eval "$cmd" | FZF_DEFAULT_OPTS="--height ${FZF_TMUX_HEIGHT:-40%} --reverse --bind=ctrl-z:ignore $FZF_DEFAULT_OPTS $FZF_CTRL_T_OPTS" $(__fzfcmd) -m "$@" | while read item; do - echo -n "${(q)item} " - done - local ret=$? - echo - return $ret -} - -__fzfcmd() { - [ -n "$TMUX_PANE" ] && { [ "${FZF_TMUX:-0}" != 0 ] || [ -n "$FZF_TMUX_OPTS" ]; } && - echo "fzf-tmux ${FZF_TMUX_OPTS:--d${FZF_TMUX_HEIGHT:-40%}} -- " || echo "fzf" -} - -fzf-file-widget() { - LBUFFER="${LBUFFER}$(__fsel)" - local ret=$? - zle reset-prompt - return $ret -} -zle -N fzf-file-widget -bindkey '^T' fzf-file-widget - -# ALT-C - cd into the selected directory -fzf-cd-widget() { - local cmd="${FZF_ALT_C_COMMAND:-"command find -L . -mindepth 1 \\( -path '*/\\.*' -o -fstype 'sysfs' -o -fstype 'devfs' -o -fstype 'devtmpfs' -o -fstype 'proc' \\) -prune \ - -o -type d -print 2> /dev/null | cut -b3-"}" - setopt localoptions pipefail no_aliases 2> /dev/null - local dir="$(eval "$cmd" | FZF_DEFAULT_OPTS="--height ${FZF_TMUX_HEIGHT:-40%} --reverse --bind=ctrl-z:ignore $FZF_DEFAULT_OPTS $FZF_ALT_C_OPTS" $(__fzfcmd) +m)" - if [[ -z "$dir" ]]; then - zle redisplay - return 0 - fi - zle push-line # Clear buffer. Auto-restored on next prompt. - BUFFER="cd ${(q)dir}" - zle accept-line - local ret=$? - unset dir # ensure this doesn't end up appearing in prompt expansion - zle reset-prompt - return $ret -} -zle -N fzf-cd-widget -bindkey '\ec' fzf-cd-widget - -# CTRL-R - Paste the selected command from history into the command line -fzf-history-widget() { - local selected num - setopt localoptions noglobsubst noposixbuiltins pipefail no_aliases 2> /dev/null - selected=( $(fc -rl 1 | perl -ne 'print if !$seen{(/^\s*[0-9]+\**\s+(.*)/, $1)}++' | - FZF_DEFAULT_OPTS="--height ${FZF_TMUX_HEIGHT:-40%} $FZF_DEFAULT_OPTS -n2..,.. --tiebreak=index --bind=ctrl-r:toggle-sort,ctrl-z:ignore $FZF_CTRL_R_OPTS --query=${(qqq)LBUFFER} +m" $(__fzfcmd)) ) - local ret=$? - if [ -n "$selected" ]; then - num=$selected[1] - if [ -n "$num" ]; then - zle vi-fetch-history -n $num - fi - fi - zle reset-prompt - return $ret -} -zle -N fzf-history-widget -bindkey '^R' fzf-history-widget - -} always { - eval $__fzf_key_bindings_options - 'unset' '__fzf_key_bindings_options' -} diff --git a/files/dotfiles/zshenv b/files/dotfiles/zshenv deleted file mode 100644 index 11a0b62..0000000 --- a/files/dotfiles/zshenv +++ /dev/null @@ -1,17 +0,0 @@ -export TERM='rxvt-256color' - -# XDG -export XDG_CONFIG_HOME=$HOME/.config - -# editor -export EDITOR="nvim" -export VISUAL="nvim" - - -# zsh -export ZDOTDIR="$XDG_CONFIG_HOME/zsh" -export HISTFILE="$ZDOTDIR/.zhistory" # History filepath -export HISTSIZE=10000 # Maximum events for internal history -export SAVEHIST=10000 # Maximum events in history file - - diff --git a/files/mpd.conf b/files/mpd.conf deleted file mode 100644 index 3bc72d3..0000000 --- a/files/mpd.conf +++ /dev/null @@ -1,257 +0,0 @@ -# An example configuration file for MPD. -# Read the user manual for documentation: http://www.musicpd.org/doc/user/ - - -# Files and directories ####################################################### -# -# This setting controls the top directory which MPD will search to discover the -# available audio files and add them to the daemon's online database. This -# setting defaults to the XDG directory, otherwise the music directory will be -# be disabled and audio files will only be accepted over ipc socket (using -# file:// protocol) or streaming files over an accepted protocol. -# -music_directory "{{ music_dir }}" -# -# This setting sets the MPD internal playlist directory. The purpose of this -# directory is storage for playlists created by MPD. The server will use -# playlist files not created by the server but only if they are in the MPD -# format. This setting defaults to playlist saving being disabled. -# -playlist_directory "~/.mpd/playlists" -# -# This setting sets the location of the MPD database. This file is used to -# load the database at server start up and store the database while the -# server is not up. This setting defaults to disabled which will allow -# MPD to accept files over ipc socket (using file:// protocol) or streaming -# files over an accepted protocol. -# -db_file "~/.mpd/database" -# -# These settings are the locations for the daemon log files for the daemon. -# These logs are great for troubleshooting, depending on your log_level -# settings. -# -# The special value "syslog" makes MPD use the local syslog daemon. This -# setting defaults to logging to syslog. -# -log_file "syslog" -# -# This setting sets the location of the file which stores the process ID -# for use of mpd --kill and some init scripts. This setting is disabled by -# default and the pid file will not be stored. -# -pid_file "~/.mpd/pid" -# -# This setting sets the location of the file which contains information about -# most variables to get MPD back into the same general shape it was in before -# it was brought down. This setting is disabled by default and the server -# state will be reset on server start up. -# -state_file "~/.mpd/state" -# -# The location of the sticker database. This is a database which -# manages dynamic information attached to songs. -# -sticker_file "~/.mpd/sticker.sql" -# -############################################################################### - - -# General music daemon options ################################################ -# -# This setting specifies the user that MPD will run as. MPD should never run as -# root and you may use this setting to make MPD change its user ID after -# initialization. This setting is disabled by default and MPD is run as the -# current user. -# -#user "nobody" -# -# This setting specifies the group that MPD will run as. If not specified -# primary group of user specified with "user" setting will be used (if set). -# This is useful if MPD needs to be a member of group such as "audio" to -# have permission to use sound card. -# -#group "nogroup" -# -# This setting sets the address for the daemon to listen on. Careful attention -# should be paid if this is assigned to anything other then the default, any. -# This setting can deny access to control of the daemon. Not effective if -# systemd socket activiation is in use. -# -# For network -#bind_to_address "any" -# -# And for Unix Socket -#bind_to_address "~/.mpd/socket" -# -# This setting is the TCP port that is desired for the daemon to get assigned -# to. -# -#port "6600" -# -# This setting controls the type of information which is logged. Available -# setting arguments are "default", "secure" or "verbose". The "verbose" setting -# argument is recommended for troubleshooting, though can quickly stretch -# available resources on limited hardware storage. -# -#log_level "default" -# -# Setting "restore_paused" to "yes" puts MPD into pause mode instead -# of starting playback after startup. -# -#restore_paused "no" -# -# This setting enables MPD to create playlists in a format usable by other -# music players. -# -#save_absolute_paths_in_playlists "no" -# -# This setting defines a list of tag types that will be extracted during the -# audio file discovery process. The complete list of possible values can be -# found in the user manual. -#metadata_to_use "artist,album,title,track,name,genre,date,composer,performer,disc" -# -# This example just enables the "comment" tag without disabling all -# the other supported tags: -#metadata_to_use "+comment" -# -# This setting enables automatic update of MPD's database when files in -# music_directory are changed. -# -auto_update "yes" -# -# Limit the depth of the directories being watched, 0 means only watch -# the music directory itself. There is no limit by default. -# -#auto_update_depth "3" -# -############################################################################### - - -# Symbolic link behavior ###################################################### -# -# If this setting is set to "yes", MPD will discover audio files by following -# symbolic links outside of the configured music_directory. -# -#follow_outside_symlinks "yes" -# -# If this setting is set to "yes", MPD will discover audio files by following -# symbolic links inside of the configured music_directory. -# -#follow_inside_symlinks "yes" -# -############################################################################### - - -# Zeroconf / Avahi Service Discovery ########################################## -# -# If this setting is set to "yes", service information will be published with -# Zeroconf / Avahi. -# -#zeroconf_enabled "yes" -# -# The argument to this setting will be the Zeroconf / Avahi unique name for -# this MPD server on the network. %h will be replaced with the hostname. -# -#zeroconf_name "Music Player @ %h" -# -############################################################################### - - -# Permissions ################################################################# -# -# If this setting is set, MPD will require password authorization. The password -# setting can be specified multiple times for different password profiles. -# -#password "password@read,add,control,admin" -# -# This setting specifies the permissions a user has who has not yet logged in. -# -#default_permissions "read,add,control,admin" -# -############################################################################### - - -# Database ####################################################################### -# - -#database { -# plugin "proxy" -# host "other.mpd.host" -# port "6600" -#} - -# Input ####################################################################### -# - -input { - plugin "curl" -# proxy "proxy.isp.com:8080" -# proxy_user "user" -# proxy_password "password" -} - -# -############################################################################### - -# Audio Output ################################################################ -# -# MPD supports various audio output types, as well as playing through multiple -# audio outputs at the same time, through multiple audio_output settings -# blocks. Setting this block is optional, though the server will only attempt -# autodetection for one sound card. -# -audio_output { - type "pulse" - name "pulse audio" -} -############################################################################### - - -# Normalization automatic volume adjustments ################################## -# -# This setting specifies the type of ReplayGain to use. This setting can have -# the argument "off", "album", "track" or "auto". "auto" is a special mode that -# chooses between "track" and "album" depending on the current state of -# random playback. If random playback is enabled then "track" mode is used. -# See for more details about ReplayGain. -# This setting is off by default. -# -#replaygain "album" -# -# This setting sets the pre-amp used for files that have ReplayGain tags. By -# default this setting is disabled. -# -#replaygain_preamp "0" -# -# This setting sets the pre-amp used for files that do NOT have ReplayGain tags. -# By default this setting is disabled. -# -#replaygain_missing_preamp "0" -# -# This setting enables or disables ReplayGain limiting. -# MPD calculates actual amplification based on the ReplayGain tags -# and replaygain_preamp / replaygain_missing_preamp setting. -# If replaygain_limit is enabled MPD will never amplify audio signal -# above its original level. If replaygain_limit is disabled such amplification -# might occur. By default this setting is enabled. -# -#replaygain_limit "yes" -# -# This setting enables on-the-fly normalization volume adjustment. This will -# result in the volume of all playing audio to be adjusted so the output has -# equal "loudness". This setting is disabled by default. -# -#volume_normalization "no" -# -############################################################################### - -# Character Encoding ########################################################## -# -# If file or directory names do not display correctly for your locale then you -# may need to modify this setting. -# -#filesystem_charset "UTF-8" -# -############################################################################### - diff --git a/files/nginx.conf b/files/nginx.conf deleted file mode 100644 index e3ff10a..0000000 --- a/files/nginx.conf +++ /dev/null @@ -1,51 +0,0 @@ -worker_processes 1; - -events { - worker_connections 1024; -} - -http { - # Use a custom log format that will show response times and cache status - log_format archmirror '$remote_addr - $upstream_cache_status [$time_local] $request_method $host$request_uri $server_protocol $status $body_bytes_sent $request_time $upstream_response_time'; - - # Configure the cache directory, size and keys - proxy_cache_path /srv/http/pacman-cache - levels=1:2 keys_zone=archmirror:60m - inactive=365d use_temp_path=off max_size=3g; - - server { - listen 8080; - server_name cache.local; - - access_log /var/log/nginx/archmirror.access.log archmirror; - error_log /var/log/nginx/archmirror.error.log; - - # Force proxy to use TLS for upstream server requests - proxy_ssl_protocols TLSv1 TLSv1.1 TLSv1.2; - # Use previously negotiated connection parameters - proxy_ssl_session_reuse on; - # Enables revalidation of expired cache items using conditional requests with the "If-Modified-Since" and "If-None-Match" header fields. - proxy_cache_revalidate on; - # Only one request at a time will be allowed to populate a new cache element - proxy_cache_lock on; - # Cache any responses for 1 minute by default, can be overridden by more specific response codes - proxy_cache_valid any 1m; - - # Keep connections to upstream server open - proxy_http_version 1.1; - proxy_set_header Connection ""; - proxy_read_timeout 300; - proxy_connect_timeout 300; - - location / { - proxy_pass http://mirror.archlinux.ikoula.com; - proxy_cache archmirror; # This directive should match the keys_zone option - proxy_cache_valid 200 5m; - proxy_cache_use_stale error timeout invalid_header updating http_500 http_502 http_503 http_504; - - # Add some cache status headers for debugging purposes, you can remove these lines if you want - add_header X-Upstream-Status $upstream_status; - add_header X-Cache-Status $upstream_cache_status; - } - } -} diff --git a/files/sshd_config b/files/sshd_config deleted file mode 100644 index fd930d4..0000000 --- a/files/sshd_config +++ /dev/null @@ -1,117 +0,0 @@ -# $OpenBSD: sshd_config,v 1.102 2018/02/16 02:32:40 djm Exp $ - -# This is the sshd server system-wide configuration file. See -# sshd_config(5) for more information. - -# This sshd was compiled with PATH=/usr/local/sbin:/usr/local/bin:/usr/bin - -# The strategy used for options in the default sshd_config shipped with -# OpenSSH is to specify options with their default value where -# possible, but leave them commented. Uncommented options override the -# default value. - -#Port 22 -#AddressFamily any -#ListenAddress 0.0.0.0 -#ListenAddress :: - -#HostKey /etc/ssh/ssh_host_rsa_key -#HostKey /etc/ssh/ssh_host_ecdsa_key -#HostKey /etc/ssh/ssh_host_ed25519_key - -# Ciphers and keying -#RekeyLimit default none - -# Logging -#SyslogFacility AUTH -#LogLevel INFO - -# Authentication: - -#LoginGraceTime 2m -#PermitRootLogin prohibit-password -#StrictModes yes -#MaxAuthTries 6 -#MaxSessions 10 - -#PubkeyAuthentication yes - -# The default is to check both .ssh/authorized_keys and .ssh/authorized_keys2 -# but this is overridden so installations will only check .ssh/authorized_keys -AuthorizedKeysFile .ssh/authorized_keys - -#AuthorizedPrincipalsFile none - -#AuthorizedKeysCommand none -#AuthorizedKeysCommandUser nobody - -# For this to work you will also need host keys in /etc/ssh/ssh_known_hosts -#HostbasedAuthentication no -# Change to yes if you don't trust ~/.ssh/known_hosts for -# HostbasedAuthentication -#IgnoreUserKnownHosts no -# Don't read the user's ~/.rhosts and ~/.shosts files -#IgnoreRhosts yes - -# To disable tunneled clear text passwords, change to no here! -#PasswordAuthentication yes -#PermitEmptyPasswords no - -# Change to no to disable s/key passwords -ChallengeResponseAuthentication no - -# Kerberos options -#KerberosAuthentication no -#KerberosOrLocalPasswd yes -#KerberosTicketCleanup yes -#KerberosGetAFSToken no - -# GSSAPI options -#GSSAPIAuthentication no -#GSSAPICleanupCredentials yes - -# Set this to 'yes' to enable PAM authentication, account processing, -# and session processing. If this is enabled, PAM authentication will -# be allowed through the ChallengeResponseAuthentication and -# PasswordAuthentication. Depending on your PAM configuration, -# PAM authentication via ChallengeResponseAuthentication may bypass -# the setting of "PermitRootLogin without-password". -# If you just want the PAM account and session checks to run without -# PAM authentication, then enable this but set PasswordAuthentication -# and ChallengeResponseAuthentication to 'no'. -UsePAM yes - -#AllowAgentForwarding yes -#AllowTcpForwarding yes -#GatewayPorts no -#X11Forwarding no -#X11DisplayOffset 10 -#X11UseLocalhost yes -#PermitTTY yes -PrintMotd no # pam does that -#PrintLastLog yes -#TCPKeepAlive yes -#UseLogin no -#PermitUserEnvironment no -#Compression delayed -#ClientAliveInterval 0 -#ClientAliveCountMax 3 -#UseDNS no -#PidFile /run/sshd.pid -#MaxStartups 10:30:100 -#PermitTunnel no -#ChrootDirectory none -#VersionAddendum none - -# no default banner path -#Banner none - -# override default of no subsystems -Subsystem sftp /usr/lib/ssh/sftp-server - -# Example of overriding settings on a per-user basis -#Match User anoncvs -# X11Forwarding no -# AllowTcpForwarding no -# PermitTTY no -# ForceCommand cvs server diff --git a/files/sshpubs/id_ed25519_choux2bv_admin.pub b/files/sshpubs/id_ed25519_choux2bv_admin.pub deleted file mode 100644 index a6a5241..0000000 --- a/files/sshpubs/id_ed25519_choux2bv_admin.pub +++ /dev/null @@ -1 +0,0 @@ -ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIO8yazGCU0ibycAR8MpIwQMGt39TzNhMdPH20+t/YjP3 waha@Choux-2020-03-15 diff --git a/files/sshpubs/id_ed25519_choux2panais_admin.pub b/files/sshpubs/id_ed25519_choux2panais_admin.pub deleted file mode 100755 index e264298..0000000 --- a/files/sshpubs/id_ed25519_choux2panais_admin.pub +++ /dev/null @@ -1 +0,0 @@ -ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILA5ZkwTDD6UM6e/J2p0QtZz6h+9dVgjldRyUARe5h54 waha@Choux-2020-03-16 diff --git a/files/sshpubs/id_ed25519_choux2panais_content.pub b/files/sshpubs/id_ed25519_choux2panais_content.pub deleted file mode 100644 index 6e92392..0000000 --- a/files/sshpubs/id_ed25519_choux2panais_content.pub +++ /dev/null @@ -1 +0,0 @@ -ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIC+43qSvi4NJXHZRmtf5x31mK46aa0T7hr4q3SGIYMit lafrite@Choux-2020-07-16 diff --git a/files/sshpubs/id_ed25519_combava2abertrand_admin.pub b/files/sshpubs/id_ed25519_combava2abertrand_admin.pub deleted file mode 100644 index f07000a..0000000 --- a/files/sshpubs/id_ed25519_combava2abertrand_admin.pub +++ /dev/null @@ -1 +0,0 @@ -ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAmb61dPl1s7oAPfsmNr9SEUYS22XGZb/nei3HySGHsM waha@Combava-2021-01-02 diff --git a/files/sshpubs/id_ed25519_combava2bv_admin.pub b/files/sshpubs/id_ed25519_combava2bv_admin.pub deleted file mode 100644 index ca2d43a..0000000 --- a/files/sshpubs/id_ed25519_combava2bv_admin.pub +++ /dev/null @@ -1 +0,0 @@ -ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIN70/wXJo0+H4IH05kaeWbhZHD4PWInWZ+/RkS+iDOkK waha@Combava-2020-03-23 diff --git a/files/sshpubs/id_ed25519_combava2panais_admin.pub b/files/sshpubs/id_ed25519_combava2panais_admin.pub deleted file mode 100644 index f533829..0000000 --- a/files/sshpubs/id_ed25519_combava2panais_admin.pub +++ /dev/null @@ -1 +0,0 @@ -ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIJDrUg73h/Junk2Bw2yrEW5GZ/feso3q3TmH2bZ4vTl waha@Combava-2020-03-23 diff --git a/files/sshpubs/id_ed25519_combava2panais_content.pub b/files/sshpubs/id_ed25519_combava2panais_content.pub deleted file mode 100644 index d8d68ec..0000000 --- a/files/sshpubs/id_ed25519_combava2panais_content.pub +++ /dev/null @@ -1 +0,0 @@ -ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIA7nADr+vFmnLTRdOwOMObDh0IoXhMpFAu64v5PioCNp lafrite@Combava-2020-07-17 diff --git a/files/sshpubs/id_ed25519_embrevade.pub b/files/sshpubs/id_ed25519_embrevade.pub deleted file mode 100644 index caa785a..0000000 --- a/files/sshpubs/id_ed25519_embrevade.pub +++ /dev/null @@ -1 +0,0 @@ -ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJUqG2jXhu8S4LIeaMCzXhR27TU85OJZzQF1Qmi21VL2 lafrite@Poivre diff --git a/files/sshpubs/id_rsa_embrevade.pub b/files/sshpubs/id_rsa_embrevade.pub deleted file mode 100644 index 0049f2b..0000000 --- a/files/sshpubs/id_rsa_embrevade.pub +++ /dev/null @@ -1 +0,0 @@ -ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDhvZQzQWsSBYBi2+G1yaSFdUxfBYYJqsQ1QZ6TKKEk3xblzeuOi30JTOBXr7hRqvcdJhT6HSjdEGgXlo5OvJFUTGnNQ5NYn2t8zbYJ7z4zXa8dUn/e/GViuU5hLxHV4PbdXmontgNqrR0EZhCbmOUX6WM1x1L/3aJ32r+/+1mjwPfybCX7uz2la6DSWYUH7M6wfe8HiDHYcH8RVfgzKm6lL3Ph3ausH9DwGQN1e4B67rInSSVQ7FqOa/3o2P4r9umXMcjV5xFBhYjAfMSFanVWXG/6Tx3XH4MyM+yXzdfZlaP7hdjFFPwC4izPM0DGifwTNzkjBVdpwAlaAjQUn1s4AWehab6T0PU5vK1djvuzIeAvtIFCcHd2eukoC0k1tOKtmWbqWZRK7i3Hbano0AFsYUgaijfDn6RZhLU3hydQUyJ+gvKzOF+pQwZ+69zDnuMnnDW7MC14eWjhyBHensRQtQOYV7KRY6vq9Ibrv3ANrBK4/Kc4uv0hEt+SpWcDCsstF2qWirqEn/qiTMfLKQvfUjOb5op+RC6R3l13QAsUwtcxflQQBsXeWd92sYZN5XEiaQGED6/CXK6ZLxGrStssFRgCMN+AcbOwMwWQbmS//DguI7ITwyQQAXZjU3KHyc9lI/vhpLr8UOJRfyUWQRMLaPssVoL4Z/75Tj0Sh1YDVQ== waha@Choux diff --git a/files/sshpubs/id_rsa_nas2bv_backup.pub b/files/sshpubs/id_rsa_nas2bv_backup.pub deleted file mode 100644 index 163a540..0000000 --- a/files/sshpubs/id_rsa_nas2bv_backup.pub +++ /dev/null @@ -1 +0,0 @@ -ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDsQmtcKMagQm/JQxmgZqP5vQzvvADprvgcRbAF8vDw8mh9sZw1nypJzAW4JG/M1m3U21nWOv0UFig3roSEjul+tLJ6CDrma4duKoFezgYFF29wQfwqThxHno0CAkOajR10mi3mAFzJhmi8aOhpW+T1vpuOMOp4imnF2kkD5AqtOgo8WtuLZtUTV5oz//jM07NovKWHf+qi+pXzQ0YwuKZH3cCKmB4z68oh829WVzsXIh4zPiQtUNl2wLwvsRKw9eets2fNhvSKPkuMg5bZwdq679j+xegyIt/IFey305WX6sHxEE+fWAD9R4wZFpplVQohNpCrug1/2aOwh8k84I/D nas2bv diff --git a/files/sshpubs/id_rsa_nas2panais_backup.pub b/files/sshpubs/id_rsa_nas2panais_backup.pub deleted file mode 100644 index 5b4815e..0000000 --- a/files/sshpubs/id_rsa_nas2panais_backup.pub +++ /dev/null @@ -1 +0,0 @@ -ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDi6hbp6qPU+jIGnD2JKrXT0xW8pZ86ZdLZgbCaCgLoCrhUlARE4DzRadQtZqbjF9vqlCsOx83PlgBdN99+A05os5wLuxMx8mDD3IChIkZr2t0jVV4d4l2xToTFVWeYmzG0z4+5/lygYgOQtCae4wuGO+j4hMzn4MT3NMCYO8kT1gQkyXizigVE2ncI5g5tsIYPjzmU+Nb80sHXSnOHlKUeVdWR3OHZ0YHLnserb0luaezaWZwN7t3rZajNA/JXb9UPA67dXgDgoBUs+hLpIjwEBNseNWJWsbJ6QQ+8A9RPA5IC4H6EYWZbcY9vJBKGpZwAWUhtvs+uMSURJqLTuUYX NAS2Panais diff --git a/files/sshpubs/id_rsa_poivre_borg.pub b/files/sshpubs/id_rsa_poivre_borg.pub deleted file mode 100644 index 676f6ef..0000000 --- a/files/sshpubs/id_rsa_poivre_borg.pub +++ /dev/null @@ -1 +0,0 @@ -ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDPuEcyD0F2z8hlPPFkVV0EcbCJR/SxO4ajpPnVhkJI++KCvZEIhII0S3j0nQcukzN3saiVzzzYACyoCUdDVQZV7eoQ2R4eWMDSd10ToHbQezlneWT+wLhsJ2H8lo+e5Ny1AzEAE4ho1wxeQN3lZX5g0S5HFx/bVpiQSoks8ItjnUjmbeMQmWWDM4F9kQeSpOu2WWWT5o7BCBmXCFNrmF5pXHsYiAV5LMnOSs7l1e0o4aVJJfv+529qrITVzSYCtKaTIFTNbmwZlrKOAjIjbM/rRUturBg/2ToaSzIKTwZOS4Wb9NuKYMOAFtOZ3rbFimjIOsGB13D1oG/qgOyZN3tX lafrite@Poivre diff --git a/files/sshpubs/id_rsa_rpi3.pub b/files/sshpubs/id_rsa_rpi3.pub deleted file mode 100644 index 51558fd..0000000 --- a/files/sshpubs/id_rsa_rpi3.pub +++ /dev/null @@ -1 +0,0 @@ -ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDUdwkgAIk6de4xFufXknkNRrFwKZQ6IaEWQW8Wnefc8Un2yXtZrNvPuz60bLIJHc/4+yIC5uuJgCwyRxJgf9RYDzI/I3zzRd/0IfBDExoXFaxsHOYpFzufvLuQ7QSEg5URK94QU3mBacwujj3NVQSNwGXairXJ3pNggtOULJ72O33zXgO5tEiL8lYxPtZ1cAGuXzxdjEvItuxj7Vcg/NSMCuC2bzjilI7/beds7tUuPPfQ00GM4Jy1KE7pAoNu7pdQLT8Of8QUinIKWQf8c7VsoNupNfhhh8TcDzZUIyibZJ1W4K3+HQ7x6NKb0lgr8M+G5wHoOYC00hNA044cV28LdEPDv6FTYvJe4WBKfjz6vmDmQ+1dbCOukg3uWqQ3n5z5uON0qENp27z3NXs9rHI+uUFw1xnSxHtFhdUBTygr4fbTa6SFFPnYbrDw3uiNQsa6yThh5k35n6McvBnaiP0gPv3sgbfBNjHIVWIw9EZHlhoj3d/bP3xPx+zV292EqwM2zs5z41wBc6AumoeFEH9zg1CVuRX1B4uapA2m3k4g9ZqZr6LxjwC5Tcz7H+6nFTgh7yOwItS7ZnJTNuxXE6fPdFcVHrWF2dP2PfjEVV+IJhDAKWnnslT5VSWZogD5JXnJb/Nh+wWjxAA1hQWevSso70sBA/pPDGnzZih1ewLNWQ== waha@Choux diff --git a/files/sudoers b/files/sudoers deleted file mode 100644 index 7d54e99..0000000 --- a/files/sudoers +++ /dev/null @@ -1,7 +0,0 @@ -root ALL=(ALL) ALL -%sudo ALL=(ALL) ALL - -Defaults env_reset -Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" - -#includedir /etc/sudoers.d diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..0bb47d7 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,49 @@ +ansible-compat==0.5.0 +arrow==1.2.1 +attrs==21.4.0 +bcrypt==3.2.0 +binaryornot==0.4.4 +Cerberus==1.3.2 +certifi==2021.10.8 +cffi==1.15.0 +chardet==4.0.0 +charset-normalizer==2.0.9 +click==8.0.3 +click-help-colors==0.9.1 +colorama==0.4.4 +commonmark==0.9.1 +cookiecutter==1.7.3 +cryptography==36.0.1 +distro==1.6.0 +enrich==1.2.6 +idna==3.3 +iniconfig==1.1.1 +Jinja2==3.0.3 +jinja2-time==0.2.0 +MarkupSafe==2.0.1 +molecule==3.5.2 +molecule-vagrant==1.0.0 +packaging==21.3 +paramiko==2.9.1 +pluggy==1.0.0 +poyo==0.5.0 +py==1.11.0 +pycparser==2.21 +Pygments==2.11.1 +PyNaCl==1.4.0 +pyparsing==3.0.6 +pytest==6.2.5 +pytest-testinfra==6.5.0 +python-dateutil==2.8.2 +python-slugify==5.0.2 +python-vagrant==0.5.15 +PyYAML==5.4.1 +requests==2.27.0 +rich==10.16.2 +selinux==0.2.1 +six==1.16.0 +subprocess-tee==0.3.5 +testinfra==6.0.0 +text-unidecode==1.3 +toml==0.10.2 +urllib3==1.26.7 diff --git a/roles/.vagrant/bundler/global.sol b/roles/.vagrant/bundler/global.sol new file mode 100644 index 0000000..dae9466 --- /dev/null +++ b/roles/.vagrant/bundler/global.sol @@ -0,0 +1 @@ +{"dependencies":[["racc",["~> 1.4"]],["nokogiri",["~> 1.6"]],["rexml",[">= 0"]],["formatador",["~> 0.2"]],["excon",["~> 0.71"]],["mime-types-data",["~> 3.2015"]],["mime-types",[">= 0"]],["builder",[">= 0"]],["fog-core",["~> 2.1"]],["json",[">= 0"]],["ruby-libvirt",[">= 0.7.0"]],["fog-xml",["~> 0.1.1"]],["multi_json",["~> 1.10"]],["fog-json",[">= 0"]],["fog-libvirt",[">= 0.6.0"]],["vagrant-libvirt",["= 0.7.0"]]],"checksum":"8fb75bcc7ceadece358816f104fd6957b12a29b3415d84307b15e0266c9c38e6","vagrant_version":"2.2.19"} \ No newline at end of file diff --git a/roles/.vagrant/machines/default/virtualbox/action_provision b/roles/.vagrant/machines/default/virtualbox/action_provision new file mode 100644 index 0000000..2fcf52f --- /dev/null +++ b/roles/.vagrant/machines/default/virtualbox/action_provision @@ -0,0 +1 @@ +1.5:88d04ce1-4b15-4a61-9633-872ba9382671 \ No newline at end of file diff --git a/roles/.vagrant/machines/default/virtualbox/action_set_name b/roles/.vagrant/machines/default/virtualbox/action_set_name new file mode 100644 index 0000000..bfcb98e --- /dev/null +++ b/roles/.vagrant/machines/default/virtualbox/action_set_name @@ -0,0 +1 @@ +1641372873 \ No newline at end of file diff --git a/roles/.vagrant/machines/default/virtualbox/box_meta b/roles/.vagrant/machines/default/virtualbox/box_meta new file mode 100644 index 0000000..c7c5243 --- /dev/null +++ b/roles/.vagrant/machines/default/virtualbox/box_meta @@ -0,0 +1 @@ +{"name":"archlinux/archlinux","version":"20211201.40458","provider":"virtualbox","directory":"boxes/archlinux-VAGRANTSLASH-archlinux/20211201.40458/virtualbox"} \ No newline at end of file diff --git a/roles/.vagrant/machines/default/virtualbox/creator_uid b/roles/.vagrant/machines/default/virtualbox/creator_uid new file mode 100644 index 0000000..e37d32a --- /dev/null +++ b/roles/.vagrant/machines/default/virtualbox/creator_uid @@ -0,0 +1 @@ +1000 \ No newline at end of file diff --git a/roles/.vagrant/machines/default/virtualbox/id b/roles/.vagrant/machines/default/virtualbox/id new file mode 100644 index 0000000..e9ad5b0 --- /dev/null +++ b/roles/.vagrant/machines/default/virtualbox/id @@ -0,0 +1 @@ +88d04ce1-4b15-4a61-9633-872ba9382671 \ No newline at end of file diff --git a/roles/.vagrant/machines/default/virtualbox/index_uuid b/roles/.vagrant/machines/default/virtualbox/index_uuid new file mode 100644 index 0000000..5c3fb56 --- /dev/null +++ b/roles/.vagrant/machines/default/virtualbox/index_uuid @@ -0,0 +1 @@ +6de8af4689ef4d91bedd37146eaa50e7 \ No newline at end of file diff --git a/roles/.vagrant/machines/default/virtualbox/private_key b/roles/.vagrant/machines/default/virtualbox/private_key new file mode 100644 index 0000000..5ef137a --- /dev/null +++ b/roles/.vagrant/machines/default/virtualbox/private_key @@ -0,0 +1,27 @@ +-----BEGIN RSA PRIVATE KEY----- +MIIEpAIBAAKCAQEA4c9PfVN1TDwLYPPo0jhpVCNN0Sgencxm4O2QiUwH5Evl4R9q +m3t9n8kfGrvT3AzMxt91HB9NgfdxU9k30t5Bk43yeSyCdAFBKvBCFG6QYq7ZoEVh +BSrsIvr1TSjmlAjdlPjWJ+fRiZd6aM4HPHbEhXUQ0M5GQvTUw8uM25HdMp+IUFDf +wsflqwSX4Ap3oMteY7+Url0b1UsbiTdWevaim1ujuTECWU5Z4KNHn29YteTxujUT +uk7+tpEmU7/1F8jvzxHLxrj25XS0/HwhXhSCQ36vNiOZPakBvLM8b/Qf9LQRKm3T +XhE3vtk8ijTX7yj5BOXVmsy0fIrqwCUzW/PPwQIDAQABAoIBAASXx+EfsnITgpO9 +Qk4MUbAha7LGYyEIiEso6dixEDQHiyxyDCQPdfWrDJPpoByIsh2Va/dfd58eHlL7 +RxRl6uWKbJUkX57ma6Ho8x8hRJSNQ+Xro1aMkfMAMb8ZBt+Z8o/WI9z57RwkVZwO +HL2RGNwyDl6A45L3EeDNohbRN7OQ21QBLyHCjpvyo+l7HeLzmlvmo/BjBN0SG+mF +ofFBF38V2PQG3pZbcay7PtjD7MpEKYGPVlwmajMEZzU0Gponun2zXVspbzRAw8tq +Dw1Eu9gjLLEfexaYSTrJBr6hghtxDr/AvlJnUMfzKxhAMkfBdzsSf1GLZoImQc8L +fTAOZvECgYEA/oSx99jo9v8OdxGC97+wtYE85guH0VZX+14jcjhSyYNT6gxKWolK +KfbyJ6JTaHaSR6AZXeLmPk6ELZf7yT67VCz7Q4uF+2y2BThy2yQEACifocLDAuNw +E0KQ/alVnxQGGy3MdqgZjc3zKNtYnfP9EbgIKYtSBBX5xbLvcN+pIC0CgYEA4x/U +2F5PySAaQpV8Skjoebx8Lus+Sw4H3sAxww7HzxLHYb3V1FL8sO93+cTiBnz6wAyA +vjKs3I314fSNeZPaNP9CTuZaqnzIqfhNK3gjHX8d4pEcj87qaukWnt2dyRjq/tuA +5ES6jp6FFYXl60AqXqaaw6yg5X4KuBo2Sor3VmUCgYEA8mzD8vYZWAIy7fixDXf5 +Qbjan6eF8z/Rx6ywCIBbYnODfx+7xqaUDIqZtmSoG40s4ao93y5a7iftQFxOSC5H +UfMSVRDVSlkOusQ8qjyQzvHisroG835c5wt1fRdIZaA1/LdP1AljZa0wGc9rhe+7 +MaBfrep08U1ZPhSkepeeyPUCgYB8y7697IRWdMc5Er4qawkh6skpVqTxxJHaeSxe +iz6KrzzSneZiNf8WkV4Q5Xd0LTPyVmxfFaUZwv752s/pn63kNOWQSM5Eoy/3BLIS +Un6o9HHNTgKtmfoAKHb/b7IFDyYAR0f5JTKEruFdRCdjLeyZ+V1Maww1TR5CrlRq +fRUOaQKBgQCGrP7IZ1mK/CR/vOW3Uq4J6q4/PgvKEnUDbIARUVA8ACMklELjcGNH +oiFc/gaQSS9u1typz2OpqCZZuA7kuPjD4B7okfrYOjJtNRfaaAe0eVkZ06IhfxgM +4T8xIVSuP78ZoPmfXKFoHU1vEgWiQ5YpSe18t+4IrmozRHS+QuCK+A== +-----END RSA PRIVATE KEY----- diff --git a/roles/.vagrant/machines/default/virtualbox/synced_folders b/roles/.vagrant/machines/default/virtualbox/synced_folders new file mode 100644 index 0000000..29d240b --- /dev/null +++ b/roles/.vagrant/machines/default/virtualbox/synced_folders @@ -0,0 +1 @@ +{"virtualbox":{"/vagrant":{"guestpath":"/vagrant","hostpath":"/media/documents/scripts/test_ansible/roles","disabled":false,"__vagrantfile":true}}} \ No newline at end of file diff --git a/roles/.vagrant/machines/default/virtualbox/vagrant_cwd b/roles/.vagrant/machines/default/virtualbox/vagrant_cwd new file mode 100644 index 0000000..44a8067 --- /dev/null +++ b/roles/.vagrant/machines/default/virtualbox/vagrant_cwd @@ -0,0 +1 @@ +/media/documents/scripts/test_ansible/roles \ No newline at end of file diff --git a/roles/.vagrant/provisioners/ansible/inventory/vagrant_ansible_inventory b/roles/.vagrant/provisioners/ansible/inventory/vagrant_ansible_inventory new file mode 100644 index 0000000..67179af --- /dev/null +++ b/roles/.vagrant/provisioners/ansible/inventory/vagrant_ansible_inventory @@ -0,0 +1,3 @@ +# Generated by Vagrant + +default ansible_host=127.0.0.1 ansible_port=2222 ansible_user='vagrant' ansible_ssh_private_key_file='/media/documents/scripts/test_ansible/roles/.vagrant/machines/default/virtualbox/private_key' diff --git a/roles/.vagrant/rgloader/loader.rb b/roles/.vagrant/rgloader/loader.rb new file mode 100644 index 0000000..c3c05b0 --- /dev/null +++ b/roles/.vagrant/rgloader/loader.rb @@ -0,0 +1,9 @@ +# This file loads the proper rgloader/loader.rb file that comes packaged +# with Vagrant so that encoded files can properly run with Vagrant. + +if ENV["VAGRANT_INSTALLER_EMBEDDED_DIR"] + require File.expand_path( + "rgloader/loader", ENV["VAGRANT_INSTALLER_EMBEDDED_DIR"]) +else + raise "Encoded files can't be read outside of the Vagrant installer." +end diff --git a/roles/Vagrantfile b/roles/Vagrantfile new file mode 100644 index 0000000..4163d44 --- /dev/null +++ b/roles/Vagrantfile @@ -0,0 +1,73 @@ +# -*- mode: ruby -*- +# vi: set ft=ruby : + +# All Vagrant configuration is done below. The "2" in Vagrant.configure +# configures the configuration version (we support older styles for +# backwards compatibility). Please don't change it unless you know what +# you're doing. +Vagrant.configure("2") do |config| + # The most common configuration options are documented and commented below. + # For a complete reference, please see the online documentation at + # https://docs.vagrantup.com. + + # Every Vagrant development environment requires a box. You can search for + # boxes at https://vagrantcloud.com/search. + config.vm.box = "archlinux/archlinux" + + # Disable automatic box update checking. If you disable this, then + # boxes will only be checked for updates when the user runs + # `vagrant box outdated`. This is not recommended. + # config.vm.box_check_update = false + + # Create a forwarded port mapping which allows access to a specific port + # within the machine from a port on the host machine. In the example below, + # accessing "localhost:8080" will access port 80 on the guest machine. + # NOTE: This will enable public access to the opened port + # config.vm.network "forwarded_port", guest: 80, host: 8080 + + # Create a forwarded port mapping which allows access to a specific port + # within the machine from a port on the host machine and only allow access + # via 127.0.0.1 to disable public access + # config.vm.network "forwarded_port", guest: 80, host: 8080, host_ip: "127.0.0.1" + + # Create a private network, which allows host-only access to the machine + # using a specific IP. + # config.vm.network "private_network", ip: "192.168.33.10" + + # Create a public network, which generally matched to bridged network. + # Bridged networks make the machine appear as another physical device on + # your network. + # config.vm.network "public_network" + + # Share an additional folder to the guest VM. The first argument is + # the path on the host to the actual folder. The second argument is + # the path on the guest to mount the folder. And the optional third + # argument is a set of non-required options. + # config.vm.synced_folder "../data", "/vagrant_data" + + # Provider-specific configuration so you can fine-tune various + # backing providers for Vagrant. These expose provider-specific options. + # Example for VirtualBox: + # + # config.vm.provider "virtualbox" do |vb| + # # Display the VirtualBox GUI when booting the machine + # vb.gui = true + # + # # Customize the amount of memory on the VM: + # vb.memory = "1024" + # end + # + # View the documentation for the provider you are using for more + # information on available options. + + # Enable provisioning with a shell script. Additional provisioners such as + # Ansible, Chef, Docker, Puppet and Salt are also available. Please see the + # documentation for more information about their specific syntax and use. + # config.vm.provision "shell", inline: <<-SHELL + # apt-get update + # apt-get install -y apache2 + # SHELL + config.vm.provision "ansible" do |ansible| + ansible.playbook = "vagrant_playbook.yml" + end +end diff --git a/roles/arch_aur/.travis.yml b/roles/arch_aur/.travis.yml new file mode 100644 index 0000000..36bbf62 --- /dev/null +++ b/roles/arch_aur/.travis.yml @@ -0,0 +1,29 @@ +--- +language: python +python: "2.7" + +# Use the new container infrastructure +sudo: false + +# Install ansible +addons: + apt: + packages: + - python-pip + +install: + # Install ansible + - pip install ansible + + # Check ansible version + - ansible --version + + # Create ansible.cfg with correct roles_path + - printf '[defaults]\nroles_path=../' >ansible.cfg + +script: + # Basic role syntax check + - ansible-playbook tests/test.yml -i tests/inventory --syntax-check + +notifications: + webhooks: https://galaxy.ansible.com/api/v1/notifications/ \ No newline at end of file diff --git a/roles/arch_aur/.yamllint b/roles/arch_aur/.yamllint new file mode 100644 index 0000000..8827676 --- /dev/null +++ b/roles/arch_aur/.yamllint @@ -0,0 +1,33 @@ +--- +# Based on ansible-lint config +extends: default + +rules: + braces: + max-spaces-inside: 1 + level: error + brackets: + max-spaces-inside: 1 + level: error + colons: + max-spaces-after: -1 + level: error + commas: + max-spaces-after: -1 + level: error + comments: disable + comments-indentation: disable + document-start: disable + empty-lines: + max: 3 + level: error + hyphens: + level: error + indentation: disable + key-duplicates: enable + line-length: disable + new-line-at-end-of-file: disable + new-lines: + type: unix + trailing-spaces: disable + truthy: disable diff --git a/roles/arch_aur/README.md b/roles/arch_aur/README.md new file mode 100644 index 0000000..225dd44 --- /dev/null +++ b/roles/arch_aur/README.md @@ -0,0 +1,38 @@ +Role Name +========= + +A brief description of the role goes here. + +Requirements +------------ + +Any pre-requisites that may not be covered by Ansible itself or the role should be mentioned here. For instance, if the role uses the EC2 module, it may be a good idea to mention in this section that the boto package is required. + +Role Variables +-------------- + +A description of the settable variables for this role should go here, including any variables that are in defaults/main.yml, vars/main.yml, and any variables that can/should be set via parameters to the role. Any variables that are read from other roles and/or the global scope (ie. hostvars, group vars, etc.) should be mentioned here as well. + +Dependencies +------------ + +A list of other roles hosted on Galaxy should go here, plus any details in regards to parameters that may need to be set for other roles, or variables that are used from other roles. + +Example Playbook +---------------- + +Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too: + + - hosts: servers + roles: + - { role: username.rolename, x: 42 } + +License +------- + +BSD + +Author Information +------------------ + +An optional section for the role authors to include contact information, or a website (HTML is not allowed). diff --git a/roles/arch_aur/defaults/main.yml b/roles/arch_aur/defaults/main.yml new file mode 100644 index 0000000..9d75095 --- /dev/null +++ b/roles/arch_aur/defaults/main.yml @@ -0,0 +1,2 @@ +--- +# defaults file for arch_aur diff --git a/roles/arch_aur/handlers/main.yml b/roles/arch_aur/handlers/main.yml new file mode 100644 index 0000000..550f0b0 --- /dev/null +++ b/roles/arch_aur/handlers/main.yml @@ -0,0 +1,2 @@ +--- +# handlers file for arch_aur diff --git a/roles/arch_aur/molecule/default/INSTALL.rst b/roles/arch_aur/molecule/default/INSTALL.rst new file mode 100644 index 0000000..0c4bf5c --- /dev/null +++ b/roles/arch_aur/molecule/default/INSTALL.rst @@ -0,0 +1,23 @@ +********************************* +Vagrant driver installation guide +********************************* + +Requirements +============ + +* Vagrant +* Virtualbox, Parallels, VMware Fusion, VMware Workstation or VMware Desktop + +Install +======= + +Please refer to the `Virtual environment`_ documentation for installation best +practices. If not using a virtual environment, please consider passing the +widely recommended `'--user' flag`_ when invoking ``pip``. + +.. _Virtual environment: https://virtualenv.pypa.io/en/latest/ +.. _'--user' flag: https://packaging.python.org/tutorials/installing-packages/#installing-to-the-user-site + +.. code-block:: bash + + $ pip install 'molecule_vagrant' diff --git a/roles/arch_aur/molecule/default/converge.yml b/roles/arch_aur/molecule/default/converge.yml new file mode 100644 index 0000000..4ce1d3c --- /dev/null +++ b/roles/arch_aur/molecule/default/converge.yml @@ -0,0 +1,7 @@ +--- +- name: Converge + hosts: all + tasks: + - name: "Include arch_aur" + include_role: + name: "arch_aur" diff --git a/roles/arch_aur/molecule/default/molecule.yml b/roles/arch_aur/molecule/default/molecule.yml new file mode 100644 index 0000000..748eb79 --- /dev/null +++ b/roles/arch_aur/molecule/default/molecule.yml @@ -0,0 +1,11 @@ +--- +dependency: + name: galaxy +driver: + name: vagrant +platforms: + - name: instance +provisioner: + name: ansible +verifier: + name: testinfra diff --git a/roles/arch_aur/molecule/default/tests/__pycache__/conftest.cpython-39.pyc b/roles/arch_aur/molecule/default/tests/__pycache__/conftest.cpython-39.pyc new file mode 100644 index 0000000000000000000000000000000000000000..e4eb8b9d0f37e87ba5d3beb1351cb6085103c0d0 GIT binary patch literal 974 zcmZWoL2uJA6tdL6B*htt33lIJ>cw8U`?1e_R{4P93iDo}c6D~=<#eAL8*YhrHrL#Aen1V>#>Gl< zWK^14PDM6W+V=X`MXrZ~3}9`-GD9%4W(kVU@f##VA6YzI$H+}fMjrDV>?fdeh$MN0 zSk?NY$^_|y_jptt)h+^eX4QM>5?|C=?Gjr;8*;h48!YZJ0+j2sjlEok7D$^=$#fc? z4!I0-$+!+PmGXX`^6*sHVVNW3KqsM)#wKaXSx37rdb72%Y0cl}0-FAlx!=a|UC30Y zG*b*J(Uebk8n3g$K#A2W2%gRC&rm4eUx@1FbTL zEEvBb)@d&lb;rHrRV;0n+IF>8x~Pt)E>igBM2rifOi|-$Q<>RIuW3_wOmK0&t;;8iY8o(fdJ19iRkR? zc4}u)fHIK3ZAa_3prP{rF?H<0aI^$AHEpM3? W_=;d-{(PRg=VsgmA2&%r0`E6^NFBDg0#DjKJx z6JBqgs0`W`jFm;doyrVMyD~oh!cxtngyP<*`GO7fBXqNi%Po1pqK|Y;Z|Nm9Ysciy zM}Y_if!Ua3jXK-**`)FM8PBBP7TOGK!Y-7trtTkIw|)>8YNc$q6S~l!&CSD=M4}5T z1KQ2?wW`Wa;6lIM(e#PvCLZbI4eRB=GM;K_fki_ohKv_Ro@a>4b5@S*g(`NUJ!X)w zRq|xO`(Rj(Y9tks5~T(bLu)}ZlR&|>RBQ-ZrV^2FaoEkxEH#=Ih=tUUSfxkf@n6og zTwL%R{{Nmf`BlONQJ(2v94odm6*MVG1e@1l#^EX1);NgUTe YEziudh$PqC&y~PSANV;NKj5(O2}fD8l>h($ literal 0 HcmV?d00001 diff --git a/roles/arch_aur/molecule/default/tests/conftest.py b/roles/arch_aur/molecule/default/tests/conftest.py new file mode 100644 index 0000000..f7ddb3f --- /dev/null +++ b/roles/arch_aur/molecule/default/tests/conftest.py @@ -0,0 +1,22 @@ +"""PyTest Fixtures.""" +from __future__ import absolute_import + +import os + +import pytest + + +def pytest_runtest_setup(item): + """Run tests only when under molecule with testinfra installed.""" + try: + import testinfra + except ImportError: + pytest.skip("Test requires testinfra", allow_module_level=True) + if "MOLECULE_INVENTORY_FILE" in os.environ: + pytest.testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner( + os.environ["MOLECULE_INVENTORY_FILE"] + ).get_hosts("all") + else: + pytest.skip( + "Test should run only from inside molecule.", allow_module_level=True + ) diff --git a/roles/arch_aur/molecule/default/tests/test_default.py b/roles/arch_aur/molecule/default/tests/test_default.py new file mode 100644 index 0000000..0cff669 --- /dev/null +++ b/roles/arch_aur/molecule/default/tests/test_default.py @@ -0,0 +1,10 @@ +"""Role testing files using testinfra.""" + + +def test_hosts_file(host): + """Validate /etc/hosts file.""" + f = host.file("/etc/hosts") + + assert f.exists + assert f.user == "root" + assert f.group == "root" diff --git a/roles/arch_aur/tasks/main.yml b/roles/arch_aur/tasks/main.yml new file mode 100644 index 0000000..4bf2548 --- /dev/null +++ b/roles/arch_aur/tasks/main.yml @@ -0,0 +1,47 @@ +--- +# tasks file for arch_aur +- name: Create the `aur_builder` user + become: yes + ansible.builtin.user: + name: aur_builder + create_home: yes + group: wheel + +- name: Allow the `aur_builder` user to run `sudo pacman` without a password + become: yes + ansible.builtin.lineinfile: + path: /etc/sudoers.d/11-install-aur_builder + line: 'aur_builder ALL=(ALL) NOPASSWD: /usr/bin/pacman' + create: yes + validate: 'visudo -cf %s' + +- name: Install base-devel + pacman: + name: base-devel + state: present + + # - name: Git clone ansible-aur + # git: + # repo: https://github.com/kewlfft/ansible-aur.git + # dest: ~/.ansible/plugins/modules/aur + # version: master + # accept_hostkey: yes + # become: yes + # become_user: aur_builder + +- name: Install Yay + aur: + name: yay + use: makepkg + state: present + become: yes + become_user: aur_builder + +- name: Install mkpasswd + aur: + name: mkpasswd + use: makepkg + state: present + become: yes + become_user: aur_builder + diff --git a/roles/arch_aur/tests/inventory b/roles/arch_aur/tests/inventory new file mode 100644 index 0000000..878877b --- /dev/null +++ b/roles/arch_aur/tests/inventory @@ -0,0 +1,2 @@ +localhost + diff --git a/roles/arch_aur/tests/test.yml b/roles/arch_aur/tests/test.yml new file mode 100644 index 0000000..dd1e557 --- /dev/null +++ b/roles/arch_aur/tests/test.yml @@ -0,0 +1,5 @@ +--- +- hosts: localhost + remote_user: root + roles: + - arch_aur diff --git a/roles/arch_aur/vars/main.yml b/roles/arch_aur/vars/main.yml new file mode 100644 index 0000000..48bcce1 --- /dev/null +++ b/roles/arch_aur/vars/main.yml @@ -0,0 +1,2 @@ +--- +# vars file for arch_aur diff --git a/roles/arch_pkg_install/.travis.yml b/roles/arch_pkg_install/.travis.yml new file mode 100644 index 0000000..36bbf62 --- /dev/null +++ b/roles/arch_pkg_install/.travis.yml @@ -0,0 +1,29 @@ +--- +language: python +python: "2.7" + +# Use the new container infrastructure +sudo: false + +# Install ansible +addons: + apt: + packages: + - python-pip + +install: + # Install ansible + - pip install ansible + + # Check ansible version + - ansible --version + + # Create ansible.cfg with correct roles_path + - printf '[defaults]\nroles_path=../' >ansible.cfg + +script: + # Basic role syntax check + - ansible-playbook tests/test.yml -i tests/inventory --syntax-check + +notifications: + webhooks: https://galaxy.ansible.com/api/v1/notifications/ \ No newline at end of file diff --git a/roles/arch_pkg_install/.yamllint b/roles/arch_pkg_install/.yamllint new file mode 100644 index 0000000..8827676 --- /dev/null +++ b/roles/arch_pkg_install/.yamllint @@ -0,0 +1,33 @@ +--- +# Based on ansible-lint config +extends: default + +rules: + braces: + max-spaces-inside: 1 + level: error + brackets: + max-spaces-inside: 1 + level: error + colons: + max-spaces-after: -1 + level: error + commas: + max-spaces-after: -1 + level: error + comments: disable + comments-indentation: disable + document-start: disable + empty-lines: + max: 3 + level: error + hyphens: + level: error + indentation: disable + key-duplicates: enable + line-length: disable + new-line-at-end-of-file: disable + new-lines: + type: unix + trailing-spaces: disable + truthy: disable diff --git a/roles/arch_pkg_install/README.md b/roles/arch_pkg_install/README.md new file mode 100644 index 0000000..225dd44 --- /dev/null +++ b/roles/arch_pkg_install/README.md @@ -0,0 +1,38 @@ +Role Name +========= + +A brief description of the role goes here. + +Requirements +------------ + +Any pre-requisites that may not be covered by Ansible itself or the role should be mentioned here. For instance, if the role uses the EC2 module, it may be a good idea to mention in this section that the boto package is required. + +Role Variables +-------------- + +A description of the settable variables for this role should go here, including any variables that are in defaults/main.yml, vars/main.yml, and any variables that can/should be set via parameters to the role. Any variables that are read from other roles and/or the global scope (ie. hostvars, group vars, etc.) should be mentioned here as well. + +Dependencies +------------ + +A list of other roles hosted on Galaxy should go here, plus any details in regards to parameters that may need to be set for other roles, or variables that are used from other roles. + +Example Playbook +---------------- + +Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too: + + - hosts: servers + roles: + - { role: username.rolename, x: 42 } + +License +------- + +BSD + +Author Information +------------------ + +An optional section for the role authors to include contact information, or a website (HTML is not allowed). diff --git a/roles/arch_pkg_install/defaults/main.yml b/roles/arch_pkg_install/defaults/main.yml new file mode 100644 index 0000000..67ee4a9 --- /dev/null +++ b/roles/arch_pkg_install/defaults/main.yml @@ -0,0 +1,136 @@ +--- +# defaults file for arch_pkg_install + +pacman_base: + - vim + - tmux + - git + - gnupg + +pacman_admin: + - pacman-contrib + - sudo + - wget + - cronie + - ruby + - tig + - openssh + - sshfs + - htop + - ntop + - iotop + - glances + - nmap + - nfs-utils + - samba + - sshpass + - rsync + - autofs + - bind-tools + - unzip + - ntfs-3g + - git-annex + - cifs-utils + - traceroute + - smartmontools + - ripgrep + - fzf + +pacman_cli: + - moc + - pass + - cups + - cups-pdf + - task + - profanity + - neomutt + - youtube-dl + - neovim + - python-pynvim + +pacman_terms: + - rxvt-unicode + - xdotool + - alacritty + +pacman_office: + - gimp + - firefox + - firefox-i18n-fr + - chromium + - inkscape + - pstoedit # Enable latex in inkscape + - thunderbird + - thunderbird-i18n-fr + - libreoffice-fresh + - libreoffice-fresh-fr + - geogebra + - zathura + - zathura-ps + - zathura-djvu + - zathura-cb + - zathura-pdf-mupdf + - scribus + - nextcloud-client + - hunspell + - hunspell-fr + +pacman_work: + - texlive-most + - gnuplot + - auto-multiple-choice + - xournalpp + +pacman_media: + - vlc + - mpv + - mplayer + - guvcview + +pacman_3Dprint: + - openscad + - cura + +pacman_fonts: + - awesome-terminal-fonts + - cantarell-fonts + - gnu-free-fonts + - gsfonts + - ttf-bitstream-vera + - ttf-dejavu + - ttf-droid + - ttf-roboto + - ttf-liberation + - ttf-ubuntu-font-family + - ttf-inconsolata + - noto-fonts + + +pkgs: + - "{{ pacman_base }}" + - "{{ pacman_admin }}" + - "{{ pacman_cli }}" + - "{{ pacman_terms }}" + - "{{ pacman_office }}" + - "{{ pacman_media }}" + - "{{ pacman_work }}" + - "{{ pacman_3Dprint }}" + - "{{ pacman_fonts }}" + +# Packages to install from AUR +aur_fonts: + - ttf-ubuntu-mono-derivative-powerline-git + - ttf-inconsolata-lgc-for-powerline + - ttf-droid-sans-mono-slashed-powerline-git + - ttf-literation-mono-powerline-git + - ttf-opendyslexic + - nerd-fonts-ubuntu-mono + - nerd-fonts-droid-sans-mono + - nerd-fonts-hack + +aur_work: + - perl-locale-codes + +aur_pkgs: + - "{{ aur_fonts }}" + - "{{ aur_work }}" diff --git a/roles/arch_pkg_install/handlers/main.yml b/roles/arch_pkg_install/handlers/main.yml new file mode 100644 index 0000000..5189914 --- /dev/null +++ b/roles/arch_pkg_install/handlers/main.yml @@ -0,0 +1,2 @@ +--- +# handlers file for arch_pkg_install diff --git a/roles/arch_pkg_install/molecule/default/INSTALL.rst b/roles/arch_pkg_install/molecule/default/INSTALL.rst new file mode 100644 index 0000000..0c4bf5c --- /dev/null +++ b/roles/arch_pkg_install/molecule/default/INSTALL.rst @@ -0,0 +1,23 @@ +********************************* +Vagrant driver installation guide +********************************* + +Requirements +============ + +* Vagrant +* Virtualbox, Parallels, VMware Fusion, VMware Workstation or VMware Desktop + +Install +======= + +Please refer to the `Virtual environment`_ documentation for installation best +practices. If not using a virtual environment, please consider passing the +widely recommended `'--user' flag`_ when invoking ``pip``. + +.. _Virtual environment: https://virtualenv.pypa.io/en/latest/ +.. _'--user' flag: https://packaging.python.org/tutorials/installing-packages/#installing-to-the-user-site + +.. code-block:: bash + + $ pip install 'molecule_vagrant' diff --git a/roles/arch_pkg_install/molecule/default/converge.yml b/roles/arch_pkg_install/molecule/default/converge.yml new file mode 100644 index 0000000..388c585 --- /dev/null +++ b/roles/arch_pkg_install/molecule/default/converge.yml @@ -0,0 +1,7 @@ +--- +- name: Converge + hosts: all + tasks: + - name: "Include arch_pkg_install" + include_role: + name: "arch_pkg_install" diff --git a/roles/arch_pkg_install/molecule/default/molecule.yml b/roles/arch_pkg_install/molecule/default/molecule.yml new file mode 100644 index 0000000..748eb79 --- /dev/null +++ b/roles/arch_pkg_install/molecule/default/molecule.yml @@ -0,0 +1,11 @@ +--- +dependency: + name: galaxy +driver: + name: vagrant +platforms: + - name: instance +provisioner: + name: ansible +verifier: + name: testinfra diff --git a/roles/arch_pkg_install/molecule/default/tests/__pycache__/conftest.cpython-39.pyc b/roles/arch_pkg_install/molecule/default/tests/__pycache__/conftest.cpython-39.pyc new file mode 100644 index 0000000000000000000000000000000000000000..2c49c25e172c2be046edb4a4d38d4088419979f5 GIT binary patch literal 982 zcmZWoPjAyO6t|tUO}lnOXwn3yT#H77#A(umKvO488XX#AXt`Kf?XK<;yVy=gJ9guQ z#CO<^dSPU#q6%g=d#{C>apVkfOu1Ht%w_$B#35c=wr+XHOqDJ-)N zf}t2O%t(qe5)3oMAsEv!2 zthDX*vGe>M4l;nX14 z&S<6>WTGjb@HAd~zPH=mdbQi7JH5kh?_h8Lh;Hxfb_)-JXAjD3W~lO%g&NqEyarlj z4p}gML#)$YD(a4V$*Wk}DSO-1TIr%Xo;pwAn^Q3^h%!Zu%ZboR7M0wJ)WpjPWIF~@ zfFZe#ThHb?G{mX(6K?5HL1W^T8;rT3O$uLFo@pP-|AcfCwjbZ3p~`raCIbz=s571d zUNqs_2qjJQxU!6%v}kwKSL#$i=dI;BGJP%+EtJb7 z1_CTMWTNx)+o7FB0?Obw^sUmAa{?1Qtj@)b`L;T eop7OLPj879*ot6tevO{EYiHa6A2&%r0`C`bMkd|> literal 0 HcmV?d00001 diff --git a/roles/arch_pkg_install/molecule/default/tests/__pycache__/test_default.cpython-39.pyc b/roles/arch_pkg_install/molecule/default/tests/__pycache__/test_default.cpython-39.pyc new file mode 100644 index 0000000000000000000000000000000000000000..326c8e83f0516d647be811d604ea65e56b72a721 GIT binary patch literal 609 zcmZWnu};G<5Vg|)rBZ=`g{^|A12GaTNC+XZF?0Z_Lzl?Jm)10mE89VowhQ7zVB{zG z3kJNh@C{6yLkk5?I_KWy{LX%7Ua!{(+H?DbzvB1JgGCDvoS>TxTm<1}^m59ZjEzuHunC-jQzrEaRz`7FaYKL4M7yK^v)Z!}g=Y=#XXdk_|_; zr*g#1VBzkNCw<-p!v?5IQe?mqrTP*>Ye6%UK+d&Po=K(>Gv6Yy@p!Q`niIrAYDlco zqv`Z-&73aI`2ha^o;UeL;Ty&RQeI>hujSUuM5$iv6$<@Wyaptw1vR=xwSONi)MzD+ eg-YVMOq4P$EUQ@Lsz(DQ@Y2VA-o_6)tb78EleOUh literal 0 HcmV?d00001 diff --git a/roles/arch_pkg_install/molecule/default/tests/conftest.py b/roles/arch_pkg_install/molecule/default/tests/conftest.py new file mode 100644 index 0000000..f7ddb3f --- /dev/null +++ b/roles/arch_pkg_install/molecule/default/tests/conftest.py @@ -0,0 +1,22 @@ +"""PyTest Fixtures.""" +from __future__ import absolute_import + +import os + +import pytest + + +def pytest_runtest_setup(item): + """Run tests only when under molecule with testinfra installed.""" + try: + import testinfra + except ImportError: + pytest.skip("Test requires testinfra", allow_module_level=True) + if "MOLECULE_INVENTORY_FILE" in os.environ: + pytest.testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner( + os.environ["MOLECULE_INVENTORY_FILE"] + ).get_hosts("all") + else: + pytest.skip( + "Test should run only from inside molecule.", allow_module_level=True + ) diff --git a/roles/arch_pkg_install/molecule/default/tests/test_default.py b/roles/arch_pkg_install/molecule/default/tests/test_default.py new file mode 100644 index 0000000..0cff669 --- /dev/null +++ b/roles/arch_pkg_install/molecule/default/tests/test_default.py @@ -0,0 +1,10 @@ +"""Role testing files using testinfra.""" + + +def test_hosts_file(host): + """Validate /etc/hosts file.""" + f = host.file("/etc/hosts") + + assert f.exists + assert f.user == "root" + assert f.group == "root" diff --git a/roles/arch_pkg_install/tasks/main.yml b/roles/arch_pkg_install/tasks/main.yml new file mode 100644 index 0000000..163cefc --- /dev/null +++ b/roles/arch_pkg_install/tasks/main.yml @@ -0,0 +1,14 @@ +--- +# tasks file for arch_pkg_install +- name: Install pkgs + community.general.pacman: + name: "{{ item }}" + state: present + with_items: pkgs + + +- name: Install AUR pkgs + kewlfft.aur.aur: + name: "{{ item }}" + state: present + with_items: aur_pkgs diff --git a/roles/arch_pkg_install/tests/inventory b/roles/arch_pkg_install/tests/inventory new file mode 100644 index 0000000..878877b --- /dev/null +++ b/roles/arch_pkg_install/tests/inventory @@ -0,0 +1,2 @@ +localhost + diff --git a/roles/arch_pkg_install/tests/test.yml b/roles/arch_pkg_install/tests/test.yml new file mode 100644 index 0000000..fe1a62c --- /dev/null +++ b/roles/arch_pkg_install/tests/test.yml @@ -0,0 +1,5 @@ +--- +- hosts: localhost + remote_user: root + roles: + - arch_pkg_install diff --git a/roles/arch_pkg_install/vars/main.yml b/roles/arch_pkg_install/vars/main.yml new file mode 100644 index 0000000..24c0f55 --- /dev/null +++ b/roles/arch_pkg_install/vars/main.yml @@ -0,0 +1,2 @@ +--- +# vars file for arch_pkg_install diff --git a/roles/dotfiles/.yamllint b/roles/dotfiles/.yamllint new file mode 100644 index 0000000..8827676 --- /dev/null +++ b/roles/dotfiles/.yamllint @@ -0,0 +1,33 @@ +--- +# Based on ansible-lint config +extends: default + +rules: + braces: + max-spaces-inside: 1 + level: error + brackets: + max-spaces-inside: 1 + level: error + colons: + max-spaces-after: -1 + level: error + commas: + max-spaces-after: -1 + level: error + comments: disable + comments-indentation: disable + document-start: disable + empty-lines: + max: 3 + level: error + hyphens: + level: error + indentation: disable + key-duplicates: enable + line-length: disable + new-line-at-end-of-file: disable + new-lines: + type: unix + trailing-spaces: disable + truthy: disable diff --git a/roles/dotfiles/defaults/main.yml b/roles/dotfiles/defaults/main.yml new file mode 100644 index 0000000..d217f75 --- /dev/null +++ b/roles/dotfiles/defaults/main.yml @@ -0,0 +1,7 @@ +--- +user: + username: 'vagrant' + +dotusers: ["{{ user }}"] + +config2stow: ["nvim", "tmux", "zsh"] diff --git a/roles/dotfiles/molecule/.yamllint b/roles/dotfiles/molecule/.yamllint new file mode 100644 index 0000000..8827676 --- /dev/null +++ b/roles/dotfiles/molecule/.yamllint @@ -0,0 +1,33 @@ +--- +# Based on ansible-lint config +extends: default + +rules: + braces: + max-spaces-inside: 1 + level: error + brackets: + max-spaces-inside: 1 + level: error + colons: + max-spaces-after: -1 + level: error + commas: + max-spaces-after: -1 + level: error + comments: disable + comments-indentation: disable + document-start: disable + empty-lines: + max: 3 + level: error + hyphens: + level: error + indentation: disable + key-duplicates: enable + line-length: disable + new-line-at-end-of-file: disable + new-lines: + type: unix + trailing-spaces: disable + truthy: disable diff --git a/roles/dotfiles/molecule/default/INSTALL.rst b/roles/dotfiles/molecule/default/INSTALL.rst new file mode 100644 index 0000000..0c4bf5c --- /dev/null +++ b/roles/dotfiles/molecule/default/INSTALL.rst @@ -0,0 +1,23 @@ +********************************* +Vagrant driver installation guide +********************************* + +Requirements +============ + +* Vagrant +* Virtualbox, Parallels, VMware Fusion, VMware Workstation or VMware Desktop + +Install +======= + +Please refer to the `Virtual environment`_ documentation for installation best +practices. If not using a virtual environment, please consider passing the +widely recommended `'--user' flag`_ when invoking ``pip``. + +.. _Virtual environment: https://virtualenv.pypa.io/en/latest/ +.. _'--user' flag: https://packaging.python.org/tutorials/installing-packages/#installing-to-the-user-site + +.. code-block:: bash + + $ pip install 'molecule_vagrant' diff --git a/roles/dotfiles/molecule/default/converge.yml b/roles/dotfiles/molecule/default/converge.yml new file mode 100644 index 0000000..684e67f --- /dev/null +++ b/roles/dotfiles/molecule/default/converge.yml @@ -0,0 +1,7 @@ +--- +- name: Converge + hosts: all + tasks: + - name: "Include dotfiles" + include_role: + name: "dotfiles" diff --git a/roles/dotfiles/molecule/default/molecule.yml b/roles/dotfiles/molecule/default/molecule.yml new file mode 100644 index 0000000..ba85140 --- /dev/null +++ b/roles/dotfiles/molecule/default/molecule.yml @@ -0,0 +1,14 @@ +--- +dependency: + name: galaxy +driver: + name: vagrant +platforms: + - name: archlinux + box: "archlinux/archlinux" + - name: Debian + box: "debian/bullseye64" +provisioner: + name: ansible +verifier: + name: testinfra diff --git a/roles/dotfiles/molecule/default/tests/__pycache__/conftest.cpython-39-pytest-6.2.5.pyc b/roles/dotfiles/molecule/default/tests/__pycache__/conftest.cpython-39-pytest-6.2.5.pyc new file mode 100644 index 0000000000000000000000000000000000000000..fcb1b49ee8b088156ce9d84abfff2f2c3f477a92 GIT binary patch literal 950 zcmYjP&2AGh5VoC7b~jCbK$WU;T5$_P2{$ekDymYcQb|!Mt-2R$8#}~d*ABL~ArTyq zI3e*4?UCo;Eqvv~D{!EUH*Kg_9`F2q-;5?(U2P&b&%gZ4z7d3edFB2A8`_0y_CYX| zB8C~saY0go{eLa5r9t)9iv~d$6=53Pdg3&$Jk7Mp0#^Tu(iK*FgW8Sx#_QP$H#XT9 zA8o0*>HLQ3sEyrvc41UrT24hVQQGzg*n4h|ClkTlgKI`0=B?sBk z7+Er|v6_ed4n)t9B+n3Q*kD}0MEdj-9yi9}RpfQn*hbg*DrVs|wuCn2T9q5!EzOQs_(lTtFSlS1WuQ06?D3OlM|gdFND5z^Q!&pGR8-$j4ERW+^o zhf+Y(|07SJ^M??rrnFEDD$$%@@;u#ob#&OAc)68>YPLPCm3EEE%zIp5-iwJN%D9lrOQDr? z_0o#mq-z;ey8u#vA-PUhUoLbQ2&gW8$1NQx7>rwAVk``8;sRlLq3h8852V-O`E%AS zI1^cysXjxx+gxF1FLrj@>vR z@gKG$zk`1fapS~a;J|oJ*D=7BpX2wQ-}k*wPO`k*LNG@BYx0R8^xYk95AdO9u*?P+ zhGN7pBN@&~OtAa*GB5V3-H(0dv)V@#*O>PTb?UP_FQ*6G*l=6Cw}s}W`vYpA4lY-d zW23Udaw_t%(zc&s7r7n|GJv%O%M8KH+7&1|$8V4fePr=;10y#r8F|ceu%Cg>5t8H) zVs-0}Y7?XnKj2Y))VK)Tnbq&1OMKB}jZ16^ZON7DZm_t^2vBa$Hunn|S|DvgC9`RG zI^;4eB;z{FRmRgItlL>Cn~rO_Fz)^Z)0l*>d56-~Gn0|A~J64BY& z?bPm~0A(P5YL%XzpZ}Y)C`Vb+^~E%){z#@578Q zB;0f0n1ju2CH@9CenDS3=Hd%TECq84*UAmD7=BtX()3p`>s}9wp3X&NDLdnaez|0rOb^w!^IN$e^>h z_idH)zT#44M&tPA&-aLXS6YO;bwtm%^0^oTC4 z+LBKgEJs-@drgjs{75+~w}u(w0eBvIB|b;rT2p4fux^m0t$c_CwY{cK>CcprrNsy= z)ER0=s_JC1pGwJv>c9WN?CkzPhCj7V|1%TXAIK<^Nmfdg<~e8K^4!w)>}((5{-C4% zSvvkPJ>;YA#c8_xXm*wy%(EQYAhnlQ<208#gebNlNrk?Z$Z0jtSt9sMB!_u*kmgC5 z7F>4{nNB!{_3jsDby-z@Ekq^sUNWgfk*b8B&hoTO6+9U@+L=~T2_#YPVBzMQK5hoh z8=ssL@fJ*Y^?h7$mZdSP#`A)gO2%?5vKiQBWu?pxavlqyQNko;D2xjjj^_|(e3H&{ zWhS?;w4rErruR$^Z0zfnA+-{L(2$Bfux~JrtZ$h=hQWsUBVdbJzgV{kXn?G&8aTa4 zKoOvYBYSDrwk(;$T-1S4#8=8&`N+K(f)}6%ig1k&{4>ue!ciTFgtfC(gl!bz4}sDX z_VRDI7GWH1KK<2)mn(#yW>U#;se{d1!iFz7-_f?1m)etxRdb~s?4|aa*}{hzB0%UM z;06^t2wj98z`zx|V01983O-BKRNTZzR}iiuAfXMs4PM**b_vNiuS(9afb;+ey+(Jb zcn7>U`i~Q~{eJ;_^8fFD%dT(Ob!)d}_fKFq*s}YZVb=wAe>aSR2kZuyv)g9xnCxEd zHQAq2xexinO@0`Arh>Po&#Aa-@`4XF!v9=j$JFp^e_P{MsL{PpAWU2bSnS5pxGE>vVO$<(MJ#SWP&?=w`7Qi7QpNl<)()CQ5Jw9+<>j&V z8oTIi6F?x=HlVl#Nd|!tp16ah-bHw=xjqixL%56ZuM)(AfHRb`M1eLE{03x*_Y;)k zJ%|oM?I#JGM@gcC&6#PohrXRO2WHglK{)Lq!B0e{;FR2kwBN>>jf5wRk-15JVS#3; YW}^fTi;BT%_BsB7%SE<0j!dAi5ffxxEB!rOI7&?H&z!JIfrI@C1Wjhu9TM!QdBhSH8 z;0cMhVB#EFC~(p_cV9l=+25Jh>otOQ3orZ?zwbU-v;dP+bhC+zAlF1t5j>D%chHegVnUF^;`b4L6LT{H9? zv|H+ERrZ^Ki~M#+vuC1L@kk$USg!{x=b4rkSUiAYz<6O~J4aNuS$}A6RB;d=F@uD? zK2N*61BUfbjkH8ks#I5EXf0@FQYg5ViVZ-^Od|3v4jYdbsqwr(BBX}YDm|P||8nN# zl7jc(|L=K|UnP9QL_o&N+{XQ(+o*s_wZtnE`EmHWlb{yV=sMN@U9?b}l_U`=O_Bansible.cfg + +script: + # Basic role syntax check + - ansible-playbook tests/test.yml -i tests/inventory --syntax-check + +notifications: + webhooks: https://galaxy.ansible.com/api/v1/notifications/ \ No newline at end of file diff --git a/roles/gnome/.yamllint b/roles/gnome/.yamllint new file mode 100644 index 0000000..8827676 --- /dev/null +++ b/roles/gnome/.yamllint @@ -0,0 +1,33 @@ +--- +# Based on ansible-lint config +extends: default + +rules: + braces: + max-spaces-inside: 1 + level: error + brackets: + max-spaces-inside: 1 + level: error + colons: + max-spaces-after: -1 + level: error + commas: + max-spaces-after: -1 + level: error + comments: disable + comments-indentation: disable + document-start: disable + empty-lines: + max: 3 + level: error + hyphens: + level: error + indentation: disable + key-duplicates: enable + line-length: disable + new-line-at-end-of-file: disable + new-lines: + type: unix + trailing-spaces: disable + truthy: disable diff --git a/roles/gnome/README.md b/roles/gnome/README.md new file mode 100644 index 0000000..225dd44 --- /dev/null +++ b/roles/gnome/README.md @@ -0,0 +1,38 @@ +Role Name +========= + +A brief description of the role goes here. + +Requirements +------------ + +Any pre-requisites that may not be covered by Ansible itself or the role should be mentioned here. For instance, if the role uses the EC2 module, it may be a good idea to mention in this section that the boto package is required. + +Role Variables +-------------- + +A description of the settable variables for this role should go here, including any variables that are in defaults/main.yml, vars/main.yml, and any variables that can/should be set via parameters to the role. Any variables that are read from other roles and/or the global scope (ie. hostvars, group vars, etc.) should be mentioned here as well. + +Dependencies +------------ + +A list of other roles hosted on Galaxy should go here, plus any details in regards to parameters that may need to be set for other roles, or variables that are used from other roles. + +Example Playbook +---------------- + +Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too: + + - hosts: servers + roles: + - { role: username.rolename, x: 42 } + +License +------- + +BSD + +Author Information +------------------ + +An optional section for the role authors to include contact information, or a website (HTML is not allowed). diff --git a/roles/gnome/defaults/main.yml b/roles/gnome/defaults/main.yml new file mode 100644 index 0000000..68a11eb --- /dev/null +++ b/roles/gnome/defaults/main.yml @@ -0,0 +1,4 @@ +--- +# defaults file for gnome +me: + username: user1 diff --git a/roles/gnome/handlers/main.yml b/roles/gnome/handlers/main.yml new file mode 100644 index 0000000..5371043 --- /dev/null +++ b/roles/gnome/handlers/main.yml @@ -0,0 +1,2 @@ +--- +# handlers file for gnome diff --git a/roles/gnome/molecule/default/INSTALL.rst b/roles/gnome/molecule/default/INSTALL.rst new file mode 100644 index 0000000..0c4bf5c --- /dev/null +++ b/roles/gnome/molecule/default/INSTALL.rst @@ -0,0 +1,23 @@ +********************************* +Vagrant driver installation guide +********************************* + +Requirements +============ + +* Vagrant +* Virtualbox, Parallels, VMware Fusion, VMware Workstation or VMware Desktop + +Install +======= + +Please refer to the `Virtual environment`_ documentation for installation best +practices. If not using a virtual environment, please consider passing the +widely recommended `'--user' flag`_ when invoking ``pip``. + +.. _Virtual environment: https://virtualenv.pypa.io/en/latest/ +.. _'--user' flag: https://packaging.python.org/tutorials/installing-packages/#installing-to-the-user-site + +.. code-block:: bash + + $ pip install 'molecule_vagrant' diff --git a/roles/gnome/molecule/default/converge.yml b/roles/gnome/molecule/default/converge.yml new file mode 100644 index 0000000..51db134 --- /dev/null +++ b/roles/gnome/molecule/default/converge.yml @@ -0,0 +1,7 @@ +--- +- name: Converge + hosts: all + tasks: + - name: "Include gnome" + include_role: + name: "gnome" diff --git a/roles/gnome/molecule/default/molecule.yml b/roles/gnome/molecule/default/molecule.yml new file mode 100644 index 0000000..748eb79 --- /dev/null +++ b/roles/gnome/molecule/default/molecule.yml @@ -0,0 +1,11 @@ +--- +dependency: + name: galaxy +driver: + name: vagrant +platforms: + - name: instance +provisioner: + name: ansible +verifier: + name: testinfra diff --git a/roles/gnome/molecule/default/tests/__pycache__/conftest.cpython-39.pyc b/roles/gnome/molecule/default/tests/__pycache__/conftest.cpython-39.pyc new file mode 100644 index 0000000000000000000000000000000000000000..2c49c25e172c2be046edb4a4d38d4088419979f5 GIT binary patch literal 982 zcmZWoPjAyO6t|tUO}lnOXwn3yT#H77#A(umKvO488XX#AXt`Kf?XK<;yVy=gJ9guQ z#CO<^dSPU#q6%g=d#{C>apVkfOu1Ht%w_$B#35c=wr+XHOqDJ-)N zf}t2O%t(qe5)3oMAsEv!2 zthDX*vGe>M4l;nX14 z&S<6>WTGjb@HAd~zPH=mdbQi7JH5kh?_h8Lh;Hxfb_)-JXAjD3W~lO%g&NqEyarlj z4p}gML#)$YD(a4V$*Wk}DSO-1TIr%Xo;pwAn^Q3^h%!Zu%ZboR7M0wJ)WpjPWIF~@ zfFZe#ThHb?G{mX(6K?5HL1W^T8;rT3O$uLFo@pP-|AcfCwjbZ3p~`raCIbz=s571d zUNqs_2qjJQxU!6%v}kwKSL#$i=dI;BGJP%+EtJb7 z1_CTMWTNx)+o7FB0?Obw^sUmAa{?1Qtj@)b`L;T eop7OLPj879*ot6tevO{EYiHa6A2&%r0`C`bMkd|> literal 0 HcmV?d00001 diff --git a/roles/gnome/molecule/default/tests/__pycache__/test_default.cpython-39.pyc b/roles/gnome/molecule/default/tests/__pycache__/test_default.cpython-39.pyc new file mode 100644 index 0000000000000000000000000000000000000000..326c8e83f0516d647be811d604ea65e56b72a721 GIT binary patch literal 609 zcmZWnu};G<5Vg|)rBZ=`g{^|A12GaTNC+XZF?0Z_Lzl?Jm)10mE89VowhQ7zVB{zG z3kJNh@C{6yLkk5?I_KWy{LX%7Ua!{(+H?DbzvB1JgGCDvoS>TxTm<1}^m59ZjEzuHunC-jQzrEaRz`7FaYKL4M7yK^v)Z!}g=Y=#XXdk_|_; zr*g#1VBzkNCw<-p!v?5IQe?mqrTP*>Ye6%UK+d&Po=K(>Gv6Yy@p!Q`niIrAYDlco zqv`Z-&73aI`2ha^o;UeL;Ty&RQeI>hujSUuM5$iv6$<@Wyaptw1vR=xwSONi)MzD+ eg-YVMOq4P$EUQ@Lsz(DQ@Y2VA-o_6)tb78EleOUh literal 0 HcmV?d00001 diff --git a/roles/gnome/molecule/default/tests/conftest.py b/roles/gnome/molecule/default/tests/conftest.py new file mode 100644 index 0000000..f7ddb3f --- /dev/null +++ b/roles/gnome/molecule/default/tests/conftest.py @@ -0,0 +1,22 @@ +"""PyTest Fixtures.""" +from __future__ import absolute_import + +import os + +import pytest + + +def pytest_runtest_setup(item): + """Run tests only when under molecule with testinfra installed.""" + try: + import testinfra + except ImportError: + pytest.skip("Test requires testinfra", allow_module_level=True) + if "MOLECULE_INVENTORY_FILE" in os.environ: + pytest.testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner( + os.environ["MOLECULE_INVENTORY_FILE"] + ).get_hosts("all") + else: + pytest.skip( + "Test should run only from inside molecule.", allow_module_level=True + ) diff --git a/roles/gnome/molecule/default/tests/test_default.py b/roles/gnome/molecule/default/tests/test_default.py new file mode 100644 index 0000000..0cff669 --- /dev/null +++ b/roles/gnome/molecule/default/tests/test_default.py @@ -0,0 +1,10 @@ +"""Role testing files using testinfra.""" + + +def test_hosts_file(host): + """Validate /etc/hosts file.""" + f = host.file("/etc/hosts") + + assert f.exists + assert f.user == "root" + assert f.group == "root" diff --git a/roles/gnome/tasks/arch.yml b/roles/gnome/tasks/arch.yml new file mode 100644 index 0000000..530fac2 --- /dev/null +++ b/roles/gnome/tasks/arch.yml @@ -0,0 +1,53 @@ +--- +# tasks file for gnome +- name: Install gnome packages + pacman: + name: + - gnome + - gdm + - gnome-tweaks + - gparted + - transmission-gtk + - quodlibet + # - chrome-gnome-shell + - networkmanager + - network-manager-applet + - gnome-keyring + - grsync + - soundconverter + - picard + - shotwell + - pitivi + - seahorse + - python-psutil + state: present + update_cache: yes + +- name: Install look and feel + pacman: + name: + - materia-gtk-theme + - gnome-icon-theme-extras + - arc-solid-gtk-theme + - arc-gtk-theme + - gnome-themes-extra + - gnome-icon-theme-symbolic + - gnome-icon-theme + - adwaita-icon-theme + state: present + update_cache: yes + +- name: Install AUR Icons and gtk themes + aur: + name: "{{ item }}" + use: makepkg + state: present + with_items: + - plata-theme + - gnome-colors-icon-theme + - numix-icon-theme-git + - numix-circle-icon-theme-git + - tela-icon-theme-git + become: yes + become_user: aur_builder + diff --git a/tasks/arch_gnome.yml b/roles/gnome/tasks/main.yml similarity index 62% rename from tasks/arch_gnome.yml rename to roles/gnome/tasks/main.yml index 415f432..2e4b692 100644 --- a/tasks/arch_gnome.yml +++ b/roles/gnome/tasks/main.yml @@ -1,24 +1,9 @@ --- -- name: Install gnome packages - pacman: - name: - - gnome - - gdm - - gnome-tweaks - - gparted - - transmission-gtk - - quodlibet - - chrome-gnome-shell - - networkmanager - - network-manager-applet - - gnome-keyring - - grsync - - soundconverter - - picard - - shotwell - - pitivi - - seahorse - state: present +# tasks file for gnome +- name: Install gnome for arch + import_tasks: arch.yml + when: ansible_os_family == "Archlinux" + - name: enable service gdm systemd: @@ -38,38 +23,6 @@ name: NetworkManager enabled: yes -- name: Install python-psutil package - pacman: - name: python-psutil - state: present - -- name: Install look and feel - pacman: - name: - - materia-gtk-theme - - gnome-icon-theme-extras - - arc-solid-gtk-theme - - arc-gtk-theme - - gnome-themes-extra - - gnome-icon-theme-symbolic - - gnome-icon-theme - - adwaita-icon-theme - state: present - -- name: Install AUR Icons and gtk themes - aur: - name: "{{ item }}" - use: makepkg - skip_installed: true - with_items: - - plata-theme - - gnome-colors-icon-theme - - numix-icon-theme-git - - numix-circle-icon-theme-git - - tela-icon-theme-git - become: yes - become_user: aur_builder - - name: to close window dconf: key: "/org/gnome/desktop/wm/keybindings/close" @@ -125,3 +78,4 @@ state: present become: true become_user: "{{ me.username }}" + diff --git a/roles/gnome/tests/inventory b/roles/gnome/tests/inventory new file mode 100644 index 0000000..878877b --- /dev/null +++ b/roles/gnome/tests/inventory @@ -0,0 +1,2 @@ +localhost + diff --git a/roles/gnome/tests/test.yml b/roles/gnome/tests/test.yml new file mode 100644 index 0000000..424c567 --- /dev/null +++ b/roles/gnome/tests/test.yml @@ -0,0 +1,5 @@ +--- +- hosts: localhost + remote_user: root + roles: + - gnome diff --git a/roles/gnome/vars/main.yml b/roles/gnome/vars/main.yml new file mode 100644 index 0000000..9f46d6a --- /dev/null +++ b/roles/gnome/vars/main.yml @@ -0,0 +1,2 @@ +--- +# vars file for gnome diff --git a/roles/mopidy-server/.travis.yml b/roles/mopidy-server/.travis.yml new file mode 100644 index 0000000..36bbf62 --- /dev/null +++ b/roles/mopidy-server/.travis.yml @@ -0,0 +1,29 @@ +--- +language: python +python: "2.7" + +# Use the new container infrastructure +sudo: false + +# Install ansible +addons: + apt: + packages: + - python-pip + +install: + # Install ansible + - pip install ansible + + # Check ansible version + - ansible --version + + # Create ansible.cfg with correct roles_path + - printf '[defaults]\nroles_path=../' >ansible.cfg + +script: + # Basic role syntax check + - ansible-playbook tests/test.yml -i tests/inventory --syntax-check + +notifications: + webhooks: https://galaxy.ansible.com/api/v1/notifications/ \ No newline at end of file diff --git a/roles/mopidy-server/.yamllint b/roles/mopidy-server/.yamllint new file mode 100644 index 0000000..8827676 --- /dev/null +++ b/roles/mopidy-server/.yamllint @@ -0,0 +1,33 @@ +--- +# Based on ansible-lint config +extends: default + +rules: + braces: + max-spaces-inside: 1 + level: error + brackets: + max-spaces-inside: 1 + level: error + colons: + max-spaces-after: -1 + level: error + commas: + max-spaces-after: -1 + level: error + comments: disable + comments-indentation: disable + document-start: disable + empty-lines: + max: 3 + level: error + hyphens: + level: error + indentation: disable + key-duplicates: enable + line-length: disable + new-line-at-end-of-file: disable + new-lines: + type: unix + trailing-spaces: disable + truthy: disable diff --git a/roles/mopidy-server/README.md b/roles/mopidy-server/README.md new file mode 100644 index 0000000..225dd44 --- /dev/null +++ b/roles/mopidy-server/README.md @@ -0,0 +1,38 @@ +Role Name +========= + +A brief description of the role goes here. + +Requirements +------------ + +Any pre-requisites that may not be covered by Ansible itself or the role should be mentioned here. For instance, if the role uses the EC2 module, it may be a good idea to mention in this section that the boto package is required. + +Role Variables +-------------- + +A description of the settable variables for this role should go here, including any variables that are in defaults/main.yml, vars/main.yml, and any variables that can/should be set via parameters to the role. Any variables that are read from other roles and/or the global scope (ie. hostvars, group vars, etc.) should be mentioned here as well. + +Dependencies +------------ + +A list of other roles hosted on Galaxy should go here, plus any details in regards to parameters that may need to be set for other roles, or variables that are used from other roles. + +Example Playbook +---------------- + +Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too: + + - hosts: servers + roles: + - { role: username.rolename, x: 42 } + +License +------- + +BSD + +Author Information +------------------ + +An optional section for the role authors to include contact information, or a website (HTML is not allowed). diff --git a/roles/mopidy-server/defaults/main.yml b/roles/mopidy-server/defaults/main.yml new file mode 100644 index 0000000..2cbaaca --- /dev/null +++ b/roles/mopidy-server/defaults/main.yml @@ -0,0 +1,2 @@ +--- +# defaults file for mopidy-server diff --git a/roles/mopidy-server/handlers/main.yml b/roles/mopidy-server/handlers/main.yml new file mode 100644 index 0000000..453dea0 --- /dev/null +++ b/roles/mopidy-server/handlers/main.yml @@ -0,0 +1,2 @@ +--- +# handlers file for mopidy-server diff --git a/roles/mopidy-server/molecule/default/INSTALL.rst b/roles/mopidy-server/molecule/default/INSTALL.rst new file mode 100644 index 0000000..0c4bf5c --- /dev/null +++ b/roles/mopidy-server/molecule/default/INSTALL.rst @@ -0,0 +1,23 @@ +********************************* +Vagrant driver installation guide +********************************* + +Requirements +============ + +* Vagrant +* Virtualbox, Parallels, VMware Fusion, VMware Workstation or VMware Desktop + +Install +======= + +Please refer to the `Virtual environment`_ documentation for installation best +practices. If not using a virtual environment, please consider passing the +widely recommended `'--user' flag`_ when invoking ``pip``. + +.. _Virtual environment: https://virtualenv.pypa.io/en/latest/ +.. _'--user' flag: https://packaging.python.org/tutorials/installing-packages/#installing-to-the-user-site + +.. code-block:: bash + + $ pip install 'molecule_vagrant' diff --git a/roles/mopidy-server/molecule/default/converge.yml b/roles/mopidy-server/molecule/default/converge.yml new file mode 100644 index 0000000..a7b5aaa --- /dev/null +++ b/roles/mopidy-server/molecule/default/converge.yml @@ -0,0 +1,7 @@ +--- +- name: Converge + hosts: all + tasks: + - name: "Include mopidy-server" + include_role: + name: "mopidy-server" diff --git a/roles/mopidy-server/molecule/default/molecule.yml b/roles/mopidy-server/molecule/default/molecule.yml new file mode 100644 index 0000000..513315f --- /dev/null +++ b/roles/mopidy-server/molecule/default/molecule.yml @@ -0,0 +1,12 @@ +--- +dependency: + name: galaxy +driver: + name: vagrant +platforms: + - name: Debian + box: "debian/bullseye64" +provisioner: + name: ansible +verifier: + name: testinfra diff --git a/roles/mopidy-server/molecule/default/tests/__pycache__/conftest.cpython-39-pytest-6.2.5.pyc b/roles/mopidy-server/molecule/default/tests/__pycache__/conftest.cpython-39-pytest-6.2.5.pyc new file mode 100644 index 0000000000000000000000000000000000000000..fbad74fa62efd0725b01386398404bef9d787f2e GIT binary patch literal 955 zcmYjP&2AGh5VoC7vYV!~ph{Iat+)k2!UI&Os7j?uB}Jtab%kVYV~05G+KcT?NK|f| zka&mo$V2cBoPFiQD{!EUH*Kj`9`F2q-;5?*U2P#a=Rba?UkO6LymI$|4eh`+dmtD} z5W|dQI423g{=b&hlAwC)d4nK~@@5iVd!i(&Jgua~0#^Tmk`-2ajXI6R`m6adH#XiA zpKPhQ>Hdc5sDs^FdS+BsT24h?C~XHr>^;}VlL_JO!Zl+Mi*`i^ea3H*j00rx{0RmU z7+Er@v6_ed21HMhB+n3Q*kDqhB7Jg>Cyhz-BJ?_IY@thh5wYeawuH9iy(%}n$z=p6 zM~m&FQpOfYn^?(g9?!;H#-(Ij$GOV*u*`To6Lwt12szSeETpk%mT}hAzKg+PvuaxN zkEMX7|3@A}=MNxK&1kL|RH7N5@+{eWd3ey@eRI&K`-7AI;P~+9ljagpa<@p3Es)olA(EA1M^+rxH#aJ3T#0A3gT-Txf??|t~^XFYJ z=S-wMriNwCr8PY>)S`gbXVYu2o`#{CUaktk=1&dRQ?5Z<4!XzqC@nKvWtiSj$&t_P z7IU|;Y{zr0${B9UA_83V5CkFwx8d8sEga(TDj?)<7z8-D()YpJX}cz+K#Wq?qI6XH z<)l>my>sDNDKeO#aqXRAPH(j>x`gbe254HLWLNW82MR by&BIQv0kBWFE`@3-yq|cKfrDBh=jF&1^5~g literal 0 HcmV?d00001 diff --git a/roles/mopidy-server/molecule/default/tests/__pycache__/conftest.cpython-39.pyc b/roles/mopidy-server/molecule/default/tests/__pycache__/conftest.cpython-39.pyc new file mode 100644 index 0000000000000000000000000000000000000000..d741990be72f2517326b9ebf55025346fcfa9c4b GIT binary patch literal 974 zcmZWoL2uJA6tF1FLrj@>vR z@gKG$zk`1fapS~a;J|oJ*D=7BpX2wQ-}k*wPO`k*LNG@BYx0R8^xYk95AdO9u*?P+ zhGN7pBN@&~OtAa*GB5V3-H(0dv)V@#*O>PTb?UP_FQ*6G*l=6Cw}s}W`vYpA4lY-d zW23Udaw_t%(zc&s7r7n|GJv%O%M8KH+7&1|$8V4fePr=;10y#r8F|ceu%Cg>5t8H) zVs-0}Y7?XnKj2Y))VK)Tnbq&1OMKB}jZ16^ZON7DZm_t^2vBa$Hunn|S|DvgC9`RG zI^;4eB;z{FRmRgItlL>Cn~rO_Fz)^Z)0l*>d56-~Gn0|A~J64BY& z?bPm~0A(P5YL%XzpZ}Y)C`VC$xwAt5F}s)Ufp#M&|Tg9AfDi0gzv+MyTY)y|fYG?AT-wImnd z#A#==!zyv%kKljc2)=USU)YJ~q=Pb~orq-nz3_Y#$+BW&2cSIG3%&Y{)uuY(dr<_jn_(g&1siqQE^I}6HAh&k{69V1fg@~==C@fCa+Zl!M`XRuUZOHpo@9IE{Xs?x zOerC=*6lm#aM@Shn~BldD4``^wZ&lwYrR6_z$e;DhfAhg-qN;AlFY}aWMjj}qq`SS z3?PSBv^FZzRbTm*wBV9R8#=?bI+~jjvhFJbt^@1h1+2R=8Ki&H&T8A-R$Z$^>)Fk8 zNOuNd1Q%K9T9ouyq_hX9xyY1BeT}NUWDs#GMJnlTlwq6paObYFkLjAh7%_&IpEOo;OtG0Zv zTRIiv{prZcv@?lR)7Gj;JQ_D OgXl-*C!|bWZR;0SwSS}l literal 0 HcmV?d00001 diff --git a/roles/mopidy-server/molecule/default/tests/__pycache__/test_default.cpython-39.pyc b/roles/mopidy-server/molecule/default/tests/__pycache__/test_default.cpython-39.pyc new file mode 100644 index 0000000000000000000000000000000000000000..01004e15be14fc5eb0df79c744e41468b4f0dc08 GIT binary patch literal 601 zcmZWny-ve05Vn)>SE<0j!dAi5ffxxEB!rOI7&?H&z!JIfrI@C1Wjhu9TM!QdBhSH8 z;0cMhVB#EFC~(p_cV9l=+25Jh>otOQ3orZ?zwbU-v;dP+bhC+zAlF1t5j>D%chHegVnUF^;`b4L6LT{H9? zv|H+ERrZ^Ki~M#+vuC1L@kk$USg!{x=b4rkSUiAYz<6O~J4aNuS$}A6RB;d=F@uD? zK2N*61BUfbjkH8ks#I5EXf0@FQYg5ViVZ-^Od|3v4jYdbsqwr(BBX}YDm|P||8nN# zl7jc(|L=K|UnP9QL_o&N+{XQ(+o*s_wZtnE`EmHWlb{yV=sMN@U9?b}l_U`=O_B+oO}p-gCd7oqAxDZv1L8U%(9}tjMu)ZmS}s-^yQ{k-F1FLsj@>vR z@jq-w{vK|TIC0`%;J|oJ*D=76pX28*@B7{-M=mcn5R3=CuhA!h(09AJJs^jk!_=D) z7zz=?j3hWEA;I>&l2pPbdo?}c+W0%-y~!2V?H^DBwQ#W- z^|VZK!>LF|Qkiay?aB49lpf4&n0g3d=9Z-B9KS``nu83U-o?m1h72pLVrf5voMV*X z31Y5shSf1rn;-Dd9o8;9yJzk_bcrwOtagbFp$$e3=U;n^uWhDPpKTrFnQuV0_GOk# z{mFo5ex5O|{8T19&J*rWgc+0=k@Z#Ni%gp+NjPgO+ede{QMRr4yIerqe~?El9IgXW zPG~9_RH6wV^CaAOxxd%he!bVByWKaP?$Q3iG2PkS>l76L&mNZ5^g!kb^A)Hob@i1@ zEwfAZM3}niKBG?3ZT_LIkf2E?OL6rV;XTn7uEgILN_0hSxXRiI;@MM}tE%$4X1$lRz1 z&dzQ_+lvB}f&a0QYI=VDFJ@7WW>L!jKVFdhRU(#I-;%aR)8fwDPivMxoQv(d$791`{g(eZd|Dq0JPkqMk$jqrA33%es2E|N|n9*%HDqE+F+rj cowvd=j6*?4Tz0h)0^0-)Vy-jsO4v literal 0 HcmV?d00001 diff --git a/roles/users/molecule/default/tests/__pycache__/test_default.cpython-310.pyc b/roles/users/molecule/default/tests/__pycache__/test_default.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..a63a9890a4e099c34ae6fac7741795d0db058ca0 GIT binary patch literal 604 zcmZWnJx{|h5Vg|)CE|O6tr80zh(RzSgv7?s0VD>N$c-<>G>t3Usc4}K;)lS<5YH=|lXj|=P{(|2(Urbwo#Syw$!63*55mW^C_!-BE0=rl5!gK3n;=byby^Ejorc4D5ehJK80_A%U&2PA!@V|q)ksEJOcRn@9$-B(|OH_mx31-H;(U{iLfj5XE#coh9~T&R_@t!C&#zc)7v*Ajs)EDdNk z)6uHzHv<>?<&I`gMAvak@2|+$1D5klOA9O>KrvvvFtVLvSGHMyXfIW<7w_&cgNW@u zPrJMWhV@X6v_w>@R99kZEof#^D7co24M59GV&_{Oc5^cgjVA<&kQ!2}^l&`>i*QoXnqlMzkC5cdJl2naK YpQ$j9AXh)=DS?MR^cQVBQ%DwSAIR{tGXMYp literal 0 HcmV?d00001 diff --git a/roles/users/molecule/default/tests/conftest.py b/roles/users/molecule/default/tests/conftest.py new file mode 100644 index 0000000..f7ddb3f --- /dev/null +++ b/roles/users/molecule/default/tests/conftest.py @@ -0,0 +1,22 @@ +"""PyTest Fixtures.""" +from __future__ import absolute_import + +import os + +import pytest + + +def pytest_runtest_setup(item): + """Run tests only when under molecule with testinfra installed.""" + try: + import testinfra + except ImportError: + pytest.skip("Test requires testinfra", allow_module_level=True) + if "MOLECULE_INVENTORY_FILE" in os.environ: + pytest.testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner( + os.environ["MOLECULE_INVENTORY_FILE"] + ).get_hosts("all") + else: + pytest.skip( + "Test should run only from inside molecule.", allow_module_level=True + ) diff --git a/roles/users/molecule/default/tests/test_default.py b/roles/users/molecule/default/tests/test_default.py new file mode 100644 index 0000000..0cff669 --- /dev/null +++ b/roles/users/molecule/default/tests/test_default.py @@ -0,0 +1,10 @@ +"""Role testing files using testinfra.""" + + +def test_hosts_file(host): + """Validate /etc/hosts file.""" + f = host.file("/etc/hosts") + + assert f.exists + assert f.user == "root" + assert f.group == "root" diff --git a/tasks/users.yml b/roles/users/tasks/main.yml similarity index 62% rename from tasks/users.yml rename to roles/users/tasks/main.yml index 7423d32..fbfce54 100644 --- a/tasks/users.yml +++ b/roles/users/tasks/main.yml @@ -1,27 +1,26 @@ --- +# tasks file for users - name: users -- Ensure wheel group exists group: name: wheel state: present - name: create users - user: + ansible.builtin.user: name: "{{ item.username }}" + update_password: on_create password: "{{ item.password | password_hash('sha512')}}" group: "{{ item.group }}" groups: "{{ item.groups }}" - uid: "{{ item.uid }}" - shell: "{{ prompt_place['stdout'] }}" + shell: "{{ item.shell | default('/bin/bash') }}" state: present + system: "{{ item.system | default('no') }}" + createhome: "{{ item.createhome | default('no') }}" with_items: "{{ users }}" - when: create_user - name: ssh -- Add public key authorized_key: user: "{{ item.user.username }}" - key: "{{ lookup('file', 'sshpubs/' + item.key) }}" + key: "{{ lookup('file', item.key) }}" state: present with_items: "{{ public_key }}" - register: add_identity_key - tags: - - first_deployement diff --git a/roles/users/tests/inventory b/roles/users/tests/inventory new file mode 100644 index 0000000..878877b --- /dev/null +++ b/roles/users/tests/inventory @@ -0,0 +1,2 @@ +localhost + diff --git a/roles/users/tests/test.yml b/roles/users/tests/test.yml new file mode 100644 index 0000000..7925515 --- /dev/null +++ b/roles/users/tests/test.yml @@ -0,0 +1,5 @@ +--- +- hosts: localhost + remote_user: root + roles: + - users diff --git a/roles/users/vars/main.yml b/roles/users/vars/main.yml new file mode 100644 index 0000000..4070860 --- /dev/null +++ b/roles/users/vars/main.yml @@ -0,0 +1,2 @@ +--- +# vars file for users diff --git a/roles/vagrant_playbook.yml b/roles/vagrant_playbook.yml new file mode 100644 index 0000000..bc55977 --- /dev/null +++ b/roles/vagrant_playbook.yml @@ -0,0 +1,8 @@ +--- +- name: Test Vagrant + hosts: all + become: true + roles: + - arch_aur + - users + - gnome diff --git a/rpi3.yml b/rpi3.yml deleted file mode 100644 index a424d01..0000000 --- a/rpi3.yml +++ /dev/null @@ -1,23 +0,0 @@ ---- -- hosts: localhost - connection: local - - vars_files: - - vars/common.yml - - vars/server.yml - - vars/rpi3.yml - - tasks: - - include: tasks/deb_CLI_packages.yml - - include: tasks/prompt.yml - - include: tasks/users.yml - - include: tasks/sudo.yml - - include: tasks/ssh.yml - - include: tasks/dotfiles.yml - - include: tasks/epaper_driver.yml - - handlers: - - name: restart sshd - service: - name: sshd - state: restarted diff --git a/tasks/NAS_mounts.yml b/tasks/NAS_mounts.yml deleted file mode 100644 index 3657194..0000000 --- a/tasks/NAS_mounts.yml +++ /dev/null @@ -1,61 +0,0 @@ ---- -- name: create mount points - file: - path: "{{ item.name }}" - state: directory - with_items: "{{ label_mounts }}" - -- name: Mount data drives for storage - mount: - name: '{{ item.name }}' - src: '{{ item.label }}' - fstype: ext4 - passno: 2 - state: mounted - with_items: "{{ label_mounts }}" - -- name: create mount points - file: - path: "{{ item.name }}" - state: directory - with_items: "{{ access_mounts }}" - -- name: Mount media mounts for easy access - mount: - name: '{{ item.name }}' - src: '{{ item.src }}' - fstype: none - opts: bind - passno: 0 - state: mounted - with_items: "{{ access_mounts }}" - -- name: install nfs - apt: - pkg: nfs-kernel-server - state: present - notify: restart nfs - -- name: Lines in exports - lineinfile: - dest: /etc/exports - line: "{{ item.name }} 192.168.1.1/24({{ item.options }})" - with_items: "{{ nfs_shares }}" - notify: restart nfs - -- name: create mount points - file: - path: "{{ item.name }}" - state: directory - with_items: "{{ nfs_shares }}" - -- name: rbind Mounts for NFS etc. - mount: - name: '{{ item.name }}' - src: '{{ item.src }}' - fstype: none - opts: rbind - passno: 0 - state: mounted - with_items: "{{ nfs_shares }}" - notify: restart nfs diff --git a/tasks/ansible.yml b/tasks/ansible.yml deleted file mode 100644 index 1fb1fe6..0000000 --- a/tasks/ansible.yml +++ /dev/null @@ -1,11 +0,0 @@ ---- -- name: ansible -- Create ansible conf directory - file: - path: /etc/ansible - state: directory - -- name: ansible -- Copy ansible.cfg - copy: - src: files/ansible.cfg - dest: /etc/ansible/ansible.cfg - backup: yes diff --git a/tasks/arch_CLI_music.yml b/tasks/arch_CLI_music.yml deleted file mode 100644 index 00a592f..0000000 --- a/tasks/arch_CLI_music.yml +++ /dev/null @@ -1,16 +0,0 @@ ---- -- name: Install music CLI packages - pacman: - name: - - moc - - mpd - - mpc - - ncmpcpp - state: present - -- name: enable service mpd - systemd: - name: mpd - enabled: yes - state: started - diff --git a/tasks/arch_CLI_packages.yml b/tasks/arch_CLI_packages.yml deleted file mode 100644 index a7d1ae1..0000000 --- a/tasks/arch_CLI_packages.yml +++ /dev/null @@ -1,91 +0,0 @@ ---- -- name: Update and upgrade all packages - pacman: - update_cache: yes - upgrade: yes - tags: - - first_deployement - -- name: Install base CLI packages - pacman: - name: - - pacman-contrib - - sudo - - wget - - cronie - - vim - - tmux - - ruby - - git - - tig - - openssh - - sshfs - - htop - - ntop - - iotop - - glances - - nmap - - nfs-utils - - samba - - sshpass - - rsync - - autofs - - bind-tools - - unzip - - ntfs-3g - - git-annex - - cifs-utils - - gnupg - - traceroute - - smartmontools - - ripgrep - - fzf - state: present - tags: - - first_deployement - -- name: Install extra CLI packages - pacman: - name: - - moc - - pass - - cups - - cups-pdf - - task - - profanity - - neomutt - - youtube-dl - - neovim - - python-pynvim - state: present - when: not minimal or not server - -- name: enable service cups - systemd: - name: cups - # name: org.cups.cups - enabled: yes - state: started - when: not minimal or not server - -- name: enable service avahi-daemon - systemd: - name: avahi-daemon - enabled: yes - state: started - when: not minimal or not server - -- name: enable service nfs - systemd: - name: nfs-client.target - enabled: yes - state: started - when: not minimal or not server - -- name: More colorfull pacman - lineinfile: - dest: /etc/pacman.conf - regexp: '^#Color$' - line: 'Color' - backrefs: yes - ignore_errors: yes diff --git a/tasks/arch_aur.yml b/tasks/arch_aur.yml deleted file mode 100644 index c7dc789..0000000 --- a/tasks/arch_aur.yml +++ /dev/null @@ -1,44 +0,0 @@ ---- -- user: - name: aur_builder - group: wheel - uid: 998 - tags: - - first_deployement - -- lineinfile: - path: /etc/sudoers.d/11-install-aur_builder - state: present - line: 'aur_builder ALL=(ALL) NOPASSWD: /usr/bin/pacman' - create: yes - validate: 'visudo -cf %s' - tags: - - first_deployement - -- name: Git clone ansible-aur - git: - repo: https://github.com/kewlfft/ansible-aur.git - dest: ~/.ansible/plugins/modules/aur - version: master - accept_hostkey: yes - become: yes - become_user: aur_builder - tags: - - first_deployement - -- name: Install Yay - aur: - name: yay - use: makepkg - skip_installed: true - become: yes - become_user: aur_builder - -- name: Install mkpasswd - aur: - name: mkpasswd - use: makepkg - skip_installed: true - become: yes - become_user: aur_builder - diff --git a/tasks/arch_docker.yml b/tasks/arch_docker.yml deleted file mode 100644 index 0fc33ee..0000000 --- a/tasks/arch_docker.yml +++ /dev/null @@ -1,12 +0,0 @@ ---- -- name: Install docker - pacman: - name: - - docker - state: present - -- name: Enable docker daemon - service: - name: docker - state: started - enabled: yes diff --git a/tasks/arch_graphicals.yml b/tasks/arch_graphicals.yml deleted file mode 100644 index dab9897..0000000 --- a/tasks/arch_graphicals.yml +++ /dev/null @@ -1,107 +0,0 @@ ---- -- name: Install graphical packages - pacman: - name: - - gimp - - firefox - - firefox-i18n-fr - - chromium - - inkscape - - pstoedit # Enable latex in inkscape - - thunderbird - - thunderbird-i18n-fr - - libreoffice-fresh - - libreoffice-fresh-fr - - hunspell - - hunspell-fr - - rxvt-unicode - - vlc - - mpv - - mplayer - - geogebra - - zathura - - zathura-ps - - zathura-djvu - - zathura-cb - - zathura-pdf-mupdf - - xdotool - - guvcview - - alacritty - - scribus - - nextcloud-client - state: present - -- name: Install 3D printing packages - pacman: - name: - - openscad - - cura - state: present - -- name: Install urxvt perls - pacman: - name: urxvt-perls - state: present - -- name: Install urxvt plugins (AUR) - aur: - name: "{{ item }}" - use: makepkg - skip_installed: true - with_items: - - urxvt-fullscreen - - urxvt-resize-font-git - become: yes - become_user: aur_builder - -- name: Install fonts - pacman: - name: - - awesome-terminal-fonts - - cantarell-fonts - - gnu-free-fonts - - gsfonts - - ttf-bitstream-vera - - ttf-dejavu - - ttf-droid - - ttf-roboto - - ttf-liberation - - ttf-ubuntu-font-family - - ttf-inconsolata - - noto-fonts - state: present - -- name: Install AUR fonts - aur: - name: "{{ item }}" - use: makepkg - skip_installed: true - with_items: - - ttf-ubuntu-mono-derivative-powerline-git - - ttf-inconsolata-lgc-for-powerline - - ttf-droid-sans-mono-slashed-powerline-git - - ttf-literation-mono-powerline-git - - ttf-opendyslexic - - nerd-fonts-ubuntu-mono - - nerd-fonts-droid-sans-mono - - nerd-fonts-hack - become: yes - become_user: aur_builder - - # - name: Download st - # git: - # repo: https://git.opytex.org/lafrite/st.git - # dest: /home/aur_builder/st - # register: st_update - # become: yes - # become_user: aur_builder - # - # - name: Install st - # command: "makepkg -si --noconfirm" - # args: - # chdir: "/home/aur_builder/st/" - # when: st_update is changed - # become: yes - # become_user: aur_builder - - diff --git a/tasks/arch_programming.yml b/tasks/arch_programming.yml deleted file mode 100644 index c2f0df7..0000000 --- a/tasks/arch_programming.yml +++ /dev/null @@ -1,26 +0,0 @@ ---- -- name: File conversion - pacman: - name: - - pandoc - -- name: Install python env - pacman: - name: - - python - - python-virtualenv - - python-pip - - python2 - - python2-virtualenv - - python2-pip - - graphviz - - python-black - - pyenv - state: present - -- name: Install yarn and node js - pacman: - name: - - nodejs - - yarn - state: present diff --git a/tasks/arch_teacher.yml b/tasks/arch_teacher.yml deleted file mode 100644 index df9d656..0000000 --- a/tasks/arch_teacher.yml +++ /dev/null @@ -1,22 +0,0 @@ ---- -- name: Install teaching packages - pacman: - name: - - texlive-most - - gnuplot - - auto-multiple-choice - - xournalpp - state: present - -- name: Install perl-locale-codes (for auto-multiple-choice) - aur: - name: "{{ item }}" - use: makepkg - skip_installed: true - with_items: - - perl-locale-codes - become: yes - become_user: aur_builder - - - diff --git a/tasks/arch_virtualbox.yml b/tasks/arch_virtualbox.yml deleted file mode 100644 index 99193fa..0000000 --- a/tasks/arch_virtualbox.yml +++ /dev/null @@ -1,33 +0,0 @@ ---- -- name: Install virtualbox - pacman: - name: - - virtualbox - - virtualbox-guest-utils - state: present - -- name: Ensure group vboxuser exists - group: - name: vboxuser - state: present - -- name: Add me user to vboxuser group - user: - name: "{{ me.username }}" - groups: vboxusers - append: yes - - # - name: Add the vboxdrv module - # modprobe: - # name: vboxdrv - # state: present - - # - name: Add the vboxnetadp module - # modprobe: - # name: vboxnetadp - # state: present - # - # - name: Add the vboxnetflt module - # modprobe: - # name: vboxnetflt - # state: present diff --git a/tasks/borg_server.yml b/tasks/borg_server.yml deleted file mode 100644 index 2e15615..0000000 --- a/tasks/borg_server.yml +++ /dev/null @@ -1,68 +0,0 @@ ---- -- name: Install borgbackup - apt: - name: borgbackup - state: present - -- name: Add borgbackup group - group: - name: "{{ borg.group }}" - state: present - -- name: Add borgbackup user - user: - name: "{{ borg.user }}" - shell: /bin/bash - home: "{{ borg.home }}" - password: "{{ borg.password }}" - createhome: yes - group: "{{ borg.group }}" - state: present - -- name: Fix permission on borgbackup home - file: - path: "{{ borg.home }}" - owner: "{{ borg.user }}" - group: "{{ borg.group }}" - mode: 0700 - state: directory - -- name: Fix .ssh permision - file: - path: "{{ borg.home }}/.ssh" - owner: "{{ borg.user }}" - group: "{{ borg.group }}" - mode: 0700 - state: directory - -- name: Fix pool permission - file: - path: "{{ borg.pool }}" - owner: "{{ borg.user }}" - group: "{{ borg.group }}" - mode: 0700 - state: directory - -- name: Add autorized backup user through $HOME/.ssh/authorized_keys - authorized_key: - user: "{{ borg.user }}" - key: "{{ item.key }}" - key_options: 'command="cd {{ borg.pool }}/{{ item.host }};borg serve --restrict-to-path {{ borg.pool }}/{{ item.host }}",restrict' - with_items: "{{ borg.auth_users }}" - -- name: Fix permission on authorized_keys - file: - path: "{{ borg.home }}/.ssh/authorized_keys" - owner: "{{ borg.user }}" - group: "{{ borg.group }}" - mode: 0600 - state: file - -- name: Fix permission on each repo - file: - path: "{{ borg.pool }}/{{ item.host }}" - owner: "{{ borg.user }}" - group: "{{ borg.group }}" - mode: 0700 - state: directory - with_items: "{{ borg.auth_users }}" diff --git a/tasks/choux_arch_hardware.yml b/tasks/choux_arch_hardware.yml deleted file mode 100644 index 9a94334..0000000 --- a/tasks/choux_arch_hardware.yml +++ /dev/null @@ -1,9 +0,0 @@ ---- -- name: Install graphical cared packages - pacman: - name: - - xf86-video-nouveau - - nouveau-dri - state: present - tags: - - first_deployement diff --git a/tasks/choux_borg_backup.yml b/tasks/choux_borg_backup.yml deleted file mode 100644 index b10549a..0000000 --- a/tasks/choux_borg_backup.yml +++ /dev/null @@ -1,45 +0,0 @@ ---- -- name: Mount backup disk - mount: - path: "{{ backup_mount_point }}" - src: "UUID={{ backup_disk_uuid }}" - fstype: ext4 - opts: defaults - state: mounted - -- name: Install borgbackup - pacman: - name: - - borg - - python-llfuse - state: present - -- name: Create script directory - file: - path: "{{ borg_script_path }}" - state: directory - mode: 755 - -- name: Automate toward local RAID backup with systemd timer - template: - src: files/choux_borg.sh - dest: "{{ borg_script_path }}/{{ borg_script_filename }}" - mode: 755 - -- name: Backup systemd timer - template: - src: files/choux_borg.timer - dest: /etc/systemd/system/ - mode: 755 - -- name: Backup systemd service - template: - src: files/choux_borg.service - dest: /etc/systemd/system/ - mode: 755 - -- name: Enable systemd borg script - service: - name: choux_borg.timer - state: started - enabled: yes diff --git a/tasks/dd_backup.yml b/tasks/dd_backup.yml deleted file mode 100644 index 83b9643..0000000 --- a/tasks/dd_backup.yml +++ /dev/null @@ -1,47 +0,0 @@ ---- -- name: Install autofs - pacman: - name: borg - state: present - -- name: mkdir for config files and scripts - file: - path: /etc/backups - state: directory - -- name: copy udev rule in /etc/backups - copy: - src: files/dd_borg/40-backup.rules - dest: /etc/backups/40-backup.rules - backup: yes - -- name: Link it to /etc/udev - file: - src: /etc/backups/40-backup.rules - dest: /etc/udev/rules.d/40-backup.rules - state: link - -- name: copy service in /etc/backups - copy: - src: files/dd_borg/automatic-backup.service - dest: /etc/backups/automatic-backup.service - backup: yes - -- name: Link it to /etc/udev - file: - src: /etc/backups/automatic-backup.service - dest: /etc/systemd/system/automatic-backup.service - state: link - -- name: copy run script - template: - src: files/dd_borg/run.sh - dest: /etc/backups/run.sh - mode: u+rxw - -- name: Reload systemctl - systemd: - daemon_reload: yes - -- name: Reload udev - shell: udevadm control --reload diff --git a/tasks/deb_CLI_packages.yml b/tasks/deb_CLI_packages.yml deleted file mode 100644 index f8837b5..0000000 --- a/tasks/deb_CLI_packages.yml +++ /dev/null @@ -1,36 +0,0 @@ ---- -- name: deb_CLI_packages -- Update and upgrade all packages - apt: - update_cache: yes - upgrade: full - -- name: deb_CLI_packages -- Install base CLI packages - apt: - name: - - sudo - - wget - - curl - - zsh - - vim - - tmux - - ruby - - git - - tig - - openssh-server - - sshfs - - htop - - iftop - - iotop - - glances - - rxvt-unicode-256color - - rsync - state: present - -- name: deb_CLI_packages -- Install extra CLI packages - apt: - name: - - moc - - newsboat - - pass - state: present - when: not minimal or not server diff --git a/tasks/deb_docker.yml b/tasks/deb_docker.yml deleted file mode 100644 index 52dcead..0000000 --- a/tasks/deb_docker.yml +++ /dev/null @@ -1,63 +0,0 @@ ---- -- name: deb_docker -- Remove depot docker version - apt: - name: - - docker - - docker-engine - - docker.io - state: absent - -- name: deb_docker -- Install tool to use apt with https and gpg - apt: - name: - - apt-transport-https - - ca-certificates - - gpg - state: present - -- name: deb_docker -- Add Docker apt key. - apt_key: - url: https://download.docker.com/linux/debian/gpg - id: 9DC858229FC7DD38854AE2D88D81803C0EBFCD88 - state: present - register: add_repository_key - -- name: deb_docker -- Ensure curl is present (on older systems without SNI). - apt: - name: curl - state: present - when: add_repository_key is failed - -- name: deb_docker -- Add Docker apt key (alternative for older systems without SNI). - shell: "curl -sSL https://download.docker.com/linux/debian/gpg | sudo apt-key add -" - args: - warn: no - when: add_repository_key is failed - -- name: deb_docker -- Add Docker repository. - apt_repository: - repo: deb [arch=amd64] https://download.docker.com/linux/debian {{ ansible_distribution_release }} stable - state: present - update_cache: yes - -- name: deb_docker -- Install docker-ce - apt: - name: docker-ce - state: present - -- name: deb_docker -- Install docker-compose - get_url: - url: https://github.com/docker/compose/releases/download/1.22.0/docker-compose-Linux-x86_64 - dest: /usr/local/bin/docker-compose - mode: 751 - -- name: deb_docker -- Create docker group - group: - name: docker - state: present - -- name: deb_docker -- Add deploy user to docker group - user: - name: "{{ admin.username }}" - groups: docker - append: yes diff --git a/tasks/dotfiles.yml b/tasks/dotfiles.yml deleted file mode 100644 index 368bf2a..0000000 --- a/tasks/dotfiles.yml +++ /dev/null @@ -1,199 +0,0 @@ ---- -- name: dotfiles -- Copying Xdefaults - template: - src: files/dotfiles/Xdefaults - dest: /home/{{ item.username }}/.Xdefaults - owner: "{{ item.username }}" - group: "{{ item.group }}" - with_items: "{{ dotusers }}" - -# Tmux -- name: dotfiles -- Copy tmux.conf - template: - src: files/dotfiles/tmux.conf - dest: /home/{{ item.username }}/.tmux.conf - owner: "{{ item.username }}" - group: "{{ item.group }}" - with_items: "{{ dotusers }}" - - -# ZSH -- name: dotiles -- create and copy .config/zsh directory - copy: - src: files/dotfiles/zsh/ - dest: /home/{{ item.username }}/.config/zsh/ - owner: "{{ item.username }}" - group: "{{ item.group }}" - with_items: "{{ dotusers }}" - when: prompt == 'zsh' - -- name: dotfiles -- Copy local zshenv - template: - src: files/dotfiles/zshenv - dest: /home/{{ item.username }}/.zshenv - owner: "{{ item.username }}" - group: "{{ item.group }}" - with_items: "{{ dotusers }}" - when: prompt == 'zsh' - -- name: dotiles -- clone zsh syntax-hightlighting - git: - repo: https://github.com/zsh-users/zsh-syntax-highlighting.git - dest: /home/{{ item.username }}/.config/zsh/zsh-syntax-highlighting - with_items: "{{ dotusers }}" - when: prompt == 'zsh' - -- name: dotiles -- clone zsh autosuggestions - git: - repo: https://github.com/zsh-users/zsh-autosuggestions.git - dest: /home/{{ item.username }}/.config/zsh/zsh-autosuggestions - with_items: "{{ dotusers }}" - when: prompt == 'zsh' - -- name: dotiles -- clone zsh zsh-history-substring-search - git: - repo: https://github.com/zsh-users/zsh-history-substring-search - dest: /home/{{ item.username }}/.config/zsh/zsh-history-substring-search - with_items: "{{ dotusers }}" - when: prompt == 'zsh' - -- name: dotiles -- clone zsh auto-ls - git: - repo: https://github.com/desyncr/auto-ls - dest: /home/{{ item.username }}/.config/zsh/auto-ls - with_items: "{{ dotusers }}" - when: prompt == 'zsh' - -- name: dotiles -- clone zsh pure prompt - git: - repo: https://github.com/sindresorhus/pure.git - dest: /home/{{ item.username }}/.config/zsh/pure - with_items: "{{ dotusers }}" - when: prompt == 'zsh' - - -# Fish config -- name: dotfiles -- Create fish config directory - file: - dest: /home/{{ item.username }}/.config/fish/ - state: directory - with_items: "{{ dotusers }}" - when: prompt == 'fish' - -- name: dotfiles -- Copy config.fish - template: - src: files/dotfiles/config.fish - dest: /home/{{ item.username }}/.config/fish/ - owner: "{{ item.username }}" - group: "{{ item.group }}" - with_items: "{{ dotusers }}" - when: prompt == 'fish' - register: fishconfig - -- name: dotfiles -- Copy fisher plugin list - template: - src: files/dotfiles/fishfile - dest: /home/{{ item.username }}/.config/fish/ - owner: "{{ item.username }}" - group: "{{ item.group }}" - with_items: "{{ dotusers }}" - when: prompt == 'fish' - register: fishplugin - -# Vim config -# -- name: dotfiles -- Copy .vim/ - copy: - src: files/dotfiles/vim/ - dest: /home/{{ item.username }}/.vim/ - owner: "{{ item.username }}" - group: "{{ item.group }}" - with_items: "{{ dotusers }}" - -- name: dotfiles -- Creates .vim/autoload/ - file: - path: /home/{{ item.username }}/.vim/autoload/ - state: directory - with_items: "{{ dotusers }}" - -- name: dotfiles -- Download plug.vim - get_url: - url: https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim - dest: /home/{{ item.username }}/.vim/autoload/plug.vim - owner: "{{ item.username }}" - group: "{{ item.group }}" - with_items: "{{ dotusers }}" - -- name: dotfiles -- Copy vimrc - template: - src: files/dotfiles/vimrc - dest: /home/{{ item.username }}/.vimrc - owner: "{{ item.username }}" - group: "{{ item.group }}" - with_items: "{{ dotusers }}" - -# Neovim config -- name: dotfiles -- Copy nvim config - copy: - src: files/dotfiles/nvim - dest: /home/{{ item.username }}/.config - owner: "{{ item.username }}" - group: "{{ item.group }}" - with_items: "{{ dotusers }}" - when: editor == 'nvim' - -- name: dotfiles -- Download plug.vim for nvim - get_url: - url: https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim - dest: /home/{{ item.username }}/.config/nvim/autoload/plug.vim - owner: "{{ item.username }}" - group: "{{ item.group }}" - with_items: "{{ dotusers }}" - when: editor == 'nvim' - -# coc snippets -- name: dotfiles -- Copying snippets - copy: - src: files/dotfiles/ultisnips/ - dest: /home/{{ item.username }}/.config/coc/ultisnips - owner: "{{ item.username }}" - group: "{{ item.group }}" - with_items: "{{ dotusers }}" - -# Alacritty terminal -- name: dotfiles -- Copy alacritty config - copy: - src: files/dotfiles/alacritty - dest: /home/{{ item.username }}/.config - owner: "{{ item.username }}" - group: "{{ item.group }}" - with_items: "{{ dotusers }}" - -# Ssh config -- name: dotfiles -- Creates .ssh - file: - path: /home/{{ item.username }}/.ssh/ - state: directory - owner: "{{ item.username }}" - group: "{{ item.group }}" - with_items: "{{ dotusers }}" - when: not server - -- name: dotfiles -- Copy ssh user config - template: - src: files/dotfiles/ssh/{{ item.ssh_config }} - dest: /home/{{ item.username }}/.ssh/config - owner: "{{ item.username }}" - group: "{{ item.group }}" - with_items: "{{ dotusers }}" - when: not server - -# Git config -- name: dotfiles -- Copy gitconfig - template: - src: files/dotfiles/gitconfig - dest: /home/{{ item.username }}/.gitconfig - owner: "{{ item.username }}" - group: "{{ item.group }}" - with_items: "{{ dotusers }}" - when: not server diff --git a/tasks/dotfiles_desktop.yml b/tasks/dotfiles_desktop.yml deleted file mode 100644 index 1599e28..0000000 --- a/tasks/dotfiles_desktop.yml +++ /dev/null @@ -1,111 +0,0 @@ ---- -- name: Copy urxvt Xdefault - template: - src: files/dotfiles/Xdefaults - dest: /home/{{ me.username }}/.Xdefaults - when: not minimal - -# Tmux -- name: Clone TPM (tmux plugin manager) - git: - repo: https://github.com/tmux-plugins/tpm - dest: /home/{{ me.username }}/.tmux/plugins/tpm - version: master - accept_hostkey: yes - -- name: Install tmuxp (Archlinux) - pacman: - name: - - tmuxp - state: present - when: ansible_distribution != 'Debian' - -- name: Copy .tmuxp/ - copy: - src: files/dotfiles/tmuxp/ - dest: /home/{{ me.username }}/.tmuxp/ - owner: "{{ me.username }}" - group: "{{ me.group }}" - -# Mocp -- name: Install mocp (Archlinux) - pacman: - name: - - moc - state: present - when: ansible_distribution != 'Debian' - -- name: mocp configfile - copy: - src: files/dotfiles/moc/ - dest: /home/{{ me.username }}/.moc/ - owner: "{{ me.username }}" - group: "{{ me.group }}" - -# Newsboat -- name: Install newsboat (Archlinux) - pacman: - name: - - newsboat - state: present - when: ansible_distribution != 'Debian' - -- name: Newsboat configfiles - copy: - src: files/dotfiles/newsboat/ - dest: /home/{{ me.username }}/.newsboat/ - owner: "{{ me.username }}" - group: "{{ me.group }}" - -# vifm -- name: Install vifm (Archlinux) - pacman: - name: - - vifm - state: present - when: ansible_distribution != 'Debian' - -- name: Vifm config folder - copy: - src: files/dotfiles/vifm/ - dest: /home/{{ me.username }}/.config/vifm - owner: "{{ me.username }}" - group: "{{ me.group }}" - -# Mail, contact and calendar -- name: Install calendar and contact synchronisation tools (Archlinux) - pacman: - name: - - khal - - khard - - vdirsyncer - state: present - when: ansible_distribution != 'Debian' - -- name: vdirsyncer configfiles - copy: - src: files/dotfiles/vdirsyncer/ - dest: /home/{{ me.username }}/.config/vdirsyncer/ - owner: "{{ me.username }}" - group: "{{ me.group }}" - -- name: mutt config files - copy: - src: files/dotfiles/mutt/ - dest: /home/{{ me.username }}/.config/mutt/ - owner: "{{ me.username }}" - group: "{{ me.group }}" - -- name: Install imap synchroniser (Archlinux) - pacman: - name: - - isync - state: present - when: ansible_distribution != 'Debian' - -- name: isync configfiles - template: - src: files/dotfiles/mbsyncrc - dest: /home/{{ me.username }}/.mbsyncrc - owner: "{{ me.username }}" - group: "{{ me.group }}" diff --git a/tasks/epaper_driver.yml b/tasks/epaper_driver.yml deleted file mode 100644 index d2da7f4..0000000 --- a/tasks/epaper_driver.yml +++ /dev/null @@ -1,37 +0,0 @@ ---- -- name: install required dependencies - apt: - name: "{{item}}" - state: present - update_cache: yes - with_items: - - git - - libfuse-dev - - fonts-liberation - - python-pil - -- name: check if the epd-fuse service exists - command: systemctl status epd-fuse.service - check_mode: no - failed_when: False - changed_when: False - register: epd_fuse_service - -- name: clone the embeddedartists gratis repository - git: - repo: https://github.com/embeddedartists/gratis.git - dest: /home/pi/gratis - -- name: build the EPD driver and install the epd-fuse service - shell: > - COG_VERSION=V2 make rpi-epd_fuse && - COG_VERSION=V2 make rpi-install - args: - chdir: /home/pi/gratis/PlatformWithOS - when: epd_fuse_service.rc != 0 - -- name: ensure the epd-fuse service is enabled and started - service: - name: epd-fuse - state: started - enabled: yes diff --git a/tasks/gaming.yml b/tasks/gaming.yml deleted file mode 100644 index e2fee50..0000000 --- a/tasks/gaming.yml +++ /dev/null @@ -1,34 +0,0 @@ ---- -- name: "add multilib" - lineinfile: - dest: "/etc/pacman.conf" - state: "present" - line: "[multilib]" - regexp: "^\\[multilib\\]" - insertafter: "^#\\[multilib\\]" - -- name: "add multilib (cont)" - lineinfile: - dest: "/etc/pacman.conf" - state: "present" - line: "Include = /etc/pacman.d/mirrorlist" - insertafter: "^\\[multilib\\]" - regexp: "Include = /etc/pacman.d/mirrorlist" - -- name: Update pacman cache - pacman: - update_cache: yes - -- name: Ensure a locale exists - locale_gen: - name: en_US.UTF-8 - state: present - -- name: Install Lutris, steam and fonts - pacman: - name: - - lutris - - steam - - ttf-liberation - state: present - diff --git a/tasks/home_autofs.yml b/tasks/home_autofs.yml deleted file mode 100644 index 034e3d9..0000000 --- a/tasks/home_autofs.yml +++ /dev/null @@ -1,43 +0,0 @@ ---- -- name: Install autofs - pacman: - name: autofs - state: present - - #- name: install nfs - # apt: - # pkg: nfs-kernel-server - # state: present - # when: ansible_distribution == 'Debian' - # notify: restart nfs-server - -- name: install nfs - pacman: - pkg: nfs-utils - state: present - when: ansible_distribution != 'Debian' - notify: restart nfs-client - -- name: Create NAS share directory - file: - path: "/media/{{ item.host }}" - state: directory - with_items: "{{ autofs }}" - -- name: Activate NAS shares for autofs - lineinfile: - path: /etc/autofs/auto.master - line: "/media/{{ item.host }} /etc/autofs/auto.{{ item.host }} --timeout=60 --browse" - with_items: "{{ autofs }}" - -- name: NAS autofs config file - template: - src: "files/autofs.{{ item.host }}" - dest: "/etc/autofs/auto.{{ item.host }}" - with_items: "{{ autofs }}" - -- name: Enable autofs daemon - service: - name: autofs - state: started - enabled: yes diff --git a/tasks/laptop.yml b/tasks/laptop.yml deleted file mode 100644 index 00985de..0000000 --- a/tasks/laptop.yml +++ /dev/null @@ -1,13 +0,0 @@ ---- -- name: Install laptop powermanagement (Archlinux) - pacman: - name: - - tlp - state: present - when: ansible_distribution != 'Debian' - -- name: enable tlp - systemd: - name: tlp - enabled: yes - state: started diff --git a/tasks/nfs_share.yml b/tasks/nfs_share.yml deleted file mode 100644 index 12a1e58..0000000 --- a/tasks/nfs_share.yml +++ /dev/null @@ -1,38 +0,0 @@ ---- -- name: install nfs - apt: - pkg: nfs-kernel-server - state: present - when: ansible_distribution == 'Debian' - notify: restart nfs-server - -- name: install nfs - pacman: - pkg: nfs-utils - state: present - when: ansible_distribution != 'Debian' - notify: restart nfs-server - -- name: Lines in exports - lineinfile: - dest: /etc/exports - line: "{{ item.name }} 192.168.1.1/24({{ item.options }})" - with_items: "{{ nfs_shares }}" - notify: restart nfs-server - -- name: create mount points - file: - path: "{{ item.name }}" - state: directory - with_items: "{{ nfs_shares }}" - -- name: rbind Mounts for NFS etc. - mount: - name: '{{ item.name }}' - src: '{{ item.src }}' - fstype: none - opts: rbind - passno: 0 - state: mounted - with_items: "{{ nfs_shares }}" - notify: restart nfs-server diff --git a/tasks/pacman_cache_server.yml b/tasks/pacman_cache_server.yml deleted file mode 100644 index 9513496..0000000 --- a/tasks/pacman_cache_server.yml +++ /dev/null @@ -1,25 +0,0 @@ ---- -- name: Install nginx - pacman: - name: nginx - state: present - -- name: create cache directy - file: - path: /srv/http/pacman-cache - state: directory - owner: http - group: http - -- name: copy nginx config - template: - src: files/nginx.conf - dest: /etc/nginx/nginx.conf - owner: root - group: root - -- name: Enable nginx daemon - service: - name: nginx - state: started - enabled: yes diff --git a/tasks/prompt.yml b/tasks/prompt.yml deleted file mode 100644 index 8e3a737..0000000 --- a/tasks/prompt.yml +++ /dev/null @@ -1,24 +0,0 @@ ---- -- name: prompt -- Install prompt (Archlinux) - pacman: - name: "{{ prompt }}" - state: present - when: ansible_distribution != 'Debian' - -- name: prompt -- Install prompt (Debian) - apt: - name: "{{ prompt }}" - state: present - when: ansible_distribution == 'Debian' - -- name: prompt -- Register prompt place - shell: which {{ prompt }} - register: prompt_place - -- name: prompt -- Set shell for root - user: - name: root - shell: "{{ prompt_place['stdout'] }}" - tags: - - first_deployement - diff --git a/tasks/ssh.yml b/tasks/ssh.yml deleted file mode 100644 index 6ea24c5..0000000 --- a/tasks/ssh.yml +++ /dev/null @@ -1,50 +0,0 @@ ---- -# - name: ssh -- Copy sshd_config -# template: -# src: files/sshd_config -# dest: /etc/ssh/sshd_config - -- name: ssh -- Disable empty password login - lineinfile: - dest: /etc/ssh/sshd_config - regexp: "^#?PermitEmptyPasswords" - line: "PermitEmptyPasswords no" - backrefs: yes - tags: - - first_deployement - -- name: ssh -- Disable remote root login - lineinfile: - dest: /etc/ssh/sshd_config - regexp: "^#?PermitRootLogin" - line: "PermitRootLogin no" - backrefs: yes - tags: - - first_deployement - -- name: ssh -- Disable password login - lineinfile: - dest: /etc/ssh/sshd_config - regexp: "^#?PasswordAuthentication" - line: "PasswordAuthentication no" - backrefs: yes - when: add_identity_key is succeeded and not add_identity_key is skipped - notify: restart sshd - tags: - - first_deployement - -- name: ssh -- Enable SSH daemon (not Debian) - service: - name: sshd - state: started - enabled: yes - tags: - - first_deployement - when: ansible_distribution != 'Debian' - -- name: ssh -- Enable SSH daemon (Debian) - service: - name: ssh - state: started - enabled: yes - when: ansible_distribution == 'Debian' diff --git a/tasks/sudo.yml b/tasks/sudo.yml deleted file mode 100644 index 0605ec4..0000000 --- a/tasks/sudo.yml +++ /dev/null @@ -1,15 +0,0 @@ ---- -- name: sudo -- Configure sudoers - template: - src: files/sudoers - dest: /etc/sudoers - mode: 0440 - tags: - - first_deployement - -- name: sudo -- Create sudo group - group: - name: sudo - state: present - tags: - - first_deployement diff --git a/tasks/test.yml b/tasks/test.yml deleted file mode 100644 index 6955955..0000000 --- a/tasks/test.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -- name: Display all variables/facts known for a host - debug: - var: hostvars[inventory_hostname] - verbosity: 4 diff --git a/tasks/wine.yml b/tasks/wine.yml deleted file mode 100644 index 6824680..0000000 --- a/tasks/wine.yml +++ /dev/null @@ -1,30 +0,0 @@ ---- -- name: "add multilib" - lineinfile: - dest: "/etc/pacman.conf" - state: "present" - line: "[multilib]" - regexp: "^\\[multilib\\]" - insertafter: "^#\\[multilib\\]" - -- name: "add multilib (cont)" - lineinfile: - dest: "/etc/pacman.conf" - state: "present" - line: "Include = /etc/pacman.d/mirrorlist" - insertafter: "^\\[multilib\\]" - regexp: "Include = /etc/pacman.d/mirrorlist" - -- name: Install WINE packages - pacman: - name: - - lib32-libglvnd - - wine - - winetricks - - wine_gecko - - wine-mono - - lib32-alsa-plugins - - lib32-libpulse - - lib32-openal - state: present - update-cache: yes diff --git a/tasks/zsh.yml b/tasks/zsh.yml deleted file mode 100644 index 8801735..0000000 --- a/tasks/zsh.yml +++ /dev/null @@ -1,70 +0,0 @@ ---- -- name: Install base CLI packages - pacman: - name: - - zsh - - grml-zsh-config - state: present - -- name: Set shell for root to zsh - user: - name: root - shell: /bin/zsh - tags: - - first_deployement - - -# ZSH dotfiles -- name: dotiles -- create .config/zsh directory - file: - path: /home/{{ item.username }}/.config/zsh/ - state: directory - mode: '0755' - with_items: "{{ dotusers }}" - when: prompt == 'zsh' - -- name: dotfiles -- Copy local zshrc - template: - src: files/dotfiles/zshrc - dest: /home/{{ item.username }}/.config/zsh/.zshrc - owner: "{{ item.username }}" - group: "{{ item.group }}" - with_items: "{{ dotusers }}" - when: prompt == 'zsh' - -- name: dotfiles -- Copy local zshenv - template: - src: files/dotfiles/zshenv - dest: /home/{{ item.username }}/.zshenv - owner: "{{ item.username }}" - group: "{{ item.group }}" - with_items: "{{ dotusers }}" - when: prompt == 'zsh' - -- name: dotiles -- clone zsh syntax-hightlighting - git: - repo: https://github.com/zsh-users/zsh-syntax-highlighting.git - dest: /home/{{ item.username }}/.config/zsh/zsh-syntax-highlighting - with_items: "{{ dotusers }}" - when: prompt == 'zsh' - -- name: dotiles -- clone zsh autosuggestions - git: - repo: https://github.com/zsh-users/zsh-autosuggestions.git - dest: /home/{{ item.username }}/.config/zsh/zsh-autosuggestions - with_items: "{{ dotusers }}" - when: prompt == 'zsh' - -- name: dotiles -- clone zsh auto-ls - git: - repo: https://github.com/desyncr/auto-ls - dest: /home/{{ item.username }}/.config/zsh/auto-ls - with_items: "{{ dotusers }}" - when: prompt == 'zsh' - -- name: dotiles -- clone zsh pure prompt - git: - repo: https://github.com/sindresorhus/pure.git - dest: /home/{{ item.username }}/.config/zsh/pure - with_items: "{{ dotusers }}" - when: prompt == 'zsh' diff --git a/vars/BV_boutique.yml b/vars/BV_boutique.yml deleted file mode 100644 index 16a23f3..0000000 --- a/vars/BV_boutique.yml +++ /dev/null @@ -1,8 +0,0 @@ ---- -public_key: - - user: "{{ admin }}" - key: id_ed25519_choux2bv_admin.pub - - user: "{{ admin }}" - key: id_ed25519_combava2bv_admin.pub - - user: "{{ backup }}" - key: id_rsa_nas2bv_backup.pub diff --git a/vars/Choux.yml b/vars/Choux.yml deleted file mode 100644 index f397c2b..0000000 --- a/vars/Choux.yml +++ /dev/null @@ -1,30 +0,0 @@ ---- -users: ["{{ me }}", "{{ admin }}"] -dotusers: ["{{ me }}", "{{ admin }}"] - -public_key: - - user: "{{ me }}" - key: id_ed25519_home.pub - -prompt: zsh -editor: nvim - -backup_disk_uuid: 3a22e3a8-a454-431e-929f-8818c931914a -backup_mount_point: /media/backup -borg_backup_repo: "{{ backup_mount_point }}/Choux" -borg_script_path: /root/.borg -borg_script_filename: backup.sh - -# NFS export shares -label_mounts: [] -access_mounts: [] -nfs_shares: - - { src: '/media/local_documents', name: '/export/documents', options: 'rw,no_subtree_check,nohide' } - -# NFS import shares -autofs: - - { host: nas } - -music_dir: /media/documents/musique/ - -is_pacman_cache_server: True diff --git a/vars/Combava.yml b/vars/Combava.yml deleted file mode 100644 index 6eefe3a..0000000 --- a/vars/Combava.yml +++ /dev/null @@ -1,14 +0,0 @@ ---- -users: ["{{ me }}", "{{ admin }}"] -dotusers: ["{{ me }}", "{{ admin }}"] - -public_key: - - user: "{{ me }}" - key: id_ed25519_home.pub - -prompt: zsh -editor: nvim - -autofs: - - { host: nas } - - { host: choux } diff --git a/vars/Panais.yml b/vars/Panais.yml deleted file mode 100644 index e85b528..0000000 --- a/vars/Panais.yml +++ /dev/null @@ -1,12 +0,0 @@ ---- -public_key: - - user: "{{ admin }}" - key: id_ed25519_choux2panais_admin.pub - - user: "{{ admin }}" - key: id_ed25519_combava2panais_admin.pub - - user: "{{ content }}" - key: id_ed25519_choux2panais_content.pub - - user: "{{ content }}" - key: id_ed25519_combava2panais_content.pub - - user: "{{ backup }}" - key: id_rsa_nas2panais_backup.pub diff --git a/vars/abertrand.yml b/vars/abertrand.yml deleted file mode 100644 index f67386f..0000000 --- a/vars/abertrand.yml +++ /dev/null @@ -1,12 +0,0 @@ ---- -public_key: - # - user: "{{ admin }}" - # key: id_ed25519_choux2panais_admin.pub - - user: "{{ admin }}" - key: id_ed25519_combava2abertrand_admin.pub - # - user: "{{ content }}" - # key: id_ed25519_choux2panais_content.pub - # - user: "{{ content }}" - # key: id_ed25519_combava2panais_content.pub - # - user: "{{ backup }}" - # key: id_rsa_nas2panais_backup.pub diff --git a/vars/common.yml b/vars/common.yml deleted file mode 100644 index 5922420..0000000 --- a/vars/common.yml +++ /dev/null @@ -1,22 +0,0 @@ ---- - -# me: -# - username: 'lafrite' -# password: '$6$OnPrZgotbSWZlh0T$VSyF8lUhD/N881d1GsggE7jDFt0uAzls2r.pqgDV6XQKbTqZWfv0X4QWd/3wivUDyzaSjP4LQWVfne7KYR6Vv1' -# uid: '1000' -# group: users -# -# deploy_users: -# - username: 'waha' -# password: '$6$tQLlZ3lI/NDcT3.C$VCBzrpNxDgOK7b2que2/BnAYWl.zKVugZrQEPxtsq3iWcskEzQ1NvytZRXkB4GCDa/xEohxiodyCaZyFnhxby1' -# uid: '999' -# group: wheel -# groups: sudo, adm - -prompt: fish -editor: vim - -minimal: false -server: false -create_user: false - diff --git a/vars/home.yml b/vars/home.yml deleted file mode 100644 index 0715507..0000000 --- a/vars/home.yml +++ /dev/null @@ -1,9 +0,0 @@ ---- -nas_name: "Songe" -nas_nfs: - - src: '/export/documents' - name: 'NAS_documents' - options: '-rw,default,nls=utf8,uid=100,users' - - src: '/export/backup' - name: 'NAS_backup' - options: '-rw,default,nls=utf8,uid=100,users' diff --git a/vars/rpi3.yml b/vars/rpi3.yml deleted file mode 100644 index 20df057..0000000 --- a/vars/rpi3.yml +++ /dev/null @@ -1,4 +0,0 @@ ---- -deploy_public_key: id_rsa_rpi3.pub - -prompt: fish diff --git a/vars/server.yml b/vars/server.yml deleted file mode 100644 index e6f5798..0000000 --- a/vars/server.yml +++ /dev/null @@ -1,8 +0,0 @@ ---- -users: ["{{ admin }}", "{{ content }}", "{{ backup }}"] -dotusers: ["{{ admin }}"] - -minimal: true -server: true -create_user: true - diff --git a/vars/users.yml b/vars/users.yml deleted file mode 100644 index e5f6f53..0000000 --- a/vars/users.yml +++ /dev/null @@ -1,27 +0,0 @@ -$ANSIBLE_VAULT;1.1;AES256 -63353636396464623566663162653838323738333131643561373362303034323761336433633635 -6438623066323138636337356362316534353265633334370a623262376662663934366637313832 -39633038376133303233633964343666376633373762323661613534303266663233643763343266 -3835623538313061380a346361323934666132333537363733346565633761373830346633393933 -32333365376137333539616637613165633235323264366662653662373633613834353435393730 -31326334343661353839303162363532383064303464393838393765303833333266343633353636 -34376666323536363531653766653962383963306437333436306338653438656237323362396136 -35386239323433353838663836333639363734343430613730383935393837343930386435353239 -61613032386533383430663465623736633233323364376136386566376364646439363738643838 -33623666383365396634666638663266636538323930616563313961383966323136303930323239 -32336134303137653665663962396132363838616436343636373762346234396338323936663564 -62616366323436363662343339336536643833646538636562366164643965636366616131643239 -31623333623039376131636433313734633263386432666261633737613565323561616538343665 -64333666623961393531643031313039363363306562316138613063663532346363306364306436 -35343431383730396461346130663763656632393566336236663136323735303136663738376338 -36623961616432333834333933613230636636666564333431393764326136356566336466666166 -61626637636533613261353035626265386264656331656338363233666464326239356535303633 -65663730663332316362363437663962373935313563653734356538313939383934393331303061 -34336630396561646632396264323933383764393135613535613631623238356661646439313333 -36633139646235383835653135626137313263343635346235646363623235626663313266663163 -36656165356662386264336463386632323864386237663462376639666438616137646565373662 -36353836646339613833383465366138643838616431313136656434303239656331666537666463 -38646564376430353864636466333162353035396431636534626161626465623330626563383563 -36316638396363383537343463666437613165653337386563616438376133376238656365356130 -38323466343236363261613562396664323330663336623230323066343837356132363936306130 -3236386662636433386634393363363763363533343739383064