From c6cc2d3f9d4f997a3bea1b92bd1c723a757659ca Mon Sep 17 00:00:00 2001 From: Diogo Cordeiro Date: Tue, 2 Oct 2018 21:41:43 +0100 Subject: [PATCH] first commit --- .gitignore | 17 + LICENSE.md | 19 + README.md | 314 +++ autostart/.config/autostart/Nextcloud.desktop | 10 + .../.config/autostart/at-spi-dbus-bus.desktop | 9 + .../autostart/blueberry-obex-agent.desktop | 12 + .../.config/autostart/blueberry-tray.desktop | 13 + .../autostart/geoclue-demo-agent.desktop | 10 + .../autostart/gnome-keyring-pkcs11.desktop | 159 ++ .../autostart/gnome-keyring-secrets.desktop | 159 ++ .../autostart/gnome-keyring-ssh.desktop | 158 ++ .../autostart/gsettings-data-convert.desktop | 122 ++ .../.config/autostart/ibus-autostart.desktop | 16 + .../.config/autostart/light-locker.desktop | 61 + autostart/.config/autostart/nm-applet.desktop | 170 ++ ...e.SettingsDaemon.DiskUtilityNotify.desktop | 7 + ...ster.code.package-update-indicator.desktop | 10 + .../autostart/parcellite-startup.desktop | 44 + ...olkit-gnome-authentication-agent-1.desktop | 89 + .../.config/autostart/print-applet.desktop | 119 ++ .../autostart/user-dirs-update-gtk.desktop | 154 ++ .../autostart/xfce4-power-manager.desktop | 126 ++ .../.config/autostart/xfsettingsd.desktop | 65 + composer/.config/composer/composer.json | 15 + etc/apt/apt.conf.d/50unattended-upgrades | 146 ++ etc/apt/preferences.d/oldstable.pref | 6 + etc/apt/preferences.d/pentest.pref | 6 + etc/apt/preferences.d/stable.pref | 8 + etc/apt/preferences.d/testing.pref | 7 + etc/apt/preferences.d/unstable.pref | 6 + etc/apt/sources.list | 0 etc/apt/sources.list.d/insomnia.list | 1 + etc/apt/sources.list.d/nextcloud-client.list | 2 + etc/apt/sources.list.d/oldstable.list | 21 + etc/apt/sources.list.d/pentest.list | 8 + etc/apt/sources.list.d/stable.list | 12 + etc/apt/sources.list.d/testing.list | 8 + etc/apt/sources.list.d/unstable.list | 2 + etc/apt/sources.list.d/virtualbox.list | 1 + geany/.config/geany/colorschemes/darcula.conf | 149 ++ geany/.config/geany/geany.conf | 217 ++ ghc/.config/ghc/ghci.conf | 2 + git/.git_template/hooks/ctags | 8 + git/.git_template/hooks/go-pre-commit | 1 + git/.git_template/hooks/post-checkout | 2 + git/.git_template/hooks/post-merge | 2 + git/.gitconfig | 45 + git/.gitignore_global | 202 ++ git/.stow-local-ignore | 27 + i3/.config/i3/config | 470 +++++ i3/.config/i3/i3blocks.conf | 173 ++ i3/.config/i3/i3status.conf | 86 + i3/.config/i3/scripts/autostart.sh | 4 + i3/.config/i3/scripts/cmus-play.sh | 2 + i3/.config/i3/scripts/exit_menu.sh | 41 + i3/.config/i3/scripts/lock.sh | 11 + i3/.config/i3/scripts/morc_menu.sh | 1010 ++++++++++ i3/.config/i3/scripts/remaps.sh | 8 + i3/.config/i3/scripts/touchpad.sh | 11 + i3/.config/i3/scripts/urxvtc.sh | 6 + i3/.config/i3/scripts/volume_level.sh | 17 + kitty/.config/kitty/kitty.conf | 248 +++ mariadbcli/.my.cnf | 9 + mariadbcli/.myclirc | 139 ++ .../.config/nvim/UltiSnips/go_perso.snippets | 126 ++ .../nvim/UltiSnips/javascript_perso.snippets | 11 + .../.config/nvim/UltiSnips/php_perso.snippets | 154 ++ neovim/.config/nvim/basic.vim | 822 ++++++++ neovim/.config/nvim/basic_header.vim | 31 + neovim/.config/nvim/experiments/20-coc.vim | 58 + .../nvim/experiments/coc-settings.json | 22 + .../experiments/replace_deoplete_with_co.diff | 257 +++ neovim/.config/nvim/experiments/vimrc | 25 + neovim/.config/nvim/init.vim | 44 + neovim/.config/nvim/installer/README.md | 197 ++ neovim/.config/nvim/installer/install.sh | 50 + .../nvim/installer/reference/commands_git.txt | 24 + .../nvim/installer/reference/commands_vim.txt | 42 + neovim/.config/nvim/make_basic.sh | 3 + neovim/.config/nvim/rc.d/00-plugins.vim | 236 +++ neovim/.config/nvim/rc.d/01-settings.vim | 222 ++ neovim/.config/nvim/rc.d/02-theme.vim | 85 + .../.config/nvim/rc.d/10-keymap-general.vim | 326 +++ neovim/.config/nvim/rc.d/11-keymap-rtl.vim | 17 + neovim/.config/nvim/rc.d/20-ale.vim | 68 + neovim/.config/nvim/rc.d/20-ctrlp.vim | 48 + neovim/.config/nvim/rc.d/20-deoplete.vim | 47 + neovim/.config/nvim/rc.d/20-goyo.vim | 10 + neovim/.config/nvim/rc.d/20-grep.vim | 40 + neovim/.config/nvim/rc.d/20-gutentags.vim | 11 + neovim/.config/nvim/rc.d/20-lightline.vim | 16 + neovim/.config/nvim/rc.d/20-neomake.vim | 216 ++ neovim/.config/nvim/rc.d/20-nerdtree.vim | 11 + neovim/.config/nvim/rc.d/20-peartree.vim | 9 + .../.config/nvim/rc.d/20-php-refactoring.vim | 10 + neovim/.config/nvim/rc.d/20-python-mode.vim | 13 + neovim/.config/nvim/rc.d/20-supertab.vim | 7 + neovim/.config/nvim/rc.d/20-tagbar.vim | 38 + neovim/.config/nvim/rc.d/20-ultisnips.vim | 6 + neovim/.config/nvim/rc.d/20-vdebug.vim | 29 + neovim/.config/nvim/rc.d/20-vim-go.vim | 20 + neovim/.config/nvim/rc.d/31-file-type.vim | 141 ++ neovim/.config/nvim/rc.d/32-gpg.vim | 36 + neovim/.config/nvim/rc.d/33-folding.vim | 14 + neovim/.config/nvim/spell/en.utf-8.add | 37 + neovim/.config/nvim/spell/en.utf-8.add.spl | Bin 0 -> 557 bytes pgsqlcli/.config/pgsql/config | 170 ++ shell/.bash_aliases | 47 + shell/.bash_logout | 7 + shell/.bash_profile | 4 + shell/.bashrc | 157 ++ shell/.basic.zshrc | 403 ++++ shell/.dir_colors | 189 ++ shell/.notifyosd.zsh | 56 + shell/.profile | 53 + shell/.zimrc | 10 + shell/.zlogin | 5 + shell/.zprofile | 19 + shell/.zsh_aliases | 37 + shell/.zshrc | 17 + shell/README.md | 197 ++ shell/scripts.zsh | 394 ++++ tags-settings/.ctags | 22 + theme/.config/gtk-2.0/gtkfilechooser.ini | 11 + theme/.config/gtk-3.0/settings.ini | 17 + .../xfce4/desktop/icons.screen0-1904x1039.rc | 15 + theme/.config/xfce4/helpers.rc | 2 + theme/.config/xfce4/panel/whiskermenu-1.rc | 81 + theme/.config/xfce4/terminal/accels.scm | 58 + theme/.config/xfce4/xfce4-screenshooter | 8 + theme/.fonts.conf | 73 + theme/.gtkrc-2.0 | 15 + .../bin/__pycache__/termpdf.cpython-37.pyc | Bin 0 -> 42835 bytes tools/.local/bin/backup_utility | 3 + tools/.local/bin/check_images | 8 + tools/.local/bin/clean_downloads | 18 + tools/.local/bin/itopdf | 33 + tools/.local/bin/lockscreen | 55 + tools/.local/bin/m3u8-download | 58 + tools/.local/bin/media_converter | 144 ++ tools/.local/bin/minimize_pdf | 37 + tools/.local/bin/o_wallpapers | 188 ++ tools/.local/bin/rofi-power | 43 + tools/.local/bin/termpdf.py | 1778 +++++++++++++++++ xorg-server/.Xdefaults | 78 + xorg-server/.Xmodmap | 18 + xorg-server/.Xresources | 19 + xorg-server/.user-dirs.dirs | 8 + xorg-server/.xinitrc | 4 + xorg-server/.xinputrc | 3 + 150 files changed, 13143 insertions(+) create mode 100644 .gitignore create mode 100644 LICENSE.md create mode 100644 README.md create mode 100644 autostart/.config/autostart/Nextcloud.desktop create mode 100644 autostart/.config/autostart/at-spi-dbus-bus.desktop create mode 100644 autostart/.config/autostart/blueberry-obex-agent.desktop create mode 100644 autostart/.config/autostart/blueberry-tray.desktop create mode 100644 autostart/.config/autostart/geoclue-demo-agent.desktop create mode 100644 autostart/.config/autostart/gnome-keyring-pkcs11.desktop create mode 100644 autostart/.config/autostart/gnome-keyring-secrets.desktop create mode 100644 autostart/.config/autostart/gnome-keyring-ssh.desktop create mode 100644 autostart/.config/autostart/gsettings-data-convert.desktop create mode 100644 autostart/.config/autostart/ibus-autostart.desktop create mode 100644 autostart/.config/autostart/light-locker.desktop create mode 100644 autostart/.config/autostart/nm-applet.desktop create mode 100644 autostart/.config/autostart/org.gnome.SettingsDaemon.DiskUtilityNotify.desktop create mode 100644 autostart/.config/autostart/org.guido-berhoerster.code.package-update-indicator.desktop create mode 100644 autostart/.config/autostart/parcellite-startup.desktop create mode 100644 autostart/.config/autostart/polkit-gnome-authentication-agent-1.desktop create mode 100644 autostart/.config/autostart/print-applet.desktop create mode 100644 autostart/.config/autostart/user-dirs-update-gtk.desktop create mode 100644 autostart/.config/autostart/xfce4-power-manager.desktop create mode 100644 autostart/.config/autostart/xfsettingsd.desktop create mode 100644 composer/.config/composer/composer.json create mode 100644 etc/apt/apt.conf.d/50unattended-upgrades create mode 100644 etc/apt/preferences.d/oldstable.pref create mode 100644 etc/apt/preferences.d/pentest.pref create mode 100644 etc/apt/preferences.d/stable.pref create mode 100644 etc/apt/preferences.d/testing.pref create mode 100644 etc/apt/preferences.d/unstable.pref create mode 100644 etc/apt/sources.list create mode 100644 etc/apt/sources.list.d/insomnia.list create mode 100644 etc/apt/sources.list.d/nextcloud-client.list create mode 100644 etc/apt/sources.list.d/oldstable.list create mode 100644 etc/apt/sources.list.d/pentest.list create mode 100644 etc/apt/sources.list.d/stable.list create mode 100644 etc/apt/sources.list.d/testing.list create mode 100644 etc/apt/sources.list.d/unstable.list create mode 100644 etc/apt/sources.list.d/virtualbox.list create mode 100644 geany/.config/geany/colorschemes/darcula.conf create mode 100644 geany/.config/geany/geany.conf create mode 100644 ghc/.config/ghc/ghci.conf create mode 100755 git/.git_template/hooks/ctags create mode 100755 git/.git_template/hooks/go-pre-commit create mode 100755 git/.git_template/hooks/post-checkout create mode 100755 git/.git_template/hooks/post-merge create mode 100644 git/.gitconfig create mode 100644 git/.gitignore_global create mode 100644 git/.stow-local-ignore create mode 100644 i3/.config/i3/config create mode 100644 i3/.config/i3/i3blocks.conf create mode 100644 i3/.config/i3/i3status.conf create mode 100755 i3/.config/i3/scripts/autostart.sh create mode 100755 i3/.config/i3/scripts/cmus-play.sh create mode 100755 i3/.config/i3/scripts/exit_menu.sh create mode 100755 i3/.config/i3/scripts/lock.sh create mode 100755 i3/.config/i3/scripts/morc_menu.sh create mode 100755 i3/.config/i3/scripts/remaps.sh create mode 100755 i3/.config/i3/scripts/touchpad.sh create mode 100755 i3/.config/i3/scripts/urxvtc.sh create mode 100755 i3/.config/i3/scripts/volume_level.sh create mode 100644 kitty/.config/kitty/kitty.conf create mode 100644 mariadbcli/.my.cnf create mode 100644 mariadbcli/.myclirc create mode 100644 neovim/.config/nvim/UltiSnips/go_perso.snippets create mode 100644 neovim/.config/nvim/UltiSnips/javascript_perso.snippets create mode 100644 neovim/.config/nvim/UltiSnips/php_perso.snippets create mode 100644 neovim/.config/nvim/basic.vim create mode 100644 neovim/.config/nvim/basic_header.vim create mode 100644 neovim/.config/nvim/experiments/20-coc.vim create mode 100644 neovim/.config/nvim/experiments/coc-settings.json create mode 100644 neovim/.config/nvim/experiments/replace_deoplete_with_co.diff create mode 100644 neovim/.config/nvim/experiments/vimrc create mode 100644 neovim/.config/nvim/init.vim create mode 100644 neovim/.config/nvim/installer/README.md create mode 100755 neovim/.config/nvim/installer/install.sh create mode 100644 neovim/.config/nvim/installer/reference/commands_git.txt create mode 100644 neovim/.config/nvim/installer/reference/commands_vim.txt create mode 100755 neovim/.config/nvim/make_basic.sh create mode 100644 neovim/.config/nvim/rc.d/00-plugins.vim create mode 100644 neovim/.config/nvim/rc.d/01-settings.vim create mode 100644 neovim/.config/nvim/rc.d/02-theme.vim create mode 100644 neovim/.config/nvim/rc.d/10-keymap-general.vim create mode 100644 neovim/.config/nvim/rc.d/11-keymap-rtl.vim create mode 100644 neovim/.config/nvim/rc.d/20-ale.vim create mode 100644 neovim/.config/nvim/rc.d/20-ctrlp.vim create mode 100644 neovim/.config/nvim/rc.d/20-deoplete.vim create mode 100644 neovim/.config/nvim/rc.d/20-goyo.vim create mode 100644 neovim/.config/nvim/rc.d/20-grep.vim create mode 100644 neovim/.config/nvim/rc.d/20-gutentags.vim create mode 100644 neovim/.config/nvim/rc.d/20-lightline.vim create mode 100644 neovim/.config/nvim/rc.d/20-neomake.vim create mode 100644 neovim/.config/nvim/rc.d/20-nerdtree.vim create mode 100644 neovim/.config/nvim/rc.d/20-peartree.vim create mode 100644 neovim/.config/nvim/rc.d/20-php-refactoring.vim create mode 100644 neovim/.config/nvim/rc.d/20-python-mode.vim create mode 100644 neovim/.config/nvim/rc.d/20-supertab.vim create mode 100644 neovim/.config/nvim/rc.d/20-tagbar.vim create mode 100644 neovim/.config/nvim/rc.d/20-ultisnips.vim create mode 100644 neovim/.config/nvim/rc.d/20-vdebug.vim create mode 100644 neovim/.config/nvim/rc.d/20-vim-go.vim create mode 100644 neovim/.config/nvim/rc.d/31-file-type.vim create mode 100644 neovim/.config/nvim/rc.d/32-gpg.vim create mode 100644 neovim/.config/nvim/rc.d/33-folding.vim create mode 100644 neovim/.config/nvim/spell/en.utf-8.add create mode 100644 neovim/.config/nvim/spell/en.utf-8.add.spl create mode 100644 pgsqlcli/.config/pgsql/config create mode 100644 shell/.bash_aliases create mode 100644 shell/.bash_logout create mode 100644 shell/.bash_profile create mode 100644 shell/.bashrc create mode 100644 shell/.basic.zshrc create mode 100644 shell/.dir_colors create mode 100644 shell/.notifyosd.zsh create mode 100644 shell/.profile create mode 100644 shell/.zimrc create mode 100644 shell/.zlogin create mode 100644 shell/.zprofile create mode 100644 shell/.zsh_aliases create mode 100644 shell/.zshrc create mode 100644 shell/README.md create mode 100644 shell/scripts.zsh create mode 100644 tags-settings/.ctags create mode 100644 theme/.config/gtk-2.0/gtkfilechooser.ini create mode 100644 theme/.config/gtk-3.0/settings.ini create mode 100644 theme/.config/xfce4/desktop/icons.screen0-1904x1039.rc create mode 100644 theme/.config/xfce4/helpers.rc create mode 100644 theme/.config/xfce4/panel/whiskermenu-1.rc create mode 100644 theme/.config/xfce4/terminal/accels.scm create mode 100644 theme/.config/xfce4/xfce4-screenshooter create mode 100644 theme/.fonts.conf create mode 100644 theme/.gtkrc-2.0 create mode 100644 tools/.local/bin/__pycache__/termpdf.cpython-37.pyc create mode 100644 tools/.local/bin/backup_utility create mode 100644 tools/.local/bin/check_images create mode 100644 tools/.local/bin/clean_downloads create mode 100644 tools/.local/bin/itopdf create mode 100644 tools/.local/bin/lockscreen create mode 100644 tools/.local/bin/m3u8-download create mode 100644 tools/.local/bin/media_converter create mode 100644 tools/.local/bin/minimize_pdf create mode 100644 tools/.local/bin/o_wallpapers create mode 100644 tools/.local/bin/rofi-power create mode 100644 tools/.local/bin/termpdf.py create mode 100644 xorg-server/.Xdefaults create mode 100644 xorg-server/.Xmodmap create mode 100644 xorg-server/.Xresources create mode 100644 xorg-server/.user-dirs.dirs create mode 100644 xorg-server/.xinitrc create mode 100644 xorg-server/.xinputrc diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..9f7e6c2 --- /dev/null +++ b/.gitignore @@ -0,0 +1,17 @@ +geany/ +geany/.config/geany/geany.conf +geany/.config/geany/filedefs/filetypes.README +geany/.config/geany/keybindings.conf +geany/.config/geany/templates/templates.README + +tools/.bin/ +tools/.local/bin/virtualenv + +neovim/.config/nvim/env/ + +composer/.config/composer/vendor/ +composer/.config/composer/.htaccess +composer/.config/composer/composer.lock + +tools/.local/bin/hie* +tools/.local/bin/yapf diff --git a/LICENSE.md b/LICENSE.md new file mode 100644 index 0000000..9cf1062 --- /dev/null +++ b/LICENSE.md @@ -0,0 +1,19 @@ +MIT License + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md new file mode 100644 index 0000000..edcc526 --- /dev/null +++ b/README.md @@ -0,0 +1,314 @@ +Dotfiles +======== + +This is my collection of [configuration files](http://dotfiles.github.io/). + +Usage +----- + +Pull the repository, and then create the symbolic links [using GNU +stow](https://alexpearce.me/2016/02/managing-dotfiles-with-stow/). + +```bash +$ git clone https://github.com/diogogithub/.dotfiles.git ~/.dotfiles +$ cd ~/.dotfiles +$ stow tools templates composer feh geany ghc git i3 mariadbcli pgsqlcli ranger terminfo theme xorg-server zathura # plus whatever else you'd like +``` +Applications +------------ + +**OS**: Debian +**Desktop Environment**: XFCE +**WM**: i3 +**LockScreen**: light-lock +**Launcher**: Rofi +**Browser**: Firefox +**Development Environment**: Neovim +**Document Viewer**: Atril +**File Manager**: PCManFM +**Music**: pragha +**Video**: totem + + +License +------- + +[MIT](http://opensource.org/licenses/MIT). + +## Installing + +### Download + +Download the XFCE CD1 from: https://cdimage.debian.org/debian-cd/current/amd64/iso-cd + +### Repositories Keys + + wget -q https://www.virtualbox.org/download/oracle_vbox_2016.asc -O- | sudo apt-key add - + wget -q https://www.virtualbox.org/download/oracle_vbox.asc -O- | sudo apt-key add - + wget -O- https://jgeboski.github.io/obs.key | sudo apt-key add - + wget -O- http://apt.metasploit.com/metasploit-framework.gpg.key | sudo apt-key add - + sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 60EE47FBAD3DD469 + wget --quiet -O - https://insomnia.rest/keys/debian-public.key.asc | sudo apt-key add - + + +### USB flash installation media + + dd if=debian-9.2.1-amd64-xfce-CD-1.iso of=/dev/sdb bs=4M + +### Software selection + +Select: + +* print server +* standard system utilities +* XFCE + +## Setting the repositories + + apt install aptitude + aptitude install debian-archive-keyring + aptitude install synaptic apt-xapian-index gdebi + +## SUDO + +### Install sudo + aptitude install sudo gksu + +### Add Administrator to sudoers + adduser {username} sudo + +## Hardware + +### Firmware + aptitude install firmware-linux intel-microcode amd64-microcode initramfs-tools firmware-amd-graphics + aptitude install inotify-tools inotify-hookable sassc + dpkg --add-architecture i386 + +### Wifi + + aptitude install firmware-realtek firmware-iwlwifi + +### Battery and Overheating + +* tlp +* tlp-rdw +* thermald +* cpufreqd + +`sudo aptitude install tlp tlp-rdw thermald cpufreqd` + +> For thinkpads only: `sudo aptitude install tp-smapi-dkms acpi-call-dkms` + +### Hardware sensors + +* lm-sensors +* hddtemp +* psensor +* i7z +* cpupower + +`sudo aptitude install lm-sensors hddtemp psensor` + +### Disable bluetooth auto power-on + +Blueman automatically enables Bluetooth adapter when certain events (on boot, laptop lid is opened, ...) occur. This can be disabled with the auto-power-on in org.blueman.plugins.powermanager: + + sudo gsettings set org.blueman.plugins.powermanager auto-power-on false + +### Network + +Proper network manager with VPN support + +* curl +* network-manager +* network-manager-gnome +* network-manager-openvpn +* network-manager-vpnc +* network-manager-vpnc-gnome +* network-manager-pptp +* network-manager-pptp-gnome +* network-manager-openvpn +* network-manager-openvpn-gnome +* pptpd +* ppp +* pptp-linux + +`sudo aptitude install curl network-manager network-manager-gnome network-manager-openvpn network-manager-vpnc network-manager-vpnc-gnome network-manager-pptp network-manager-pptp-gnome network-manager-openvpn network-manager-openvpn-gnome pptpd ppp pptp-linux` + +### Storage + +* gnome-disks +* gparted + +`sudo aptitude install gnome-disks gparted` + +## Shell + +* `sudo aptitude install kitty ripgrep zsh shellcheck` +* `stow kitty shell tmux` + +* `chsh -s $(which zsh)` +* `sudo update-alternatives --config x-terminal-emulator` + +## Appearance + +### Utilities + +* lxappearance +* xsettingsd +* nitrogen + +### Theme + +* numix-gtk-theme +* numix-icon-theme + + +`sudo aptitude install numix-gtk-theme numix-icon-theme` + +### Fonts + +* ttf-mscorefonts-installer +* ttf-dejavu +* fonts-hack-ttf +* fonts-font-awesome +* fonts-open-sans +* fonts-paratype + +`sudo aptitude install ttf-mscorefonts-installer ttf-dejavu fonts-hack-ttf fonts-font-awesome fonts-open-sans fonts-paratype` + +#### Install Microsoft Tahoma, Segoe UI, and other fonts + + mkdir ~/.fonts + wget -qO- http://plasmasturm.org/code/vistafonts-installer/vistafonts-installer | bash + +### Spotlight (unused) + +[Diogo's spotlight script](https://git.gnu.io/snippets/107) + +### i3 + +* [i3](https://blog.diogo.site/posts/i3wm) +* suckless-tools +* i3blocks +* [XBright](https://github.com/snobb/xbright) +* [morc_menu](https://github.com/Boruch-Baum/morc_menu) +* ranger +* light-locker +* dconf-editor +* xdotool + +* `sudo aptitude install i3 j4-dmenu-desktop suckless-tools i3blocks ranger nitrogen light-locker xdotool` + +#### Notifications + +* xfce4-notifyd + +`sudo aptitude install xfce4-notifyd` + +## System + +### Power Manager + +* xfce4-power-manager + +`sudo aptitude install xfce4-power-manager` + +### SECURITY (FIREWALL AND ANTI-VIRUS) + + sudo aptitude install ufw gufw clamav clamtk + sudo ufw default deny + sudo ufw enable + +### Updates notifier + +* pk-update-icon +* apt-config-auto-update + +`sudo aptitude install pk-update-icon apt-config-auto-update` + +### Wine + +`sudo aptitude -t stretch-backports install wine` + +## General Software + +### Multimedia + +* pavucontrol +* libavcodec-extra +* clementine +* gimp +* totem +* handbrake +* kdenlive +* audacity +* krita +* blender +* freecad +* openscad + +`sudo aptitude install pavucontrol libavcodec-extra clementine gimp totem handbrake kdenlive audacity cmus` + +### Utilities + +* tmux +* parcellite +* qalculate +* gparted +* simplescreenrecorder +* kde-spectacle +* gthumb +* feh +* engrampa +* arandr +* redshift-gtk +* seahorse + +`sudo aptitude install tmux parcellite qalculate gparted libreoffice simplescreenrecorder kde-spectacle gthumb engrampa arandr redshift-gtk seahorse` + +### Programming + +* geany with [Darcula colorscheme](https://raw.githubusercontent.com/codebrainz/geany-themes/master/colorschemes/darcula.conf) +* git + +`sudo aptitude install geany git` + +#### Neovim + +* `sudo aptitude purge vim-tiny` +* `sudo aptitude install neovim` +* `stow neovim tags-settings python javascript ruby` +* `~/.config/nvim/installer/install.sh` + +### Internet + +* `sudo aptitude install deluge firefox` + +#### Chatting + +* [hexchat](https://hexchat.readthedocs.io/en/latest/building.html#unix) (with [Monokai](https://hexchat.github.io/themes.html) theme) +* `sudo aptitude install pidgin` + +#### KDE CONNECT + + sudo aptitude install kdeconnect + sudo ufw allow 1714:1764/udp + sudo ufw allow 1714:1764/tcp + sudo ufw reload + +### Math + +* bc +* SageMath +* GNUPlot +* jupyter-notebook + +`sudo aptitude install bc sagemath gnuplot python3-dev python3-pip jupyter-notebook` + +### Office + +* atril +* libreoffice + +`sudo aptitude install atril libreoffice zathura` diff --git a/autostart/.config/autostart/Nextcloud.desktop b/autostart/.config/autostart/Nextcloud.desktop new file mode 100644 index 0000000..991a4a1 --- /dev/null +++ b/autostart/.config/autostart/Nextcloud.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Name=Nextcloud +GenericName=File Synchronizer +Exec=/usr/bin/nextcloud +Terminal=false +Icon=nextcloud +Categories=Network +Type=Application +StartupNotify=false +X-GNOME-Autostart-enabled=true diff --git a/autostart/.config/autostart/at-spi-dbus-bus.desktop b/autostart/.config/autostart/at-spi-dbus-bus.desktop new file mode 100644 index 0000000..c8b7f32 --- /dev/null +++ b/autostart/.config/autostart/at-spi-dbus-bus.desktop @@ -0,0 +1,9 @@ +[Desktop Entry] +Type=Application +Name=AT-SPI D-Bus Bus +Exec=/usr/lib/at-spi2/at-spi-bus-launcher --launch-immediately +OnlyShowIn=GNOME;Unity; +NoDisplay=true +AutostartCondition=GSETTINGS org.gnome.desktop.interface toolkit-accessibility +X-GNOME-AutoRestart=true +X-GNOME-Autostart-Phase=Initialization diff --git a/autostart/.config/autostart/blueberry-obex-agent.desktop b/autostart/.config/autostart/blueberry-obex-agent.desktop new file mode 100644 index 0000000..192d755 --- /dev/null +++ b/autostart/.config/autostart/blueberry-obex-agent.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Name=Bluetooth OBEX Agent +Comment=Allows to receive files via Bluetooth +Keywords=files;bluetooth;obex;receive; +Icon=blueberry +Exec=/usr/lib/blueberry/blueberry-obex-agent.py +Terminal=false +Type=Application +Categories=GTK;GNOME;Settings;X-GNOME-NetworkSettings; +StartupNotify=false +NoDisplay=true +NotShowIn=GNOME;KDE;Unity; diff --git a/autostart/.config/autostart/blueberry-tray.desktop b/autostart/.config/autostart/blueberry-tray.desktop new file mode 100644 index 0000000..31fa968 --- /dev/null +++ b/autostart/.config/autostart/blueberry-tray.desktop @@ -0,0 +1,13 @@ +[Desktop Entry] + +Name=blueberry +Comment=Blueberry tray icon +Exec=blueberry-tray +AutostartCondition=GSettings org.blueberry tray-enabled +X-GNOME-Autostart-Delay=5 +Terminal=false +Type=Application +Categories=GTK;GNOME;Settings;X-GNOME-NetworkSettings; +StartupNotify=false +NoDisplay=true +NotShowIn=GNOME;KDE;Unity; diff --git a/autostart/.config/autostart/geoclue-demo-agent.desktop b/autostart/.config/autostart/geoclue-demo-agent.desktop new file mode 100644 index 0000000..5f819b6 --- /dev/null +++ b/autostart/.config/autostart/geoclue-demo-agent.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Name=Geoclue Demo agent +GenericName=Demo geoclue agent +Keywords=geolocation; +Exec=/usr/lib/geoclue-2.0/demos/agent +Icon=mark-location-symbolic +NotShowIn=GNOME; +NoDisplay=true +Terminal=false +Type=Application diff --git a/autostart/.config/autostart/gnome-keyring-pkcs11.desktop b/autostart/.config/autostart/gnome-keyring-pkcs11.desktop new file mode 100644 index 0000000..471f9a7 --- /dev/null +++ b/autostart/.config/autostart/gnome-keyring-pkcs11.desktop @@ -0,0 +1,159 @@ +[Desktop Entry] +Type=Application +Name[af]=Sertifikaat- en sleutelberging +Name[ar]=مخزن الشهادات والمفاتيح +Name[as]=প্ৰমাণপত্ৰ আৰু কি সংৰক্ষণ +Name[ast]=Certificaos y almacenamientu de claves +Name[be]=Сховішча сертыфікатаў і ключоў +Name[bg]=Съхранение на сертификати и ключове +Name[bn]=সার্টিফিকেট এবং কী স্টোরেজ +Name[bn_IN]=সার্টিফিকেট এবং কি সংগ্রহস্থল +Name[bs]=Skladište sertifikata i ključeva +Name[ca]=Magatzem de certificats i de claus +Name[ca@valencia]=Magatzem de certificats i de claus +Name[cs]=Odemknout certifikáty a umístění klíčů +Name[da]=Certifikat- og nøglelager +Name[de]=Zertifikat-/Schlüsselverwahrung +Name[el]=Αποθήκη πιστοποιητικών και κλειδιών +Name[en_GB]=Certificate and Key Storage +Name[eo]=Memorejo de atestiloj kaj ŝlosiloj +Name[es]=Certificados y almacenamiento de claves +Name[et]=Sertifikaadi- ja võtmehoidla +Name[eu]=Ziurtagirien/gakoen biltegia +Name[fa]=مخزن کلید و گواهی‌نامه +Name[fi]=Varmenne- ja avainsäilö +Name[fr]=Stockage de certificats et de clés +Name[fur]=Archivi certificâts e clâfs +Name[gd]=Teisteanas agus stòras na h-iuchrach +Name[gl]=Almacenamento de chave ou certificado +Name[gu]=પ્રમાણપત્ર અને કી સંગ્રહ +Name[he]=אחסון תעודה ומפתח +Name[hi]=कुंजी भंडार प्रमाणित करें +Name[hr]=Vjerodajnice i spremište ključeva +Name[hu]=Tanúsítvány- és kulcstároló +Name[id]=Penyimpanan Kunci dan Sertifikat +Name[is]=Geymsla skilríkis og lykils +Name[it]=Archivio certificati e chiavi +Name[ja]=証明書および鍵を格納するストレージ +Name[kk]=Сертификаттар және кілттер қоймасы +Name[km]=វិញ្ញាបនបត្រ និងការ​ផ្ទុកសោ +Name[kn]=ಪ್ರಮಾಣಪತ್ರ ಮತ್ತು ಕೀಲಿಯ ಶೇಖರಣೆ +Name[ko]=인증서 및 키 저장소 +Name[lt]=Liudijimų ir raktų saugykla +Name[lv]=Sertifikātu un atslēgu glabātava +Name[mjw]=Certificate pen Key Storage +Name[mk]=Склад на клучеви и сертификати +Name[ml]=സാക്ഷ്യപത്രവും കീ സംഭരണവും +Name[mr]=प्रमाणपत्र व कि स्टोरेज +Name[ms]=Sijil dan Penyimpanan Kekunci +Name[nb]=Lager for sertifikat/nøkkel +Name[nl]=Certificaat- en sleutelopslag +Name[nn]=Serifikat- og nøkkellager +Name[oc]=Emmagazinatge de certificats e de claus +Name[or]=ପ୍ରମାଣପତ୍ର ଏବଂ କି ସଂରକ୍ଷଣ +Name[pa]=ਸਰਟੀਫਿਕੇਟ ਅਤੇ ਕੁੰਜੀ ਸਟੋਰੇਜ਼ +Name[pl]=Przechowalnia certyfikatów i kluczy +Name[pt]=Armazenamento de chaves e certificados +Name[pt_BR]=Certificados e armazenamento de chaves +Name[ro]=Stocare pentru certificate și chei +Name[ru]=Хранилище сертификатов и ключей +Name[sk]=Úložisko certifikátov a kľúčov +Name[sl]=Hranjenje potrdil in ključev +Name[sr]=Складиште сертификата и кључева +Name[sr@latin]=Skladište sertifikata i ključeva +Name[sv]=Certifikat och nyckellagring +Name[ta]=சான்றிதழ்/விசை சேமிப்பகம் +Name[te]=ధృవీకరణపత్రం మరియు కీ నిల్వ +Name[th]=แหล่งใบรับรองและกุญแจ +Name[tr]=Sertifika ve Anahtar Deposu +Name[ug]=گۇۋاھنامە ۋە شىفىرلىق ئاچقۇچ ئامبىرى +Name[uk]=Сертифікат та сховище ключів +Name[vi]=Lưu trữ Chứng nhận và khóa +Name[zh_CN]=证书和密钥存储 +Name[zh_HK]=證書與密碼匙儲存區 +Name[zh_TW]=憑證與金鑰儲存區 +Name=Certificate and Key Storage +Comment[af]=GNOME-sleutelring: PKCS#11-komponent +Comment[ar]=حلقة مفاتيح جنوم: مكون PKCS#11 +Comment[as]=GNOME Keyring: PKCS#11 উপাদান +Comment[ast]=Depósitu de claves de GNOME: Componente PKCS#11 +Comment[be]=Вязкі ключоў GNOME: кампанент PKCS#11 +Comment[bg]=Ключодържател на GNOME: компонент за PKCS#11 +Comment[bn]=GNOME কী রিং: PKCS#11 কম্পোনেন্ট +Comment[bn_IN]=GNOME Keyring: PKCS#11 উপাদান +Comment[bs]=Gnomovi privjesci: PKCS#11 komponenta +Comment[ca]=Anell de claus del GNOME: component PKCS#11 +Comment[ca@valencia]=Anell de claus del GNOME: component PKCS#11 +Comment[cs]=Klíčenka GNOME: komponenta PKCS#11 +Comment[da]=GNOME-nøgleringsdæmon: PKCS#11-komponent +Comment[de]=GNOME-Schlüsselbunddienst: PKCS#11-Komponente +Comment[el]=Κλειδοθήκη GNOME: Συστατικό στοιχείο PKCS#11 +Comment[en_GB]=GNOME Keyring: PKCS#11 Component +Comment[eo]=GNOME Ŝlosilaro: PKCS#11 ero +Comment[es]=Depósito de claves de GNOME: Componente PKCS#11 +Comment[et]=GNOME võtmerõngas: PKCS#11 komponent +Comment[eu]=GNOMEren gako-sorta: PKCS#11 osagaia +Comment[fa]=دسته‌کلید گنوم: عناصر PKCS#11 +Comment[fi]=Gnomen avainnippu: PKCS#11-komponentti +Comment[fr]=Trousseau de clés de GNOME : composant PKCS#11 +Comment[fur]=Puarteclâfs di GNOME: component PKCS#11 +Comment[gd]=Dul-iuchrach GNOME: Co-phàirt PKCS#11 +Comment[gl]=GNOME Keyring: compoñente PKCS#11 +Comment[gu]=GNOME કીરીંગ: PKCS#11 ઘટક +Comment[he]=קבוצת מפתחות של GNOME:רכיב PKCS#11 +Comment[hi]=गनोम कीरिंग: PKCS#11 घटक +Comment[hr]=GNOME skup ključeva: PKCS#11 komponena +Comment[hu]=GNOME kulcstartó – PKCS#11 összetevő +Comment[id]=GNOME Keyring: Komponen PKCS#11 +Comment[it]=Portachiavi di GNOME: componente PKCS#11 +Comment[ja]=GNOME キーリング: PKCS#11 コンポーネント +Comment[kk]=GNOME Keyring: PKCS#11 құрамасы +Comment[km]=GNOME Keyring ៖ សមាសភាគ PKCS#11 +Comment[kn]=GNOME ಕೀಲಿಗೊಂಚಲು: PKCS#11 ಘಟಕ +Comment[ko]=그놈 키 모음: PKCS#11 컴포넌트 +Comment[lt]=GNOME raktinė: PKCS#11 komponentas +Comment[lv]=GNOME atslēgu saišķis — PKCS#11 komponente +Comment[mjw]=GNOME Keyring: PKCS#11 Component +Comment[mk]=Приврзок на GNOME: PKCS#11 компонента +Comment[ml]=ഗ്നോം കീറിങ്: PKCS#11 ഘടകം +Comment[mr]=GNOME किरिंग: PKCS#11 घटक +Comment[ms]=GNOME Keyring: Komponen PKCS#11 +Comment[nb]=GNOME nøkkelring: PKCS#11-komponent +Comment[nl]=Sleutelbos-service: PKCS#11-component +Comment[nn]=GNOME Nøkkelring: PKCS#11-komponent +Comment[oc]=Trossèl de claus GNOME : component PKCS#11 +Comment[or]=GNOME କି ରିଙ୍ଗ: PKCS#11 ଉପାଦାନ +Comment[pa]=ਗਨੋਮ ਕੀਰਿੰਗ: PKCS#11 ਭਾਗ +Comment[pl]=Baza kluczy dla środowiska GNOME: składnik PKCS#11 +Comment[pt]=GNOME Keyring: componente PKCS#11 +Comment[pt_BR]=Chaveiro do GNOME: Componente PKCS#11 +Comment[ro]=Inelul de chei GNOME: Componenta PKCS#11 +Comment[ru]=Связка ключей GNOME: компонент PKCS#11 +Comment[sk]=Modul PKCS#11 zväzku kľúčov GNOME +Comment[sl]=Zbirka ključev GNOME: enota PKCS#11 +Comment[sr]=Гномови привесци: ПКЦС#11 компонента +Comment[sr@latin]=Gnomovi privesci: PKCS#11 komponenta +Comment[sv]=GNOME-nyckelring: PKCS#11-komponent +Comment[ta]=GNOME கீரிங்: PKCS#11 கூறு +Comment[te]=GNOME కీరింగ్: PKCS#11 అంశం +Comment[th]=พวงกุญแจของ GNOME: องค์ประกอบ PKCS#11 +Comment[tr]=GNOME Anahtarlığı: PKCS#11 Bileşeni +Comment[ug]=گىنوم ئاچقۇچ ھالقىسى:PKCS#11 دېتالى +Comment[uk]=Служба в'язки ключів GNOME: компонент PKCS#11 +Comment[vi]=Chùm chìa khóa GNOME: thành phần PKCS#11 +Comment[zh_CN]=GNOME 密钥环:PKCS#11 组件 +Comment[zh_HK]=GNOME 密碼匙圈:PKCS#11 元件 +Comment[zh_TW]=GNOME 鑰匙圈:PKCS#11 元件 +Comment=GNOME Keyring: PKCS#11 Component +Exec=/usr/bin/gnome-keyring-daemon --start --components=pkcs11 +OnlyShowIn=GNOME;Unity;MATE;XFCE; +NoDisplay=true +X-GNOME-Autostart-Phase=PreDisplayServer +X-GNOME-AutoRestart=false +X-GNOME-Autostart-Notify=true +X-GNOME-Bugzilla-Bugzilla=GNOME +X-GNOME-Bugzilla-Product=gnome-keyring +X-GNOME-Bugzilla-Component=general +X-GNOME-Bugzilla-Version=3.34.0 +X-Desktop-File-Install-Version=0.23 + diff --git a/autostart/.config/autostart/gnome-keyring-secrets.desktop b/autostart/.config/autostart/gnome-keyring-secrets.desktop new file mode 100644 index 0000000..104139d --- /dev/null +++ b/autostart/.config/autostart/gnome-keyring-secrets.desktop @@ -0,0 +1,159 @@ +[Desktop Entry] +Type=Application +Name[af]=Geheimbergingsdiens +Name[ar]=خدمة حفظ سرية +Name[as]=গুপ্ত সংৰক্ষণ সেৱা +Name[ast]=Serviciu d'almacenamientu de secretos +Name[be]=Служба сховішча для сакрэтаў +Name[bg]=Услуга за шифриран носител +Name[bn]=গোপন সংরক্ষণ সম্পর্কিত সার্ভিস +Name[bn_IN]=গোপন সংগ্রহস্থল পরিষেবা +Name[bs]=Servis sa tajno skladištenje +Name[ca]=Servei d'emmagatzematge de secrets +Name[ca@valencia]=Servei d'emmagatzematge de secrets +Name[cs]=Služba utajení dat +Name[da]=Secret Storage Service +Name[de]=Sicherheitsdienst +Name[el]=Υπηρεσία κρυφής αποθήκευσης +Name[en_GB]=Secret Storage Service +Name[eo]=Servo pri sekreta memorejo +Name[es]=Servicio de almacenamiento de secretos +Name[et]=Saladuste hoidmise teenus +Name[eu]=Ezkutuko biltegiaren zerbitzua +Name[fa]=خدمت مخزن محرمانه +Name[fi]=Salaisuuksien säilöntäpalvelu +Name[fr]=Service de stockage secret +Name[fur]=Servizi archivi segret +Name[gd]=Seirbheis stòrais dhìomhair +Name[gl]=Servizo de almacenamento segredo +Name[gu]=ખાનગી સંગ્રહ સેવા +Name[he]=שרות אחסון חשאי +Name[hi]=गुप्त भंडार सेवा +Name[hr]=Tajna usluga spremišta +Name[hu]=Titoktároló szolgáltatás +Name[id]=Layanan Penyimpanan Rahasia +Name[it]=Servizio archivio segreto +Name[ja]=シークレットストレージサービス +Name[kk]=Құпия кілттер қоймасы қызметі +Name[km]=សេវា​ផ្ទុក​សម្ងាត់ +Name[kn]=ಸೀಕ್ರೆಟ್ ಶೇಖರಣಾ ಸೇವೆ +Name[ko]=비밀 저장고 서비스 +Name[lt]=Slaptoji saugojimo tarnyba +Name[lv]=Slepenās glabātavas serviss +Name[mjw]=Secret Storage Service +Name[mk]=Сервис за склад на тајни +Name[ml]=രഹസ്യ സംഭരണ സേവനം +Name[mr]=गोपणी स्टोरेज सर्व्हिस +Name[ms]=Servis Rahsia Penyimpanan +Name[nb]=Lagringstjeneste for hemmeligheter +Name[nl]=Secret Storage Service +Name[nn]=Hemmeleg lagerteneste +Name[oc]=Servici d'emmagazinatge secret +Name[or]=ଗୁପ୍ତ ସଂରକ୍ଷଣ ସର୍ଭିସ +Name[pa]=ਗੁਪਤ ਸਟੋਰੇਜ਼ ਸਰਵਿਸ +Name[pl]=Usługa przechowywania haseł +Name[pt]=Serviço de armazenamento secreto +Name[pt_BR]=Serviço de armazenamento secreto +Name[ro]=Serviciul secret de stocare +Name[ru]=Служба безопасного хранения +Name[sk]=Služba utajeného úložiska +Name[sl]=Shranjevanje skritih storitev +Name[sr]=Сервис са тајно складиштење +Name[sr@latin]=Servis sa tajno skladištenje +Name[sv]=Lagringstjänst för hemligheter +Name[ta]=\sரகசிய சேமிப்பு சேவை +Name[te]=రహస్య నిల్వ సేవ +Name[th]=บริการเก็บข้อมูลลับ +Name[tr]=Gizli Depolama Hizmeti +Name[ug]=مەخپىي ساقلاش مۇلازىمىتى +Name[uk]=Служба шифрування дисків +Name[vi]=Dịch vụ lưu trữ bảo mật +Name[zh_CN]=保密存储服务 +Name[zh_HK]=保密儲存區服務 +Name[zh_TW]=保密儲存區服務 +Name=Secret Storage Service +Comment[af]=GNOME-sleutelring: geheimdiens +Comment[ar]=حلقة مفاتيح جنوم: خدمة سرية +Comment[as]=GNOME Keyring: গুপ্ত সেৱা +Comment[ast]=Depósitu de claves de GNOME: Serviciu de secretos +Comment[be]=Вязкі ключоў GNOME: служба сакрэтаў +Comment[bg]=Ключодържател на GNOME: услуга за тайни +Comment[bn]=GNOME কী রিং: গোপন সার্ভিস +Comment[bn_IN]=GNOME Keyring: গোপন পরিষেবা +Comment[bs]=Gnomovi privjesci: servis za tajnost +Comment[ca]=Anell de claus del GNOME: servei de secrets +Comment[ca@valencia]=Anell de claus del GNOME: servei de secrets +Comment[cs]=Klíčenka GNOME: Služba utajení dat +Comment[da]=GNOME-nøglering: Secret Service +Comment[de]=GNOME-Schlüsselbunddienst: Sicherheitsdienst +Comment[el]=Κλειδοθήκη GNOME: Κρυφή υπηρεσία +Comment[en_GB]=GNOME Keyring: Secret Service +Comment[eo]=GNOME Ŝlosilaro: Sekreta servo +Comment[es]=Depósito de claves de GNOME: Servicio de secretos +Comment[et]=GNOME võtmerõngas: saladuste teenus +Comment[eu]=GNOMEren gako-sorta: ezkutuko zerbitzua +Comment[fa]=دسته‌کلید گنوم: خدمت محرمانه +Comment[fi]=Gnomen avainnippu: Salainen palvelu +Comment[fr]=Trousseau de clés de GNOME : service secret +Comment[fur]=Puarteclâfs di GNOME: servizi segret +Comment[gd]=Dul-iuchrach GNOME: Seirbheis dhìomhair +Comment[gl]=GNOME Keyring: servizo segredo +Comment[gu]=GNOME કીરીંગ: ખાનગી સેવા +Comment[he]=קבוצת מפתחות של GNOME: שירות חשאי +Comment[hi]=गनोम कीरिंग: गुप्त सेवा +Comment[hr]=GNOME skup ključeva: Tajna usluga +Comment[hu]=GNOME kulcstartó – titokszolgáltatás +Comment[id]=GNOME Keyring: Layanan Rahasia +Comment[it]=Portachiavi di GNOME: servizio segreto +Comment[ja]=GNOME キーリング: シークレットサービス +Comment[kk]=GNOME Keyring: Құпия кілттер қызметі +Comment[km]=GNOME Keyring ៖ សេវា​សម្ងាត់ +Comment[kn]=GNOME ಕೀಲಿಗೊಂಚಲು: ಸೀಕ್ರೆಟ್ ಸೇವೆ +Comment[ko]=그놈 키 모음: 비밀 서비스 +Comment[lt]=GNOME raktinė: slaptoji tarnyba +Comment[lv]=GNOME atslēgu saišķis — slepenais serviss +Comment[mjw]=GNOME Keyring: Secret Service +Comment[mk]=Приврзок на GNOME: таен сервис +Comment[ml]=ഗ്നോം കീറിങ്: രഹസ്യ സേവനം +Comment[mr]=GNOME किरिंग: गोपणीय सर्व्हिस +Comment[ms]=GNOME Keyring: Servis Rahsia +Comment[nb]=GNOME nøkkelring: Hemmelige tjenester +Comment[ne]=जिनोम किरिङ : गुप्त सेवा +Comment[nl]=Sleutelbos-service: Secret Service +Comment[nn]=GNOME Nøkkelring: Hemmeleg teneste +Comment[oc]=Trossèl de claus GNOME : servici secret +Comment[or]=GNOME କି ରିଙ୍ଗ: ଗୁପ୍ତ ସଂରକ୍ଷଣ +Comment[pa]=ਗਨੋਮ ਕੀਰਿੰਗ ਡੈਮਨ: ਗੁਪਤ ਸਰਵਿਸ +Comment[pl]=Baza kluczy dla środowiska GNOME: usługa haseł +Comment[pt]=GNOME Keyring: serviço secreto +Comment[pt_BR]=Chaveiro do GNOME: Serviço secreto +Comment[ro]=Inelul de chei GNOME: Serviciul secret +Comment[ru]=Связка ключей GNOME: служба безопасности +Comment[sk]=Služba utajenia zväzku kľúčov GNOME +Comment[sl]=Zbirka ključev GNOME: skrite storitve +Comment[sr]=Гномови привесци: сервис за тајност +Comment[sr@latin]=Gnomovi privesci: servis za tajnost +Comment[sv]=GNOME-nyckelring: Hemlighetstjänst +Comment[ta]=GNOME கீரிங்: ரகசிய சேவை +Comment[te]=GNOME కీరింగ్: రహస్య సేవ +Comment[th]=พวงกุญแจของ GNOME: บริการเก็บข้อมูลลับ +Comment[tr]=GNOME Anahtarlığı: Gizli Hizmet +Comment[ug]=گىنوم ئاچقۇچ ھالقىسى:مەخپىيەت مۇلازىمىتى +Comment[uk]=Служба в'язки ключів GNOME: служба шифрування +Comment[vi]=Chùm chìa khóa GNOME: dịch vụ bảo mật +Comment[zh_CN]=GNOME 密钥环:保密服务 +Comment[zh_HK]=GNOME 密碼匙圈:保密服務 +Comment[zh_TW]=GNOME 鑰匙圈:保密服務 +Comment=GNOME Keyring: Secret Service +Exec=/usr/bin/gnome-keyring-daemon --start --components=secrets +OnlyShowIn=GNOME;Unity;MATE;XFCE; +NoDisplay=true +X-GNOME-Autostart-Phase=PreDisplayServer +X-GNOME-AutoRestart=false +X-GNOME-Autostart-Notify=true +X-GNOME-Bugzilla-Bugzilla=GNOME +X-GNOME-Bugzilla-Product=gnome-keyring +X-GNOME-Bugzilla-Component=general +X-GNOME-Bugzilla-Version=3.34.0 +X-Desktop-File-Install-Version=0.23 + diff --git a/autostart/.config/autostart/gnome-keyring-ssh.desktop b/autostart/.config/autostart/gnome-keyring-ssh.desktop new file mode 100644 index 0000000..54f825e --- /dev/null +++ b/autostart/.config/autostart/gnome-keyring-ssh.desktop @@ -0,0 +1,158 @@ +[Desktop Entry] +Type=Application +Name[af]=SSH-sleutelagent +Name[ar]=عميل مفاتيح SSH +Name[as]=SSH কি সহায়ক +Name[ast]=Axente de claves SSH +Name[be]=SSH-агент ключоў +Name[bg]=Агентът на SSH за ключове +Name[bn]=SSH কী এজেন্ট +Name[bn_IN]=SSH কি এজেন্ট +Name[bs]=Agent za SSH ključeve +Name[ca]=Agent de claus SSH +Name[ca@valencia]=Agent de claus SSH +Name[cs]=Agent klíčů SSH +Name[da]=SSH-nøgleagent +Name[de]=SSH-Schlüsselagent +Name[el]=Πράκτορας κλειδιού SSH +Name[en_GB]=SSH Key Agent +Name[eo]=SSH-ŝlosila agento +Name[es]=Agente de claves SSH +Name[et]=SSH-võtmete agent +Name[eu]=SSH gako-agentea +Name[fa]=عامل کلید SSH +Name[fi]=SSH-avainten agentti +Name[fr]=Agent de clés SSH +Name[fur]=Agjent clâfs SSH +Name[gd]=Àidseant iuchair SSH +Name[gl]=Axente de chave SSH +Name[gu]=SSH કી ઍજન્ટ +Name[he]=סוכן מפתחות SSH +Name[hi]=AFS कुँजी प्रतिनिधि +Name[hr]=Agent SSH ključa +Name[hu]=SSH-kulcs ügynök +Name[id]=Agen Kunci SSH +Name[it]=Agente chiavi SSH +Name[ja]=SSH 鍵エージェント +Name[kk]=SSH кілттер агенті +Name[km]=ភ្នាក់ងារ​សោ SSH +Name[kn]=SSH ಕೀಲಿ ಮಧ್ಯವರ್ತಿ +Name[ko]=SSH 키 에이전트 +Name[lt]=SSH raktų tarnyba +Name[lv]=SSH atslēgu aģents +Name[mjw]=SSH Key Agent +Name[mk]=Агент за SSH клучеви +Name[ml]=എസ്എസ്എച് കീ ഏജന്റ് +Name[mr]=SSH कि एजंट +Name[ms]=Agen Kekunci SSH +Name[nb]=SSH-nøkkelagent +Name[nl]=SSH-sleutelagent +Name[nn]=Nøkkelagent for SSH +Name[oc]=Agent de claus SSH +Name[or]=SSH କି ସଦସ୍ୟ +Name[pa]=SSH ਕੁੰਜੀ ਏਜੰਟ +Name[pl]=Agent kluczy SSH +Name[pt]=Agente de chaves SSH +Name[pt_BR]=Agente de chaves SSH +Name[ro]=Agent pentru chei SSH +Name[ru]=Агент ключей SSH +Name[sk]=Agent kľúčov SSH +Name[sl]=Agent ključev SSH +Name[sr]=Агент за ССХ кључеве +Name[sr@latin]=Agent za SSH ključeve +Name[sv]=SSH-nyckelagent +Name[ta]=SSH முகவர் +Name[te]=SSH కీ వాహకము +Name[th]=เอเจนต์กุญแจ SSH +Name[tr]=SSH Anahtar Aracı +Name[ug]=SSH ئاچقۇچ ياردەمچىسى +Name[uk]=Агент ключів SSH +Name[vi]=Đại diện khóa SSH +Name[zh_CN]=SSH 密钥代理 +Name[zh_HK]=SSH 密碼匙代理程式 +Name[zh_TW]=SSH 金鑰代理程式 +Name=SSH Key Agent +Comment[af]=GNOME-sleutelring: SSH-agent +Comment[ar]=حلقة مفاتيح جنوم: عميل SSH +Comment[as]=GNOME Keyring: SSH সহায়ক +Comment[ast]=Depósitu de claves de GNOME: axente SSH +Comment[be]=Вязкі ключоў GNOME: SSH-агент +Comment[bg]=Ключодържател на GNOME: агент на SSH +Comment[bn]=GNOME কী রিং: SSH এজেন্ট +Comment[bn_IN]=GNOME Keyring: SSH এজেন্ট +Comment[bs]=Gnomovi privjesci: SSH agent +Comment[ca]=Anell de claus del GNOME: agent SSH +Comment[ca@valencia]=Anell de claus del GNOME: agent SSH +Comment[cs]=Klíčenka GNOME: Agent SSH +Comment[da]=GNOME-nøgleringsdæmon: SSH-agent +Comment[de]=GNOME-Schlüsselbunddienst: SSH-Agent +Comment[el]=Κλειδοθήκη GNOME: Πράκτορας SSH +Comment[en_GB]=GNOME Keyring: SSH Agent +Comment[eo]=GNOME Ŝlosilaro: SSH-agento +Comment[es]=Depósito de claves de GNOME: agente SSH +Comment[et]=GNOME võtmerõngas: SSH-agent +Comment[eu]=GNOMEren gako-sorta: SSH agentea +Comment[fa]=دسته‌کلید گنوم: عامل SSH +Comment[fi]=Gnomen avainnippu: SSH-agentti +Comment[fr]=Trousseau de clés de GNOME : agent SSH +Comment[fur]=Puarteclâfs di GNOME: agjent SSH +Comment[gd]=Dul-iuchrach: Àidseant SSH +Comment[gl]=GNOME Keyring: Axente SSH +Comment[gu]=GNOME કીરીંગ: SSH ઍજન્ટ +Comment[he]=קבוצת מפתחות של GNOME: סוכן SSH +Comment[hi]=गनोम कीरिंग: SSH प्रतिनिधि +Comment[hr]=GNOME skup ključeva: SSH agent +Comment[hu]=GNOME kulcstartó – SSH-ügynök +Comment[id]=Ring Kunci GNOME: Agen SSH +Comment[it]=Portachiavi di GNOME: agente SSH +Comment[ja]=GNOME キーリング: SSH エージェント +Comment[kk]=GNOME Keyring: SSH агенті +Comment[km]=GNOME Keyring ៖ ភ្នាក់ងារ SSH +Comment[kn]=GNOME ಕೀಲಿಗೊಂಚಲು: SSH ಮಧ್ಯವರ್ತಿ +Comment[ko]=그놈 키 모음: SSH 에이전트 +Comment[lt]=GNOME raktinė: SSH tarnyba +Comment[lv]=GNOME atslēgu saišķis — SSH aģents +Comment[mjw]=GNOME Keyring: SSH Agent +Comment[mk]=Приврзок на GNOME: SSH агент +Comment[ml]=ഗ്നോം കീറിങ്: എസ്എസ്എച് ഏജന്റ് +Comment[mr]=GNOME किरिंग: SSH एजंट +Comment[ms]=GNOME Keyring: Agen SSH +Comment[nb]=GNOME nøkkelring: SSH-agent +Comment[ne]=जिनोम किरिङ : SSH एजेन्ट +Comment[nl]=Sleutelbos-service: SSH-agent +Comment[nn]=GNOME Nøkkelring: SSH-agent +Comment[oc]=Trossèl de claus GNOME : agent SSH +Comment[or]=GNOME କି ରିଙ୍ଗ: SSH ସଦସ୍ୟ +Comment[pa]=ਗਨੋਮ ਕੀਰਿੰਗ: SSH ਏਜੰਟ +Comment[pl]=Baza kluczy dla środowiska GNOME: agent SSH +Comment[pt]=GNOME Keyring: agente SSH +Comment[pt_BR]=Chaveiro do GNOME: Agente SSH +Comment[ro]=Inelul de chei GNOME: Agent SSH +Comment[ru]=Связка ключей GNOME: SSH-агент +Comment[sk]=SSH agent zväzku kľúčov GNOME +Comment[sl]=Zbirka ključev GNOME: agent SSH +Comment[sr]=Гномови привесци: ССХ агент +Comment[sr@latin]=Gnomovi privesci: SSH agent +Comment[sv]=GNOME-nyckelring: SSH-agent +Comment[ta]=GNOME கீரிங்: SSH முகவர் +Comment[te]=GNOME కీరింగ్: SSH వాహకం +Comment[th]=พวงกุญแจของ GNOME: เอเจนต์ SSH +Comment[tr]=GNOME Anahtarlığı: SSH Aracı +Comment[ug]=گىنوم ئاچقۇچ ھالقىسى:SSH ياردەمچىسى +Comment[uk]=Служба в'язки ключів GNOME: агент SSH +Comment[vi]=Chùm chìa khóa GNOME: Đại diện SSH +Comment[zh_CN]=GNOME 密钥环:SSH 代理 +Comment[zh_HK]=GNOME 密碼匙圈:SSH 代理程式 +Comment[zh_TW]=GNOME 鑰匙圈:SSH 代理程式 +Comment=GNOME Keyring: SSH Agent +Exec=/usr/bin/gnome-keyring-daemon --start --components=ssh +OnlyShowIn=GNOME;Unity;MATE;XFCE; +X-GNOME-Autostart-Phase=PreDisplayServer +X-GNOME-AutoRestart=false +X-GNOME-Autostart-Notify=true +X-GNOME-Bugzilla-Bugzilla=GNOME +X-GNOME-Bugzilla-Product=gnome-keyring +X-GNOME-Bugzilla-Component=general +X-GNOME-Bugzilla-Version=3.34.0 +X-Desktop-File-Install-Version=0.23 + diff --git a/autostart/.config/autostart/gsettings-data-convert.desktop b/autostart/.config/autostart/gsettings-data-convert.desktop new file mode 100644 index 0000000..5d9bce7 --- /dev/null +++ b/autostart/.config/autostart/gsettings-data-convert.desktop @@ -0,0 +1,122 @@ +[Desktop Entry] +Version=1.0 +Name=GSettings Data Conversion +Name[as]=GSettings তথ্যৰ ৰূপান্তৰ +Name[ast]=Conversión de datos de GSettings +Name[be]=Пераўтварэнне даных у GSettings +Name[bg]=Преобразуване на данните за GSettings +Name[bn]=GSettings ডাটা রূপান্তর +Name[bn_IN]=GSettings তথ্যের রূপান্তর +Name[ca]=Conversió de dades a GSettings +Name[ca@valencia]=Conversió de dades a GSettings +Name[cs]=Převod dat GSettings +Name[da]=Datakonvertering til GSettings +Name[de]=GSettings-Datenumwandlung +Name[el]=Μετατροπή δεδομένων GSettings +Name[en_GB]=GSettings Data Conversion +Name[eo]=GSettings-datumkonverto +Name[es]=Conversión de datos de GSettings +Name[eu]=GSettings datuen bihurketa +Name[fi]=GSettings-tietomuunnos +Name[fr]=Conversion des données GSettings +Name[gl]=Conversión de datos GSettings +Name[gu]=GSettings માહિતી પરિવર્તન +Name[he]=GSettings Data Conversion +Name[hi]=GSettings डेटा रूपांतरण +Name[hu]=GSettings adatkonverzió +Name[id]=Konversi Data GSetting +Name[it]=Conversione dati GSettings +Name[ja]=GSettings データ変換 +Name[km]=ការ​បម្លែង​ទិន្នន័យ​ GSettings +Name[ko]=GSettings 데이터 변환 +Name[lt]=GSettings duomenu konvertavimas +Name[lv]=GSettings datu pārveidošana +Name[ml]=GSettings ഡാറ്റ രൂപഭേദം +Name[mr]=GSettings डाटा रूपांतर +Name[nb]=GSettings datakonvertering +Name[nl]=GSettings-dataconversie +Name[or]=GSettings ତଥ୍ୟ ରୂପାନ୍ତର +Name[pa]=GSettings ਡਾਟਾ ਬਦਲਣਾ +Name[pl]=Konwersja danych do GSettings +Name[pt]=Conversão de Dados GSettings +Name[pt_BR]=Conversão de dados GSettings +Name[ro]=Conversie de date GSettings +Name[ru]=Преобразование данных GSettings +Name[sl]=Podatkovna pretvorba GSettings +Name[sq]=Konvertimi i të dhënave të GSettings +Name[sr]=Претварање података Гподешавања +Name[sr@latin]=Pretvaranje podataka Gpodešavanja +Name[sv]=GSettings-datakonvertering +Name[ta]=GSettings தரவு மாற்றம் +Name[te]=GSettings దత్తాంశ మార్పిడి +Name[th]=แปลงข้อมูล GSettings +Name[tr]=GSettings Veri Dönüştürme +Name[ug]=GSettings سانلىق-مەلۇمات ئايلاندۇرۇش +Name[uk]=Перетворення даних GSettings +Name[vi]=Chuyển đổi dữ liệu GSettings +Name[zh_CN]=GSettings 数据转换 +Name[zh_HK]=GSettings 資料轉換 +Name[zh_TW]=GSettings 資料轉換 +Comment=Migrates user settings from GConf to dconf +Comment[as]=ব্যৱহাৰকাৰীৰ বৈশিষ্ট্যবোৰ GConf-ৰ পৰা dconf-লৈ স্থানান্তৰ কৰে +Comment[ast]=Migra la configuración del usuariu de GConf a dconf +Comment[be]=Перанос карыстальніцкіх настроек з GConf у dconf +Comment[bg]=Мигриране на потребителските данни от GConf към dconf +Comment[bn]=GConf থেকে dconf তে ব্যবহারকারী সেটিং মাইগ্রেট করে +Comment[bn_IN]=ব্যবহারকারীর বৈশিষ্ট্যগুলি GConf থেকে dconf-এ স্থানান্তর করা হয় +Comment[ca]=Migra els paràmetres d'usuari del GConf al dconf +Comment[ca@valencia]=Migra els paràmetres d'usuari del GConf al dconf +Comment[cs]=Přenáší uživatelská nastavení z GConf do dconf +Comment[da]=Overflytter brugerindstillinger fra GConf til dconf +Comment[de]=Migriert Benutzereinstellungen von GConf zu dconf +Comment[el]=Μεταφέρει τις ρυθμίσεις του χρήστη από το GConf στο dconf +Comment[en_GB]=Migrates user settings from GConf to dconf +Comment[eo]=Transmetas uzantoagordojn de GConf al dconf +Comment[es]=Migra la configuración del usuario de GConf a dconf +Comment[eu]=Erabiltzailearen ezarpenak GConf-etik dconf-era migratzen ditu +Comment[fi]=Muuntaa käyttäjäasetukset GConf-muodosta dconf-muotoon +Comment[fr]=Effectue la migration des paramètres utilisateur de GConf vers dconf +Comment[gl]=Migra as configuracións do usuario desde GConf a dconf +Comment[gu]=GConf માંથી dconf માં વપરાશકર્તા સુયોજનોને સ્થળાંતર કરે છે +Comment[he]=Migrates user settings from GConf to dconf +Comment[hi]=GConf से dconf तक उपयोगकर्ता सेटिंग्स माइग्रेट करें +Comment[hu]=Felhasználói beállítások áthelyezése GConfból dconfba +Comment[id]=Memigrasikan pengaturan pengguna dari GConf ke dconf +Comment[it]=Esegue la migrazione delle impostazioni utente da GConf a dconf +Comment[ja]=ユーザーの設定を GConf から dconf に移行します +Comment[km]=ប្ដូរ​ការ​កំណត់​អ្នក​ប្រើ​ពី GConf ទៅជា dconf +Comment[ko]=사용자 설정을 GConf에서 dconf로 변환합니다 +Comment[lt]=Migruoja naudotojo nustatymus iš GConf į dconf +Comment[lv]=Migrē lietotāja iestatījumus no GConf uz dconf +Comment[ml]=GConf ല്‍ നിന്ന് dconf ലേക്ക് ഉപയോക്താവിന്റെ ക്രമീകരണങ്ങള്‍ മാറ്റുക +Comment[mr]=GConf पासून dconf करीता वापरकर्ता सेटिंग्स् स्थानांतरीत करतो +Comment[nb]=Migrerer brukerinnstillinger fra GConf til dconf +Comment[nl]=Gebruikersgegegevens van GConf naar dconf migreren +Comment[or]=ଚାଳକ ବିନ୍ୟାସକୁ GConf ରୁ dconf କୁ ସ୍ଥାନାନ୍ତରିତ କରିଥାଏ +Comment[pa]=ਯੂਜ਼ਰ ਸੈਟਿੰਗ ਨੂੰ GConf ਤੋਂ dconf ਲਈ ਮਾਈਗਰੇਟ ਕਰੋ +Comment[pl]=Migruje ustawienia użytkownika z GConf do dconf +Comment[pt]=Migra as definições do utilizador do GConf para o dconf +Comment[pt_BR]=Migra configurações do usuário do GConf para o dconf +Comment[ro]=Migrează setările utilizatorului din GConf în dconf +Comment[ru]=Переносит настройки пользователя из GConf в dconf +Comment[sl]=Prenos nastavitev uporabnika iz GConf v dconf +Comment[sq]=Mogron rregullimet e përdoruesit nga GConf në dconf +Comment[sr]=Пребаците корисничка подешавања из Гконфа у дконф. +Comment[sr@latin]=Prebacite korisnička podešavanja iz Gkonfa u dkonf. +Comment[sv]=Migrerar användarinställningar från GConf till dconf +Comment[ta]=GConf இலிருந்து dconf பயனர் அமைவுகளுக்கு மாற்றுகிறது +Comment[te]=వాడుకరి అమరికలను GConf నుండి dconf కు పంపును +Comment[th]=ย้ายค่าตั้งต่างๆ ของผู้ใช้จาก GConf ไปเป็น dconf +Comment[tr]=Kullanıcı ayarlarını GConf'dan dconf'a aktarır +Comment[ug]=ئىشلەتكۈچى سەپلىمىسىنى GConf دىن dconf غا كۆچۈرۈش +Comment[uk]=Перемістити налаштування користувача з GConf у dconf +Comment[vi]=Chuyển thiết lập người dùng từ GConf sang dconf +Comment[zh_CN]=由 GConf 迁移用户设置到 dconf +Comment[zh_HK]=將使用者設定值從 GConf 轉移到 dconf +Comment[zh_TW]=將使用者設定值從 GConf 轉移到 dconf +Exec=gsettings-data-convert +Terminal=false +Type=Application +OnlyShowIn=GNOME;Unity; +X-GNOME-Autostart-Phase=Initialization + diff --git a/autostart/.config/autostart/ibus-autostart.desktop b/autostart/.config/autostart/ibus-autostart.desktop new file mode 100644 index 0000000..6acdaa4 --- /dev/null +++ b/autostart/.config/autostart/ibus-autostart.desktop @@ -0,0 +1,16 @@ +[Desktop Entry] +_Name=IBus +_GenericName=IBus Daemon +_Comment=Start IBus daemon +Exec=ibus-autostart +Icon=ibus-setup +Terminal=false +Type=Application +Categories=System;Utility; +StartupNotify=false +NoDisplay=true +X-GNOME-Autostart-Phase=Applications +X-GNOME-AutoRestart=false +X-GNOME-Autostart-Notify=false +X-KDE-autostart-after=panel +X-KDE-StartupNotify=false diff --git a/autostart/.config/autostart/light-locker.desktop b/autostart/.config/autostart/light-locker.desktop new file mode 100644 index 0000000..1ca2081 --- /dev/null +++ b/autostart/.config/autostart/light-locker.desktop @@ -0,0 +1,61 @@ +[Desktop Entry] +Type=Application +Name=Screen Locker +Name[ca]=Bloquejador de pantalla +Name[cs]=Uzamykač obrazovky +Name[da]=Skærmlås +Name[de]=Bildschirmsperre +Name[en_GB]=Screen Locker +Name[es]=Bloqueador de pantalla +Name[fa]=قفل صفحه +Name[fi]=Näytön lukitusohjelma +Name[fr]=Verrouilleur d'écran +Name[gl]=Bloqueado da pantalla +Name[gu]=સ્ક્રીન લૉકર +Name[hi]=परदा अबरोधक +Name[hu]=Képernyőzár +Name[it]=Blocca schermo +Name[ja]=スクリーンのロック +Name[kk]=Экран блоктаушысы +Name[lt]=Ekrano Užrakinimas +Name[nb]=Skjermlås +Name[nl]=Schermvergrendeling +Name[or]=ପରଦା ଅବରୋଧକ +Name[pl]=Blokada ekranu +Name[pt]=Bloqueio de Ecrã +Name[pt_BR]=Bloqueio de Tela +Name[ru]=Блокировщик экрана +Name[tr]=Ekran Kilitleyici +Name[zh_CN]=屏幕锁 +Name[zh_TW]=螢幕鎖定 +Comment=Launch screen locker program +Comment[ca]=Obre el programa de blocatge de la pantalla +Comment[cs]=Spustit Uzamykač obrazovky +Comment[da]=Start program for skærmlås +Comment[de]=Bildschirmsperre starten +Comment[en_GB]=Launch screen locker program +Comment[es]=Abrir el programa de bloqueo de pantalla +Comment[fi]=Käynnistä näytön lukitusohjelma +Comment[fr]=Lancer le verrouilleur d'écran +Comment[gl]=Iniciar o programa de bloqueo da pantalla +Comment[gu]=સ્ક્રીન લૉકર પ્રક્રિયાને શરુ કરો +Comment[hi]=परदा अबरोधक प्रोग्राम आरम्भ करें +Comment[hu]=Képernyőzár program indítása +Comment[it]=Lancia il programma blocca schermo +Comment[ja]=スクリーンロックのプログラムを実行する +Comment[kk]=Экранды блоктау бағдарламасын жөнелту +Comment[lt]=Paleisti ekrano užrakinimo programą +Comment[nb]=Kjør skjermlåsningsprogram +Comment[nl]=Schermvergrendelingsprogramma starten +Comment[or]=ପରଦା ଅବରୋଧକ ଆରମ୍ଭ କରନ୍ତୁ +Comment[pl]=Uruchamia program blokady ekranu +Comment[pt]=Lançar o programa de bloqueio do ecrã +Comment[pt_BR]=Iniciar o programa de bloqueio de tela +Comment[ru]=Запустить программу блокировки экрана +Comment[tr]=Ekran kilitleyici programı başlat +Comment[zh_CN]=启动屏幕锁程序 +Comment[zh_TW]=啟動螢幕鎖定程式 +Icon=preferences-desktop-screensaver +Exec=light-locker +NoDisplay=true +NotShowIn=GNOME;Unity; diff --git a/autostart/.config/autostart/nm-applet.desktop b/autostart/.config/autostart/nm-applet.desktop new file mode 100644 index 0000000..e5b4a82 --- /dev/null +++ b/autostart/.config/autostart/nm-applet.desktop @@ -0,0 +1,170 @@ +[Desktop Entry] +Name[af]=Netwerk +Name[an]=Rete +Name[ar]=شبكة +Name[as]=নেটৱৰ্ক +Name[ast]=Rede +Name[be]=Сетка +Name[bg]=Мрежа +Name[bs]=Mreža +Name[ca]=Xarxa +Name[ca@valencia]=Xarxa +Name[crh]=Şebeke +Name[cs]=Síť +Name[da]=Netværk +Name[de]=Netzwerk +Name[el]=Δίκτυο +Name[en_GB]=Network +Name[eo]=Reto +Name[es]=Red +Name[et]=Võrk +Name[eu]=Sarea +Name[fa]=شبکه +Name[fi]=Verkko +Name[fr]=Réseau +Name[gd]=Lìonra +Name[gl]=Rede +Name[gu]=નેટવર્ક +Name[he]=רשת +Name[hi]=संजाल +Name[hr]=Mreža +Name[hu]=Hálózat +Name[id]=Jaringan +Name[is]=Netkerfi +Name[it]=Rete +Name[ja]=ネットワーク +Name[kk]=Желі +Name[km]=បណ្ដាញ +Name[ko]=네트워크 +Name[ku]=Tor +Name[lt]=Tinklas +Name[lv]=Tīkls +Name[mk]=Мрежа +Name[ml]=ശൃംഖല +Name[mr]=नेटवर्क +Name[ms]=Rangkaian +Name[nb]=Nettverk +Name[nl]=Netwerk +Name[nn]=Nettverk +Name[oc]=Ret +Name[pa]=ਨੈੱਟਵਰਕ +Name[pl]=Sieć +Name[pt]=Rede +Name[pt_BR]=Rede +Name[ro]=Rețea +Name[ru]=Сеть +Name[sk]=Sieť +Name[sl]=Omrežje +Name[sr]=Мрежа +Name[sr@latin]=Mreža +Name[sv]=Nätverk +Name[ta]=பிணையம் +Name[te]=నెట్‌వర్క్ +Name[tg]=Шабака +Name[th]=เครือข่าย +Name[tr]=Ağ +Name[ug]=تور +Name[uk]=Мережа +Name[vi]=Mạng +Name[zh_CN]=网络 +Name[zh_HK]=網絡 +Name[zh_TW]=網路 +Name=Network +Comment[af]=Bestuur u netwerkverbindings +Comment[an]=Chestione as suyas conexions de rete +Comment[ar]=إدارة اتصالات الشبكة +Comment[as]=আপোনাৰ নেটৱৰ্ক সংযোগসমূহ ব্যৱস্থাপনা কৰক +Comment[ast]=Remana les conexones de rede +Comment[be]=Кіраванне сеткавымі злучэннямі +Comment[bg]=Управление на мрежовите връзки +Comment[bs]=Upravljajte svojim mrežnim vezama +Comment[ca]=Gestioneu les connexions de xarxa +Comment[ca@valencia]=Gestioneu les connexions de xarxa +Comment[crh]=Şebeke bağlantılarıñıznı idare etiñiz +Comment[cs]=Spravujte svá síťová připojení +Comment[da]=Håndtér dine netværksforbindelser +Comment[de]=Verwaltung der Netzwerkverbindungen +Comment[el]=Διαχείριση των συνδέσεων δικτύου +Comment[en_GB]=Manage your network connections +Comment[eo]=Kontroli viajn retkonektojn +Comment[es]=Gestione sus conexiones de red +Comment[et]=Võrguühenduste haldamine +Comment[eu]=Kudeatu sareko konexioak +Comment[fa]=اتصال‌های شبکه خود را مدیریت کنید +Comment[fi]=Hallitse verkkoyhteyksiä +Comment[fr]=Gérer vos connexions réseau +Comment[gd]=Stiùirich na ceanglaichean agad ris an eadar-lìon +Comment[gl]=Xestione as súas conexións de rede +Comment[gu]=તમારા નેટવર્ક જોડાણોને સંચાલિત કરો +Comment[he]=ניהול חיבורי הרשת שלך +Comment[hi]=अपना संजाल कनेक्शन नियंत्रित करें +Comment[hr]=Upravljanje mrežnim povezivanjem +Comment[hu]=Hálózati kapcsolatok kezelése +Comment[id]=Mengelola koneksi jaringan Anda +Comment[is]=Sýsla með nettengingar +Comment[it]=Gestisce le connessioni di rete +Comment[ja]=ネットワーク接続を管理 +Comment[kk]=Желілік байланыстарыңызды басқару +Comment[km]=គ្រប់គ្រង​ការ​តភ្ជាប់បណ្ដាញ​របស់​អ្នក +Comment[ko]=네트워크 연결을 관리합니다 +Comment[ku]=Girêdanên torê yên xwe birêve bike +Comment[lt]=Tvarkyti tinklo ryšius +Comment[lv]=Pārvaldiet savus tīkla savienojumus +Comment[mk]=Менаџирајте со Вашите мрежни врски +Comment[ml]=നിങ്ങളുടെ ശൃംഖല ബന്ധങ്ങള്‍ കൈകാര്യം ചെയ്യുക +Comment[mr]=नेटवर्क जोडणी नियंत्रीत करा +Comment[ms]=Urus sambungan-sambungan rangkaian anda +Comment[nb]=Håndter dine nettverksforbindelser +Comment[nl]=Uw netwerkverbindingen beheren +Comment[nn]=Handsam nettverkstilkoplingane +Comment[oc]=Gerissètz vòstras connexions a la ret +Comment[pa]=ਆਪਣੇ ਨੈੱਟਵਰਕ ਕਨੈਕਸ਼ਨਾਂ ਦਾ ਪਰਬੰਧ ਕਰੋ +Comment[pl]=Zarządzanie połączeniami sieciowymi +Comment[pt]=Controle as suas ligações de rede +Comment[pt_BR]=Controle suas conexões de rede +Comment[ro]=Gestionează conexiunile la rețea +Comment[ru]=Управление сетевыми соединениями +Comment[sk]=Spravuje vaše sieťové pripojenia +Comment[sl]=Upravljanje omrežnih povezav +Comment[sr]=Управљајте вашим везама мреже +Comment[sr@latin]=Upravljajte vašim vezama mreže +Comment[sv]=Hantera dina nätverksanslutningar +Comment[ta]=உங்களது பிணையத்தின் இணைப்புகளை மேலாண்மை செய்க +Comment[te]=మీ నెట్వర్కు అనుసంధానములను నిర్వహించు +Comment[th]=จัดการการเชื่อมต่อเครือข่ายของคุณ +Comment[tr]=Ağ bağlantılarınızı yönetin +Comment[ug]=تور باغلىنىشلىرىڭىزنى باشقۇرۇڭ +Comment[uk]=Організуйте ваші мережеві з'єднання +Comment[vi]=Quản lý kết nối mạng +Comment[zh_CN]=管理网络连接 +Comment[zh_HK]=管理你的網絡連線 +Comment[zh_TW]=管理您的網路連線 +Comment=Manage your network connections +Icon[ca]=nm-device-wireless +Icon[cs]=nm-device-wireless +Icon[da]=nm-device-wireless +Icon[es]=nm-device-wireless +Icon[fr]=nm-device-wireless +Icon[hr]=mu-bežični-uređaj +Icon[hu]=nm-device-wireless +Icon[it]=nm-device-wireless +Icon[ja]=nm-device-wireless +Icon[nl]=nm-device-wireless +Icon[pl]=nm-device-wireless +Icon[pt_BR]=nm-device-wireless +Icon[ru]=nm-device-wireless +Icon[tr]=nm-device-wireless +Icon[zh_CN]=nm-device-wireless +Icon=nm-device-wireless +Exec=nm-applet --indicator +Terminal=false +Type=Application +NoDisplay=true +NotShowIn=KDE;GNOME; +X-GNOME-Bugzilla-Bugzilla=GNOME +X-GNOME-Bugzilla-Product=NetworkManager +X-GNOME-Bugzilla-Component=nm-applet +X-GNOME-UsesNotifications=true +# We need to make sure the systray has already started +# otherwise nm-applet will fall back to non systray too quickly +X-GNOME-Autostart-Delay=4 diff --git a/autostart/.config/autostart/org.gnome.SettingsDaemon.DiskUtilityNotify.desktop b/autostart/.config/autostart/org.gnome.SettingsDaemon.DiskUtilityNotify.desktop new file mode 100644 index 0000000..24a2266 --- /dev/null +++ b/autostart/.config/autostart/org.gnome.SettingsDaemon.DiskUtilityNotify.desktop @@ -0,0 +1,7 @@ +[Desktop Entry] +Type=Application +Name=gnome-disk-utility notification plugin for GNOME Settings Daemon +Exec=/usr/lib/gsd-disk-utility-notify +OnlyShowIn=GNOME; +NoDisplay=true +X-GNOME-AutoRestart=true diff --git a/autostart/.config/autostart/org.guido-berhoerster.code.package-update-indicator.desktop b/autostart/.config/autostart/org.guido-berhoerster.code.package-update-indicator.desktop new file mode 100644 index 0000000..205765a --- /dev/null +++ b/autostart/.config/autostart/org.guido-berhoerster.code.package-update-indicator.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Name=Package Update Indicator +GenericName=Package Update Indicator +Comment=Notify about available software updates +Icon=system-software-update +Exec=package-update-indicator +Terminal=false +Type=Application +Categories=Utility;GTK;TrayIcon; +NotShowIn=GNOME;KDE; diff --git a/autostart/.config/autostart/parcellite-startup.desktop b/autostart/.config/autostart/parcellite-startup.desktop new file mode 100644 index 0000000..61e3d95 --- /dev/null +++ b/autostart/.config/autostart/parcellite-startup.desktop @@ -0,0 +1,44 @@ +[Desktop Entry] +GenericName=Clipboard Manager +Categories=GTK;GNOME;Utility;X-SuSE-DesktopUtility;TrayIcon; +Name=Parcellite +Name[ca]=Parcellite +Name[cs]=Parcellite +Name[da]=Parcellite +Name[de]=Parcellite +Name[hu]=Parcellite +Name[it]=Parcellite +Name[ja]=Parcellite +Name[nb]=Parcellite +Name[pl]=Parcellite +Name[pl_PL]=Parcellite +Name[ro]=Parcellite +Name[sv]=Parcellite +Name[zh_CN]=Parcellite +Comment=Clipboard Manager +Comment[ca]=Gestor del porta-retalls +Comment[cs]=Správce schránky +Comment[da]=Udklipsholder +Comment[de]=Verwaltung der Zwischenablage +Comment[es]=Gestor del portapapeles +Comment[fr]=Gestionnaire de presse-papier +Comment[hu]=Vágólapkezelő +Comment[it]=Gestore degli appunti +Comment[ja]=クリップボード・マネージャ +Comment[nb]=Utklippstavleverkty +Comment[pl]=Schowek +Comment[pl_PL]=Menadżer schowka +Comment[pt_BR]=Gerenciador de Área de Transferência +Comment[ro]=Administrator clipboard +Comment[ru]=Менеджер буфера обмена +Comment[sv]=Urklippshanterare +Comment[tr]=Pano Yöneticisi +Comment[zh_CN]=剪切板管理器 +Comment[zh_TW]=剪貼簿管理器 +Icon=parcellite +Exec=parcellite +Terminal=false +Type=Application +NotShownIn=KDE; +X-GNOME-Autostart-enabled=true + diff --git a/autostart/.config/autostart/polkit-gnome-authentication-agent-1.desktop b/autostart/.config/autostart/polkit-gnome-authentication-agent-1.desktop new file mode 100644 index 0000000..0a672fc --- /dev/null +++ b/autostart/.config/autostart/polkit-gnome-authentication-agent-1.desktop @@ -0,0 +1,89 @@ +[Desktop Entry] +Name=PolicyKit Authentication Agent +Name[ar]=مدير الاستيثاق PolicyKit +Name[be]=PolicyKit - аґент аўтэнтыфікацыі +Name[bn_IN]=PolicyKit অনুমোদনের এজেন্ট +Name[ca]=Agent d'autenticació del PolicyKit +Name[cs]=Ověřovací agent PolicyKit +Name[da]=Godkendelsesprogrammet PolicyKit +Name[de]=Legitimationsdienst von PolicyKit +Name[el]=Πράκτορας πιστοποίησης PolicyKit +Name[en_GB]=PolicyKit Authentication Agent +Name[es]=Agente de autenticación de PolicyKit +Name[eu]=PolicyKit autentifikatzeko agentea +Name[fi]=PolicytKit-tunnistautumisohjelma +Name[fr]=Agent d'authentification de PolicyKit +Name[gl]=Axente de autenticación PolicyKit +Name[gu]=PolicyKit સત્તાધિકરણ એજન્ટ +Name[hi]=PolicyKit प्रमाणीकरण प्रतिनिधि +Name[hu]=PolicyKit hitelesítési ügynök +Name[it]=Agente di autenticazione per PolicyKit +Name[ja]=PolicyKit 認証エージェント +Name[kn]=PolicyKit ದೃಢೀಕರಣ ಮಧ್ಯವರ್ತಿ +Name[lt]=PolicyKit tapatybės nustatymo agentas +Name[ml]=പോളിസിക്കിറ്റ് ഓഥന്റിക്കേഷന്‍ ഏജന്റ് +Name[mr]=PolicyKit ऑथेंटीकेशन एजेंट +Name[or]=PolicyKit ବୈଧିକରଣ ସଦସ୍ୟ +Name[pa]=ਪਾਲਸੀਕਿੱਟ ਪਰਮਾਣਕਿਤਾ ਏਜੰਟ +Name[pl]=Agent uwierzytelniania PolicyKit +Name[pt]=Agente de Autenticação PolicyKit +Name[pt_BR]=Agente de autenticação PolicyKit +Name[ro]=Agent de autentificare PolicyKit +Name[sk]=Agent PolicyKit na overovanie totožnosti +Name[sl]=PolicyKit program overjanja +Name[sv]=Autentiseringsagent för PolicyKit +Name[ta]=PolicyKit அங்கீகார முகவர் +Name[te]=పాలసీకిట్ ధృవీకరణ ప్రతినిధి +Name[th]=ตัวกลางสำหรับยืนยันตัวบุคคล PolicyKit +Name[uk]=Агент автентифікації PolicyKit +Name[zh_CN]=PolicyKit 认证代理 +Name[zh_HK]=PolicyKit 驗證代理程式 +Name[zh_TW]=PolicyKit 驗證代理程式 +Comment=PolicyKit Authentication Agent +Comment[ar]=مدير الاستيثاق PolicyKit +Comment[be]=PolicyKit - аґент аўтэнтыфікацыі +Comment[bn_IN]=PolicyKit অনুমোদনের এজেন্ট +Comment[ca]=Agent d'autenticació del PolicyKit +Comment[cs]=Ověřovací agent PolicyKit +Comment[da]=Godkendelsesprogrammet PolicyKit +Comment[de]=Legitimationsdienst von PolicyKit +Comment[el]=Πράκτορας πιστοποίησης PolicyKit +Comment[en_GB]=PolicyKit Authentication Agent +Comment[es]=Agente de autenticación de PolicyKit +Comment[eu]=PolicyKit autentifikatzeko agentea +Comment[fi]=PolicytKit-tunnistautumisohjelma +Comment[fr]=Agent d'authentification de PolicyKit +Comment[gl]=Axente de autenticación PolicyKit +Comment[gu]=PolicyKit સત્તાધિકરણ એજન્ટ +Comment[hi]=PolicyKit प्रमाणीकरण प्रतिनिधि +Comment[hu]=PolicyKit hitelesítési ügynök +Comment[it]=Agente di autenticazione per PolicyKit +Comment[ja]=PolicyKit 認証エージェント +Comment[kn]=PolicyKit ದೃಢೀಕರಣ ಮಧ್ಯವರ್ತಿ +Comment[lt]=PolicyKit tapatybės nustatymo agentas +Comment[ml]=പോളിസിക്കിറ്റ് ഓഥന്റിക്കേഷന്‍ ഏജന്റ് +Comment[mr]=PolicyKit ऑथेंटीकेशन एजेंट +Comment[or]=PolicyKit ବୈଧିକରଣ ସଦସ୍ୟ +Comment[pa]=ਪਾਲਸੀਕਿੱਟ ਪਰਮਾਣਕਿਤਾ ਏਜੰਟ +Comment[pl]=Agent uwierzytelniania PolicyKit +Comment[pt]=Agente de Autenticação PolicyKit +Comment[pt_BR]=Agente de autenticação PolicyKit +Comment[ro]=Agent de autentificare PolicyKit +Comment[sk]=Agent PolicyKit na overovanie totožnosti +Comment[sl]=PolicyKit program overjanja +Comment[sv]=Autentiseringsagent för PolicyKit +Comment[ta]=PolicyKit அங்கீகார முகவர் +Comment[te]=పాలసీకిట్ ధృవీకరణ ప్రతినిధి +Comment[th]=ตัวกลางสำหรับยืนยันตัวบุคคล PolicyKit +Comment[uk]=Агент автентифікації PolicyKit +Comment[zh_CN]=PolicyKit 认证代理 +Comment[zh_HK]=PolicyKit 驗證代理程式 +Comment[zh_TW]=PolicyKit 驗證代理程式 +Exec=/usr/lib/polkit-gnome-authentication-agent-1 +Terminal=false +Type=Application +Categories= +NoDisplay=true +NotShowIn=KDE; +AutostartCondition=GNOME3 unless-session gnome + diff --git a/autostart/.config/autostart/print-applet.desktop b/autostart/.config/autostart/print-applet.desktop new file mode 100644 index 0000000..8519259 --- /dev/null +++ b/autostart/.config/autostart/print-applet.desktop @@ -0,0 +1,119 @@ +[Desktop Entry] +Name=Print Queue Applet +Name[ar]=بريمج طابور الطباعة +Name[as]=মূদ্ৰণ কৰক +Name[bg]=Аплет за печат на опашката +Name[bn]=প্রিন্ট কর্ম তালিকার অ্যাপ্লেট +Name[bn_IN]=প্রিন্ট কর্ম তালিকার অ্যাপ্লেট +Name[br]=Arloadig al lostennad moullañ +Name[ca]=Miniaplicació de la cua d'impressió +Name[cs]=Applet tiskové fronty +Name[da]=Panelprogram for udskriftskø +Name[de]=Applet für Druckerwarteschlange +Name[el]=Μικροεφαρμογή ουράς εκτύπωσης +Name[en_GB]=Print Queue Applet +Name[es]=Applet de la Cola de Impresión +Name[et]=Trükijärjekorra aplett +Name[fi]=Tulostusjonosovelma +Name[fr]=Applet de file d'attente d'impression +Name[gu]=છાપન કતાર એપ્લેટ +Name[he]=יישומון תורי הדפסה +Name[hi]=कतार एप्लेट छापें +Name[hr]=Aplet čekanja ispisa +Name[hu]=Nyomtatásisor-alkalmazás +Name[id]=Aplet Antrian Cetak +Name[is]=Prentbiðraðarsmáforrit +Name[it]=Applet coda di stampa +Name[ja]=印刷キューのアプレット +Name[kn]=ಮುದ್ರಕ ಸರತಿ Applet +Name[ko]=인쇄 대기 상태 애플릿 +Name[lv]=Drukas rindas sīklietotne +Name[ml]=ക്യൂ ആപ്ലറ്റ് പ്രിന്റ് ചെയ്യുക +Name[mr]=छपाई रांग ऍप्लेट +Name[nb]=Panelprogram for utskriftskø +Name[nl]=Printwachtrij-applet +Name[nn]=Panelprogram for utskriftskø +Name[or]=ମୂଦ୍ରଣୀ ଧାଡି ଆପ୍ଲେଟ +Name[pa]=ਪਰਿੰਟ ਕਿਊ ਐਪਲਿਟ +Name[pl]=Aplet kolejki drukowania +Name[pt]=Applet da fila de impressão +Name[pt_BR]=Miniaplicativo da fila de impressão +Name[ro]=Mini-aplicație coadă tipărire +Name[ru]=Апплет очереди печати +Name[sk]=Applet tlačovej fronty +Name[sl]=Vstavek tiskalniške vrste +Name[sr]=Програмче за ред штампања +Name[sr@latin]=Programče za red štampanja +Name[sv]=Panelprogram för utskriftskö +Name[ta]=வரிசை அப்லெட்டை அச்சிடவும் +Name[te]=క్యూ ఆప్లెట్‌ను ముద్రించుము +Name[th]=แอพเพลตคิวพิมพ์ +Name[tr]=Baskı Sırası Uygulaması +Name[uk]=Аплет черги друку +Name[vi]=Tiểu dụng hàng đợi in +Name[zh_CN]=打印队列小程序 +Name[zh_TW]=列印佇列面板程式 +Comment=System tray icon for managing print jobs +Comment[ar]=أيقونة لوحة النظام لإدارة مهام الطباعة +Comment[as]=মূদ্ৰণ কাৰ্য্য পৰিচালনাৰ বাবে ব্যৱস্থাপ্ৰণালী-ট্ৰে তে প্ৰদৰ্শনযোগ্য আইকন +Comment[bg]=Systray икона за управление на задачите на принтера +Comment[bn]=প্রিন্ট কর্ম পরিচালনার জন্য সিস্টেম-ট্রে তে প্রদর্শনযোগ্য আইকন +Comment[bn_IN]=প্রিন্ট কর্ম পরিচালনার জন্য সিস্টেম-ট্রে তে প্রদর্শনযোগ্য আইকন +Comment[br]=Arlun ar maez rebuziñ evit ardeiñ al labourioù moullañ +Comment[ca]=Icona de l'àrea de notificació per a gestionar els treballs d'impressió +Comment[cs]=Ikona v oznamovací oblasti pro správu tiskových úloh +Comment[da]=Statusikon til håndtering af udskriftsjob +Comment[de]=Symbol für Benachrichtigungsfeld zur Verwaltung von Druckaufträgen +Comment[el]=Εικονίδιο μπάρας συστήματος για διαχείριση εργασιών εκτύπωσης +Comment[en_GB]=System tray icon for managing print jobs +Comment[es]=Icono del area de notificación para administrar trabajos de impresión +Comment[et]=Süsteemse salve ikoon trükitööde haldamiseks +Comment[fi]=Ilmoitusalueen kuvake tulostustöiden hallintaan +Comment[fr]=Zone de notification pour la gestion des tâches d'impression +Comment[gu]=છાપન ક્રિયાઓની વ્યવસ્થા કરવા માટે સિસ્ટમ ટ્રે ચિહ્ન +Comment[he]=צלמית במגש המערכת עבור ניהול משימות הדפסה +Comment[hi]=छपाई काम प्रबंधन के लिये सिस्टम ट्रे प्रतीक +Comment[hr]=Ikona trake sustava za upravljanje zadacima ispisivanja +Comment[hu]=Rendszertálca-ikon nyomtatási feladatok kezeléséhez +Comment[id]=Ikon baki sistem untuk mengelola tugas pencetak +Comment[is]=Táknmynd á spjaldið til að stýra prentverkum +Comment[it]=Icona dell'area di notifica di sistema per gestire i lavori di stampa +Comment[ja]=印刷ジョブを管理するシステムトレイアイコン +Comment[kn]=ಮುದ್ರಣ ಕಾರ್ಯಗಳನ್ನು ನಿರ್ವಹಿಸಲು ಗಣಕ ಟ್ರೇ ಲಾಂಛನ +Comment[ko]=인쇄 작업 관리를 위한 시스템 트레이 아이콘 +Comment[lv]=Sistēmas paziņojumu joslas ikona drukas darbu pārvaldībai +Comment[ml]=പ്രിന്റ് ചെയ്യുവാനുളളവ കൈകാര്യം ചെയ്യുന്നതിനുളള സിസ്റ്റം ട്രേ ഐക്കണ്‍ +Comment[mr]=छपाई कार्य व्यवस्थापीत करण्याकरीता प्रणाली ट्रे चिन्ह +Comment[nb]=Varselikon for utskriftsjobber for systemområdet +Comment[nl]=Systeemvak icoon voor het beheren van printopdrachten +Comment[nn]=Systemtrauikon for handsaming av utskriftsjobbar +Comment[or]=ମୁଦ୍ରଣ କାର୍ଯ୍ଯ ମାନଙ୍କୁ ପରିଚାଳନା କରିବା ପାଇଁ ତନ୍ତ୍ର ଟ୍ରେ ଚିତ୍ରସଙ୍କେତ +Comment[pa]=ਪਰਿੰਟ ਜੌਬ ਪਰਬੰਧਨ ਲਈ ਸਿਸਟਮ ਟਰੇਅ +Comment[pl]=Ikona w obszarze powiadamiania do zarządzania zadaniami wydruku +Comment[pt]=Ícone para gerir as tarefas de impressão +Comment[pt_BR]=Ícone de bandeja do sistema para o gerenciamento de trabalhos de impressão +Comment[ro]=Iconiță în zona de notificare pentru gestionarea proceselor de tipărire +Comment[ru]=Иконка области уведомления для управления заданиями печати +Comment[sk]=Ikona na paneli úloh pre správu tlačových úloh +Comment[sl]=Ikona v opravilni vrstici za upravljanje tiskalniških opravil +Comment[sr]=Икона системске обавештајне зоне за управљање штампарским пословима +Comment[sr@latin]=Ikona sistemske obaveštajne zone za upravljanje štamparskim poslovima +Comment[sv]=Aktivitetsfältsikon för administration av utskriftsjobb +Comment[ta]=அச்சு பணிகளை மேலாண்மை செய்ய கணின தட்டு சின்னம் +Comment[te]=ముద్రణ పనులను నిర్వహించుటకు సిస్టమ్ ట్రే ప్రతిమ +Comment[th]=ไอคอนแถบสถานะสำหรับจัดการงานพิมพ์ +Comment[tr]=Yazdırma işlerini yönetmek için sistem çekmecesi simgesi +Comment[uk]=Значок у системній області для керування завданнями друку +Comment[vi]=Biểu tượng khay hệ thống để quản lý các công việc in +Comment[zh_CN]=管理打印任务的系统托盘图标 +Comment[zh_TW]=管理列印工作的系統匣圖示 +Exec=system-config-printer-applet +Terminal=false +Type=Application +Icon=system-config-printer +NotShowIn=KDE;GNOME; +StartupNotify=false +X-GNOME-Autostart-Delay=30 +X-Desktop-File-Install-Version=0.23 +Categories=System;Monitor;GTK; + diff --git a/autostart/.config/autostart/user-dirs-update-gtk.desktop b/autostart/.config/autostart/user-dirs-update-gtk.desktop new file mode 100644 index 0000000..2ab429c --- /dev/null +++ b/autostart/.config/autostart/user-dirs-update-gtk.desktop @@ -0,0 +1,154 @@ +[Desktop Entry] +Encoding=UTF-8 +Exec=xdg-user-dirs-gtk-update +Name=User folders update +Name[an]=Esvielle d'as carpetas de l'usuario +Name[ar]=تحديث مجلدات المستخدم +Name[as]=ব্যৱহাৰকৰ্তাৰ ফোল্ডাৰৰ উন্নয়ন +Name[ast]=Anovamientu de les carpetes del usuariu +Name[be]=Абнаўленне назваў карыстальніцкіх папак +Name[be@latin]=Aktualizacyja katalohaŭ karystalnika +Name[bg]=Превеждане на имената на стандартните папки +Name[bn_IN]=ব্যবহারকারীর ফোল্ডার আপডেট +Name[bs]=Ažuriranje korisničkih direktorija +Name[ca]=Actualització de les carpetes d'usuari +Name[crh]=Qullanıcı cilbentleriniñ yañartıluvı +Name[cs]=Aktualizace uživatelských složek +Name[csb]=Aktualizacëjô kataloga brëkòwnika +Name[da]=Opdatering af brugermapper +Name[de]=Aktualisierung der Ordner des Benutzers +Name[el]=Ενημέρωση φακέλων χρήστη +Name[en_GB]=User folders update +Name[eo]=Ĝisdatigo de uzantaj dosierujoj +Name[es]=Actualización de las carpetas del usuario +Name[et]=Kasutaja kataloogide uuendamine +Name[eu]=Erabiltzailearen karpeten eguneraketa +Name[fi]=Vakiokansioiden päivitys +Name[fr]=Mise à jour des dossiers utilisateur +Name[fur]=Inzornament cartelis utent +Name[gl]=Actualizar os cartafoles do usuario +Name[gu]=વપરાશકર્તાનાં ફોલ્ડરોનો સુધારો +Name[he]=עדכון תיקיות המשתמש +Name[hi]=उपयोक्ता फोल्डर अद्यतन +Name[hr]=Nadopuna korisnikovih mapa +Name[hu]=Felhasználói mappák frissítése +Name[id]=Pembaruan folder pengguna +Name[is]=Uppfæra möppur notanda +Name[it]=Aggiorna cartelle utente +Name[ja]=ユーザー・フォルダーの更新 +Name[ka]=მომხმარებელთა დასტების განახლება +Name[kg]=mu sekokae nta +Name[kk]=Пайдаланушы бумаларын жаңарту +Name[kn]=ಬಳಕೆದಾರ ಕಡತಕೋಶಗಳ ಅಪ್‌ಡೇಟ್‌ +Name[ko]=사용자 폴더 업데이트 +Name[ku]=Rojanekirina peldankên bikarhênerê/î +Name[lt]=Naudotojo aplankų atnaujinimas +Name[lv]=Lietotāja mapju atjaunināšana +Name[ml]=ഉപയോക്താവിന്റെ ഫോള്‍ഡറുകളുടെ പരിഷ്കരണം +Name[mr]=वापरकर्ता पोल्डर्सची सुधारणा +Name[nb]=Oppdatering av brukermapper +Name[nds]=Brukerverteeknisopfrischen +Name[nl]=Gebruikersmappen aanpassen +Name[or]=ଚାଳକ ଫୋଲଡରଗୁଡ଼ିକର ଅଦ୍ୟତନ +Name[pa]=ਯੂਜ਼ਰ ਫੋਲਡਰ ਅੱਪਡੇਟ +Name[pl]=Aktualizacja katalogów użytkownika +Name[ps]=د کارن پوښېو اوسمهالونه +Name[pt]=Atualização de pastas do utilizador +Name[pt_BR]=Atualizar pastas de usuário +Name[ro]=Actualizare dosare utilizator +Name[ru]=Обновление папок пользователя +Name[si]=පරිශීලක බහාලුම් යාවත්කාලීනය +Name[sk]=Aktualizácia používateľských priečinkov +Name[sl]=Uporabniška posodobitev map +Name[sq]=Përditëso kartelat e përdoruesit +Name[sr]=Преименовање фасцикли +Name[sr@latin]=Preimenovanje fascikli +Name[sv]=Uppdatera användarmappar +Name[ta]=பயனர் கோப்புறைகளை மேம்படுத்து +Name[te]=వినియోగదారి ఫోల్డర్ల నవీకరణ +Name[th]=ปรับชื่อโฟลเดอร์ผู้ใช้ +Name[tr]=Kullanıcı klasörlerinin güncelleştirilmesi +Name[uk]=Оновлення тек користувача +Name[vi]=Cập nhật thư mục người dùng +Name[zh_CN]=用户文件夹更新 +Name[zh_HK]=使用者資料夾更新 +Name[zh_TW]=使用者資料夾更新 +Comment=Update common folders names to match current locale +Comment[af]=Dateer algemene gidsname op om te pas by die huidige lokaliteitsinstelling +Comment[an]=Esviellar os nombres d'as carpetas ta conincidir con a configuracion rechional actual +Comment[ar]=حدّث أسماء المجلدات المشتركة لتطابق المحلية الحالية +Comment[as]=বৰ্ত্তমানৰ লোকেইলৰ লগত মিলাবলৈ সাধাৰণ ফোল্ডাৰৰ নাম উন্নয়ন কৰক +Comment[ast]=Anovar los nomes comunes de les carpetes pa que concasen cola configuración rexonal actual +Comment[be]=Абнаўленне назваў стандартных папак у адпаведнасці з актыўнымі настройкамі мясцовасці +Comment[be@latin]=Aktualizuj nazvy asnoŭnych katalohaŭ, kab adpaviadali dziejnaj lakalnaści +Comment[bg]=Превеждане на имената на стандартните папки към текущо ползвания език +Comment[bn_IN]=বর্তমান লোকেইল অনুযায়ী, সাধারণ ফোল্ডারগুলির নাম পরিবর্তন করা হবে +Comment[bs]=Promijeni imena često korišćenih direktorija na trenutni jezik +Comment[ca]=Actualitza els noms de les carpetes comunes per a coincidir amb l'idioma actual +Comment[crh]=Umumiy cilbentlerniñ isimlerini ağımdaki tilge uyğunlaştır +Comment[cs]=Aktualizovat názvy běžných složek podle aktuální lokalizace libc +Comment[csb]=Aktualizacëjô nowich mionów katalogów do aktualnegò nastôwù jãzëka +Comment[da]=Opdatér almindelige mappenavne, så de passer til det nuværende sprog +Comment[de]=Namen der Standardordner auf die momentan verwendete Sprache aktualisieren +Comment[el]=Ενημέρωση ονομάτων των συνηθισμένων φακέλων ώστε να ταιριάζουν στην τρέχουσα γλώσσα +Comment[en_GB]=Update common folders names to match current locale +Comment[eo]=Ĝisdatigi komunajn dosierujnomojn por tute kongrui aktualan lokan lingvon +Comment[es]=Actualizar los nombres comunes de las carpetas para coincidir con la configuración regional actual +Comment[et]=Standardkaustade nimede uuendamine, et need sobiksid valitud keelega +Comment[eu]=Eguneratu karpeta arrunten izenak uneko lokalearekin bat etortzeko +Comment[fi]=Päivitä vakiokansioiden nimet nykyisten kieliasetusten perusteella +Comment[fr]=Mettre à jour les noms des dossiers courants pour correspondre à la langue (« locale ») actuelle +Comment[fur]=Inzorne i nons des cartelis ordenaris in base ae lenghe in ûs +Comment[gl]=Actualizar nomes dos cartafoles comúns para coincidir co locale actual +Comment[gu]=હાલનાં લોકેલ ને બંધબેસતા સામાન્ય ફોલ્ડર નામોને સુધારો +Comment[he]=עדכון שמות של תיקיות נפוצות כך שיתאימו לשפה הנוכחית +Comment[hi]=मौजूदा फोल्डर से मेल खाने के लिए सामान्य फोल्डर नाम को अद्यतन करें +Comment[hr]=Nadopuni nazive uobičajenih mapa kako bi odgovarali trenutnom jeziku +Comment[hu]=Általános mappanevek frissítése a jelenlegi területi beállításra +Comment[id]=Perbarui nama folder umum untuk disamakan dengan lokal saat ini +Comment[is]=Uppfæra möppur til að passa við núverandi tungumál +Comment[it]=Aggiorna i nomi di cartella comuni in base alla lingua in uso +Comment[ja]=標準フォルダーの名前を現在の言語に合わせて更新します +Comment[ka]=დასტების მიმდინარე ლოკალის მიხედვით განახლება +Comment[kg]=bandula nta za lundombe mu ndingAku +Comment[kk]=Ағымдағы тілге сәйкес келуі үшін қалыпты бумалар атауларын жаңарту +Comment[kn]=ಪ್ರಸಕ್ತ ಭಾಷೆಗೆ(ಲೊಕ್ಯಾಲ್‌) ಹೊಂದಿಕೊಳ್ಳುವಂತೆ ಸಾಮಾನ್ಯ ಕಡತಕೋಶದ ಹೆಸರುಗಳನ್ನು ಬದಲಾಯಿಸಿ +Comment[ko]=현재 로캘에 맞게 공통 폴더의 이름을 바꿉니다 +Comment[ku]=Navên peldankên zêde bikaranî rojane bike da ku lihevhatina bi localeya heyî re hebe. +Comment[lt]=Atnaujinti standartinių aplankų vardus pagal nustatytą lokalę +Comment[lv]=Atjaunināt vispārīgo mapju nosaukumus, lai tie sakristu ar izvēlēto lokāli +Comment[ml]=ഇപ്പോഴുള്ള ലൊക്കേലുമായി പൊരുത്തപ്പെടുന്ന സാധാരണ ഫോള്‍ഡര്‍ നാമങ്ങള്‍ നല്‍കുക +Comment[mr]=सध्याच्या लोकेलची जुळवणी करण्यासाठी सामान्य फोल्डरचे नावे सुधारीत करा +Comment[nb]=Oppdater navn på vanlige mapper til aktivt språk +Comment[nds]=Allgemeene Verteeknisnaamen in de neje Sprak opfrischen +Comment[nl]=Namen van standaardmappen aanpassen aan de huidige taalinstelling +Comment[or]=ପ୍ରଚଳିତ ଭାଷା ସହିତ ମେଳାଇବା ପାଇଁ ସାଧାରଣ ଫୋଲଡର ନାମଗୁଡ଼ିକୁ ଅଦ୍ୟତନ କରନ୍ତୁ +Comment[pa]=ਆਮ ਫੋਲਡਰ ਨਾਂ ਮੌਜੂਦਾ ਲੋਕੇਲ ਨਾਲ ਮਿਲਾਉਣ ਵਾਸਤੇ ਅੱਪਡੇਟ +Comment[pl]=Aktualizowanie nazw katalogów do bieżących ustawień językowych +Comment[ps]=د ټولګړو پوښېو نومونه اوسمهالول چې د اوسنۍ ځاييزونې سره ساري شي +Comment[pt]=Atualizar os nomes de pastas comuns para corresponderem ao idioma atual +Comment[pt_BR]=Atualiza o nome de pastas comuns para se adequar à localização atual +Comment[ro]=Actualizați numele dosarelor uzuale pentru a se potrivi cu localizarea curentă +Comment[ru]=Обновить имена общих папок для соответствия текущему языку +Comment[sk]=Aktualizovať názvy bežných priečinkov, aby sa zhodovali so súčasným jazykom +Comment[sl]=Posodobi imena map na trenutno izbrani jezik +Comment[sq]=Përditëso emrat e kartelave të zakonshme në bazë të gjuhës në përdorim +Comment[sr]=Усклађује имена стандардних фасцикли са тренутним језиком +Comment[sr@latin]=Usklađuje imena standardnih fascikli sa trenutnim jezikom +Comment[sv]=Uppdatera vanliga mappnamn för att passa aktuell lokal +Comment[ta]=நடப்பு உள்ளமைக்கு பொதுவான கோப்புறைகளின் பெயர்களை பொருத்துவதற்கு மேம்படுத்து +Comment[te]=ఉమ్మడి ఫోల్డర్ నామములను ప్రస్తుత స్థానికానికి నవీకరించుము +Comment[th]=ปรับชื่อโฟลเดอร์มาตรฐานให้เป็นภาษาเดียวกับโลแคลปัจจุบัน +Comment[tr]=Genel klasör adlarını geçerli dile uyumlu hale getirmek için güncelleştir +Comment[uk]=Оновити імена загальних тек для відповідності поточній локалі +Comment[vi]=Cập nhật tên các thư mục thông dụng cho khớp với ngôn ngữ bản địa +Comment[zh_CN]=更新公共文件夹名称以匹配当前区域设置 +Comment[zh_HK]=更新常用資料夾名稱以符合目前的語言區域設定 +Comment[zh_TW]=更新常用資料夾名稱以符合目前的語言區域設定 +Terminal=false +OnlyShowIn=GNOME;XFCE;LXDE;Unity; +Type=Application +StartupNotify=false +NoDisplay=true +X-KDE-autostart-after=panel +X-GNOME-Autostart-Phase=Initialization diff --git a/autostart/.config/autostart/xfce4-power-manager.desktop b/autostart/.config/autostart/xfce4-power-manager.desktop new file mode 100644 index 0000000..8f98ea1 --- /dev/null +++ b/autostart/.config/autostart/xfce4-power-manager.desktop @@ -0,0 +1,126 @@ +[Desktop Entry] +Name=Power Manager +Name[ar]=مدير طاقة +Name[ast]=Xestor d'enerxía +Name[be]=Кіраўнік сілкавання +Name[bg]=Управление на захранването +Name[ca]=Gestor d'energia +Name[cs]=Správa napájení +Name[da]=Strømstyring +Name[de]=Energieverwaltung +Name[el]=Διαχειριστής ρεύματος +Name[en_AU]=Power Manager +Name[en_GB]=Power Manager +Name[es]=Administrador de energía +Name[et]=Vooluhaldur +Name[eu]=Energia kudeaketa +Name[fi]=Virranhallinta +Name[fr]=Gestionnaire d’alimentation +Name[gl]=Xestor de enerxía +Name[he]=מנהל צריכת חשמל +Name[hr]=Upravitelj energijom +Name[hu]=Energiakezelő +Name[hy_AM]=Լիցք +Name[id]=Manajer Daya +Name[ie]=Gerente de energie +Name[is]=Aflstjórnun +Name[it]=Gestore dell'energia +Name[ja]=電源管理 +Name[kk]=Электр қоректендіру басқарушысы +Name[kn]=ಪವರ್ ಮ್ಯಾನೇಜರ್ +Name[ko]=전원 관리자 +Name[lt]=Maitinimo tvarkytuvė +Name[ms]=Pengurus Kuasa +Name[nb]=Strømstyring +Name[nl]=Energiebeheerder +Name[nn]=Straumstyring +Name[oc]=Gestionari d'alimentacion +Name[pa]=ਪਾਵਰ ਮੈਨੇਜਰ +Name[pl]=Menedżer zasilania +Name[pt]=Gestão de energia +Name[pt_BR]=Gerenciador de Energia +Name[ro]=Manager de consum +Name[ru]=Менеджер питания +Name[si]=ශක්ති කළමනාකාරකය +Name[sk]=Správca napájania +Name[sl]=Upravljalnik porabe energije +Name[sq]=Përgjegjës Energjie +Name[sr]=Управник потрошње +Name[sv]=Strömhanterare +Name[te]=విద్యుత్ నిర్వాహకం +Name[th]=ระบบจัดการพลังงาน +Name[tr]=Güç Yöneticisi +Name[ug]=مەنبە باشقۇرغۇ +Name[uk]=Менеджер живлення +Name[ur]=توانائی منیجر +Name[ur_PK]=توانائی منیجر +Name[vi]=Trình quản lý năng lượng +Name[zh_CN]=电源管理器 +Name[zh_HK]=電力管理員 +Name[zh_TW]=電源管理員 +Comment=Power management for the Xfce desktop +Comment[ar]=مدير الطاقة لسطح مكتب إكسفس +Comment[ast]=Alministrador d'enerxía pal escritoriu Xfce +Comment[be]=Кіраванне сілкаваннем у працоўным асяроддзі Xfce +Comment[bg]=Управление на захранването за Xfce среда +Comment[ca]=Gestor d'energia per l'escriptori Xfce +Comment[cs]=Správa napájení pro prostředí Xfce +Comment[da]=Strømstyring til Xfce-skrivebordsmiljøet +Comment[de]=Energieverwaltung für die Xfce-Arbeitsumgebung +Comment[el]=Διαχείριση ρεύματος για την επιφάνεια εργασίας του xfce +Comment[en_AU]=Power management for the Xfce desktop +Comment[en_GB]=Power management for the Xfce desktop +Comment[es]=Administrador de energía para el escritorio Xfce +Comment[et]=Xfce töölaua vooluhaldur +Comment[eu]=Xfce mahaigain inguruneko energia kudeatzailea +Comment[fi]=Xfce-työpöydän virrankäytön hallinta +Comment[fr]=Gestion d’alimentation pour l’environnement de bureau Xfce +Comment[gl]=Xestión de enerxía para o escritorio Xfce +Comment[he]=ניהול צריכת חשמל עבור שולחן עבודה Xfce +Comment[hr]=Upravljanje energijom za Xfce radno okruženje +Comment[hu]=Energiagazdálkodás az Xfce környezethez +Comment[hy_AM]=Xfce աշխատասեղանի լիցքի կառավարիչ +Comment[id]=Manajemen daya untuk desktop Xfce +Comment[ie]=Gerentie de energie por li ambientie Xfce +Comment[is]=Orkustýring fyrir XFCE-skjáborðsumhverfið +Comment[it]=Gestione dell'energia per l'ambiente Xfce +Comment[ja]=Xfce デスクトップ用電源管理 +Comment[kk]=Xfce жұмыс үстел ортасы үшін эл. қорегін басқару +Comment[kn]=Xfce ಡೆಸ್ಕ್ಟಾಪ್ಗಾಗಿ ಪವರ್ ನಿರ್ವಹಣೆ +Comment[ko]=Xfce 데스크톱의 전원 관리자 +Comment[lt]=Xfce darbalaukio maitinimo tvarkytuvė +Comment[ms]=Pengurusan kuasa untuk desktop Xfce +Comment[nb]=Strømstyring for Xfce-skrivebordsmiljøet +Comment[nl]=Energiebeheer voor de Xfce-werkomgeving +Comment[nn]=Straumstyring for Xfce-skrivebordet +Comment[oc]=Gestion d'alimentacion per l'environament de burèu Xfce +Comment[pa]=Xfce ਡੈਸਕਟਾਪ ਲਈ ਪਾਵਰ ਮੈਨੇਜਰ +Comment[pl]=Zarządza zasilaniem w środowisku Xfce +Comment[pt]=Gestão de energia para o Xfce +Comment[pt_BR]=Gerenciamento de energia para o Xfce desktop +Comment[ro]=Management de consum pentru desktopul Xfce +Comment[ru]=Управление питанием для окружения рабочего стола Xfce +Comment[si]= Xfce desktop සඳහා ශක්ති කළමණාකාරකය +Comment[sk]=Správa napájania pre prostredie Xfce +Comment[sl]=Upravljalnik porabe energije za namizje Xfce +Comment[sq]=Administrim energjie për desktopin Xfce +Comment[sr]=Управник потрошње за ИксФЦЕ радно окружење +Comment[sv]=Strömhanterare för Xfce-skrivbordet +Comment[te]=Xfce డెస్క్‌టాప్ కొరకు విద్యుత్ నిర్వాహణ +Comment[th]=การจัดการพลังงานสำหรับเดสก์ท็อป Xfce +Comment[tr]=Xfce masaüstü için güç yönetimi +Comment[ug]=Xfce ئۈستەلئۈستىنىڭ مەنبە باشقۇرغۇ پروگراممىسى +Comment[uk]=Менеджер живлення для робочого столу Xfce +Comment[ur]=توانائی منیجر پرائے ایکسفس ڈیسک ٹاپ +Comment[ur_PK]=توانائی منیجر پرائے ایکسفس ڈیسک ٹاپ +Comment[vi]=Quản lý năng lượng cho môi trường Xfce +Comment[zh_CN]=Xfce 桌面的电源管理 +Comment[zh_HK]=Xfce 桌面的電力管理 +Comment[zh_TW]=Xfce 桌面的電力管理 +Icon=xfce4-power-manager-settings +Exec=xfce4-power-manager +Terminal=false +Type=Application +NotShowIn=GNOME;KDE;Unity;MATE;LXQt; +StartupNotify=false + diff --git a/autostart/.config/autostart/xfsettingsd.desktop b/autostart/.config/autostart/xfsettingsd.desktop new file mode 100644 index 0000000..27d45ea --- /dev/null +++ b/autostart/.config/autostart/xfsettingsd.desktop @@ -0,0 +1,65 @@ +[Desktop Entry] +Version=1.0 +Name=Xfsettingsd +Comment=The Xfce Settings Daemon +Comment[am]=የ Xfce ማሰናጃ እረዳት +Comment[ar]=بريمج إعدادات إكسفس +Comment[ast]=El degorriu d'axustes Xfce +Comment[be]=Дэман налад Xfce +Comment[be@tarask]=Сэрвіс наладаў Xfce +Comment[bg]=Управлението на настройките на Xfce +Comment[ca]=El dimoni del gestor d'ajusts de Xfce +Comment[cs]=Démon nastavení prostředí Xfce +Comment[da]=Xfce-indstillingsdæmonen +Comment[de]=Der Xfce-Einstellungsdienst +Comment[el]=Διαχειριστής Ρυθμίσεων Xfce +Comment[en_AU]=The Xfce Settings Daemon +Comment[en_GB]=The Xfce Settings Daemon +Comment[es]=El servicio de configuración de Xfce +Comment[eu]=Xfce ezarpen deabrua +Comment[fi]=Xfce:n asetustaustaprosessi +Comment[fr]=Le démon des paramètres Xfce +Comment[gl]=O daemon de configuración de Xfce +Comment[he]=תהליך רקע הגדרות של Xfce +Comment[hr]=Xfce nadglednik postavki +Comment[hu]=Az Xfce beállításkezelő démon +Comment[hy_AM]=Xfce֊ի կարգաւորումների աւժանդակ ծրագիր +Comment[id]=Jurik Pengaturan Xfce +Comment[ie]=Dæmon de parametres de Xfce +Comment[is]=XFCE Stillingamiðlarinn +Comment[it]=Demone delle impostazioni di Xfce +Comment[ja]=Xfce 設定デーモン +Comment[kk]=Xfce баптаулар қызметі +Comment[ko]=Xfce 설정 데몬 +Comment[lt]=Xfce nustatymų tarnyba +Comment[lv]=Xfce iestatījumu dēmons +Comment[ms]=Daemon Tetapan Xfce +Comment[nb]=Bakgrunnsprosess for Xfce-innstillinger +Comment[nl]=De achtergronddienst voor Xfce-Instellingen +Comment[nn]=Xfce-innstillingsnissen +Comment[oc]=Los paramètres del demòni Xfce +Comment[pl]=Demon ustawień Xfce +Comment[pt]=Serviço de definições do Xfce +Comment[pt_BR]=O daemon de configurações do Xfce +Comment[ro]=Demonul opțiunilor Xfce +Comment[ru]=Служба диспетчера настроек Xfce +Comment[sk]=Démon nastavenia Xfce +Comment[sl]=Strežnik za Xfce nastavitve +Comment[sq]=Demoni i Rregullimeve Xfce +Comment[sr]=Домар поставки Иксфце-а +Comment[sv]=Inställningshanteraren för Xfce +Comment[te]=Xfce అమరికల డెమోన్ +Comment[th]=ดีมอนค่าตั้งของ Xfce +Comment[tr]=Xfce Ayarlar Süreci +Comment[ug]=تەڭشەك مۇئەككىلى +Comment[uk]=Демон параметрів Xfce +Comment[zh_CN]=Xfce 设置守护进程 +Comment[zh_HK]=Xfce 4 設定幕後程式 +Comment[zh_TW]=Xfce 4 設定幕後程式 +Exec=xfsettingsd +Icon=applications-system +Terminal=false +Type=Application +StartupNotify=false +OnlyShowIn=XFCE; + diff --git a/composer/.config/composer/composer.json b/composer/.config/composer/composer.json new file mode 100644 index 0000000..b4b4c88 --- /dev/null +++ b/composer/.config/composer/composer.json @@ -0,0 +1,15 @@ +{ + "minimum-stability": "dev", + "prefer-stable": true, + "require": { + "friendsofphp/php-cs-fixer": "^2.12", + "squizlabs/php_codesniffer": "^3.4", + "phpmd/phpmd": "^2.7", + "kubawerlos/composer-json-fixer": "^2.1", + "hirak/prestissimo": "^0.3", + "consolidation/cgr": "^2.0" + }, + "require-dev": { + "phpstan/phpstan": "^0.11.12" + } +} diff --git a/etc/apt/apt.conf.d/50unattended-upgrades b/etc/apt/apt.conf.d/50unattended-upgrades new file mode 100644 index 0000000..4b37679 --- /dev/null +++ b/etc/apt/apt.conf.d/50unattended-upgrades @@ -0,0 +1,146 @@ +// Unattended-Upgrade::Origins-Pattern controls which packages are +// upgraded. +// +// Lines below have the format format is "keyword=value,...". A +// package will be upgraded only if the values in its metadata match +// all the supplied keywords in a line. (In other words, omitted +// keywords are wild cards.) The keywords originate from the Release +// file, but several aliases are accepted. The accepted keywords are: +// a,archive,suite (eg, "stable") +// c,component (eg, "main", "contrib", "non-free") +// l,label (eg, "Debian", "Debian-Security") +// o,origin (eg, "Debian", "Unofficial Multimedia Packages") +// n,codename (eg, "jessie", "jessie-updates") +// site (eg, "http.debian.net") +// The available values on the system are printed by the command +// "apt-cache policy", and can be debugged by running +// "unattended-upgrades -d" and looking at the log file. +// +// Within lines unattended-upgrades allows 2 macros whose values are +// derived from /etc/debian_version: +// ${distro_id} Installed origin. +// ${distro_codename} Installed codename (eg, "buster") +Unattended-Upgrade::Origins-Pattern { + // Codename based matching: + // This will follow the migration of a release through different + // archives (e.g. from testing to stable and later oldstable). + // Software will be the latest available for the named release, + // but the Debian release itself will not be automatically upgraded. +// "origin=Debian,codename=${distro_codename}-updates"; +// "origin=Debian,codename=${distro_codename}-proposed-updates"; + "origin=Debian,codename=${distro_codename},label=Debian"; + "origin=Debian,codename=${distro_codename},label=Debian-Security"; + + // Archive or Suite based matching: + // Note that this will silently match a different release after + // migration to the specified archive (e.g. testing becomes the + // new stable). +// "o=Debian,a=stable"; +// "o=Debian,a=stable-updates"; +// "o=Debian,a=proposed-updates"; +// "o=Debian Backports,a=${distro_codename}-backports,l=Debian Backports"; +}; + +// Python regular expressions, matching packages to exclude from upgrading +Unattended-Upgrade::Package-Blacklist { + // The following matches all packages starting with linux- +// "linux-"; + + // Use $ to explicitely define the end of a package name. Without + // the $, "libc6" would match all of them. +// "libc6$"; +// "libc6-dev$"; +// "libc6-i686$"; + + // Special characters need escaping +// "libstdc\+\+6$"; + + // The following matches packages like xen-system-amd64, xen-utils-4.1, + // xenstore-utils and libxenstore3.0 +// "(lib)?xen(store)?"; + + // For more information about Python regular expressions, see + // https://docs.python.org/3/howto/regex.html +}; + +// This option allows you to control if on a unclean dpkg exit +// unattended-upgrades will automatically run +// dpkg --force-confold --configure -a +// The default is true, to ensure updates keep getting installed +//Unattended-Upgrade::AutoFixInterruptedDpkg "true"; + +// Split the upgrade into the smallest possible chunks so that +// they can be interrupted with SIGTERM. This makes the upgrade +// a bit slower but it has the benefit that shutdown while a upgrade +// is running is possible (with a small delay) +//Unattended-Upgrade::MinimalSteps "true"; + +// Install all updates when the machine is shutting down +// instead of doing it in the background while the machine is running. +// This will (obviously) make shutdown slower. +// Unattended-upgrades increases logind's InhibitDelayMaxSec to 30s. +// This allows more time for unattended-upgrades to shut down gracefully +// or even install a few packages in InstallOnShutdown mode, but is still a +// big step back from the 30 minutes allowed for InstallOnShutdown previously. +// Users enabling InstallOnShutdown mode are advised to increase +// InhibitDelayMaxSec even further, possibly to 30 minutes. +//Unattended-Upgrade::InstallOnShutdown "false"; + +// Send email to this address for problems or packages upgrades +// If empty or unset then no email is sent, make sure that you +// have a working mail setup on your system. A package that provides +// 'mailx' must be installed. E.g. "user@example.com" +//Unattended-Upgrade::Mail ""; + +// Set this value to "true" to get emails only on errors. Default +// is to always send a mail if Unattended-Upgrade::Mail is set +//Unattended-Upgrade::MailOnlyOnError "false"; + +// Remove unused automatically installed kernel-related packages +// (kernel images, kernel headers and kernel version locked tools). +//Unattended-Upgrade::Remove-Unused-Kernel-Packages "true"; + +// Do automatic removal of newly unused dependencies after the upgrade +//Unattended-Upgrade::Remove-New-Unused-Dependencies "true"; + +// Do automatic removal of unused packages after the upgrade +// (equivalent to apt-get autoremove) +//Unattended-Upgrade::Remove-Unused-Dependencies "false"; + +// Automatically reboot *WITHOUT CONFIRMATION* if +// the file /var/run/reboot-required is found after the upgrade +//Unattended-Upgrade::Automatic-Reboot "false"; + +// Automatically reboot even if there are users currently logged in +// when Unattended-Upgrade::Automatic-Reboot is set to true +//Unattended-Upgrade::Automatic-Reboot-WithUsers "true"; + +// If automatic reboot is enabled and needed, reboot at the specific +// time instead of immediately +// Default: "now" +//Unattended-Upgrade::Automatic-Reboot-Time "02:00"; + +// Use apt bandwidth limit feature, this example limits the download +// speed to 70kb/sec +//Acquire::http::Dl-Limit "70"; + +// Enable logging to syslog. Default is False +// Unattended-Upgrade::SyslogEnable "false"; + +// Specify syslog facility. Default is daemon +// Unattended-Upgrade::SyslogFacility "daemon"; + +// Download and install upgrades only on AC power +// (i.e. skip or gracefully stop updates on battery) +// Unattended-Upgrade::OnlyOnACPower "true"; + +// Download and install upgrades only on non-metered connection +// (i.e. skip or gracefully stop updates on a metered connection) +// Unattended-Upgrade::Skip-Updates-On-Metered-Connections "true"; + +// Verbose logging +// Unattended-Upgrade::Verbose "false"; + +// Print debugging information both in unattended-upgrades and +// in unattended-upgrade-shutdown +// Unattended-Upgrade::Debug "false"; diff --git a/etc/apt/preferences.d/oldstable.pref b/etc/apt/preferences.d/oldstable.pref new file mode 100644 index 0000000..77d268b --- /dev/null +++ b/etc/apt/preferences.d/oldstable.pref @@ -0,0 +1,6 @@ +# 0 < P < 100: causes a version to be installed only if there is no +# installed version of the package + +Package: * +Pin: release a=oldstable +Pin-Priority: 40 diff --git a/etc/apt/preferences.d/pentest.pref b/etc/apt/preferences.d/pentest.pref new file mode 100644 index 0000000..ee9801b --- /dev/null +++ b/etc/apt/preferences.d/pentest.pref @@ -0,0 +1,6 @@ +# 0 < P < 100: causes a version to be installed only if there is no +# installed version of the package + +Package: * +Pin: release a=pentest +Pin-Priority: 45 diff --git a/etc/apt/preferences.d/stable.pref b/etc/apt/preferences.d/stable.pref new file mode 100644 index 0000000..0840572 --- /dev/null +++ b/etc/apt/preferences.d/stable.pref @@ -0,0 +1,8 @@ +# 500 <= P < 990: causes a version to be installed unless there is a +# version available belonging to the target release or the installed +# version is more recent + +Package: * +Pin: release a=stable +Pin-Priority: 900 + diff --git a/etc/apt/preferences.d/testing.pref b/etc/apt/preferences.d/testing.pref new file mode 100644 index 0000000..94a4b0c --- /dev/null +++ b/etc/apt/preferences.d/testing.pref @@ -0,0 +1,7 @@ +# 100 <= P < 500: causes a version to be installed unless there is a +# version available belonging to some other distribution or the installed +# version is more recent + +Package: * +Pin: release a=testing +Pin-Priority: 400 diff --git a/etc/apt/preferences.d/unstable.pref b/etc/apt/preferences.d/unstable.pref new file mode 100644 index 0000000..7aecd21 --- /dev/null +++ b/etc/apt/preferences.d/unstable.pref @@ -0,0 +1,6 @@ +# 0 < P < 100: causes a version to be installed only if there is no +# installed version of the package + +Package: * +Pin: release a=unstable +Pin-Priority: 50 diff --git a/etc/apt/sources.list b/etc/apt/sources.list new file mode 100644 index 0000000..e69de29 diff --git a/etc/apt/sources.list.d/insomnia.list b/etc/apt/sources.list.d/insomnia.list new file mode 100644 index 0000000..19f2d5d --- /dev/null +++ b/etc/apt/sources.list.d/insomnia.list @@ -0,0 +1 @@ +deb https://dl.bintray.com/getinsomnia/Insomnia / diff --git a/etc/apt/sources.list.d/nextcloud-client.list b/etc/apt/sources.list.d/nextcloud-client.list new file mode 100644 index 0000000..0451ac6 --- /dev/null +++ b/etc/apt/sources.list.d/nextcloud-client.list @@ -0,0 +1,2 @@ +deb http://ppa.launchpad.net/nextcloud-devs/client/ubuntu zesty main +deb-src http://ppa.launchpad.net/nextcloud-devs/client/ubuntu zesty main diff --git a/etc/apt/sources.list.d/oldstable.list b/etc/apt/sources.list.d/oldstable.list new file mode 100644 index 0000000..00fbfb8 --- /dev/null +++ b/etc/apt/sources.list.d/oldstable.list @@ -0,0 +1,21 @@ +# + +# deb cdrom:[Debian GNU/Linux 10.5.0 _Buster_ - Official amd64 xfce-CD Binary-1 20200801-11:35]/ stretch main contrib non-free + +#deb cdrom:[Debian GNU/Linux 10.5.0 _Buster_ - Official amd64 xfce-CD Binary-1 20200801-11:35]/ stretch main contrib non-free + +deb http://deb.debian.org/debian/ stretch main contrib non-free +deb-src http://deb.debian.org/debian/ stretch main contrib non-free + +deb http://security.debian.org/debian-security stretch/updates main contrib non-free +deb-src http://security.debian.org/debian-security stretch/updates main contrib non-free + +# stretch-updates, previously known as 'volatile' +deb http://deb.debian.org/debian/ stretch-updates main contrib non-free +deb-src http://deb.debian.org/debian/ stretch-updates main contrib non-free + +# This system was installed using small removable media +# (e.g. netinst, live or single CD). The matching "deb cdrom" +# entries were disabled at the end of the installation process. +# For information about how to configure apt package sources, +# see the sources.list(5) manual. diff --git a/etc/apt/sources.list.d/pentest.list b/etc/apt/sources.list.d/pentest.list new file mode 100644 index 0000000..2f02646 --- /dev/null +++ b/etc/apt/sources.list.d/pentest.list @@ -0,0 +1,8 @@ +# Metasploit Framework +#deb http://downloads.metasploit.com/data/releases/metasploit-framework/apt lucid main + +# Parrot +#deb https://deb.parrotlinux.org/parrot/ rolling main contrib non-free +#deb-src https://deb.parrotlinux.org/parrot/ rolling main contrib non-free +#deb https://deb.parrotlinux.org/parrot/ rolling-security main contrib non-free +#deb-src https://deb.parrotlinux.org/parrot/ rolling-security main contrib non-free diff --git a/etc/apt/sources.list.d/stable.list b/etc/apt/sources.list.d/stable.list new file mode 100644 index 0000000..b24ab45 --- /dev/null +++ b/etc/apt/sources.list.d/stable.list @@ -0,0 +1,12 @@ +deb http://deb.debian.org/debian/ stable main non-free contrib +deb-src http://deb.debian.org/debian/ stable main non-free contrib + +deb http://security.debian.org/debian-security stable/updates main contrib non-free +deb-src http://security.debian.org/debian-security stable/updates main contrib non-free + +# stable-updates, previously known as 'volatile' +deb http://deb.debian.org/debian/ stable-updates main contrib non-free +deb-src http://deb.debian.org/debian/ stable-updates main contrib non-free + +# For information about how to configure apt package sources, +# see the sources.list(5) manual. diff --git a/etc/apt/sources.list.d/testing.list b/etc/apt/sources.list.d/testing.list new file mode 100644 index 0000000..d291f98 --- /dev/null +++ b/etc/apt/sources.list.d/testing.list @@ -0,0 +1,8 @@ +deb http://deb.debian.org/debian testing main contrib non-free +deb-src http://deb.debian.org/debian testing main contrib non-free + +deb http://deb.debian.org/debian-security/ testing-security main contrib non-free +deb-src http://deb.debian.org/debian-security/ testing-security main contrib non-free + +deb http://deb.debian.org/debian testing-updates main contrib non-free +deb-src http://deb.debian.org/debian testing-updates main contrib non-free diff --git a/etc/apt/sources.list.d/unstable.list b/etc/apt/sources.list.d/unstable.list new file mode 100644 index 0000000..b437e55 --- /dev/null +++ b/etc/apt/sources.list.d/unstable.list @@ -0,0 +1,2 @@ +deb http://deb.debian.org/debian unstable main contrib non-free +deb-src http://deb.debian.org/debian unstable main contrib non-free diff --git a/etc/apt/sources.list.d/virtualbox.list b/etc/apt/sources.list.d/virtualbox.list new file mode 100644 index 0000000..6d849ea --- /dev/null +++ b/etc/apt/sources.list.d/virtualbox.list @@ -0,0 +1 @@ +deb http://download.virtualbox.org/virtualbox/debian buster contrib diff --git a/geany/.config/geany/colorschemes/darcula.conf b/geany/.config/geany/colorschemes/darcula.conf new file mode 100644 index 0000000..8abc90a --- /dev/null +++ b/geany/.config/geany/colorschemes/darcula.conf @@ -0,0 +1,149 @@ +# +# Copyright 2015 Jiri Techet +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, +# MA 02110-1301, USA. +# +# Ported from the IntelliJ Darcula theme by Jiri Techet +# + +[theme_info] +name=Darcula +description=A soft dark theme based on the IntelliJ Darcula theme. +# incremented automatically, do not change manually +version=1 +author=Jiri Techet +url=https://github.com/codebrainz/geany-themes +# list of each compatible Geany release version +compat=1.22;1.23;1.23.1;1.24 + +[named_colors] +fg=#b6c3cf +bg=#3b3b3b + +caret_grey=#c6c6c6 +margin_fg_grey=#989898 +comment_grey=#919191 +fold_fg_grey=#888 +whitespace_grey=#505050 +calltip_fg_grey=#555 +calltip_bg_grey=#ddd +fold_bg_grey=#4c4c4c +current_line_grey=#434343 +margin_bg_grey=#424446 + +type_violet=#a88ab6 +keyword_blue=#9196bf +number_blue=#7aa6c4 +selection_blue=#2f5692 +brace_bg_green=#4d6360 +diff_added_green=#558266 +docstring_green=#73a46a +string_green=#b2ca78 +alert_yellow=#ffef4c +tag_yellow=#edc881 +keyword_orange=#d58a4a +error_red=#c85550 +diff_removed_red=#a0665b + +[named_styles] + +default=fg;bg;false;false +error=error_red;;;true + +# Editor styles +#------------------------------------------------------------------------------- + +selection=;selection_blue;;true +current_line=;current_line_grey;true +brace_good=alert_yellow;brace_bg_green;true +brace_bad=error_red;current_line_grey;true +margin_line_number=margin_fg_grey;margin_bg_grey +margin_folding=fold_fg_grey;fold_bg_grey +fold_symbol_highlight=fold_bg_grey +indent_guide=whitespace_grey +caret=caret_grey +marker_line=margin_bg_grey;alert_yellow +marker_search=;alert_yellow +marker_mark=margin_bg_grey;alert_yellow +call_tips=calltip_fg_grey;calltip_bg_grey;true;true +white_space=whitespace_grey;;true + +# Programming languages +#------------------------------------------------------------------------------- + +comment=comment_grey +comment_doc=docstring_green +comment_line=comment +comment_line_doc=comment_doc +comment_doc_keyword=comment_doc,bold +comment_doc_keyword_error=comment_doc,italic + +number=number_blue +number_1=number +number_2=number_1 + +type=type_violet +class=type +function=tag_yellow +parameter=function + +keyword=keyword_orange +keyword_1=keyword +keyword_2=keyword_blue +keyword_3=keyword_1 +keyword_4=keyword_1 + +identifier=default +identifier_1=identifier +identifier_2=identifier_1 +identifier_3=identifier_1 +identifier_4=identifier_1 + +string=string_green +string_1=string +string_2=string_1 +string_3=default +string_4=default +string_eol=string_1,italic +character=string_1 +backticks=string_2 +here_doc=string_2 + +scalar=string_2 +label=default,bold +preprocessor=tag_yellow +regex=number_1 +operator=default +decorator=tag_yellow +other=default + +# Markup-type languages +#------------------------------------------------------------------------------- + +tag=tag_yellow +tag_unknown=tag +tag_end=tag +attribute=keyword_orange +attribute_unknown=attribute +value=string_green +entity=number_blue + +# Diff +#------------------------------------------------------------------------------- + +line_added=diff_added_green +line_removed=diff_removed_red +line_changed=preprocessor diff --git a/geany/.config/geany/geany.conf b/geany/.config/geany/geany.conf new file mode 100644 index 0000000..1e470c9 --- /dev/null +++ b/geany/.config/geany/geany.conf @@ -0,0 +1,217 @@ +[geany] +default_open_path= +cmdline_new_files=true +notebook_double_click_hides_widgets=false +tab_close_switch_to_mru=false +tab_pos_sidebar=2 +sidebar_pos=0 +symbols_sort_mode=0 +msgwin_orientation=1 +highlighting_invert_all=false +pref_main_search_use_current_word=true +check_detect_indent=true +detect_indent_width=true +use_tab_to_indent=true +pref_editor_tab_width=8 +indent_mode=2 +indent_type=0 +virtualspace=1 +autocomplete_doc_words=false +completion_drops_rest_of_word=false +autocompletion_max_entries=30 +autocompletion_update_freq=250 +color_scheme=darcula.conf +scroll_lines_around_cursor=0 +mru_length=10 +disk_check_timeout=30 +show_editor_scrollbars=true +brace_match_ltgt=false +use_gtk_word_boundaries=true +complete_snippets_whilst_editing=false +use_atomic_file_saving=false +gio_unsafe_save_backup=false +use_gio_unsafe_file_saving=true +keep_edit_history_on_reload=true +show_keep_edit_history_on_reload_msg=false +indent_hard_tab_width=8 +find_selection_type=0 +extract_filetype_regex=-\\*-\\s*([^\\s]+)\\s*-\\*- +replace_and_find_by_default=true +show_symbol_list_expanders=true +compiler_tab_autoscroll=true +allow_always_save=false +statusbar_template=line: %l / %L col: %c sel: %s %w %t %mmode: %M encoding: %e filetype: %f scope: %S +new_document_after_close=false +msgwin_status_visible=true +msgwin_compiler_visible=true +msgwin_messages_visible=true +msgwin_scribble_visible=true +documents_show_paths=true +sidebar_page=0 +pref_main_load_session=true +pref_main_project_session=true +pref_main_project_file_in_basedir=false +pref_main_save_winpos=true +pref_main_confirm_exit=false +pref_main_suppress_status_messages=false +switch_msgwin_pages=false +beep_on_errors=true +auto_focus=false +sidebar_symbol_visible=true +sidebar_openfiles_visible=true +editor_font=Hack 12 +tagbar_font=Hack 12 +msgwin_font=Hack 12 +show_notebook_tabs=true +show_tab_cross=true +tab_order_ltr=true +tab_order_beside=false +tab_pos_editor=2 +tab_pos_msgwin=0 +use_native_windows_dialogs=false +show_indent_guide=true +show_white_space=false +show_line_endings=false +show_markers_margin=true +show_linenumber_margin=true +long_line_enabled=true +long_line_type=0 +long_line_column=80 +long_line_color=#C2EBC2 +symbolcompletion_max_height=10 +symbolcompletion_min_chars=4 +use_folding=true +unfold_all_children=false +use_indicators=true +line_wrapping=false +auto_close_xml_tags=false +complete_snippets=true +auto_complete_symbols=true +pref_editor_disable_dnd=false +pref_editor_smart_home_key=true +pref_editor_newline_strip=false +line_break_column=80 +auto_continue_multiline=true +comment_toggle_mark=~ +scroll_stop_at_last_line=true +autoclose_chars=0 +pref_editor_default_new_encoding=UTF-8 +pref_editor_default_open_encoding=None +default_eol_character=2 +pref_editor_new_line=true +pref_editor_ensure_convert_line_endings=false +pref_editor_replace_tabs=false +pref_editor_trail_space=false +pref_toolbar_show=true +pref_toolbar_append_to_menu=false +pref_toolbar_use_gtk_default_style=true +pref_toolbar_use_gtk_default_icon=true +pref_toolbar_icon_style=0 +pref_toolbar_icon_size=0 +pref_template_developer=Tony Stark +pref_template_company= +pref_template_mail=xellos@N240BU +pref_template_initial=TS +pref_template_version=1.0 +pref_template_year=%Y +pref_template_date=%Y-%m-%d +pref_template_datetime=%d.%m.%Y %H:%M:%S %Z +context_action_cmd= +sidebar_visible=true +statusbar_visible=true +msgwindow_visible=true +fullscreen=false +scribble_text=Type here what you want, use it as a notice/scratch board +scribble_pos=57 +treeview_position=0 +msgwindow_position=944 +geometry=0;40;959;1019;1; +custom_date_format= + +[build-menu] +number_ft_menu_items=0 +number_non_ft_menu_items=0 +number_exec_menu_items=0 + +[search] +pref_search_hide_find_dialog=false +pref_search_always_wrap=false +pref_search_current_file_dir=true +find_all_expanded=true +replace_all_expanded=true +position_find_x=1291 +position_find_y=372 +position_replace_x=679 +position_replace_y=384 +position_fif_x=-1 +position_fif_y=-1 +fif_regexp=false +fif_case_sensitive=true +fif_match_whole_word=false +fif_invert_results=false +fif_recursive=false +fif_extra_options= +fif_use_extra_options=false +fif_files= +fif_files_mode=0 +find_regexp=false +find_regexp_multiline=false +find_case_sensitive=false +find_escape_sequences=false +find_match_whole_word=false +find_match_word_start=false +find_close_dialog=true +replace_regexp=false +replace_regexp_multiline=false +replace_case_sensitive=true +replace_escape_sequences=false +replace_match_whole_word=false +replace_match_word_start=false +replace_search_backwards=false +replace_close_dialog=false + +[plugins] +load_plugins=true +custom_plugin_path= +active_plugins=; + +[VTE] +send_cmd_prefix= +send_selection_unsafe=false +load_vte=true +font=Hack 12 +scroll_on_key=true +scroll_on_out=true +enable_bash_keys=true +ignore_menu_bar_accel=false +follow_path=false +run_in_vte=false +skip_run_script=false +cursor_blinks=false +scrollback_lines=500 +shell=/bin/zsh +colour_fore=#FFFFFF +colour_back=#000000 + +[tools] +terminal_cmd=x-terminal-emulator -e "/bin/sh %c" +browser_cmd=sensible-browser +grep_cmd=grep + +[printing] +print_cmd=lpr '%f' +use_gtk_printing=true +print_line_numbers=true +print_page_numbers=true +print_page_header=true +page_header_basename=false +page_header_datefmt=%c + +[project] +session_file= +project_file_path=/home/workspace/Projects + +[files] +recent_files= +recent_projects= +current_page=-1 diff --git a/ghc/.config/ghc/ghci.conf b/ghc/.config/ghc/ghci.conf new file mode 100644 index 0000000..5bcdb01 --- /dev/null +++ b/ghc/.config/ghc/ghci.conf @@ -0,0 +1,2 @@ +:set prompt "ghci> " +:set editor vim diff --git a/git/.git_template/hooks/ctags b/git/.git_template/hooks/ctags new file mode 100755 index 0000000..e46ae6c --- /dev/null +++ b/git/.git_template/hooks/ctags @@ -0,0 +1,8 @@ +#!/bin/sh + +# Create ctags into the git directory +set -e +dir="`git rev-parse --git-dir`" +trap 'rm -f "$dir/$$.tags"' EXIT +ctags --tag-relative=yes -R -f "$dir/$$.tags" --fields=+aimlS --languages=php --PHP-kinds=+cdfint-av --exclude=composer.phar --exclude=*Test.php --exclude=*phpunit* --exclude="\.git" +mv "$dir/$$.tags" "$dir/tags" diff --git a/git/.git_template/hooks/go-pre-commit b/git/.git_template/hooks/go-pre-commit new file mode 100755 index 0000000..0237b16 --- /dev/null +++ b/git/.git_template/hooks/go-pre-commit @@ -0,0 +1 @@ +golangci-lint run -p bugs,unused --disable=scopelint diff --git a/git/.git_template/hooks/post-checkout b/git/.git_template/hooks/post-checkout new file mode 100755 index 0000000..84f17ed --- /dev/null +++ b/git/.git_template/hooks/post-checkout @@ -0,0 +1,2 @@ +#!/bin/sh +.git/hooks/ctags >/dev/null 2>&1 & diff --git a/git/.git_template/hooks/post-merge b/git/.git_template/hooks/post-merge new file mode 100755 index 0000000..84f17ed --- /dev/null +++ b/git/.git_template/hooks/post-merge @@ -0,0 +1,2 @@ +#!/bin/sh +.git/hooks/ctags >/dev/null 2>&1 & diff --git a/git/.gitconfig b/git/.gitconfig new file mode 100644 index 0000000..fc266ec --- /dev/null +++ b/git/.gitconfig @@ -0,0 +1,45 @@ +[user] + name = Diogo Peralta Cordeiro + email = mail@diogo.site +[core] + editor = nvim + excludesfile = ~/.gitignore_global +[credential] + helper = cache --timeout=3600 +[alias] + ctags = !.git/hooks/ctags +[init] + templatedir = ~/.git_template +[log] + decorate = short +[color] + ui = true +[color "diff-highlight"] + oldNormal = red bold + oldHighlight = red bold 52 + newNormal = green bold + newHighlight = green bold 22 +[pull] + rebase = true +[push] + default = simple +[alias] + fixup = "!sh -c '(git diff-files --quiet || (echo Unstaged changes, please commit or stash with --keep-index; exit 1)) && COMMIT=$(git rev-parse $1) && git commit --fixup=$COMMIT && git rebase -i --autosquash $COMMIT~1' -" + lg = log --graph --abbrev-commit --decorate --date=relative --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)' --all +# Clone git repos with URLs like "gh:alexpearce/dotfiles" +[url "https://github.com/"] + insteadOf = "gh:" +[url "git@github.com:"] + pushInsteadOf = "gh:" +# Clone Arch User Repository repos with URLs like "aur:neomutt" +[url "https://aur.archlinux.org/"] + insteadOf = "aur:" +[merge] + tool = nvim +[mergetool "nvim"] + cmd = nvim -f -c \"Gdiff\" \"$MERGED\" +[rebase] + autosquash = true + instructionFormat = "(%an <%ae>) %s" +[status] + showUntrackedFiles = all diff --git a/git/.gitignore_global b/git/.gitignore_global new file mode 100644 index 0000000..37387c8 --- /dev/null +++ b/git/.gitignore_global @@ -0,0 +1,202 @@ +# Personal preferences # +######################## +.idea/ +.php_cs.cache + +# Compiled source # +################### +*.com +*.class +*.dll +*.exe +*.o +*.so + +# Packages # +############ +# it's better to unpack these files and commit the raw source +# git has its own built in compression methods +*.7z +*.dmg +*.gz +*.iso +*.jar +*.rar +*.tar +*.zip + +# Logs and databases # +###################### +*.log +*.sql +*.sqlite + +# OS generated files # +###################### +.DS_Store +.DS_Store? +._* +.Spotlight-V100 +.Trashes +ehthumbs.db +Thumbs.db + +# IDEs # +######## + +# Vim + +# Swap +[._]*.s[a-v][a-z] +[._]*.sw[a-p] +[._]s[a-rt-v][a-z] +[._]ss[a-gi-z] +[._]sw[a-p] + +# Session +Session.vim + +# Temporary +.netrwhist +*~ +# Auto-generated tag files +tags +tags.lock +tags.temp +GTAGS +GPATH +GRTAGS +# Persistent undo +[._]*.un~ + + +# Emacs + +# -*- mode: gitignore; -*- +*~ +\#*\# +/.emacs.desktop +/.emacs.desktop.lock +*.elc +auto-save-list +tramp +.\#* + +# Org-mode +.org-id-locations +*_archive + +# flymake-mode +*_flymake.* + +# eshell files +/eshell/history +/eshell/lastdir + +# elpa packages +/elpa/ + +# reftex files +*.rel + +# AUCTeX auto folder +/auto/ + +# cask packages +.cask/ +dist/ + +# Flycheck +flycheck_*.el + +# server auth directory +/server/ + +# projectiles files +.projectile + +# directory configuration +.dir-locals.el + +# network security +/network-security.data + + +# Netbeans + +**/nbproject/private/ +**/nbproject/Makefile-*.mk +**/nbproject/Package-*.bash +build/ +nbbuild/ +dist/ +nbdist/ +.nb-gradle/ + + +# JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm +# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 + +# User-specific stuff +.idea/**/workspace.xml +.idea/**/tasks.xml +.idea/**/usage.statistics.xml +.idea/**/dictionaries +.idea/**/shelf + +# Generated files +.idea/**/contentModel.xml + +# Sensitive or high-churn files +.idea/**/dataSources/ +.idea/**/dataSources.ids +.idea/**/dataSources.local.xml +.idea/**/sqlDataSources.xml +.idea/**/dynamic.xml +.idea/**/uiDesigner.xml +.idea/**/dbnavigator.xml + +# Gradle +.idea/**/gradle.xml +.idea/**/libraries + +# Gradle and Maven with auto-import +# When using Gradle or Maven with auto-import, you should exclude module files, +# since they will be recreated, and may cause churn. Uncomment if using +# auto-import. +# .idea/modules.xml +# .idea/*.iml +# .idea/modules + +# CMake +cmake-build-*/ + +# Mongo Explorer plugin +.idea/**/mongoSettings.xml + +# File-based project format +*.iws + +# IntelliJ +out/ + +# mpeltonen/sbt-idea plugin +.idea_modules/ + +# JIRA plugin +atlassian-ide-plugin.xml + +# Cursive Clojure plugin +.idea/replstate.xml + +# Crashlytics plugin (for Android Studio and IntelliJ) +com_crashlytics_export_strings.xml +crashlytics.properties +crashlytics-build.properties +fabric.properties + +# Editor-based Rest Client +.idea/httpRequests + +# Android studio 3.1+ serialized cache file +.idea/caches/build_file_checksums.ser diff --git a/git/.stow-local-ignore b/git/.stow-local-ignore new file mode 100644 index 0000000..093627d --- /dev/null +++ b/git/.stow-local-ignore @@ -0,0 +1,27 @@ +# GNU stow ignore .gitignore files by default, and so we modify the default +# ignore list, taken from +# http://www.gnu.org/software/stow/manual/html_node/Types-And-Syntax-Of-Ignore-Lists.html, +# to exclude the gitignore line + +# Comments and blank lines are allowed. + +RCS +.+,v + +CVS +\.\#.+ # CVS conflict files / emacs lock files +\.cvsignore + +\.svn +_darcs +\.hg + +\.git +# \.gitignore + +.+~ # emacs backup files +\#.*\# # emacs autosave files + +^/README.* +^/LICENSE.* +^/COPYING diff --git a/i3/.config/i3/config b/i3/.config/i3/config new file mode 100644 index 0000000..d6452c0 --- /dev/null +++ b/i3/.config/i3/config @@ -0,0 +1,470 @@ +# vim:filetype=i3 +# +# i3 config file +# +# Please see http://i3wm.org/docs/userguide.html for a complete reference! +# + +# Set mod key (Mod1=, Mod4=) +set $mod Mod4 + +# set default desktop layout (default is tiling) +# workspace_layout tabbed +# big monitors: +workspace_layout stacking +# small monitors: +#workspace_layout tabbed + +#################### +## Visual Section ## +#################### + +# Configure border style +#new_window pixel 1 +new_float normal + +# thin borders +hide_edge_borders both + +# change borders +bindsym $mod+u border none +bindsym $mod+y border pixel 1 +bindsym $mod+n border normal + +# Font for window titles. Will also be used by the bar unless a different font +# is used in the bar {} block below. +font pango:Hack, Fira Sans, FontAwesome, PowerlineSymbols 11 + +#-> Colors +# Use custom colors for black +set $black #282828 +set $darkblack #1d2021 +set $transparent #000000 + +set $bg-color #444444 +set $inactive-bg-color #2f343f +set $text-color #f3f4f5 +set $inactive-text-color #676E7D +set $urgent-bg-color #E53935 + +# window colors +# border background text indicator +client.focused $bg-color $bg-color $text-color #00ff00 +client.unfocused $inactive-bg-color $inactive-bg-color $inactive-text-color #00ff00 +client.focused_inactive $inactive-bg-color $inactive-bg-color $inactive-text-color #00ff00 +client.urgent $urgent-bg-color $urgent-bg-color $text-color #00ff00 + +################# +## Bar Section ## +################# +bar { + status_command i3blocks -c ~/.config/i3/i3blocks.conf + colors { + background $inactive-bg-color + separator #757575 + # border background text + focused_workspace $bg-color $bg-color $text-color + inactive_workspace $inactive-bg-color $inactive-bg-color $inactive-text-color + urgent_workspace $urgent-bg-color $urgent-bg-color $text-color + } + position bottom +} + +######################## +## Workspaces Section ## +######################## + +# Cheat: http://fontawesome.io/cheatsheet/ +# Terminal  +set $workspace1 "1 " +# Web, Downloads and Transfers      +set $workspace2 "2 " +# Work GUI dependent      +set $workspace3 "3 " +# Development       +set $workspace4 "4 " +set $workspace5 "5 " +set $workspace6 "6 " +set $workspace7 "7 " +set $workspace8 "8 " +# Mailing and Chatting  (icons for smartphone handling ->  ) +set $workspace9 "9 " +# Multimedia / Graphical Work    +set $workspace10 "10 " + +# Open applications on specific workspaces +assign [class="Thunderbird"] $workspace9 +assign [class="Rhythmbox"] $workspace10 +#assign [class="Firefox"] $workspace2 +assign [class="Atril"] $workspace3 +assign [class="TelegramDesktop"] $workspace9 +assign [class="Hexchat"] $workspace9 + +# Display the popup if it belongs to the fullscreen application only. This is +# the default and should be reasonable behavior for most users. +# Modes are smart|ignore|leave_fullscreen +popup_during_fullscreen smart + +# Open specific applications in floating mode +for_window [title="alsamixer"] floating enable border pixel 1 +for_window [class="Calamares"] floating enable border normal +for_window [class="Clipgrab"] floating enable +for_window [title="File Transfer*"] floating enable +for_window [class="^ThunarHome$"] floating enable +for_window [title="^File Operation Progress$"] floating enable +for_window [class="Galculator"] floating enable border pixel 1 +for_window [class="Qalculate-gtk"] floating enable border pixel 1 +for_window [class="GParted"] floating enable border normal +for_window [title="i3_help"] floating enable sticky enable border normal +for_window [class="Lightdm-gtk-greeter-settings"] floating enable +for_window [class="Lxappearance"] floating enable sticky enable border normal +for_window [class="Cinnamon-settings.py"] floating enable border normal +for_window [title="MuseScore: Play Panel"] floating enable +for_window [class="Nitrogen"] floating enable sticky enable border normal +for_window [class="Oblogout"] fullscreen enable +for_window [class="octopi"] floating enable +for_window [title="About Pale Moon"] floating enable +for_window [class="Pamac-manager"] floating enable +for_window [class="Pavucontrol"] floating enable +for_window [class="qt5ct"] floating enable sticky enable border normal +for_window [class="Qtconfig-qt4"] floating enable sticky enable border normal +for_window [class="Simple-scan"] floating enable border normal +for_window [class="(?i)System-config-printer.py"] floating enable border normal +for_window [class="Skype"] floating enable border normal +for_window [class="Thus"] floating enable border normal +for_window [class="Timeset-gui"] floating enable border normal +for_window [class="Xfburn"] floating enable +for_window [class="qTox"] floating enable +for_window [class="Gnome-system-monitor"] floating enable +for_window [class="Gpk-update-viewer"] floating enable +for_window [title="^Current Media Information$"] floating enable +for_window [class="^Xfrun4$"] floating enable +for_window [class="^Xfce4-appfinder$"] floating enable +no_focus [class="^Xfce4-notifyd$" ] +for_window [class="^cameraclient$"] floating enable +for_window [class="^blueman-manager$"] floating enable +for_window [class="^galculator$"] floating enable +for_window [class="^vlc$"] floating enable +for_window [class="Vlc"] floating enable +for_window [class="^Vlc$"] floating enable +for_window [class="^ffplay$"] floating enable +for_window [class="^mpv$"] floating enable +for_window [class="^Yad$"] floating enable border normal +for_window [class="^xpad$"] floating enable +for_window [class="^Rsvg-view-3$"] floating enable +for_window [class="^Volumeicon$"] floating enable +for_window [class="^Pavucontrol$"] floating enable +for_window [class="^Nm-connection-editor"] floating enable +for_window [class="Gdebi-gtk"] floating enable border normal +for_window [class="TelegramDesktop"] floating enable border normal +# GNUplot and Virtualbox dislike i3 although I tried +for_window [class="^gnuplot$"] floating enable +#for_window [class="(?i)virtualbox"] floating enable border normal + +# Gajim stuff +assign [class="^Gajim$"] → $workspace1 +for_window [class="^Gajim$" window_role="buddy_list"] layout splith, resize shrink width 0 px or 30 ppt, move right +for_window [class="^Gajim$" window_role="conversation"] resize grow width 0 px or 30 ppt, move left +bindsym $mod+i [class="^Gajim$" window_role="(?i)conversation"] focus; [class="^Gajim$"] focus + +########################## +## Key-Bindings Section ## +########################## + +#-> Workspace related + +# switch to workspace +bindsym $mod+1 workspace $workspace1 +bindsym $mod+2 workspace $workspace2 +bindsym $mod+3 workspace $workspace3 +bindsym $mod+4 workspace $workspace4 +bindsym $mod+5 workspace $workspace5 +bindsym $mod+6 workspace $workspace6 +bindsym $mod+7 workspace $workspace7 +bindsym $mod+8 workspace $workspace8 +bindsym $mod+9 workspace $workspace9 +bindsym $mod+0 workspace $workspace10 + +# move focused container to workspace +bindsym $mod+Shift+1 move container to workspace $workspace1 +bindsym $mod+Shift+2 move container to workspace $workspace2 +bindsym $mod+Shift+3 move container to workspace $workspace3 +bindsym $mod+Shift+4 move container to workspace $workspace4 +bindsym $mod+Shift+5 move container to workspace $workspace5 +bindsym $mod+Shift+6 move container to workspace $workspace6 +bindsym $mod+Shift+7 move container to workspace $workspace7 +bindsym $mod+Shift+8 move container to workspace $workspace8 +bindsym $mod+Shift+9 move container to workspace $workspace9 +bindsym $mod+Shift+0 move container to workspace $workspace10 + +# workspace back and forth (with/without active container) +workspace_auto_back_and_forth yes +bindsym $mod+b workspace back_and_forth +bindsym $mod+Shift+b move container to workspace back_and_forth; workspace back_and_forth + +# Cycle through active workspaces +bindsym $mod+Tab workspace next +bindsym $mod+Shift+Tab workspace prev + +# switch to workspace with urgent window automatically +for_window [urgent=latest] focus + +# sticky window +bindsym $mod+Shift+s sticky toggle + +# Make the currently focused window a scratchpad +bindsym $mod+Shift+minus move scratchpad + +# Show the first scratchpad window +bindsym $mod+minus scratchpad show + +#-> General Behavior + +# Use Mouse+$mod to drag floating windows to their wanted position +floating_modifier $mod + +# change focus (VIM like setup) +bindsym $mod+h focus left +bindsym $mod+j focus down +bindsym $mod+k focus up +bindsym $mod+l focus right + +# alternatively, you can use the cursor keys: +bindsym $mod+Left focus left +bindsym $mod+Down focus down +bindsym $mod+Up focus up +bindsym $mod+Right focus right + +# move focused window (VIM like setup) +bindsym $mod+Shift+h move left +bindsym $mod+Shift+j move down +bindsym $mod+Shift+k move up +bindsym $mod+Shift+l move right + +# alternatively, you can use the cursor keys: +bindsym $mod+Shift+Left move left +bindsym $mod+Shift+Down move down +bindsym $mod+Shift+Up move up +bindsym $mod+Shift+Right move right + +# kill focused window +bindsym $mod+Shift+q kill +# Alias for the command above +bindsym Mod1+F4 kill + +# split in horizontal orientation (VIM like setup) +bindsym $mod+comma split h + +# split in vertical orientation +bindsym $mod+v split v + +# enter fullscreen mode for the focused container +bindsym $mod+f fullscreen toggle + +# change container layout (stacked, tabbed, toggle split) +bindsym $mod+s layout stacking +bindsym $mod+w layout tabbed +bindsym $mod+e layout toggle split + +# toggle tiling / floating +bindsym $mod+Shift+space floating toggle + +# change focus between tiling / floating windows +bindsym $mod+space focus mode_toggle + +# focus the parent container +bindsym $mod+a focus parent + +# focus the child container +bindsym $mod+c focus child + +# reload the configuration file +bindsym $mod+Shift+c reload + +# restart i3 inplace (preserves your layout/session, can be used to upgrade i3) +bindsym $mod+Shift+r restart + +# Resize window (you can also use the mouse for that) +mode "resize" { + # These bindings trigger as soon as you enter the resize mode + # Pressing left will shrink the window’s width. + # Pressing right will grow the window’s width. + # Pressing up will shrink the window’s height. + # Pressing down will grow the window’s height. + #commented for VIM like setup + #bindsym j resize shrink width 5 px or 5 ppt + #bindsym k resize grow height 5 px or 5 ppt + #bindsym l resize shrink height 5 px or 5 ppt + #bindsym semicolon resize grow width 5 px or 5 ppt + bindsym $mod+h resize shrink width 5 px or 5 ppt + bindsym $mod+j resize grow height 5 px or 5 ppt + bindsym $mod+k resize shrink height 5 px or 5 ppt + bindsym $mod+l resize grow width 5 px or 5 ppt + + # same bindings, but for the arrow keys + bindsym Left resize shrink width 10 px or 10 ppt + bindsym Down resize grow height 10 px or 10 ppt + bindsym Up resize shrink height 10 px or 10 ppt + bindsym Right resize grow width 10 px or 10 ppt + + # exit resize mode: Enter or Escape + bindsym Return mode "default" + bindsym Escape mode "default" +} + +bindsym $mod+r mode "resize" + +#################### +## System Control ## +#################### + +#--> Volume Control +# Pulse Audio controls +bindsym XF86AudioRaiseVolume exec --no-startup-id ~/.config/i3/scripts/volume_level.sh up #increase sound volume +bindsym XF86AudioLowerVolume exec --no-startup-id ~/.config/i3/scripts/volume_level.sh down #decrease sound volume +bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute 0 toggle # mute sound +bindsym $mod+o exec pavucontrol + +# Sreen brightness controls +bindsym XF86MonBrightnessUp exec --no-startup-id xbright +90 # increase screen brightness +bindsym XF86MonBrightnessDown exec --no-startup-id xbright -90 # decrease screen brightness + +# Media player controls +#bindsym XF86AudioPause exec "playerctl play-pause || cmus-remote -u" +#bindsym $mod+backslash exec "sh -c 'i3-msg \"workspace $workspace10; exec kitty -e ~/.config/i3/scripts/cmus-play.sh \"'" +#bindsym XF86AudioNext exec "playerctl next || cmus-remote --next" +#bindsym XF86AudioPrev exec "playerctl previous || cmus-remote --prev" + +# Disable touchpad +bindsym XF86Sleep exec --no-startup-id ~/.config/i3/scripts/touchpad.sh + +######################## +## Start Applications ## +######################## + +bindsym $mod+Return exec i3-sensible-terminal +bindsym $mod+F3 exec kitty -e 'ranger' +bindsym Print exec xfce4-screenshooter +bindsym $mod+Ctrl+x --release exec --no-startup-id xkill +bindsym $mod+Shift+f exec firefox +bindsym $mod+Shift+m exec thunderbird +bindsym Ctrl+Shift+1 exec gnome-system-monitor +bindsym $mod+Shift+t exec pcmanfm +bindsym $mod+Shift+n exec netbeans + +################ +## Start Menu ## +################ + +# start dmenu (a program launcher) +bindsym Mod1+F2 exec --no-startup-id dmenu_run +#bindsym Mod1+F2 exec --no-startup-id j4-dmenu-desktop [--dmenu="dmenu -i"] [--term="i3-sensible-terminal"] + +# start j4-dmenu-desktop which only displays applications +# shipping a .desktop file. It is a wrapper around dmenu, so you need that +# installed. +bindsym $mod+d exec --no-startup-id i3-dmenu-desktop +#bindsym $mod+d exec --no-startup-id j4-dmenu-desktop [--dmenu="dmenu -i"] [--term="i3-sensible-terminal"] + +# launch categorized menu +bindsym $mod+z exec --no-startup-id ~/.config/i3/scripts/morc_menu.sh + +################ +## Power Menu ## +################ + +# lock +bindsym $mod+Shift+x exec light-locker-command -l +# alias for the command above +bindsym Ctrl+Mod1+l exec light-locker-command -l + +set $mode_system "System (l) lock, (e) logout, (s) suspend, (r) reboot, (Shift+s) shutdown" +mode $mode_system { + bindsym l exec --no-startup-id ~/.config/i3/scripts/exit_menu.sh lock, mode "default" + bindsym e exec --no-startup-id ~/.config/i3/scripts/exit_menu.sh logout, mode "default" + bindsym s exec --no-startup-id ~/.config/i3/scripts/exit_menu.sh suspend, mode "default" + bindsym r exec --no-startup-id ~/.config/i3/scripts/exit_menu.sh reboot, mode "default" + bindsym Shift+s exec --no-startup-id ~/.config/i3/scripts/exit_menu.sh poweroff, mode "default" + + # back to normal: Enter or Escape + bindsym Return mode "default" + bindsym Escape mode "default" +} +bindsym $mod+Pause mode $mode_system +#bindsym XF86Sleep exec --no-startup-id ~/.config/i3/scripts/exit_menu.sh suspend, mode "default" + +############################ +######## KEYBOARD ########## +############################ +exec --no-startup-id xmodmap /home/xellos/.Xmodmap & + +bindsym mod3+Tab exec --no-startup-id xdotool key Caps_Lock + +bindsym mod3+Escape exec --no-startup-id ~/.config/i3/scripts/exit_menu.sh poweroff + +############################ +## Autostart applications ## +############################ + +#-> System related +exec --no-startup-id nm-applet & +#exec --no-startup-id /usr/lib/policykit-1-gnome/polkit-gnome-authentication-agent-1 & +exec --no-startup-id package-update-indicator & +exec --no-startup-id xfsettingsd --sm-client-disable & +exec --no-startup-id xfce4-power-manager & +#exec --no-startup-id compton & +exec --no-startup-id light-locker & +exec --no-startup-id nitrogen --restore & + +#-> Session AutoStart +exec --no-startup-id ~/.config/i3/scripts/autostart.sh +#exec --no-startup-id parcellite & +#exec --no-startup-id blueman-applet & +#exec --no-startup-id redshift-gtk & +#exec --no-startup-id indicator-kdeconnect & +#exec --no-startup-id /usr/bin/nextcloud & +#exec --no-startup-id gajim & +#exec --no-startup-id hexchat --minimize=2 & +#exec --no-startup-id /opt/Telegram/Telegram -startintray & +#exec --no-startup-id /opt/spotlight.sh & + +# Display Mode +bindsym $mod+p mode "$mode_display" +set $mode_display Ext Screen: (z) VGA, (x) HDMI, (c) External OFF + +mode "$mode_display" { + bindsym z mode "$mode_display_vga" + bindsym x mode "$mode_display_hdmi" + bindsym c exec --no-startup-id xrandr --output VGA1 --off --output HDMI2 --off --output DP2-3 --off, mode "default" + + # Return to exit out, Escape to go back to external output + bindsym Return mode "default" + bindsym Escape mode "default" +} + +# VGA settings +set $mode_display_vga Ext Screen (VGA): (z) On, (x) Mirrored +# Set the shortcuts and what they do +mode "$mode_display_vga" { + bindsym z exec --no-startup-id xrandr --output VGA1 --auto --left-of LVDS1, mode "default" + bindsym x exec --no-startup-id xrandr --output VGA1 --auto --output LVDS1 --auto --same-as LVDS1, mode "default" + + # Return to exit out, Escape to go back to external output + bindsym Return mode "default" + bindsym Escape mode "$mode_display" +} + +# HDMI settings +set $mode_display_hdmi Ext Screen (HDMI): (z) On, (x) Mirrored +# Set the shortcuts and what they do +mode "$mode_display_hdmi" { + bindsym z exec --no-startup-id xrandr --output HDMI2 --auto --left-of LVDS1, mode "default" + bindsym x exec --no-startup-id xrandr --output HDMI2 --auto --output LVDS1 --auto --same-as HDMI2, mode "default" + bindsym c exec --no-startup-id xrandr --output HDMI2 --auto --off, mode "default" + + # Return to exit out, Escape to go back to external output + bindsym Return mode "default" + bindsym Escape mode "$mode_display" +} + +exec --no-startup-id ~/.config/i3/scripts/remaps.sh diff --git a/i3/.config/i3/i3blocks.conf b/i3/.config/i3/i3blocks.conf new file mode 100644 index 0000000..30a7a74 --- /dev/null +++ b/i3/.config/i3/i3blocks.conf @@ -0,0 +1,173 @@ +# i3blocks config file +# +# Please see man i3blocks for a complete reference! +# The man page is also hosted at http://vivien.github.io/i3blocks +# +# List of valid properties: +# +# align +# color +# command +# full_text +# instance +# interval +# label +# min_width +# name +# separator +# separator_block_width +# short_text +# signal +# urgent + +# Global properties +# +# The top properties below are applied to every block, but can be overridden. +# Each block command defaults to the script name to avoid boilerplate. +#command=/usr/lib/i3blocks/$BLOCK_NAME +command=/usr/share/i3blocks/$BLOCK_NAME +separator_block_width=15 +markup=none + +# Volume indicator +# +# The first parameter sets the step (and units to display) +# The second parameter overrides the mixer selection +# See the script for details. +[volume] +#label=VOL +label=♪ +instance=Master +#instance=PCM +interval=1 +signal=10 + +# Memory usage +# +# The type defaults to "mem" if the instance is not specified. +[memory] +label= +separator=true +interval=30 + +#[memory] +#label=SWAP +#instance=swap +#separator=false +#interval=30 + +# Disk usage +# +# The directory defaults to $HOME if the instance is not specified. +# The script may be called with a optional argument to set the alert +# (defaults to 10 for 10%). +[disk] +label= +interval=30 + +# Network interface monitoring +# +# If the instance is not specified, use the interface used for default route. +# The address can be forced to IPv4 or IPv6 with -4 or -6 switches. +# [iface] +# #instance=wlan0 +# color=#00FF00 +# interval=10 +# separator=false + +#[wifi] +#label= +# color=#CCCCFF +#instance=wlp2s0 +#interval=1 +#separator=true + +#[bandwidth] +#instance=wlp3s0 +#interval=5 + +# CPU usage +# +# The script may be called with -w and -c switches to specify thresholds, +# see the script for details. +[cpu_usage] +label= +interval=10 +min_width= 100% +separator=true + +#[load_average] +#interval=10 + +#[mail] +#color=#FFEEEE +#label= +#command=sh /home/sahib/bin/mail-count-new.sh +#interval=60 + +#[pacman] +#color=#FFEE00 +#label= +#command=date '+%Y-%m-%d %H:%M:%S' +#command=checkupdates | wc -l +#interval=60 + +# Battery indicator +# +# The battery instance defaults to 0. +[battery] +#color=#99FFCC +# ⚡ +label= +instance=0 +interval=30 + +# Date Time +# +[time] +#color=#FFCCCC +label= +command=date '+%Y-%m-%d %H:%M:%S' +#command=date '+%H:%M ' +interval=1 + + +# Generic media player support +# +# This displays "ARTIST - SONG" if a music is playing. +# Supported players are: spotify, vlc, audacious, xmms2, mplayer, and others. +#[mediaplayer] +#instance=clementine +#interval=5 +#signal=10 + +# OpenVPN support +# +# Support multiple VPN, with colors. +#[openvpn] +#interval=20 + +# Temperature +# +# Support multiple chips, though lm-sensors. +# The script may be called with -w and -c switches to specify thresholds, +# see the script for details. +[temperature] +label= +interval=10 + +# Key indicators +# +# Add the following bindings to i3 config file: +# +# bindsym --release Caps_Lock exec pkill -SIGRTMIN+11 i3blocks +# bindsym --release Num_Lock exec pkill -SIGRTMIN+11 i3blocks +#[keyindicator] +#instance=CAPS +#interval=once +#signal=11 + +#[keyindicator] +#instance=NUM +#interval=once +#signal=11 diff --git a/i3/.config/i3/i3status.conf b/i3/.config/i3/i3status.conf new file mode 100644 index 0000000..2970b36 --- /dev/null +++ b/i3/.config/i3/i3status.conf @@ -0,0 +1,86 @@ +# i3status configuration file. +# see "man i3status" for documentation. + +# It is important that this file is edited as UTF-8. +# The following line should contain a sharp s: +# ß +# If the above line is not correctly displayed, fix your editor first! + +general { + interval = 1 + colors = true + color_good="#FFFFFF" + color_degraded="#ffd75f" + color_bad="#d75f5f" +} + +order += "volume master" +order += "battery 0" +order += "disk /" +order += "disk /home" +order += "cpu_usage" +order += "load" +order += "wireless wlp4s0" +order += "ethernet enp0s25" +order += "tztime utc" +order += "tztime local" + +tztime local { + format = "  %Y-%m-%d %H:%M:%S" +} + +#tztime utc { +# format = "  UTC %H:%M " +# timezone = "Etc/UTC" +#} +# +#wireless wlp4s0 { +# format_up = "  %ip " +# color_good = "#FFFFFF" +# color_bad = "#FFFFFF" +# format_down = "" +#} +# +#ethernet enp0s25 { +# # if you use %speed, i3status requires the cap_net_admin capability +# format_up = "  %ip " +# color_good = "#FFFFFF" +# color_bad = "#FFFFFF" +# format_down = "" +#} + +disk "/home" { + format = "  ~ %avail " +} + +disk "/" { + format = "  / %avail " +} + +cpu_usage { + format = "  %usage " +} + +load { + format = "  %5min 5min " +} + +volume master { + format = " ♪ %volume " + format_muted = " ♪ %volume " + device = "default" + mixer = "Master" + mixer_idx = 0 +} + +battery 0 { + format = "%status %percentage " + #format_down = "  " + format_down = "" + status_chr = "  " + status_bat = "  " + status_unk = "  " + #last_full_capacity = true + status_full = "  " + path = "/sys/class/power_supply/BAT%d/uevent" +} diff --git a/i3/.config/i3/scripts/autostart.sh b/i3/.config/i3/scripts/autostart.sh new file mode 100755 index 0000000..2bfd9ae --- /dev/null +++ b/i3/.config/i3/scripts/autostart.sh @@ -0,0 +1,4 @@ +#!/bin/zsh +grep -rh Exec ~/.config/autostart | while read -r line ; do + ${line:5} & +done diff --git a/i3/.config/i3/scripts/cmus-play.sh b/i3/.config/i3/scripts/cmus-play.sh new file mode 100755 index 0000000..1900cab --- /dev/null +++ b/i3/.config/i3/scripts/cmus-play.sh @@ -0,0 +1,2 @@ +$( sleep 2 && cmus-remote -u ) & +cmus diff --git a/i3/.config/i3/scripts/exit_menu.sh b/i3/.config/i3/scripts/exit_menu.sh new file mode 100755 index 0000000..48aa512 --- /dev/null +++ b/i3/.config/i3/scripts/exit_menu.sh @@ -0,0 +1,41 @@ +#!/bin/dash + +case "$1" in + lock) + light-locker-command -l + #i3lock --color 475263 + ;; + logout) + while [ "$select" != "NO" ] && [ "$select" != "YES" ] + do + select=$(printf 'NO\nYES' | dmenu -nb '#2f343f' -nf '#f3f4f5' -sb '#9575cd' -sf '#f3f4f5' -fn '-*-*-medium-r-normal-*-*-*-*-*-*-100-*-*' -i -p "Are you sure you want to logout?") + [ -z "$select" ] && exit 0 + done + [ "$select" = "NO" ] && exit 0 + i3-msg exit + ;; + suspend) + while [ "$select" != "NO" ] && [ "$select" != "YES" ] + do + select=$(printf 'NO\nYES' | dmenu -nb '#2f343f' -nf '#f3f4f5' -sb '#9575cd' -sf '#f3f4f5' -fn '-*-*-medium-r-normal-*-*-*-*-*-*-100-*-*' -i -p "Are you sure you want to $1?") + [ -z "$select" ] && exit 0 + done + [ "$select" = "NO" ] && exit 0 + light-locker-command -l + systemctl "$1" + ;; + reboot|poweroff) + while [ "$select" != "NO" ] && [ "$select" != "YES" ] + do + select=$(printf 'NO\nYES' | dmenu -nb '#2f343f' -nf '#f3f4f5' -sb '#9575cd' -sf '#f3f4f5' -fn '-*-*-medium-r-normal-*-*-*-*-*-*-100-*-*' -i -p "Are you sure you want to $1?") + [ -z "$select" ] && exit 0 + done + [ "$select" = "NO" ] && exit 0 + systemctl "$1" + ;; + *) + echo "Usage: $0 {lock|logout|suspend|reboot|shutdown}" + exit 2 + esac + + exit 0 diff --git a/i3/.config/i3/scripts/lock.sh b/i3/.config/i3/scripts/lock.sh new file mode 100755 index 0000000..4cb2830 --- /dev/null +++ b/i3/.config/i3/scripts/lock.sh @@ -0,0 +1,11 @@ +icon="$HOME/.i3/lock.png" +img=/tmp/i3lock.png + +scrot $img +convert $img -scale 10% -scale 1000% $img + +# Blur image +#convert $img -blur 0x4 500% $img +# convert $img $icon -gravity center -composite $img + +i3lock -u -i $img diff --git a/i3/.config/i3/scripts/morc_menu.sh b/i3/.config/i3/scripts/morc_menu.sh new file mode 100755 index 0000000..0515b66 --- /dev/null +++ b/i3/.config/i3/scripts/morc_menu.sh @@ -0,0 +1,1010 @@ +#!/bin/bash +# morc_menu +# ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ +# ┃ Categorized menu of desktop applications ┃ +# ┃ ┃ +# ┃ This script simulates the functionality of an Openbox ┃ +# ┃ / Fluxbox style menu without requiring those window ┃ +# ┃ managers or associated dependencies. It was originally ┃ +# ┃ written for the i3 window manager, and using 'dmenu' as ┃ +# ┃ as its front-end, but it should also work in pretty much ┃ +# ┃ any X11 environment, and has been tested with ┃ +# ┃ alternative front-ends such as 'rofi', 'zenity' and ┃ +# ┃ 'yada'. ┃ +# ┃ ┃ +# ┃ This script generates menus based upon the presence of ┃ +# ┃ .desktop files in the system-wide definition folder ┃ +# ┃ /usr/share/applications and the user-local definition ┃ +# ┃ folder ${HOME}/.local/share/applications, per the ┃ +# ┃ xfreedesktop and linux LSB standards. Your system ┃ +# ┃ may have additional .desktop files in other locations. ┃ +# ┃ That seems to be the case for 'optional' items. Linux's ┃ +# ┃ expectation is that if a sysadmin would like entries for ┃ +# ┃ those items system-wide, the sysadmin would copy them ┃ +# ┃ to /usr/share/applications. If you want them for a ┃ +# ┃ specific user, place them in that user's ┃ +# ┃ ${HOME}/.local/share/applications folder. ┃ +# ┃ ┃ +# ┃ To find all system-wide desktop files: ┃ +# ┃ 'find /usr -type f -name "*.desktop"' ┃ +# ┃ ┃ +# ┃ Requirements: dmenu or rofi or zenity or yada ┃ +# ┃ ┃ +# ┃ Setup: ┃ +# ┃ If your distribution has a packaged version of this ┃ +# ┃ script, it is advisable to install that package and ┃ +# ┃ to follow any supplemental instructions of the ┃ +# ┃ packager. ┃ +# ┃ ┃ +# ┃ Manually installing the script involves five steps: ┃ +# ┃ Copy this script file to a convenient location, for ┃ +# ┃ example, somewhere on your ${PATH}; Make it executable ┃ +# ┃ by running 'chmod +x /path/to/file'; Optionally, copy ┃ +# ┃ the script's associated config file to ┃ +# ┃ ${HOME}/.config/morc_menu; Optionally, copy the ┃ +# ┃ script's associated man page to somehwere your system ┃ +# ┃ will recognize (run command 'manpath', and if you can ┃ +# ┃ not place it in any of those places, run 'man manpath' ┃ +# ┃ to see how to set $MANPATH), and; Create a keybinding ┃ +# ┃ for the script. An example keybinding for use with the ┃ +# ┃ i3 window manager would be to modify your ┃ +# ┃ ${HOME}/.i3/config file to include a statement in the ┃ +# ┃ form: ┃ +# ┃ bindsym $mod+z \ ┃ +# ┃ exec "${HOME}/path/to/morc_menu" ┃ +# ┃ ┃ +# ┃ Customization options: ┃ +# ┃ This script offers many ways to customize the menu's ┃ +# ┃ content and 'look' ('skin'). Refer to the script's ┃ +# ┃ man page and configuration file for details. ┃ +# ┃ ┃ +# ┃ Copyright ©2016, Boruch Baum ┃ +# ┃ ┃ +# ┃ This program is free software; you can redistribute it ┃ +# ┃ and/or modify it under the terms of the GNU General ┃ +# ┃ Public License aspublished by the Free Software ┃ +# ┃ Foundation; either version 3 of the License, or (at your ┃ +# ┃ option) any later version. ┃ +# ┃ ┃ +# ┃ This program is distributed in the hope that it will be ┃ +# ┃ useful, but WITHOUT ANY WARRANTY; without even the ┃ +# ┃ implied warranty of MERCHANTABILITY or FITNESS FOR A ┃ +# ┃ PARTICULAR PURPOSE. See the GNU General Public License ┃ +# ┃ for more details. ┃ +# ┃ ┃ +# ┃ You should have received a copy of the GNU General ┃ +# ┃ Public License along with this program; if not, write to ┃ +# ┃ the Free Software Foundation, Inc., 59 Temple Place, ┃ +# ┃ Suite 330, Boston, MA 02111-1307, USA ┃ +# ┃ ┃ +# ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛ + +# PROGRAMMING NOTE: "Do what I say, not what I do". I really do +# strongly oppose the general use of global variables, but in +# this script, something just came over me, and some part of my +# brain insisted. + +# TODO: hamdle arbitrary number of sub-menu levels +# TODO: do I want to set dynamic positioning for the display +# of error messages (ie. error_cmd) ? + +readonly SCRIPT_VERSION="Version 1.0, 2016-03-18" +# Exit codes +readonly \ + EC_NO_ERROR=0 \ + EC_TRUE=0 \ + EC_FALSE=1 \ + EC_BAD_PARAMETER=1 \ + EC_FILE_UNREADABLE=2 \ + EC_IMPOSSIBLE_TO_REACH_HERE=99 + +# Text constants +readonly \ + RETURN_TO_MAIN_MENU="Return to main menu" \ + VERSION_MESSAGE="\n\ +morc_menu\n\ + ${SCRIPT_VERSION}\n\ + Copyright ©2016 Boruch Baum\n\ + License GPLv3+: GNU GPL version 3 or later\n\ + \n\ + This is free software: you are free to change and redistribute it.\n\ + There is NO WARRANTY, to the extent permitted by law.\n" \ + USAGE_MESSAGE="\n\ +Categorized menu\n\ +Usage: morc_menu [ [txt|xml] [in_file] ]\n\ + [build [usr|loc|xml [in_file ] ] [out_file] ]\n\ + [show [categories|desired|files] ]\n\ +\n\ + When run with no parameters, displays a dynamically-created,\n\ + navigable, searchable and selectable menu of installed GUI\n\ + applications.\n\ +\n\ + Options:\n\ + txt Display a static menu from a txt file.\n\ + xml Display a static menu from an xml file.\n\ + build Build a static menu definition file, in text format.\n\ + build usr Only use data from /usr/share/applications/\n\ + build loc Only use data from ~/.local/share/applications/\n\ + build xml Only use data from an xml file\n\ + show Print to STDOUT the selected sub-option\n\ + categories A complete list, from /usr/share/applications/\n\ + desired Just those categories to be displayed\n\ + files A list of existing .desktop files\n\ +\n\ + no-sys Ignore the system-wide pre-built morc_menu txt\n\ + definition file. This option must precede the\n\ + above options\n\ +\n\ + conf=[\"path/to/file\"|none]\n\ + Over-ride the default conf file settings. This\n\ + option must be listed first.\n" \ + ABOUT_MESSAGE="\ +morc_menu\n\ + A highly customizable script to display your programs,\n\ + organized by categories. For details see 'man morc_menu'\n" + + +# Field delimiter for our menu definition file. The choice of +# delimiter turned out to be trickier than expected. OTOH, we need +# something that won't be confusing to some form of shell expansion +# or other misinterpretation. OTOH, we need something that won't +# ever possibly be confused with the first or last character of an +# element. OTOH, we need something that will sort prior to all +# alphabetical characters so that favorites, which have no first +# (category) field show up first. For example: underscores fail, +# because they sort after capital letters. +readonly delim="---" + +# Favorites category identifier: This is a modification, in order make +# the format of all records uniform in format, and to alleviate any +# sorting issues related to having records beginning with a delimiter. +# We choose a string for the 'Favorites' that will sort at the +# beginning. +readonly fav="000" + +# I/O files and paths +readonly menu_file="morc_menu" +[ -d "${MORC_MENU_DIR}" ] \ +&& readonly default_dir="${MORC_MENU_DIR}" \ +|| readonly default_dir="${HOME}/.config/morc_menu/" +readonly default_path="${default_dir}${menu_file}" +readonly \ + system_txt_path="/etc/morc_menu.txt" \ + usr_shar_app_path="/usr/share/applications/" \ + loc_shar_app_path="${HOME}/.local/share/applications/" \ + conf_path=( "/usr/share/morc_menu/" "/usr/local/share/morc_menu/" "${HOME}/.local/share/morc_menu/" "${default_dir}" ) + +# Settings for positioning menus + # those defined only inside the script + declare -i \ + main_menu_lines=1 \ + sub_menu_lines=1 \ + menu_lines=1 + # those subject to modification by conf files + declare use_mouse_position=FALSE + declare -i \ + max_main_line_len=0 \ + max_sub_line_len=0 \ + avg_char_width=9 \ + avg_err_char_width=10 \ + menu_width=350 \ + err_menu_width=350 \ + line_height=20 # Both 'menu_width' and 'line_height' are measured + # in pixels. Until we learn how to directly measure + # them, we need to set them manually by trial and + # error. + # those subject to modification by either conf files or the script + declare -i \ + x_position=300 \ + y_position=20 + +# Settings subject to modification at the command line +declare \ + conf_name="morc_menu_v1.conf" \ + only_conf_file="" \ + ignore_system_txt="FALSE" + +# Settings of dmenu, subject to modification by conf files +# refer to conf file for examples +menu_cmd="dmenu -i -l MENU_LINES " +error_cmd="dmenu -i -l 40 -nb red -nf black -fn DejaVu" + +# Settings of morc_menu, subject to modification by conf files +menu_prefix=" [menu]: " +menu_suffix=" >" +align_suffix="TRUE" +desired_categories="Favorites Settings Development Documentation Education System Network Utility Graphics Office AudioVideo" +declare -A category_aliases=( [Utility]=Accessories [AudioVideo]=Multimedia [Network]=Internet ) +unwanted_names=( ) +unwanted_execs=( ) +unwanted_specifics=( ) +max_num_backups=5 +exclude_about="FALSE" +exclude_from_static="FALSE" +exclude_from_dynamic="TRUE" +add_to_static="FALSE" +add_to_dynamic="TRUE" +# Variable 'apply_exclusions' should not exist in the configuration +# file. It is set by the script based upon variables +# exclude_from_static and exclude_from_dynamic, so that a single +# variable can be used by script functions to toggle this feature. A +# corresponding variable for add_to_static and add_to_dynamic was not +# necessary. +apply_exclusions="FALSE" + +# Philosophically, these next should NOT be declared globally +# in_file, out_file: paths reading/writing static menus +declare in_file="" +declare out_file="" +# Lists and their indices: +# list[*] - the data +# ii - the recurringly restarted working index into list +declare -a list +declare -i ii=0 +# max_cat_len: used to right-pad the categories with spaces so we can +# have nicely vertically aligned menu suffixes +declare -i max_cat_len=0 +# response: text returned from the chosen menu front-end (eg. 'dmenu') +declare response="" + +function version_message() { + echo -e "${VERSION_MESSAGE}" + } + +function usage_message() { + echo -e "${USAGE_MESSAGE}" + } + +function input_file_error() { + if [ ${avg_err_char_width} -gt 0 ] ; then + in_file_width=$(( ${avg_err_char_width} * ${#in_file} )) + [ ${err_menu_width} -lt ${in_file_width} ] \ + && err_menu_width=${in_file_width} + fi + error_cmd="${error_cmd/MENU_WIDTH/${err_menu_width}}" + printf "%s\n" \ + "ERROR: morc_menu" \ + "could not read input file" \ + "${in_file}" \ + | ${error_cmd} + exit $EC_FILE_UNREADABLE + } + +function parse_external_conf_file () { + while read -r || [[ -n "${REPLY}" ]] ; do + # The purpose of this case statement is to ignore attempts by + # external configuration files to set variables needed to be + # protected by the script. Originally all variables were accounted + # for in this list (thank you emacs!), but for efficiency I + # removed read-only variables (the resulting errors won't abort + # the script). + case ${REPLY} in + external_skin_definition_file=*) ;& + x_position=*) ;& + y_position=*) ;& + menu_width=*) ;& + err_menu_width=*) ;& + line_height=*) ;& + main_menu_lines=*) ;& + sub_menu_lines=*) ;& + menu_lines=*) ;& + use_mouse_position=*) ;& + max_main_line_len=*) ;& + max_sub_line_len=*) ;& + avg_char_width=*) ;& + avg_err_char_width=*) ;& + menu_cmd=*) ;& + error_cmd=*) ;& + menu_prefix=*) ;& + menu_suffix=*) ;& + align_suffix=*) ;& + desired_categories=*) ;& + category_aliases=*) ;& + unwanted_names=*) ;& + unwanted_execs=*) ;& + unwanted_specifics=*) ;& + max_num_backups=*) ;& + exclude_about=*) ;& + ignore_system_txt=*) ;& + additional_entries=*) ;& + exclude_from_static=*) ;& + exclude_from_dynamic=*) ;& + add_to_static=*) ;& + add_to_dynamic=*) ;& + apply_exclusions=*) ;& + in_file=*) ;& + out_file=*) ;& + list=*) ;& + ii=*) ;& + max_cat_len=*) ;& + response=*) + ;; + *) + # basic sanity test to only read lines that seem like variable + # assignments, to ensure that an assignment takes place, and to + # prevent simple code-injection + [[ "${REPLY}" =~ ^\ *[[:alpha:]]+[[:alnum:]_-]*=.*$ ]] \ + && eval "${REPLY%%=*}"="${REPLY#*=}" + ;; + esac + done < "$1" + } + +function parse_one_conf_file() { + while read -r || [[ -n "${REPLY}" ]] ; do + case ${REPLY} in + external_skin_definition_file=*) + eval "${REPLY%%=*}"="${REPLY#*=}" + [ -r "${external_skin_definition_file}" ] \ + && parse_external_conf_file "${external_skin_definition_file}" +# || { +# error_cmd="${error_cmd/MENU_WIDTH/${err_menu_width}}" +# printf "%s\n" \ +# "ERROR: morc_menu" \ +# "could not read file" \ +# "${external_skin_definition_file}" \ +# "referred to by file" $1 \ +# "press to continue" \ +# | ${error_cmd} +# } + ;; + use_mouse_position=*) ;& + menu_prefix=*) ;& + menu_suffix=*) ;& + align_suffix=*) ;& + menu_cmd=*) ;& + error_cmd=*) ;& + desired_categories=*) ;& + category_aliases=*) ;& + unwanted_names=*) ;& + unwanted_execs=*) ;& + unwanted_specifics=*) ;& + additional_entries=*) ;& + exclude_from_static=*) ;& + exclude_from_dynamic=*) ;& + add_to_static=*) ;& + add_to_dynamic=*) ;& + apply_exclusions=*) ;& + max_num_backups=*) ;& + exclude_about=*) ;& + ignore_system_txt=*) + eval "${REPLY%%=*}"="${REPLY#*=}" + ;; + x_position=*) ;& + y_position=*) ;& + avg_char_width=*) ;& + avg_err_char_width=*) ;& + menu_width=*) ;& + err_menu_width=*) ;& + line_height=*) + if [ "${REPLY#*=}" -lt 0 ] ; then + eval "${REPLY%%=*}"=0 + else + eval "${REPLY%%=*}"="${REPLY#*=}" + fi + ;; + esac + done < "$1" + } + +function parse_conf_files() { + if [ -n "${only_conf_file}" ] ; then + [[ "${only_conf_file}" == "none" ]] && return + if [ ! -r "${only_conf_file}" ] ; then + in_file="${only_conf_file}" + input_file_error + else + parse_one_conf_file "${only_conf_file}" + fi + else + for this_conf_path in "${conf_path[@]}" ; do + [ -r "${this_conf_path}${conf_name}" ] \ + && parse_one_conf_file "${this_conf_path}${conf_name}" + done + fi + # If the user doesn't have a personal copy of the configuration file + # in ${HOME}/.config/morc_menu, put it there. + if [ ! -e "${default_dir}${conf_name}" ] ; then + [ ! -e "${default_dir}" ] \ + && mkdir -p "${default_dir}" + for (( ii=(( ${#conf_path[@]}-1 )); ii-- ; )) ; do + if [ -r "${conf_path[ $ii ]}${conf_name}" ] ; then + cp "${conf_path[ $ii ]}${conf_name}" "${default_dir}" + break + fi + done + ii=0 + fi + } + +function pad_right() { + # This function is a late-entrant, and I'm not sure I really want + # the extra fluff. The idea is to support a vertically aligned + # suffix (eg. 'menu_suffix=" >"') to sub-menu labels to indicate + # that they aren't executables. For this we now have function + # shar_app keep a running tally of the longest sub-menu category + # string, so if this function gets removed, remove that snippet as + # well. This function is designed to align flush to the longest + # entry, so if you want whitespace, add it in variable + # 'menu_suffix'. + # If there's no suffix, there's no reason to pad right + [ -z "${menu_suffix}" ] || [[ "${align_suffix}" != "TRUE" ]] && return + list_len=${#list[@]} + for (( ii=0; $ii-$list_len; ii++ )) ; do + e_cat="${list[$ii]%%${delim}*}" + e_rest="${list[$ii]#*${delim}}" + printf -v "list[$ii]" "%-*s%s%s" ${max_cat_len} \ + "${e_cat}" "${delim}" "${e_rest}" + done + } + +function position_menu_at_mouse_point() { + # function must receive two parameters + # $1 = the number of lines in the menu + # $2 = the pixel width of the longest menu line + type -f xdotool wattr lsw &> /dev/null || return + menu_height=$(( $1 * ${line_height} )) + # the following assigns values to $X and $Y + eval $(xdotool getmouselocation --shell) + root_window_id=$(lsw -r) + monitor_width=$(wattr w ${root_window_id}) + monitor_height=$(wattr h ${root_window_id}) + maxx=$(( ${monitor_width} - $2 )) + maxy=$(( ${monitor_height} - ${menu_height} )) + x_position=${X} + [ ${x_position} -gt ${maxx} ] && x_position=${maxx} + y_position=${Y} + [ ${y_position} -gt ${maxy} ] && y_position=${maxy} + } + +function backup_a_file() { + # if there's no file to backup, we're done + [ ! -f $1 ] \ + && return ${EC_NO_ERROR} + # check for a positive integer + [[ "${max_num_backups}" =~ ^[0-9]+$ ]] \ + || return ${EC_BAD_PARAMETER} # TODO: log this error! + # if nothing matches pattern "$1_*" we want null + shopt -s nullglob + backup_file_list=( $1_* ) + if [ ${max_num_backups} -eq 0 ] ; then + # if the user just now reduced the value to zero + # then remove all existing backups + [ -n "${backup_file_list[*]}" ] \ + && rm "${backup_file_list[@]}" + return ${EC_NO_ERROR} + elif [ -n "${backup_file_list[*]}" ] ; then + final=$(( ${#backup_file_list[@]}-1 )) + if cmp -s "$1" "${backup_file_list[$final]}" ; then + touch "${backup_file_list[$final]}" + else + mv $1 $1"_$(printf '%(%y-%m-%d-%T)T')" + fi + rm_these=$(( ${final}+1-${max_num_backups} )) + while [ ${rm_these} -gt 0 ] ; do + # This works because bash claims that it produces pathname + # expansion in an alphabetically sorted list, so we will be + # removing the oldest backup files, starting from the newest + # back to the oldest + rm "${backup_file_list[ $((--rm_these)) ]}" + done + else + mv $1 $1"_$(printf '%(%y-%m-%d-%T)T')" + fi + } + +function build_sort() { + printf "%s\n" "${list[@]}" \ + | LC_COLLATE=POSIX sort --ignore-case --unique + } + +function build_xml() { + menu_text="${fav}" # They put Favorites at the head, with no category + item_text="" + executable="" + while read -r || [[ -n "${REPLY}" ]] ; do + if [[ "$REPLY" =~ ^\ *\/}" + fi + done < "${in_file}" + list_len=$((--ii)) + } + +function is_this_entry_unwanted() { + # compare categories, names and executables against the config + # file's black-list. + category="$1" + name="$2" + exec_="$3" + for unwanted in "${unwanted_names[@]}" ; do + [[ "${name}" =~ ^"${unwanted}"$ ]] \ + && return $EC_TRUE + done + for unwanted in "${unwanted_execs[@]}" ; do + [[ "${exec_}" =~ ^"${unwanted}"$ ]] \ + && return $EC_TRUE + done + for unwanted in "${unwanted_specifics[@]}" ; do + [[ "${category}${delim}${name}${delim}${exec_}" == "${unwanted}" ]] \ + && return $EC_TRUE + done + return $EC_FALSE + } + +function shar_app() { + # Process the .desktop files in a particular directory ($1) + in_path="$1" + # $2, if existing, should only have a value "local", meaning + # that we are processing a user-local folder, + # eg. ${HOME}/.local/share/applications + for in_file in ${in_path}*.desktop ; do + [ -r "${in_file}" ] || continue + # We don't want to set the index ${ii} here because we want + # to accumulate data in $list[] from multiple calls to this + # function. + # ii=0 + declare -c name="" # option '-c' auto-capitalizes future content + exec_="" + categories="" + terminal="" + nodisplay="" + while read -r || [[ -n "${REPLY}" ]] ; do + case ${REPLY} in + # The following -z checks became necessary when it was observed + # that some .desktop files had multiple and alternative + # secondary forms + Name=*) + [ -z "${name}" ] \ + && { + name="${REPLY#Name=}" + name="${name/% /}" + } + ;; + Exec=*) + [ -z "${exec_}" ] \ + && { + exec_="${REPLY#Exec=}" + exec_="${exec_// %[fFuU]}" + } + ;; + Categories=*) + [ -z "${categories}" ] \ + && categories="${REPLY#Categories=}" + ;; + Terminal=*) + [ -z "${terminal}" ] \ + && terminal="${REPLY#Terminal=}" + ;; + NoDisplay=*) + [ -z "${nodisplay}" ] \ + && nodisplay="${REPLY#NoDisplay=}" + [[ "${nodisplay}" == "true" ]] \ + && continue 2 + # The 'continue 2' aborts processing this '.desktop' file + ;; + esac + done < "${in_file}" + # 1] if a .desktop definition applies itself to more than + # one category, create an entry for each. + # 2] if the definition's category has been aliased, apply + # that now + # 3] if the definition specifies a cli environment, apply + # that now (prefix "terminal -e ") + # 4] if the sysadmin has added "Favorites" to the list of + # categories, treat this as a "Favorite" + for category in ${categories//;/ } ; do + if [[ ${desired_categories} =~ ${category} ]] ; then + [[ "${apply_exclusions}" = "TRUE" ]] \ + && is_this_entry_unwanted "${category}" "${name}" "${exec_}" \ + && continue + [ -n "${category_aliases[${category}]}" ] \ + && category=${category_aliases[${category}]} + [[ "${category}" == "Favorites" ]] \ + || [ -z "${category}" ] \ + && category="${fav}" + [[ ${terminal} == "true" ]] \ + && exec_="terminal -e ${exec_}" + # keep track here of the maximum length of the categories so + # we can later easily right pad them with spaces in order to + # enable vertically aligned menu suffixes. + this_cat_len=${#category} + [ ${this_cat_len} -gt ${max_cat_len} ] \ + && max_cat_len=${this_cat_len} + list[ $((ii++)) ]="${category}${delim}${name}${delim}${exec_}" + fi + done + if [[ "$2" == "local" ]] \ + && [ -z "${categories}" ] ; then + # Well, the user put it here for a reason, + # so treat it as a favorite + [[ ${terminal} == "true" ]] \ + && exec_="terminal -e ${exec_}" + list[ $((ii++)) ]="${fav}${delim}${name}${delim}${exec_}" + fi + done + } + +function build_usr_shar_app() { + if [[ "${ignore_system_txt}" == "TRUE" ]] ; then + shar_app "${usr_shar_app_path}" + return + fi + in_file="${system_txt_path}" + load_txt_file "${apply_exclusions}" + } + +function build_loc_shar_app() { + # Yes, at this point, this function is nothing more than a useless + # and wasteful redirect, but its here for readability to keep + # parallel sounding function names for similar purposes. + shar_app "${loc_shar_app_path}" "local" + } + +function add_custom_entries() { + # Had we wanted to be kind and charitable to users who erred in + # formatting the array 'additional_entries', we would perform sanity + # checks here, exclude improperly formatted entries, and possibly + # warn the user. + list=( "${list[@]}" "${additional_entries[@]}" ) + } + +function build_all() { + [[ "${exclude_from_static}" == "TRUE" ]] \ + && apply_exclusions="TRUE" \ + || apply_exclusions="FALSE" + build_usr_shar_app + build_loc_shar_app + [[ "${add_to_static}" == "TRUE" ]] \ + && add_custom_entries + } + +function display_a_menu() { + # function must receive three parameters: + # $1 = number of lines in the menu + # $2 = maximum number of character in a menu line. + # this is ignored if $avg_char_width == 0 + # $3 = pre-formatted menu text + [ ${avg_char_width} -gt 0 ] \ + && menu_width=$(( ${avg_char_width} * $2 )) + [[ "${use_mouse_position}" == "TRUE" ]] \ + && position_menu_at_mouse_point $1 ${menu_width} + display_cmd="${menu_cmd/X_POSITION/${x_position}}" + display_cmd="${display_cmd/Y_POSITION/${y_position}}" + display_cmd="${display_cmd/MENU_LINES/$1}" + display_cmd="${display_cmd/MENU_WIDTH/${menu_width}}" + # prompt the user and receive the response + # for the main menu + response=$( echo -e "$3" | ${display_cmd} ) + } + +function exec_about() { + display_a_menu "11" "63" "${ABOUT_MESSAGE}${VERSION_MESSAGE}" + exit EC_NO_ERROR + } + +function produce_menu() { + # produce the menu, prompt the user and launch the request: + # + prepare an initial display of favorites and submenu labels + # + if a submenu label is selected, prepare its own display + # + allow the user to navigate back to the main menu or to quit + # + determine the executable to launch, and do so + # + # Include here a menu entry 'about' the script instead + # of in 'shar_app' when building the menu because we want + # the run-time, not build-time version and other info. + [[ "${exclude_about}" != "TRUE" ]] \ + && list[ $(( list_len++ )) ]="${fav}${delim}About${delim}" + # prepare an initial display of favorites and submenu labels + dmenu_item="" + # the first menu element is always... + main_menu_text="Quit this menu" + [ $avg_char_width -gt 0 ] \ + && max_main_line_len=14 + category="" + for (( ii=0; $ii-$list_len; ii++ )) ; do + if [ -z "${list[$ii]}" ] ; then + : + elif [[ ${list[$ii]} =~ ^${fav}.*$ ]] ; then + # 'favorite' item, one not under a menu + dmenu_item="${list[$ii]#*${delim}}" + dmenu_item="${dmenu_item/${delim}*/}" + main_menu_text="${main_menu_text}\n${dmenu_item}" + let $(( main_menu_lines++ )) + [ ${avg_char_width} -gt 0 ] \ + && [ ${#dmenu_item} -gt ${max_main_line_len} ] \ + && max_main_line_len=${#dmenu_item} + else + # sub-menu label + dmenu_item=${list[$ii]/${delim}*/} + if [[ "${category}" != "${dmenu_item}" ]] ; then + category=${dmenu_item} + # add sub-menu prefix and suffix + dmenu_item="${dmenu_item/#/${menu_prefix}}" + dmenu_item="${dmenu_item/%/${menu_suffix}}" + main_menu_text="${main_menu_text}\n${dmenu_item}" + let $(( main_menu_lines++ )) + [ ${avg_char_width} -gt 0 ] \ + && [ ${#dmenu_item} -gt ${max_main_line_len} ] \ + && max_main_line_len=${#dmenu_item} + fi + fi + done + # compose a shell command to prompt the user + response="${RETURN_TO_MAIN_MENU}" + while [[ "${response}" == "${RETURN_TO_MAIN_MENU}" ]] ; do + display_a_menu ${main_menu_lines} ${max_main_line_len} "${main_menu_text}" + if [[ "${response}" =~ ^"${menu_prefix}".*"${menu_suffix}"$ ]] ; then + # prepare a sub-menu display + # + # In order to identify the selection, we must + # first remove sub-menu prefix and suffix + response="${response:${#menu_prefix}}" + response="${response/%${menu_suffix}}" + dmenu_item="" + # the first sub-menu element is always... + sub_menu_text="${RETURN_TO_MAIN_MENU}" + sub_menu_lines=1 + [ $avg_char_width -gt 0 ] \ + && max_sub_line_len=19 + for (( ii=0; $ii-$list_len; ii++ )) ; do + if [[ "${list[$ii]}" =~ ^${response}${delim}.*${delim}.*$ ]] ; then + dmenu_item="${list[$ii]/${response}${delim}/}" + dmenu_item="${dmenu_item/${delim}*/}" + sub_menu_text="${sub_menu_text}\n${dmenu_item}" + let $(( sub_menu_lines++ )) + [ $avg_char_width -gt 0 ] \ + && [ ${#dmenu_item} -gt ${max_sub_line_len} ] \ + && max_sub_line_len=${#dmenu_item} + fi + done + display_a_menu ${sub_menu_lines} ${max_sub_line_len} "${sub_menu_text}" + fi + done + # determine the executable to launch + [[ "${response}" == "About" ]] \ + && exec_about # exits morc_memu there + # we need to escape all occurrences of any regex character that + # might be in the menu text. Unfortunately, bash doesn't have + # group referencing so each character needs its own statement + # (still much more efficient than calling an external program). + response=${response//\\/\\\\} + response=${response//\(/\\\(} + response=${response//\)/\\\)} + response=${response//\[/\\\[} + response=${response//\]/\\\]} + response=${response//\{/\\\{} + response=${response//\}/\\\}} + response=${response//\./\\\.} + response=${response//\*/\\\*} + response=${response//\+/\\\+} + response=${response//\?/\\\?} + response=${response//\^/\\\^} + response=${response//\$/\\\$} + for (( ii=0; $ii-$list_len; ii++ )) ; do + if [[ ${list[$ii]} =~ ^.*${delim}${response}${delim}.*$ ]] ; then + executable="${list[$ii]##*${delim}}" + break + fi + done + # launch! + echo "categorized menu:" + echo -e "response = ${response}\nexecutable = ${executable}" + exec $executable + } + +function load_txt_file() { + # $1 = variable 'exclude_from_static' or 'exclude_from_dynamic', or + # their aggregator variable 'apply_exclusions' + if [[ "$1" != "TRUE" ]] ; then + exec 3< "${in_file}" + mapfile -u3 list + list_len=$(( ${#list[@]} )) + else + while read -r || [[ -n "${REPLY}" ]] ; do + a_cat="${REPLY%%${delim}*}" + a_name="${REPLY#*${delim}}" + a_name="${a_name/${delim}*/}" + a_exec="${REPLY##*${delim}}" + is_this_entry_unwanted "${a_cat}" "${a_name}" "${a_exec}" \ + || list[ $((ii++)) ]="${REPLY}" + done < "${in_file}" + list_len=${ii} + fi + } + +function load_and_produce_menu_from_txt() { + [ ! -r ${in_file} ] \ + && input_file_error + load_txt_file "${exclude_from_static}" + if [[ "${add_to_static}" != "TRUE" ]] ; then + produce_menu + else + add_custom_entries + pad_right + # re-sort and de-duplicate + build_sort \ + | { + mapfile list + list_len=${#list[*]} + produce_menu + } + fi + } + +function show_categories() { + grep Categories /usr/share/applications/*.desktop \ + | cut -d"=" -f2 \ + | sed 's/;/\n/g' \ + | LC_COLLATE=POSIX sort --ignore-case --unique + } + +function show_desktop_file_names() { + in_path="/usr/share/applications/" + for in_file in ${in_path}*.desktop ; do + in_file=${in_file##*\/} + echo ${in_file:0:-8} + done } + +function show_desired() { + printf "\ndesired categories:\n" + { for category in ${desired_categories} ; do + if [ -n "${category_aliases[${category}]}" ] ; then + alias_msg="|(will display as \"${category_aliases[${category}]}\")" + else + alias_msg="" + fi + printf " %s%s\n" ${category} "${alias_msg}" + done + } | column -s"|" -t + echo "" + } + +# ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ +# ┃ MAIN: The script begins running here ┃ +# ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛ +shopt -s nocasematch # do not be case sensitive +if [[ "$1" =~ ^(-)?(-)?(usage|help)$ ]] ; then + usage_message + exit $EC_NO_ERROR +elif [[ "$1" =~ ^(-)?(-)?(version)$ ]] ; then + version_message + exit $EC_NO_ERROR + fi +if [[ "$1" =~ ^conf=* ]] ; then + only_conf_file="${1#*=}" + shift + fi +parse_conf_files +if [[ "$1" == "no-sys" ]] ; then + ignore_system_txt="TRUE" + shift +elif [ ! -r "${system_txt_path}" ] ; then + ignore_system_txt="TRUE" + fi +if [[ $# == 0 ]] ; then + [[ "${exclude_from_dynamic}" == "TRUE" ]] \ + && apply_exclusions="TRUE" \ + || apply_exclusions="FALSE" + build_usr_shar_app + build_loc_shar_app + [[ "${add_to_dynamic}" == "TRUE" ]] \ + && add_custom_entries + pad_right + build_sort \ + | { + mapfile list + list_len=${#list[*]} + produce_menu + } + exit $EC_NO_ERROR + fi +case "$1" in +xml) + [ -z "$2" ] \ + && in_file=${default_path}".xml" \ + || in_file="$2" + [ ! -r "${in_file}" ] \ + && input_file_error + build_xml + produce_menu + exit $EC_NO_ERROR + ;; +txt) + # this option is only necessary to save the user + # from typing in the default filepath + [ -z "$2" ] \ + && in_file=${default_path}".txt" \ + || in_file="$2" + load_and_produce_menu_from_txt + exit $EC_NO_ERROR + ;; +build) + if [ -z "$2" ] ; then + out_file=${default_path}".txt" + build_all + else + case $2 in + usr) + [ -z "$3" ] \ + && out_file=${default_path}"_usr.txt" \ + || out_file="$3" + ignore_system_txt="TRUE" + [[ "${exclude_from_static}" == "TRUE" ]] \ + && apply_exclusions="TRUE" \ + || apply_exclusions="FALSE" + build_usr_shar_app + ;; + loc) + [ -z "$3" ] \ + && out_file=${default_path}"_usr.txt" \ + || out_file="$3" + out_file=${default_path}"_loc.txt" + build_loc_shar_app + ;; + xml) + [ -z "$3" ] \ + && in_file=${default_path}".xml" \ + || in_file="$3" + [ ! -r "${in_file}" ] \ + && input_file_error + [ -z "$4" ] \ + && out_file=${default_path}"_xml.txt" \ + || out_file="$4" + build_xml + ;; + *) + out_file="$2" + build_all + ;; + esac # End of sub-cases of option 'build' + fi + pad_right + [ ! -d "${default_dir}" ] \ + && mkdir -p "${default_dir}" + backup_a_file "${out_file}" + build_sort > "${out_file}" + exit $EC_NO_ERROR + ;; +show) + case $2 in + categories) + show_categories + exit $EC_NO_ERROR + ;; + desired) + show_desired + exit $EC_NO_ERROR + ;; + files) + show_desktop_file_names + exit $EC_NO_ERROR + ;; + *) + usage_message + exit $EC_BAD_PARAMETER + ;; + esac + ;; # End of sub-cases of option 'show' +*) # presume file name and request is to produce a static menu + in_file="$1" + load_and_produce_menu_from_txt + exit $EC_NO_ERROR + ;; +esac +echo "ERROR: It should be impossible to reach this message" +exit $EC_IMPOSSIBLE_TO_REACH_HERE + +# TODO +# 1) add examples for zenity, rofi, yada in config file +# 2) more testing of parsing of external config files! diff --git a/i3/.config/i3/scripts/remaps.sh b/i3/.config/i3/scripts/remaps.sh new file mode 100755 index 0000000..add5373 --- /dev/null +++ b/i3/.config/i3/scripts/remaps.sh @@ -0,0 +1,8 @@ +#!/bin/bash + +# This script is called by i3 on startup. + +# maps caps lock to escape for vim (and ctrl) +setxkbmap -option 'caps:ctrl_modifier' && xcape -e 'Caps_Lock=Escape' & + +xmodmap ~/.Xmodmap diff --git a/i3/.config/i3/scripts/touchpad.sh b/i3/.config/i3/scripts/touchpad.sh new file mode 100755 index 0000000..941602d --- /dev/null +++ b/i3/.config/i3/scripts/touchpad.sh @@ -0,0 +1,11 @@ +#!/bin/dash + +device="SynPS/2 Synaptics TouchPad" +state=$(xinput list-props "$device" | grep "Device Enabled" | grep -o "[01]$") + +if [ "$state" = '1' ] +then + xinput disable "$device" +else + xinput enable "$device" +fi diff --git a/i3/.config/i3/scripts/urxvtc.sh b/i3/.config/i3/scripts/urxvtc.sh new file mode 100755 index 0000000..8f2c511 --- /dev/null +++ b/i3/.config/i3/scripts/urxvtc.sh @@ -0,0 +1,6 @@ +#!/bin/sh +urxvtc "$@" +if [ $? -eq 2 ]; then + urxvtd -q -o -f + urxvtc "$@" +fi diff --git a/i3/.config/i3/scripts/volume_level.sh b/i3/.config/i3/scripts/volume_level.sh new file mode 100755 index 0000000..ee2cb05 --- /dev/null +++ b/i3/.config/i3/scripts/volume_level.sh @@ -0,0 +1,17 @@ +#!/bin/dash +# Pulse Audio controls + +if [ "$( pacmd dump | awk '$1 == "set-sink-mute" {m[$2] = $3} $1 == "set-default-sink" {s = $2} END {print m[s]}')" = 'yes' ] +then + pactl set-sink-mute 0 toggle +fi + +case "$1" in + up) + pactl set-sink-volume 0 +5% #increase sound volume + ;; + down) + pactl set-sink-volume 0 -5% #decrease sound volume + ;; +esac + diff --git a/kitty/.config/kitty/kitty.conf b/kitty/.config/kitty/kitty.conf new file mode 100644 index 0000000..c308897 --- /dev/null +++ b/kitty/.config/kitty/kitty.conf @@ -0,0 +1,248 @@ +# vim:fileencoding=utf-8:ft=conf + +# Font family. You can also specify different fonts for the +# bold/italic/bold-italic variants. By default they are derived automatically, +# by the OSes font system. Setting them manually is useful for font families +# that have many weight variants like Book, Medium, Thick, etc. For example: +# font_family Operator Mono Book +# bold_font Operator Mono Thick +# bold_italic_font Operator Mono Medium +# font_family Input Mono +# font_family Fantasque Sans Mono +# font_family Hack +# font_family Fira Code Retina +italic_font auto +bold_font auto +bold_italic_font auto + +# Font size (in pts) +# font_size 18.0 +#font_size 12.0 +font_size 11 + +foreground #959dcb +background #292d3e +selection_foreground #eceef0 +selection_background #607c8b +url_color #82aaff + +# black +color0 #434759 +color8 #434758 + +# red +color1 #f07178 +color9 #ff8b92 + +# green +color2 #c3e88d +color10 #ddffa7 + +# yellow +color3 #ffcb6b +color11 #ffe585 + +# blue +color4 #82aaff +color12 #9cc4ff + +# magenta +color5 #c792ea +color13 #e1acff + +# cyan +color6 #89ddff +color14 #a3f7ff + +# white +color7 #d0d0d0 +color15 #fefefe + +adjust_line_height 1 + +# The cursor shape can be one of (block, beam, underline) +cursor_shape block + +# The interval (in seconds) at which to blink the cursor. Set to zero to +# disable blinking. +cursor_blink_interval 0.5 + +# Stop blinking cursor after the specified number of seconds of keyboard inactivity. Set to +# zero or a negative number to never stop blinking. +cursor_stop_blinking_after 15.0 + +# Number of lines of history to keep in memory for scrolling back +scrollback_lines 2000 + +# Program with which to view scrollback in a new window. The scrollback buffer is passed as +# STDIN to this program. If you change it, make sure the program you use can +# handle ANSI escape sequences for colors and text formatting. +scrollback_pager less +G -R + +# Wheel scroll multiplier (modify the amount scrolled by the mouse wheel) +wheel_scroll_multiplier 5.0 + +# The interval between successive clicks to detect double/triple clicks (in seconds) +click_interval 0.5 + +# Characters considered part of a word when double clicking. In addition to these characters +# any character that is marked as an alpha-numeric character in the unicode +# database will be matched. +select_by_word_characters :@-./_~?&=%+# + +# Hide mouse cursor after the specified number of seconds of the mouse not being used. Set to +# zero or a negative number to disable mouse cursor hiding. +mouse_hide_wait 3.0 + +# The enabled window layouts. A comma separated list of layout names. The special value * means +# all layouts. The first listed layout will be used as the startup layout. +# For a list of available layouts, see the file layouts.py +enabled_layouts * + +# If enabled, the window size will be remembered so that new instances of kitty will have the same +# size as the previous instance. If disabled, the window will initially have size configured +# by initial_window_width/height, in pixels. +remember_window_size no +initial_window_width 640 +initial_window_height 400 + +# Delay (in milliseconds) between screen updates. Decreasing it, increases fps +# at the cost of more CPU usage. The default value yields ~100fps which is more +# that sufficient for most uses. +# repaint_delay 10 +repaint_delay 10 + +# Delay (in milliseconds) before input from the program running in the terminal +# is processed. Note that decreasing it will increase responsiveness, but also +# increase CPU usage and might cause flicker in full screen programs that +# redraw the entire screen on each loop, because kitty is so fast that partial +# screen updates will be drawn. +input_delay 3 + +# Visual bell duration. Flash the screen when a bell occurs for the specified number of +# seconds. Set to zero to disable. +visual_bell_duration 0.0 + +# Enable/disable the audio bell. Useful in environments that require silence. +enable_audio_bell no +window_alert_on_bell no + +# The modifier keys to press when clicking with the mouse on URLs to open the URL +open_url_modifiers ctrl+shift + +# The program with which to open URLs that are clicked on. The special value "default" means to +# use the operating system's default URL handler. +open_url_with default + +url_color #26BBD9 +url_style curly + +# The value of the TERM environment variable to set +term xterm-kitty + +# The width (in pts) of window borders. Will be rounded to the nearest number of pixels based on screen resolution. +window_border_width 0 + +window_margin_width 15 + +window_padding_width 5.0 + +# The color for the border of the active window +active_border_color #ffffff + +# The color for the border of inactive windows +inactive_border_color #cccccc + +inactive_text_alpha 1.0 +tab_bar_edge top +tab_separator " ┇" + +# Tab-bar colors +active_tab_foreground #000 +active_tab_background #eee +inactive_tab_foreground #444 +inactive_tab_background #999 + +# Key mapping +# For a list of key names, see: http://www.glfw.org/docs/latest/group__keys.html +# For a list of modifier names, see: http://www.glfw.org/docs/latest/group__mods.html +# You can use the special action no_op to unmap a keyboard shortcut that is +# assigned in the default configuration. + +# Clipboard +map super+v paste_from_clipboard +map ctrl+shift+s paste_from_selection +map super+c copy_to_clipboard +map shift+insert paste_from_selection + +# Scrolling +map ctrl+shift+up scroll_line_up +map ctrl+shift+down scroll_line_down +map ctrl+shift+k scroll_line_up +map ctrl+shift+j scroll_line_down +map ctrl+shift+page_up scroll_page_up +map ctrl+shift+page_down scroll_page_down +map ctrl+shift+home scroll_home +map ctrl+shift+end scroll_end +map ctrl+shift+h show_scrollback + +# Window management +map super+n new_os_window +map super+w close_window +map ctrl+shift+enter new_window +map ctrl+shift+] next_window +map ctrl+shift+[ previous_window +map ctrl+shift+f move_window_forward +map ctrl+shift+b move_window_backward +map ctrl+shift+` move_window_to_top +map ctrl+shift+1 first_window +map ctrl+shift+2 second_window +map ctrl+shift+3 third_window +map ctrl+shift+4 fourth_window +map ctrl+shift+5 fifth_window +map ctrl+shift+6 sixth_window +map ctrl+shift+7 seventh_window +map ctrl+shift+8 eighth_window +map ctrl+shift+9 ninth_window +map ctrl+shift+0 tenth_window + +# Tab management +map ctrl+shift+right next_tab +map ctrl+shift+left previous_tab +map ctrl+shift+t new_tab +map ctrl+shift+q close_tab +map ctrl+shift+l next_layout +map ctrl+shift+. move_tab_forward +map ctrl+shift+, move_tab_backward + +# Miscellaneous +map ctrl+shift+up increase_font_size +map ctrl+shift+down decrease_font_size +map ctrl+shift+backspace restore_font_size + +# Symbol mapping (special font for specified unicode code points). Map the +# specified unicode codepoints to a particular font. Useful if you need special +# rendering for some symbols, such as for Powerline. Avoids the need for +# patched fonts. Each unicode code point is specified in the form U+. You can specify multiple code points, separated by commas +# and ranges separated by hyphens. symbol_map itself can be specified multiple times. +# Syntax is: +# +# symbol_map codepoints Font Family Name +# +# For example: +# +#symbol_map U+E0A0-U+E0A2,U+E0B0-U+E0B3 PowerlineSymbols +hide_window_decorations no +macos_option_as_alt no + +# Change the color of the kitty window's titlebar on macOS. A value of "system" +# means to use the default system color, a value of "background" means to use +# the default background color and finally you can use an arbitrary color, such +# as #12af59 or "red". +macos_titlebar_color background + +shell /bin/zsh +close_on_child_death no +allow_remote_control no +term xterm-256color diff --git a/mariadbcli/.my.cnf b/mariadbcli/.my.cnf new file mode 100644 index 0000000..d5b8230 --- /dev/null +++ b/mariadbcli/.my.cnf @@ -0,0 +1,9 @@ +[mysql] +# Set the pager +pager=less -inSFX + +# Sets a custom prompt. Example: `user@localhost (my_database) > ` +prompt = "\\U (\\d) >\\ " + +# By most databases I work on are UTF8 so I default to UTF8 in the console +default-character-set = utf8mb4 diff --git a/mariadbcli/.myclirc b/mariadbcli/.myclirc new file mode 100644 index 0000000..6fa0fa1 --- /dev/null +++ b/mariadbcli/.myclirc @@ -0,0 +1,139 @@ +# vi: ft=dosini +[main] + +# Enables context sensitive auto-completion. If this is disabled the all +# possible completions will be listed. +smart_completion = True + +# Multi-line mode allows breaking up the sql statements into multiple lines. If +# this is set to True, then the end of the statements must have a semi-colon. +# If this is set to False then sql statements can't be split into multiple +# lines. End of line (return) is considered as the end of the statement. +multi_line = False + +# Destructive warning mode will alert you before executing a sql statement +# that may cause harm to the database such as "drop table", "drop database" +# or "shutdown". +destructive_warning = True + +# log_file location. +log_file = ~/.mycli.log + +# Default log level. Possible values: "CRITICAL", "ERROR", "WARNING", "INFO" +# and "DEBUG". "NONE" disables logging. +log_level = INFO + +# Log every query and its results to a file. Enable this by uncommenting the +# line below. +# audit_log = ~/.mycli-audit.log + +# Timing of sql statments and table rendering. +timing = True + +# Table format. Possible values: ascii, double, github, +# psql, plain, simple, grid, fancy_grid, pipe, orgtbl, rst, mediawiki, html, +# latex, latex_booktabs, textile, moinmoin, jira, vertical, tsv, csv. +# Recommended: ascii +table_format = ascii + +# Syntax coloring style. Possible values (many support the "-dark" suffix): +# manni, igor, xcode, vim, autumn, vs, rrt, native, perldoc, borland, tango, emacs, +# friendly, monokai, paraiso, colorful, murphy, bw, pastie, paraiso, trac, default, +# fruity. +# Screenshots at http://mycli.net/syntax +syntax_style = default + +# Keybindings: Possible values: emacs, vi. +# Emacs mode: Ctrl-A is home, Ctrl-E is end. All emacs keybindings are available in the REPL. +# When Vi mode is enabled you can use modal editing features offered by Vi in the REPL. +key_bindings = vi + +# Enabling this option will show the suggestions in a wider menu. Thus more items are suggested. +wider_completion_menu = True + +# MySQL prompt +# \D - The full current date +# \d - Database name +# \h - Hostname of the server +# \m - Minutes of the current time +# \n - Newline +# \P - AM/PM +# \p - Port +# \R - The current time, in 24-hour military time (0–23) +# \r - The current time, standard 12-hour time (1–12) +# \s - Seconds of the current time +# \t - Product type (Percona, MySQL, MariaDB) +# \u - Username +prompt = "\t \u@\h:\d> " +prompt_continuation = "-> " + +# Skip intro info on startup and outro info on exit +less_chatty = False + +# Use alias from --login-path instead of host name in prompt +login_path_as_host = False + +# Cause result sets to be displayed vertically if they are too wide for the current window, +# and using normal tabular format otherwise. (This applies to statements terminated by ; or \G.) +auto_vertical_output = True + +# keyword casing preference. Possible values "lower", "upper", "auto" +keyword_casing = auto + +# disabled pager on startup +enable_pager = True + +# Custom colors for the completion menu, toolbar, etc. +[colors] +# Completion menus. +Token.Menu.Completions.Completion.Current = "bg:ansired ansiwhite bold" +Token.Menu.Completions.Completion = "bg:ansigray ansiwhite" +Token.Menu.Completions.Meta.Current = "bg:ansiyellow ansigray" +Token.Menu.Completions.Meta = "bg:ansigray ansiwhite" +Token.Menu.Completions.MultiColumnMeta = "bg:ansigray ansiwhite" +Token.Menu.Completions.ProgressButton = "bg:ansiblack" +Token.Menu.Completions.ProgressBar = "bg:ansiblue" +Token.SelectedText = "ansiwhite bg:ansiblue" +Token.SearchMatch = "ansiwhite bg:ansiblue" +Token.SearchMatch.Current = "ansiwhite bg:ansired" +Token.Toolbar = "ansiwhite" +Token.Toolbar.Off = "ansigray" +Token.Toolbar.On = "bg:ansiblack ansiwhite" +Token.Toolbar.Search = noinherit bold +Token.Toolbar.Search.Text = nobold +Token.Toolbar.System = noinherit bold +Token.Toolbar.Arg = noinherit bold +Token.Toolbar.Arg.Text = nobold +Token.Toolbar.Transaction.Valid = "bg:ansiblack ansigreen bold" +Token.Toolbar.Transaction.Failed = "bg:ansiblack ansired bold" + +# not documented +# see https://github.com/dagwieers/pygments/blob/master/pygments/styles/default.py +Token.Keyword = "ansigreen bold" +Token.String = "ansired" +Token.String.Other = "ansired" +Token.Number = "ansired" + +# Favorite queries. +[favorite_queries] + +# ADD INDEX +# $1 table name +# $2 index name +ikey = '''ALTER TABLE `$1` +ADD INDEX `IDX_$1_$2` (`$2` ASC)''' + +# ADD FOREIGN KEY +# $1 table name +# $2 index name +# $3 refererance table name name +fkey = '''ALTER TABLE `$1` +ADD CONSTRAINT `FK_$1_$2` + FOREIGN KEY (`$2`) + REFERENCES `$3` (`$2`) + ON DELETE NO ACTION + ON UPDATE NO ACTION''' + +# Use the -d option to reference a DSN. +[alias_dsn] +# example_dsn = mysql://[user[:password]@][host][:port][/dbname] diff --git a/neovim/.config/nvim/UltiSnips/go_perso.snippets b/neovim/.config/nvim/UltiSnips/go_perso.snippets new file mode 100644 index 0000000..fd2b07b --- /dev/null +++ b/neovim/.config/nvim/UltiSnips/go_perso.snippets @@ -0,0 +1,126 @@ +# functions test +snippet /^test/ "Main function" r +func Test_${1:Func}(t *testing.T) { + ${0:${VISUAL}} +} +endsnippet + +snippet tt "table-driven tests" +func Test_${1:Func}(t *testing.T) { + testCases := []struct { + name string + expected ${2} + ${3} + }{ + { + name: "happy case", + expected: ${4}, + ${5}, + }, + } + + for _, tc := range testCases { + t.Run(tc.name, func(t *testing.T) { + actual := ${7}$1(${6:params}) + + if $8 { + t.Errorf("Expected %v, actual %v", tc.expected, actual) + } + }) + } +} +endsnippet + +snippet tte "table-driven tests with errors" +func Test_${1:Func}(t *testing.T) { + testCases := []struct { + name string + expected ${2} + ${3} + wantErr bool + }{ + { + name: "happy case", + expected: ${4} + ${5}, + wantErr: false, + }, + } + + for _, tc := range testCases { + t.Run(tc.name, func(t *testing.T) { + actual, err := ${7}$1(${6:params}) + if (err != nil) != tc.wantErr { + t.Errorf("Error '%v' even if wantErr is %t", err, tc.wantErr) + return + } + + if tc.wantErr == false && $8 { + t.Errorf("Expected %v, actual %v", tc.expected, actual) + } + }) + } +} +endsnippet + +snippet err "Basic error handling" b +if err != nil { + ${1} +} +endsnippet + +snippet errr "Basic error handling return err" b +if err != nil { + return err +} +${1} +endsnippet + +snippet errr, "Basic error handling return err with another return" b +if err != nil { + return ${1:nil}, err +} +endsnippet + +snippet errw "Return wrapped error" b +if err != nil { + return errors.Wrap(err, "${1}") +} +endsnippet + +snippet errwf "Basic error handling with wrapping format" b +if err != nil { + return errors.Wrapf(err, "${1}", ${2}) +} +endsnippet + +snippet errab "Basic abort with error from Gin Context" b +if err != nil { + _ = c.AbortWithError(http.StatusInternalServerError, err) + return +} +endsnippet + +snippet errabwf "Basic abort with error from Gin Context" b +if err != nil { + err = errors.Wrapf(err, "${1}", ${2}) + c.AbortWithError(http.StatusInternalServerError, err) + return +} +endsnippet + +snippet /^package/ "Package declaration" b +// Package $1 provides ... +package ${1:main} +$2 +endsnippet + +snippet switcht "Switch type statement" b +switch ${1:expression}${1/(.+)/ /} := ${2:var}.(Type) { +case ${0:int} +} +endsnippet + +snippet e: "Variable declaration := with error" b +${1:name}, err:= ${0:value} +endsnippet diff --git a/neovim/.config/nvim/UltiSnips/javascript_perso.snippets b/neovim/.config/nvim/UltiSnips/javascript_perso.snippets new file mode 100644 index 0000000..a6c4004 --- /dev/null +++ b/neovim/.config/nvim/UltiSnips/javascript_perso.snippets @@ -0,0 +1,11 @@ +snippet faf "Fat arrow function (faf)" w +${1:function_name} = (${2:argument}) => { + ${VISUAL}$0 +} +endsnippet + +snippet afaf "Anonymous fat arrow function (faf)" w +(${1:argument}) => { + ${VISUAL}$0 +} +endsnippet diff --git a/neovim/.config/nvim/UltiSnips/php_perso.snippets b/neovim/.config/nvim/UltiSnips/php_perso.snippets new file mode 100644 index 0000000..19d5895 --- /dev/null +++ b/neovim/.config/nvim/UltiSnips/php_perso.snippets @@ -0,0 +1,154 @@ +snippet ns "namespace declaration" b +namespace ${1:`!p +abspath = os.path.abspath(path) +m = re.search(r'[A-Z].+(?=/)', abspath) +if m: + snip.rv = m.group().replace('/', '\\') +`}; +endsnippet + +snippet class "Class declaration template with strict mode" b +addSql(" + $0 +"); +endsnippet + +snippet classst "Symlex test class declaration" b + Settings (01-settings) +" -> Theme (02-theme) +" -> Keymap (10-keymap-general, 11-keymap-rtl) +" -> File type specific (31-file-type.vim) +" +""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +" ================================================== +" Basic Settings +" ================================================== +let mapleader="\" " Change the leader to be a space +set cmdheight=2 " Make command line two lines high +set scrolloff=7 " Set 7 lines to the cursor - when moving vertically using j/k +set sidescrolloff=5 " Have some context around the current line always on screen +set cursorline " Have a line indicate the cursor location (slow) +set autoindent " Always set autoindenting on +set smartindent " Set smart indent +set showcmd " Display incomplete commands +set ruler " Show the cursor position all the time +set rulerformat=%30(%=\:b%n%y%m%r%w\ %l,%c%V\ %P%) +set number norelativenumber " Show line numbers +set ttyfast " Smoother changes +set modeline " Last lines in document sets vim mode +set shortmess=atIc " Abbreviate messages +set nostartofline " Don't jump to first character when paging +set backspace=indent,eol,start +set matchpairs+=<:> " Show matching <> (html mainly) as well +set showmatch " Show matching brackets when text indicator is over them +set matchtime=3 " How many tenths of a second to blink when matching brackets +set showmatch " Show matching braces, somewhat annoying... +set history=1000 " Sets how many lines of history VIM has to remember +set showmode " Show the default mode text (e.g. -- INSERT -- below the statusline) +set timeout ttimeoutlen=50 +set updatetime=300 " Smaller updatetime for CursorHold & CursorHoldI +set signcolumn=yes + +set whichwrap+=<,>,h,l,[,] +set fileformats=unix,dos,mac +set encoding=utf-8 +set completeopt=longest,menuone " Preview mode causes flickering +set clipboard+=unnamedplus " Share the system clipboard + +set splitright " Splits to the right +autocmd VimResized * wincmd = " Automatically equalize splits when Vim is resized + +set wildmenu " show list instead of just completing +set wildmode=list:longest,full " command completion, list matches, then longest common part, then all. +set completeopt=menu " Just show the menu upon completion (faster) + +syntax on +set synmaxcol=200 " Syntax highlight only the first 200 chars" +filetype plugin on +filetype indent plugin on + +set colorcolumn=80 +"set colorcolumn=125 " Comfortable _and_ Github's line length + +if has('linebreak') " Break indent wrapped lines + set breakindent + let &showbreak = '↳ ' + set cpo+=n +end + +" Linebreak on 500 characters +set lbr +set tw=80 + + +" ================================================== +" Turn persistent undo on means that you can undo +" even when you close a buffer/VIM +" ================================================== +set directory=~/.nvim_runtime/temp_dirs/swap/ +set backupdir=~/.nvim_runtime/temp_dirs/backup/ +try + set undodir=~/.nvim_runtime/temp_dirs/undodir + set undofile +catch +endtry + + +" ================================================== +" Status line +" ================================================== +" Always show the status line +set laststatus=2 + +" Format the status line +set statusline=\ %{HasPaste()}%F%m%r%h\ %w\ \ CWD:\ %r%{getcwd()}%h\ \ \ Line:\ %l\ \ Column:\ %c + +" Returns true if paste mode is enabled +function! HasPaste() + if &paste + return 'PASTE MODE ' + endif + return '' +endfunction + + +" ================================================== +" Use terminal title as an output +" ================================================== +set title +set titleold="Terminal" +set titlestring=%F + + +" ================================================== +" No annoying sound on errors +" ================================================== +set noerrorbells +set novisualbell +set t_vb= +set tm=500 + +" Properly disable sound on errors on MacVim +if has("gui_macvim") + autocmd GUIEnter * set vb t_vb= +endif + + +" ================================================== +" Tab expanded to 8 spaces +" ================================================== +set tabstop=8 " numbers of spaces of tab character +set shiftwidth=8 " numbers of spaces to (auto)indent +set expandtab " Tab to spaces by default +set softtabstop=8 +set smarttab " Be smart when using tabs ;) + + +" ================================================== +" Search settings +" ================================================== +set hlsearch " highlight searches +set incsearch " do incremental searching +set ignorecase " ignore case when searching +set infercase " smarter completions that will be case aware when ignorecase is on +set smartcase " if searching and search contains upper case, make case sensitive search +set list listchars=trail:»,tab:»- +set fillchars+=vert:\ + + +" ================================================== +" No modelines for security +" ================================================== +set modelines=0 +set nomodeline + + +" ================================================== +" Trailing whitespace handling +" ================================================== + +" Highlight end of line whitespace. +highlight WhitespaceEOL ctermbg=red guibg=red +match WhitespaceEOL /\s\+$/ + + +" ================================================== +" Further settings +" ================================================== + +" Try to display very long lines, rather than showing @ +set display+=lastline + +" show trailing whitespace as -, tabs as >- +set listchars=tab:>-,trail:- +set list + +" Live substitution +set inccommand=split + +if has("nvim") + set laststatus=1 +endif + +" Ignore compiled files +set wildignore=*.o,*~,*.pyc +if has("win16") || has("win32") + set wildignore+=.git\*,.hg\*,.svn\* +else + set wildignore+=*/.git/*,*/.hg/*,*/.svn/*,*/.DS_Store +endif + +" Don't redraw while executing macros (good performance config) +set lazyredraw + +" For regular expressions turn magic on +set magic + +" when at 3 spaces, and I hit > ... go to 4, not 7 +set shiftround + +" number of undo saved in memory +set undolevels=10000 " How many undos +set undoreload=10000 " number of lines to save for undo + +" set list +set list listchars=tab:\┆\ ,trail:·,nbsp:± + +" doesn't prompt a warning when opening a file and the current file was written but not saved +set hidden + +" no swap file! This is just annoying +set noswapfile + +" Fold related +set foldlevelstart=0 " Start with all folds closed + +" Set foldtext +set foldtext=general#FoldText() + +" Show the substitution LIVE +set inccommand=nosplit + +" for vertical pane in git diff tool +set diffopt+=vertical + +autocmd FileType * setlocal formatoptions-=c formatoptions-=r formatoptions-=o + +" Set to auto read when a file is changed from the outside +set autoread + +" indentLine +let g:indentLine_char = '▏' +let g:indentLine_color_gui = '#363949' + +" vim:set et sw=2: +" ================================================== +" Color scheme and fonts +" ================================================== +let g:rainbow_active = 1 "set to 0 if you want to enable it later via :RainbowToggle +let g:material_theme_style = 'palenight' + +" disable the mouse - who needs a mouse?? +set mouse-=a +set guicursor= + +" Set font according to system +if has("mac") || has("macunix") + set gfn=IBM\ Plex\ Mono:h14,Hack:h14,Source\ Code\ Pro:h15,Menlo:h15 +elseif has("win16") || has("win32") + set gfn=IBM\ Plex\ Mono:h14,Source\ Code\ Pro:h12,Bitstream\ Vera\ Sans\ Mono:h11 +elseif has("gui_gtk2") + set gfn=IBM\ Plex\ Mono:h14,:Hack\ 14,Source\ Code\ Pro\ 12,Bitstream\ Vera\ Sans\ Mono\ 11 +elseif has("linux") + set gfn=IBM\ Plex\ Mono:h14,:Hack\ 14,Source\ Code\ Pro\ 12,Bitstream\ Vera\ Sans\ Mono\ 11 +elseif has("unix") + set gfn=Monospace\ 11 +endif + +" Disable scrollbars (real hackers don't use scrollbars for navigation!) +set guioptions-=r +set guioptions-=R +set guioptions-=l +set guioptions-=L + +if (has("nvim")) + "For Neovim 0.1.3 and 0.1.4 < https://github.com/neovim/neovim/pull/2198 > + let $NVIM_TUI_ENABLE_TRUE_COLOR=1 +endif + +" Enable 256 colors palette in Gnome Terminal +if $COLORTERM == 'gnome-terminal' + set t_Co=256 +endif + +set background=dark +"colorscheme material +set t_Co=256 +colorscheme desert +hi Conceal guifg=#81A1C1 guibg=NONE ctermbg=NONE +let g:palenight_terminal_italics=1 +let g:material_terminal_italics = 1 + +"For Neovim > 0.1.5 and Vim > patch 7.4.1799 < https://github.com/vim/vim/commit/61be73bb0f965a895bfb064ea3e55476ac175162 > +"Based on Vim patch 7.4.1770 (`guicolors` option) < https://github.com/vim/vim/commit/8a633e3427b47286869aa4b96f2bfc1fe65b25cd > +" < https://github.com/neovim/neovim/wiki/Following-HEAD#20160511 > +if (has("termguicolors")) + " Opaque Background (Comment out to use terminal's profile) + set termguicolors +endif + +" Set extra options when running in GUI mode +if has("gui_running") + set guioptions-=T + set guioptions-=e + set t_Co=256 + set guitablabel=%M\ %t +endif + +highlight Pmenu guibg=white guifg=black gui=bold +highlight Comment gui=bold +highlight Normal gui=none +highlight NonText guibg=none + +" Transparent Background (For i3 and compton) +highlight Normal guibg=NONE ctermbg=NONE +highlight LineNr guibg=NONE ctermbg=NONE + +"" This will repair colors in Tmux. +let &t_8f = "\[38;2;%lu;%lu;%lum" +let &t_8b = "\[48;2;%lu;%lu;%lum" + +"" Tmuxline +let g:tmuxline_theme = 'vim_statusline_3' +let g:tmuxline_preset = 'tmux' + +"" Bufferline +let g:bufferline_echo = 0 " This will keep your messages from getting quickly hidden. + + +" vim:set et sw=2: +" ================================================== +" Basic Mappings +" ================================================== + +" Maps for jj to act as Esc in insert and command modes +ino jj +cno jj + +" One can map ctrl-c to something else if needed +map +imap + +" Smarter j/k navigation +" Convert the j and k movement commands from strict linewise movements to +" onscreen display line movements via the gj and gk commands. When +" preceded with a count we want to go back to strict linewise movements. +" will automatically save movements larger than 5 lines to the jumplist. +nnoremap j v:count ? (v:count > 5 ? "m'" . v:count : '') . 'j' : 'gj' +nnoremap k v:count ? (v:count > 5 ? "m'" . v:count : '') . 'k' : 'gk' + +" Center next/previous matched string +nnoremap n nzz +nnoremap N Nzz + +" Save session +exec 'nnoremap ss :mksession! ~/.nvim_runtime/sessions/*.vim' +" Reload session +exec 'nnoremap sl :so ~/.nvim_runtime/sessions/*.vim' + +" quick make +map :make + +" simple pasting from the system clipboard +" http://tilvim.com/2014/03/18/a-better-paste.html +map p :set pasteo"+]p:set nopaste + +" Quickly save, quit, or save-and-quit +map w :w +map x :x +map q :q + +" un-highlight when esc is pressed +map :noh + + +" Quickly toggle relative line numbers +function ToggleRelativeLineNumbers() + set invnumber + set invrelativenumber +endfunction +nnoremap l :call ToggleRelativeLineNumbers() +" Toggle between absolute -> relative line number +"nnoremap :let [&nu, &rnu] = [&nu, &nu+&rnu==1] + + +" Save files as root +cnoremap w!! execute ':w suda://%' + +" ================================================== +" vimrc handling +" ================================================== + +" ,v loads .vimrc +" ,V reloads .vimrc -- activating changes (needs save) +map v :sp ~/.config/nvim/init.vim_ +map V :source ~/.config/nvim/init.vim:filetype detect:exe ":echo 'vimrc reloaded'" + +" ================================================== +" Window navigation +" ================================================== + +" control + vim direction key to navigate windows +noremap j +noremap k +noremap h +noremap l + +" control + arrow key to navigate windows +noremap j +noremap k +noremap h +noremap l + +" close all windows except the current one +nnoremap wco :only +nnoremap wcc :cclose + +" windows creation +" create window on the bottom +nnoremap wb s +" create vertival window +nnoremap wv v + +" " arrow keys resize windows +" nnoremap :vertical resize -10 +" nnoremap :vertical resize +10 +" nnoremap :resize -10 +" nnoremap :resize +10 +" imap +" imap +" imap +" imap + +" ================================================== +" Splits handling +" ================================================== + +" Make these all work in insert mode +imap + +" - and + to resize horizontal splits +map - - +map + + + +" alt-< or alt-> for vertical splits +map > +map < + +" F2 close current split (window) +noremap :close + +" Deleter buffer, keep the split (switch to prev buf, delete now prev buf) +nmap d :b#bd# + +" ================================================== +" Tab navigation +" ================================================== +map to :tabonly +map tc :tabclose +map tm :tabmove +nnoremap tn :tabnew +nnoremap th :tabfirst +nnoremap tk :tabnext +nnoremap tj :tabprev +nnoremap tl :tablast + +" move tab to first position +nnoremap tF :tabm 0 +nnoremap tL :tabm + +" Navigate tabs with shift-{h,l} +noremap gt +noremap gT + +" Let 'tl' toggle between this and the last accessed tab +let g:lasttab = 1 +nmap tl :exe "tabn ".g:lasttab +au TabLeave * let g:lasttab = tabpagenr() + +" Opens a new tab with the current buffer's path +" Super useful when editing files in the same directory +map te :tabedit =expand("%:p:h")/ + +" Switch CWD to the directory of the open buffer +map cd :cd %:p:h:pwd + +" Specify the behavior when switching between buffers +try + set switchbuf=useopen,usetab,newtab + set stal=2 +catch +endtry + +" ================================================== +" Buffer navigation +" ================================================== +nmap :bnext +nmap :bprevious + +" ================================================== +" Clean all end of line whitespace with S +" ================================================== +":nnoremap S :let _s=@/:%s/\s\+$//e:let @/=_s:nohl +fun! TrimWhitespace() + let l:save = winsaveview() + keeppatterns %s/\s\+$//e + call winrestview(l:save) +endfun +:nnoremap S :call TrimWhitespace() + +" ================================================== +" Visual mode related +" ================================================== +" Visual mode pressing * or # searches for the current selection +" Super useful! From an idea by Michael Naumann +vnoremap * :call VisualSelection('', '')/=@/ +vnoremap # :call VisualSelection('', '')?=@/ + +function! VisualSelection(direction, extra_filter) range + let l:saved_reg = @" + execute "normal! vgvy" + + let l:pattern = escape(@", "\\/.*'$^~[]") + let l:pattern = substitute(l:pattern, "\n$", "", "") + + if a:direction == 'gv' + call CmdLine("Ack '" . l:pattern . "' " ) + elseif a:direction == 'replace' + call CmdLine("%s" . '/'. l:pattern . '/') + endif + + let @/ = l:pattern + let @" = l:saved_reg +endfunction + + +" ================================================== +" Editing mappings +" ================================================== +" Remap VIM 0 to first non-blank character +map 0 ^ + +" Move a line of text using ALT+[jk] or Command+[jk] on mac +nmap mz:m+`z +nmap mz:m-2`z +vmap :m'>+`mzgv`yo`z +vmap :m'<-2`>my` + nmap + vmap + vmap +endif + +" ================================================== +" Spell checking +" ================================================== +" Pressing ,ss will toggle and untoggle spell checking +map ss :setlocal spell! + +" Shortcuts using +map sn ]s +map sp [s +map sa zg +map s? z= + +" ================================================== +" Other Configurations +" ================================================== + +" Remove the Windows ^M - when the encodings gets messed up +noremap m mmHmt:%s///ge'tzt'm + +" Quickly open a buffer for scribble +map q :e ~/buffer + +" Quickly open a markdown buffer for scribble +map x :e ~/buffer.md + +" Toggle paste mode on and off +map pp :setlocal paste! + +noremap :Denite buffer file_rec tag + +xmap a gaip* +nmap t sj:terminal +nmap vt vl:terminal +nmap g :Goyo +nmap j :set filetype=journal +nmap l :Limelight!! +autocmd FileType python nmap x :0,$!~/.config/nvim/env/bin/python -m yapf + +vmap !boxes -d stone + +" surround by quotes - frequently use cases of vim-surround +map " ysiw" +map ' ysiw' + +" Act like D and C +nnoremap Y y$ + +" indent without kill the selection in vmode +vmap < >gv + +" remap the annoying u in visual mode +vmap u y + +" shortcut to substitute current word under cursor +nnoremap [ :%s///g + +" Change in next bracket +nmap cinb cib + +" Visual mode pressing * or # searches for the current selection +" Super useful! From an idea by Michael Naumann +vnoremap * :call general#VisualSelection('', '')/=@/ +vnoremap # :call general#VisualSelection('', '')?=@/ + +" delete character after cursor in insert mode +inoremap + +" highlight the line which is longer than the defined margin (120 character) +highlight MaxLineChar ctermbg=red +autocmd FileType php,js,vue,go call matchadd('MaxLineChar', '\%120v', 100) + +" open devdocs.io with waterfox and search the word under the cursor +command! -nargs=? DevDocs :call system('type -p open >/dev/null 2>&1 && open https://devdocs.io/#q= || waterfox -url https://devdocs.io/#q=') +autocmd FileType python,ruby,rspec,javascript,go,html,php,eruby,coffee,haml nmap D :exec "DevDocs " . fnameescape(expand('')) + +" Markdown +autocmd BufNewFile,BufFilePre,BufRead *.md set filetype=markdown + +" Keep the cursor in place while joining lines +nnoremap J mzJ`z + +" Quit neovim terminal +tnoremap + +" Open images with feh +autocmd BufEnter *.png,*.jpg,*gif silent! exec "! feh ".expand("%") | :bw + +" A |Dict| specifies the matcher for filtering and sorting the completion candidates. +let g:cm_matcher={'module': 'cm_matchers.abbrev_matcher', 'case': 'smartcase'} + +" Disable anoying ex mode +nnoremap Q + +" Neovim :Terminal +tmap +tmap +autocmd BufWinEnter,WinEnter term://* startinsert +autocmd BufLeave term://* stopinsert + +" vim:set et sw=2: +" ================================================== +" Right-to-Left (Hebrew etc) shortcuts +" ================================================== + +" toggle direction mapping +" this is useful for logical-order editing +map :set invrl +" do it when in insert mode as well (and return to insert mode) +imap :set invrla + +" toggle reverse insertion +" this is useful for visual-order editing +map :set invrevins +" do it when in insert mode as well (and return to insert mode) +imap :set invrevinsa + +" vim:set et sw=2: +" =================================================================== +" FileType and Indentation settings +" +" Recommended: Don't rely on this, use editorconfig " in your project +" =================================================================== + +" define less filetype +au BufNewFile,BufRead *.less set filetype=less + +" make the smarty .tpl files html files for our purposes +au BufNewFile,BufRead *.tpl set filetype=html + +" json +au! BufRead,BufNewFile *.json set filetype=json + +" jquery +au BufRead,BufNewFile jquery.*.js set ft=javascript syntax=jquery + +autocmd Filetype html setlocal ts=2 sw=2 expandtab +autocmd Filetype xhtml setlocal ts=2 sw=2 expandtab +autocmd Filetype xml setlocal ts=2 sw=2 expandtab +autocmd Filetype css setlocal ts=2 sw=2 expandtab +autocmd Filetype less setlocal ts=2 sw=2 expandtab +autocmd Filetype ruby setlocal ts=2 sw=2 expandtab +autocmd Filetype javascript setlocal ts=4 sw=4 sts=0 noexpandtab +autocmd Filetype python setlocal omnifunc=jedi#completions tw=79 + \ completeopt-=preview + \ formatoptions+=c + + +" HTML, XML, Jinja +autocmd FileType html setlocal shiftwidth=2 tabstop=2 softtabstop=2 +autocmd FileType css setlocal shiftwidth=2 tabstop=2 softtabstop=2 +autocmd FileType xml setlocal shiftwidth=2 tabstop=2 softtabstop=2 +autocmd FileType htmldjango setlocal shiftwidth=2 tabstop=2 softtabstop=2 +autocmd FileType htmldjango inoremap {{ {{ }} +autocmd FileType htmldjango inoremap {% {% %} +autocmd FileType htmldjango inoremap {# {# #} + +" LaTeX +let g:tex_flavor='latex' +let g:vimtex_view_method='zathura' +let g:vimtex_quickfix_mode=0 +set conceallevel=1 +let g:tex_conceal='abdmg' + +" Markdown and Journal +autocmd FileType markdown setlocal shiftwidth=2 tabstop=2 softtabstop=2 +autocmd FileType journal setlocal shiftwidth=2 tabstop=2 softtabstop=2 + +" Always assume .tex files are LaTeX +let g:tex_flavor = "latex" + +" Don't autocomplete filenames that match these patterns +" Version control +set wildignore=.svn,.git +" Compiled formats +set wildignore+=*.o,*.pyc +" Images +set wildignore+=*.jpg,*.png,*.pdf +" Auxilary LaTeX files +set wildignore+=*.aux,*.bbl,*.blg,*.out,*.toc +" Web development +set wildignore+=vendor,_site,tmp,node_modules,bower_components +" Script outputs +set wildignore+=output + +au BufNewFile,BufRead ~/.mutt/tmp/neomutt-* setlocal filetype=mail + +" Makefiles require actual tabs +au FileType make setlocal noexpandtab + +" Don't create backup files when editing crontabs +au filetype crontab setlocal nobackup nowritebackup + +" Python style uses 4 spaces as tabs +au FileType python setlocal tabstop=4 shiftwidth=4 + +au BufNewFile,BufRead *.md setlocal filetype=markdown syntax=markdown +au BufNewFile,BufRead *.markdown setlocal syntax=markdown + +" Spellchecking in LaTeX, Markdown +au FileType tex,plaintex,markdown setlocal spelllang=en_gb spell formatoptions=tcroqlj + +" Wrap Python automatically at 80 characters +au FileType python setlocal textwidth=79 formatoptions=tcroqlj + +" relativenumber can be very slow when combined with a language whose syntax +" highlighting regexs are complex +" https://github.com/neovim/neovim/issues/2401 +" https://groups.google.com/forum/#!topic/vim_use/ebRiypE2Xuw +au FileType tex set norelativenumber + +" Enable marker folder for Beancount files +au FileType beancount set foldmethod=marker foldlevel=0 foldlevelstart=0 + +" I often type `#` to start a comment, as alt-3, then hit space +" alt-space is a UTF non-breaking space character, which can give encoding errors +highlight UTFSpaceComment ctermfg=White ctermbg=1 +au BufNewFile,BufRead * :syn match UTFSpaceComment '.\%uA0' + +augroup mail + au! + + au FileType mail setlocal spell spelllang=en_gb + + " Common standard used in plaintext emails + au FileType mail setlocal textwidth=72 + + " w: Lines ending with spaces continue on the next line, used in combination + " with Mutt's text_flowed option + " a: Format automatically + " t: Wrap using textwidth + " c: Wrap comments using textwidth + " q: Format with gq macro + au FileType mail setlocal formatoptions=watcq + + " Define comment leaders as in a Markdown document, that is: + " * Treat *, -, +, and > as comment leaders + " * Characters *, -, + begin comments when followed by a space, and wrapped + " lines immediately after these should be indented + " * Comments starting with > can be nested + au FileType mail setlocal comments=fb:*,fb:-,fb:+,n:> + + " Install an autogroup that triggers when inside a `mail.*` syntax group + au FileType mail call OnSyntaxChange#Install('NoWrapElements', '^mail', 1, 'a') + + " Use the trigger to disable/enable text wrapping when leaving/enter the + " mail body (i.e. we only want wrapping in the mail body). + au FileType mail autocmd User SyntaxNoWrapElementsEnterA setlocal formatoptions-=watc + au FileType mail autocmd User SyntaxNoWrapElementsLeaveA setlocal formatoptions+=watc +augroup end + +" Twig +autocmd BufNewFile,BufRead *.twig set filetype=html.twig + +" PHP +command! -nargs=1 Silent execute ':silent !'. | execute ':redraw!' +map :w:Silent php-cs-fixer fix %:p --level=symfony + +" vim:set et sw=2: diff --git a/neovim/.config/nvim/basic_header.vim b/neovim/.config/nvim/basic_header.vim new file mode 100644 index 0000000..dc8f4e9 --- /dev/null +++ b/neovim/.config/nvim/basic_header.vim @@ -0,0 +1,31 @@ +" As recommended by `:help provider`, define a venv just for neovim that has +" the neovim module and some Python linters +let g:python3_host_prog = expand('~/.config/nvim/env/bin/python') + +" Enable nocompatible +if has('vim_starting') + " set default encoding to utf-8 + " Let Vim use utf-8 internally, because many scripts require this + exe 'set encoding=utf-8' + scriptencoding utf-8 + if &compatible + set nocompatible + endif + " python host + if !empty($PYTHON_HOST_PROG) + let g:python_host_prog = $PYTHON_HOST_PROG + endif + if !empty($PYTHON3_HOST_PROG) + let g:python3_host_prog = $PYTHON3_HOST_PROG + endif +endif + +""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +" Sections: +" -> Settings (01-settings) +" -> Theme (02-theme) +" -> Keymap (10-keymap-general, 11-keymap-rtl) +" -> File type specific (31-file-type.vim) +" +""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + diff --git a/neovim/.config/nvim/experiments/20-coc.vim b/neovim/.config/nvim/experiments/20-coc.vim new file mode 100644 index 0000000..980ca9b --- /dev/null +++ b/neovim/.config/nvim/experiments/20-coc.vim @@ -0,0 +1,58 @@ +" ================================================== +" COC configuration and mapping +" ================================================== + +" Use `lp` and `ln` for navigate diagnostics +nmap lp (coc-diagnostic-prev) +nmap ln (coc-diagnostic-next) + +" Remap keys for gotos +nmap ld (coc-definition) +nmap lt (coc-type-definition) +nmap li (coc-implementation) +nmap lf (coc-references) + +" Remap for rename current word +nmap lr (coc-rename) + +" Use K for show documentation in preview window +nnoremap K :call show_documentation() + +function! s:show_documentation() + if &filetype == 'vim' + execute 'h '.expand('') + else + call CocAction('doHover') + endif +endfunction + +" Coc extensions +let g:coc_global_extensions = [ + \ 'coc-emoji', + \ 'coc-diagnostic', + \ 'coc-pairs', + \ 'coc-ultisnips', + \ 'coc-css', + \ 'coc-html', + \ 'coc-java', + \ 'coc-tsserver', + \ 'coc-vimtex', + \ 'coc-yaml', + \ 'coc-json', + \] + +" \ 'coc-highlight', +" \ 'coc-dictionary', +" \ 'coc-syntax', + +" outliner +let g:vista_default_executive = 'coc' +let g:vista#renderer#enable_icon = 0 +" nnoremap o :Vista!! + +" Coc Pairs +inoremap pumvisible() ? coc#_select_confirm() : "\u\\=coc#on_enter()\" +autocmd FileType tex let b:coc_pairs = [["$", "$"]] +autocmd FileType markdown let b:coc_pairs_disabled = ['`'] + +" vim:set et sw=2: diff --git a/neovim/.config/nvim/experiments/coc-settings.json b/neovim/.config/nvim/experiments/coc-settings.json new file mode 100644 index 0000000..f5b009d --- /dev/null +++ b/neovim/.config/nvim/experiments/coc-settings.json @@ -0,0 +1,22 @@ +{ + "diagnostic-languageserver.filetypes": { + // lint `sh` (includes `bash`) files + "sh": "shellcheck" + }, + "diagnostic-languageserver.formatFiletypes": { + // format `sh` (includes `bash`) files using formatter defined below + "sh": "shfmt" + }, + "diagnostic-languageserver.formatters": { + // define our formatter so that we can reference it from + // `diagnostic-languageserver.formatFiletypes` + "shfmt": { + "command": "shfmt", + // all the below args are entirely optional + // primarily listed here to call out that flags which take an + // argument (such as `-i ` for specifying indentation) + // should be split into two strings, the flag and then the value + "args": ["-i", "2", "-bn", "-ci", "-sr"] + } + }, +} diff --git a/neovim/.config/nvim/experiments/replace_deoplete_with_co.diff b/neovim/.config/nvim/experiments/replace_deoplete_with_co.diff new file mode 100644 index 0000000..620c2b5 --- /dev/null +++ b/neovim/.config/nvim/experiments/replace_deoplete_with_co.diff @@ -0,0 +1,257 @@ +diff --git a/neovim/.config/nvim/rc.d/00-plugins.vim b/neovim/.config/nvim/rc.d/00-plugins.vim +index a66b51d..ba57bc6 100644 +--- a/neovim/.config/nvim/rc.d/00-plugins.vim ++++ b/neovim/.config/nvim/rc.d/00-plugins.vim +@@ -87,7 +87,6 @@ Plug 'majutsushi/tagbar' + Plug 'liuchengxu/vista.vim' + Plug 'editorconfig/editorconfig-vim' + Plug 'vim-scripts/Shebang' +-Plug 'w0rp/ale' + Plug 'sirver/ultisnips' + Plug 'honza/vim-snippets' + Plug 'Valloric/MatchTagAlways' +@@ -152,7 +151,6 @@ Plug 'vim-scripts/po.vim--Jelenak' + + " PHP Support + Plug 'phpactor/phpactor' , {'do': 'composer install', 'for': 'php'} +-Plug 'kristijanhusak/deoplete-phpactor' + Plug 'vim-php/tagbar-phpctags.vim' + Plug 'tobyS/pdv' + Plug 'StanAngeloff/php.vim' +@@ -191,6 +189,8 @@ Plug 'lumiliet/vim-twig', {'for': 'twig'} + + " javascript plugins + Plug 'pangloss/vim-javascript' ++Plug 'ternjs/tern_for_vim', { 'for': ['javascript', 'javascript.jsx', 'vue'], 'do': 'npm install'} ++ + Plug 'leafgarland/typescript-vim' + + " For react +@@ -200,19 +200,12 @@ Plug 'mxw/vim-jsx' + Plug 'posva/vim-vue' + + " Autocomplete +-Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' } +-Plug 'zchee/deoplete-clang' +-Plug 'carlitux/deoplete-ternjs', { 'do': 'npm install -g tern' } +-Plug 'wokalski/autocomplete-flow' +-Plug 'sebastianmarkow/deoplete-rust' +-Plug 'shougo/neoinclude.vim' +-Plug 'zchee/deoplete-jedi' +-Plug 'shougo/neco-vim' ++Plug 'neoclide/coc.nvim', {'branch': 'release', 'do': { -> coc#util#install()}} ++Plug 'neoclide/coc-neco' + Plug 'othree/csscomplete.vim' + Plug 'othree/html5.vim' + Plug 'othree/xml.vim' + Plug 'c9s/perlomni.vim' +-Plug 'artur-shaik/vim-javacomplete2' + + + " CSV plugin +diff --git a/neovim/.config/nvim/rc.d/20-ale.vim b/neovim/.config/nvim/rc.d/20-ale.vim +deleted file mode 100644 +index d513954..0000000 +--- a/neovim/.config/nvim/rc.d/20-ale.vim ++++ /dev/null +@@ -1,68 +0,0 @@ +-" =================================================================== +-" ale (Asynchronous Lint Engine) settings +-" =================================================================== +- +-" Syntax / File Support +-"" Enable JSDoc syntax highlighting +-let g:javascript_plugin_jsdoc = 1 +- +-"" Add an error indicator to Ale +-let g:ale_sign_column_always = 1 +- +-function! LinterStatus() abort +- let l:counts = ale#statusline#Count(bufnr('')) +- +- let l:all_errors = l:counts.error + l:counts.style_error +- let l:all_non_errors = l:counts.total - l:all_errors +- +- return l:counts.total == 0 ? 'OK' : printf( +- \ '%dW %dE', +- \ all_non_errors, +- \ all_errors +- \) +-endfunction +- +-set statusline=%{LinterStatus()} +- +-nmap e (ale_next_wrap) +-nmap q (ale_previous_wrap) +- +-" Ale +-let g:ale_lint_on_enter = 0 +-let g:ale_lint_on_text_changed = 'never' +-let g:ale_echo_msg_error_str = 'E' +-let g:ale_echo_msg_warning_str = 'W' +-let g:ale_echo_msg_format = '[%linter%] %s [%severity%]' +-let g:ale_open_list = 1 +-let g:ale_keep_list_window_open=0 +-let g:ale_set_quickfix=0 +-let g:ale_list_window_size = 5 +-let g:ale_linters = {'python': ['flake8']} +-let g:ale_sign_error = '✖' +-let g:ale_sign_warning = '⚠' +-let g:ale_fixers = { +- \ '*': ['remove_trailing_lines', 'trim_whitespace'], +- \} +-" \ 'php': ['phpcbf', 'php_cs_fixer', 'remove_trailing_lines', 'trim_whitespace'], +-let g:ale_fix_on_save = 1 +- +-" Use system flake8 +-let g:ale_python_flake8_executable = '/usr/bin/flake8' +- +-" Append our Neovim virtualenv to the list of venvs ale searches for +-" The search is performed from the buffer directory up, until a name match is +-" found; our Neovim venv lives in ~/.nvim-venv +-let g:ale_virtualenv_dir_names = ['.env', '.venv', 'env', 'virtualenv', 'venv', '.nvim-venv'] +-" Explicitly list linters we care about +-let g:ale_linters = {'python': ['flake8', 'pylint']} +-" Only show warnings and errors from pylint +-let g:ale_python_pylint_options = '--disable C,R' +-let g:ale_sign_warning = '→' +-let g:ale_sign_error = '→' +- +-" PHP Support +-let g:ale_php_phpcbf_standard='PSR2' +-let g:ale_php_phpcs_standard='phpcs.xml.dist' +-let g:ale_php_phpmd_ruleset='phpmd.xml' +- +-" vim:set et sw=2: +diff --git a/neovim/.config/nvim/rc.d/20-coc.vim b/neovim/.config/nvim/rc.d/20-coc.vim +new file mode 100644 +index 0000000..dfad4a0 +--- /dev/null ++++ b/neovim/.config/nvim/rc.d/20-coc.vim +@@ -0,0 +1,57 @@ ++" ================================================== ++" COC configuration and mapping ++" ================================================== ++ ++" Use `lp` and `ln` for navigate diagnostics ++nmap lp (coc-diagnostic-prev) ++nmap ln (coc-diagnostic-next) ++ ++" Remap keys for gotos ++nmap ld (coc-definition) ++nmap lt (coc-type-definition) ++nmap li (coc-implementation) ++nmap lf (coc-references) ++ ++" Remap for rename current word ++nmap lr (coc-rename) ++ ++" Use K for show documentation in preview window ++nnoremap K :call show_documentation() ++ ++function! s:show_documentation() ++ if &filetype == 'vim' ++ execute 'h '.expand('') ++ else ++ call CocAction('doHover') ++ endif ++endfunction ++ ++" Coc extensions ++let g:coc_global_extensions = [ ++ \ 'coc-json', ++ \ 'coc-css', ++ \ 'coc-tsserver', ++ \ 'coc-emoji', ++ \ 'coc-html', ++ \ 'coc-ultisnips', ++ \ 'coc-yaml', ++ \ 'coc-pairs', ++ \ 'coc-java', ++ \ 'coc-vimtex' ++ \] ++ ++" \ 'coc-highlight', ++" \ 'coc-dictionary', ++" \ 'coc-syntax', ++ ++" outliner ++let g:vista_default_executive = 'coc' ++let g:vista#renderer#enable_icon = 0 ++" nnoremap o :Vista!! ++ ++" Coc Pairs ++inoremap pumvisible() ? coc#_select_confirm() : "\u\\=coc#on_enter()\" ++autocmd FileType tex let b:coc_pairs = [["$", "$"]] ++autocmd FileType markdown let b:coc_pairs_disabled = ['`'] ++ ++" vim:set et sw=2: +diff --git a/neovim/.config/nvim/rc.d/20-deoplete.vim b/neovim/.config/nvim/rc.d/20-deoplete.vim +deleted file mode 100644 +index 7138bab..0000000 +--- a/neovim/.config/nvim/rc.d/20-deoplete.vim ++++ /dev/null +@@ -1,63 +0,0 @@ +-" =================================================================== +-" Deoplete +-" =================================================================== +- +-" Autocomplete +-let g:deoplete#sources = {} +-let g:deoplete#sources.php = ['omni', 'phpactor', 'ultisnips', 'buffer'] +-let g:deoplete#enable_at_startup = 1 +-let g:deoplete#sources#jedi#statement_length = 50 +-let g:deoplete#sources#jedi#enable_cache = 1 +-let g:deoplete#sources#jedi#show_docstring = 0 +- +-" disable autocomplete +-let g:deoplete#disable_auto_complete = 1 +-if has("gui_running") +- inoremap deoplete#mappings#manual_complete() +-else +- inoremap deoplete#mappings#manual_complete() +-endif +- +-" deoplete + neosnippet + autopairs changes +-let g:AutoPairsMapCR=0 +-let g:deoplete#auto_complete_start_length = 1 +-let g:deoplete#enable_at_startup = 1 +-let g:deoplete#enable_smart_case = 1 +- +-"" Deoplete per-autocompleter settings +-""" Clang +-let g:deoplete#sources#clang#libclang_path = '/lib/libclang.so' " '/usr/lib/i386-linux-gnu/libclang-4.0.so.1' +-let g:deoplete#sources#clang#clang_header = '/lib/clang/4.0.0/include' " '/usr/lib/llvm-4.0/lib/clang/4.0.0/include' +- +-""" TernJS +-let g:tern_request_timeout = 1 +-" let g:tern_show_signature_in_pum = '0' +-let g:deoplete#sources#ternjs#depths = 1 +-let g:deoplete#sources#ternjs#types = 1 +-let g:deoplete#sources#ternjs#docs = 1 +-let g:tern#command = ["tern"] +-let g:tern#arguments = ["--persistent"] +- +-""" Java +-autocmd FileType java setlocal omnifunc=javacomplete#Complete +- +-""" Omnifunctions +-let g:deoplete#omni#functions = {} +- +-let g:EclimCompletionMethod = 'omnifunc' +-let g:deoplete#omni#functions.java = 'eclim#java#complete#CodeComplete' +- +-let g:deoplete#omni#functions.javascript = [ +- \ 'tern#Complete', +- \ 'autocomplete_flow#Complete', +- \ 'javascriptcomplete#CompleteJS' +- \] +-let g:deoplete#omni#functions.css = 'csscomplete#CompleteCSS' +-let g:deoplete#omni#functions.html = [ +- \ 'htmlcomplete#CompleteTags', +- \ 'xmlcomplete#CompleteTags' +- \] +-let g:deoplete#omni#functions.xml = 'xmlcomplete#CompleteTags' +-let g:deoplete#omni#functions.perl = 'perlomni#PerlComplete' +- +-" vim:set et sw=2: diff --git a/neovim/.config/nvim/experiments/vimrc b/neovim/.config/nvim/experiments/vimrc new file mode 100644 index 0000000..2d211dc --- /dev/null +++ b/neovim/.config/nvim/experiments/vimrc @@ -0,0 +1,25 @@ +se vi+=n~/.cache/vim/viminfo + +sy on +se sw=4 ts=8 sts=-1 et nu sc hls title bg=dark swb=useopen +filet plugin indent on + +comp gcc +au FileType make setl noet sw=8 sts=0 +au FileType yaml setl indk= +packadd! matchit + +au Filetype c nn :!gcc "%" -o "%<" -std=c11 -O2 -g + \ -fsanitize=undefined -Wall -Wextra -Wshadow + \ -DJOHNCHEN902=1 +au Filetype cpp nn :!g++ "%" -o "%<" -std=c++17 -O2 -g + \ -fsanitize=undefined -Wall -Wextra -Wshadow + \ -DJOHNCHEN902=1 +au Filetype haskell nn :!ghc "%" -o "%<" -O -g + \ -dynamic -no-keep-hi-files -no-keep-o-files + \ -Wall +au Filetype rust nn :!rustc "%" -o "%<" -O -g + \ -C prefer-dynamic + +au Filetype c,cpp,haskell,rust nn :!"%:p:r" +au Filetype c,cpp,haskell,rust nn :!"%:p:r" < input.txt diff --git a/neovim/.config/nvim/init.vim b/neovim/.config/nvim/init.vim new file mode 100644 index 0000000..76658ad --- /dev/null +++ b/neovim/.config/nvim/init.vim @@ -0,0 +1,44 @@ +" As recommended by `:help provider`, define a venv just for neovim that has +" the neovim module and some Python linters +let g:python3_host_prog = expand('~/.config/nvim/env/bin/python') + +" Enable nocompatible +if has('vim_starting') + " set default encoding to utf-8 + " Let Vim use utf-8 internally, because many scripts require this + exe 'set encoding=utf-8' + scriptencoding utf-8 + if &compatible + set nocompatible + endif + " python host + if !empty($PYTHON_HOST_PROG) + let g:python_host_prog = $PYTHON_HOST_PROG + endif + if !empty($PYTHON3_HOST_PROG) + let g:python3_host_prog = $PYTHON3_HOST_PROG + endif +endif + +" ================================================== +" Allow pre-definitions via ~/.config/nvim/before.vim +" ================================================== +if filereadable(expand("~/.config/nvim/before.vim")) + source ~/.config/nvim/before.vim +endif + +" ================================================== +" Source the files ~/.config/nvim/rc.d/ +" ================================================== +for f in split(glob('~/.config/nvim/rc.d/*.vim'), '\n') + exe 'source' f +endfor + +" ================================================== +" Allow overrides via ~/.config/nvim/after.vim +" ================================================== +if filereadable(expand("~/.config/nvim/after.vim")) + source ~/.config/nvim/after.vim +endif + +" vim:set et sw=2: diff --git a/neovim/.config/nvim/installer/README.md b/neovim/.config/nvim/installer/README.md new file mode 100644 index 0000000..d907c80 --- /dev/null +++ b/neovim/.config/nvim/installer/README.md @@ -0,0 +1,197 @@ +My Neovim setup +=============== + +My Neovim IDE setup for Python, Go, Rust, HTML, CSS, Javascript, Typescript, +gettext and more. + +Features +--------- + +* `init.vim` handling +* Incremental and smart case search. +* Sublime Text style multiple selections +* Trailing whitespace highlighting and cleaning shortcut +* Logical and Visual layout (for Right-To-Left lanaguegs) editing. +* Tabs expand to 4 spaces by default +* Remap `` to `` and `jj` to `` +* Highlight current row and color column 80 +* 70+ language packs support +* Syntax checking +* Snippets +* Quotes, parens etc pair, surround +* Extended pair matching with % +* ASCII drawing +* Fuzzy file, buffer, mru, tag, etc finder +* VCS plugins (Fugitive, Lawrencium) +* Tab completion +* Commenting + +Prerequisites +------------- + +- Neovim and Neovim Python client. +- For faster search, [ripgrep](https://github.com/BurntSushi/ripgrep) +- For tags: [ctags](http://ctags.sourceforge.net) +- For devicons, a patched font, like the one from + [nerd-fonts](https://github.com/ryanoasis/nerd-fonts) + +Usage +------------ + +The following commands will clone the repo, and install `vim-plug` plugin +manager: + + mkdir -p ~/.config/nvim + git clone https://github.com/MeirKriheli/dotneovim.git ~/.config/nvim + curl -fLo ~/.config/nvim/autoload/plug.vim --create-dirs \ + https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim + + +Install plugins from the command line: + + nvim +PlugUpdate +qa + + +After that, [install the desired COC plugins or extensions](https://github.com/neoclide/coc.nvim). + +Overrides +---------------- + +* `~/.config/nvim/before.vim`, if exists, is sourced before everything allowing + definitions of variables to act upon. +* `~/.config/nvim/after.vim` if exists, is sourced after all the files in + `~/.config/nvim/rc.d` allowing override of default settings (e.g: color + schemes, plugin configuration, etc.). + + +Go tags +---------- + +For CtrlPBufTag search in go files, make sure you have an updated version +of ``ctags`` (>=5.8) and put in your ``~/.ctags``:: + + --langdef=Go + --langmap=Go:.go + --regex-Go=/func([ \t]+\([^)]+\))?[ \t]+([a-zA-Z0-9_]+)/\2/f,func/ + --regex-Go=/var[ \t]+([a-zA-Z_][a-zA-Z0-9_]+)/\1/v,var/ + --regex-Go=/type[ \t]+([a-zA-Z_][a-zA-Z0-9_]+)/\1/t,type/ + + +Rust tags +------------------------- + +For Rust ctags to wok (e.g: TagBar), put in your ``~/.ctags``:: + + --langdef=Rust + --langmap=Rust:.rs + --regex-Rust=/^[ \t]*(#\[[^\]]\][ \t]*)*(pub[ \t]+)?(extern[ \t]+)?("[^"]+"[ \t]+)?(unsafe[ \t]+)?fn[ \t]+([a-zA-Z0-9_]+)/\6/f,functions,function definitions/ + --regex-Rust=/^[ \t]*(pub[ \t]+)?type[ \t]+([a-zA-Z0-9_]+)/\2/T,types,type definitions/ + --regex-Rust=/^[ \t]*(pub[ \t]+)?enum[ \t]+([a-zA-Z0-9_]+)/\2/g,enum,enumeration names/ + --regex-Rust=/^[ \t]*(pub[ \t]+)?struct[ \t]+([a-zA-Z0-9_]+)/\2/s,structure names/ + --regex-Rust=/^[ \t]*(pub[ \t]+)?mod[ \t]+([a-zA-Z0-9_]+)/\2/m,modules,module names/ + --regex-Rust=/^[ \t]*(pub[ \t]+)?(static|const)[ \t]+(mut[ \t]+)?([a-zA-Z0-9_]+)/\4/c,consts,static constants/ + --regex-Rust=/^[ \t]*(pub[ \t]+)?(unsafe[ \t]+)?trait[ \t]+([a-zA-Z0-9_]+)/\3/t,traits,traits/ + --regex-Rust=/^[ \t]*(pub[ \t]+)?(unsafe[ \t]+)?impl([ \t\n]*<[^>]*>)?[ \t]+(([a-zA-Z0-9_:]+)[ \t]*(<[^>]*>)?[ \t]+(for)[ \t]+)?([a-zA-Z0-9_]+)/\5 \7 \8/i,impls,trait implementations/ + --regex-Rust=/^[ \t]*macro_rules![ \t]+([a-zA-Z0-9_]+)/\1/d,macros,macro definitions/ + + + +Plugins +------------ + +* [Solarized](https://github.com/altercation/vim-colors-solarized) - color + scheme +* [base16-vim](https://github.com/chriskempson/base16-vim) - color scheme +* [vim-molokai](https://github.com/tomasr/molokai) - color scheme +* [Oceanic-next](https://github.com/mhartington/oceanic-next) - color scheme +* [Nord VIM](https://github.com/arcticicestudio/nord-vim) - color scheme +* [Gruvbox](https://github.com/morhetz/gruvbox) - color scheme +* [Fugitive](https://github.com/tpope/vim-fugitive) - a Git wrapper so awesome, + it should be illegal +* [gv.vim](https://github.com/junegunn/gv.vim) - A git commit browser in Vim +* [Lawrencium](https://github.com/ludovicchabant/vim-lawrencium) - Mercurial + wrapper for Vim, inspired by Tim Pope's Fugitive +* [ctrlp.vim](https://github.com/ctrlpvim/ctrlp.vim) - Fuzzy file, buffer, mru, + tag, etc finder +* [ale](https://github.com/w0rp/ale) - Asynchronous Lint Engine +* [coc.nvim](https://github.com/neoclide/coc.nvim) - Intellisense engine for + vim8 & neovim, full language server protocol support as VSCode +* [UltiSnips](https://github.com/sirver/ultisnips) - The ultimate snippet + solution for Vim. +* [vim-snippets](https://github.com/honza/vim-snippets) - vim-snipmate default + snippets +* [python-mode](https://github.com/klen/python-mode) - Vim python-mode. PyLint, + Rope, Pydoc, breakpoints from box +* [vim-go](https://github.com/fatih/vim-go) - Go development plugin for Vim +* [rust.vim](https://github.com/rust-lang/rust.vim) - provides Rust file + detection, syntax highlighting, formatting, Syntastic integration, and more. +* [DrawIt](https://github.com/vim-scripts/DrawIt) - ASCII drawing plugin: + lines, ellipses, arrows, fills, and more! +* [vim-surround](https://github.com/tpope/vim-surround) - + quoting/parenthesizing made simple +* [Shebang](https://github.com/vim-scripts/Shebang) - Make executable by + setting the correct shebang and executable bit +* [Tagbar](http://majutsushi.github.com/tagbar/) - Displays tags in a window, + ordered by class etc. +* [NERD tree](https://github.com/scrooloose/nerdtree) - A tree explorer +* [nerdtree-git-plugin](https://github.com/Xuyuanp/nerdtree-git-plugin) - A + plugin of NERDTree showing git status +* [auto-pairs](https://github.com/jiangmiao/auto-pairs) - Insert or delete + brackets, parens, quotes in pair +* [po.vim](http://vim.sourceforge.net/scripts/script.php?script_id=695) - + Easier editing of GNU gettext PO files +* [MatchTagAlways](https://github.com/valloric/MatchTagAlways) - A Vim plugin + that always highlights the enclosing html/xml tags +* [vim-airline](https://github.com/bling/vim-airline) - Light weight status + line utility +* [tabular](https://github.com/godlygeek/tabular) - text filtering and + alignment +* [tcomment_vim](https://github.com/tomtom/tcomment_vim) - An extensible & + universal comment vim-plugin that also handles embedded filetypes +* [vim-unimpaired](https://github.com/tpope/vim-unimpaired) - pairs of handy + bracket mappings +* [vim-multiple-cursors](https://github.com/terryma/vim-multiple-cursors) - + True Sublime Text style multiple selections for Vim +* [splitjoin.vim](https://github.com/AndrewRadev/splitjoin.vim) - A Vim plugin + that simplifies the transition between multiline and single-line code +* [vim-repeat](https://github.com/tpope/vim-repeat) - enable repeating supported plugin maps with "." +* [tsuquyomi](https://github.com/Quramy/tsuquyomi) - A Vim plugin for TypeScript +* [vim-highlightedyank](https://github.com/machakann/vim-highlightedyank) - Make the yanked region apparent! + + +Shortcuts and re-Mappings +---------------------------- + +| Key | Command | +| ---------------------- | ----------------------------------------------------------------- | +| ``jj`` | ```` in insert and command modes | +| ```` | ```` | +| ``v`` | Load `.vimrc` | +| ``V`` | Activate changes to `.vimrc` (Make sure to save it before) | +| ```` | Close current split (window) | +| ```` | Toggle NERD tree | +| ```` | Toggle Tagbar | +| ``S`` | Remove trailing whitespace | +| ``hjkl`` | Window movement commands | +| ``arrow`` | Window movement commands | +| ``d`` | Delete buffer, keep the split | +| ``-``, ``+`` | Resize horizontal splits | +| ``<`` ``>`` | Resize vertical splits | +| ```` | Toggle logical (RTL, e.g: Hebrew) editing | +| ```` | Toggle visual (RTL, e.g: Hebrew) editing | +| ``g/`` | :grep! | +| ``g*`` | :grep! -w current_word | +| ``ga`` | :grepadd! (add results to the current search) | +| ``gr`` | :CtrlPBufTag (fuzzy tag search in current file) | + + +Virtualenv settings +------------------- + +If you're running from virtualenv activated, make sure to point nvim and ale to +correct locations. By default, settings are: + + let g:python3_host_prog = '/usr/bin/python' + let g:ale_python_flake8_executable = '/usr/bin/flake8' + +If needed, override those settings to the locations on your machine. diff --git a/neovim/.config/nvim/installer/install.sh b/neovim/.config/nvim/installer/install.sh new file mode 100755 index 0000000..fb4a016 --- /dev/null +++ b/neovim/.config/nvim/installer/install.sh @@ -0,0 +1,50 @@ +#!/bin/sh + +set -e + +# Install nvim +sudo apt remove vim-tiny vim +sudo apt install neovim fzf silversearcher-ag tmux zathura latexmk + +# Make config directory for Neovim's init.vim +echo '[*] Preparing Neovim config directory ...' +mkdir -p ~/.config/nvim + +# Make nvim_runtime directory +mkdir -p ~/.nvim_runtime +mkdir -p ~/.nvim_runtime/temp_dirs +mkdir -p ~/.nvim_runtime/temp_dirs/swap +mkdir -p ~/.nvim_runtime/temp_dirs/backup +mkdir -p ~/.nvim_runtime/temp_dirs/undodir +mkdir -p ~/.nvim_runtime/temp_dirs/tags +mkdir -p ~/.nvim_runtime/sessions + +# Install nvim (and its dependencies: pip3, git), Python 3 and ctags (for tagbar) +echo '[*] App installing Neovim and its dependencies (Python 3 and git), and dependencies for tagbar (exuberant-ctags) ...' +sudo apt update +sudo apt install -y curl neovim python3 python3-pip git exuberant-ctags global #npm + +# Install virtualenv to containerize dependencies +echo '[*] Pip installing virtualenv to containerize Neovim dependencies (instead of installing them onto your system) ...' +python3 -m pip install virtualenv +python3 -m virtualenv -p python3 ~/.config/nvim/env + +# Install pip modules for Neovim within the virtual environment created +echo '[*] Activating virtualenv and pip installing Neovim (for Python plugin support), libraries for async autocompletion support (jedi, psutil, setproctitle), and library for pep8-style formatting (yapf) ...' +. "${HOME}/.config/nvim/env/bin/activate" +pip3 install neovim pynvim jedi psutil setproctitle yapf +deactivate + +# Install vim-plug plugin manager +echo '[*] Downloading vim-plug, the best minimalistic vim plugin manager ...' +curl -fLo ~/.local/share/nvim/site/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim + +# (Optional but recommended) Install a nerd font for icons and a beautiful lightline bar (https://github.com/ryanoasis/nerd-fonts/tree/master/patched-fonts) +echo "[*] Downloading patch font into ~/.local/share/fonts ..." +curl -fLo ~/.local/share/fonts/Iosevka\ Term\ Nerd\ Font\ Complete.ttf --create-dirs https://github.com/ryanoasis/nerd-fonts/raw/master/patched-fonts/Iosevka/Regular/complete/Iosevka%20Term%20Nerd%20Font%20Complete.ttf + +# Enter Neovim and install plugins using a temporary init.vim, which avoids warnings about missing colorschemes, functions, etc +echo '[*] Running :PlugInstall within nvim ...' +nvim +PlugInstall +qa + +echo "[+] Done, welcome to \\033[1m\\033[92mNeoVim\\033[0m! Try it by running: nvim." diff --git a/neovim/.config/nvim/installer/reference/commands_git.txt b/neovim/.config/nvim/installer/reference/commands_git.txt new file mode 100644 index 0000000..1ac7976 --- /dev/null +++ b/neovim/.config/nvim/installer/reference/commands_git.txt @@ -0,0 +1,24 @@ +# Setup by linking .vimrc and initializing submodules +./install.sh +./patch_fonts.sh # To be performed once only + +# Installing a plugin as a submodule +git submodule add http://github.com/[user]/[plugin] bundle/[plugin-name] +git add . +git commit -m "Installed [plugin] bundle as a submodule." + +# Updating bundled submodule plugins +git submodule foreach git pull origin master +# or update each plugin manually +cd bundles/[plugin] +git pull + +# Removing a plugin +git submodule deinit -f bundle/[plugin-name] +git rm -rf bundle/[plugin-name] +git add . +git commit -m "Removed [plugin] bundle" + +# Pathogen with Submodules Guides +https://gist.github.com/romainl/9970697 +http://vimcasts.org/episodes/synchronizing-plugins-with-git-submodules-and-pathogen/ diff --git a/neovim/.config/nvim/installer/reference/commands_vim.txt b/neovim/.config/nvim/installer/reference/commands_vim.txt new file mode 100644 index 0000000..352b9f0 --- /dev/null +++ b/neovim/.config/nvim/installer/reference/commands_vim.txt @@ -0,0 +1,42 @@ +i - Insert Mode +Shift + a - Insert Mode - Append +o - Insert Mode - New Line After +Shift + Up/Down - Scrolling +:wq - Write and Quit +:e [file] - Edit Another File +gg - Goto First Line +G - Goto Last Line + +u - Undo +Ctrl + r - Redo +. - Repeat Previous Command + +/[word] - Search +n - Search - Next +Shift + n - Search - Previous +/[word], [edit], n, . - Search, modify, next search, repeat for next +:%s/old/new/g - Replace All +:[startline],[endline]s/old/new/g - Replace Between Lines +:%s/^/[word]/g - Append Word to Start of Every Line +:%s/$/[word]/g - Append Word to End of Every Line + +Ctrl + w and v - Splitting Window Vertically +Ctrl + w and Shift + s - Splitting Window Horizontally + +v - Visual Select +Shift + v - Visual Select - Line +Ctrl + v - Visual Select - Block +Shift + v and [number]> - Tab a Line Multiple Times + +d - Delete/Cut +dd - Delete Current Line +d[number]d - Delete Multiple Lines +y - Yank/Copy +p - Paste + +gg=G - Fix All Indentations + +vi" - Select everything within double quotes +va" - Select everything within and including double quotes +vi"d - Delete everything within double quotes +vi"s - Delete everything within double quotes then go into insert mode diff --git a/neovim/.config/nvim/make_basic.sh b/neovim/.config/nvim/make_basic.sh new file mode 100755 index 0000000..b2398ec --- /dev/null +++ b/neovim/.config/nvim/make_basic.sh @@ -0,0 +1,3 @@ +#!/bin/zsh +cat basic_header.vim rc.d/{01-settings,02-theme,10-keymap-general,11-keymap-rtl,31-file-type}.vim > basic.vim +sed -i 's/colorscheme minimalist/colorscheme desert/g' basic.vim diff --git a/neovim/.config/nvim/rc.d/00-plugins.vim b/neovim/.config/nvim/rc.d/00-plugins.vim new file mode 100644 index 0000000..f487e6b --- /dev/null +++ b/neovim/.config/nvim/rc.d/00-plugins.vim @@ -0,0 +1,236 @@ +" ================================================== +" vim-plug setup +" ================================================== +" +call plug#begin('~/.local/share/nvim/plugged') + +" Color schemes and appearance + +Plug 'frankier/neovim-colors-solarized-truecolor-only' +Plug 'chriskempson/base16-vim' +Plug 'drewtempelmeyer/palenight.vim' +"Plug 'kaicataldo/material.vim' +Plug 'dikiaap/minimalist' + +" Appearance +Plug 'ryanoasis/vim-devicons' +Plug 'itchyny/lightline.vim' +Plug 'junegunn/limelight.vim' +Plug 'junegunn/goyo.vim' +Plug 'nathanaelkane/vim-indent-guides' +Plug 'junegunn/vim-journal' +Plug 'luochen1990/rainbow' +Plug 'bling/vim-bufferline' + +" easy way to rezise and exchange windows +Plug 'simeji/winresizer' + + +" General utilities + +Plug 'ctrlpvim/ctrlp.vim' +Plug 'farmergreg/vim-lastplace' +Plug 'tpope/vim-sensible' +Plug 'tpope/vim-surround' +Plug 'scrooloose/nerdtree', { 'on': ['NERDTreeToggle', 'NERDTreeFind']} +Plug 'tiagofumo/vim-nerdtree-syntax-highlight' +Plug 'jistr/vim-nerdtree-tabs' +Plug 'ervandew/supertab' +Plug 'vim-scripts/DrawIt' +Plug 'terryma/vim-multiple-cursors' +Plug 'machakann/vim-highlightedyank' +Plug 'tpope/vim-repeat' +Plug 'junegunn/vim-easy-align' +Plug 'tpope/vim-abolish' +Plug 'Yggdroot/indentLine' +Plug 'chrisbra/Colorizer' +Plug 'heavenshell/vim-pydocstring' +Plug 'vim-scripts/loremipsum' +Plug 'metakirby5/codi.vim' +Plug 'dkarter/bullets.vim' +Plug 'wesQ3/vim-windowswap' +Plug 'benmills/vimux' +Plug 'schickling/vim-bufonly' +Plug 'shougo/echodoc.vim' +Plug 'tpope/vim-sleuth' +"Plug 'tpope/vim-unimpaired' +Plug 'shougo/denite.nvim' +Plug 'wincent/loupe' +Plug 'jez/vim-superman' " Open man with vim using vman (need to be configured in zsh boot) +Plug 'blueyed/vim-diminactive' " Plug to dim not-focused windows +Plug 'lambdalisue/suda.vim' " Write file with sudo +Plug 'junegunn/vim-peekaboo' " Display register values on " and @ +Plug 'yangmillstheory/vim-snipe' " replace f F t T to target easily the motion + +" undo tree +Plug 'simnalamburt/vim-mundo' +" registers +Plug 'bfredl/nvim-miniyank' +" close the current buffer +Plug 'moll/vim-bbye' + + +" Version control support +" +Plug 'tpope/vim-fugitive' +Plug 'mhinz/vim-signify' +Plug 'Xuyuanp/nerdtree-git-plugin' +Plug 'ludovicchabant/vim-lawrencium' +Plug 'junegunn/gv.vim' + +" Programming support +Plug 'tpope/vim-commentary' +Plug 'majutsushi/tagbar' +Plug 'liuchengxu/vista.vim' +Plug 'editorconfig/editorconfig-vim' +Plug 'vim-scripts/Shebang' +Plug 'sirver/ultisnips' +Plug 'honza/vim-snippets' +Plug 'Valloric/MatchTagAlways' +Plug 'amiorin/vim-project' +Plug 'mhinz/vim-startify' +Plug 'AndrewRadev/splitjoin.vim' " Split arrays in PHP / struct in Go / other things + +" Jump to definition +Plug 'ludovicchabant/vim-gutentags' +Plug 'skywind3000/gutentags_plus' +Plug 'skywind3000/vim-preview' + + +" fzf - poweful fuzzy finder +" Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' } +" Plug 'junegunn/fzf.vim' +source /usr/share/doc/fzf/examples/fzf.vim + +" allow multisearch in current directory / multi replace as well +Plug 'wincent/ferret' + +" Generic Programming Support +Plug 'tobyS/vmustache' +Plug 'janko-m/vim-test' +Plug 'maksimr/vim-jsbeautify' +Plug 'HiPhish/repl.nvim' +Plug 'ap/vim-css-color' +Plug 'hail2u/vim-css3-syntax' +Plug 'cakebaker/scss-syntax.vim' +Plug 'vim-scripts/Fold-license' +Plug 'neomake/neomake' +Plug 'joonty/vdebug' +Plug 'ap/vim-css-color' " display the hexadecimal colors - useful for css and color config + +" Polyglot +Plug 'sheerun/vim-polyglot' +Plug 'cespare/vim-toml' +Plug 'chr4/nginx.vim' +Plug 'chr4/nginx.vim' +Plug 'chrisbra/csv.vim' +Plug 'derekwyatt/vim-scala' +Plug 'ekalinin/Dockerfile.vim' +Plug 'elixir-lang/vim-elixir' +Plug 'elzr/vim-json' +Plug 'ericpruitt/tmux.vim' +Plug 'fatih/vim-go', {'for': 'go'} +Plug 'HerringtonDarkholme/yats.vim' +Plug 'jparise/vim-graphql' +Plug 'JuliaEditorSupport/julia-vim' +Plug 'lambdatoast/elm.vim' +Plug 'lifepillar/pgsql.vim' +Plug 'lumiliet/vim-twig', {'for': 'twig'} +Plug 'maelvalais/gmpl.vim' +Plug 'mboughaba/i3config.vim' +Plug 'McSinyx/vim-octave' +Plug 'neovimhaskell/haskell-vim' +Plug 'ocaml/vim-ocaml' +Plug 'ocaml/vim-ocaml' +Plug 'othree/html5.vim' +Plug 'pangloss/vim-javascript' +Plug 'posva/vim-vue' +Plug 'rust-lang/rust.vim' +Plug 'StanAngeloff/php.vim' +Plug 'stephpy/vim-yaml' +Plug 'sudar/vim-arduino-syntax' +Plug 'tbastos/vim-lua' +Plug 'tpope/vim-markdown' +Plug 'udalov/kotlin-vim' +Plug 'vim-perl/vim-perl', { 'for': 'perl', 'do': 'make clean carp dancer highlight-all-pragmas moose test-more try-tiny' } +Plug 'vim-ruby/vim-ruby' +Plug 'vim-scripts/gnuplot-syntax-highlighting' +Plug 'vim-scripts/R.vim' +Plug 'vim-scripts/svg.vim' +Plug 'voldikss/vim-mma' +Plug 'wgwoods/vim-systemd-syntax' +Plug 'wlangstroth/vim-racket' + +" emmet for html +Plug 'mattn/emmet-vim' + +" Markdown / Writting +Plug 'reedes/vim-pencil' +Plug 'jtratner/vim-flavored-markdown' + +" LaTeX +Plug 'lervag/vimtex' + +" Programming languages +Plug 'bfrg/vim-cpp-modern' +Plug 'klen/python-mode' +Plug 'davidhalter/jedi-vim' +Plug 'racer-rust/vim-racer' +Plug 'Quramy/tsuquyomi' +Plug 'groenewege/vim-less' +Plug 'vim-scripts/po.vim--Jelenak' + +" PHP Support +Plug 'phpactor/phpactor' , {'do': 'composer install', 'for': 'php'} +Plug 'vim-php/tagbar-phpctags.vim' +Plug 'tobyS/pdv' +Plug 'stephpy/vim-php-cs-fixer' +Plug 'adoy/vim-php-refactoring-toolbox' +Plug 'Rican7/php-doc-modded' + +" Erlang Support +Plug 'vim-erlang/vim-erlang-tags' +Plug 'vim-erlang/vim-erlang-runtime' +Plug 'vim-erlang/vim-erlang-omnicomplete' +Plug 'vim-erlang/vim-erlang-compiler' + +" Elixir Support +Plug 'avdgaag/vim-phoenix' +Plug 'mmorearty/elixir-ctags' +Plug 'mattreduce/vim-mix' +Plug 'BjRo/vim-extest' +Plug 'frost/vim-eh-docs' +Plug 'slashmili/alchemist.vim' +"Plug 'tpope/vim-endwise' +Plug 'jadercorrea/elixir_generator.vim' +Plug 'mhinz/vim-mix-format' + +" golang development +Plug 'godoctor/godoctor.vim', {'for': 'go'} " refactoring +Plug 'sebdah/vim-delve', {'for': 'go'} " debugger + +" javascript plugins +Plug 'carlitux/deoplete-ternjs', { 'do': 'npm install -g tern' } +Plug 'leafgarland/typescript-vim' + +" For react +Plug 'mxw/vim-jsx' + +" Smart Autocomplete +Plug 'w0rp/ale' +Plug 'kristijanhusak/deoplete-phpactor' +Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' } +Plug 'zchee/deoplete-clang' +Plug 'wokalski/autocomplete-flow' +Plug 'sebastianmarkow/deoplete-rust' +Plug 'shougo/neoinclude.vim' +Plug 'zchee/deoplete-jedi' +Plug 'shougo/neco-vim' +Plug 'othree/csscomplete.vim' +Plug 'othree/xml.vim' +Plug 'c9s/perlomni.vim' +Plug 'artur-shaik/vim-javacomplete2' + +call plug#end() + +" vim:set et sw=2: diff --git a/neovim/.config/nvim/rc.d/01-settings.vim b/neovim/.config/nvim/rc.d/01-settings.vim new file mode 100644 index 0000000..e109082 --- /dev/null +++ b/neovim/.config/nvim/rc.d/01-settings.vim @@ -0,0 +1,222 @@ +" ================================================== +" Basic Settings +" ================================================== +let mapleader="\" " Change the leader to be a space +set cmdheight=2 " Make command line two lines high +set scrolloff=7 " Set 7 lines to the cursor - when moving vertically using j/k +set sidescrolloff=5 " Have some context around the current line always on screen +set cursorline " Have a line indicate the cursor location (slow) +set autoindent " Always set autoindenting on +set smartindent " Set smart indent +set showcmd " Display incomplete commands +set ruler " Show the cursor position all the time +set rulerformat=%30(%=\:b%n%y%m%r%w\ %l,%c%V\ %P%) +set number norelativenumber " Show line numbers +set ttyfast " Smoother changes +set modeline " Last lines in document sets vim mode +set shortmess=atIc " Abbreviate messages +set nostartofline " Don't jump to first character when paging +set backspace=indent,eol,start +set matchpairs+=<:> " Show matching <> (html mainly) as well +set showmatch " Show matching brackets when text indicator is over them +set matchtime=3 " How many tenths of a second to blink when matching brackets +set showmatch " Show matching braces, somewhat annoying... +set history=1000 " Sets how many lines of history VIM has to remember +set showmode " Show the default mode text (e.g. -- INSERT -- below the statusline) +set timeout ttimeoutlen=50 +set updatetime=300 " Smaller updatetime for CursorHold & CursorHoldI +set signcolumn=yes + +set whichwrap+=<,>,h,l,[,] +set fileformats=unix,dos,mac +set encoding=utf-8 +set completeopt=longest,menuone " Preview mode causes flickering +set clipboard+=unnamedplus " Share the system clipboard + +set splitright " Splits to the right +autocmd VimResized * wincmd = " Automatically equalize splits when Vim is resized + +set wildmenu " show list instead of just completing +set wildmode=list:longest,full " command completion, list matches, then longest common part, then all. +set completeopt=menu " Just show the menu upon completion (faster) + +syntax on +set synmaxcol=200 " Syntax highlight only the first 200 chars" +filetype plugin on +filetype indent plugin on + +set colorcolumn=80 +"set colorcolumn=125 " Comfortable _and_ Github's line length + +if has('linebreak') " Break indent wrapped lines + set breakindent + let &showbreak = '↳ ' + set cpo+=n +end + +" Linebreak on 500 characters +set lbr +set tw=80 + + +" ================================================== +" Turn persistent undo on means that you can undo +" even when you close a buffer/VIM +" ================================================== +set directory=~/.nvim_runtime/temp_dirs/swap/ +set backupdir=~/.nvim_runtime/temp_dirs/backup/ +try + set undodir=~/.nvim_runtime/temp_dirs/undodir + set undofile +catch +endtry + + +" ================================================== +" Status line +" ================================================== +" Always show the status line +set laststatus=2 + +" Format the status line +set statusline=\ %{HasPaste()}%F%m%r%h\ %w\ \ CWD:\ %r%{getcwd()}%h\ \ \ Line:\ %l\ \ Column:\ %c + +" Returns true if paste mode is enabled +function! HasPaste() + if &paste + return 'PASTE MODE ' + endif + return '' +endfunction + + +" ================================================== +" Use terminal title as an output +" ================================================== +set title +set titleold="Terminal" +set titlestring=%F + + +" ================================================== +" No annoying sound on errors +" ================================================== +set noerrorbells +set novisualbell +set t_vb= +set tm=500 + +" Properly disable sound on errors on MacVim +if has("gui_macvim") + autocmd GUIEnter * set vb t_vb= +endif + + +" ================================================== +" Tab expanded to 8 spaces +" ================================================== +set tabstop=8 " numbers of spaces of tab character +set shiftwidth=8 " numbers of spaces to (auto)indent +set expandtab " Tab to spaces by default +set softtabstop=8 +set smarttab " Be smart when using tabs ;) + + +" ================================================== +" Search settings +" ================================================== +set hlsearch " highlight searches +set incsearch " do incremental searching +set ignorecase " ignore case when searching +set infercase " smarter completions that will be case aware when ignorecase is on +set smartcase " if searching and search contains upper case, make case sensitive search +set list listchars=trail:»,tab:»- +set fillchars+=vert:\ + + +" ================================================== +" No modelines for security +" ================================================== +set modelines=0 +set nomodeline + + +" ================================================== +" Trailing whitespace handling +" ================================================== + +" Highlight end of line whitespace. +highlight WhitespaceEOL ctermbg=red guibg=red +match WhitespaceEOL /\s\+$/ + + +" ================================================== +" Further settings +" ================================================== + +" Try to display very long lines, rather than showing @ +set display+=lastline + +" show trailing whitespace as -, tabs as >- +set listchars=tab:>-,trail:- +set list + +" Live substitution +set inccommand=split + +if has("nvim") + set laststatus=1 +endif + +" Ignore compiled files +set wildignore=*.o,*~,*.pyc +if has("win16") || has("win32") + set wildignore+=.git\*,.hg\*,.svn\* +else + set wildignore+=*/.git/*,*/.hg/*,*/.svn/*,*/.DS_Store +endif + +" Don't redraw while executing macros (good performance config) +set lazyredraw + +" For regular expressions turn magic on +set magic + +" when at 3 spaces, and I hit > ... go to 4, not 7 +set shiftround + +" number of undo saved in memory +set undolevels=10000 " How many undos +set undoreload=10000 " number of lines to save for undo + +" set list +set list listchars=tab:\┆\ ,trail:·,nbsp:± + +" doesn't prompt a warning when opening a file and the current file was written but not saved +set hidden + +" no swap file! This is just annoying +set noswapfile + +" Fold related +set foldlevelstart=0 " Start with all folds closed + +" Set foldtext +set foldtext=general#FoldText() + +" Show the substitution LIVE +set inccommand=nosplit + +" for vertical pane in git diff tool +set diffopt+=vertical + +autocmd FileType * setlocal formatoptions-=c formatoptions-=r formatoptions-=o + +" Set to auto read when a file is changed from the outside +set autoread + +" indentLine +let g:indentLine_char = '▏' +let g:indentLine_color_gui = '#363949' + +" vim:set et sw=2: diff --git a/neovim/.config/nvim/rc.d/02-theme.vim b/neovim/.config/nvim/rc.d/02-theme.vim new file mode 100644 index 0000000..802b1c0 --- /dev/null +++ b/neovim/.config/nvim/rc.d/02-theme.vim @@ -0,0 +1,85 @@ +" ================================================== +" Color scheme and fonts +" ================================================== +let g:rainbow_active = 1 "set to 0 if you want to enable it later via :RainbowToggle +let g:material_theme_style = 'palenight' + +" disable the mouse - who needs a mouse?? +set mouse-=a +set guicursor= + +" Set font according to system +if has("mac") || has("macunix") + set gfn=IBM\ Plex\ Mono:h14,Hack:h14,Source\ Code\ Pro:h15,Menlo:h15 +elseif has("win16") || has("win32") + set gfn=IBM\ Plex\ Mono:h14,Source\ Code\ Pro:h12,Bitstream\ Vera\ Sans\ Mono:h11 +elseif has("gui_gtk2") + set gfn=IBM\ Plex\ Mono:h14,:Hack\ 14,Source\ Code\ Pro\ 12,Bitstream\ Vera\ Sans\ Mono\ 11 +elseif has("linux") + set gfn=IBM\ Plex\ Mono:h14,:Hack\ 14,Source\ Code\ Pro\ 12,Bitstream\ Vera\ Sans\ Mono\ 11 +elseif has("unix") + set gfn=Monospace\ 11 +endif + +" Disable scrollbars (real hackers don't use scrollbars for navigation!) +set guioptions-=r +set guioptions-=R +set guioptions-=l +set guioptions-=L + +if (has("nvim")) + "For Neovim 0.1.3 and 0.1.4 < https://github.com/neovim/neovim/pull/2198 > + let $NVIM_TUI_ENABLE_TRUE_COLOR=1 +endif + +" Enable 256 colors palette in Gnome Terminal +if $COLORTERM == 'gnome-terminal' + set t_Co=256 +endif + +set background=dark +"colorscheme material +set t_Co=256 +colorscheme minimalist +hi Conceal guifg=#81A1C1 guibg=NONE ctermbg=NONE +let g:palenight_terminal_italics=1 +let g:material_terminal_italics = 1 + +"For Neovim > 0.1.5 and Vim > patch 7.4.1799 < https://github.com/vim/vim/commit/61be73bb0f965a895bfb064ea3e55476ac175162 > +"Based on Vim patch 7.4.1770 (`guicolors` option) < https://github.com/vim/vim/commit/8a633e3427b47286869aa4b96f2bfc1fe65b25cd > +" < https://github.com/neovim/neovim/wiki/Following-HEAD#20160511 > +if (has("termguicolors")) + " Opaque Background (Comment out to use terminal's profile) + set termguicolors +endif + +" Set extra options when running in GUI mode +if has("gui_running") + set guioptions-=T + set guioptions-=e + set t_Co=256 + set guitablabel=%M\ %t +endif + +highlight Pmenu guibg=white guifg=black gui=bold +highlight Comment gui=bold +highlight Normal gui=none +highlight NonText guibg=none + +" Transparent Background (For i3 and compton) +highlight Normal guibg=NONE ctermbg=NONE +highlight LineNr guibg=NONE ctermbg=NONE + +"" This will repair colors in Tmux. +let &t_8f = "\[38;2;%lu;%lu;%lum" +let &t_8b = "\[48;2;%lu;%lu;%lum" + +"" Tmuxline +let g:tmuxline_theme = 'vim_statusline_3' +let g:tmuxline_preset = 'tmux' + +"" Bufferline +let g:bufferline_echo = 0 " This will keep your messages from getting quickly hidden. + + +" vim:set et sw=2: diff --git a/neovim/.config/nvim/rc.d/10-keymap-general.vim b/neovim/.config/nvim/rc.d/10-keymap-general.vim new file mode 100644 index 0000000..63ab649 --- /dev/null +++ b/neovim/.config/nvim/rc.d/10-keymap-general.vim @@ -0,0 +1,326 @@ +" ================================================== +" Basic Mappings +" ================================================== + +" Maps for jj to act as Esc in insert and command modes +ino jj +cno jj + +" One can map ctrl-c to something else if needed +map +imap + +" Smarter j/k navigation +" Convert the j and k movement commands from strict linewise movements to +" onscreen display line movements via the gj and gk commands. When +" preceded with a count we want to go back to strict linewise movements. +" will automatically save movements larger than 5 lines to the jumplist. +nnoremap j v:count ? (v:count > 5 ? "m'" . v:count : '') . 'j' : 'gj' +nnoremap k v:count ? (v:count > 5 ? "m'" . v:count : '') . 'k' : 'gk' + +" Center next/previous matched string +nnoremap n nzz +nnoremap N Nzz + +" Save session +exec 'nnoremap ss :mksession! ~/.nvim_runtime/sessions/*.vim' +" Reload session +exec 'nnoremap sl :so ~/.nvim_runtime/sessions/*.vim' + +" quick make +map :make + +" simple pasting from the system clipboard +" http://tilvim.com/2014/03/18/a-better-paste.html +map p :set pasteo"+]p:set nopaste + +" Quickly save, quit, or save-and-quit +map w :w +map x :x +map q :q + +" un-highlight when esc is pressed +map :noh + + +" Quickly toggle relative line numbers +function ToggleRelativeLineNumbers() + set invnumber + set invrelativenumber +endfunction +nnoremap l :call ToggleRelativeLineNumbers() +" Toggle between absolute -> relative line number +"nnoremap :let [&nu, &rnu] = [&nu, &nu+&rnu==1] + + +" Save files as root +cnoremap w!! execute ':w suda://%' + +" ================================================== +" vimrc handling +" ================================================== + +" ,v loads .vimrc +" ,V reloads .vimrc -- activating changes (needs save) +map v :sp ~/.config/nvim/init.vim_ +map V :source ~/.config/nvim/init.vim:filetype detect:exe ":echo 'vimrc reloaded'" + +" ================================================== +" Window navigation +" ================================================== + +" control + vim direction key to navigate windows +noremap j +noremap k +noremap h +noremap l + +" control + arrow key to navigate windows +noremap j +noremap k +noremap h +noremap l + +" close all windows except the current one +nnoremap wco :only +nnoremap wcc :cclose + +" windows creation +" create window on the bottom +nnoremap wb s +" create vertival window +nnoremap wv v + +" " arrow keys resize windows +" nnoremap :vertical resize -10 +" nnoremap :vertical resize +10 +" nnoremap :resize -10 +" nnoremap :resize +10 +" imap +" imap +" imap +" imap + +" ================================================== +" Splits handling +" ================================================== + +" Make these all work in insert mode +imap + +" - and + to resize horizontal splits +map - - +map + + + +" alt-< or alt-> for vertical splits +map > +map < + +" F2 close current split (window) +noremap :close + +" Deleter buffer, keep the split (switch to prev buf, delete now prev buf) +nmap d :b#bd# + +" ================================================== +" Tab navigation +" ================================================== +map to :tabonly +map tc :tabclose +map tm :tabmove +nnoremap tn :tabnew +nnoremap th :tabfirst +nnoremap tk :tabnext +nnoremap tj :tabprev +nnoremap tl :tablast + +" move tab to first position +nnoremap tF :tabm 0 +nnoremap tL :tabm + +" Navigate tabs with shift-{h,l} +noremap gt +noremap gT + +" Let 'tl' toggle between this and the last accessed tab +let g:lasttab = 1 +nmap tl :exe "tabn ".g:lasttab +au TabLeave * let g:lasttab = tabpagenr() + +" Opens a new tab with the current buffer's path +" Super useful when editing files in the same directory +map te :tabedit =expand("%:p:h")/ + +" Switch CWD to the directory of the open buffer +map cd :cd %:p:h:pwd + +" Specify the behavior when switching between buffers +try + set switchbuf=useopen,usetab,newtab + set stal=2 +catch +endtry + +" ================================================== +" Buffer navigation +" ================================================== +nmap :bnext +nmap :bprevious + +" ================================================== +" Clean all end of line whitespace with S +" ================================================== +":nnoremap S :let _s=@/:%s/\s\+$//e:let @/=_s:nohl +fun! TrimWhitespace() + let l:save = winsaveview() + keeppatterns %s/\s\+$//e + call winrestview(l:save) +endfun +:nnoremap S :call TrimWhitespace() + +" ================================================== +" Visual mode related +" ================================================== +" Visual mode pressing * or # searches for the current selection +" Super useful! From an idea by Michael Naumann +vnoremap * :call VisualSelection('', '')/=@/ +vnoremap # :call VisualSelection('', '')?=@/ + +function! VisualSelection(direction, extra_filter) range + let l:saved_reg = @" + execute "normal! vgvy" + + let l:pattern = escape(@", "\\/.*'$^~[]") + let l:pattern = substitute(l:pattern, "\n$", "", "") + + if a:direction == 'gv' + call CmdLine("Ack '" . l:pattern . "' " ) + elseif a:direction == 'replace' + call CmdLine("%s" . '/'. l:pattern . '/') + endif + + let @/ = l:pattern + let @" = l:saved_reg +endfunction + + +" ================================================== +" Editing mappings +" ================================================== +" Remap VIM 0 to first non-blank character +map 0 ^ + +" Move a line of text using ALT+[jk] or Command+[jk] on mac +nmap mz:m+`z +nmap mz:m-2`z +vmap :m'>+`mzgv`yo`z +vmap :m'<-2`>my` + nmap + vmap + vmap +endif + +" ================================================== +" Spell checking +" ================================================== +" Pressing ,ss will toggle and untoggle spell checking +map ss :setlocal spell! + +" Shortcuts using +map sn ]s +map sp [s +map sa zg +map s? z= + +" ================================================== +" Other Configurations +" ================================================== + +" Remove the Windows ^M - when the encodings gets messed up +noremap m mmHmt:%s///ge'tzt'm + +" Quickly open a buffer for scribble +map q :e ~/buffer + +" Quickly open a markdown buffer for scribble +map x :e ~/buffer.md + +" Toggle paste mode on and off +map pp :setlocal paste! + +noremap :Denite buffer file_rec tag + +xmap a gaip* +nmap t sj:terminal +nmap vt vl:terminal +nmap g :Goyo +nmap j :set filetype=journal +nmap l :Limelight!! +autocmd FileType python nmap x :0,$!~/.config/nvim/env/bin/python -m yapf + +vmap !boxes -d stone + +" surround by quotes - frequently use cases of vim-surround +map " ysiw" +map ' ysiw' + +" Act like D and C +nnoremap Y y$ + +" indent without kill the selection in vmode +vmap < >gv + +" remap the annoying u in visual mode +vmap u y + +" shortcut to substitute current word under cursor +nnoremap [ :%s///g + +" Change in next bracket +nmap cinb cib + +" Visual mode pressing * or # searches for the current selection +" Super useful! From an idea by Michael Naumann +vnoremap * :call general#VisualSelection('', '')/=@/ +vnoremap # :call general#VisualSelection('', '')?=@/ + +" delete character after cursor in insert mode +inoremap + +" highlight the line which is longer than the defined margin (120 character) +highlight MaxLineChar ctermbg=red +autocmd FileType php,js,vue,go call matchadd('MaxLineChar', '\%120v', 100) + +" open devdocs.io with waterfox and search the word under the cursor +command! -nargs=? DevDocs :call system('type -p open >/dev/null 2>&1 && open https://devdocs.io/#q= || waterfox -url https://devdocs.io/#q=') +autocmd FileType python,ruby,rspec,javascript,go,html,php,eruby,coffee,haml nmap D :exec "DevDocs " . fnameescape(expand('')) + +" Markdown +autocmd BufNewFile,BufFilePre,BufRead *.md set filetype=markdown + +" Keep the cursor in place while joining lines +nnoremap J mzJ`z + +" Quit neovim terminal +tnoremap + +" Open images with feh +autocmd BufEnter *.png,*.jpg,*gif silent! exec "! feh ".expand("%") | :bw + +" A |Dict| specifies the matcher for filtering and sorting the completion candidates. +let g:cm_matcher={'module': 'cm_matchers.abbrev_matcher', 'case': 'smartcase'} + +" Disable anoying ex mode +nnoremap Q + +" Neovim :Terminal +tmap +tmap +autocmd BufWinEnter,WinEnter term://* startinsert +autocmd BufLeave term://* stopinsert + +" vim:set et sw=2: diff --git a/neovim/.config/nvim/rc.d/11-keymap-rtl.vim b/neovim/.config/nvim/rc.d/11-keymap-rtl.vim new file mode 100644 index 0000000..a16b4b3 --- /dev/null +++ b/neovim/.config/nvim/rc.d/11-keymap-rtl.vim @@ -0,0 +1,17 @@ +" ================================================== +" Right-to-Left (Hebrew etc) shortcuts +" ================================================== + +" toggle direction mapping +" this is useful for logical-order editing +map :set invrl +" do it when in insert mode as well (and return to insert mode) +imap :set invrla + +" toggle reverse insertion +" this is useful for visual-order editing +map :set invrevins +" do it when in insert mode as well (and return to insert mode) +imap :set invrevinsa + +" vim:set et sw=2: diff --git a/neovim/.config/nvim/rc.d/20-ale.vim b/neovim/.config/nvim/rc.d/20-ale.vim new file mode 100644 index 0000000..d513954 --- /dev/null +++ b/neovim/.config/nvim/rc.d/20-ale.vim @@ -0,0 +1,68 @@ +" =================================================================== +" ale (Asynchronous Lint Engine) settings +" =================================================================== + +" Syntax / File Support +"" Enable JSDoc syntax highlighting +let g:javascript_plugin_jsdoc = 1 + +"" Add an error indicator to Ale +let g:ale_sign_column_always = 1 + +function! LinterStatus() abort + let l:counts = ale#statusline#Count(bufnr('')) + + let l:all_errors = l:counts.error + l:counts.style_error + let l:all_non_errors = l:counts.total - l:all_errors + + return l:counts.total == 0 ? 'OK' : printf( + \ '%dW %dE', + \ all_non_errors, + \ all_errors + \) +endfunction + +set statusline=%{LinterStatus()} + +nmap e (ale_next_wrap) +nmap q (ale_previous_wrap) + +" Ale +let g:ale_lint_on_enter = 0 +let g:ale_lint_on_text_changed = 'never' +let g:ale_echo_msg_error_str = 'E' +let g:ale_echo_msg_warning_str = 'W' +let g:ale_echo_msg_format = '[%linter%] %s [%severity%]' +let g:ale_open_list = 1 +let g:ale_keep_list_window_open=0 +let g:ale_set_quickfix=0 +let g:ale_list_window_size = 5 +let g:ale_linters = {'python': ['flake8']} +let g:ale_sign_error = '✖' +let g:ale_sign_warning = '⚠' +let g:ale_fixers = { + \ '*': ['remove_trailing_lines', 'trim_whitespace'], + \} +" \ 'php': ['phpcbf', 'php_cs_fixer', 'remove_trailing_lines', 'trim_whitespace'], +let g:ale_fix_on_save = 1 + +" Use system flake8 +let g:ale_python_flake8_executable = '/usr/bin/flake8' + +" Append our Neovim virtualenv to the list of venvs ale searches for +" The search is performed from the buffer directory up, until a name match is +" found; our Neovim venv lives in ~/.nvim-venv +let g:ale_virtualenv_dir_names = ['.env', '.venv', 'env', 'virtualenv', 'venv', '.nvim-venv'] +" Explicitly list linters we care about +let g:ale_linters = {'python': ['flake8', 'pylint']} +" Only show warnings and errors from pylint +let g:ale_python_pylint_options = '--disable C,R' +let g:ale_sign_warning = '→' +let g:ale_sign_error = '→' + +" PHP Support +let g:ale_php_phpcbf_standard='PSR2' +let g:ale_php_phpcs_standard='phpcs.xml.dist' +let g:ale_php_phpmd_ruleset='phpmd.xml' + +" vim:set et sw=2: diff --git a/neovim/.config/nvim/rc.d/20-ctrlp.vim b/neovim/.config/nvim/rc.d/20-ctrlp.vim new file mode 100644 index 0000000..61696c6 --- /dev/null +++ b/neovim/.config/nvim/rc.d/20-ctrlp.vim @@ -0,0 +1,48 @@ +" ================================================== +" CtrlP +" ================================================== + +let g:ctrlp_working_path_mode = 'ra' +let g:ctrlp_custom_ignore = { + \ "dir": '\v[\/]\.(git|hg|svn)$', + \ "file": '\v\.(exe|so|dll|jpeg|jpg|png|gif)' + \ } +let g:ctrlp_match_window = 'bottom,order:btt,min:1,max:15,results:30' + +" ================================================== +" gr opens Fuzzy tags search +" ================================================== +nmap gr :CtrlPBufTag +let g:ctrlp_buftag_types = { + \ 'go' : '--language-force=go --golang-types=ftv', + \ 'coffee' : '--language-force=coffee --coffee-types=cmfvf', + \ 'markdown' : '--language-force=markdown --markdown-types=hik', + \ 'objc' : '--language-force=objc --objc-types=mpci', + \ 'rc' : '--language-force=rust --rust-types=fTm' + \ } + +" ================================================== +" Use ag for ctrlp if available +" ================================================== +if executable('ag') + map f :Ag + " Use Ag over Grep + set grepprg="ag -i --nogroup --nocolor" + + " Use Ag over Ack + let g:ackprg='ag -i --nogroup --nocolor --column' + + " Use ag in CtrlP for listing files. Lightning fast and respects .gitignore + let g:ctrlp_user_command='ag -i %s -l --nocolor -g ""' +endif + +" ================================================== +" Use ripgrep for ctrlp if available +" ================================================== +if executable('rg') + set grepprg=rg\ --color=never + let g:ctrlp_user_command = 'rg %s --files --color=never --glob ""' + let g:ctrlp_use_caching = 0 +endif + +" vim:set et sw=2: diff --git a/neovim/.config/nvim/rc.d/20-deoplete.vim b/neovim/.config/nvim/rc.d/20-deoplete.vim new file mode 100644 index 0000000..62c819c --- /dev/null +++ b/neovim/.config/nvim/rc.d/20-deoplete.vim @@ -0,0 +1,47 @@ +" =================================================================== +" Deoplete +" =================================================================== + +" Autocomplete +call deoplete#custom#option('sources', {'php' : ['omni', 'phpactor', 'ultisnips', 'buffer']}) +let g:deoplete#enable_at_startup = 1 + +" disable autocomplete +let g:deoplete#disable_auto_complete = 1 +if has("gui_running") + inoremap deoplete#mappings#manual_complete() +else + inoremap deoplete#mappings#manual_complete() +endif + +" deoplete + neosnippet + autopairs changes +let g:AutoPairsMapCR=0 +call deoplete#custom#option('auto_complete_start_length', 1) +call deoplete#custom#option('enable_at_startup', 1) +call deoplete#custom#option('enable_smart_case', 1) + +"" Deoplete per-autocompleter settings + +""" Java +autocmd FileType java setlocal omnifunc=javacomplete#Complete + +""" Omnifunctions +call deoplete#custom#var('omni', 'functions', { +\ 'java' : 'eclim#java#complete#CodeComplete', +\ 'javascript' : [ + \ 'tern#Complete', + \ 'autocomplete_flow#Complete', + \ 'javascriptcomplete#CompleteJS' + \], +\ 'css' : ['csscomplete#CompleteCSS'], +\ 'html' : [ + \ 'htmlcomplete#CompleteTags', + \ 'xmlcomplete#CompleteTags' + \], +\ 'xml' : ['xmlcomplete#CompleteTags'], +\ 'perl' : ['perlomni#PerlComplete'], +\}) + +let g:EclimCompletionMethod = 'omnifunc' + +" vim:set et sw=2: diff --git a/neovim/.config/nvim/rc.d/20-goyo.vim b/neovim/.config/nvim/rc.d/20-goyo.vim new file mode 100644 index 0000000..3243ea0 --- /dev/null +++ b/neovim/.config/nvim/rc.d/20-goyo.vim @@ -0,0 +1,10 @@ +" ================================================== +" Goyo +" ================================================== + +autocmd! User GoyoEnter Limelight +autocmd! User GoyoLeave Limelight! +let g:limelight_conceal_ctermfg = 100 +let g:limelight_conceal_guifg = '#83a598' + +" vim:set et sw=2: diff --git a/neovim/.config/nvim/rc.d/20-grep.vim b/neovim/.config/nvim/rc.d/20-grep.vim new file mode 100644 index 0000000..8b5bd23 --- /dev/null +++ b/neovim/.config/nvim/rc.d/20-grep.vim @@ -0,0 +1,40 @@ +" ================================================== +" Setup grep shortcuts and use ripgrep if available +" ================================================== + +nmap g/ :grep! +nmap g* :grep! -w +nmap ga :grepadd! +if executable("rg") + set grepprg=rg\ --vimgrep\ --no-heading + set grepformat=%f:%l:%c:%m,%f:%l:%m +endif + +" Auto open grep quickfix window +autocmd QuickFixCmdPost *grep* cwindow + +" Search from the git repo root, if we're in a repo, else the cwd +function FuzzyFind(show_hidden) + " Contains a null-byte that is stripped. + let gitparent=system('git rev-parse --show-toplevel')[:-2] + if a:show_hidden + let $FZF_DEFAULT_COMMAND = g:fzf_default_command . ' --hidden' + else + let $FZF_DEFAULT_COMMAND = g:fzf_default_command + endif + if empty(matchstr(gitparent, '^fatal:.*')) + silent execute ':FZF -m ' . gitparent + else + silent execute ':FZF -m .' + endif +endfunction + +nnoremap :call FuzzyFind(0) +nnoremap :call FuzzyFind(1) + +" Use rg to perform the search, so that .gitignore files and the like are +" respected +let g:fzf_default_command = 'rg --files' + + +" vim:set et sw=2: diff --git a/neovim/.config/nvim/rc.d/20-gutentags.vim b/neovim/.config/nvim/rc.d/20-gutentags.vim new file mode 100644 index 0000000..26d2da6 --- /dev/null +++ b/neovim/.config/nvim/rc.d/20-gutentags.vim @@ -0,0 +1,11 @@ +" =================================================================== +" Gutentags +" =================================================================== + +" Jump to definition (if anyone knows how to make this work properly...) +let g:gutentags_modules = ['ctags', 'gtags_cscope'] +let g:gutentags_project_root = ['.root', '.git'] +let g:gutentags_plus_switch = 1 +map :CtrlPTagw + +" vim:set et sw=2: diff --git a/neovim/.config/nvim/rc.d/20-lightline.vim b/neovim/.config/nvim/rc.d/20-lightline.vim new file mode 100644 index 0000000..3d22d48 --- /dev/null +++ b/neovim/.config/nvim/rc.d/20-lightline.vim @@ -0,0 +1,16 @@ +" ================================================== +" lightline +" ================================================== +let g:lightline = { 'colorscheme': 'material_vim' } + +let g:lightline.active = { + \ 'left': [ [ 'mode', 'paste' ], [ 'readonly', 'filename','gitbranch', 'modified', 'neospinner'] ], + \ 'right': [ [ 'lineinfo' ], [ 'percent', 'wordcount', 'charcount' ], [ 'fileformat', 'fileencoding', 'filetype', 'charvaluehex' ] ] + \ } +let g:lightline.component = { + \ 'charvaluehex': '0x%B', + \ 'readonly': '%{&readonly?"⭤":""}' + \ } +let g:lightline.colorscheme = 'palenight' + +" vim:set et sw=2: diff --git a/neovim/.config/nvim/rc.d/20-neomake.vim b/neovim/.config/nvim/rc.d/20-neomake.vim new file mode 100644 index 0000000..8b854f1 --- /dev/null +++ b/neovim/.config/nvim/rc.d/20-neomake.vim @@ -0,0 +1,216 @@ +" +---------+ +" | General | +" +---------+ + +" Neomake signs in the gutter +let g:neomake_error_sign = {'text': '', 'texthl': 'NeomakeErrorSign'} +let g:neomake_warning_sign = { + \ 'text': '', + \ 'texthl': 'NeomakeWarningSign', + \ } +let g:neomake_message_sign = { + \ 'text': '', + \ 'texthl': 'NeomakeWarningSign', + \ } +let g:neomake_info_sign = {'text': 'ℹ', 'texthl': 'NeomakeInfoSign'} + +" update neomake when save file +if isdirectory($HOME . "/nvim/plugged/neomake") + call neomake#configure#automake('w') +endif + + +" +-----+ +" | PHP | +" +-----+ +" standard phpcs config +let g:neomake_php_phpcs_args_standard = 'PSR2' + +" display warning for phpcs error +function! SetWarningType(entry) + let a:entry.type = 'W' +endfunction + +function! SetErrorType(entry) + let a:entry.type = 'E' +endfunction + +function! SetMessageType(entry) + let a:entry.type = 'M' +endfunction + +let g:neomake_php_enabled_makers = ['phpmd', 'phpcs', 'phpstan', 'php'] + +let g:neomake_php_phpcs_maker = { + \ 'args': ['--report=csv', '--standard=PSR2'], + \ 'errorformat': + \ '%-GFile\,Line\,Column\,Type\,Message\,Source\,Severity%.%#,'. + \ '"%f"\,%l\,%c\,%t%*[a-zA-Z]\,"%m"\,%*[a-zA-Z0-9_.-]\,%*[0-9]%.%#', + \ 'postprocess': function('SetWarningType'), + \ } + +let g:neomake_php_phpstan_maker = { + \ 'args': ['analyse', '--error-format', 'raw', '--no-progress', '--level', '7'], + \ 'errorformat': '%W%f:%l:%m', + \ 'postprocess': function('SetWarningType'), + \ } + +let g:neomake_php_php_maker = { + \ 'args': ['-l', '-d', 'display_errors=1', '-d', 'log_errors=0', + \ '-d', 'xdebug.cli_color=0'], + \ 'errorformat': + \ '%-GNo syntax errors detected in%.%#,'. + \ '%EParse error: %#syntax error\, %m in %f on line %l,'. + \ '%EParse error: %m in %f on line %l,'. + \ '%EFatal error: %m in %f on line %l,'. + \ '%-G\s%#,'. + \ '%-GErrors parsing %.%#', + \ 'output_stream': 'stdout', + \ 'postprocess': function('SetErrorType'), + \ } + +let g:neomake_php_phpmd_maker = { + \ 'args': ['%:p', 'text', 'cleancode,codesize,design,unusedcode,naming'], + \ 'errorformat': '%W%f:%l%\s%\s%#%m', + \ 'postprocess': function('SetMessageType'), + \ } + + +" +------------+ +" | Javascript | +" +------------+ +let g:neomake_javascript_enabled_makers = ['eslint'] + +" Use the fix option of eslint +let g:neomake_javascript_eslint_args = ['-f', 'compact', '--fix'] + +" Callback for reloading file in buffer when eslint has finished and maybe has +" autofixed some stuff +function! s:Neomake_callback(options) + if (a:options.name ==? 'eslint') && (a:options.has_next == 0) + " execute('checktime ' . bufname('%')) + execute('edit') + endif +endfunction + +" Call neomake#Make directly instead of the Neomake provided command +autocmd BufWritePost *.js,*.jsx :silent :call neomake#Make(1, [], function('s:Neomake_callback')) + + +" +--------+ +" | Golang | +" +--------+ +let g:neomake_go_enabled_makers = [ 'go', 'golangcifast' ] +let g:neomake_go_golangci_maker = { + \ 'exe': 'golangci-lint', + \ 'args': [ 'run', '--enable=unparam' ], + \ 'append_file': 0, + \ 'cwd': '%:h', + \ 'postprocess': function('SetWarningType') + \ } + +let g:neomake_go_golangcifast_maker = { + \ 'exe': 'golangci-lint', + \ 'args': [ 'run', '--fast', ], + \ 'append_file': 0, + \ 'cwd': '%:h', + \ 'postprocess': function('SetWarningType') + \ } + +let g:neomake_go_gometalinter_maker = { + \ 'args': [ + \ '--disable-all', + \ '--fast', + \ '--enable=deadcode', + \ '--enable=unparam', + \ '--enable=unused', + \ '--enable=errcheck', + \ ], + \ 'append_file': 0, + \ 'cwd': '%:h', + \ 'errorformat': + \ '%f:%l:%c:%t%*[^:]: %m,' . + \ '%f:%l::%t%*[^:]: %m', + \ 'postprocess': function('SetWarningType') + \ } + +let g:go_fmt_options = { + \ 'gofmt': '-s', + \ } + +nnoremap gg :Neomake +autocmd FileType go nmap go :exec "Neomake golangci" + + +" +-----+ +" | SQL | +" +-----+ +let g:neomake_sql_enabled_makers = ['sqlint'] + + +" +------+ +" | YAML | +" +------+ +let g:neomake_yaml_enabled_makers = [ 'yamllint' ] + + +" +---------------+ +" | Racket (Lisp) | +" +---------------+ +let g:neomake_scheme_enabled_makers = ['raco'] + +let g:neomake_scheme_raco_maker = { + \ 'exe': 'raco', + \ 'args': ['expand'], + \ 'errorformat': '%-G %.%#,%E%f:%l:%c: %m' + \ } + +" Spinner??? OMG +let s:spinner_index = 0 +let s:active_spinners = 0 +let s:spinner_states = ['|', '/', '--', '\', '|', '/', '--', '\'] +let s:spinner_states = ['┤', '┘', '┴', '└', '├', '┌', '┬', '┐'] +let s:spinner_states = ['←', '↑', '→', '↓'] +let s:spinner_states = ['d', 'q', 'p', 'b'] +let s:spinner_states = ['■', '□', '▪', '▫', '▪', '□', '■'] +let s:spinner_states = ['→', '↘', '↓', '↙', '←', '↖', '↑', '↗'] +let s:spinner_states = ['.', 'o', 'O', '°', 'O', 'o', '.'] + +function! StartSpinner() + let b:show_spinner = 1 + let s:active_spinners += 1 + if s:active_spinners == 1 + let s:spinner_timer = timer_start(1000 / len(s:spinner_states), 'SpinSpinner', {'repeat': -1}) + endif +endfunction + +function! StopSpinner() + let b:show_spinner = 0 + let s:active_spinners -= 1 + if s:active_spinners == 0 + :call timer_stop(s:spinner_timer) + endif +endfunction + +function! SpinSpinner(timer) + let s:spinner_index = float2nr(fmod(s:spinner_index + 1, len(s:spinner_states))) + redraw +endfunction + +function! SpinnerText() + if get(b:, 'show_spinner', 0) == 0 + return " " + endif + + return s:spinner_states[s:spinner_index] +endfunction + +augroup neomake_hooks + au! + autocmd User NeomakeJobInit :call StartSpinner() + autocmd User NeomakeFinished :call StopSpinner() + " autocmd User NeomakeFinished :echom "Build complete" +augroup END + + +" vim:set et sw=2: diff --git a/neovim/.config/nvim/rc.d/20-nerdtree.vim b/neovim/.config/nvim/rc.d/20-nerdtree.vim new file mode 100644 index 0000000..66df12b --- /dev/null +++ b/neovim/.config/nvim/rc.d/20-nerdtree.vim @@ -0,0 +1,11 @@ +" ================================================== +" NERDTree +" ================================================== + +let NERDTreeIgnore = ['\.pyc$', '\.pyo$'] +map :NERDTreeToggle +let NERDTreeShowHidden=1 +let g:NERDTreeDirArrowExpandable = '↠' +let g:NERDTreeDirArrowCollapsible = '↡' + +" vim:set et sw=2: diff --git a/neovim/.config/nvim/rc.d/20-peartree.vim b/neovim/.config/nvim/rc.d/20-peartree.vim new file mode 100644 index 0000000..7436a02 --- /dev/null +++ b/neovim/.config/nvim/rc.d/20-peartree.vim @@ -0,0 +1,9 @@ +" ================================================== +" Pear Tree +" ================================================== + +let g:pear_tree_smart_openers=1 +let g:pear_tree_smart_closers=1 +let g:pear_tree_smart_backspace=1 + +" vim:set et sw=2: diff --git a/neovim/.config/nvim/rc.d/20-php-refactoring.vim b/neovim/.config/nvim/rc.d/20-php-refactoring.vim new file mode 100644 index 0000000..6c14145 --- /dev/null +++ b/neovim/.config/nvim/rc.d/20-php-refactoring.vim @@ -0,0 +1,10 @@ +" ================================================== +" PHP refactoring +" ================================================== + +let g:vim_php_refactoring_default_property_visibility = 'private' +let g:vim_php_refactoring_default_method_visibility = 'private' +let g:vim_php_refactoring_auto_validate_visibility = 1 +let g:vim_php_refactoring_phpdoc = "pdv#DocumentCurrentLine" + +" vim:set et sw=2: diff --git a/neovim/.config/nvim/rc.d/20-python-mode.vim b/neovim/.config/nvim/rc.d/20-python-mode.vim new file mode 100644 index 0000000..d6db55e --- /dev/null +++ b/neovim/.config/nvim/rc.d/20-python-mode.vim @@ -0,0 +1,13 @@ +" ================================================== +" Disable python-mode rope completion (using Jedi) +" Disable folding +" Don't trim whitespace on save +" ================================================== +let g:pymode_rope_completion = 0 +let g:pymode_folding = 0 +let g:pymode_rope = 0 +let g:pymode_trim_whitespaces = 0 +let g:pymode_lint = 0 +let g:pymode_doc = 0 + +" vim:set et sw=2: diff --git a/neovim/.config/nvim/rc.d/20-supertab.vim b/neovim/.config/nvim/rc.d/20-supertab.vim new file mode 100644 index 0000000..b7828cd --- /dev/null +++ b/neovim/.config/nvim/rc.d/20-supertab.vim @@ -0,0 +1,7 @@ +" ================================================== +" SuperTab +" ================================================== + +let g:SuperTabDefaultCompletionType = "" + +" vim:set et sw=2: diff --git a/neovim/.config/nvim/rc.d/20-tagbar.vim b/neovim/.config/nvim/rc.d/20-tagbar.vim new file mode 100644 index 0000000..c9e6e57 --- /dev/null +++ b/neovim/.config/nvim/rc.d/20-tagbar.vim @@ -0,0 +1,38 @@ +" ================================================== +" Tagbar Mapping +" ================================================== + +nmap :TagbarToggle + +let g:tagbar_width = 30 +let g:tagbar_iconchars = ['↠', '↡'] +let g:tagbar_autofocus = 1 + +let g:tagbar_type_go = { + \ 'ctagstype' : 'go', + \ 'kinds' : ['p:package', 'i:imports:1', 'c:constants', 'v:variables', 't:types', 'n:interfaces', 'w:fields', 'e:embedded', 'm:methods', 'r:constructor', 'f:functions'], + \ 'sro' : '.', + \ 'kind2scope' : {'t' : 'ctype', 'n' : 'ntype'}, + \ 'scope2kind' : {'ctype' : 't', 'ntype' : 'n'}, + \ 'ctagsbin' : 'gotags', + \ 'ctagsargs' : '-sort -silent' + \ } + +let g:tagbar_type_rust = { + \ 'ctagstype' : 'rust', + \ 'kinds' : [ + \'T:types,type definitions', + \'f:functions,function definitions', + \'g:enum,enumeration names', + \'s:structure names', + \'m:modules,module names', + \'c:consts,static constants', + \'t:traits', + \'i:impls,trait implementations', + \] + \} + +" PHP Support +let g:tagbar_phpctags_bin='~/.local/bin/phpctags' + +" vim:set et sw=2: diff --git a/neovim/.config/nvim/rc.d/20-ultisnips.vim b/neovim/.config/nvim/rc.d/20-ultisnips.vim new file mode 100644 index 0000000..d10b76f --- /dev/null +++ b/neovim/.config/nvim/rc.d/20-ultisnips.vim @@ -0,0 +1,6 @@ +" better key bindings for UltiSnipsExpandTrigger +let g:UltiSnipsExpandTrigger="" +let g:UltiSnipsJumpForwardTrigger="" +let g:UltiSnipsJumpBackwardTrigger="" + +" vim:set et sw=2: diff --git a/neovim/.config/nvim/rc.d/20-vdebug.vim b/neovim/.config/nvim/rc.d/20-vdebug.vim new file mode 100644 index 0000000..58fda95 --- /dev/null +++ b/neovim/.config/nvim/rc.d/20-vdebug.vim @@ -0,0 +1,29 @@ +" Debug +if !exists('g:vdebug_options') + let g:vdebug_options = {} +endif +let g:vdebug_options['break_on_open'] = 0 +let g:vdebug_options['watch_window_style'] = 'compact' +let g:vdebug_options["port"] = 9000 +let g:vdebug_keymap = { + \ "run" : "", + \ "run_to_cursor" : "", + \ "step_over" : "", + \ "step_into" : "", + \ "step_out" : "", + \ "close" : "", + \ "detach" : "", + \ "set_breakpoint" : "", + \ "get_context" : "", + \ "eval_under_cursor" : "", + \ "eval_visual" : "", + \} +" map the project when used in a vagrant / vm | vm path : host past +let g:vdebug_options["path_maps"] = { + \} + +" redefine the characters +autocmd VimEnter * sign define breakpt text= texthl=DbgBreakptSign linehl=DbgBreakptLine +autocmd VimEnter * sign define current text= texthl=DbgCurrentSign linehl=DbgCurrentLine + +" vim:set et sw=2: diff --git a/neovim/.config/nvim/rc.d/20-vim-go.vim b/neovim/.config/nvim/rc.d/20-vim-go.vim new file mode 100644 index 0000000..582d8bc --- /dev/null +++ b/neovim/.config/nvim/rc.d/20-vim-go.vim @@ -0,0 +1,20 @@ +" fatih/vim-go +let g:go_highlight_build_constraints = 1 +let g:go_highlight_extra_types = 1 +let g:go_highlight_fields = 1 +let g:go_highlight_functions = 1 +let g:go_highlight_methods = 1 +let g:go_highlight_operators = 1 +let g:go_highlight_structs = 1 +let g:go_highlight_types = 1 + +let g:go_auto_sameids = 1 + +let g:go_fmt_command = "goimports" +let g:go_list_type = "quickfix" +let g:go_fmt_fail_silently = 1 +let g:go_term_enabled = 0 + +let g:go_auto_type_info = 1 + +" vim:set et sw=2: diff --git a/neovim/.config/nvim/rc.d/31-file-type.vim b/neovim/.config/nvim/rc.d/31-file-type.vim new file mode 100644 index 0000000..f6c1390 --- /dev/null +++ b/neovim/.config/nvim/rc.d/31-file-type.vim @@ -0,0 +1,141 @@ +" =================================================================== +" FileType and Indentation settings +" +" Recommended: Don't rely on this, use editorconfig " in your project +" =================================================================== + +" define less filetype +au BufNewFile,BufRead *.less set filetype=less + +" make the smarty .tpl files html files for our purposes +au BufNewFile,BufRead *.tpl set filetype=html + +" json +au! BufRead,BufNewFile *.json set filetype=json + +" jquery +au BufRead,BufNewFile jquery.*.js set ft=javascript syntax=jquery + +autocmd Filetype html setlocal ts=2 sw=2 expandtab +autocmd Filetype xhtml setlocal ts=2 sw=2 expandtab +autocmd Filetype xml setlocal ts=2 sw=2 expandtab +autocmd Filetype css setlocal ts=2 sw=2 expandtab +autocmd Filetype less setlocal ts=2 sw=2 expandtab +autocmd Filetype ruby setlocal ts=2 sw=2 expandtab +autocmd Filetype javascript setlocal ts=4 sw=4 sts=0 noexpandtab +autocmd Filetype python setlocal omnifunc=jedi#completions tw=79 + \ completeopt-=preview + \ formatoptions+=c + + +" HTML, XML, Jinja +autocmd FileType html setlocal shiftwidth=2 tabstop=2 softtabstop=2 +autocmd FileType css setlocal shiftwidth=2 tabstop=2 softtabstop=2 +autocmd FileType xml setlocal shiftwidth=2 tabstop=2 softtabstop=2 +autocmd FileType htmldjango setlocal shiftwidth=2 tabstop=2 softtabstop=2 +autocmd FileType htmldjango inoremap {{ {{ }} +autocmd FileType htmldjango inoremap {% {% %} +autocmd FileType htmldjango inoremap {# {# #} + +" LaTeX +let g:tex_flavor='latex' +let g:vimtex_view_method='zathura' +let g:vimtex_quickfix_mode=0 +set conceallevel=1 +let g:tex_conceal='abdmg' + +" Markdown and Journal +autocmd FileType markdown setlocal shiftwidth=2 tabstop=2 softtabstop=2 +autocmd FileType journal setlocal shiftwidth=2 tabstop=2 softtabstop=2 + +" Always assume .tex files are LaTeX +let g:tex_flavor = "latex" + +" Don't autocomplete filenames that match these patterns +" Version control +set wildignore=.svn,.git +" Compiled formats +set wildignore+=*.o,*.pyc +" Images +set wildignore+=*.jpg,*.png,*.pdf +" Auxilary LaTeX files +set wildignore+=*.aux,*.bbl,*.blg,*.out,*.toc +" Web development +set wildignore+=vendor,_site,tmp,node_modules,bower_components +" Script outputs +set wildignore+=output + +au BufNewFile,BufRead ~/.mutt/tmp/neomutt-* setlocal filetype=mail + +" Makefiles require actual tabs +au FileType make setlocal noexpandtab + +" Don't create backup files when editing crontabs +au filetype crontab setlocal nobackup nowritebackup + +" Python style uses 4 spaces as tabs +au FileType python setlocal tabstop=4 shiftwidth=4 + +au BufNewFile,BufRead *.md setlocal filetype=markdown syntax=markdown +au BufNewFile,BufRead *.markdown setlocal syntax=markdown + +" Spellchecking in LaTeX, Markdown +au FileType tex,plaintex,markdown setlocal spelllang=en_gb spell formatoptions=tcroqlj + +" Wrap Python automatically at 80 characters +au FileType python setlocal textwidth=79 formatoptions=tcroqlj + +" relativenumber can be very slow when combined with a language whose syntax +" highlighting regexs are complex +" https://github.com/neovim/neovim/issues/2401 +" https://groups.google.com/forum/#!topic/vim_use/ebRiypE2Xuw +au FileType tex set norelativenumber + +" Enable marker folder for Beancount files +au FileType beancount set foldmethod=marker foldlevel=0 foldlevelstart=0 + +" I often type `#` to start a comment, as alt-3, then hit space +" alt-space is a UTF non-breaking space character, which can give encoding errors +highlight UTFSpaceComment ctermfg=White ctermbg=1 +au BufNewFile,BufRead * :syn match UTFSpaceComment '.\%uA0' + +augroup mail + au! + + au FileType mail setlocal spell spelllang=en_gb + + " Common standard used in plaintext emails + au FileType mail setlocal textwidth=72 + + " w: Lines ending with spaces continue on the next line, used in combination + " with Mutt's text_flowed option + " a: Format automatically + " t: Wrap using textwidth + " c: Wrap comments using textwidth + " q: Format with gq macro + au FileType mail setlocal formatoptions=watcq + + " Define comment leaders as in a Markdown document, that is: + " * Treat *, -, +, and > as comment leaders + " * Characters *, -, + begin comments when followed by a space, and wrapped + " lines immediately after these should be indented + " * Comments starting with > can be nested + au FileType mail setlocal comments=fb:*,fb:-,fb:+,n:> + + " Install an autogroup that triggers when inside a `mail.*` syntax group + au FileType mail call OnSyntaxChange#Install('NoWrapElements', '^mail', 1, 'a') + + " Use the trigger to disable/enable text wrapping when leaving/enter the + " mail body (i.e. we only want wrapping in the mail body). + au FileType mail autocmd User SyntaxNoWrapElementsEnterA setlocal formatoptions-=watc + au FileType mail autocmd User SyntaxNoWrapElementsLeaveA setlocal formatoptions+=watc +augroup end + +" Twig +autocmd BufNewFile,BufRead *.twig set filetype=html.twig + +" PHP +command! -nargs=1 Silent execute ':silent !'. | execute ':redraw!' +map :w:Silent php-cs-fixer fix %:p --level=symfony + +" vim:set et sw=2: diff --git a/neovim/.config/nvim/rc.d/32-gpg.vim b/neovim/.config/nvim/rc.d/32-gpg.vim new file mode 100644 index 0000000..e703bf9 --- /dev/null +++ b/neovim/.config/nvim/rc.d/32-gpg.vim @@ -0,0 +1,36 @@ +" ================================================== +" Transparent editing of gpg encrypted files. +" ================================================== +" +augroup encrypted + au! + " First make sure nothing is written to ~/.viminfo while editing + " an encrypted file. + autocmd BufReadPre,FileReadPre *.gpg set viminfo= + " We don't want a swap file, as it writes unencrypted data to disk + autocmd BufReadPre,FileReadPre *.gpg set noswapfile + " Switch to binary mode to read the encrypted file + autocmd BufReadPre,FileReadPre *.gpg set bin + autocmd BufReadPre,FileReadPre *.gpg let ch_save = &ch|set ch=2 + autocmd BufReadPre,FileReadPre *.gpg let shsave=&sh + autocmd BufReadPre,FileReadPre *.gpg let &sh='sh' + autocmd BufReadPre,FileReadPre *.gpg let ch_save = &ch|set ch=2 + autocmd BufReadPost,FileReadPost *.gpg '[,']!gpg --decrypt --default-recipient-self 2> /dev/null + autocmd BufReadPost,FileReadPost *.gpg let &sh=shsave + " Switch to normal mode for editing + autocmd BufReadPost,FileReadPost *.gpg set nobin + autocmd BufReadPost,FileReadPost *.gpg let &ch = ch_save|unlet ch_save + autocmd BufReadPost,FileReadPost *.gpg execute ":doautocmd BufReadPost " . expand("%:r") + " Convert all text to encrypted text before writing + autocmd BufWritePre,FileWritePre *.gpg set bin + autocmd BufWritePre,FileWritePre *.gpg let shsave=&sh + autocmd BufWritePre,FileWritePre *.gpg let &sh='sh' + autocmd BufWritePre,FileWritePre *.gpg '[,']!gpg --encrypt --default-recipient-self 2>/dev/null + autocmd BufWritePre,FileWritePre *.gpg let &sh=shsave + " Undo the encryption so we are back in the normal text, directly + " after the file has been written. + autocmd BufWritePost,FileWritePost *.gpg silent u + autocmd BufWritePost,FileWritePost *.gpg set nobin +augroup END + +" vim:set et sw=2: diff --git a/neovim/.config/nvim/rc.d/33-folding.vim b/neovim/.config/nvim/rc.d/33-folding.vim new file mode 100644 index 0000000..ac03aff --- /dev/null +++ b/neovim/.config/nvim/rc.d/33-folding.vim @@ -0,0 +1,14 @@ +set foldlevelstart=10 " open most folds by default +" +" ================================================== +" XML folding +" ================================================== +let g:xml_syntax_folding=1 +au FileType xml setlocal foldmethod=syntax + +" ================================================== +" JSON folding +" ================================================== +au FileType json setlocal foldmethod=syntax + +" vim:set et sw=2: diff --git a/neovim/.config/nvim/spell/en.utf-8.add b/neovim/.config/nvim/spell/en.utf-8.add new file mode 100644 index 0000000..4aa5d25 --- /dev/null +++ b/neovim/.config/nvim/spell/en.utf-8.add @@ -0,0 +1,37 @@ +codebase +MySQL +mycli +config +Github +AUR +yay +Ubuntu +Debian +macOS +DSN +Youtube +Golang +RedBull +QBasic +backend +frontend +DevDash +cyclomatic +OOP +YAGNI +API +APIs +SRP +CQRS +JSON +gamification +refactor +YAML +CSS +DevOps +ripgrep +prefrontal +PHP +SEO +blog +screenshot diff --git a/neovim/.config/nvim/spell/en.utf-8.add.spl b/neovim/.config/nvim/spell/en.utf-8.add.spl new file mode 100644 index 0000000000000000000000000000000000000000..2614b9c6fdddfced684a3d06ee2a8ff136e06081 GIT binary patch literal 557 zcmXv~J5R$f5cXXw78J2&$ja0KiGdx|r4m&smDuxe9+1RooK(uj4`bk;!FOjEVms&W z>9^h954LUZe~h7rn>5RdvU=~_a31}<@Gw)uy!OPOG!m~lZ7HV@veZ*Sh8&SGn`-UO ze&M3WJfoDnPA!$P-!-!CMp+XNb_-Sq)I@r-$=Q0&F8E8K%FKoP*NAHxgcqw~(j$Wd z29w)ql{TW&z@>p|&^PX@;N zU5_YL{uxh@5@`EZQwzi>&~Q;=rj}n~m?J_6GonHTzE$S1%B{$bI+17eh#HWS+B(&d z3cyt}r*2hsV!DJDiJB%Y%qD!9!mKf7d-b^8A749qp&e8W951{*AdJ3VR15NYpoLC! clymeUpo3?Jpcdz literal 0 HcmV?d00001 diff --git a/pgsqlcli/.config/pgsql/config b/pgsqlcli/.config/pgsql/config new file mode 100644 index 0000000..5cb42ba --- /dev/null +++ b/pgsqlcli/.config/pgsql/config @@ -0,0 +1,170 @@ +# vi: ft=dosini +[main] + +# Enables context sensitive auto-completion. If this is disabled the all +# possible completions will be listed. +smart_completion = True + +# Display the completions in several columns. (More completions will be +# visible.) +wider_completion_menu = False + +# Multi-line mode allows breaking up the sql statements into multiple lines. If +# this is set to True, then the end of the statements must have a semi-colon. +# If this is set to False then sql statements can't be split into multiple +# lines. End of line (return) is considered as the end of the statement. +multi_line = False + +# If multi_line_mode is set to "psql", in multi-line mode, [Enter] will execute +# the current input if the input ends in a semicolon. +# If multi_line_mode is set to "safe", in multi-line mode, [Enter] will always +# insert a newline, and [Esc] [Enter] or [Alt]-[Enter] must be used to execute +# a command. +multi_line_mode = psql + +# Enables expand mode, which is similar to `\x` in psql. +expand = False + +# Enables auto expand mode, which is similar to `\x auto` in psql. +auto_expand = True + +# If set to True, table suggestions will include a table alias +generate_aliases = true + +# log_file location. +# In Unix/Linux: ~/.config/pgcli/log +# In Windows: %USERPROFILE%\AppData\Local\dbcli\pgcli\log +# %USERPROFILE% is typically C:\Users\{username} +log_file = default + +# keyword casing preference. Possible values "lower", "upper", "auto" +keyword_casing = auto + +# casing_file location. +# In Unix/Linux: ~/.config/pgcli/casing +# In Windows: %USERPROFILE%\AppData\Local\dbcli\pgcli\casing +# %USERPROFILE% is typically C:\Users\{username} +casing_file = default + +# If generate_casing_file is set to True and there is no file in the above +# location, one will be generated based on usage in SQL/PLPGSQL functions. +generate_casing_file = False + +# Casing of column headers based on the casing_file described above +case_column_headers = True + +# history_file location. +# In Unix/Linux: ~/.config/pgcli/history +# In Windows: %USERPROFILE%\AppData\Local\dbcli\pgcli\history +# %USERPROFILE% is typically C:\Users\{username} +history_file = default + +# Default log level. Possible values: "CRITICAL", "ERROR", "WARNING", "INFO" +# and "DEBUG". "NONE" disables logging. +log_level = INFO + +# Order of columns when expanding * to column list +# Possible values: "table_order" and "alphabetic" +asterisk_column_order = table_order + +# Whether to qualify with table alias/name when suggesting columns +# Possible values: "always", never" and "if_more_than_one_table" +qualify_columns = if_more_than_one_table + +# When no schema is entered, only suggest objects in search_path +search_path_filter = False + +# Default pager. +# By default 'PAGER' environment variable is used +# pager = pspg -s 0 + +# Timing of sql statments and table rendering. +timing = True + +# Table format. Possible values: psql, plain, simple, grid, fancy_grid, pipe, +# ascii, double, github, orgtbl, rst, mediawiki, html, latex, latex_booktabs, +# textile, moinmoin, jira, vertical, tsv, csv. +# Recommended: psql, fancy_grid and grid. +table_format = psql + +# Syntax Style. Possible values: manni, igor, xcode, vim, autumn, vs, rrt, +# native, perldoc, borland, tango, emacs, friendly, monokai, paraiso-dark, +# colorful, murphy, bw, pastie, paraiso-light, trac, default, fruity +syntax_style = default + +# Keybindings: +# When Vi mode is enabled you can use modal editing features offered by Vi in the REPL. +# When Vi mode is disabled emacs keybindings such as Ctrl-A for home and Ctrl-E +# for end are available in the REPL. +vi = true + +# Error handling +# When one of multiple SQL statements causes an error, choose to either +# continue executing the remaining statements, or stopping +# Possible values "STOP" or "RESUME" +on_error = STOP + +# Set threshold for row limit prompt. Use 0 to disable prompt. +row_limit = 1000 + +# Skip intro on startup and goodbye on exit +less_chatty = True + +# Postgres prompt +# \t - Current date and time +# \u - Username +# \h - Hostname of the server +# \d - Database name +# \p - Database port +# \i - Postgres PID +# \# - "@" sign if logged in as superuser, '>' in other case +# \n - Newline +# \dsn_alias - name of dsn alias if -D option is used (empty otherwise) +prompt = "\u@\h:\d> " + +# Number of lines to reserve for the suggestion menu +min_num_menu_lines = 4 + +# Character used to left pad multi-line queries to match the prompt size. +multiline_continuation_char = "" + +# The string used in place of a null value. +null_string = +[colors] +Token.Menu.Completions.Completion.Current = "bg:ansired ansiwhite bold" +Token.Menu.Completions.Completion = "bg:ansigray ansiwhite" +Token.Menu.Completions.Meta.Current = "bg:ansiyellow ansigray" +Token.Menu.Completions.Meta = "bg:ansigray ansiwhite" +Token.Menu.Completions.MultiColumnMeta = "bg:ansigray ansiwhite" +Token.Menu.Completions.ProgressButton = "bg:ansiblack" +Token.Menu.Completions.ProgressBar = "bg:ansiblue" +Token.SelectedText = "ansiwhite bg:ansiblue" +Token.SearchMatch = "ansiwhite bg:ansiblue" +Token.SearchMatch.Current = "ansiwhite bg:ansired" +Token.Toolbar = "ansiwhite" +Token.Toolbar.Off = "ansigray" +Token.Toolbar.On = "bg:ansiblack ansiwhite" +Token.Toolbar.Search = noinherit bold +Token.Toolbar.Search.Text = nobold +Token.Toolbar.System = noinherit bold +Token.Toolbar.Arg = noinherit bold +Token.Toolbar.Arg.Text = nobold +Token.Toolbar.Transaction.Valid = "bg:ansiblack ansigreen bold" +Token.Toolbar.Transaction.Failed = "bg:ansiblack ansired bold" + +# not documented +# see https://github.com/dagwieers/pygments/blob/master/pygments/styles/default.py +Token.Keyword = "ansigreen bold" +Token.String = "ansired" +Token.String.Other = "ansired" +Token.Number = "ansired" + +[named queries] +tenant = SELECT * FROM tenants +select = SELECT * FROM $1 + +[alias_dsn] + +[data_formats] +decimal = "" +float = "" diff --git a/shell/.bash_aliases b/shell/.bash_aliases new file mode 100644 index 0000000..289a89d --- /dev/null +++ b/shell/.bash_aliases @@ -0,0 +1,47 @@ +# enable color support of ls and other commands +if [ -x /usr/bin/dircolors ]; then + test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)" + alias ls='ls --color=auto -F' + #alias dir='dir --color=auto' + #alias vdir='vdir --color=auto' + + alias grep='grep --color=auto' + alias fgrep='fgrep --color=auto' + alias egrep='egrep --color=auto' +fi + +# colored GCC warnings and errors +export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01' + +# some ls aliases +alias ll='ls -lah' +alias la='ls -A' +alias l='ls -CF' + +# better less +alias less="less -R " + +alias php="php -c ~/workspace/php.ini" +alias ..="cd .." + +# Alternative system beep for (not only) when the system has no internal beep +export BEEP=/usr/share/sounds/freedesktop/stereo/bell.oga +alias beep='paplay $BEEP --volume=32768' + +alias vi=$(which vim) + +### Extra aliases added after default: + +# Cheat code indent +stylefix () +{ + for file in $@ + do + indent -linux -l80 -nbad -bap -bc -bbo -bl -bli0 -bls -ncdb -nce -cp1 -c33 -cs -di2 -ndj -nfc1 -nfca -hnl -i8 -ip5 -lp -pcs -psl -nsc -nsob -nut "$PWD/$file" + rm "$PWD/$file~" + done +} +alias stylefix=stylefix; +alias pkgin='sudo aptitude install' +alias pkgrm='sudo aptitude remove' +alias wttr='curl http://wttr.in/Porto,Portugal' diff --git a/shell/.bash_logout b/shell/.bash_logout new file mode 100644 index 0000000..de4f5f7 --- /dev/null +++ b/shell/.bash_logout @@ -0,0 +1,7 @@ +# ~/.bash_logout: executed by bash(1) when login shell exits. + +# when leaving the console clear the screen to increase privacy + +if [ "$SHLVL" = 1 ]; then + [ -x /usr/bin/clear_console ] && /usr/bin/clear_console -q +fi diff --git a/shell/.bash_profile b/shell/.bash_profile new file mode 100644 index 0000000..2c41773 --- /dev/null +++ b/shell/.bash_profile @@ -0,0 +1,4 @@ +#!/bin/bash + +# It looks like this is a login shell, load .profile +[ -f "$HOME/.profile" ] && source "$HOME/.profile" diff --git a/shell/.bashrc b/shell/.bashrc new file mode 100644 index 0000000..ac161d8 --- /dev/null +++ b/shell/.bashrc @@ -0,0 +1,157 @@ +# There are 3 different types of shells in bash: the login shell, normal shell +# and interactive shell. Login shells read ~/.profile and interactive shells +# read ~/.bashrc; in our setup, /etc/profile sources ~/.bashrc - thus all +# settings made here will also take effect in a login shell. +# +# NOTE: It is recommended to make language settings in ~/.profile rather than +# here, since multilingual X sessions would not work properly if LANG is over- +# ridden in every subshell. + +# Some applications read the EDITOR variable to determine your favourite text +# editor. +export EDITOR=$(which nvim) + +# set PATH so it includes user's private bin if it exists (as in GUI this will +# not be an interactive login shell) +if [ -d "$HOME/.local/bin" ] +then + PATH="$HOME/.local/bin:$PATH" +fi + +# For some news readers it makes sense to specify the NEWSSERVER variable here +#export NEWSSERVER=your.news.server + +# If you want to use a Palm device with Linux, uncomment the two lines below. +# For some (older) Palm Pilots, you might need to set a lower baud rate +# e.g. 57600 or 38400; lowest is 9600 (very slow!) +# +#export PILOTPORT=/dev/pilot +#export PILOTRATE=115200 + +# ~/.bashrc: executed by bash(1) for non-login shells. +# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc) +# for examples + +# If not running interactively, don't do anything +case $- in + *i*) ;; + *) return;; +esac + +#[ -z "$PS1" ] && return + +# don't put duplicate lines or lines starting with space in the history. +# See bash(1) for more options +HISTCONTROL=ignoreboth + +# append to the history file, don't overwrite it +shopt -s histappend + +# for setting history length see HISTSIZE and HISTFILESIZE in bash(1) +HISTSIZE=1000 +HISTFILESIZE=2000 + +# check the window size after each command and, if necessary, +# update the values of LINES and COLUMNS. +shopt -s checkwinsize + +# If set, the pattern "**" used in a pathname expansion context will +# match all files and zero or more directories and subdirectories. +#shopt -s globstar + +# make less more friendly for non-text input files, see lesspipe(1) +[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)" + +# set variable identifying the chroot you work in (used in the prompt below) +if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then + debian_chroot=$(cat /etc/debian_chroot) +fi + +# set a fancy prompt (non-color, unless we know we "want" color) +case "$TERM" in + xterm-color|*-256color) color_prompt=yes;; +esac + +# uncomment for a colored prompt, if the terminal has the capability; turned +# off by default to not distract the user: the focus in a terminal window +# should be on the output of commands, not on the prompt +#force_color_prompt=yes + +if [ -n "$force_color_prompt" ]; then + if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then + # We have color support; assume it's compliant with Ecma-48 + # (ISO/IEC-6429). (Lack of such support is extremely rare, and such + # a case would tend to support setf rather than setaf.) + color_prompt=yes + else + color_prompt= + fi +fi + +# Make CTRL+S work +stty -ixon + +# Workspace is the most frequent directory where I wanna be +alias cd="HOME=~/workspace cd" + +cwdSlashAtEnd () { + TITLE="$(dirs +0)" + + if [ -z "$1" ] ; then + # no argument, full cwd + TITLE="${TITLE%/}" + else + # one arg, basename only + TITLE="${TITLE##*/}" + fi + + echo -n "${TITLE}/" +} + +if [ "$color_prompt" = yes ]; then + #PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[$(printf "\x0f")\033[01;34m\]$(cwdSlashAtEnd)\[\033[00m\]$(__git_ps1 " (%s)")$ ' + PS1='\[$(printf "\x0f")\033[01;34m\]$(cwdSlashAtEnd)\[\033[00m\]$(__git_ps1 " (%s)")$ ' +else + PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ ' +fi +unset color_prompt force_color_prompt + +# If this is an xterm set the title to user@host:dir +case "$TERM" in +xterm-*|rxvt*|screen*) + PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1" + ;; +*) + ;; +esac + +# Alias definitions. +# You may want to put all your additions into a separate file like +# ~/.bash_aliases, instead of adding them here directly. +# See /usr/share/doc/bash-doc/examples in the bash-doc package. + +if [ -f ~/.bash_aliases ]; then + . ~/.bash_aliases +fi + +# enable programmable completion features (you don't need to enable +# this, if it's already enabled in /etc/bash.bashrc and /etc/profile +# sources /etc/bash.bashrc). +if ! shopt -oq posix; then + if [ -f /usr/share/bash-completion/bash_completion ]; then + . /usr/share/bash-completion/bash_completion + elif [ -f /etc/bash_completion ]; then + . /etc/bash_completion + fi +fi +export PATH=$HOME/.cabal/bin:$PATH + +# VIM is my default text editor +export EDITOR=$(which nvim) + +# {{START_NEOVIM_STUDIO_TOKEN}} +if [ -z "${NEOVIM_STUDIO_PROFILE_SOURCED}" ] && [ -e "/home/xellos/.neovim-studio/neovim_studio_profile" ]; then + source "/home/xellos/.neovim-studio/neovim_studio_profile" +fi +# {{END_NEOVIM_STUDIO_TOKEN}} + diff --git a/shell/.basic.zshrc b/shell/.basic.zshrc new file mode 100644 index 0000000..3227fd9 --- /dev/null +++ b/shell/.basic.zshrc @@ -0,0 +1,403 @@ +autoload -Uz compinit +compinit +# Completion for kitty +#kitty + complete setup zsh | source /dev/stdin +# +# .zshrc is sourced in interactive shells. +# It should contain commands to set up aliases, +# functions, options, key bindings, etc. +# +# Not all terminals support this and, of those that do, +# not all provide facilities to test the support, hence +# the user should decide based on the terminal type. Most +# terminals support the colours black, red, green, +# yellow, blue, magenta, cyan and white, which can be set +# by name. In addition. default may be used to set the +# terminal's default foreground colour. Abbreviations +# are allowed; b or bl selects black. +# +HISTFILE=~/.histfile +HISTSIZE=1000 +SAVEHIST=1000 +WORDCHARS="${WORDCHARS:s#/#}" +WORDCHARS="${WORDCHARS:s#.#}" +export EDITOR=$(which nvim) +############################################################## +#key binding stuff to get the right keys to work +# key bindings +bindkey "\e[1~" beginning-of-line +bindkey "\e[4~" end-of-line +bindkey "\e[5~" beginning-of-history +bindkey "\e[6~" end-of-history +bindkey "\e[3~" delete-char +bindkey "\e[2~" overwrite-mode +bindkey "\e[5C" forward-word +bindkey "\eOc" emacs-forward-word +bindkey "\e[5D" backward-word +bindkey "\eOd" emacs-backward-word +bindkey "\ee[C" forward-word +bindkey "\ee[D" backward-word +#Ctrl-left/right +bindkey '\e[1;5C' forward-word # ctrl right +bindkey '\e[1;5D' backward-word # ctrl left o +#alt-left/right +bindkey "\e[1;3C" forward-word +bindkey "\e[1;3D" backward-word +#bindkey "^H" backward-delete-word +# for rxvt +bindkey "\e[8~" end-of-line +bindkey "\e[7~" beginning-of-line +# for non RH/Debian xterm, cant hurt for RH/Debian xterm +bindkey "\eOH" beginning-of-line +bindkey "\eOF" end-of-line +# for freebsd console +bindkey "\e[H" beginning-of-line +bindkey "\e[F" end-of-line +# completion in the middle of a line +bindkey '^i' expand-or-complete-prefix + +setopt appendhistory autocd nobeep extendedglob nomatch notify +setopt autolist auto_menu +bindkey -e +# End of lines configured by zsh-newuser-install +# The following lines were added by compinstall +zstyle :compinstall filename '/home/mwoodson/.zshrc' + +autoload -Uz compinit +compinit +# End of lines added by compinstall +## completion system +_force_rehash() { + (( CURRENT == 1 )) && rehash + return 1 # Because we didn't really complete anything +} + +zstyle ':completion:*' completer _oldlist _expand _force_rehash _complete _approximate +zstyle ':completion:*:approximate:' max-errors 'reply=( $((($#PREFIX+$#SUFFIX)/3 )) numeric )' # allow one error for every three characters typed in approximate completer +zstyle ':completion:*:complete:-command-::commands' ignored-patterns '*\~' # don't complete backup files as executables +zstyle ':completion:*:correct:*' insert-unambiguous true # start menu completion only if it could find no unambiguous initial string +zstyle ':completion:*:corrections' format $'%{\e[0;31m%}%d (errors: %e)%{\e[0m%}' # +zstyle ':completion:*:correct:*' original true # +zstyle ':completion:*:default' list-colors ${(s.:.)LS_COLORS} # activate color-completion(!) +zstyle ':completion:*:descriptions' format $'%{\e[0;31m%}completing %B%d%b%{\e[0m%}' # format on completion +zstyle ':completion:*:*:cd:*:directory-stack' menu yes select # complete 'cd -' with menu +#zstyle ':completion:*:expand:*' tag-order all-expansions # insert all expansions for expand completer +zstyle ':completion:*:history-words' list false # +zstyle ':completion:*:history-words' menu yes # activate menu +zstyle ':completion:*:history-words' remove-all-dups yes # ignore duplicate entries +zstyle ':completion:*:history-words' stop yes # +zstyle ':completion:*' matcher-list 'm:{a-z}={A-Z}' # match uppercase from lowercase +zstyle ':completion:*:matches' group 'yes' # separate matches into groups +zstyle ':completion:*' group-name '' +zstyle ':completion:*:messages' format '%d' # +zstyle ':completion:*:options' auto-description '%d' # +zstyle ':completion:*:options' description 'yes' # describe options in full +zstyle ':completion:*:processes' command 'ps -au$USER' # on processes completion complete all user processes +zstyle ':completion:*:*:-subscript-:*' tag-order indexes parameters # offer indexes before parameters in subscripts +zstyle ':completion:*' verbose true # provide verbose completion information +zstyle ':completion:*:warnings' format $'%{\e[0;31m%}No matches for:%{\e[0m%} %d' # set format for warnings +zstyle ':completion:*:*:zcompile:*' ignored-patterns '(*~|*.zwc)' # define files to ignore for zcompile +zstyle ':completion:correct:' prompt 'correct to: %e' # +zstyle ':completion::(^approximate*):*:functions' ignored-patterns '_*' # Ignore completion functions for commands you don't have: + +# complete manual by their section +zstyle ':completion:*:manuals' separate-sections true +zstyle ':completion:*:manuals.*' insert-sections true +zstyle ':completion:*:man:*' menu yes select + + + +# Completion caching +zstyle ':completion::complete:*' use-cache on +zstyle ':completion::complete:*' cache-path .zcache +zstyle ':completion:*:cd:*' ignore-parents parent pwd + +zstyle ':completion::complete:cd::' tag-order local-directories +zstyle ':completion:*' menu select=2 +zstyle ':completion:*' squeeze-slashes true +zstyle ':completion:*:*:kill:*' menu yes select +zstyle ':completion:*:kill:*' force-list always +zstyle ':completion:*:*:kill:*:processes' list-colors '=(#b) #([0-9]#)*=0=01;31' + +CDPATH=.:~:~/git + +#I want my umask 0002 if I'm not root +if [[ $(whoami) = root ]]; then + umask 0022 +else + umask 0002 +fi + + + +#setup ~/.dir_colors if one doesn\'t exist +if [ ! -s ~/.dir_colors ]; then + dircolors -p > ~/.dir_colors +fi +eval `dircolors ~/.dir_colors` + +#aliases +alias ls='ls --color=auto' +alias dir='dir --color=auto' +alias vdir='vdir --color=auto' +alias grep='grep --color=auto' +alias egrep='egrep --color=auto' +alias fgrep='fgrep --color=auto' +alias egrep='egrep --color=auto' +alias vi=$(which vim) +alias -- -='cd -' +alias ...='../..' +alias ....='../../..' +alias .....='../../../..' +alias ll='ls -lah' +#alias sl='ls -lah' +#alias l='ls -la' +alias -g X='| xargs' +alias -g G='| egrep' + +show-colors() { + for line in {0..17}; do + for col in {0..15}; do + code=$(( $col * 18 + $line )); + printf $'\e[38;05;%dm %03d' $code $code; + done; + echo; + done +} + +#allow tab completion in the middle of a word +setopt COMPLETE_IN_WORD +setopt CORRECT + +## keep background processes at full speed +#setopt NOBGNICE +## restart running processes on exit +#setopt HUP + +## history +#setopt APPEND_HISTORY +## for sharing history between zsh processes +setopt INC_APPEND_HISTORY +setopt SHARE_HISTORY + +setopt nonomatch # do not print error on non matched patterns +## automatically decide when to page a list of completions +#LISTMAX=0 + +## disable mail checking +#MAILCHECK=0 + +autoload -U colors && colors +# set some colors +for COLOR in RED GREEN YELLOW WHITE BLACK CYAN BLUE PURPLE; do + eval PR_$COLOR='%{$fg[${(L)COLOR}]%}' + eval PR_BRIGHT_$COLOR='%{$fg_bold[${(L)COLOR}]%}' +done +PR_RESET="%{${reset_color}%}"; + +setopt prompt_subst + +autoload -Uz vcs_info + +zstyle ':vcs_info:*' enable git cvs svn +# set formats +# %b - branchname +# %u - unstagedstr (see below) +# %c - stangedstr (see below) +# %a - action (e.g. rebase-i) +# %R - repository path +# %S - path in the repository +## check-for-changes can be really slow. +## you should disable it, if you work with large repositories +zstyle ':vcs_info:*:prompt:*' check-for-changes true # slower, but lets us show changes to working/index +zstyle ':vcs_info:*:prompt:*' unstagedstr "${PR_BRIGHT_YELLOW}*${PR_RESET}" # unstaged changes string: red * +zstyle ':vcs_info:*:prompt:*' stagedstr "${PR_BRIGHT_YELLOW}+${PR_RESET}" # staged changes string: yellow + +zstyle ':vcs_info:*:prompt:*' formats " ${PR_GREEN}%s${PR_RESET}:${PR_BRIGHT_RED}(%b${PR_RESET}%c%u${PR_BRIGHT_RED})${PR_RESET}" "%a" +zstyle ':vcs_info:*:prompt:*' actionformats " ${PR_GREEN}%s${PR_RESET}:${PR_BRIGHT_RED}(%b|%a)${PR_RESET}" "%a" +zstyle ':vcs_info:*:prompt:*' nvcsformats "" "%~" +zstyle ':vcs_info:*:prompt:*' branchformat "%b:%r" "" + +BLUE_DIAMOND="%B%F{blue}◆%f%b" +YELLOW_DIAMOND="%B%F{yellow}◆%f%b" +GREEN_DIAMOND="%B%F{green}◆%f%b" +RED_DIAMOND="%B%F{red}◆%f%b" +RED_RARROW="%B%F{red}▶%f%b" +RED_LARROW="%B%F{red}◀%f%b" +RED_STAR="%B%F{red}✱%b%f" + +case $TERM in + *xterm*|rxvt|(dt|k|E)term) + preexec () { + if [[ $(basename ${1[(w)1]}) == "ssh" ]]; then + SHN=${1[(w)-1]} + SHN_ARRAY=( ${(s,.,)SHN}) + print -Pn "\e]2;$SHN:%~\a" + else + print -Pn "\e]2;%n@%m:%~\a" + fi + } + ;; + screen) + preexec () { + if [[ $(basename ${1[(w)1]}) == "ssh" ]]; then + SHN=${1[(w)-1]} + SHN=${SHN#*@} + SHN_ARRAY=( ${(s,.,)SHN}) + case ${#SHN_ARRAY} in + 2) + print -Pn "\033k$SHN\033\\" + ;; + 4) + print -Pn "\033k$SHN_ARRAY[1].$SHN_ARRAY[2]\033\\" + ;; + 5) + #print -Pn "\033k$SHN_ARRAY[1].$SHN_ARRAY[2].$SHN_ARRAY[3]\033\\" + print -Pn "\033k$SHN_ARRAY[1].$SHN_ARRAY[3]\033\\" + ;; + *) + print -Pn "\033k$SHN_ARRAY[1]\033\\" + ;; + esac + fi + } + #set up precmd to draw the screen title + function set_screen_title { + print -Pn "\033k%m\033\\" + } + precmd_functions=( set_screen_title ) + ;; +} + +if [[ -n $SSH_CONNECTION ]]; then + SSH_IP=$(echo $SSH_CLIENT | awk '{print $1}') + HOST_OUTPUT=$(host $SSH_IP) + if [[ $? -eq 0 ]]; then + SSH_HOST=$(echo $HOST_OUTPUT | awk '{print $NF}' | sed 's/.$//') + else + SSH_HOST=$SSH_IP + fi + SSH_PROMPT="${RED_STAR}%F{yellow}SSH from: %f%B%F{green}$SSH_HOST%f%b${RED_STAR}" + #SSH_PROMPT="${YELLOW_DIAMOND}${PR_BRIGHT_RED}SSH${PR_RESET}${YELLOW_DIAMOND}" + #SSH_VAR="${YELLOW_DIAMOND}${PR_BRIGHT_RED}SSH${PR_RESET}${YELLOW_DIAMOND}" + +fi + +HASH_NUM=$(echo $HOSTNAME | md5sum | tr -d 'a-f' | cut -b 1-6) +HASH_MOD=$(($HASH_NUM % 6 + 2)) +if [[ $(whoami) = root ]]; then + PROMPT_LINE="%B%F{red}%n@%M%f%b" +else + PROMPT_LINE="%F{green}%n%f@%B%F{$HASH_MOD}%m%b%f" +fi + +precmd(){ + + local exit_status=$? + + vcs_info 'prompt' + + # Battery Stuff + if which ibam &> /dev/null; then + IBAMSTAT="$(ibam)" + if [[ ${IBAMSTAT[(f)(1)][(w)1]} = "Battery" ]]; then + BATTSTATE="$(ibam --percentbattery)" + BATTPRCNT="${BATTSTATE[(f)1][(w)-2]}" + BATTTIME="${BATTSTATE[(f)2][(w)-1]}" + PR_BATTERY="Bat: ${BATTPRCNT}%% (${BATTTIME})" + if [[ "${BATTPRCNT}" -lt 15 ]]; then + PR_BATTERY=" ${BLUE_DIAMOND} ${PR_BRIGHT_RED}${PR_BATTERY}" + elif [[ "${BATTPRCNT}" -lt 50 ]]; then + PR_BATTERY=" ${BLUE_DIAMOND} ${PR_BRIGHT_YELLOW}${PR_BATTERY}" + elif [[ "${BATTPRCNT}" -lt 100 ]]; then + PR_BATTERY=" ${BLUE_DIAMOND} ${PR_BRIGHT_CYAN}${PR_BATTERY}${PR_RESET}" + else + PR_BATTERY="" + fi + else + PR_BATTERY="" + fi + fi + ###End of Battery Stuff###### + + # now lets change the color of the path if its not writable + if [[ -w $PWD ]]; then + PR_PWDCOLOR="%F{yellow}" + else + PR_PWDCOLOR="${PR_BRIGHT_RED}" + fi + + # exit code, print it if its not 0 + if [[ $exit_status -ne 0 ]]; then + EXIT_STATUS=" %B%F{blue}◆%f%b %B%F{$HASH_MOD}Exit Code:%b%f %B%F{yellow}${exit_status}%b%f" + else + EXIT_STATUS="" + fi + + +#PROMPT LINE +#${PR_BRIGHT_YELLOW}%D{%R.%S %a %b %d %Y}${PR_RESET}\ +LINE1_PROMPT="\ +%B%F{black}▶%f%b%F{red}▶%B%F{red}▶%f%b \ +%B%F{$HASH_MOD}%D{%R.%S %a %b %d %Y}%b%f\ +${EXIT_STATUS}\ +%(1j. %B%F{green}◆%f%b %B%F{yellow}Jobs: %j%f%b.)\ +${PR_BATTERY}\ + %B%F{red}◀%f%b%F{red}◀%B%F{black}◀%f%b" +################### + +local TERMWIDTH +(( TERMWIDTH = ${COLUMNS} - 2 )) +LINE1=${(e%)LINE1_PROMPT} SSH_P=${(e%)SSH_PROMPT} +#$LINE1 +LINE1_LENGTH=${#${LINE1//\[[^m]##m/}} +SSH_P_LENGTH=${#${SSH_P//\[[^m]##m/}} +FILL_SPACES=${(l:TERMWIDTH - (LINE1_LENGTH + SSH_P_LENGTH):: :)} + +print -- "$LINE1 $FILL_SPACES $SSH_P" +} + +PROMPT='${PROMPT_LINE}%B%F{green}:%f%b${PR_PWDCOLOR}%~${PR_RESET}${vcs_info_msg_0_}%(!.%B%F{red}%#%f%b.%B%F{green}➤%f%b) ' + + +######################################D + +# set PATH so it includes user's private bin if it exists (as in GUI this will +# not be an interactive login shell) +if [ -d "$HOME/.local/bin" ] +then + PATH="$HOME/.local/bin:$PATH" +fi + +# Make CTRL+S work +stty -ixon + +# Alias definitions. +# You may want to put all your additions into a separate file like +# ~/.bash_aliases, instead of adding them here directly. +# See /usr/share/doc/bash-doc/examples in the bash-doc package. + +if [ -f ~/.zsh_aliases ]; then + . ~/.zsh_aliases +fi + +# Start tmux +#if command -v tmux>/dev/null; then +# [[ ! $TERM =~ screen ]] && [ -z $TMUX ] && exec tmux +#fi + +# Enable Ctrl-x-e to edit command line +autoload -U edit-command-line +# Emacs style +#zle -N edit-command-line +#bindkey '^xe' edit-command-line +#bindkey '^x^e' edit-command-line +# Vi style: +zle -N edit-command-line +bindkey -M vicmd v edit-command-line + +export PATH="$PATH:$HOME/.config/composer/vendor/bin/" + +[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh + +export PATH="$HOME/.yarn/bin:$HOME/.config/yarn/global/node_modules/.bin:$PATH" +export PATH="$HOME/.cabal/bin:$PATH" diff --git a/shell/.dir_colors b/shell/.dir_colors new file mode 100644 index 0000000..c564f4d --- /dev/null +++ b/shell/.dir_colors @@ -0,0 +1,189 @@ +# Configuration file for dircolors, a utility to help you set the +# LS_COLORS environment variable used by GNU ls with the --color option. +# Copyright (C) 1996-2016 Free Software Foundation, Inc. +# Copying and distribution of this file, with or without modification, +# are permitted provided the copyright notice and this notice are preserved. +# The keywords COLOR, OPTIONS, and EIGHTBIT (honored by the +# slackware version of dircolors) are recognized but ignored. +# Below are TERM entries, which can be a glob patterns, to match +# against the TERM environment variable to determine if it is colorizable. +TERM Eterm +TERM ansi +TERM *color* +TERM con[0-9]*x[0-9]* +TERM cons25 +TERM console +TERM cygwin +TERM dtterm +TERM gnome +TERM hurd +TERM jfbterm +TERM konsole +TERM kterm +TERM linux +TERM linux-c +TERM mlterm +TERM putty +TERM rxvt* +TERM screen* +TERM st +TERM terminator +TERM tmux* +TERM vt100 +TERM xterm* +# Below are the color init strings for the basic file types. A color init +# string consists of one or more of the following numeric codes: +# Attribute codes: +# 00=none 01=bold 04=underscore 05=blink 07=reverse 08=concealed +# Text color codes: +# 30=black 31=red 32=green 33=yellow 34=blue 35=magenta 36=cyan 37=white +# Background color codes: +# 40=black 41=red 42=green 43=yellow 44=blue 45=magenta 46=cyan 47=white +#NORMAL 00 # no color code at all +#FILE 00 # regular file: use no color at all +RESET 0 # reset to "normal" color +DIR 01;34 # directory +LINK 01;36 # symbolic link. (If you set this to 'target' instead of a + # numerical value, the color is as for the file pointed to.) +MULTIHARDLINK 00 # regular file with more than one link +FIFO 40;33 # pipe +SOCK 01;35 # socket +DOOR 01;35 # door +BLK 40;33;01 # block device driver +CHR 40;33;01 # character device driver +ORPHAN 40;31;01 # symlink to nonexistent file, or non-stat'able file ... +MISSING 00 # ... and the files they point to +SETUID 37;41 # file that is setuid (u+s) +SETGID 30;43 # file that is setgid (g+s) +CAPABILITY 30;41 # file with capability +STICKY_OTHER_WRITABLE 30;42 # dir that is sticky and other-writable (+t,o+w) +OTHER_WRITABLE 34;42 # dir that is other-writable (o+w) and not sticky +STICKY 37;44 # dir with the sticky bit set (+t) and not other-writable +# This is for files with execute permission: +EXEC 01;32 +# List any file extensions like '.gz' or '.tar' that you would like ls +# to colorize below. Put the extension, a space, and the color init string. +# (and any comments you want to add after a '#') +# If you use DOS-style suffixes, you may want to uncomment the following: +#.cmd 01;32 # executables (bright green) +#.exe 01;32 +#.com 01;32 +#.btm 01;32 +#.bat 01;32 +# Or if you want to colorize scripts even if they do not have the +# executable bit actually set. +#.sh 01;32 +#.csh 01;32 + # archives or compressed (bright red) +.tar 01;31 +.tgz 01;31 +.arc 01;31 +.arj 01;31 +.taz 01;31 +.lha 01;31 +.lz4 01;31 +.lzh 01;31 +.lzma 01;31 +.tlz 01;31 +.txz 01;31 +.tzo 01;31 +.t7z 01;31 +.zip 01;31 +.z 01;31 +.Z 01;31 +.dz 01;31 +.gz 01;31 +.lrz 01;31 +.lz 01;31 +.lzo 01;31 +.xz 01;31 +.zst 01;31 +.tzst 01;31 +.bz2 01;31 +.bz 01;31 +.tbz 01;31 +.tbz2 01;31 +.tz 01;31 +.deb 01;31 +.rpm 01;31 +.jar 01;31 +.war 01;31 +.ear 01;31 +.sar 01;31 +.rar 01;31 +.alz 01;31 +.ace 01;31 +.zoo 01;31 +.cpio 01;31 +.7z 01;31 +.rz 01;31 +.cab 01;31 +# image formats +.jpg 01;35 +.jpeg 01;35 +.mjpg 01;35 +.mjpeg 01;35 +.gif 01;35 +.bmp 01;35 +.pbm 01;35 +.pgm 01;35 +.ppm 01;35 +.tga 01;35 +.xbm 01;35 +.xpm 01;35 +.tif 01;35 +.tiff 01;35 +.png 01;35 +.svg 01;35 +.svgz 01;35 +.mng 01;35 +.pcx 01;35 +.mov 01;35 +.mpg 01;35 +.mpeg 01;35 +.m2v 01;35 +.mkv 01;35 +.webm 01;35 +.ogm 01;35 +.mp4 01;35 +.m4v 01;35 +.mp4v 01;35 +.vob 01;35 +.qt 01;35 +.nuv 01;35 +.wmv 01;35 +.asf 01;35 +.rm 01;35 +.rmvb 01;35 +.flc 01;35 +.avi 01;35 +.fli 01;35 +.flv 01;35 +.gl 01;35 +.dl 01;35 +.xcf 01;35 +.xwd 01;35 +.yuv 01;35 +.cgm 01;35 +.emf 01;35 +# http://wiki.xiph.org/index.php/MIME_Types_and_File_Extensions +.ogv 01;35 +.ogx 01;35 +# audio formats +.aac 00;36 +.au 00;36 +.flac 00;36 +.m4a 00;36 +.mid 00;36 +.midi 00;36 +.mka 00;36 +.mp3 00;36 +.mpc 00;36 +.ogg 00;36 +.ra 00;36 +.wav 00;36 +# http://wiki.xiph.org/index.php/MIME_Types_and_File_Extensions +.oga 00;36 +.opus 00;36 +.spx 00;36 +.xspf 00;36 diff --git a/shell/.notifyosd.zsh b/shell/.notifyosd.zsh new file mode 100644 index 0000000..83357dd --- /dev/null +++ b/shell/.notifyosd.zsh @@ -0,0 +1,56 @@ +# commands to ignore +cmdignore=(htop tmux top vim nvim testomatic pgcli bat mux tmuxp gc) + +# set gt 0 to enable GNU units for time results +gnuunits=0 + +# end and compare timer, notify-send if needed +function notifyosd-precmd() { + retval=$? + if [[ ${cmdignore[(r)$cmd_basename]} == $cmd_basename ]]; then + return + else + if [ ! -z "$cmd" ]; then + cmd_end=`date +%s` + ((cmd_secs=$cmd_end - $cmd_start)) + fi + if [ $retval -gt 0 ]; then + cmdstat="with warning" + sndstat="/usr/share/sounds/gnome/default/alerts/sonar.ogg" + urgency="critical" + else + cmdstat="successfully" + sndstat="/usr/share/sounds/gnome/default/alerts/glass.ogg" + urgency="normal" + fi + if [ ! -z "$cmd" -a $cmd_secs -gt 10 ]; then + if [ $gnuunits -gt 0 ]; then + cmd_time=$(units "$cmd_secs seconds" "centuries;years;months;weeks;days;hours;minutes;seconds" | \ + sed -e 's/\ +/\,/g' -e s'/\t//') + else + cmd_time=$(printf '%dh:%dm:%ds\n' $(($cmd_secs/3600)) $(($cmd_secs%3600/60)) $(($cmd_secs%60))) + fi + if [ ! -z $SSH_TTY ] ; then + notify-send -i utilities-terminal \ + -u $urgency "$cmd_basename on `hostname` completed $cmdstat" "\"$cmd\" took $cmd_time"; + else + notify-send -i utilities-terminal \ + -u $urgency "$cmd_basename completed $cmdstat" "\"$cmd\" took $cmd_time"; + fi + fi + unset cmd + fi +} + +# make sure this plays nicely with any existing precmd +precmd_functions+=( notifyosd-precmd ) + +# get command name and start the timer +function notifyosd-preexec() { + cmd=$1 + cmd_basename=${${cmd:s/sudo //}[(ws: :)1]} + cmd_start=`date +%s` +} + +# make sure this plays nicely with any existing preexec +preexec_functions+=( notifyosd-preexec ) diff --git a/shell/.profile b/shell/.profile new file mode 100644 index 0000000..30f968b --- /dev/null +++ b/shell/.profile @@ -0,0 +1,53 @@ +# ~/.profile: executed by the command interpreter for login shells. +# This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login +# exists. +# see /usr/share/doc/bash/examples/startup-files for examples. +# the files are located in the bash-doc package. + +# the default umask is set in /etc/profile; for setting the umask +# for ssh logins, install and configure the libpam-umask package. +#umask 022 + +# if running zsh +if [ -n "$ZSH_VERSION" ]; then + # include .bashrc if it exists + if [ -f "$HOME/.zshrc" ]; then + . "$HOME/.zshrc" + fi +fi + +# if running bash +if [ -n "$BASH_VERSION" ]; then + # include .bashrc if it exists + if [ -f "$HOME/.bashrc" ]; then + . "$HOME/.bashrc" + fi +fi + +# set PATH so it includes user's private bin if it exists +if [ -d "$HOME/.local/bin" ] ; then + PATH="$HOME/.local/bin:$PATH" +fi + + +export PATH="$HOME/.cargo/bin:$PATH" + +# Most applications support several languages for their output. +# To make use of this feature, simply uncomment one of the lines below or +# add your own one (see /usr/share/locale/locale.alias for more codes) +# This overwrites the system default set in /etc/sysconfig/language +# in the variable RC_LANG. +# +#export LANG=de_DE.UTF-8 # uncomment this line for German output +#export LANG=fr_FR.UTF-8 # uncomment this line for French output +#export LANG=es_ES.UTF-8 # uncomment this line for Spanish output + + +# Some people don't like fortune. If you uncomment the following lines, +# you will have a fortune each time you log in ;-) + +#if [ -x /usr/bin/fortune ] ; then +# echo +# /usr/bin/fortune +# echo +#fi diff --git a/shell/.zimrc b/shell/.zimrc new file mode 100644 index 0000000..761eab1 --- /dev/null +++ b/shell/.zimrc @@ -0,0 +1,10 @@ +#!/bin/zsh + +zmodules=(directory environment git git-info history input archive utility \ + autosuggestions prompt completion syntax-highlighting history-substring-search) +zprompt_theme='lean' +ztermtitle='%m:%~' +# Set to vi or emacs +#zinput_mode='emacs' +zinput_mode='vi' +zhighlighters=(main brackets pattern cursor) diff --git a/shell/.zlogin b/shell/.zlogin new file mode 100644 index 0000000..420cd80 --- /dev/null +++ b/shell/.zlogin @@ -0,0 +1,5 @@ +# +# User configuration sourced by login shells +# + + diff --git a/shell/.zprofile b/shell/.zprofile new file mode 100644 index 0000000..e28e643 --- /dev/null +++ b/shell/.zprofile @@ -0,0 +1,19 @@ +#!/usr/bin/zsh + +export EDITOR='nvim' +export VISUAL='nvim' +export PAGER='less' +export GOPATH="$HOME/go" +export GPG_TTY=$(tty) +export LESS='-F -g -i -M -R -S -w -X -z-4' + +typeset -gU cdpath fpath mailpath path +path+=("$HOME/.dotfiles/bin" "$GOPATH/bin" "$HOME/.local/bin") + +# It looks like this is a login shell, load .profile +[ -f "$HOME/.profile" ] && source "$HOME/.profile" + +if [ -z "$DISPLAY" ] && [ -n "$XDG_VTNR" ] && [ "$XDG_VTNR" -eq 1 ] +then + exec startx > ${HOME}/.xoutput 2>&1 +fi diff --git a/shell/.zsh_aliases b/shell/.zsh_aliases new file mode 100644 index 0000000..e9c778b --- /dev/null +++ b/shell/.zsh_aliases @@ -0,0 +1,37 @@ +# Pretty csv viewer +function pretty_csv { + column -t -s, -n "$@" | less -F -S -X -K +} + +# colored GCC warnings and errors +export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01' + +# some ls aliases +alias la='ls -A' +alias l='ls -CF' + +# better less +alias less="less -R " + +alias php="php -c ~/workspace/php.ini" + +# Alternative system beep for (not only) when the system has no internal beep +export BEEP=/usr/share/sounds/freedesktop/stereo/bell.oga +alias beep='paplay $BEEP --volume=32768' + +### Extra aliases added after default: + +# Cheat code indent +stylefix () +{ + for file in $@ + do + indent -linux -l80 -nbad -bap -bc -bbo -bl -bli0 -bls -ncdb -nce -cp1 -c33 -cs -di2 -ndj -nfc1 -nfca -hnl -i8 -ip5 -lp -pcs -psl -nsc -nsob -nut "$PWD/$file" + rm "$PWD/$file~" + done +} +alias stylefix=stylefix; +alias pkgin='sudo aptitude install' +alias pkgrm='sudo aptitude remove' +alias wttr='curl http://wttr.in/Porto,Portugal' +alias top='htop' diff --git a/shell/.zshrc b/shell/.zshrc new file mode 100644 index 0000000..aaa8854 --- /dev/null +++ b/shell/.zshrc @@ -0,0 +1,17 @@ +#!/bin/zsh + +# +# User configuration sourced by interactive shells +# + +setopt LOCAL_OPTIONS # allow functions to have local options +setopt LOCAL_TRAPS # allow functions to have local traps +setopt CLOBBER +setopt RM_STAR_SILENT # dont ask for confirmation in rm globs +setopt CORRECT # auto-correct commands +setopt COMPLETE_IN_WORD # dont nice background tasks +setopt PROMPT_SUBST # expand prompt sequences + +# Load basic settings +source ${HOME}/.basic.zshrc + diff --git a/shell/README.md b/shell/README.md new file mode 100644 index 0000000..872fd05 --- /dev/null +++ b/shell/README.md @@ -0,0 +1,197 @@ +# Scripts for zsh + +Doc for my zsh scripts (`scripts.zsh`). + +## System + +### Update system + +`updatesys` + +Update: +* Go binaries +* Composer global install +* Official Arch linux packages (via Aurman or yay if installed ; otherwise pacman) +* AUR packages (via Aurman or yay if installed) + +### Disk backup + +`dback ` + +Use dd to copy an entire hard disk to another disk output. Ask questions to be sure you know what you are doing :) +Way safer than using pure dd without any warning message... + +### Create ssh key + +`sshcreate ` + +Create a new ssh key at `~/.ssh/` with permission 700. +The name will be put as comment in the key as well. + +## Archives + +### Extraction + +`extract ` + +Extract any archive automatically. Require `tar` and `unzip`. + +### Compression +`compress ` + +Compress a folder - output `tar.gz` + +## Database + +### Postgres + +These commands need `pv` to be installed. + +#### Dump +`postgdump ` + +Create a dump of a database. Include clean up and create dabatase when imported back. + +The file created will be ``.sql + +`` and `` are not mandatory, default `postgres` and `localhost`. + +#### Import +`postgimport ` + +Import a database. If the file is called `database.sql`, it will try to import into the database named `database`. + +`` and `` are not mandatory, default `postgres` and `localhost`. + +**THE OPERATION WILL OVERWRITE ALL DATA!** + +## Network + +### Ports + +`ports` + +List of port opens, fuzzy searchable via fzf + +## Images + +### Screenshot + +`screenshot ` + +Take a screenshot of the window / screen / area respectively. + +### Image size + +`imgsize ` + +Display width / height of an image. + +### Image resize + +`imgresize ` +Resize and create a new image named `_.` following aspect ratio. + +`imgresizeall ` +Resize every images with the same extension in the current folder + +`imgoptimize ` +Optimize the image (conv -strip -interlace Plane -quality 85%) and create a new image + +`Imgoptimize ` +Optimize the image (conv -strip -interlace Plane -quality 85%) and *replace* the image + +`imgoptimizeall ` +Optimize the images with same extension in current folder(conv -strip -interlace Plane -quality 85%) and create new images + +`Imgoptimizeall *.` +Optimize the images with same extension in current folder(conv -strip -interlace Plane -quality 85%) and *replace* them + + +### Image resize all + +`imgresize ` +Resize every images with the extension `` in the current folder. +Use Image resize (see above) + +### Image convert to jpg + +`imgconvjpg ` + +Require imagemagick. + +Convert source to a jpg image + +## Git + +`gtD ` + +Delete a tag locally AND on the remote. `` argument is not mandatory, default `origin`. + +`gtd ` + +Delete a tag ONLY on the remote. `` argument is not mandatory, default `origin`. + +### FZF + +`fmux` + +Let you choose a tmuxp config + +### FZF meets Git + +#### Checkout + +`fgco` + +Require fzf of course :) +Checkout local or remote branch via FZF + +#### Logs + +`fgl` + +Simple way to fuzzy search in the log tree. + +### Stash + +`fstash` + +Fuzzy search in the stash list. + +## Other + +`thriftgen` + +Generate thrift config via thrift on local (docker image doesn't work...) + +`mkcd` + +Create a folder like `mkdir -p` and goes in it. + +`updatezsh` + +Update antibody plugins + +`promptspeed` + +Display the time for the prompt to appear when opening a new zsh instance + +## Fun + +`matrix` + +Display... the matrix! + +`colorblocks` + +Display the main terminal colors configured, in nice blocks. [source](https://github.com/iiPlasma/dots/blob/master/bin/bin/colorblocks). + +`colorcards` + +Display all the terminal colors configured, in nice panes. [source](https://github.com/iiPlasma/dots/blob/master/bin/bin/colorcards). + +`pipes` + +Remember the OpenGL pipes screensaver on windows 9*? The same in the terminal. [source](https://github.com/iiPlasma/dots/blob/master/bin/bin/pipes). + diff --git a/shell/scripts.zsh b/shell/scripts.zsh new file mode 100644 index 0000000..b61eb52 --- /dev/null +++ b/shell/scripts.zsh @@ -0,0 +1,394 @@ +screencast() { + if [ ! -z $1 ] ; then + ffmpeg -f x11grab -s $(xdpyinfo | grep dimensions | awk '{print $2}') -i :0.0 -f pulse -i default $1 + else + echo "You need to precise an output file as first argument - eg 'example.mkv'" + fi +} + +oscreencast() { + if [ ! -z $1 ] ; then + ffmpeg -f x11grab -s $(xdpyinfo | grep dimensions | awk '{print $2}') -i :0.0 $1 + else + echo "You need to precise an output file as first argument - eg 'example.mkv'" + fi +} + +updatesys() { + sh $DOTFILES/update.sh + if hash aurman 2>/dev/null; then + aurman -Syu + elif hash yay 2>/dev/null; then + yay -Syu + else + sudo pacman -Syu + fi +} + +extract() { + if [ -f $1 ] ; then + case $1 in + *.tar.bz2) tar xjf $1 ;; + *.tar.gz) tar xzf $1 ;; + *.bz2) bunzip2 $1 ;; + *.rar) rar x $1 ;; + *.gz) gunzip $1 ;; + *.tar) tar xf $1 ;; + *.tbz2) tar xjf $1 ;; + *.tgz) tar xzf $1 ;; + *.zip) unzip $1 ;; + *.Z) uncompress $1 ;; + *) echo "'$1' cannot be extracted" ;; + esac + else + echo "'$1' is not a valid file" + fi +} + +compress() { + tar cvzf $1.tar.gz $1 +} + +screenshot () { + DIR="${HOME}/documents/images/screenshots" + DATE="$(date +%Y%m%d-%H%M%S)" + NAME="${DIR}/screenshot-${DATE}.png" + LOG="${DIR}/screenshots.log" + + # Check if the dir to store the screenshots exists, else create it: + if [ ! -d "${DIR}" ]; then mkdir -p "${DIR}"; fi + + if [ ! -f "${LOG}" ]; then touch "${LOG}"; fi + + # Screenshot a selected window + if [ "$1" = "win" ]; then import -format png "${NAME}"; fi + + # Screenshot the entire screen + if [ "$1" = "scr" ]; then import -format png -window root "${NAME}"; fi + + # Screenshot a selected area + if [ "$1" = "area" ]; then import -format png "${NAME}"; fi + + if [[ $# = 0 ]]; then + # Display a warning if no area defined + echo "No screenshot area has been specified. Please choose a command: win, scr, area. Screenshot not taken." + echo "${DATE}: No screenshot area has been defined. Screenshot not taken." >> "${LOG}" + else + # Save the screenshot in the directory and edit the log + echo "${NAME}" >> "${LOG}" + fi +} + +imgsize() { + width=$(identify -format "%w" "$1")> /dev/null + height=$(identify -format "%h" "$1")> /dev/null + + echo -e "Size of $1: $width*$height" +} + +imgresize() { + filename=${1%\.*} + extension="${1##*.}" + separator="_" + finalName="$filename$separator$2.$extension" + convert $1 -quality 100 -resize $2 $finalName + echo "$finalName" +} + +imgresizeall() { + for f in *.${1}; do + imgresize "$f" ${2} + done +} + +imgoptimize() { + filename=${1%\.*} + extension="${1##*.}" + separator="_" + suffix="optimized" + finalName="$filename$separator$suffix.$extension" + convert $1 -strip -interlace Plane -quality 85% $finalName + echo "$finalName created" +} + +Imgoptimize() { + filename=${1%\.*} + extension="${1##*.}" + separator="_" + suffix="optimized" + finalName="$filename$separator$suffix.$extension" + convert $1 -strip -interlace Plane -quality 85% $1 + echo "$1 created" +} + +imgoptimizeall() { + for f in *.${1}; do + imgoptimize "$f" + done +} + +Imgoptimizeall() { + for f in *.${1}; do + Imgoptimize "$f" + done +} + +imgconvjpg() { + if [ ! -z "$1" ]; + then + filename=${1%\.*} + magick convert $1 "${filename}.jpg" + else + echo -e "You need to add an image to convert as param!" + fi +} + +imgconvpng() { + if [ ! -z "$1" ]; + then + filename=${1%\.*} + magick convert $1 "${filename}.png" + else + echo -e "You need to add an image to convert as param!" + fi +} + +gtD() { + git tag -d $1 + if [ ! -z "$2" ]; + then + git push $2 :refs/tags/$1 + else + git push origin :refs/tags/$1 + fi +} + +sshcreate() { + if [ ! -z "$1" ]; + then + ssh-keygen -f $HOME/.ssh/$1 -t rsa -N '' -C "$1" + chmod 700 $HOME/.ssh/$1* + fi +} + +dback () { + if [ ! -z $1 ] && [ ! -z $2 ]; + then + if [ ! -z $3 ]; + then + BS=$3 + else + BS="512k" + fi + + dialog --defaultno --title "Are you sure?" --yesno "This will copy $1 to $2 (bitsize: $BS). Everything on $2 will be deleted.\n\n + Are you sure?" 15 60 || exit + + (sudo pv -n $1 | sudo dd of=$2 bs=$BS conv=notrunc,noerror) 2>&1 | dialog --gauge "Backup from disk $1 to disk $2... please wait" 10 70 0 + else + echo "You need to provide an input disk as first argument (i.e /dev/sda) and an output disk as second argument (i.e /dev/sdb)" + fi + +} + +blimg() { + if [ ! -z $1 ] && [ ! -z $2 ] && [ ! -z $3 ]; + then + CYEAR=$(date +'%Y') + BASEDIR="${HOME}/workspace/webtechno/static" + #Basedir current year + BASEDIRY="${HOME}/workspace/webtechno/static/${CYEAR}" + + if [ ! -d $BASEDIRY ]; + then + mkdir $BASEDIRY + fi + + #basedir current article + BASEDIRC="${BASEDIRY}/${2}" + + if [ ! -d $BASEDIRP ]; + then + mkdir $BASEDIRP + fi + + IMGRESIZED=imgresize "${1} 780" + echo "$IMGRESIZED" + fi +} + +postgdump() { + USER="postgres" + HOST="localhost" + if [ ! -z $1 ]; + then + if [ -f "${1}.sql" ]; + then + rm -i "${1}.sql" + fi + + if [ $# = 1 ]; + then + pg_dump -c -U $USER -h $HOST $1 | pv --progress > "${1}.sql" + echo $1 + fi + + if [ $# = 2 ]; + then + pg_dump -c -U $2 -h $HOST $1 | pv --progress > "${1}.sql" + echo $1 + fi + + if [ $# = 3 ]; + then + pg_dump -c -U $2 -h $3 $1 | pv --progress > "${1}.sql" + echo $1 + fi + fi + + if [ $# = 0 ]; + then + echo "You need at least to provide the database name" + fi +} + +postgimport() { + USER="postgres" + HOST="localhost" + if [ ! -z $1 ]; + DB=${1%\.*} + then + # sed -i "1s/^/CREATE DATABASE $DB;\n/" $1 + if [ $# = 1 ]; + then + pv --progress ${1} | psql -U $USER -h $HOST $1 -d $DB + echo $1 + fi + + if [ $# = 2 ]; + then + pv --progress ${1} | psql -U $1 -h $HOST $1 -d $DB + echo $1 + fi + + if [ $# = 3 ]; + then + pv --progress ${1} | psql -U $1 -h $2 $1 -d $DB + echo $1 + fi + fi + + if [ $# = 0 ]; + then + echo "You need at least to provide the database name" + fi +} + +matrix () { + lines=$(tput lines) + cols=$(tput cols) + + awkscript=' + { + letters="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789@#$%^&*()" + lines=$1 + random_col=$3 + c=$4 + letter=substr(letters,c,1) + cols[random_col]=0; + for (col in cols) { + line=cols[col]; + cols[col]=cols[col]+1; + printf "\033[%s;%sH\033[2;32m%s", line, col, letter; + printf "\033[%s;%sH\033[1;37m%s\033[0;0H", cols[col], col, letter; + if (cols[col] >= lines) { + cols[col]=0; + } + } + } + ' + + echo -e "\e[1;40m" + clear + + while :; do + echo $lines $cols $(( $RANDOM % $cols)) $(( $RANDOM % 72 )) + sleep 0.05 + done | awk "$awkscript" +} + +pgdump() { + pg_dump -U postgres -h localhost x_loc_0bdf08de > pulsecheck_service_test.sql +} + +# Loopline system (my job) related +thriftgen() { + thrift -o . -r --gen php:server -out ./php/gen ./service.thrift + thrift -o . -r --gen go -out ./go/pkg/gen ./service.thrift +} + +colorblocks() { + $DOTFILES/bash/scripts/colorblocks.sh +} + +colorcards() { + $DOTFILES/bash/scripts/colorcards.sh +} + +pipes() { + $DOTFILES/bash/scripts/pipes.sh +} + +crypt() { + [ $# -eq 1 ] && set -- "--encrypt" "$1" + + usage() { >&2 echo "Usage: crypt {-c,-d} " + exit 1 ; } + + case "$1" in + --encrypt|-c) + if [ -d "$2" ] ; then + dash ${HOME}/bin/pack "$2" + set 2 "${2%/}".tar.xz + elif [ -f "$2" ] ; then + xz -9 "$2" + set 2 "$2".xz + else + usage + fi + opts="-salt -e" ;; + --decrypt|-d) + [ ! -e "$2" ] && usage + opts="-d" ;; + *) usage + esac + + cat "$2" | openssl aes-256-cbc $opts -a -out "$2" && + + case "$1" in + --decrypt|-d) + xz -d "$2" 2> /dev/null && + tar xf "${2%.*}" 2> /dev/null && + rm -rf "${2%.*}" ;; + esac +} + +mkcd() +{ + dir="$*"; + mkdir -p "$dir" && cd "$dir"; +} + +updatezsh() { + rm -f $DOTFILES/antibody/plugins.sh + antibody bundle < $DOTFILES/antibody/plugins.txt > $DOTFILES/antibody/plugins.sh + antibody update +} + +promptspeed() { + for i in $(seq 1 10); do /usr/bin/time zsh -i -c exit; done +} + +ports() { + sudo netstat -tulpn | grep LISTEN | fzf; +} diff --git a/tags-settings/.ctags b/tags-settings/.ctags new file mode 100644 index 0000000..01d2744 --- /dev/null +++ b/tags-settings/.ctags @@ -0,0 +1,22 @@ +--tag-relative=yes +--recurse +--links=no + +--languages=-javascript +--languages=-sql +--languages=-html + +--exclude=*.min.js +--exclude=jquery.*.js +--exclude=jquery-*.js +--exclude=vendor +--exclude=*.md + +--exclude=.git +--exclude=log + +--langdef=Go +--langmap=Go:.go +--regex-Go=/func([ \t]+\([^)]+\))?[ \t]+([a-zA-Z0-9_]+)/\2/d,func/ +--regex-Go=/var[ \t]+([a-zA-Z_][a-zA-Z0-9_]+)/\1/d,var/ +--regex-Go=/type[ \t]+([a-zA-Z_][a-zA-Z0-9_]+)/\1/d,type/ diff --git a/theme/.config/gtk-2.0/gtkfilechooser.ini b/theme/.config/gtk-2.0/gtkfilechooser.ini new file mode 100644 index 0000000..2b285ea --- /dev/null +++ b/theme/.config/gtk-2.0/gtkfilechooser.ini @@ -0,0 +1,11 @@ +[Filechooser Settings] +LocationMode=filename-entry +ShowHidden=false +ShowSizeColumn=true +GeometryX=540 +GeometryY=224 +GeometryWidth=840 +GeometryHeight=630 +SortColumn=name +SortOrder=ascending +StartupMode=recent diff --git a/theme/.config/gtk-3.0/settings.ini b/theme/.config/gtk-3.0/settings.ini new file mode 100644 index 0000000..52d2923 --- /dev/null +++ b/theme/.config/gtk-3.0/settings.ini @@ -0,0 +1,17 @@ +[Settings] +gtk-application-prefer-dark-theme=true +gtk-button-images=1 +gtk-cursor-theme-name=Adwaita +gtk-cursor-theme-size=0 +gtk-enable-event-sounds=0 +gtk-enable-input-feedback-sounds=0 +gtk-font-name=PT Sans +gtk-icon-theme-name=Numix +gtk-menu-images=1 +gtk-theme-name=Numix Darker +gtk-toolbar-icon-size=GTK_ICON_SIZE_LARGE_TOOLBAR +gtk-toolbar-style=GTK_TOOLBAR_ICONS +gtk-xft-antialias=1 +gtk-xft-hinting=1 +gtk-xft-hintstyle=hintfull +gtk-xft-rgba=none diff --git a/theme/.config/xfce4/desktop/icons.screen0-1904x1039.rc b/theme/.config/xfce4/desktop/icons.screen0-1904x1039.rc new file mode 100644 index 0000000..daaa927 --- /dev/null +++ b/theme/.config/xfce4/desktop/icons.screen0-1904x1039.rc @@ -0,0 +1,15 @@ +[xfdesktop-version-4.10.3+-rcfile_format] +4.10.3+=true + +[Wastebasket] +row=0 +col=0 + +[/] +row=1 +col=0 + +[/home/xellos] +row=2 +col=0 + diff --git a/theme/.config/xfce4/helpers.rc b/theme/.config/xfce4/helpers.rc new file mode 100644 index 0000000..9d38799 --- /dev/null +++ b/theme/.config/xfce4/helpers.rc @@ -0,0 +1,2 @@ +FileManager=pcmanfm + diff --git a/theme/.config/xfce4/panel/whiskermenu-1.rc b/theme/.config/xfce4/panel/whiskermenu-1.rc new file mode 100644 index 0000000..d809556 --- /dev/null +++ b/theme/.config/xfce4/panel/whiskermenu-1.rc @@ -0,0 +1,81 @@ +favorites=exo-terminal-emulator.desktop,exo-file-manager.desktop,exo-mail-reader.desktop,exo-web-browser.desktop,org.opensuse.YaST.desktop,org.opensuse.yast.Packager.desktop +recent=exo-web-browser.desktop,exo-terminal-emulator.desktop,exo-file-manager.desktop,gucharmap.desktop,firefox.desktop,YaST2-org.opensuse.yast.SWSingle.desktop,xfce-ui-settings.desktop,org.opensuse.YaST.desktop,nm-connection-editor.desktop,xfce-settings-manager.desktop +button-title=\ Menu\ +button-icon=xfce4-button-opensuse +button-single-row=false +show-button-title=true +show-button-icon=true +launcher-show-name=true +launcher-show-description=true +launcher-show-tooltip=true +item-icon-size=3 +hover-switch-category=false +category-show-name=true +category-icon-size=1 +load-hierarchy=false +view-as-icons=true +recent-items-max=10 +favorites-in-recent=true +display-recent-default=false +position-search-alternate=false +position-commands-alternate=false +position-categories-alternate=true +stay-on-focus-out=false +confirm-session-command=true +menu-width=498 +menu-height=534 +menu-opacity=100 +command-settings=xfce4-settings-manager +show-command-settings=true +command-lockscreen=xflock4 +show-command-lockscreen=true +command-switchuser=gdmflexiserver +show-command-switchuser=false +command-logoutuser=xfce4-session-logout --logout --fast +show-command-logoutuser=false +command-restart=xfce4-session-logout --reboot --fast +show-command-restart=false +command-shutdown=xfce4-session-logout --halt --fast +show-command-shutdown=false +command-suspend=xfce4-session-logout --suspend +show-command-suspend=false +command-hibernate=xfce4-session-logout --hibernate +show-command-hibernate=false +command-logout=xfce4-session-logout +show-command-logout=true +command-menueditor=menulibre +show-command-menueditor=true +command-profile=mugshot +show-command-profile=true +search-actions=5 + +[action0] +name=Man Pages +pattern=# +command=exo-open --launch TerminalEmulator man %s +regex=false + +[action1] +name=Web Search +pattern=? +command=exo-open --launch WebBrowser https://duckduckgo.com/?q=%u +regex=false + +[action2] +name=Wikipedia +pattern=!w +command=exo-open --launch WebBrowser https://en.wikipedia.org/wiki/%u +regex=false + +[action3] +name=Run in Terminal +pattern=! +command=exo-open --launch TerminalEmulator %s +regex=false + +[action4] +name=Open URI +pattern=^(file|http|https):\\/\\/(.*)$ +command=exo-open \\0 +regex=true + diff --git a/theme/.config/xfce4/terminal/accels.scm b/theme/.config/xfce4/terminal/accels.scm new file mode 100644 index 0000000..673bbea --- /dev/null +++ b/theme/.config/xfce4/terminal/accels.scm @@ -0,0 +1,58 @@ +; xfce4-terminal GtkAccelMap rc-file -*- scheme -*- +; this file is an automated accelerator map dump +; +(gtk_accel_path "/terminal-window/goto-tab-2" "2") +(gtk_accel_path "/terminal-window/goto-tab-6" "6") +; (gtk_accel_path "/terminal-window/copy-input" "") +; (gtk_accel_path "/terminal-window/close-other-tabs" "") +; (gtk_accel_path "/terminal-window/move-tab-right" "Page_Down") +(gtk_accel_path "/terminal-window/goto-tab-7" "7") +; (gtk_accel_path "/terminal-window/set-title-color" "") +; (gtk_accel_path "/terminal-window/edit-menu" "") +; (gtk_accel_path "/terminal-window/zoom-menu" "") +(gtk_accel_path "/terminal-window/goto-tab-1" "1") +; (gtk_accel_path "/terminal-window/fullscreen" "F11") +; (gtk_accel_path "/terminal-window/read-only" "") +(gtk_accel_path "/terminal-window/goto-tab-5" "5") +; (gtk_accel_path "/terminal-window/preferences" "") +; (gtk_accel_path "/terminal-window/reset-and-clear" "") +; (gtk_accel_path "/terminal-window/about" "") +(gtk_accel_path "/terminal-window/goto-tab-4" "4") +; (gtk_accel_path "/terminal-window/close-window" "q") +; (gtk_accel_path "/terminal-window/reset" "") +; (gtk_accel_path "/terminal-window/save-contents" "") +(gtk_accel_path "/terminal-window/toggle-menubar" "F10") +; (gtk_accel_path "/terminal-window/copy" "c") +; (gtk_accel_path "/terminal-window/copy-html" "") +; (gtk_accel_path "/terminal-window/last-active-tab" "") +; (gtk_accel_path "/terminal-window/show-borders" "") +; (gtk_accel_path "/terminal-window/view-menu" "") +; (gtk_accel_path "/terminal-window/detach-tab" "d") +; (gtk_accel_path "/terminal-window/scroll-on-output" "") +; (gtk_accel_path "/terminal-window/show-toolbar" "") +; (gtk_accel_path "/terminal-window/next-tab" "Page_Down") +; (gtk_accel_path "/terminal-window/tabs-menu" "") +; (gtk_accel_path "/terminal-window/search-next" "") +; (gtk_accel_path "/terminal-window/search-prev" "") +; (gtk_accel_path "/terminal-window/undo-close-tab" "") +; (gtk_accel_path "/terminal-window/set-title" "s") +; (gtk_accel_path "/terminal-window/contents" "F1") +; (gtk_accel_path "/terminal-window/zoom-reset" "0") +; (gtk_accel_path "/terminal-window/close-tab" "w") +; (gtk_accel_path "/terminal-window/new-tab" "t") +; (gtk_accel_path "/terminal-window/new-window" "n") +; (gtk_accel_path "/terminal-window/terminal-menu" "") +; (gtk_accel_path "/terminal-window/show-menubar" "") +; (gtk_accel_path "/terminal-window/select-all" "a") +; (gtk_accel_path "/terminal-window/paste" "v") +(gtk_accel_path "/terminal-window/goto-tab-9" "9") +; (gtk_accel_path "/terminal-window/move-tab-left" "Page_Up") +; (gtk_accel_path "/terminal-window/search" "f") +; (gtk_accel_path "/terminal-window/file-menu" "") +; (gtk_accel_path "/terminal-window/prev-tab" "Page_Up") +; (gtk_accel_path "/terminal-window/paste-selection" "") +; (gtk_accel_path "/terminal-window/zoom-in" "plus") +; (gtk_accel_path "/terminal-window/zoom-out" "minus") +(gtk_accel_path "/terminal-window/goto-tab-8" "8") +; (gtk_accel_path "/terminal-window/help-menu" "") +(gtk_accel_path "/terminal-window/goto-tab-3" "3") diff --git a/theme/.config/xfce4/xfce4-screenshooter b/theme/.config/xfce4/xfce4-screenshooter new file mode 100644 index 0000000..6c74f8b --- /dev/null +++ b/theme/.config/xfce4/xfce4-screenshooter @@ -0,0 +1,8 @@ +app=ristretto +last_user= +screenshot_dir=file:/home/xellos/Pictures +action=2 +delay=1 +region=3 +show_mouse=0 + diff --git a/theme/.fonts.conf b/theme/.fonts.conf new file mode 100644 index 0000000..9dbc6dd --- /dev/null +++ b/theme/.fonts.conf @@ -0,0 +1,73 @@ + + + + + + true + + + + + rgb + + + + + lcddefault + + + + + true + + + + + hintslight + + + + + false + + + + + + + kr + + + Noto Sans CJK KR + + + + + + ja + + + Noto Sans CJK JP + + + + + + serif + Noto Color Emoji + Noto Serif + + + + sans-serif + Noto Color Emoji + Fira Sans + + + + monospace + Fira Code Retina + FontAwesome + + + diff --git a/theme/.gtkrc-2.0 b/theme/.gtkrc-2.0 new file mode 100644 index 0000000..e3506ce --- /dev/null +++ b/theme/.gtkrc-2.0 @@ -0,0 +1,15 @@ +gtk-theme-name="Numix Darker" +gtk-icon-theme-name="Numix" +gtk-font-name="Hack 10" +gtk-cursor-theme-name="Adwaita" +gtk-cursor-theme-size=0 +gtk-toolbar-style=GTK_TOOLBAR_ICONS +gtk-toolbar-icon-size=GTK_ICON_SIZE_LARGE_TOOLBAR +gtk-button-images=1 +gtk-menu-images=1 +gtk-enable-event-sounds=0 +gtk-enable-input-feedback-sounds=0 +gtk-xft-antialias=1 +gtk-xft-hinting=1 +gtk-xft-hintstyle="hintfull" +gtk-xft-rgba="none" diff --git a/tools/.local/bin/__pycache__/termpdf.cpython-37.pyc b/tools/.local/bin/__pycache__/termpdf.cpython-37.pyc new file mode 100644 index 0000000000000000000000000000000000000000..de6ab250967fa92196cff0644f8f16fcbfd64521 GIT binary patch literal 42835 zcmdVD3wRvYeIGhAJG(pkz>^>dK13}aq6mthBub)WnvzL^AVrA;X%Z5pm8JD!X94VT zu?w6Xkicqj6k z)bW>BUB-#;@Ap5mvkMTEWarCwzYB8DoH^&rne+U=&wq}0btMh_{rjtb`23^)$uNGO zH?2P#k)!z44_k)e8d<|Nv!-ihEjN;lxOUcdquHn%%f{Te>r~>|xLlpABiBSWA=hL! zDc4jsCD(K|E!VDWmt4EE-E!^8_QH)c1=buc?9 z*G<_?xF#w?vzxPB^n6nQTVlU6mcPJF`0_ z-d))>yF0tvG)@_AkK6l_;r3p$vUlOG&+W%uKkoM6Zi733y8+zY?QV1jUox_L-A(Qg zuEWUP>~2BsmSU>B?^-0g4=G#SZAjUM^7r8G4tG25w&QL;?(TFmxXa*f#NFZUL>&j* zF?W}{`z14buY1zH%iV+6eeNmuZg($Y_q)UHK9oA>-sA4a^#OOpJ%HL9N7IUjGZ=)cdF5uF zE7TUM-t#gbb!ph;{h5Wi!<;ewH_5KtTCB1^Bdu(eTw7tiSdclEI?>lkams6z&8(_( zRmth;u#midy2eSGEKZlI)lzjjQ=39R3JbHvswXv{T3tM&%NMKeEhU34gb(PFvW$W( zsc`aeBEdHomI{?(#+y;Kh3Of+>RK<><5XYs<}0Q80#@2=%`Hkr?cVBf^zxIa5bZD2 zs#rl@JtM`=uBoOzQ@fg(EqZx3@8zY$)OsZd1Hts#?z!Dz(DptEIYb>V+TZQ7)LGT3th7O$}acdK$gWFLQ#YGem`FW- z`P)2FnVZRHJcac6lVf33xLjHO;T7X?~&PC2tUcj}KdZv|cF|=lsNMty=SH z)ly;D^!w{xzKQ{HbCZW2#F%1@A~l)!JT+bPFq^!q=4Xqpw*YXAJG)RURrusMQzweE zb2XJ$OD9W}Vu5dJ{eei($>T7U+2?F*T5Tl#(kr)?{dlWmH=|O9xBBVEJKV*p@@`LbYvQveeTiwvt9YB zSDIfaUY!9_IM_%|S8KDy5n`T3V*1KdT}PcocRGk&c6D|(4jfdRsx4+CS09+o#)`5{ zvvy^vy6DH}RPjowc-6NbKX-PlktkIsYl{bJYI->3$Bv&qJ~8%;?>u>WV&d7+vnTvy zd&&B}PhB{ZJAUEZrHf-1a%WCoobXc}DSqSxJpB}q3cEPu5b>Aj7^6hf1RP|$+ z-(vNOpBO(kF_t@jY~pcFZoOEU`dLG5!C2osd#^V;ckf(jPLD&SGV;*<4_|$7=3%!3 zn{-4+h^+2AK=5>Ly`V~SUcDpNcXGK>wdCb;XE~eO5Ey36j9D?uGCTh{7E;Ydk6sH0 zT2FX(IKRrf6JZW`st3FG-K%cf_qM4Kii-ng7lTbf)z z)_G%o%O%jTSOSr8KZf;x6(eGE9*1Loq`p-5ow-Wh1L~Sp{dk4yL*U2iGYej+;zu$4 zg_&VXZDy)jlHt<9R;F}Ms@hfH_?(L&E_m-mT0M=xFq5WZrOj^kZ)4EE)n&t8Mo~P0 zpY(DH5%zM$@{E;;%ie(McJ1pn`p0yeJyeq(dg?~6Ss&_Mwy@yiP3yY39AQu2Zd@>) zF&4KqIVuCowuf!fw40Hpz1g@HF^%~rg7Jurt1i5)5eN0az1T>$DF;8M(|l76C)5Cn zsf`Q<8Eit}$BK)fg6e8JZ|pLN65p=W@~$5T%|)Ox9MyxC(lzC#05*JcDjUTXn5z2` z5Ls(SvzHa*I?9(&c`%+sW*YwnFs_YFqtf03YfFz~MzQn=!*V%4nacqWFH{&$=W@V( z6`iBFAQfSiI>3NCpd;YCD)L5W@Tv7+&iHLh3y;N1olQupHlS{gQGpx1UmdWrIN?jY{J zMsM)W_C{lU{EOfhzWg9=JiNSYUc+V^GL|iDCF`=Swl%F~vzo@jvo0HIuZugq$%5^5 zgMH9#jQEjCv8oA=_cxV7QH@`KSzglMrsF2NcSo9x|>8 z67E-Pq1tCLP((}hj5iWS9hZZ+Ui7Ik5cZ~{;P`M{-OJkUV{ktMS$l6`j8I#>jY0ce5|eGlr8bXW zov0t%%yt|nu9&+1M&p)z^Bc`gV#CGVl$*xYal71ZToanRhisw`d#c}$T`Z^~$e~U` zWYua42oYivjJ>QHhJeioZ3&}7gv3_u(ztIEHGqh!RqDVaB^UTOHd7>5hxsU0Dmk5& zl6a62t9vdG>g#Oj4|2G=5eQ1f2GRc-J-Q$5z1`{%QA->@0W1wfh(>@+tQDcrfL`!# z+P-c9kwl1Iyl6QFbOKc20j*p!-(fFDmhI)}a;zC`+H=R<$QENc-i$RPbK??sWHUKH zGDa?eGN8GTYvfYRIKp(3bXu1Tjy>+1kIP2WtF>F*i3S1NdM=1&Kblu6zvM@!3RSO? zjh1Q!uj0pvl}aFKKnqh`x z)E?%%6@hPF_05^ARk-R~g_(|(DZ9V{xs?~ri2gm)e{*b-@F22@BZ zzM~_)ldYB#JKQKs$W+J1v(DJX(Gz25jy;>T4n8EaK5=q*mrxUa90X}efoMpATyTq1 z`GtxHqGLhTi}h@r)FZZmI)#z*qXb^ck5y~M!c5I~SSW|5vS4o(>c!c7{c?8Wg|YMJ zE==Uko_p#dNZfN5Ph+u+XM2u6H8F8+{Qlhe3u6~Aj-AN%wh}Ikof$jEl%UALwM7o* z))skSZIK6VDe~ajA`jkDWFz1>{TO7Ibq|}0d{5q!ji#RA1Mxu0AmuSl>N%vgKxqs_-L%GIdAF$4+mWX( z@G*1IH<$bfnX3q&YGZqWsXailkVNGmQ1yWKs=tnB>MUbey_mT{)5g^?w^>QtIRLXs zt1%eN=9))C7|Y)CH;P~V2?Q8vV+A-mfKtYab=?4>i(JDDgZ{G?hZqM9XsAb|Eb_q* z?Yz`_QlM^ts3xXA@ss@f<+q(2w)ObD1Mg7JGvKU*B<*EC0$JnQ9;fS9^A$*da#-#4 z{}bf{s+J2ii4KCA+7NWGvt-yiqHl7B(mNs{Vvw>$o^Ztm7Li^`TO;EQd+T!tp8)!- z7fL0NfJCb5Gy*>cyazS|^oN2N158^W_gR-?;Qap{eswN2!)&Bm6F~SIZX^ylxgu#8 zhlD&p*#KeP&uhRTm>A^kF6azw2Q(bH_wl-Hfqwwqf!rg=wLGgFDT8fytrgH5U~MgI zBuqnyMr_UWG@Px^y}10=7ni3L>BV8Ey~NwSRSH?E&Y;M^V@b_;2-?>Kz?zjw{F5Vi zsj2^l^7VcM!o3Uq&c!Hnd|zv>!qNpU0{-#Jp9~0TjHa=|LD86A=B%mlIpa3hoXnd! zj;UHe`Hmj2@t}Vy3-uYSI+8E#mXl0U5M14|(jdPm6mvTBkMW2wt%lGl;Tr2KGd`SJ zmtddZ>t0|m%V3TH*Mx55B4h2rlNk55I*Q-}_|nnLq$D?7)LhU6 z#4=P_M7TmA=rFNSu@;&Fia&IS?Ac0$f{tZ-akpnTZLmENtf7-l3nCs{Hh5TKe)lD# zE%-nQkW&Dj_IL>sY510!)T~|HkI&@mGnLXLI3xF=Kym@NSVd7~qj}0R)Olog42rKZcD zyO0wO4A)P%sgB}?*a=w2^kn^b-18WYP!?n%J&KJ4q3WxoC-o|m4aC7i_v5c8-H8_R zg_+_6#DI>7adNfG!!c>my0RW;Hh;P3LbHZ7$pOhat?p$VsR?<0LSiy1?NuTJ(!~J@ zbH9fQLcVecqtR`u_aLo+U--wdIEr8WB;a71oNxB2>MqE?wggfYNLQdL!${lhyBi7|^aknC`+kINJ zv?jFDqMwCUTI*)}+)IIOw%>gw(9LcT&8z{)yVE} zPq<@vVkb1jr*Pc`t?p@Dce_uxPvUx)d&WJB>mK(x_ndnkZMoYeHSrGLIT5JM8jp(- z;aC;QSBQqGkfc`1n<-|dN?zkYs~mJh`FeeS<|?#|EUNMuiuOvA3tmxcTr_yTk;YsV z$Yt`6SBgPomlGgq<_BU(2(m~Xfm4h&W7i$94Vsn4VsEk1z!EV)gg8-LGv-FPyj^mZ zj!VumA@L+irQGNcpG!-6m)Gs}Ft6OT38`i10~oso{uO0<<*7ai`-L~%Al&MJaH|_# za;t+9Zjx|F!p+{6@>b+*6ZZZNm)z`jY9C%Qf_LHFe8&lFRpi|%U_CjmCei1tb?gvD zbqZo(-1Of>mDf-g&pmc0ww9p!n9;baHRGZD z;J^{UynLnp7$U7FhBLm+^`YL&nztc9&j9EsSA{rIYtQ|}Tz-y9?gr=$koRQl6X%(9 zfkOes#B|Y51xk6jai|oL7#^K2j#9bkM;WdAeWK9M@g`TBngX(hm>KQyqtFhbqOPDK zDM6X&OnweS>N}$P#JX0mu&rE*A|CLamOc{X64i`;Osf%n+asxb7Yh=R`AObG7!Bp3 zZ*zA14Khbs`JW4v|9(oE20apX1O#D%vMHm{Fw$E>zh7pZVGDGFR)a_x%Q)xbK9n`g zErC>LAh@P+-5$i-;s**xdDrN>W%j})#O1@yDSMIYvLze^Wk$g$lqdLc-%u2ReNe_K z2NMIP1wYwmxTan6lPO^6E(#=}bm(7>c-<>K+{+Yaw6SkMkb=PY5Z{9)_a&S&=`fUtaFcCJNCy~LEL%$C~EBCF@Y zPYIn2S_;#-gY&^fPIAy*=O4-V#y~js9gnV(^F~mE4F3s4Fqi~dA~-K=p}I^%&ZrJz za7h^N*AmBSOn@UwgA~G30EYyUByC!nfT$kZA4k24!YaQ<79)h|!LE>D54BfwYkQjz zaXO#5pM4dnqUG3{2cvSX(I56MEV_Q*hNN$#dqK3Jr7P%RNW_EEwfvsePDS(hO7-)2 zq$Q31Id);qT=dB+TTk(kx3QI6(VUUSmep9!=LqAjt2r;Dvq>pZGL6{x3fQv9BFsE?C zF(B0qc`sO%YvjsSW|w@)}YE<9^#i!4Nx-wY}pKZr^=c9*blP0-mC0g^do+OtO0 zdPXxj0sp4*c%_#4+Mj~re-S2=*Xc?@BD;uEjZ#ASwNQkF2;!B zA&kCdi>ASv()J|BZal?)YuP^`e?Q<4WhIS`;ZEo*9nO7=jCd34|BGx3r{s;-KO6MI zx~ostzYM!<4b=8JEm*t$-&_l1f%6slbz2Z-ubTKZ>%RVQ6D%V(m_0Jg)X@V+Kwb>lXLS|5d$(O6x_tw(m)9okx z7+GMDOd!_Sp0(Sq7baLx3btS7a>%t5Hip&Li+x9oL0Tnk*=A#NxEj|!39+NfPnHUy zEQ$69;jDZPH$-&m)8VW{X0Zi>nXxe|(b?E?43LHhF^+kOH=`>~Gmd$|tXwme6N@{W z4mR(WFtzQ0RVj|St^Nfrq&b#g{}98nTRsFh4MQum(6bexer(C9g^ujBT> zzF{Yu%0Y~QJ*a9mFWb$VXE2u+MI?vmovV~Q$eJ+4bxKQT{3zt=yv#vn2aWH=CD;tl zj!^@zxdcB_$a~p10*dZ1^rdRCE;B+7r&?6MgTAjF_>F6~RBmoT72nSZ2=Jju&}|uf z3Yi_Vu{|8{bsr7~p4t%(Jn>`w2~^n{cn`{A(xheJy^y7*w!?nOc*S_10V{AC_cq$dXuP?|!8pm)u{)+(jZfTl|^ zwDQM+=1tD&%36MH1>9f9txSk$az2Op8UqHrJ*mlh)Xub%v8Sp|! zA6m?Ez>9}lmZKOV-^Xx69Kg1t%^XWhWuSi)T{)F?7r_e39k9V>ma|=0nIZ=o2qBcB zH^5wG{1)-j0JnJ?J6 zLqCzDo%Pq)a}CHSGwZfGxWTYcNPcp*LczdM+$hhjD(z#I^a(QcNkvM8yj zs3d^_Mu6Dia!djDfD;6$YHBVJ)K>_PZ+str!WQ268^$K_iW`5;SdOvpA$EhKedDhf zV{1w`5xZ$-h9iC)6vhN)?q5T?fU%LynPplFd~qqea4Mo<)Z9n19XD167z6G0LljuRNyU%K#hR;RNwUoHRQcb zdjQCZd0;XOun%#HIwcNVFAM_q16Tut6hOch^p2~);AH(J16c)R0R%N?t^C6zzRL%}dk zDz2j%X>WQ!=uhxHf|5Ur7!akP)ionKuwK>Q=NPkV5Gda9x{X+cc0wSw4Nr0uNi%MO z-t3bRNbNy8lHUmcvib(fsIN018HMIbTvB&2!SvHwls&C-g;|nK(tILH@GP^pSh|RD zv62C@IEHMDfrZd9`C`E*CBpejqYz==Dg5e91ekLEuusb{MeVqYga)Wl5RkFOap4M1 z()xpk9PH-~c%WU|mS> zIO=*t9K~r1IP9r>!6T9q0}4=Auu2?b?nwruJ%`gWK0Gl|Q*K>B9|HR#Wca4%o4IUq zuCxd>67yin$SX#%R`DY+4^}1CQf9Dbb@b3GSO_XS4yjCxBdb}wZkkI4(7GQ&!2V9e zzUHy@hx_ArVaEW!{&1INxF^>gZVST-`kVv4Nd`U`bf()#$FNI!4CyIY6DJ|FN#dHq zl~duo(NrYbQ=tbo!qJ6DsKd@zgTIccP*LWG^PnIxG8DCIS#4__Ocd15M#lsscuRzK z%T(wYAjv1A+s~;O!Vr>KYEQ)w;2;s`s_9tsXt-&K7l`j8_|-p(Ktx`~ENH<%++{)Z zh0X%Mh;j}X60&HTwk$`5KS+q2j9Rt#mGFu?hq>*d@>BGTnH~|hqxTa z&T$s^HRGUec7o+fU~f3Cvm!_7UNV|V)^pvQCb#R%m$55&emme=sa%F|YZf#IMO-FG z6CRSATnbkg_YUPY!s+cnM1b*jZQBD_gzjnd|FQv+3H+Q^U6a@)B?Qn+jON?a5Vzp8 zXaY^GJeAEsMnfR=9!>yX3B~nD2qe)uZC+Ta=2*|VPHQkuf5d3AflNHI+ z`kCleDIA|&(vhf4EtKJ?$G4X5hq6X8bcciK5SFiZ?SSuKM@gt?(=+NO2%LHWth%AS z?vM+wee(aW+d>8t%ZZb*Y9)nxVJ}8Q_Cn^?y|7}v41#!_-4N0AT@Px_CLuhe^rGO^ z-*{s@*jj4X7!R+v)PkyDMEL*x7E$1TjkmN~jLp#&t#qu9+qbyAO;jJ(v@Gm?#yA~n z0|OzY2N>JPfQu8R2|~`Svl$c=nK<3ZV2HtH2Jj|gsI3y?)15nD%kA5F?;GreU2kG` z!d*dvilovge)Z!B7LRyBDglSX8bd^+Aeg|214e;K0Y>IQSTZcC7wJ6BL;4Tw`g|{C zYJg*qq_KOAE@2j1P6QgsYAquvV$33Rtc)Rv*=!2^CA1N)^gkd){Wb&g94-5bt4tuJ zm=#l=^_fsDAeX!&94C^3hUO=Ptm$AuJBo(GLA=SI495&2O;f9~wfb6wi;zF-;eetV z9S?cWUZw-r%0F1}M;7-qIe^c1do4chP%v`)&g)CrDEFN#2P24UDxgbX_P zu1<+YShyfGH_G0LU$|60k18_w}3w~~9O1g9SFAp{c!?vK7 zm44=3CyfS`u&`Lre1OT?)Qpxl!28W3-oVO6w6zP{aHu)7!l$8FMBFZKY7XIUNa(T6 zh;4?J;q%SSD_bZ(!2MR-f6p5zZ(F$ociZvQ7PM@O>tGFI4AA!R__#((k7Bq-o}$!dSVx zDMEd>uU!t~xi^%Z^iw*E1#8^+CkWcM6k0U#CrE2?s=E;P&Bm~mjR91t(xSE@lV>rK zhA_AQNGvC`zi&d?f8|Do_mq&`An`uY7?`5E)TKiY(ox#G$I0PgjXFNd(w}1RD+scb zgN$NZ9*18C=PZn&^N6XPe4TJ31V;M&;Yr45-=I7d$a#@^-qUV#-By+`V4sv{WE2w9Aba9jx zi|W&?&!Gw9CD`uzU7DjW%q&!4$(@bY#pP06VTT)v_GA8*PM#k}biA1yoQ=%ELsL-% z&whLszK%$1F0%u32!`*}oNr_j=Qc$=5O+&Zgyxq7@q+V3acxVdGI$Z3f?UOK#<%8h z@Ny0ZFsByrTav-aS`8#NX0lQ6Ou0pUS;|H$G{MY9y&Tx(Y!ng+-c9mO4U_bbWiWvQW%|p2g{2I3-vp6wv;)@HQPZSY#6yu!QO!Dln)-1<<7sD-Er+ z{!wF*W=@1`9^$+LEcXH|cMGYDCn9MZ2btvAUJLp7b)y9Tbw{89LA_1{^;u~-@I(WO ze!k1FN_WJY* zBpF9 z-8dARzypZk#N2f->Tu!GyV8eu_ci;PsdE427@*=#dbnWQaorGH2Y5w0H==)o0ruJ? zY0@uXuFpsfLsG*bZ!^!!S6^%PQUCjzSwADWTO{|HR{b17N#82zO>dib2m9?N(9X1r zb^<@8t4~Oo?Na9B-ksf6Q=PMxHsK-i;H+siw8CcL|@>c-D=woOiWIrfbAp3EV z>x6<|9?+ z2n((}#1U4*esTH5<%X5XbO_=S8n(`&7eZb6gm3TzwzMcQxHni@RR5T{MFuVdkprdF zFEW0aL4|>c*hJWNfw$z?;Q?nZU)5NGgB6hbjD_L`-;txFIMDdZgbmz-Ekf1CzTGDK zzR@P;>9`AWqC#8t(0X3?YLd0*5!?`AhN!Xs47bBOwZY)M*w-BruX}haAX;$DGbjn; zFzC#@!U9~c{8QE@-M=I`$8gyA>9GqJ$9(5lZv5PZv&YUr;y5!6q%y^#6t&9vML&LF z>?BS^KdvU2^a6vwX2A8L{sw_>zx}Dx6N(x@-?{ksxl6f;bE9w|H1^B{90;8nQ~TJo zL(ER#Z1vMR@lkp5-1)I_%@p)&R_i{Nl?ge**z3-UdMk?fHV;jzKV)@gxjjX`&C@4h z61NtRJFTJr1x^&ZWmpcZ(PB7R+6^EJK%5!`D2J8;sr}$KhRpo}u2~u8t33ut01miejmfmCpIY|(JtsGd-F?Iem zY-xCYaN}rA7h4XZ|GUzIE`a=q+kJ#UIi(LgF2QP!?0{Gar%hZ}*#`HFt3Q@0eo<^W zd~-P*OiW_iG=^M|2vHmkU&pBzSp+Sy$RDB9npGjv!tZiHus#Sy9tqiQebz76(k|!3 zU~*DCKDIY+`{av~+F8rrMH6qfn}{R2ZV3XvMkKQ*BO=PI^JFm)&Nf`Z6E?~8l}l>g74-Vm*jmimD#w~>DRL<9iivAx*ohW z3XZL>GXsCb@puHCph2NcVhTH#1~}Zu)H@DfhiY{-9dqD^y$;h6{4C@`@3{NTOms+F z_2EsVts?k|riI(}72{=STz(MBO62mSu4oAd;U0{e;w{%Hn!Xb1Dha9zhu4IrUYNgp5P*zV!?qdhWR(!9fxEkJ8ZyWn9lvOIAtWwpiJbQ;c z`!R1jdWJlqtWwp-B=1hi`wg@&BW;qIT7R^0)SPeJAy51+r3;`v+mzO~Nwoo}rI`at ztIT^)T50M(T9npCP+Bb@@p|Oe1}>eK5NL8sy7uPCt)pHvSO5>U$*m?9MKiIA#ESd? zB$f^5E3NI@h`qRc7zQ^&fxwZ2kP;zDrQSl6e3*ey61Naige7kRWebw_?ODJfA*7%s zvN>*TT1pZ5Z^ah7g^Z&00JLW9JuA4CPq#twZRjZVC|ll1M@f6%n2u79geP%m>5z?>LhQ4KI(bu{E1`m!+7$-xwARA zd{jKup-v$f?(3kJI9hLJ+#hE-Qc8-aVl=JvG-FRN7-0q>F9g?@m>{Yf(vVjL_w{f- zo<_a_mb8;vN(;4wQ*S>owG<=eWC!$8`%qN)$`I;C@m9($g`>TK2$XFkgIb2K{nd9; ziUe4=54)YY;6DhDs*fW*iu5x)_YS{EG~|zMHm0HbbR8ZTu0pCyJ6`p46;A7DxvLb) zq)5E*hRG&53M)Iqe*^bL6vw;9&~iEa9J$46e)Inyz}B*u>ixh zpJ&NrePMD=)hK0vZhxVwkCKvQKnbcG#H{ifXs znc63wYolaDm(C%+0uaR$h=L!46YsG42H8q`FW@?GkS#d^)cuqsz~lQeyuB}X1J}Ka zxQ-dj_=jD?ls~%v4~5don3B9qzGNrE{B!5>5ZLc*T%@^0X?ckv!Lt$Y4m0Z!{$Z9>IOcoDxk1*1Y_ z?_P!=30nkP(FR3?N;2Z_(XLXQ)7ITb^nQ`$Jc)-_5##UVB417M2{B&gn#NKjF@ASQ zqX}%_lJ77pZ`0l)?U3A-nyM}B=t5PYvh^#t`GKV!?+&FMS2X&?XvZ+7+FCKGr5WOU zWU85@l`Hfav{Zy`5oI854D0t@h=U2~m(X@bVBg^I28J&1>DEjKGLi&p zO~0;;Bsre7;ocYS1Id`^kxp@tWw;5M)H^uDA3>~z;D?iMfZOlj6KfEBmv1j9*b`i4 zmA4a>2ve>xJm6sk#C;W>*pz7SvI$O&R`gM$2t?Dib`vQFF`37C&)^-M;uG@aN#GZT z+F35BfVL-s^;X53Bm;J60W`%$XSl3Xn;=+6rt)_~3nYaWICFaZ$&0ro1_bS^Nej~(3aq& z!w{6ThivDNl}0ncUIdf?Ndm#kW?*I0xu683Xc~rYv}M`-qZUjtI?w)w+2LDQG4bIj ze)X>*Sn4GXtkCKTm<<;BuoU1woJ9hbdbg>q@?pCV$^*O*yt};$Icm;E$=7sAH>Tz5 zbUcooZY>RY4xEq2SLliyveE0Jcwbes)2`V|U4txm6KImf!;Cj+ul(gD`T7ul zJ}n`XQRp{qxGNjeuUBO*#Q%u5sn0O@`wRpS-NhKyaoQ_n4F0%bXr_9Y!ue8|+t9dx zwPfuoO;BshTa91*egO{EVy*2-_J%rW!4C=CQjawtr*U-!uf&MHIZ2(n0?lT8&J$KfBiwt@-JO>?&(7T-Jo zwvcn;NAhzehvpwNa=6O?n6vvev?I{+?tu` zuH%p@?I-o*e3i4pBAk_enH7OAqAA-3aV>0zH-$5?`dMfX#sgbjk`d~C2(XgL0p9NN zWyu@o`5zOcJpP{?-n+&Dnjg>Q+*%=*)2@p@&#Fn)t6yO74;cJI247_GPZ|6Yga3`e zuQT{92LBg>8w`Gy!50{Oo54*6B4MX+U5oTn+!GLr!jTRGLC*L@k)f5!k1+Nm17Q!d zj1f<$83rW=oE=qX&>n7y3D$itUKBy5ct&(0ke6+7df}PPPDY@>Ogjm=b|;6NE@xjd znoK%zryFG=aKfB+dQh?p9^AT<&pD4dyPadspz{RsHi_$>0_qO`I1NYf6YJ!*t1epd z^Xm_^H4^*#kT2l_{EhOVod}>KYI`~-ga!OX7!kKinn$z8Cm`qLEbFPZHA%#3ZtP|1 z0=haJg_BtMzK;?tkG&FT+B3}6PW-h!L3_kxu(qL!uX9x<5otSCZfu~rllG|;Iz}2t zf9~Zg?_+R313td)B)lIP|2OMpLmg9(1ES#{(~sgOer9eRJf5)Sr!%NE1A_^#Gz;|{ zwCy2IL%-T%c>p&&r@Q8}8G0-kf^J2K^DPLqw`v?@=g8@i{YyOG=q0F!e^L0*zq(AQ zug_V=I~*!QGPn5R3-q)bp$&|JtjOBlJxUL^mSs0T%B?8`}K}2RU3UtF$VF zwJl>WUZG3j!8GVba41WB5usyZk8aD+Eq)OMu#%nvbPQ;n#!XFn4x@`!oHd0Z6UzWC zH{&=&w8%IXUYuucX*R}FD5#YtPL^nHTK;^ES-UWsyNa-uyQ-F0<(f6WjK{ytDH%kB=QDX+oE8t-*ZUB(n~lDX zsnPO!`m9`U^|Q8)H?(K|Dqj8jd=0TCy+bOd6!^~8U$_YdkaFuL5C}qX-Ktg3>PGRa ze;GMAG6Y07!?h3JXmC-b<2d?4N{$jD#Bk_;hPxn&I8&igPWH3^&zh-$m>VEJBV*Uyj9mg z$MYKz?+MBbBHkOsHzD2^#D@^?58|5<-w?#NAU+Vpw<5kVh;KuDFo@rQI4rlMt=kbF z3gUMnzB!0z5Z@BScObqsi0?#vTM*xc_#HufH{#oa_+5zK8N~O%yed+@TgGm$%bIo~ zhoe4>_^zPTKG`n2;fCRqZ%%7LCV`QvGT^S412y7lSj;AU^SHL;BD@Z4yw3XOgm`%M z%?oM|7KOT-L762UX7F_eZ$;pn$F!XE8*+2rH&5R*AH8Xg_~tV=D6kVTpKs3l=855Z z{0NWiBu<^1I44?e-)2<%RCb;mdlufYFO3U_myPlEsq-T2_2Z|`<&Ga4eKMP1>V?y% z9-jyl=%bGxI}fcMQqPQ?M4~9rndrlV_Q{j@zR&2hqi4o^I4f`8QMaFsK8|l#UDP#> zjZchS&ezWG_D|@Wo}l()Pr)wW!a20Om2l?# z=E##qE=hbdcXVPn6@FvojG=V?2Mld@8K!jcTSIw=1!hNIp@S!D@Kcg z96oTAP0CP?T|Au~(=z!{b~Sop?D$isUI+91HQ~=mOsqbcFerL`nq*OH(IhKeYRslpxv;?*hjCwF1AfGD#BCoz}qW-7akUbGf1i5deGYM*55J8)!`QaUEB>QE3Gt4 z^*KBqqGdu~RwAu@0TG~Jz+E>2^8`5wtj`lIL!?M~K2G#O!pwGqy`h^h*c)Fnr^x1* z>I`xKe-W3{@w^fS1Bp67@!+7*)5Q2qbAJf`Bf;D2xYoBLz+s(1NbhiZ$~8z9kn`?5 zv_l3K{45v%L9rN&AH`D|ya<$7gByF%*S)R2<7mR&FoG=QD>y2f?rxU^B>tOjMnxbYS`0|~0 zuD-fq{=j+-xtlE|+%mw^QgXvXY1*tseW7#KxZc89+liZ&PjR@|z^GjlX@xjzjgn~< zs0^+t*5RO9;VJE6n>DK|xCLP?P4Q6zruNqmYTDvgoO(G1sxnXYuNi6^i`!cNhNYkjR}HrY;x*fk+(AxEHDkr)qI zk{5Q89Sl3k>29KPAS^9(2>3T}Y6NR_q}xXzeInBiM=6hEZ&V=*0<}Uy6ft~fhA|7> zrX`FTcVkuPytudUtb=E9g}oy870wNE4(ImBv%F&D`XmQ4j@1!hNB877u>=0fsTe? zAqAT#x(vYiRM<65$B+gCcsKp3IQ1(hW%$cnDc~GHxr0Q5H#ZM1gUTS*#PiOlnOhyg zySwr3Zt*+@_W|G!q^$UN>w!FF5@tg<(ldnKxauu>td=n+cw-gsqKg_D> zkd2Oa;VobX9#GuN*`B#2mXNRVP160%FX1hkrFem{9D}=9oGaG1&!0X&<|kE=UjyaW zAm!bf-FQ2T{xbx_amasYM+DC?#cB8;VV!hw#Xf0^$%$6kHG3c5#%mcTNe$<@7{~`2 zVvwhuQ)RFar~trs^2E$XeF?R#g7X9s0v>iF0-%7Y0fdJp46q)ib65yq&~V5d`++N8 zuwujB4LgK}^^WFE^95C9KP-W~QvGlQUdsW2QKYW^1zZ0s4Awxd^K1y4Ob*n5K%9a? zC8@}fKQ=9F9`*k%Ki6m+wjx<^tSN5P!}MWPrkx%=Ivobbsqd&x0(uM}7W|OeC+WdW zEF=}58PXCbAxBPEJfu}ysdw!Z7Z>w@85r`wsHBa+qNj%Hlh(5$7H{2#l<0XKnYyDfLRvTEFg?zr*Y50K?KGS`r1hd z*YSPP%Xyq#fvqO605>AGC*>6CUo-d$1HRSoyJg@>D2Xm!e}jaOQEM!4N<;#xe5zc3a#NdqA`XE%RK*ae|3_5O0gMDJN$0!7Gh(ai zSJ`oaMnWBsT2NoRZMSv@-J-)G-8C8^qJ!A$xZ2l@pgSO6qtXlIp)&Y7C0d^I2hb(x z5AosFkd=GArY3b$`K9(BXFCNaVEAcIu6~ED#83X16VfsN75fVekXa&v0_+5Q;l~@d zgIKe~)dJE$rwCC8j3Erv3{e?M9%X48(C7)z5(7($YGCGhOa2T$Y6PkXWZ-Mo;suiO zG_iTjdj14hB7C>68Brf>M$({*<`)6k98k(%UD`&o2f#kiP53MGFyn_J`vPoP({;B8S z=qt=~n{k+&CEX$U1WTI2Gic}FWFsuU1?BOvVlU=yrBN>1R!xFXiHkQi~Kp}>-%*|;Rvae`dCm3_hG5N zm45e5dPhYqUqmZ1O@7G&?ZbOw?vC~y{H2m3<630d|BPIS@ZK%tmUyAuH7>{x1nf*B zHZsCJBG3~FR~m_tkpOg@e2mEErZqBmvuk98Cj&+i0Qi2A)XE!cZAPMjy}oRew2Ij=Eji`YQjhK=Nm?X&o_uZx-o#~ zgM^MZ%46t2fD#4POVJ>qqo{NZou^hDU92ghy8xv_=I}hKYHT})OmGAl;(1LW;LGp9 zH=$7$68yzRI-oQ}y}p)|*m={uyJ5XB(&&AvdbwJ=if^{ed4S4?GmSnxcekgt@+3Zx z)YGCv0&P7kOo+qa!l>v8%o6abt$v9+G@vFXQES+Re&!MrbP%JlQl0N1-wb%F{sVJ= z2LV3qZo@krTpcmHuJWi4C#^1{%r0a@!>pz?)+BAxffocN1gs4!_$k8KccTpbFKQd1 zv_%g)P}_qVZ;3dF9O(<4r{h=0X)D=EUmd3z0L3FjrTn0DKMY>dpn;jrvjt2gHQa6W zf>nWl?wcGGnqP%ro)aG8*bBH>1b8k3?Ba{t*cwDjlx=C{|Ga}ugfsRyMTZRu^n_D# z%*PdWW5ya4oh|$X&~XLq=HzT* z5_Y3>UI7nXVmU`!yfoMX`q_))?1I=e3J~jpYgh;8>?s{wg!V|;E8WB&yKzfdp-ro85P zwORU8oy+0)aW<(F7#Gh)J`U25Ro3=#?_?FL2j5@iMu%Sv{w`;NTh72DAHq_kn407e zL?+)x1)<1}nlFg^a8?#)ay?iHi;w2?e4`1^4rNWE40v56ikRkZkn_I#B)40h zJKWhm5drZ@O`f>TBx=St#Kg{XV0B-Ecl1gvE3iK9dYB62KEyyxW8L%F591ErFz8tU zv2dJ%XEiDFbv_Hb+_<*^F~}`~XMgK;pB<3*e$VTB8K-fZ@_8%F2j+lvdmE|k^9IYC zW;i;Q+Kaj!&O6JBU2#|zz2&)ROFiywz%f4TBguC<>Vmcqb!`sn^3X?=VqN@VD%u;C zMP0OWw$!Ja{32=+v5&rPFL<`vQeWemlG4BSx}~?FbOaxdOo8o%g})FXe~Kq$T$`zt zI|Ocmq~`j9V>x@d*WJ|Y18Xt zH#3BPk&d?sA%`?~OBh30tO^jE|1chGacJtLmkBlEx;n&?R8^hRCtO5kOM0W zzFr~}0pl1HS1`_+17Eg27K*R#l0aU;NdS_#ItN%o`#GR`K;zd|dHJd?pVsMuUGbT= z?*N+K*ntMBLyYZ23}5=H!Sz1Tdn3wEj?RiIN7NTvpSy3ib$)7rPtnv_tPpB;BWb?m{ll%Iuz{E!4}T|{Zxp8=;R`ak!&3T0f9oI zg-4is;XPst#daW58auC)>I;w+!|!{CZ_-uOgoF#)&^DMS?xPoW*L)dLI~NMNSEGU2 z2dYI5f_7y~O%@1mqSe0glR*SgA8d#2_YjLnX;(y>8IyRpPRxsQS zK7=|Tl-b9oKZ>~cY=t$=A2A`Eu8uB$orQ?`g$6+9rPu9g+tBWANI2|dr?sqr^yYxs z*t>4m*Ln2sX2RGzOxXWiXTmmij(^yLz2UT(jeYC3eci`o?VQw>W2P*b8?=_YahT)B zBYP9Rc}6{syN2~xhOSfRz~eQ#cHMJ)?9}P;+}odm#X%#r>mC{$$PEVkH(9(lGhT!J zDo=uFU*h_3@gFlUvTt7oz55gPj(fWm=kA8Z=V$ryk1!C55afZOec2S4Mx}fQLH#__ zK7jzvT4z-Ih@bix%l!m{F$S`LPBJE|=tGSCCH{qG zDua(R*vNqN9loE)j|LVh5L3Z=3(_?q+<%h!bq1ecP-Of5I|GU!hx>(q)y83~303u7 z7QcxA-cN&XNzr*udyW4p3vgxlX))*H=SaY(Dw!-fUN|BzlPVwvFXm>7^7U^ne&_>b zBgm2xNG5>H2{ z>>1cFI+f;OaDGLGPf%k-s+eWgyQ5Btj2z2##;GB1J<%E0Od&%`T6z9K>!=8GdCZ)a zabyr}=z4WovZG988`}9Q0yr1$U$Tt^0UVb4S0NfCRuh^8gXJy z)8ht2O02Dyc$7+Y;M~`620aQ|yN@1j07;Ex=O@Hw7~0xb-&r|wU??Z|~$Fz~!x*5~G4YR0@RJh>TA^)Go_ zSGIY5=o5r+5In(HQ*iv&@*UpRGU%UWpe*<~Gs+qL*0QvK%3h(gf>v3C>%Nh10F_C4 zTfZUo!;htX5kXL^0zEoo2aRVlQ- zv9cF$8V27VufkXtd;;fNe|{_613``ZwgQt}a$JSruR-nQg1DVat7aTPTr=(DJk(Klz5!*?3NKeE&15v8urngoNdAV`ZMwb%EzeoX_eQX9ldS&C#C#R z?+mzFZ49+`)t{9TRn#yJh)v`4b3764b`t{L(%$n@`jcx)Lvg-t>9`FGkK+n0boi0BkJRz~xJ1_cK|RWiIOj{B;K3jXa9&h z18DJ1Y1t>ee0kCZxtUU-o`G)wcm{)+5Gex9T>S}SsRjOXyuFG-S}HHJrqIG<4(V8NPJN%b7|(!QeuOchqlIu5`LmGA$C>dA>-%d4 zuQB)=20z9O64UDcVeBo8J;2~W2EV|7aso{_zl|}nch?1L=)^NjsC1EI!$i7^u2`m~l%+#lubPfIz*eu}}Tc>77leulB1W^9GAPce3# zu@j6v$>13VSq4)Kt>#ZnuThB6kJG1{jgBKXIjlIY+>rZKa1{rXF-C+KG z4EVVYaX<>s7DDI?$uHFY&+)0vEVPG#)J}T8gT=S0LH|Y4_2fw4ZVfbg%(Osn^9nfy zsC1##t!<>71B#xMw*?AX+o#g-h$*1wtqkPd+8kTwF>Sk~&_uhP#@g1FYZ-2LmZM5Y za}FXWL2GDh#)IZ-ul!`qt?7J^PN#}#ZHzr=J@xvrR;kt3)-!Ce&S}S5@1^fhowq6` zd{3AzcQH9NslTMgma*SM_*qC-iB5hbfvKXIh43RZWue}R`l@%+^Dr8EwjB7d1DqoG;hKRjXMGr6MW;gj0T3tmKF zYAM`Cy4(fs1Qf6Om+)c?<1c(xz89bEg!fN+o?ea<#=hOSU_4_iZfo+p6$8tT*AER6 zrRwmpa1A(N{`1hRZLp0pJWNyKX&JeJ`Nu99iy3c2c>vE0(veJ;I|3fguS@EX-U~u{Z^~~*G%f}nzqL4xNb%*TLjnJ<*kTsqq!P!2mFM>qzt$h z=4Hdqcw-P^iVQyZC+_?42^rXPW;_qBZZY(Y)3-+&aMlL9d#Z`?r5Sjx&B*teGFM9Z zj5kxvOq@P9dg>C6Wn?p@TEVL{dY)Q+BwM6YE&MUOUCStc0n_Y5V~a!KOB(9i+|+^& zgkAq8Z{Lfisc$g$9>zY%V1U6!26r>q&R{QtVFvpc2uK%bPDzAV5NfzCkgN^d+c<&i z5rWkJ##j9t26+bZ7J*GKu^t*OssELMz@xRWXEtA|ehHH1Izblw_2Ot5LO>sQ*KN6h z8;od3LEd}-PU6Vb_d>UsGzTN_!W-$eREi+b$>msIE+=P%^+{nZygDUjL+anMf&Y%d z|H0t582oz%zs*3D-%qfq0;r#4>{SLbdLku0!&?E&U*r=zc>Al2H5j|fK!)|3jPXP# zzQ9p}rDufqQ0-y*X#IKUL2ZuR$44n=_fw!Ks9=PevaTRqz=QCGJfkRb@Esg8n4=zE zan~zudv%b(Q3mf~AX651SbYXkCB_`q|=LiJc3zgzy-FUXn z> "$(date +%Y-%m-%d)".sum diff --git a/tools/.local/bin/check_images b/tools/.local/bin/check_images new file mode 100644 index 0000000..945e573 --- /dev/null +++ b/tools/.local/bin/check_images @@ -0,0 +1,8 @@ +#!/bin/bash + +readonly WORK_DIR=$(dirname $(readlink -f $0)) + +for f in $(find "$WORK_DIR" -name '*'); do + identify "$f" >/dev/null || echo "$f" >>/tmp/fail +done +cat /tmp/fail diff --git a/tools/.local/bin/clean_downloads b/tools/.local/bin/clean_downloads new file mode 100644 index 0000000..013c021 --- /dev/null +++ b/tools/.local/bin/clean_downloads @@ -0,0 +1,18 @@ +#!/bin/sh - +#Title: Clean Downloads folder +#Description Removes subtitles and clears empty folders +#============================ + +cd ~/Downloads || exit +ls ./*/*.srt + +read -r "Delete srt files? (y/n) " RESP +if [ "$RESP" != "n" ]; then + echo "Deleting srt files" + rm ./*/*.srt +else + echo "Skipping srt deletion" +fi + +echo "Cleaning empty folders" +find ~/Downloads/ -empty -type d -delete diff --git a/tools/.local/bin/itopdf b/tools/.local/bin/itopdf new file mode 100644 index 0000000..e7f127e --- /dev/null +++ b/tools/.local/bin/itopdf @@ -0,0 +1,33 @@ +#!/bin/bash +# @Author: jguer + +name=$(basename "$PWD") +shopt -s nullglob + +convert {*.JPG,*.jpg,*.png} "$name.pdf" + +read -p "Minimize PDF? " -n 1 -r +echo # (optional) move to a new line +if [[ ! $REPLY =~ ^[Nn]$ ]] +then + gs -q -dNOPAUSE -dBATCH -dSAFER \ + -dNumRenderingThreads=4 \ + -dBandHeight=100 \ + -dBandBufferSpace=500000000 \ + -dBufferSpace=1000000000 \ + -sBandListStorage=memory \ + -sDEVICE=pdfwrite \ + -dCompatibilityLevel=1.4 \ + -dPDFSETTINGS=/ebook \ + -dDetectDuplicateImages=true \ + -dEmbedAllFonts=false \ + -dSubsetFonts=true \ + -dConvertCMYKImagesToRGB=true \ + -dCompressFonts=true \ + -r150 \ + -sOutputFile="${name}2.pdf" \ + "${name}.pdf" + mv "${name}2.pdf" "${name}.pdf" + mv {*.JPG,*.jpg,*.png} ~/.local/share/Trash/files/ +fi + diff --git a/tools/.local/bin/lockscreen b/tools/.local/bin/lockscreen new file mode 100644 index 0000000..a8cf253 --- /dev/null +++ b/tools/.local/bin/lockscreen @@ -0,0 +1,55 @@ +#!/usr/bin/bash + +if [ $1 ]; then + lockbg="$1" +else + # lockbg=$(find $HOME/Pictures/wallpapers/*.png -type f | shuf -n 1) + lockbg="$HOME/.config/awesome/saturnalia/wallpaper.png" +fi + +B='#282a36cc' # blank +C='#34353eCC' # clear ish +D='#f3f99dCC' # default +T='#e2e4e5ee' # text +W='#34353eCC' # wrong +H='#57c7ffCC' # Highlight +V='#ff5c57bb' # verifying + +i3lock -n \ + --insidevercolor=$C \ + --ringvercolor=$V \ + --insidewrongcolor=$C \ + --ringwrongcolor=$W \ + --insidecolor=$B \ + --ringcolor=$D \ + --linecolor=$B \ + --separatorcolor=$D \ + --verifcolor=$T \ + --wrongcolor=$T \ + --timecolor=$T \ + --datecolor=$T \ + --layoutcolor=$T \ + --keyhlcolor=$H \ + --bshlcolor=$W \ + --image="$lockbg" \ + --tiling \ + --keylayout 0 \ + --pass-media-keys \ + --timestr='%H:%M' \ + --time-font='Arimo Bold' \ + --date-font='Arimo Bold' \ + --timesize=48 \ + --datesize=18 \ + --indicator \ + --datestr="%A, %d %b" \ + --force-clock \ + --refresh-rate=30 \ + --radius=100 \ + --ring-width=5 \ + --veriftext='' \ + --wrongtext='' \ + --noinputtext='' \ + --locktext='' \ + --lockfailedtext='' \ + --show-failed-attempts \ + --ignore-empty-password diff --git a/tools/.local/bin/m3u8-download b/tools/.local/bin/m3u8-download new file mode 100644 index 0000000..ed60557 --- /dev/null +++ b/tools/.local/bin/m3u8-download @@ -0,0 +1,58 @@ +#!/usr/bin/env bash + +# Title: m3u8-download +# Description: This script will download video from m3u8 address +# Author: William Chanrico +# Date: 08-Nov-2017 + +echo " _____________________ " +echo "/ hello, who's there? \\ " +echo "\\ william said hi... / " +echo " --------------------- " +echo " \\ ,__, " +echo " \\ (..)____ " +echo " (__) )\ " +echo " ||--|| * " +echo -e "Download video from m3u8 address using ffmpeg\n" + +if [[ -z $1 ]]; then + echo -e "usage: m3u8-download M3U8_ADDRESS {OUTPUT_FILENAME}\n"; + exit; +fi + +m3u8_filename=$(basename "$1") + +if [[ -z $2 ]]; then + output_filename="${m3u8_filename%.*}" +else + output_filename="$2" +fi + +echo -e "Downloading $(tput bold)$m3u8_filename$(tput sgr0) as $(tput bold)$output_filename.mp4$(tput sgr0)\n" + +if [ -e "$output_filename.mp4" ]; then + read -p "Overwrite $(tput bold)$output_filename.mp4$(tput sgr0)? [y/N] " input + + [[ ! $input =~ [yY] ]] && exit; +fi + + +counter=0 + +# Parsing ffmpeg stderr and stdout for cleaner terminal output +ffmpeg -y -hide_banner -loglevel info -i $1 -c copy -bsf:a aac_adtstoasc "$output_filename.mp4" 2>&1 \ + | while read -r OUTPUT || [ -n "$OUTPUT" ]; do + + if [ $counter = 4 ]; then + while [[ $counter -gt 0 ]]; do + tput cuu1; + tput el; + let counter=counter-1; + done + fi + + echo "${OUTPUT:0:$(tput cols)}" + let counter=counter+1 +done + +echo -e "Done\n" \ No newline at end of file diff --git a/tools/.local/bin/media_converter b/tools/.local/bin/media_converter new file mode 100644 index 0000000..8dfd3ee --- /dev/null +++ b/tools/.local/bin/media_converter @@ -0,0 +1,144 @@ +#! /bin/bash +################################################################################# +# File Name : media_converter.sh +# Created By : jguer +# Creation Date : [2016-06-15 20:31] +# Last Modified : [2016-08-17 20:54] +# Description : Jguer's media defaults for conversion +################################################################################# + +readonly WORK_DIR="$(dirname "$(readlink -f "$0")")" +readonly OUTPUT_FOLDER=$(date +%Y-%m-%d-%H) + +# Usage Function +function usage() { +cat <<_EOT_ +Usage: + $0 -m mediatype -i extension [-d target_directory] +Description: + Converts files to more convenient format +Options: + -m audio|video|pic-lossy|pic-loss + -i input extension + -d target directory + -h display help +_EOT_ +exit 1 +} + +function validate_filetype() { + local _input=$1 + local _message=$2 + + count=$(find ./*."$_input" 2>/dev/null | wc -l) + if [ "$count" = 0 ]; then + echo "$_message" 1>&2 + exit 1 + fi +} + +function validate_folder() { + local _foldername=$1 + local _message=$2 + + if [ ! -d "$_foldername" ]; then + echo "$_message" 1>&2 + exit 1 + fi + return 0 +} + + +# Main +## check options and arguments +if [ $# = 0 ]; then + usage + exit 1 +fi + +if [ "$OPTIND" = 1 ]; then + while getopts m:i:d:h OPT + do + case $OPT in + m) + readonly MEDIA=$OPTARG + ;; + i) + readonly INPUT=$OPTARG + ;; + d) + readonly FOLDERNAME=$OPTARG + validate_folder "$FOLDERNAME" "No such folder: '${FOLDERNAME}'" + ;; + h) + usage + ;; + \?) + echo "Try to enter the h option" 1>&2 + ;; + esac + done +else + echo "No installed getopts-command" 1>&2 + exit 1 +fi + +shift $((OPTIND - 1)) + +if [[ -z $MEDIA || -z $INPUT ]]; then + echo "No specify argument(s) of -m option or -i option" 1>&2 + exit 1 +fi + +## main +if [ ! -z "$FOLDERNAME" ]; then + cd "$FOLDERNAME" || exit +fi + +validate_filetype "$INPUT" "No files of selected extension" + +if [ ! -d "$OUTPUT_FOLDER" ]; then + mkdir "$OUTPUT_FOLDER" +fi + +i=0 +echo -ne 'Progress '"$i"/"$count"' \r' +for FILE in *."$INPUT"; do + case "$MEDIA" in + audio) + output="m4a" + ffmpeg -loglevel panic -i "$FILE" -c:a aac -q:a 2 -vn "${OUTPUT_FOLDER}/${FILE/%"$INPUT"/m4a}"; + ;; + video) + output="mkv" + subtitle=${FILE/%"$INPUT"/srt} + if [ -e "$subtitle" ]; then + ffmpeg -hide_banner -loglevel panic -i "$FILE" -f srt -i "$subtitle" -c:v libx265 -preset medium -x265-params crf=26 -c:a aac -strict experimental -b:a 128k -metadata:s:s:0 language=en "${OUTPUT_FOLDER}/${FILE/%"$INPUT"/mkv}" + else + ffmpeg -hide_banner -loglevel panic -i "$FILE" -c:v libx265 -preset medium -x265-params crf=28 -c:a aac -strict experimental -b:a 128k "${OUTPUT_FOLDER}/${FILE/%"$INPUT"/mkv}" + fi + ;; + pic-lossy) + output="webp" + cwebp -quiet -q 90 "$FILE" -o "${OUTPUT_FOLDER}/${FILE/%"$INPUT"/$output}" + ;; + pic-loss) + output="webp" + cwebp -quiet -lossless "$FILE" -o "${OUTPUT_FOLDER}/${FILE/%"$INPUT"/$output}" + ;; + *) + echo "Invalid Media Mode" + ;; + esac + + ((i++)) + echo -ne 'Progress '"$i"/"$count"' \r' + if [ "$i" = "$count" ]; then + echo -ne '\n' + fi +done + + + + + diff --git a/tools/.local/bin/minimize_pdf b/tools/.local/bin/minimize_pdf new file mode 100644 index 0000000..bf5c026 --- /dev/null +++ b/tools/.local/bin/minimize_pdf @@ -0,0 +1,37 @@ +#!/bin/bash +# @Author: jguer +# @Date: 2016-01-03 00:24:04 +# @Last Modified by: jguer +# @Last Modified time: 2016-01-03 00:28:57 + +buildroot="$(mktemp -d)" +mode="$1" + +if [ -z "$mode" ] +then + mode="ebook" +fi + +shopt -s nullglob + +for f in *.{PDF,pdf}; do + echo "Converting: $f" + gs -q -dNOPAUSE -dBATCH -dSAFER \ + -dNumRenderingThreads=4 \ + -dBandHeight=100 \ + -dBandBufferSpace=500000000 \ + -dBufferSpace=1000000000 \ + -sBandListStorage=memory \ + -sDEVICE=pdfwrite \ + -dCompatibilityLevel=1.4 \ + -dPDFSETTINGS=/$mode \ + -dDetectDuplicateImages=true \ + -dConvertCMYKImagesToRGB=true \ + -r144 \ + -sOutputFile="${buildroot}/${f}" \ + -sPDFPassword=instrmed \ + -c .setpdfwrite \ + -f "${f}" +done + +xdg-open "${buildroot}" diff --git a/tools/.local/bin/o_wallpapers b/tools/.local/bin/o_wallpapers new file mode 100644 index 0000000..e43dc87 --- /dev/null +++ b/tools/.local/bin/o_wallpapers @@ -0,0 +1,188 @@ +#!/bin/bash +# @Author: jguer +# @Date: 2015-12-25 21:48:40 +# @Last Modified by: jguer +# @Last Modified time: 2015-12-26 13:52:52 +# @Description: Wallpaper folder organizer +# @Credits: tuxtweaks for getopts code + +#REQUIRES +# - exiv2 +# - imagemagick + +#TESTED ON +# Archlinux, zsh + +#TODO +# - Add Queue to files who get read before already sorted + +SCRIPT=`basename ${BASH_SOURCE[0]}` + +#Set fonts for Help. +NORM=`tput sgr0` +BOLD=`tput bold` +REV=`tput smso` + +OPT_VER=0 #Verbosity +OPT_REP=0 #Replace Original Folder + +COUNTER=0 #File Counter +DIR_TO_COPY=0 + +#Help function +function HELP { + echo -e \\n"Help documentation for ${BOLD}${SCRIPT}.${NORM}"\\n + echo -e "${REV}Basic usage:${NORM} ${BOLD}$SCRIPT ${NORM}"\\n + echo "Command line switches are optional. The following switches are recognized." + echo "${REV}-v${NORM} --Sets the value for option ${BOLD}verbosity${NORM} to 1. Default is ${BOLD}0${NORM}." + echo "${REV}-r${NORM} --Sets the value for option ${BOLD}replace_folder${NORM} to 1. Default is ${BOLD}0${NORM}." + echo -e "${REV}-h${NORM} --Displays this help message. No further functions are performed."\\n + echo -e "Example: ${BOLD}$SCRIPT -v -r file.ext ${NORM}"\\n + exit 1 +} + +#Wallpaper sorting function +function sort_wallpapers { + Dims=0 + NewName=0 + NewUri=0 + OldUri=0 + PlaceHolder="/tmp/FixedWallpapers/converted.jpg"; + + cd $DIR_TO_COPY + cp -Rf . /tmp/Wallpapers/ + cd /tmp/Wallpapers + + for file in *.{jpg,png}; do + if [ ! -e "${file}" ] && [ ! -s "${file}" ]; then #if file exists and isn't NULL + + continue + fi + + iter_count=1 + + if [ "${file##*.}" = "png" ]; then #if file is png + convert "$file" -quality 95 "$PlaceHolder" &>/dev/null + OldUri=$PlaceHolder + else + OldUri=$file + fi + + #Get jpg dimensions + Dims="$(exiv2 -q "${OldUri}" | grep "Image size")" + Dims="${Dims#*:}" + Dims="$(echo -e "${Dims}" | tr -d '[[:space:]]')" + + if [ -z "${Dims// }" ]; then #if Dimensions can't be read + continue + fi + + if [[ ${file} == ${Dims}-*.jpg ]]; then + NewUri="/tmp/FixedWallpapers/${file}" + mv "$OldUri" "$NewUri" + else + #Count Wallpapers in fixed with same dimensions to ensure good labeling + for iter in /tmp/FixedWallpapers/${Dims}*; do + if [ -e ${iter} ] && [ -s ${iter} ]; then + iter_count=$((iter_count+1)); + fi + done + + NewName="$Dims-$iter_count" + NewUri="/tmp/FixedWallpapers/${NewName}.jpg" + + if [ $OPT_VER = 1 ]; then + echo "Old Name: $file" + echo "New Name: ${NewName}.jpg" + fi + + jpegtran -copy none -progressive "$OldUri" > "$NewUri" &> /dev/null + + if [ "${file##*.}" = "png" ]; then + rm "$PlaceHolder" + fi + fi + + COUNTER=$((COUNTER+1)); + done + + rm -rf /tmp/Wallpapers + + if [ $OPT_REP = 1 ]; then + rm -rf $DIR_TO_COPY + mv /tmp/FixedWallpapers $DIR_TO_COPY + + if [ $OPT_VER = 1 ]; then + echo "Replaced original folder" + fi + else + if [ $OPT_VER = 1 ]; then + echo "Fixed Wallpapers in /tmp/FixedWallpapers" + fi + xdg-open /tmp/FixedWallpapers + fi +} + + +#Check the number of arguments. If none are passed, print help and exit. +NUMARGS=$# +if [ $NUMARGS -eq 0 ]; then + HELP +fi + +### Start getopts code ### + +#Parse command line flags +while getopts vrh OPT; do + case $OPT in + v) #set option "a" + OPT_VER=1 + ;; + r) #set option "b" + OPT_REP=1 + ;; + h) #show help + HELP + ;; + help) #show help + HELP + ;; + \?) #unrecognized option - show help + echo -e \\n"Option -${BOLD}$OPTARG${NORM} not allowed." + echo -e "Use ${BOLD}$SCRIPT -h${NORM} to see the help documentation."\\n + exit 2 + ;; + esac +done +# get rid of the just-finished flag arguments +shift $(($OPTIND-1)) + +if [ $OPT_VER = 1 ]; then + echo "Verbose Mode" + + echo "Replace original folder is $OPT_REP" + echo "Removing folders from /tmp for fresh start." +fi + +### Main loop ### + +rm -rf /tmp/Wallpapers +rm -rf /tmp/FixedWallpapers +mkdir /tmp/Wallpapers +mkdir /tmp/FixedWallpapers + +while (( "$#" )); do + + if [ -d $1 ]; then + DIR_TO_COPY=$1 + sort_wallpapers + fi + shift #Move on to next input directory. +done + +if [ $OPT_VER = 1 ]; then + echo "Read $COUNTER files" +fi + +### End main loop ### + diff --git a/tools/.local/bin/rofi-power b/tools/.local/bin/rofi-power new file mode 100644 index 0000000..084d2a7 --- /dev/null +++ b/tools/.local/bin/rofi-power @@ -0,0 +1,43 @@ +#!/usr/bin/env bash + +# rofi-power +# Use rofi to call systemctl for shutdown, reboot, etc + +# 2016 Oliver Kraitschy - http://okraits.de +# Modified by jguer + +OPTIONS="Reboot system\nPower-off system\nSuspend system\nHibernate system" + +LAUNCHER="rofi -theme $1 -dmenu -i -p rofi-power:" +USE_LOCKER="false" +LOCKER="lockscreen" + +# Show exit wm option if exit command is provided as an argument +if [ ${#1} -gt 0 ]; then + OPTIONS="Exit window manager\n$OPTIONS" +fi + +option=$(echo -e $OPTIONS | $LAUNCHER | awk '{print $1}' | tr -d '\r\n') +if [ ${#option} -gt 0 ]; then + case $option in + Exit) + echo 'awesome.quit()' | awesome-client + ;; + Reboot) + systemctl reboot + ;; + Power-off) + systemctl poweroff + ;; + Suspend) + $($USE_LOCKER) && "$LOCKER" + systemctl suspend + ;; + Hibernate) + $($USE_LOCKER) && "$LOCKER" + systemctl hibernate + ;; + *) ;; + + esac +fi diff --git a/tools/.local/bin/termpdf.py b/tools/.local/bin/termpdf.py new file mode 100644 index 0000000..6b52023 --- /dev/null +++ b/tools/.local/bin/termpdf.py @@ -0,0 +1,1778 @@ +#!/usr/bin/python3 +# vim:fileencoding=utf-8 +"""\ +Usage: + termpdf.py [options] example.pdf + +Options: + -p n, --page-number n : open to page n + -f n, --first-page n : set logical page number for page 1 to n + --citekey key : bibtex citekey + --nvim-listen-address path : path to nvim msgpack server + -v, --version + -h, --help +""" + +__version__ = "0.1.1" +__license__ = "MIT" +__copyright__ = "Copyright (c) 2019" +__author__ = "David Sanson" +__url__ = "https://github.com/dsanson/termpdf.py" + +__viewer_shortcuts__ = """\ +Keys: + j, down, space: forward [count] pages + k, up: back [count] pages + l, right: forward [count] sections + h, left: back [count] sections + gg: go to beginning of document + G: go to end of document + [count]G: go to page [count] + b: cycle through open documents + s: visual mode + t: table of contents + M: show metadata + f: show links on page + r: rotate [count] quarter turns clockwise + R: rotate [count] quarter turns counterclockwise + c: toggle autocropping of margins + a: toggle alpha transparency + i: invert colors + d: darken using TINT_COLOR + [count]P: Set logical page number of current page to count + -: zoom out (reflowable only) + +: zoom in (reflowable only) + ctrl-r: refresh + q: quit +""" + + +import re +import array +import curses +import fcntl +import fitz +import os +import sys +import termios +import subprocess +import zlib +import shutil +import select +import hashlib +import string +import json +import roman +import pyperclip +from time import sleep, monotonic +from base64 import standard_b64encode +from operator import attrgetter +from collections import namedtuple +from math import ceil +from tempfile import NamedTemporaryFile + +# Class Definitions + +class Config: + def __init__(self): + self.BIBTEX = '' + self.KITTYCMD = 'kitty --single-instance --instance-group=1' # open notes in a new OS window + # self.KITTYCMD = 'kitty @ new-window' # open notes in split kitty window + self.TINT_COLOR = 'antiquewhite2' + self.URL_BROWSER_LIST = [ + 'gnome-open', + 'gvfs-open', + 'xdg-open', + 'kde-open', + 'firefox', + 'w3m', + 'elinks', + 'lynx' + ] + self.URL_BROWSER = None + self.GUI_VIEWER = 'preview' + self.NOTE_PATH = os.path.join(os.getenv("HOME"), 'inbox.org') + + def browser_detect(self): + if sys.platform == 'darwin': + self.URL_BROWSER = 'open' + else: + for i in self.URL_BROWSER_LIST: + if shutil.which(i) is not None: + self.URL_BROWSER = i + break + + def load_config_file(self): + config_file = os.path.join(os.getenv('HOME'), '.config', 'termpdf.py', 'config') + if os.path.exists(config_file): + with open(config_file, 'r') as f: + prefs = json.load(f) + for key in prefs: + setattr(self, key, prefs[key]) + +class Buffers: + def __init__(self): + self.docs = [] + self.current = 0 + + def goto_buffer(self,n): + l = len(self.docs) - 1 + if n > l: + n = l + elif n < 0: + n = 0 + self.current = n + + def cycle(self, count): + l = len(self.docs) - 1 + c = self.current + count + if c > l: + c = 0 + self.current = c + + def close_buffer(self,n): + del self.docs[n] + if self.current == n: + self.current = max(0,n-1) + if len(self.docs) == 0: + clean_exit() + +class Screen: + + def __init__(self): + self.rows = 0 + self.cols = 0 + self.width = 0 + self.height = 0 + self.cell_width = 0 + self.cell_height = 0 + self.stdscr = None + + def get_size(self): + fd = sys.stdout + buf = array.array('H', [0, 0, 0, 0]) + fcntl.ioctl(fd, termios.TIOCGWINSZ, buf) + r,c,w,h = tuple(buf) + cw = w // (c or 1) + ch = h // (r or 1) + self.rows = r + self.cols = c + self.width = w + self.height = h + self.cell_width = cw + self.cell_height = ch + + def init_curses(self): + os.environ.setdefault('ESCDELAY', '25') + self.stdscr = curses.initscr() + self.stdscr.clear() + curses.noecho() + curses.curs_set(0) + curses.mousemask(curses.REPORT_MOUSE_POSITION + | curses.BUTTON1_PRESSED | curses.BUTTON1_RELEASED + | curses.BUTTON2_PRESSED | curses.BUTTON2_RELEASED + | curses.BUTTON3_PRESSED | curses.BUTTON3_RELEASED + | curses.BUTTON4_PRESSED | curses.BUTTON4_RELEASED + | curses.BUTTON1_CLICKED | curses.BUTTON3_CLICKED + | curses.BUTTON1_DOUBLE_CLICKED + | curses.BUTTON1_TRIPLE_CLICKED + | curses.BUTTON2_DOUBLE_CLICKED + | curses.BUTTON2_TRIPLE_CLICKED + | curses.BUTTON3_DOUBLE_CLICKED + | curses.BUTTON3_TRIPLE_CLICKED + | curses.BUTTON4_DOUBLE_CLICKED + | curses.BUTTON4_TRIPLE_CLICKED + | curses.BUTTON_SHIFT | curses.BUTTON_ALT + | curses.BUTTON_CTRL) + self.stdscr.keypad(True) # Handle our own escape codes for now + + # The first call to getch seems to clobber the statusbar. + # So we make a dummy first call. + self.stdscr.nodelay(True) + self.stdscr.getch() + self.stdscr.nodelay(False) + + def create_text_win(self, length, header): + # calculate dimensions + w = max(self.cols - 4, 60) + h = self.rows - 2 + x = int(self.cols / 2 - w / 2) + y = 1 + + win = curses.newwin(h,w,y,x) + win.box() + win.addstr(1,2, '{:^{l}}'.format(header, l=(w-3))) + + self.stdscr.clear() + self.stdscr.refresh() + win.refresh() + pad = curses.newpad(length,1000) + pad.keypad(True) + + return win, pad + + def swallow_keys(self): + self.stdscr.nodelay(True) + k = self.stdscr.getch() + end = monotonic() + 0.1 + while monotonic() < end: + self.stdscr.getch() + self.stdscr.nodelay(False) + + def clear(self): + sys.stdout.buffer.write('\033[2J'.encode('ascii')) + + def set_cursor(self,c,r): + if c > self.cols: + c = self.cols + elif c < 0: + c = 0 + if r > self.rows: + r = self.rows + elif r < 0: + r = 0 + sys.stdout.buffer.write('\033[{};{}f'.format(r, c).encode('ascii')) + + def place_string(self,c,r,string): + self.set_cursor(c,r) + sys.stdout.write(string) + sys.stdout.flush() + + +def get_filehash(path): + blocksize = 65536 + hasher = hashlib.md5() + with open(path, 'rb') as afile: + buf = afile.read(blocksize) + while len(buf) > 0: + hasher.update(buf) + buf = afile.read(blocksize) + return hasher.hexdigest() + +def get_cachefile(path): + filehash = get_filehash(path) + cachedir = os.path.join(os.getenv("HOME"), '.config', 'termpdf.py', 'cache') + os.makedirs(cachedir, exist_ok=True) + cachefile = os.path.join(cachedir, filehash) + return cachefile + +class Document(fitz.Document): + """ + An extension of the fitz.Document class, with extra attributes + """ + def __init__(self, filename=None, filetype=None, rect=None, width=0, height=0, fontsize=12): + fitz.Document.__init__(self, filename, None, filetype, rect, width, height, fontsize) + self.filename = filename + self.citekey = None + self.papersize = 3 + self.layout(rect=fitz.PaperRect('A6'),fontsize=fontsize) + self.page = 0 + self.logicalpage = 1 + self.prevpage = 0 + self.pages = self.pageCount - 1 + self.first_page_offset = 1 + self.logical_pages = list(range(0 + self.first_page_offset, self.pages + self.first_page_offset)) + self.chapter = 0 + self.rotation = 0 + self.fontsize = fontsize + self.width = width + self.height = height + self.autocrop = False + self.alpha = False + self.invert = False + self.tint = False + self.tint_color = config.TINT_COLOR + self.nvim = None + self.nvim_listen_address = '/tmp/termpdf_nvim_bridge' + self.page_states = [ Page_State(i) for i in range(0,self.pages + 1) ] + + def write_state(self): + cachefile = get_cachefile(self.filename) + state = {'citekey': self.citekey, + 'papersize': self.papersize, + 'page': self.page, + 'logicalpage': self.logicalpage, + 'first_page_offset': self.first_page_offset, + 'chapter': self.chapter, + 'rotation': self.rotation, + 'autocrop': self.autocrop, + 'alpha': self.alpha, + 'invert': self.invert, + 'tint': self.tint} + with open(cachefile, 'w') as f: + json.dump(state, f) + + def goto_page(self, p): + # store prevpage + self.prevpage = self.page + # delete prevpage + # self.clear_page(self.prevpage) + # set new page + if p > self.pages: + self.page = self.pages + elif p < 0: + self.page = 0 + else: + self.page = p + self.logicalpage = self.page_to_logical(self.page) + + def goto_logical_page(self, p): + p = self.logical_to_page(p) + self.goto_page(p) + + def next_page(self, count=1): + self.goto_page(self.page + count) + + def prev_page(self, count=1): + self.goto_page(self.page - count) + + def goto_chap(self, n): + toc = self.getToC() + if n > len(toc): + n = len(toc) + elif n < 0: + n = 0 + self.chapter = n + try: + self.goto_page(toc[n][2] - 1) + except: + self.goto_page(0) + + def current_chap(self): + toc = self.getToC() + p = self.page + for i,ch in enumerate(toc): + cp = ch[2] - 1 + if cp > p: + return i - 1 + return len(toc) + + def next_chap(self, count=1): + self.goto_chap(self.chapter + count) + + def prev_chap(self, count=1): + self.goto_chap(self.chapter - count) + + def parse_pagelabels(self): + if self.isPDF: + from pdfrw import PdfReader + from pagelabels import PageLabels, PageLabelScheme + try: + reader = PdfReader(self.filename) + labels = PageLabels.from_pdf(reader) + labels = sorted(labels, key=attrgetter('startpage')) + except: + labels = [] + else: + labels = [] + return labels + + def set_pagelabel(self,count,style="arabic"): + if self.isPDF: + from pdfrw import PdfReader, PdfWriter + from pagelabels import PageLabels, PageLabelScheme + reader = PdfReader(self.filename) + labels = PageLabels.from_pdf(reader) + newlabels = PageLabels() + for label in labels: + if label.startpage != self.page: + newlabels.append(label) + + newlabel = PageLabelScheme(startpage=self.page, + style=style, + prefix="", + firstpagenum=count) + newlabels.append(newlabel) + newlabels.write(reader) + + writer = PdfWriter() + writer.trailer = reader + #print("writing new pagelabels...") + writer.write(self.filename) + + # unused; using pdfrw instead + def parse_pagelabels_pure(self): + cat = self._getPDFroot() + + cat_str = self._getXrefString(cat) + lines = cat_str.split('\n') + labels = [] + for line in lines: + match = re.search('/PageLabels',line) + if re.match(r'.*/PageLabels.*', line): + labels += [line] + print(labels) + raise SystemExit + + def pages_to_logical_pages(self): + labels = self.parse_pagelabels() + self.logical_pages = list(range(0,self.pages + 1)) + + def divmod_alphabetic(n): + a, b = divmod(n, 26) + if b == 0: + return a - 1, b + 26 + return a, b + + def to_alphabetic(n): + chars = [] + while n > 0: + n, d = divmod_alphabetic(n) + chars.append(string.ascii_uppercase[d - 1]) + return ''.join(reversed(chars)) + + if labels == []: + for p in range(0,self.pages + 1): + self.logical_pages[p] = str(p + self.first_page_offset) + else: + for p in range(0,self.pages + 1): + for label in labels: + if p >= label.startpage: + lp = (p - label.startpage) + label.firstpagenum + style = label.style + prefix = label.prefix + if style == 'roman uppercase': + lp = prefix + roman.toRoman(lp) + lp = lp.upper() + elif style == 'roman lowercase': + lp = prefix + roman.toRoman(lp) + lp = lp.lower() + elif style == 'alphabetic uppercase': + lp = prefix + to_alphabetic(lp) + elif style == 'alphabetic lowercase': + lp = prefix + to_alphabetic(lp) + lp = lp.lower() + else: + lp = prefix + str(lp) + self.logical_pages[p] = lp + + def page_to_logical(self, p=None): + if not p: + p = self.page + return self.logical_pages[p] + + def logical_to_page(self, lp=None): + if not lp: + lp = self.logicalpage + try: + p = self.logical_pages.index(str(lp)) + except: + # no such logical page in document + p = 0 + return p + + def make_link(self): + p = self.page_to_logical(self.page) + if self.citekey: + return '[@{}, {}]'.format(self.citekey, p) + else: + return '({}, {}, {})'.format(self.metadata['author'],self.metadata['title'], p) + + def find_target(self, target, target_text): + # since our pct calculation is at best an estimate + # of the correct target page, we search for the first + # few words of the original page on the surrounding pages + # until we find a match + for i in [0,1,-1,2,-2,3,-3,4,-4,5,-5,6,-6]: + f = target + i + match_text = self[f].getText().split() + match_text = ' '.join(match_text) + if target_text in match_text: + return f + return target + + + def set_layout(self,papersize, adjustpage=True): + # save a snippet of text from current page + target_text = self[self.page].getText().split() + if len(target_text) > 6: + target_text = ' '.join(target_text[:6]) + elif len(target_text) > 0: + target_text = ' '.join(target_text) + else: + target_text = '' + + pct = (self.page + 1) / (self.pages + 1) + sizes = ['a7','c7','b7','a6','c6','b6','a5','c5','b5','a4'] + if papersize > len(sizes) - 1: + papersize = len(sizes) - 1 + elif papersize < 0: + papersize = 0 + p = sizes[papersize] + self.layout(fitz.PaperRect(p)) + self.pages = self.pageCount - 1 + if adjustpage: + target = int((self.pages + 1) * pct) - 1 + target = self.find_target(target, target_text) + self.goto_page(target) + self.papersize = papersize + self.pages_to_logical_pages() + + def mark_all_pages_stale(self): + self.page_states = [ Page_State(i) for i in range(0,self.pages + 1) ] + + def clear_page(self, p): + cmd = {'a': 'd', 'd': 'a', 'i': p + 1} + write_gr_cmd(cmd) + + def cells_to_pixels(self, *coords): + factor = self.page_states[self.page].factor + l,t,_,_ = self.page_states[self.page].place + pix_coords = [] + for coord in coords: + col = coord[0] + row = coord[1] + x = (col - l) * scr.cell_width / factor + y = (row - t) * scr.cell_height / factor + pix_coords.append((x,y)) + return pix_coords + + def pixels_to_cells(self, *coords): + factor = self.page_states[self.page].factor + l,t,_,_ = self.page_states[self.page].place + cell_coords = [] + for coord in coords: + x = coord[0] + y = coord[1] + col = (x * factor + l * scr.cell_width) / scr.cell_width + row = (y * factor + t * scr.cell_height) / scr.cell_height + col = int(col) + row = int(row) + cell_coords.append((col,row)) + return cell_coords + + # get text that is inside a Rect + def get_text_in_Rect(self, rect): + from operator import itemgetter + from itertools import groupby + page = self.loadPage(self.page) + words = page.getTextWords() + mywords = [w for w in words if fitz.Rect(w[:4]) in rect] + mywords.sort(key=itemgetter(3, 0)) # sort by y1, x0 of the word rect + group = groupby(mywords, key=itemgetter(3)) + text = [] + for y1, gwords in group: + text = text + [" ".join(w[4] for w in gwords)] + return text + + # get text that intersects a Rect + def get_text_intersecting_Rect(self, rect): + from operator import itemgetter + from itertools import groupby + page = self.loadPage(self.page) + words = page.getTextWords() + mywords = [w for w in words if fitz.Rect(w[:4]).intersects(rect)] + mywords.sort(key=itemgetter(3, 0)) # sort by y1, x0 of the word rect + group = groupby(mywords, key=itemgetter(3)) + text = [] + for y1, gwords in group: + text = text + [" ".join(w[4] for w in gwords)] + return text + + def search_text(self,string): + for p in range(self.page,self.pages): + page_text = self.getPageText(p, 'text') + if re.search(string,page_text): + self.goto_page(p) + return "match on page" + return "no matches" + + def auto_crop(self,page): + blocks = page.getTextBlocks() + + if len(blocks) > 0: + crop = fitz.Rect(blocks[0][:4]) + else: + # don't try to crop empty pages + crop = fitz.Rect(0,0,0,0) + for block in blocks: + b = fitz.Rect(block[:4]) + crop = crop | b + + return crop + + def display_page(self, bar, p, display=True): + + page = self.loadPage(p) + page_state = self.page_states[p] + + if self.autocrop and self.isPDF: + page.setCropBox(page.MediaBox) + crop = self.auto_crop(page) + page.setCropBox(crop) + + elif self.isPDF: + page.setCropBox(page.MediaBox) + + dw = scr.width + dh = scr.height - scr.cell_height + + if self.rotation in [0,180]: + pw = page.bound().width + ph = page.bound().height + else: + pw = page.bound().height + ph = page.bound().width + + # calculate zoom factor + fx = dw / pw + fy = dh / ph + factor = min(fx,fy) + self.page_states[p].factor = factor + + # calculate zoomed dimensions + zw = factor * pw + zh = factor * ph + + # calculate place in pixels, convert to cells + pix_x = (dw / 2) - (zw / 2) + pix_y = (dh / 2) - (zh / 2) + l_col = int(pix_x / scr.cell_width) + 1 + t_row = int(pix_y / scr.cell_height) + r_col = l_col + int(zw / scr.cell_width) + b_row = t_row + int(zh / scr.cell_height) + place = (l_col, t_row, r_col, b_row) + self.page_states[p].place = place + + # move cursor to place + scr.set_cursor(l_col,t_row) + + # clear previous page + # display image + cmd = {'a': 'p', 'i': p + 1, 'z': -1} + if page_state.stale: #or (display and not write_gr_cmd_with_response(cmd)): + # get zoomed and rotated pixmap + mat = fitz.Matrix(factor, factor) + mat = mat.preRotate(self.rotation) + pix = page.getPixmap(matrix = mat, alpha=self.alpha) + + if self.invert: + pix.invertIRect() + + if self.tint: + tint = fitz.utils.getColor(self.tint_color) + red = int(tint[0] * 256) + blue = int(tint[1] * 256) + green = int(tint[2] * 256) + pix.tintWith(red,blue,green) + + # build cmd to send to kitty + cmd = {'i': p + 1, 't': 'd', 's': pix.width, 'v': pix.height} + + if self.alpha: + cmd['f'] = 32 + else: + cmd['f'] = 24 + + # transfer the image + write_chunked(cmd, pix.samples) + + if display: + # clear prevpage + self.clear_page(self.prevpage) + # display the image + cmd = {'a': 'p', 'i': p + 1, 'z': -1} + success = write_gr_cmd_with_response(cmd) + if not success: + self.page_states[p].stale = True + bar.message = 'failed to load page ' + str(p+1) + bar.update(self) + + self.page_states[p].stale = False + + scr.swallow_keys() + + def show_toc(self, bar): + + toc = self.getToC() + + if not toc: + bar.message = "No ToC available" + return + + self.page_states[self.page ].stale = True + self.clear_page(self.page) + scr.clear() + + def init_pad(toc): + win, pad = scr.create_text_win(len(toc), 'Table of Contents') + y,x = win.getbegyx() + h,w = win.getmaxyx() + span = [] + for i, ch in enumerate(toc): + text = '{}{}'.format(' ' * (ch[0] - 1), ch[1]) + pad.addstr(i,0,text) + span.append(len(text)) + return win,pad,y,x,h,w,span + + win,pad,y,x,h,w,span = init_pad(toc) + + keys = shortcuts() + index = self.current_chap() + j = 0 + + while True: + for i, ch in enumerate(toc): + attr = curses.A_REVERSE if index == i else curses.A_NORMAL + pad.chgat(i, 0, span[i], attr) + pad.refresh(j, 0, y + 3, x + 2, y + h - 2, x + w - 3) + key = scr.stdscr.getch() + + if key in keys.REFRESH: + scr.clear() + scr.get_size() + scr.init_curses() + self.set_layout(self.papersize) + self.mark_all_pages_stale() + init_pad(toc) + elif key in keys.QUIT: + clean_exit() + elif key == 27 or key in keys.SHOW_TOC: + scr.clear() + return + elif key in keys.NEXT_PAGE: + index = min(len(toc) - 1, index + 1) + elif key in keys.PREV_PAGE: + index = max(0, index - 1) + elif key in keys.OPEN: + scr.clear() + self.goto_page(toc[index][2] - 1) + return + + if index > j + (h - 5): + j += 1 + if index < j: + j -= 1 + + def update_metadata_from_bibtex(self): + if not self.citekey: + return + + bib = bib_from_key([self.citekey]) + bib_entry = bib.entries[self.citekey] + + metadata = self.metadata + title = bib_entry.fields['title'] + title = title.replace('{','') + title = title.replace('}','') + metadata['title'] = title + + authors = [author for author in bib_entry.persons['author']] + if len(authors) == 0: + authors = [author for author in bib_entry.persons['editor']] + authorNames = '' + for author in authors: + if authorNames != '': + authorNames += ' & ' + if author.first_names: + authorNames += ' '.join(author.first_names) + ' ' + if author.last_names: + authorNames += ' '.join(author.last_names) + + metadata['author'] = authorNames + + if 'Keywords' in bib_entry.fields: + metadata['keywords'] = bib_entry.fields['Keywords'] + + self.setMetadata(metadata) + try: + self.saveIncr() + except: + pass + + def show_meta(self, bar): + + meta = self.metadata + + if not meta: + bar.message = "No metadata available" + return + + self.page_states[self.page].stale = True + self.clear_page(self.page) + scr.clear() + + def init_pad(metadata): + win, pad = scr.create_text_win(len(meta), 'Metadata') + y,x = win.getbegyx() + h,w = win.getmaxyx() + span = [] + for i, mkey in enumerate(meta): + text = '{}: {}'.format(mkey,meta[mkey]) + pad.addstr(i,0,text) + span.append(len(text)) + return win,pad,y,x,h,w,span + + win,pad,y,x,h,w,span = init_pad(meta) + + keys = shortcuts() + index = 0 + j = 0 + + while True: + for i, mkey in enumerate(meta): + attr = curses.A_REVERSE if index == i else curses.A_NORMAL + pad.chgat(i, 0, span[i], attr) + pad.refresh(j, 0, y + 3, x + 2, y + h - 2, x + w - 3) + key = scr.stdscr.getch() + + if key in keys.REFRESH: + scr.clear() + scr.get_size() + scr.init_curses() + self.set_layout(self.papersize) + self.mark_all_pages_stale() + init_pad(meta) + elif key in keys.QUIT: + clean_exit() + elif key == 27 or key in keys.SHOW_META: + scr.clear() + return + elif key in keys.NEXT_PAGE: + index = min(len(meta) - 1, index + 1) + elif key in keys.PREV_PAGE: + index = max(0, index - 1) + elif key in keys.UPDATE_FROM_BIB: + self.update_metadata_from_bibtex() + meta = self.metadata + win,pad,y,x,h,w,span = init_pad(meta) + elif key in keys.OPEN: + # TODO edit metadata + pass + + if index > j + (h - 5): + j += 1 + if index < j: + j -= 1 + + def goto_link(self,link): + kind = link['kind'] + # 0 == no destination + # 1 == internal link + # 2 == uri + # 3 == launch link + # 5 == external pdf link + if kind == 0: + pass + elif kind == 1: + self.goto_page(link['page']) + elif kind == 2: + subprocess.run([config.URL_BROWSER, link['uri']], check=True) + elif kind == 3: + # not sure what these are + pass + elif kind == 5: + path = link['fileSpec'] + opts = {'page': link['page']} + #load_doc(path,opts) + pass + + def show_links(self, bar): + + links = self[self.page].getLinks() + + urls = [link for link in links if 0 < link['kind'] < 3] + + if not urls: + bar.message = "No links on page" + return + + self.page_states[self.page].stale = True + self.clear_page(self.page) + scr.clear() + + def init_pad(urls): + win, pad = scr.create_text_win(len(urls), 'URLs') + y,x = win.getbegyx() + h,w = win.getmaxyx() + span = [] + for i, url in enumerate(urls): + anchor_text = self.get_text_intersecting_Rect(url['from']) + if len(anchor_text) > 0: + anchor_text = anchor_text[0] + else: + anchor_text = '' + if url['kind'] == 2: + link_text = url['uri'] + else: + link_text = url['page'] + + text = '{}: {}'.format(anchor_text, link_text) + pad.addstr(i,0,text) + span.append(len(text)) + return win,pad,y,x,h,w,span + + win,pad,y,x,h,w,span = init_pad(urls) + + keys = shortcuts() + index = 0 + j = 0 + + while True: + for i, url in enumerate(urls): + attr = curses.A_REVERSE if index == i else curses.A_NORMAL + pad.chgat(i, 0, span[i], attr) + pad.refresh(j, 0, y + 3, x + 2, y + h - 2, x + w - 3) + key = scr.stdscr.getch() + + if key in keys.REFRESH: + scr.clear() + scr.get_size() + scr.init_curses() + self.set_layout(self.papersize) + self.mark_all_pages_stale() + init_pad(urls) + elif key in keys.QUIT: + clean_exit() + elif key == 27 or key in keys.SHOW_LINKS: + scr.clear() + return + elif key in keys.NEXT_PAGE: + index = min(len(urls) - 1, index + 1) + elif key in keys.PREV_PAGE: + index = max(0, index - 1) + elif key in keys.OPEN: + self.goto_link(urls[index]) + scr.clear() + return + + if index > j + (h - 5): + j += 1 + if index < j: + j -= 1 + + def view_text(self): + pass + + def init_neovim_bridge(self): + try: + from pynvim import attach + except: + raise SystemExit('pynvim unavailable') + try: + self.nvim = attach('socket', path=self.nvim_listen_address) + except: + ncmd = 'env NVIM_LISTEN_ADDRESS={} nvim {}'.format(self.nvim_listen_address, config.NOTE_PATH) + try: + os.system('{} {}'.format(config.KITTYCMD,ncmd)) + except: + raise SystemExit('unable to open new kitty window') + + end = monotonic() + 5 # 5 second time out + while monotonic() < end: + try: + self.nvim = attach('socket', path=self.nvim_listen_address) + break + except: + # keep trying every tenth of a second + sleep(0.1) + + def send_to_neovim(self,text,append=False): + try: + self.nvim.api.strwidth('testing') + except: + self.init_neovim_bridge() + if not self.nvim: + return + if append: + line = self.nvim.funcs.line('$') + self.nvim.funcs.append(line, text) + self.nvim.funcs.cursor(self.nvim.funcs.line('$'),0) + else: + line = self.nvim.funcs.line('.') + self.nvim.funcs.append(line, text) + self.nvim.funcs.cursor(line + len(text), 0) + + +class Page_State: + def __init__(self, p): + self.number = p + self.stale = True + self.factor = (1,1) + self.place = (0,0,40,40) + self.crop = None + +class status_bar: + + def __init__(self): + self.cols = 40 + self.rows = 1 + self.cmd = ' ' + self.message = ' ' + self.counter = ' ' + self.format = '{} {:^{me_w}} {}' + self.bar = '' + + def update(self, doc): + p = doc.page_to_logical() + pc = doc.page_to_logical(doc.pages) + self.counter = '[{}/{}]'.format(p, pc) + w = self.cols = scr.cols + cm_w = len(self.cmd) + co_w = len(self.counter) + me_w = w - cm_w - co_w - 2 + if len(self.message) > me_w: + self.message = self.message[:me_w - 1] + '…' + self.bar = self.format.format(self.cmd, self.message, self.counter, me_w=me_w) + scr.place_string(1,scr.rows,self.bar) + +class shortcuts: + + def __init__(self): + self.GOTO_PAGE = {ord('G')} + self.GOTO = {ord('g')} + self.NEXT_PAGE = {ord('j'), curses.KEY_DOWN, ord(' ')} + self.PREV_PAGE = {ord('k'), curses.KEY_UP} + self.GO_BACK = {ord('p')} + self.NEXT_CHAP = {ord('l'), curses.KEY_RIGHT} + self.PREV_CHAP = {ord('h'), curses.KEY_LEFT} + self.BUFFER_CYCLE = {ord('b')} + self.BUFFER_CYCLE_REV = {ord('B')} + self.HINTS = {ord('f')} + self.OPEN = {curses.KEY_ENTER, curses.KEY_RIGHT, 10} + self.SHOW_TOC = {ord('t')} + self.SHOW_META = {ord('M')} + self.UPDATE_FROM_BIB = {ord('b')} + self.SHOW_LINKS = {ord('f')} + self.TOGGLE_TEXT_MODE = {ord('T')} + self.ROTATE_CW = {ord('r')} + self.ROTATE_CCW = {ord('R')} + self.VISUAL_MODE = {ord('s')} + self.SELECT = {ord('v')} + self.YANK = {ord('y')} + self.INSERT_NOTE = {ord('n')} + self.APPEND_NOTE = {ord('a')} + self.TOGGLE_AUTOCROP = {ord('c')} + self.TOGGLE_ALPHA = {ord('A')} + self.TOGGLE_INVERT = {ord('i')} + self.TOGGLE_TINT = {ord('d')} + self.SET_PAGE_LABEL = {ord('P')} + self.SET_PAGE_ALT = {ord('I')} + self.INC_FONT = {ord('=')} + self.DEC_FONT = {ord('-')} + self.OPEN_GUI = {ord('X')} + self.REFRESH = {18, curses.KEY_RESIZE} # CTRL-R + self.QUIT = {3, ord('q')} + self.DEBUG = {ord('D')} + +# Kitty graphics functions + +def detect_support(): + return write_gr_cmd_with_response(dict(a='q', s=1, v=1, i=1), standard_b64encode(b'abcd')) + +def serialize_gr_command(cmd, payload=None): + cmd = ','.join('{}={}'.format(k, v) for k, v in cmd.items()) + ans = [] + w = ans.append + w(b'\033_G'), w(cmd.encode('ascii')) + if payload: + w(b';') + w(payload) + w(b'\033\\') + return b''.join(ans) + +def write_gr_cmd(cmd, payload=None): + sys.stdout.buffer.write(serialize_gr_command(cmd, payload)) + sys.stdout.flush() + +def write_gr_cmd_with_response(cmd, payload=None): + # rewrite using swallow keys to be nonblocking + write_gr_cmd(cmd, payload) + resp = b'' + while resp[-2:] != b'\033\\': + resp += sys.stdin.buffer.read(1) + if b'OK' in resp: + return True + else: + return False + + +def write_chunked(cmd, data): + if cmd['f'] != 100: + data = zlib.compress(data) + cmd['o'] = 'z' + data = standard_b64encode(data) + while data: + chunk, data = data[:4096], data[4096:] + m = 1 if data else 0 + cmd['m'] = m + write_gr_cmd(cmd, chunk) + cmd.clear() + +# bibtex functions + +def bib_from_field(field,regex): + + if shutil.which('bibtool') is not None: + from pybtex.database import parse_string + select = "select {" + field + " " + select = select + '\"{}\"'.format(regex) + select = select + "}" + text = subprocess.run(["bibtool", "-r", "biblatex", "--", select, config.BIBTEX], stdout=subprocess.PIPE, universal_newlines = True) + if text.returncode != 0: + return None + bib = parse_string(text.stdout,'bibtex') + if len(bib.entries) == 0: + return None + else: + from pybtex.database import parse_file + bib = parse_file(config.BIBTEX,'bibtex') + + return bib + +def bib_from_key(citekeys): + + field = '$key' + regex = '\|'.join(citekeys) + regex = '^' + regex + '$' + return bib_from_field(field,regex) + +def citekey_from_path(path): + + path = os.path.basename(path) + bib = bib_from_field('File',path) + + if bib and len(bib.entries) == 1: + citekey = list(bib.entries)[0] + return citekey + +def path_from_citekey(citekey): + bib = bib_from_key([citekey]) + if bib == None: + raise SystemExit('Cannot find file associated with ' + citekey) + if len(bib.entries) == 1: + try: + paths = bib.entries[citekey].fields["File"] + except: + raise SystemExit('No file for ' + citekey) + paths = paths.split(';') + exts = ['.pdf', '.xps', '.cbz', '.fb2' ] + extsf = ['.epub', '.oxps'] + extsl = ['.html'] + best = [path for path in paths if path[-4:] in exts] + okay = [path for path in paths if path[-5:] in extsf] + worst = [path for path in paths if path[-5:] in extsl] + if len(best) != 0: + return best[0] + elif len(okay) != 0: + return okay[0] + elif len(worst) != 0: + return worst[0] + return None + +# Command line helper functions + +def print_version(): + print(__version__) + print(__license__, 'License') + print(__copyright__, __author__) + print(__url__) + raise SystemExit + + +def print_help(): + print(__doc__.rstrip()) + print() + print(__viewer_shortcuts__) + raise SystemExit() + +def parse_args(args): + files = [] + opts = {} + if len(args) == 1: + args = args + ['-h'] + + args = args[1:] + + if len({'-h', '--help'} & set(args)) != 0: + print_help() + elif len({'-v', '--version'} & set(args)) != 0: + print_version() + + skip = False + for i,arg in enumerate(args): + if skip: + skip = not skip + elif arg in {'-p', '--page-number'}: + try: + opts['logicalpage'] = int(args[i + 1]) + skip = True + except: + raise SystemExit('No valid page number specified') + elif arg in {'-f', '--first-page'}: + try: + opts['first_page_offset'] = int(args[i + 1]) + skip = True + except: + raise SystemExit('No valid first page specified') + elif arg in {'--nvim-listen-address'}: + try: + opts['nvim_listen_address'] = args[i + 1] + skip = True + except: + raise SystemExit('No address specified') + elif arg in {'--citekey'}: + try: + opts['citekey'] = args[i + 1] + skip = True + except: + raise SystemExit('No citekey specified') + elif arg in {'-o', '--open'}: + try: + citekey = args[i+1] + except: + raise SystemExit('No citekey specified') + opts['citekey'] = citekey + path = path_from_citekey(citekey) + if path: + if path[-5:] == '.html': + subprocess.run([config.URL_BROWSER, path], check=True) + print("Opening html file in browser") + elif path[-5:] == '.docx': + # TODO: support for docx files + raise SystemExit('Cannot open ' + path) + else: + files += [path] + else: + raise SystemExit('No file for ' + citekey) + skip = True + elif os.path.isfile(arg): + files = files + [arg] + elif os.path.isfile(arg.strip('\"')): + files = files + [arg.strip('\"')] + elif os.path.isfile(arg.strip('\'')): + files = files + [arg.strip('\'')] + elif re.match('^-', arg): + raise SystemExit('Unknown option: ' + arg) + else: + raise SystemExit('Can\'t open file: ' + arg) + + if len(files) == 0: + raise SystemExit('No file to open') + + return files, opts + + +def clean_exit(message=''): + + for doc in bufs.docs: + # save current state + doc.write_state() + # close the document + doc.close() + + # close curses + scr.stdscr.keypad(False) + curses.echo() + curses.curs_set(1) + curses.endwin() + + raise SystemExit(message) + +def get_text_in_rows(doc,left,right, selection): + l,t,r,b = doc.page_states[doc.page].place + top = (l + left,t + selection[0] - 1) + bottom = (l + right,t + selection[1]) + top_pix, bottom_pix = doc.cells_to_pixels(top,bottom) + rect = fitz.Rect(top_pix, bottom_pix) + select_text = doc.get_text_in_Rect(rect) + link = doc.make_link() + select_text = select_text + [link] + return (' '.join(select_text)) + +# Viewer functions + +def visual_mode(doc,bar): + l,t,r,b = doc.page_states[doc.page].place + + width = (r - l) + 1 + + def highlight_row(row,left,right, fill='▒', color='yellow'): + if color == 'yellow': + cc = 33 + elif color == 'blue': + cc = 34 + elif color == 'none': + cc = 0 + + fill = fill[0] * (right - left) + + scr.set_cursor(l + left,row) + sys.stdout.buffer.write('\033[{}m'.format(cc).encode('ascii')) + #sys.stdout.buffer.write('\033[{}m'.format(cc + 10).encode('ascii')) + sys.stdout.write(fill) + sys.stdout.flush() + sys.stdout.buffer.write(b'\033[0m') + sys.stdout.flush() + + def unhighlight_row(row): + # scr.set_cursor(l,row) + # sys.stdout.write(' ' * width) + # sys.stdout.flush() + highlight_row(row,0,width,fill=' ',color='none') + + def highlight_selection(selection,left,right, fill='▒', color='blue'): + a = min(selection) + b = max(selection) + for r in range(a,b+1): + highlight_row(r,left,right,fill,color) + + def unhighlight_selection(selection): + highlight_selection(selection,0,width,fill=' ',color='none') + + current_row = t + left = 0 + right = width + select = False + selection = [current_row,current_row] + count_string = '' + + while True: + + bar.cmd = count_string + bar.update(doc) + unhighlight_selection([t,b]) + if select: + highlight_selection(selection,left,right,color='blue') + else: + highlight_selection(selection,left,right,color='yellow') + + if count_string == '': + count = 1 + else: + count = int(count_string) + + keys = shortcuts() + key = scr.stdscr.getch() + + if key in range(48,58): #numerals + count_string = count_string + chr(key) + + elif key in keys.QUIT: + clean_exit() + + elif key == 27 or key in keys.VISUAL_MODE: + unhighlight_selection([t,b]) + return + + elif key in keys.SELECT: + if select: + select = False + else: + select = True + selection = [current_row, current_row] + count_string = '' + + elif key in keys.NEXT_PAGE: + current_row += count + current_row = min(current_row,b) + if select: + selection[1] = current_row + else: + selection = [current_row,current_row] + count_string = '' + + elif key in keys.PREV_PAGE: + current_row -= count + current_row = max(current_row,t) + if select: + selection[1] = current_row + else: + selection = [current_row,current_row] + count_string = '' + + elif key in keys.NEXT_CHAP: + right = min(width,right + count) + count_string = '' + + elif key in { ord('L'), curses.KEY_SRIGHT }: + right = max(left + 1,right - count) + count_string = '' + + elif key in keys.PREV_CHAP: + left = max(0,left - count) + count_string = '' + + elif key in { ord('H'), curses.KEY_SLEFT }: + left = min(left + count,right - 1) + count_string = '' + + elif key in keys.GOTO_PAGE: + current_row = b + if select: + selection[1] = current_row + else: + selection = [current_row,current_row] + count_string = '' + + elif key in keys.GOTO: + current_row = t + if select: + selection[1] = current_row + else: + selection = [current_row,current_row] + count_string = '' + + elif key in keys.YANK: + if selection == [None,None]: + selection = [current_row, current_row] + selection.sort() + select_text = get_text_in_rows(doc,left,right,selection) + select_text = '> ' + select_text + pyperclip.copy(select_text) + unhighlight_selection([t,b]) + bar.message = 'copied' + return + + elif key in keys.INSERT_NOTE: + if selection == [None,None]: + selection = [current_row, current_row] + selection.sort() + select_text = [''] + select_text = ['#+BEGIN_QUOTE'] + select_text += [get_text_in_rows(doc,left,right,selection)] + select_text += ['#+END_QUOTE'] + select_text += [''] + doc.send_to_neovim(select_text, append=False) + unhighlight_selection([t,b]) + return + + elif key in keys.APPEND_NOTE: + if selection == [None,None]: + selection = [current_row, current_row] + selection.sort() + note_header = ' Notes on {}, {}'.format(doc.metadata['author'], doc.metadata['title']) + if doc.citekey: + note_header = doc.citekey + note_header + select_text = ['** ' + note_header] + select_text += [''] + select_text = ['#+BEGIN_QUOTE'] + select_text += [get_text_in_rows(doc,left,right,selection)] + select_text += ['#+END_QUOTE'] + select_text += [''] + doc.send_to_neovim(select_text,append=True) + unhighlight_selection([t,b]) + return + +def view(doc): + + scr.get_size() + scr.init_curses() + + if not detect_support(): + raise SystemExit( + 'Terminal does not support kitty graphics protocol' + ) + scr.swallow_keys() + + bar = status_bar() + if doc.citekey: + bar.message = doc.citekey + + count_string = "" + stack = [0] + keys = shortcuts() + + while True: + + bar.cmd = ''.join(map(chr,stack[::-1])) + bar.update(doc ) + doc.display_page(bar,doc.page) + + if count_string == "": + count = 1 + else: + count = int(count_string) + + key = scr.stdscr.getch() + + if key == -1: + pass + + elif key in keys.REFRESH: + scr.clear() + scr.get_size() + scr.init_curses() + doc.set_layout(doc.papersize) + doc.mark_all_pages_stale() + + elif key == 27: + # quash stray escape codes + scr.swallow_keys() + count_string = "" + stack = [0] + + elif stack[0] in keys.BUFFER_CYCLE and key in range(48,58): + bufs.goto_buffer(int(chr(key)) - 1) + doc = bufs.docs[bufs.current] + doc.goto_logical_page(doc.logicalpage) + doc.set_layout(doc.papersize,adjustpage=False) + doc.mark_all_pages_stale() + if doc.citekey: + bar.message = doc.citekey + count_string = "" + stack = [0] + + elif stack[0] in keys.BUFFER_CYCLE and key == ord('d'): + bufs.close_buffer(bufs.current) + doc = bufs.docs[bufs.current] + doc.goto_logical_page(doc.logicalpage) + doc.set_layout(doc.papersize,adjustpage=False) + doc.mark_all_pages_stale() + if doc.citekey: + bar.message = doc.citekey + count_string = "" + stack = [0] + + elif stack[0] in keys.BUFFER_CYCLE and key in keys.BUFFER_CYCLE: + bufs.cycle(count) + doc = bufs.docs[bufs.current] + doc.goto_logical_page(doc.logicalpage) + doc.set_layout(doc.papersize,adjustpage=False) + doc.mark_all_pages_stale() + if doc.citekey: + bar.message = doc.citekey + count_string = "" + stack = [0] + + elif key in keys.BUFFER_CYCLE_REV: + bufs.cycle(-count) + doc = bufs.docs[bufs.current] + doc.goto_logical_page(doc.logicalpage) + doc.set_layout(doc.papersize,adjustpage=False) + doc.mark_all_pages_stale() + if doc.citekey: + bar.message = doc.citekey + count_string = "" + stack = [0] + + elif key in range(48,58): #numerals + stack = [key] + stack + count_string = count_string + chr(key) + + elif key in keys.QUIT: + clean_exit() + + elif key in keys.GOTO_PAGE: + if count_string == "": + p = doc.page_to_logical(doc.pages) + else: + p = count + doc.goto_logical_page(p) + count_string = "" + stack = [0] + + elif key in keys.NEXT_PAGE: + doc.next_page(count) + count_string = "" + stack = [0] + + elif key in keys.PREV_PAGE: + doc.prev_page(count) + count_string = "" + stack = [0] + + elif key in keys.GO_BACK: + doc.goto_page(doc.prevpage) + count_string = "" + stack = [0] + + elif key in keys.NEXT_CHAP: + doc.next_chap(count) + count_string = "" + stack = [0] + + elif key in keys.PREV_CHAP: + doc.prev_chap(count) + count_string = "" + stack = [0] + + elif stack[0] in keys.GOTO and key in keys.GOTO: + doc.goto_page(0) + count_string = "" + stack = [0] + + elif key in keys.ROTATE_CW: + doc.rotation = (doc.rotation + 90 * count) % 360 + doc.mark_all_pages_stale() + count_string = '' + stack = [0] + + elif key in keys.ROTATE_CCW: + doc.rotation = (doc.rotation - 90 * count) % 360 + doc.mark_all_pages_stale() + count_string = "" + stack = [0] + + elif key in keys.TOGGLE_AUTOCROP: + doc.autocrop = not doc.autocrop + doc.mark_all_pages_stale() + count_string = "" + stack = [0] + + elif key in keys.TOGGLE_ALPHA: + doc.alpha = not doc.alpha + doc.mark_all_pages_stale() + count_string = "" + stack = [0] + + elif key in keys.TOGGLE_INVERT: + doc.invert = not doc.invert + doc.mark_all_pages_stale() + count_string = "" + stack = [0] + + elif key in keys.TOGGLE_TINT: + doc.tint = not doc.tint + doc.mark_all_pages_stale() + count_string = "" + stack = [0] + + elif key in keys.SHOW_TOC: + doc.show_toc(bar) + count_string = "" + stack = [0] + + elif key in keys.SHOW_META: + doc.show_meta(bar) + count_string = "" + stack = [0] + + elif key in keys.SHOW_LINKS: + doc.show_links(bar) + count_string = "" + stack = [0] + + elif key in keys.TOGGLE_TEXT_MODE: + doc.view_text() + count_string = "" + stack = [0] + + elif key in keys.INC_FONT: + doc.set_layout(doc.papersize - count) + doc.mark_all_pages_stale() + count_string = "" + stack = [0] + + elif key in keys.DEC_FONT: + doc.set_layout(doc.papersize + count) + doc.mark_all_pages_stale() + count_string = "" + stack = [0] + + elif key in keys.VISUAL_MODE: + visual_mode(doc,bar) + count_string = "" + stack = [0] + + elif key in keys.INSERT_NOTE: + text = doc.make_link() + doc.send_to_neovim(text,append=False) + count_string = "" + stack = [0] + + elif key in keys.APPEND_NOTE: + text = doc.make_link() + doc.send_to_neovim(text,append=True) + count_string = "" + stack = [0] + + elif key in keys.SET_PAGE_LABEL: + if doc.isPDF: + doc.set_pagelabel(count,'arabic') + else: + doc.first_page_offset = count - doc.page + doc.pages_to_logical_pages() + count_string = "" + stack = [0] + + elif key in keys.SET_PAGE_ALT: + if doc.isPDF: + doc.set_pagelabel(count,'roman lowercase') + else: + doc.first_page_offset = count - doc.page + doc.pages_to_logical_pages() + count_string = "" + + elif key == ord('/'): + scr.place_string(1,scr.rows,"/") + curses.echo() + scr.set_cursor(2,scr.rows) + s = scr.stdscr.getstr() + search_text = s.decode('utf-8') + curses.noecho() + bar.message = doc.search_text(search_text) + + elif key in keys.OPEN_GUI: + subprocess.run([config.GUI_VIEWER, doc.filename], check=True) + + elif key in keys.DEBUG: + pass + + elif key in range(48,257): #printable characters + stack = [key] + stack + + +# config is global +config = Config() +config.load_config_file() +if not config.URL_BROWSER: + config.browser_detect() +# buffers list is global +bufs = Buffers() +# screen is global +scr = Screen() + +def main(args=sys.argv): + + if not sys.stdin.isatty(): + raise SystemExit('Not an interactive tty') + + scr.get_size() + + if scr.width == 0: + raise SystemExit( + 'Terminal does not support reporting screen sizes via the TIOCGWINSZ ioctl' + ) + + paths, opts = parse_args(args) + + for path in paths: + try: + doc = Document(path) + except: + raise SystemExit('Unable to open ' + files[0]) + + # load saved file state + cachefile = get_cachefile(doc.filename) + if os.path.exists(cachefile): + with open(cachefile, 'r') as f: + state = json.load(f) + for key in state: + setattr(doc, key, state[key]) + bufs.docs += [doc] + + for doc in bufs.docs: + if not doc.citekey: + doc.citekey = citekey_from_path(doc.filename) + + doc = bufs.docs[bufs.current] + + # load cli settings + for key in opts: + setattr(doc, key, opts[key]) + + # generate logical pages + doc.pages_to_logical_pages() + + # normalize page number + doc.goto_logical_page(doc.logicalpage) + + # apply layout settings + doc.set_layout(doc.papersize,adjustpage=False) + + view(doc) + +if __name__ == '__main__': + main() + diff --git a/xorg-server/.Xdefaults b/xorg-server/.Xdefaults new file mode 100644 index 0000000..243ed3c --- /dev/null +++ b/xorg-server/.Xdefaults @@ -0,0 +1,78 @@ +!! +!! ~/.Xdefaults +!! + +!!!!!!!!!!!!!!!!!! +!! rxvt-unicode !! +!!!!!!!!!!!!!!!!!! + +URxvt*font: xft:Inconsolata Nerd Font:style=Medium:size=14:pixelsize=16:antialias=true + +URxvt*intensityStyles: true +URxvt*linespace: 0 + +URxvt*geometry: 100x30 +URxvt*borderLess: false +URxvt*externalBorder: 0 +URxvt*internalBorder: 0 + +URxvt*scrollBar: false + +URxvt*cursorColor: #ffffff +URxvt*cursorColor2: #000000 +URxvt*cursorBlink: false +URxvt*reverseVideo: false + +URxvt*depth: 32 + +URxvt.background: [85]#181815 +!URxvt*background: rgba:0031/0032/0034/ddee + +URxvt*pointerBlank: false +URxvt*inheritPixmap: false + +URxvt*insecure: false +URxvt*termName: rxvt-unicode +URxvt*loginShell: true +URxvt*hold: false +URxvt*saveLines: 5000 +URxvt*jumpScroll: true +URxvt*skipScroll: true +URxvt*scrollTtyOutput: false +URxvt*scrollWithBuffer: false +URxvt*scrollTtyKeypress: true +URxvt*mouseWheelScrollPage: false + +URxvt*tripleclickwords: true +URxvt*cutchars: `'",;@&*=|?()<>[]{} +URxvt*pastableTabs: false +URxvt*mapAlert: false + +URxvt*urgentOnBell: false +URxvt*visualBell: false +URxvt*utmpInhibit: false + +!! Perl Extensions !! +URxvt*perl-ext-common: default,tabbedex,resize-font + +URxvt.keysym.C-Down: resize-font:smaller +URxvt.keysym.C-Up: resize-font:bigger +URxvt.keysym.C-equal: resize-font:reset +URxvt.keysym.C-question: resize-font:show + +URxvt*keysym.Control-Shift-N: perl:tabbedex:new_tab +URxvt*keysym.Control-Shift-K: perl:tabbedex:next_tab +URxvt*keysym.Control-Shift-J: perl:tabbedex:prev_tab + +URxvt.keysym.Control-Shift-R: perl:tabbedex:rename_tab +URxvt.keysym.Control-Shift-H: perl:tabbedex:move_tab_left +URxvt.keysym.Control-Shift-L: perl:tabbedex:move_tab_right + +URxvt*tabbed.tabbar-fg: 15 +URxvt*tabbed.tabbar-bg: 236 +URxvt*tabbed.tab-fg: 110 +URxvt*tabbed.tab-bg: 236 +URxvt*tabbed.transparent:true +URxvt*tabbed.new-button: false + +URxvt.letterSpace: -1 diff --git a/xorg-server/.Xmodmap b/xorg-server/.Xmodmap new file mode 100644 index 0000000..6644d6f --- /dev/null +++ b/xorg-server/.Xmodmap @@ -0,0 +1,18 @@ +clear lock +clear control +clear mod1 +clear mod2 +clear mod3 +clear mod4 +clear mod5 +keycode 37 = Hyper_L +keycode 66 = Control_L +add control = Control_L Control_R +add mod1 = Alt_L Alt_R Meta_L +add mod2 = Num_Lock +add mod3 = Hyper_L +add mod4 = Super_L Super_R +add mod5 = Mode_switch ISO_Level3_Shift + +keycode 135 = Super_R + diff --git a/xorg-server/.Xresources b/xorg-server/.Xresources new file mode 100644 index 0000000..2c2018a --- /dev/null +++ b/xorg-server/.Xresources @@ -0,0 +1,19 @@ +*color0: #191c26 +*color1: #e95865 +*color2: #ade36b +*color3: #fdc253 +*color4: #2d90cf +*color5: #c9adfe +*color6: #85e2bf +*color7: #bbbbbb +*color8: #555555 +*color9: #e95865 +*color10: #c0e436 +*color11: #fed96d +*color12: #5555ff +*color13: #ff55ff +*color14: #98ffd9 +*color15: #ffffff +*background: #191c26 +*foreground: #d0cec3 +*cursorColor: #fdc253 diff --git a/xorg-server/.user-dirs.dirs b/xorg-server/.user-dirs.dirs new file mode 100644 index 0000000..7dd92b4 --- /dev/null +++ b/xorg-server/.user-dirs.dirs @@ -0,0 +1,8 @@ +XDG_DESKTOP_DIR="$HOME/desktop" +XDG_DOWNLOAD_DIR="$HOME/downloads" +XDG_TEMPLATES_DIR="$HOME/dotfiles/templates" +XDG_PUBLICSHARE_DIR="$HOME/pub" +XDG_DOCUMENTS_DIR="$HOME/docs" +XDG_MUSIC_DIR="$HOME/music" +XDG_PICTURES_DIR="$HOME/pics" +XDG_VIDEOS_DIR="$HOME/vids" diff --git a/xorg-server/.xinitrc b/xorg-server/.xinitrc new file mode 100644 index 0000000..f183578 --- /dev/null +++ b/xorg-server/.xinitrc @@ -0,0 +1,4 @@ +if [ -s ~/.Xmodmap ] +then + xmodmap ~/.Xmodmap +fi diff --git a/xorg-server/.xinputrc b/xorg-server/.xinputrc new file mode 100644 index 0000000..8416c38 --- /dev/null +++ b/xorg-server/.xinputrc @@ -0,0 +1,3 @@ +# im-config(8) generated on Sat, 29 Jul 2017 12:06:06 +0100 +run_im xim +# im-config signature: 9ab127ccc1eb0fd965ef1f92c4a49771 -