This commit is contained in:
Diogo Peralta Cordeiro 2022-08-21 23:35:43 +01:00
parent cabfc7c1cb
commit 05b3973175
81 changed files with 3400 additions and 1688 deletions

View File

@ -174,8 +174,9 @@ Proper network manager with VPN support
* fonts-font-awesome
* fonts-open-sans
* fonts-paratype
* fonts-noto
`sudo aptitude install 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 fonts-noto`
#### Install Microsoft Tahoma, Segoe UI, and other fonts

View File

@ -1,10 +0,0 @@
[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

View File

@ -1,13 +0,0 @@
[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;

View File

@ -0,0 +1,205 @@
[Desktop Entry]
Categories=Utility;X-SuSE-SyncUtility;
Type=Application
Exec=nextcloud
Name=Nextcloud Desktop
Comment=Nextcloud desktop synchronization client
GenericName=Folder Sync
Icon=Nextcloud
Keywords=Nextcloud;syncing;file;sharing;
X-GNOME-Autostart-Delay=3
MimeType=application/vnd.nextcloud;
Actions=Quit;
# Translations
Comment[oc]=Nextcloud sincronizacion del client
GenericName[oc]=Dorsièr de Sincronizacion
Name[oc]=Nextcloud sincronizacion del client
Icon[oc]=Nextcloud
Comment[ar]=Nextcloud زبون مزامنة مكتبي
GenericName[ar]=مزامنة المجلد
Name[ar]=Nextcloud زبون مزامنة مكتبي
Icon[ar]=Nextcloud
Comment[bg_BG]=Nextcloud клиент за десктоп синхронизация
GenericName[bg_BG]=Синхронизиране на папката
Name[bg_BG]=Nextcloud клиент десктоп синхронизация
Icon[bg_BG]=Nextcloud
Comment[ca]=Client de sincronització d'escriptori Nextcloud
GenericName[ca]=Sincronització de carpetes
Name[ca]=Client de sincronització d'escriptori Nextcloud
Icon[ca]=Nextcloud
Comment[da]=Nextcloud skrivebordsklient til synkronisering
GenericName[da]=Mappesynkronisering
Name[da]=Nextcloud skrivebordsklient til synk
Icon[da]=Nextcloud
Comment[de]=Nextcloud Desktop-Synchronisationsclient
GenericName[de]=Ordner-Synchronisation
Name[de]=Nextcloud Desktop-Synchronisationsclient
Icon[de]=Nextcloud
Comment[ja_JP]=Nextcloud
GenericName[ja_JP]=
Name[ja_JP]=Nextcloud
Icon[ja_JP]=Nextcloud
Comment[el]=@ΟΝΟΜΑ_ΕΦΑΡΜΟΓΗΣ@ συγχρονισμός επιφάνειας εργασίας πελάτη
GenericName[el]=Συγχρονισμός φακέλου
Name[el]=@ΟΝΟΜΑ_ΕΦΑΡΜΟΓΗΣ@ συγχρονισμός επιφάνειας εργασίας πελάτη
Icon[el]=Nextcloud
Comment[en_GB]=Nextcloud desktop synchronisation client
GenericName[en_GB]=Folder Sync
Name[en_GB]=Nextcloud desktop sync client
Icon[en_GB]=Nextcloud
Comment[es]=Nextcloud cliente de sincronización de escritorio
GenericName[es]=Sincronización de carpeta
Name[es]=Nextcloud cliente de sincronización de escritorio
Icon[es]=Nextcloud
Comment[de_DE]=Nextcloud Desktop-Synchronisationsclient
GenericName[de_DE]=Ordner-Synchronisation
Name[de_DE]=Nextcloud Desktop-Synchronisationsclient
Icon[de_DE]=Nextcloud
Comment[eu]=Nextcloud mahaigaineko sinkronizazio bezeroa
GenericName[eu]=Karpetaren sinkronizazioa
Name[eu]=Nextcloud mahaigaineko sinkronizazio bezeroa
Icon[eu]=Nextcloud
GenericName[fa]=همسان سازی پوشهها
Name[fa]=nextcloud نسخهی همسان سازی مشتری
Icon[fa]=Nextcloud
Comment[fr]=Synchronisez vos dossiers avec un serveur Nextcloud
GenericName[fr]=Synchronisation de dossier
Name[fr]=Client de synchronisation Nextcloud
Icon[fr]=Nextcloud
Comment[gl]=Nextcloud cliente de sincronización para escritorio
GenericName[gl]=Sincronizar Cartafol
Name[gl]=Nextcloud cliente de sincronización para escritorio
Icon[gl]=Nextcloud
Comment[he]=Nextcloud לקוח סנכון שולחן עבודה
GenericName[he]=סנכון תיקייה
Name[he]=Nextcloud לקוח סנכרון שולחן עבודה
Icon[he]=Nextcloud
Comment[ia]=Nextcloud cliente de synchronisation pro scriptorio
GenericName[ia]=Synchronisar Dossier
Name[ia]=Nextcloud cliente de synchronisation pro scriptorio
Icon[ia]=Nextcloud
Comment[id]=Klien sinkronisasi desktop Nextcloud
GenericName[id]=Folder Sync
Name[id]=Klien sync desktop Nextcloud
Icon[id]=Nextcloud
Comment[is]=Nextcloud skjáborðsforrit samstillingar
GenericName[is]=Samstilling möppu
Name[is]=Nextcloud skjáborðsforrit samstillingar
Icon[is]=Nextcloud
Comment[it]=Client di sincronizzazione del desktop di Nextcloud
GenericName[it]=Sincronizzazione cartella
Name[it]=Client di sincronizzazione del desktop di Nextcloud
Icon[it]=Nextcloud
Comment[ko]=Nextcloud
GenericName[ko]=
Name[ko]=Nextcloud
Icon[ko]=Nextcloud
Comment[hu_HU]=Nextcloud asztali szinkronizációs kliens
GenericName[hu_HU]=Könyvtár szinkronizálás
Name[hu_HU]=Nextcloud asztali szinkr. kliens
Icon[hu_HU]=Nextcloud
Comment[af_ZA]=Nextcloud werkskermsinchroniseerkliënt
GenericName[af_ZA]=Vouersinchronisering
Name[af_ZA]=Nextcloud werkskermsinchroniseerkliënt
Icon[af_ZA]=Nextcloud
Comment[nl]=Nextcloud desktop synchronisatie client
GenericName[nl]=Mappen sync
Name[nl]=Nextcloud desktop sync client
Icon[nl]=Nextcloud
Comment[et_EE]=Nextcloud sünkroonimise klient töölauale
GenericName[et_EE]=Kaustade sünkroonimine
Name[et_EE]=Nextcloud sünkroonimise klient töölauale
Icon[et_EE]=Nextcloud
Comment[pl]=Nextcloud klient synchronizacji dla komputerów stacjonarnych
GenericName[pl]=Folder Synchronizacji
Name[pl]=Nextcloud klient synchronizacji dla komputerów stacjonarnych
Icon[pl]=Nextcloud
Comment[pt_BR]=Nextcloud cliente de sincronização do computador
GenericName[pt_BR]=Sincronização de Pasta
Name[pt_BR]=Nextcloud cliente de sincronização de desktop
Icon[pt_BR]=Nextcloud
Comment[cs_CZ]=Nextcloud počítačový synchronizační klient
GenericName[cs_CZ]=Synchronizace adresáře
Name[cs_CZ]=Nextcloud počítačový synchronizační klient
Icon[cs_CZ]=Nextcloud
Comment[ru]=Настольный клиент синхронизации Nextcloud
GenericName[ru]=Синхронизация каталогов
Name[ru]=Настольный клиент синхронизации Nextcloud
Icon[ru]=Nextcloud
Comment[sl]=Nextcloud Program za usklajevanje datotek z namizjem
GenericName[sl]=Usklajevanje map
Name[sl]=Nextcloud Program za usklajevanje datotek z namizjem
Icon[sl]=Nextcloud
Comment[sq]=Klient njëkohësimesh Nextcloud për desktop
GenericName[sq]=Njëkohësim Dosjesh
Name[sq]=Klient njëkohësimesh Nextcloud për desktop
Icon[sq]=Nextcloud
Comment[fi_FI]=Nextcloud työpöytäsynkronointisovellus
GenericName[fi_FI]=Kansion synkronointi
Name[fi_FI]=Nextcloud työpöytäsynkronointisovellus
Icon[fi_FI]=Nextcloud
Comment[sv]=Nextcloud desktop synkroniseringsklient
GenericName[sv]=Mappsynk
Name[sv]=Nextcloud desktop synk-klient
Icon[sv]=Nextcloud
Comment[tr]=Nextcloud masaüstü eşitleme istemcisi
GenericName[tr]=Dosya Eşitleme
Name[tr]=Nextcloud masaüstü eşitleme istemcisi
Icon[tr]=Nextcloud
Comment[uk]=Настільний клієнт синхронізації Nextcloud
GenericName[uk]=Синхронізація теки
Name[uk]=Настільний клієнт синхронізації Nextcloud
Icon[uk]=Nextcloud
Comment[ro]=Nextcloud client de sincronizare pe desktop
GenericName[ro]=Sincronizare director
Name[ro]=Nextcloud client de sincronizare pe desktop
Icon[ro]=Nextcloud
Comment[zh_CN]=Nextcloud
GenericName[zh_CN]=
Name[zh_CN]=Nextcloud
Icon[zh_CN]=Nextcloud
Comment[zh_HK]=
Comment[zh_TW]=Nextcloud
GenericName[zh_TW]=
Name[zh_TW]=Nextcloud
Icon[zh_TW]=Nextcloud
Comment[es_AR]=Cliente de sincronización para escritorio Nextcloud
GenericName[es_AR]=Sincronización de directorio
Name[es_AR]=Cliente de sincronización para escritorio Nextcloud
Icon[es_AR]=Nextcloud
Comment[lt_LT]=Nextcloud darbalaukio sinchronizavimo programa
GenericName[lt_LT]=Katalogo sinchnorizacija
Name[lt_LT]=Nextcloud darbalaukio programa
Icon[lt_LT]=Nextcloud
Comment[th_TH]=Nextcloud
GenericName[th_TH]=
Name[th_TH]= Nextcloud
Icon[th_TH]=Nextcloud
Comment[es_MX]=Cliente de escritorio para sincronziación de Nextcloud
GenericName[es_MX]=Sincronización de Carpetas
Name[es_MX]=Cliente de escritorio para sincronziación de Nextcloud
Icon[es_MX]=Nextcloud
Comment[nb_NO]=Nextcloud skrivebordssynkroniseringsklient
GenericName[nb_NO]=Mappesynkronisering
Name[nb_NO]=Nextcloud skrivebordssynkroniseringsklient
Icon[nb_NO]=Nextcloud
Comment[nn_NO]=Nextcloud klient for å synkronisera frå skrivebord
GenericName[nn_NO]=Mappe synkronisering
Name[nn_NO]=Nextcloud klient for å synkronisera frå skrivebord
Icon[nn_NO]=Nextcloud
Comment[pt_PT]=Nextcloud - Cliente de Sincronização para PC
GenericName[pt_PT]=Sincronizar Pasta
Name[pt_PT]=Nextcloud - Cliente de Sincronização para PC
Icon[pt_PT]=Nextcloud
Icon[km]=Nextcloud
Comment[lb]=Nextcloud Desktop Synchronisatioun Client
GenericName[lb]=Dossier Dync
Name[lb]=Nextcloud Desktop Sync Client
Icon[lb]=Nextcloud
[Desktop Action Quit]
Exec=nextcloud --quit
Name=Quit Nextcloud
Icon=nextcloud

View File

@ -1,16 +0,0 @@
[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

View File

@ -0,0 +1,37 @@
[Desktop Entry]
Name[ca]=Fcitx 5
Name[da]=Fcitx 5
Name[de]=Fcitx 5
Name[ja]=Fcitx 5
Name[ko]=Fcitx 5
Name[zh_CN]=Fcitx 5
Name[zh_TW]=Fcitx 5
Name=Fcitx 5
GenericName[ca]=Mètode d'entrada
GenericName[da]=Inputmetode
GenericName[de]=Eingabemethode
GenericName[ja]=
GenericName[ko]=
GenericName[ru]=Метод ввода
GenericName[zh_CN]=
GenericName[zh_TW]=
GenericName=Input Method
Comment[ca]=Mètode d'entrada estàndard
Comment[da]=Start inputmetode
Comment[de]=Eingabemethode starten
Comment[ja]=
Comment[ko]=
Comment[zh_CN]=
Comment[zh_TW]=
Comment=Start Input Method
Exec=/usr/bin/fcitx5
Icon=fcitx
Terminal=false
Type=Application
Categories=System;Utility;
StartupNotify=false
X-GNOME-AutoRestart=false
X-GNOME-Autostart-Notify=false
X-KDE-autostart-after=panel
X-KDE-StartupNotify=false
X-KDE-Wayland-VirtualKeyboard=true

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -2,9 +2,12 @@
"minimum-stability": "dev",
"prefer-stable": true,
"require": {
"friendsofphp/php-cs-fixer": "^3.0",
"phpmd/phpmd": "^2.7",
"phpstan/phpstan": "^0.12.94",
"squizlabs/php_codesniffer": "^3.4"
"friendsofphp/php-cs-fixer": "*",
"squizlabs/php_codesniffer": "*",
"phpmd/phpmd": "*",
"kubawerlos/composer-json-fixer": "*",
"phpstan/phpstan": "*",
"vimeo/psalm": "*",
"psy/psysh": "@stable"
}
}

View File

@ -0,0 +1,14 @@
-----BEGIN PUBLIC KEY-----
MIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAnBDHjZS6e0ZMoK3xTD7f
FNCzlXjX/Aie2dit8QXA03pSrOTbaMnxON3hUL47Lz3g1SC6YJEMVHr0zYq4elWi
i3ecFEgzLcj+pZM5X6qWu2Ozz4vWx3JYo1/a/HYdOuW9e3lwS8VtS0AVJA+U8X0A
hZnBmGpltHhO8hPKHgkJtkTUxCheTcbqn4wGHl8Z2SediDcPTLwqezWKUfrYzu1f
o/j3WFwFs6GtK4wdYtiXr+yspBZHO3y1udf8eFFGcb2V3EaLOrtfur6XQVizjOuk
8lw5zzse1Qp/klHqbDRsjSzJ6iL6F4aynBc6Euqt/8ccNAIz0rLjLhOraeyj4eNn
8iokwMKiXpcrQLTKH+RH1JCuOVxQ436bJwbSsp1VwiqftPQieN+tzqy+EiHJJmGf
TBAbWcncicCk9q2md+AmhNbvHO4PWbbz9TzC7HJb460jyWeuMEvw3gNIpEo2jYa9
pMV6cVqnSa+wOc0D7pC9a6bne0bvLcm3S+w6I5iDB3lZsb3A9UtRiSP7aGSo7D72
8tC8+cIgZcI7k9vjvOqH+d7sdOU2yPCnRY6wFh62/g8bDnUpr56nZN1G89GwM4d4
r/TU7BQQIzsZgAiqOGXvVklIgAMiV0iucgf3rNBLjjeNEwNSTTG9F0CtQ+7JLwaE
wSEuAuRm+pRqi8BRnQ/GKUcCAwEAAQ==
-----END PUBLIC KEY-----

View File

@ -0,0 +1,14 @@
-----BEGIN PUBLIC KEY-----
MIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEA0Vi/2K6apCVj76nCnCl2
MQUPdK+A9eqkYBacXo2wQBYmyVlXm2/n/ZsX6pCLYPQTHyr5jXbkQzBw8SKqPdlh
vA7NpbMeNCz7wP/AobvUXM8xQuXKbMDTY2uZ4O7sM+PfGbptKPBGLe8Z8d2sUnTO
bXtX6Lrj13wkRto7st/w/Yp33RHe9SlqkiiS4MsH1jBkcIkEHsRaveZzedUaxY0M
mba0uPhGUInpPzEHwrYqBBEtWvP97t2vtfx8I5qv28kh0Y6t+jnjL1Urid2iuQZf
noCMFIOu4vksK5HxJxxrN0GOmGmwVQjOOtxkwikNiotZGPR4KsVj8NnBrLX7oGuM
nQvGciiu+KoC2r3HDBrpDeBVdOWxDzT5R4iI0KoLzFh2pKqwbY+obNPS2bj+2dgJ
rV3V5Jjry42QOCBN3c88wU1PKftOLj2ECpewY6vnE478IipiEu7EAdK8Zwj2LmTr
RKQUSa9k7ggBkYZWAeO/2Ag0ey3g2bg7eqk+sHEq5ynIXd5lhv6tC5PBdHlWipDK
tl2IxiEnejnOmAzGVivE1YGduYBjN+mjxDVy8KGBrjnz1JPgAvgdwJ2dYw4Rsc/e
TzCFWGk/HM6a4f0IzBWbJ5ot0PIi4amk07IotBXDWwqDiQTwyuGCym5EqWQ2BD95
RGv89BPD+2DLnJysngsvVaUCAwEAAQ==
-----END PUBLIC KEY-----

View File

@ -2,7 +2,7 @@
name = Diogo Peralta Cordeiro
email = mail@diogo.site
[core]
editor = nvim
editor = vim
excludesfile = ~/.gitignore_global
[credential]
helper = cache --timeout=3600
@ -36,9 +36,9 @@
[url "https://aur.archlinux.org/"]
insteadOf = "aur:"
[merge]
tool = nvim
[mergetool "nvim"]
cmd = nvim -f -c \"Gdiff\" \"$MERGED\"
tool = vim
[mergetool "vim"]
cmd = vim -f -c \"Gdiff\" \"$MERGED\"
[rebase]
autosquash = true
instructionFormat = "(%an <%ae>) %s"

View File

@ -2,6 +2,7 @@
########################
.idea/
.php_cs.cache
.vscode
# Compiled source #
###################

View File

@ -322,7 +322,7 @@ bindsym $mod+r mode "resize"
# 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 XF86AudioMute exec --no-startup-id ~/.config/i3/scripts/volume_level.sh toggle # mute sound
bindsym $mod+o exec pavucontrol
# Sreen brightness controls
@ -342,7 +342,7 @@ bindsym XF86Sleep exec --no-startup-id ~/.config/i3/scripts/touchpad.sh
## Start Applications ##
########################
bindsym $mod+Return exec i3-sensible-terminal
bindsym $mod+Return exec kitty #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
@ -363,8 +363,8 @@ bindsym Mod1+F2 exec --no-startup-id dmenu_run
# 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"]
#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
@ -408,8 +408,9 @@ bindsym mod3+Escape exec --no-startup-id ~/.config/i3/scripts/exit_menu.sh power
############################
#-> System related
exec --no-startup-id /usr/bin/fcitx5 &
exec --no-startup-id nm-applet &
#exec --no-startup-id /usr/lib/policykit-1-gnome/polkit-gnome-authentication-agent-1 &
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 &
@ -423,12 +424,18 @@ 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 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 Telegram -startintray &
#exec --no-startup-id /opt/spotlight.sh &
# DPI because XFCE hardcoded it
## workstation
# exec --no-startup-id "sleep 5; xrand --dpi 109 &"
## laptop
exec --no-startup-id "sleep 5; xrandr --dpi 158 &"
# Display Mode
bindsym $mod+p mode "$mode_display"
set $mode_display Ext Screen: (z) VGA, (x) HDMI, (c) External OFF

View File

@ -126,7 +126,7 @@ interval=30
#
[time]
#color=#FFCCCC
label=
label=
command=date '+%Y-%m-%d %H:%M:%S'
#command=date '+%H:%M '
interval=1

View File

@ -2,5 +2,3 @@
grep -rh Exec ~/.config/autostart | while read -r line ; do
${line:5} &
done
# Fix snap
xhost +si:localuser:$USER

View File

@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/dash
case "$1" in
lock)

View File

@ -1,17 +1,23 @@
#!/bin/dash
#!/bin/zsh
# Pulse Audio controls
#sink=$(pacmd list-sinks | grep index | awk '{ print substr( $0, length($0), length($0) ) }')
sink=$(pactl list short sinks | grep -F RUNNING | cut -d$'\t' -f1)
# Unmute if updating volume and currently mute
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
pactl set-sink-mute "$sink" toggle
fi
case "$1" in
up)
pactl set-sink-volume 0 +5% #increase sound volume
pactl set-sink-volume "$sink" +5% #increase sound volume
;;
down)
pactl set-sink-volume 0 -5% #decrease sound volume
pactl set-sink-volume "$sink" -5% #decrease sound volume
;;
toggle)
pactl set-sink-mute "$sink" toggle # mute sound volume
;;
esac

View File

@ -1,822 +0,0 @@
" 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)
"
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" ==================================================
" Basic Settings
" ==================================================
let mapleader="\<Space>" " 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 <Tab> 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 = "\<Esc>[38;2;%lu;%lu;%lum"
let &t_8b = "\<Esc>[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 <esc>
cno jj <c-c>
" One can map ctrl-c to something else if needed
map <c-c> <Nop>
imap <c-c> <Nop>
" 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 <expr> j v:count ? (v:count > 5 ? "m'" . v:count : '') . 'j' : 'gj'
nnoremap <expr> 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 <Leader>ss :mksession! ~/.nvim_runtime/sessions/*.vim<C-D><BS><BS><BS><BS><BS>'
" Reload session
exec 'nnoremap <Leader>sl :so ~/.nvim_runtime/sessions/*.vim<C-D><BS><BS><BS><BS><BS>'
" quick make
map <F6> :make<CR>
" simple pasting from the system clipboard
" http://tilvim.com/2014/03/18/a-better-paste.html
map <Leader>p :set paste<CR>o<esc>"+]p:set nopaste<cr>
" Quickly save, quit, or save-and-quit
map <leader>w :w<CR>
map <leader>x :x<CR>
map <leader>q :q<CR>
" un-highlight when esc is pressed
map <silent><esc> :noh<cr>
" Quickly toggle relative line numbers
function ToggleRelativeLineNumbers()
set invnumber
set invrelativenumber
endfunction
nnoremap <leader>l :call ToggleRelativeLineNumbers()<cr>
" Toggle between absolute -> relative line number
"nnoremap <C-n> :let [&nu, &rnu] = [&nu, &nu+&rnu==1]<CR>
" Save files as root
cnoremap w!! execute ':w suda://%'
" ==================================================
" vimrc handling
" ==================================================
" ,v loads .vimrc
" ,V reloads .vimrc -- activating changes (needs save)
map <leader>v :sp ~/.config/nvim/init.vim<CR><C-W>_
map <silent> <leader>V :source ~/.config/nvim/init.vim<CR>:filetype detect<CR>:exe ":echo 'vimrc reloaded'"<CR>
" ==================================================
" Window navigation
" ==================================================
" control + vim direction key to navigate windows
noremap <C-J> <C-W>j
noremap <C-K> <C-W>k
noremap <C-H> <C-W>h
noremap <C-L> <C-W>l
" control + arrow key to navigate windows
noremap <C-Down> <C-W>j
noremap <C-Up> <C-W>k
noremap <C-Left> <C-W>h
noremap <C-Right> <C-W>l
" close all windows except the current one
nnoremap <leader>wco :only<cr>
nnoremap <leader>wcc :cclose<cr>
" windows creation
" create window on the bottom
nnoremap <leader>wb <c-w>s
" create vertival window
nnoremap <leader>wv <c-w>v
" " arrow keys resize windows
" nnoremap <Left> :vertical resize -10<CR>
" nnoremap <Right> :vertical resize +10<CR>
" nnoremap <Up> :resize -10<CR>
" nnoremap <Down> :resize +10<CR>
" imap <up> <nop>
" imap <down> <nop>
" imap <left> <nop>
" imap <right> <nop>
" ==================================================
" Splits handling
" ==================================================
" Make these all work in insert mode
imap <C-W> <C-O><C-W>
" - and + to resize horizontal splits
map - <C-W>-
map + <C-W>+
" alt-< or alt-> for vertical splits
map <m-,> <C-W>>
map <m-.> <C-W><
" F2 close current split (window)
noremap <F2> <Esc>:close<CR><Esc>
" Deleter buffer, keep the split (switch to prev buf, delete now prev buf)
nmap <leader>d :b#<bar>bd#<CR>
" ==================================================
" Tab navigation
" ==================================================
map <leader>to :tabonly<cr>
map <leader>tc :tabclose<cr>
map <leader>tm :tabmove<CR>
nnoremap tn :tabnew<cr>
nnoremap th :tabfirst<CR>
nnoremap tk :tabnext<CR>
nnoremap tj :tabprev<CR>
nnoremap tl :tablast<CR>
" move tab to first position
nnoremap tF :tabm 0<CR>
nnoremap tL :tabm<CR>
" Navigate tabs with shift-{h,l}
noremap <S-l> gt
noremap <S-h> gT
" Let 'tl' toggle between this and the last accessed tab
let g:lasttab = 1
nmap <Leader>tl :exe "tabn ".g:lasttab<CR>
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 <leader>te :tabedit <c-r>=expand("%:p:h")<cr>/
" Switch CWD to the directory of the open buffer
map <leader>cd :cd %:p:h<cr>:pwd<cr>
" Specify the behavior when switching between buffers
try
set switchbuf=useopen,usetab,newtab
set stal=2
catch
endtry
" ==================================================
" Buffer navigation
" ==================================================
nmap <A-Tab> :bnext<CR>
nmap <S-Tab> :bprevious<CR>
" ==================================================
" Clean all end of line whitespace with <Leader>S
" ==================================================
":nnoremap <silent><leader>S :let _s=@/<Bar>:%s/\s\+$//e<Bar>:let @/=_s<Bar>:nohl<CR>
fun! TrimWhitespace()
let l:save = winsaveview()
keeppatterns %s/\s\+$//e
call winrestview(l:save)
endfun
:nnoremap <silent><leader>S :call TrimWhitespace()<CR>
" ==================================================
" Visual mode related
" ==================================================
" Visual mode pressing * or # searches for the current selection
" Super useful! From an idea by Michael Naumann
vnoremap <silent> * :<C-u>call VisualSelection('', '')<CR>/<C-R>=@/<CR><CR>
vnoremap <silent> # :<C-u>call VisualSelection('', '')<CR>?<C-R>=@/<CR><CR>
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 <M-j> mz:m+<cr>`z
nmap <M-k> mz:m-2<cr>`z
vmap <M-j> :m'>+<cr>`<my`>mzgv`yo`z
vmap <M-k> :m'<-2<cr>`>my`<mzgv`yo`z
if has("mac") || has("macunix")
nmap <D-j> <M-j>
nmap <D-k> <M-k>
vmap <D-j> <M-j>
vmap <D-k> <M-k>
endif
" ==================================================
" Spell checking
" ==================================================
" Pressing ,ss will toggle and untoggle spell checking
map <leader>ss :setlocal spell!<cr>
" Shortcuts using <leader>
map <leader>sn ]s
map <leader>sp [s
map <leader>sa zg
map <leader>s? z=
" ==================================================
" Other Configurations
" ==================================================
" Remove the Windows ^M - when the encodings gets messed up
noremap <Leader>m mmHmt:%s/<C-V><cr>//ge<cr>'tzt'm
" Quickly open a buffer for scribble
map <leader>q :e ~/buffer<cr>
" Quickly open a markdown buffer for scribble
map <leader>x :e ~/buffer.md<cr>
" Toggle paste mode on and off
map <leader>pp :setlocal paste!<cr>
noremap <C-p> :Denite buffer file_rec tag<CR>
xmap <leader>a gaip*
nmap <leader>t <C-w>s<C-w>j:terminal<CR>
nmap <leader>vt <C-w>v<C-w>l:terminal<CR>
nmap <leader>g :Goyo<CR>
nmap <leader>j :set filetype=journal<CR>
nmap <leader>l :Limelight!!<CR>
autocmd FileType python nmap <leader>x :0,$!~/.config/nvim/env/bin/python -m yapf<CR>
vmap <F2> !boxes -d stone
" surround by quotes - frequently use cases of vim-surround
map <leader>" ysiw"<cr>
map <leader>' ysiw'<cr>
" Act like D and C
nnoremap Y y$
" indent without kill the selection in vmode
vmap < <gv