This commit is contained in:
Jeff Lance 2020-04-15 13:15:10 +02:00
parent f547d6d04b
commit cb69579cf0
25 changed files with 5589 additions and 246 deletions

View File

@ -1,9 +1,9 @@
directory: /mnt/diskstation1/music
library: /mnt/diskstation1/music/library.blb
library: /mnt/diskstation1/music/beets_library.blb
import:
copy: no
write: no
write: yes
move: no
paths:
@ -16,7 +16,6 @@ item_fields:
plugins:
acousticbrainz
bpd
chroma
edit
fetchart
@ -24,7 +23,8 @@ plugins:
lyrics
mbsync
mpdstats
mbcollection
mpdupdate
thumbnails
web
acousticbrainz:
@ -39,10 +39,15 @@ edit:
lyrics:
auto: yes
google_engine_ID: 004234001817710914369:abwpkdjsfq7
musicbrainz:
user: Gune
pass: Elisa
mbcollection:
auto: no
mpd:
host: localhost
port: 6600
thumbnails:
auto: yes

View File

@ -16,14 +16,14 @@
# `mopidy --version` to check the current version.
[core]
#cache_dir = $XDG_CACHE_DIR/mopidy
#config_dir = $XDG_CONFIG_DIR/mopidy
#data_dir = $XDG_DATA_DIR/mopidy
cache_dir = $XDG_CACHE_DIR/mopidy
config_dir = $XDG_CONFIG_DIR/mopidy
data_dir = $XDG_DATA_DIR/mopidy
#max_tracklist_length = 10000
[logging]
#color = true
#console_format = %(levelname)-8s %(message)s
color = true
console_format = %(levelname)-8s %(message)s
#debug_format = %(levelname)-8s %(asctime)s [%(process)d:%(threadName)s] %(name)s\n %(message)s
#debug_file = mopidy.log
#config_file =
@ -31,7 +31,9 @@
[audio]
#mixer = software
#mixer_volume =
#output = autoaudiosink
output = autoaudiosink
#output = tee name=t t. ! queue ! pulsesink server=127.0.0.1 t. ! queue ! audioresample ! audioconvert ! audio/x-raw,rate=44100,channels=2,format=S16LE ! wavenc ! filesink location=/tmp/mpd.fifo
#output = pulsesink server=127.0.0.1
#buffer_time =
[proxy]
@ -78,13 +80,13 @@ enabled = true
#base_dir = /mnt/music/diskstation1/playlists
default_encoding = latin-1
default_extension = .m3u8
#playlists_dir = /mnt/music/diskstation1/playlists
playlists_dir = /mnt/diskstation1/music/playlists
[softwaremixer]
enabled = true
[file]
enabled = true
enabled = false
media_dirs =
/mnt/diskstation1/music|Musique
#$XDG_MUSIC_DIR|Home
@ -106,11 +108,12 @@ excluded_file_extensions =
[local]
enabled = true
library = json
media_dir = /mnt/diskstation1/music
scan_timeout = 1000
scan_flush_threshold = 100
scan_follow_symlinks = false
included_file_extensions =
.flac
excluded_file_extensions =
.directory
.html

View File

@ -1,10 +1,19 @@
########################
# TMux config file #
########################
############################
# _____ __ __ _ ___ __
# |_ _| \/ | | | \ \/ /
# | | | |\/| | | | |\ /
# | | | | | | |_| |/ \
# |_| |_| |_|\___//_/\_\
#
#############################
# Defini le shell par defaut lance par tmux
set-option -g default-shell "/bin/zsh"
#set -g default-command "reattach-to-user-namespace -l zsh"
# tmux display things in 256 colors
set -g default-terminal "tmux-256color"
# Meme hack que sur screen lorsqu'on veut profiter du scroll du terminal (xterm ...)
set -g terminal-overrides 'xterm*:smcup@:rmcup@'
@ -17,54 +26,78 @@ setw -g automatic-rename
# Peut etre utile...
#set -g status-utf8 on
#setw -g utf8 on
# On permet l'utilisation de la souris pour changer de terminal et de panel
#set -g mouse on
#set -g mouse-utf8 on
set -g mouse on
# Défilement
set -g terminal-overrides 'xterm*:smcup@:rmcup@'
# Resizing
setw -g aggressive-resize on
### Binding personnalise
unbind %
set -g prefix C-a
bind C-a send-prefix
bind | split-window -h
bind - split-window -v
bind r source-file ~/.tmux.conf \; display-message "Config reloaded..."
### Bar des statuts
# intervalle d'autoreload
set -g status-interval 2
set-option -g set-titles on
# noms des fenetres au centre de la barre des statuts
set-option -g status-justify centre
set -g status-left-length 30
set -g status-bg black
set -g status-fg white
set -g status-left '#[fg=white]#H'
set -g status-right '#[fg=white]%a %d-%m-%Y %H:%M#[default]'
set-window-option -g window-status-format '#I:#W#F'
set-window-option -g window-status-current-format '#I.#P:#W#F'
set-window-option -g window-status-current-bg black
set-window-option -g window-status-current-fg green
setw -g window-status-attr default
setw -g window-status-fg white
set -g pane-active-border-fg black
set -g pane-active-border-bg green
set -g pane-border-fg white
set -g pane-border-bg black
set -g message-fg red
set -g message-bg black
### Numerotation a partir de 1 pour faciliter l'acces
set -g base-index 1
set-window-option -g pane-base-index 1
### Binding personnalise
unbind %
bind | split-window -h
bind - split-window -v
bind r source-file ~/.tmux.conf \; display-message "Config reloaded..."
### Theme
# Mode
set-option -g mode-style bg=brightblack,fg=default
# Status position
set-option -g status-position bottom
# Status update interval
set-option -g status-interval 5
# Basic status bar colors
set-option -g status-style bg=default,fg=white
# Left side of status bar
set-option -g status-left-length 40
set-option -g status-left "#[fg=brightwhite,bg=brightblack] #S #[fg=default,bg=default] "
# Window status
#set-option -g status-justify center
set-option -g window-status-format "#[fg=white,bg=brightblack] #I #[fg=white,bg=#363636] #W "
set-option -g window-status-current-format "#[fg=brightwhite,bg=green] #I #[fg=brightwhite,bg=blue] #W "
set-option -g window-status-separator " "
# Right side of status bar
set-option -g status-right-length 40
set-option -g status-right " #[fg=brightwhite,bg=#363636] %a %d %b %H:%M #[fg=brightwhite,bg=brightblack] #(whoami)@#h "
# Pane border
set-option -g pane-border-style bg=default,fg=brightblack
set-option -g pane-active-border-style bg=default,fg=white
# Pane number indicator
set-option -g display-panes-colour brightblack
set-option -g display-panes-active-colour brightwhite
# Clock mode
set-option -g clock-mode-colour white
set-option -g clock-mode-style 24
# Message
set-option -g message-style bg=default,fg=red
# source la config de vim
if-shell "test -f ~/.vim/tmuxline.conf" "source ~/.vim/tmuxline.conf"

View File

@ -38,7 +38,7 @@ conky.config = {
draw_outline = false,
draw_shades = false,
use_xft = true,
font = 'Hasklug Medium Nerd Font Complete Mono:size=12',
font = 'Monofur Nerd Font:size=12',
gap_x = 0,
gap_y = 10,
minimum_height = 500,
@ -66,6 +66,6 @@ conky.config = {
}
conky.text = [[
${voffset 10}${color EAEAEA}${font Hasklug Nerd Font Complete:pixelsize=120}${time %H:%M}${font}${voffset 0}${offset 10}${color FFA300}${font Hasklug Medium Nerd Font Complete Mono:pixelsize=42}${time %d} ${voffset 0}${color EAEAEA}${font Hasklug Medium Nerd Font Complete Mono:pixelsize=22}${time %B} ${time %Y}${font}${voffset 10}${font Hasklug Medium Nerd Font Complete Mono:pixelsize=58}${offset -148}${time %A}${font}
${voffset 10}${color EAEAEA}${font Monofurbold Nerd Font:pixelsize=120}${time %H:%M}${font}${voffset 0}${offset 10}${color FFA300}${font Monofur Nerd Font:pixelsize=42}${time %d} ${voffset 0}${color EAEAEA}${font Monofur Nerd Font:pixelsize=22}${time %B} ${time %Y}${font}${voffset 10}${font Monofur Nerd Font:pixelsize=58}${offset -148}${time %A}${font}
${voffset 50}${offset 150}${font Ubuntu:pixelsize=12}${color FFA300}HOME ${offset 9}$color${fs_free /home} / ${fs_size /home}${offset 30}${color FFA300}RAM ${offset 9}$color$mem / $memmax${offset 30}${color FFA300}CPU ${offset 9}$color${cpu cpu0}%
]]

View File

@ -205,7 +205,7 @@
(use-package darkroom-mode
:load-path "elisp/darkroom-mode"
:config
(setq darkroom-mode-face-foreground "Inconsolata 15")
(setq darkroom-mode-face-foreground "Monofur Nerd Font Mono 15")
(setq darkroom-mode-face-size 150)
(setq darkroom-mode-center-margin 150))
@ -232,6 +232,18 @@
:config
(elpy-enable))
;; EMMS
(use-package emms
:ensure t
:config
(emms-all)
(emms-default-players)
(setq emms-source-file-default-directory "/mnt/diskstation1/music/"))
(use-package emms-info-mediainfo
:ensure t)
(use-package emms-state
:ensure t)
;; Exec-path-from-shell
(use-package exec-path-from-shell
; :if (memq window-system '(mac ns))
@ -287,16 +299,25 @@
(eval-after-load "markdown-mode"
'(defalias 'markdown-add-xhtml-header-and-footer 'my-markdown-add-xhtml-header-and-footer))
;; Multiple-cursors
(use-package multiple-cursors
:ensure t
:config
(global-set-key (kbd "C-S-c C-S-c") 'mc/edit-lines)
(global-set-key (kbd "C->") 'mc/mark-next-like-this)
(global-set-key (kbd "C-<") 'mc/mark-previous-like-this)
(global-set-key (kbd "C-c C-<") 'mc/mark-all-like-this))
;; Neotree
(use-package neotree
:ensure t
:config
(setq neo-theme (if (display-graphic-p) 'icons 'arrow))
:init
(unless (package-installed-p 'all-the-icons)
(package-refresh-contents)
(package-install 'all-the-icons)
(all-the-icons-install-fonts))
:config
(setq neo-theme (if (display-graphic-p) 'icons 'arrow)))
(all-the-icons-install-fonts)))
;; Org
(use-package org
@ -553,6 +574,32 @@ With two PREFIX arguments, write out the day and month name."
"Replace text in yasnippet template."
(yas-expand-snippet (buffer-string) (point-min) (point-max)))
;; Cycling between themes
(defun my-theme-set-default () ; Set the first row
(interactive)
(setq theme-current my-color-themes)
(load-theme (car theme-current) t))
(defun my-describe-theme () ; Show the current theme
(interactive)
(message "%s" (car theme-current)))
; Set the next theme (fixed by Chris Webber - tanks)
(defun my-theme-cycle ()
(interactive)
(setq theme-current (cdr theme-current))
(if (null theme-current)
(setq theme-current my-color-themes))
(load-theme (car theme-current) t)
(message "%S" (car theme-current)))
;; Transparency function
;; Set transparency of emacs
(defun transparency (value)
"Sets the transparency of the frame window. 0=transparent/100=opaque"
(interactive "nTransparency Value 0 - 100 opaque:")
(set-frame-parameter (selected-frame) 'alpha value))
;; _ _________ ______ ___ _ _ ____ ___ _ _ ____ ____
@ -566,6 +613,8 @@ With two PREFIX arguments, write out the day and month name."
(global-set-key (kbd "<C-f5>") 'eval-buffer)
;; Distraction-free mode
(global-set-key (kbd "<C-f11>") 'darkroom-mode)
;; Cycling themes
(global-set-key (kbd "<f12>") 'my-theme-cycle)
;; Save-as and switch or not to cloned buffer
(global-set-key (kbd "C-x c") 'my-save-as)
;; Magit status
@ -605,17 +654,54 @@ With two PREFIX arguments, write out the day and month name."
;; |___|_| \_| |_| |_____|_| \_\_|/_/ \_\____|_____|
;;
;; Theme
(use-package alect-themes
:ensure t
:config
(alect-set-color 'dark 'fg "#FFFFFF")
(alect-set-color 'dark 'gray "#A1A8B9")
(alect-set-color 'dark 'bg "#000000")
(alect-set-color 'dark 'bg-1 "#0F1318")
(alect-set-color 'dark 'blue "#81A1C1")
(alect-set-color 'dark 'green "#A3BE8C")
(alect-set-color 'dark 'magenta "#BF616A")
(alect-set-color 'dark 'red "#B48EAD")
(alect-set-color 'dark 'yellow "#EBCB8B")
(setq alect-overriding-faces
'((alect-prompt ((t :foreground blue :weight bold)))
(font-lock-string-face ((t :foreground green-1)))
(font-lock-doc-face ((t :inherit font-lock-string-face)))
(font-lock-comment-face ((t :foreground gray)))
(mode-line-buffer-id ((t :foreground "yellow" :weight bold)))
(mode-line ((((background light))
:foreground fg+1 :background "#ffaaaa"
:box (:line-width 2 :color bg-2 :style nil))
(((background dark))
:foreground fg+1 :background "firebrick3"
:box (:line-width 2 :color bg-2 :style nil)))))))
(use-package arc-dark-theme
:ensure t)
(use-package atom-dark-theme
:ensure t)
(use-package dracula-theme
:ensure t)
(use-package exotica-theme
:ensure t)
(use-package madhat2r-theme
:ensure t)
(use-package melancholy-theme
:ensure t)
(use-package org-beautify-theme
:ensure t)
(use-package sourcerer-theme
:ensure t)
(use-package sublime-themes
:ensure t)
(load-theme 'dracula t)
(setq my-color-themes (list 'alect-dark 'arc-dark 'atom-dark
'dracula 'exotica 'madhat2r
'melancholy 'org-beautify 'sourcerer))
(setq theme-current my-color-themes)
(setq color-theme-is-global nil) ; Initialization
(my-theme-set-default)
;; Set minor modes
(add-hook 'c-mode-hook 'my-enable-minor-modes)
@ -628,10 +714,10 @@ With two PREFIX arguments, write out the day and month name."
(add-hook 'text-mode-hook 'my-enable-minor-modes)
;; Depends on host
(set-frame-font "Inconsolata 12") ;default font if not customized for host
(set-frame-font "Monofur Nerd Font Mono 14") ;default font if not customized for host
(cond
(is-saitama (set-frame-font "Inconsolata 11"))
(is-genos (set-frame-font "Inconsolata 14") ;change font size on laptop
(is-saitama (set-frame-font "Monofur Nerd Font Mono 14"))
(is-genos (set-frame-font "Monofur Nerd Font Mono 14") ;change font size on laptop
(display-battery-mode 1) ;battery status
))

View File

@ -0,0 +1,12 @@
;; This file is automatically generated by the multiple-cursors extension.
;; It keeps track of your preferences for running commands with multiple cursors.
(setq mc/cmds-to-run-for-all
'(
ac-trigger-key-command
my-insert-tab-char
))
(setq mc/cmds-to-run-once
'(
))

4932
emacs/emacs.d/emms/cache Normal file

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1 @@
()

View File

@ -2,15 +2,10 @@
# -*- coding: utf-8 -*-
# Name: `(file-name-nondirectory (buffer-file-name))`
# Author: `user-full-name` <`user-mail-address`>
# Date: `(format-time-string "%x")`
"""
""" $1.
$2.
{Description}
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
@ -24,6 +19,39 @@ this program. If not, see <http://www.gnu.org/licenses/>.
"""
# Generic imports
import os
import sys
# Libs
#import panda as pd
# Own modules
#from {path} import {class}
#from {path} import {function}
__author__ = '`user-full-name`'
__copyright__ = 'Copyright `(format-time-string "%Y")`, `(file-name-nondirectory (buffer-file-name))`'
__credits__ = ['`user-full-name`']
__license__ = 'GPLv3'
__version__ = '{mayor}.{minor}.{rel}'
__maintainer__ = '`user-full-name`'
__email__ = '`user-mail-address`'
__status__ = 'dev'
# Code
$0
def main():
pass
if __name__ == '__main__':
main()

View File

@ -54,7 +54,7 @@ update_check_interval 24
#: available update. The default is to check every 24 hrs, set to zero
#: to disable.
startup_session session_multiple.conf
startup_session session_single.conf
#: Path to a session file to use for all kitty instances. Can be
#: overridden by using the kitty --session command line option for

View File

@ -7,10 +7,10 @@
#: characters.
#:font_family monospace
font_family Hasklug Medium Nerd Font Complete Mono
bold_font Hasklug Bold Nerd Font Complete Mono
italic_font Hasklug Italic Nerd Font Complete Mono
bold_italic_font Hasklug Bold Italic Nerd Font Complete Mono
font_family Monofur Nerd Font Complete Mono
bold_font Monofur Nerd Font Complete Mono Bold
italic_font Monofur Nerd Font Complete Mono Italic
bold_italic_font Monofur Nerd Font Complete Mono Medium Italic
#: You can specify different fonts for the bold/italic/bold-italic
#: variants. To get a full list of supported fonts use the `kitty
@ -24,12 +24,12 @@ bold_italic_font Hasklug Bold Italic Nerd Font Complete Mono
#: italic_font Operator Mono Book Italic
#: bold_italic_font Operator Mono Medium Italic
font_size 11.0
font_size 13.0
#: Font size (in pts)
adjust_line_height 0
adjust_column_width 0
adjust_column_width 1
#: Change the size of each character cell kitty renders. You can use
#: either numbers, which are interpreted as pixels or percentages

View File

@ -2,8 +2,7 @@
#: Session {{{
#
initial_window_width 640
initial_window_height 400
layout tall
#: First tab
cd .

View File

@ -1,2 +1,10 @@
- link:
~/.config/kitty: kitty
- shell:
-
command: echo "\n# completion for kitty" >> $HOME/.oh-my-zsh/custom/zshrc.zsh
-
command: echo "kitty + complete setup zsh | source /dev/stdin" >> $HOME/.oh-my-zsh/custom/zshrc.zsh

36
vim/vim/functions.vim Normal file
View File

@ -0,0 +1,36 @@
"""""""""""""""""""""""""""""""""""""""""""""""""""""""
" _____ _ _ _ _ ____ _____ ___ ___ _ _ ____
" | ___| | | | \ | |/ ___|_ _|_ _/ _ \| \ | / ___|
" | |_ | | | | \| | | | | | | | | | \| \___ \
" | _| | |_| | |\ | |___ | | | | |_| | |\ |___) |
" |_| \___/|_| \_|\____| |_| |___\___/|_| \_|____/
"
"""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Rename current file
function! RenameFile()
let old_name = expand('%')
let new_name = input('New file name: ', expand('%'), 'file')
if new_name != '' && new_name != old_name
exec ':saveas ' . new_name
exec ':silent !rm ' . old_name
redraw!
endif
endfunction
map <leader>n :call RenameFile()<cr>
" Window movement shortcuts
" move to the window in the direction shown, or create a new window
function! WinMove(key)
let t:curwin = winnr()
exec "wincmd ".a:key
if (t:curwin == winnr())
if (match(a:key,'[jk]'))
wincmd v
else
wincmd s
endif
exec "wincmd ".a:key
endif
endfunction

View File

@ -10,23 +10,56 @@
"
" Custom
"
"
" Disable highlights when you press <leader><cr>:
map <silent> <leader><cr> :noh<cr>
"
" Tabs
"
set hidden
nnoremap <silent> <C-w> :tabclose<cr>
nnoremap <silent> <C-t> :tabe<cr>
nnoremap <C-n> :tabnext<cr>
nnoremap <C-p> :tabprevious<cr>
"
" Functions
"
" Renaming
map <leader>rn :call RenameFile()<cr>
" Windows move
map <C-h> :call WinMove('h')<cr>
map <C-j> :call WinMove('j')<cr>
map <C-k> :call WinMove('k')<cr>
map <C-l> :call WinMove('l')<cr>
"
" NERDTree
"
" Trigger configuration
map <f2> :NERDTreeToggle<CR>
map <leader>nb :NERDTreeFromBookmark
map <leader>nf :NERDTreeFind<cr>
"
" UltiSnips
" CtrlP
"
" Trigger configuration. Do not use <tab> if you use https://github.com/Valloric/YouCompleteMe.
let g:UltiSnipsExpandTrigger="<tab>"
let g:UltiSnipsJumpForwardTrigger="<c-b>"
let g:UltiSnipsJumpBackwardTrigger="<c-z>"
map <silent> <C-f> :CtrlPMixed<cr>
"
" DMenu file opening
" Vimroom
"
map <c-t> :call DmenuOpen("tabe")<CR>
map <c-f> :call DmenuOpen("e")<CR>
nnoremap <silent> <leader>z :Goyo<cr>
"
" Vimux
"
map <Leader>vp :VimuxPromptCommand<CR>
map <Leader>vl :VimuxRunLastCommand<CR>
map <Leader>vz :VimuxZoomRunner<CR>

View File

@ -1 +1 @@
1.0.61
1.0.64

View File

@ -1,6 +1,20 @@
if exists('g:loaded_kite') || &cp || v:version < 700
if exists('g:loaded_kite') || &cp
finish
endif
if has('nvim')
if !has('nvim-0.2')
echoerr 'Kite requires Neovim 0.2 or greater'
finish
endif
else
if v:version < 800 || !has('patch-8.0.0027')
echoerr 'Kite requires Vim 8.0.0027 or greater'
finish
endif
endif
let g:loaded_kite = 1

View File

@ -1,11 +1,11 @@
"""""""""""""""""""""""""""""""""""""""""""""""
""""""""""""""""""""""""""""""""""""""""""""""""
" __ _____ __ __ ____ _ _ _ ____
" \ \ / /_ _| \/ | | _ \| | | | | |/ ___|
" \ \ / / | || |\/| | | |_) | | | | | | | _
" \ V / | || | | | | __/| |__| |_| | |_| |
" \_/ |___|_| |_| |_| |_____\___/ \____|
"
"""""""""""""""""""""""""""""""""""""""""""""""
""""""""""""""""""""""""""""""""""""""""""""""""
" Install vim-plug if we don't already have it
if empty(glob('~/.vim/autoload/plug.vim'))
@ -19,25 +19,47 @@ endif
" - Avoid using standard Vim directory names like 'plugin'
call plug#begin('~/.vim/plugged')
Plug 'mhinz/vim-startify'
Plug 'SirVer/ultisnips'
Plug 'honza/vim-snippets'
Plug 'mhinz/vim-startify', { 'branch': 'center' } " Startscreen
Plug 'scrooloose/nerdtree' " File explorer
Plug 'junegunn/fzf.vim'
Plug 'plasticboy/vim-markdown', { 'for': 'markdown' } " Markdown
Plug 'tpope/vim-fugitive' " Git
Plug 'tpope/vim-surround' " Quotes, etc...
Plug 'ryanoasis/vim-devicons' " Icons
Plug 'tpope/vim-commentary' " Commenting
Plug 'amix/open_file_under_cursor.vim' " open file
Plug 'ctrlpvim/ctrlp.vim' " Fzf, buffer
Plug 'dense-analysis/ale' " Linting
Plug 'ap/vim-css-color' " Color display
Plug 'vim-latex/vim-latex' " LaTeX support
" Distraction-free writing
Plug 'junegunn/goyo.vim'
Plug 'junegunn/limelight.vim'
" Tabline
Plug 'itchyny/lightline.vim'
Plug 'ap/vim-buftabline', { 'as': 'buftabline' }
" Tmux
Plug 'edkolev/tmuxline.vim'
Plug 'benmills/vimux'
" Colorschemes
Plug 'kyoz/purify', { 'as': 'purify', 'rtp': 'vim' }
Plug 'flazz/vim-colorschemes'
Plug 'jcherven/jummidark.vim'
Plug 'arzg/vim-colors-xcode'
Plug 'nanotech/jellybeans.vim'
Plug 'jdsimcoe/abstract.vim'
Plug 'rainglow/vim'
Plug 'xero/sourcerer.vim', { 'as': 'sourcerer' }
Plug 'romainl/apprentice', { 'as': 'apprentice' }
Plug 'dracula/vim', { 'as': 'dracula' }
Plug 'sainnhe/edge', { 'as': 'edge' }
Plug 'kyoto-shift/film-noir', { 'as': 'film-noir' }
Plug 'kyoz/purify', { 'as': 'purify', 'rtp': 'vim' }
Plug 'plasticboy/vim-markdown', { 'for': 'markdown' }
Plug 'scrooloose/nerdtree'
Plug 'junegunn/goyo.vim'
Plug 'junegunn/limelight.vim'
Plug 'itchyny/lightline.vim'
Plug 'tpope/vim-fugitive'
Plug 'tpope/vim-surround'
Plug 'decayofmind/vim-lightline-functions'
Plug 'ryanoasis/vim-devicons'
" required !
filetype plugin indent on

View File

@ -1,27 +0,0 @@
"""""""""""""""""""""""""""""""""""""""""""
" ____ ____ ____ ___ ____ _____ ____
" / ___| / ___| _ \|_ _| _ \_ _/ ___|
" \___ \| | | |_) || || |_) || | \___ \
" ___) | |___| _ < | || __/ | | ___) |
:" |____/ \____|_| \_\___|_| |_| |____/
"
"""""""""""""""""""""""""""""""""""""""""""
"
" File opening scripts using DMenu
"
" Strip the newline from the end of a string
function! Chomp(str)
return substitute(a:str, '\n$', '', '')
endfunction
" Find a file and pass it to cmd
function! DmenuOpen(cmd)
let fname = Chomp(system("git ls-files | dmenu -i -l 20 -p " . a:cmd))
if empty(fname)
return
endif
execute a:cmd . " " . fname
endfunction

260
vim/vimrc
View File

@ -1,8 +1,43 @@
""""""""""""""""""""""""""""""""""""""""""""""
"
" ____ _____ _ _ _____ ____ _ _
" / ___| ____| \ | | ____| _ \ / \ | |
"| | _| _| | \| | _| | |_) | / _ \ | |
"| |_| | |___| |\ | |___| _ < / ___ \| |___
" \____|_____|_| \_|_____|_| \_\/_/ \_\_____|
"
"
""""""""""""""""""""""""""""""""""""""""""""""""
set nocompatible " be iMproved, required
filetype off " required
" viminfo configuration
set viminfo='100,n$HOME/.vim/files/info/viminfo
" UTF-8
set encoding=utf8
" Syntax highlighting
syntax on
set synmaxcol=512
"" Set to auto read when a file is changed from the outside
set autoread
"au FocusGained,BufEnter * checktime
" With a map leader it's possible to do extra key combinations
" like <leader>w saves the current file
let mapleader = ","
" Fast saving
nmap <leader>w :w!<cr>
" Allow saving of files as sudo when I forgot to start vim using sudo.
command! W execute 'w !sudo tee % > /dev/null %'
" A buffer becomes hidden when it is abandoned
set hidden
""""""""""""""""""""""""""""""""""""""""""""""""""""""
@ -13,32 +48,64 @@ set viminfo='100,n$HOME/.vim/files/info/viminfo
" |___|_| \_| |_| |_____|_| \_\_|/_/ \_\____|_____|
"
""""""""""""""""""""""""""""""""""""""""""""""""""""""
" UTF-8
set encoding=utf8
" Syntax highlighting
syntax on
set synmaxcol=512
filetype off
" Font config
set guifont=Inconsolata\ Nerd\ Font\ Mono\ 11
" Stop unnecessary rendering
set lazyredraw
"
set linespace=5
" vim tab title
let &titlestring = @%
set title
" Show line numbers
set number
" No line wrapping
set nowrap
" Line wrapping
set wrap
" Allow saving of files as sudo when I forgot to start vim using sudo.
cnoremap w!! w !sudo tee > /dev/null %
" Tab control
set noexpandtab " tabs ftw
set smarttab " tab respects 'tabstop', 'shiftwidth', and 'softtabstop'
set tabstop=4 " the visible width of tabs
set softtabstop=4 " edit as if the tabs are 4 characters wide
set shiftwidth=4 " number of spaces to use for indent and unindent
set shiftround " round indent to a multiple of 'shiftwidth'
" Font config
set guifont=Hasklug\ Nerd\ Font\ Complete\ 11
" Configure backspace so it acts as it should act
set backspace=indent,eol,start
set whichwrap+=<,>,h,l
" Start in insert mode for ALL files
"au BufRead,BufNewFile * startinsert
"startinsert
" Search
set ignorecase " Ignore case when searching
" When searching try to be smart about cases
set smartcase
" Highlight search results
set hlsearch
" Makes search act like search in modern browsers
set incsearch
" Don't redraw while executing macros (good performance config)
set lazyredraw
" For regular expressions turn magic on
set magic
" Auto indent
set ai
" Smart indent
set si
" Disable scrollbars (real hackers don't use scrollbars for navigation!)
set guioptions-=r
set guioptions-=R
set guioptions-=l
set guioptions-=L
@ -50,6 +117,7 @@ set guifont=Hasklug\ Nerd\ Font\ Complete\ 11
" |_| |_____\___/ \____|___|_| \_|____/
"
"""""""""""""""""""""""""""""""""""""""""""
" Installing the Plug plugin manager
source $HOME/.vim/plug.vim
@ -63,7 +131,19 @@ autocmd VimEnter *
\ | endif
" Close vim if the only window left open is a NERDTree
autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif
autocmd BufEnter *
\ if (winnr("$") == 1
\ && exists("b:NERDTree")
\ && b:NERDTree.isTabTree())
\ | q
\ | endif
" If more than one window and previous buffer was NERDTree, go back to it.
autocmd BufEnter *
\ if bufname('#') =~# "^NERD_tree_"
\ && winnr('$') > 1
\ | b#
\ | endif
@ -75,29 +155,13 @@ autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isT
" |____/ |_/_/ \_\_| \___/|____/|_____|___|_| \_|_____|
"
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
set noshowmode
set laststatus=2
if !has('gui_running')
set t_Co=256
endif
let g:lightline = {
\ 'colorscheme': 'jellybeans',
\ 'active': {
\ 'left': [ [ 'mode', 'paste' ],
\ [ 'readonly', 'filename', 'modified' ] ],
\ 'right': [ [ 'lineinfo' ],
\ [ 'percent' ],
\ [ 'fileformat', 'fileencoding', 'filetype', 'kitestatus' ] ],
\ },
\ 'component': {
\ 'readonly': '%{&readonly?"⭤":""}',
\ 'kitestatus': '%{kite#statusline()}',
\ },
\ 'separator': { 'left': '⮀', 'right': '⮂' },
\ 'subseparator': { 'left': '⮁', 'right': '⮃' }
\ }
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
@ -108,7 +172,10 @@ let g:lightline = {
" \____\___/|_____\___/|_| \_\____/ \____|_| |_|_____|_| |_|_____|
"
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
colorscheme purify
let base16colorspace=256 " Access colors present in 256 colorspace"
" set background=dark
colorscheme abstract
@ -121,56 +188,112 @@ colorscheme purify
" |_| |___/ |___/
"
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
"
" Markdown review
"
let vim_markdown_preview_toggle=1
let vim_markdown_preview_toggle=2
let vim_markdown_preview_browser='chromium-browser'
let vim_markdown_preview_browser='x-www-browser'
"
" UltiSnips
" NERDTree
"
if has("python")
let g:UltiSnipsUsePythonVersion = 2
elseif has("python3")
let g:UltiSnipsUsePythonVersion = 3
endif
let g:NERDTreeQuitOnOpen=0 " close NERDTree after a file is opened
"
" Startify
"
let g:startify_custom_header = []
" let g:startify_custom_header = 'startify#center(startify#fortune#cowsay())'
let g:startify_list_order = [
\ [' --------- FICHIERS ---------'],
\ 'files',
\ [' --------- SESSIONS ---------'],
\ 'sessions',
\ [' --------- PROJETS ---------'],
\ 'bookmarks',
\ ]
" let g:startify_session_dir = '~/.vim/session'
let g:startify_enable_special = 0
let g:startify_files_number = 5
" let g:startify_lists = [
" \ { 'type': 'files', 'header': ['RÉCENTS'] },
" \ { 'type': 'sessions', 'header': ['SESSIONS'] },
" \ { 'type': 'bookmarks', 'header': ['MARQUES-PAGES'] },
" \ ]
" projets
let g:startify_bookmarks = [
\ '~/Développement/'
\ ]
" let g:startify_enable_special = 0
" let g:startify_files_number = 5
" let g:startify_bookmarks = [
" \ '~/.vimrc',
" \ '~/.vim/keybindings.vim',
" \ '~/.vim/plug.vim',
" \ '~/.vim/scripts.vim',
" \ '~/Projets/latex/latex-homework'
" \ ]
"""""""""""""""""""""""""""""""""""""""""""
" ____ ____ ____ ___ ____ _____ ____
" / ___| / ___| _ \|_ _| _ \_ _/ ___|
" \___ \| | | |_) || || |_) || | \___ \
" ___) | |___| _ < | || __/ | | ___) |
" |____/ \____|_| \_\___|_| |_| |____/
"
"""""""""""""""""""""""""""""""""""""""""""
" Load scripts from file
source $HOME/.vim/scripts.vim
" Lightline
"
let g:lightline = {
\ 'colorscheme': 'jellybeans',
\ 'active': {
\ 'left': [ [ 'mode', 'paste' ],
\ [ 'readonly', 'filename', 'modified' ] ],
\ 'right': [ [ 'lineinfo' ],
\ [ 'percent' ],
\ [ 'fileformat', 'fileencoding', 'filetype', 'kitestatus' ] ],
\ },
\ 'component': {
\ 'readonly': '%{&readonly?"|":""}',
\ 'kitestatus': '%{kite#statusline()}',
\ },
\ 'component_function': {
\ 'gitbranch': 'FugitiveHead'
\ },
\ 'separator': { 'left': '', 'right': '' },
\ 'subseparator': { 'left': '', 'right': '' }
\ }
"
" Tmuxline
"
let g:tmuxline_preset = {
\'a' : '#S',
\'win' : ['#I', '#W'],
\'cwin' : ['#I', '#W', '#F'],
\'y' : ['%a', '%d', '%b', '%R'],
\'z' : '#H'
\ }
let g:tmuxline_separators = {
\ 'left' : '',
\ 'left_alt': '>',
\ 'right' : '',
\ 'right_alt' : '',
\ 'space' : ' '}
let g:tmuxline_theme = 'jellybeans'
"
" CtrlP
"
let g:ctrlp_map = '<C-f>'
let g:ctrlp_cmd = 'CtrlPMixed'
let g:ctrlp_switch_buffer = 'et'
"
" Vimroom
"
let g:goyo_width=200
let g:goyo_margin_top = 2
let g:goyo_margin_bottom = 2
"""""""""""""""""""""""""""""""""""""""""""""""""""""""
" _____ _ _ _ _ ____ _____ ___ ___ _ _ ____
" | ___| | | | \ | |/ ___|_ _|_ _/ _ \| \ | / ___|
" | |_ | | | | \| | | | | | | | | | \| \___ \
" | _| | |_| | |\ | |___ | | | | |_| | |\ |___) |
" |_| \___/|_| \_|\____| |_| |___\___/|_| \_|____/
"
"
"""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Load fucntions from file
source $HOME/.vim/functions.vim
@ -182,5 +305,6 @@ source $HOME/.vim/scripts.vim
" |_|\_\_____| |_| |____/___|_| \_|____/___|_| \_|\____|____/
"
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Load keybindings from file
source $HOME/.vim/keybindings.vim

View File

@ -1,12 +1,12 @@
! ------------------------------------------------------------------------------
! Theme Configuration
! ------------------------------------------------------------------------------
#include ".Xresources.d/themes/dracula.res"
#include ".Xresources.d/themes/jellybeans.res"
! ------------------------------------------------------------------------------
! ROFI Configuration
! ------------------------------------------------------------------------------
#include ".Xresources.d/rofi/dracula.res"
#include ".Xresources.d/rofi/jellybeans.res"
! ------------------------------------------------------------------------------
! Xft fonts Configuration
@ -55,16 +55,20 @@ ssh-askpass.Indicator.maximumCount: 24
! ------------------------------------------------------------------------------
URxvt.perl-lib: /home/jeff/.urxvt
URxvt*termName: rxvt-color
URxvt*font: xft:Hasklug Term Medium Nerd Font Complete Mono:pixelsize=11:style=medium
URxvt.letterSpace: -1
URxvt*font: xft:Monofur Nerd Font Mono:pixelsize=18:size=13:style=Book
!URxvt.letterSpace: -1
URxvt.depth: 32
URxvt.background: rgba:0000/0000/0200/d800
URxvt.geometry: 80x24+877+462
URxvt.background: rgba:0000/0000/0000/e800
!URxvt*transparent: True
!URxvt*shading: 15
URxvt*scrollBar: False
URxvt.scrollBar_right: False
URxvt.scrollBar_floating: False
URxvt.scrollstyle: rxvt
URxvt.perl-ext-common: default,keyboard-select,url-select,clipboard,tabbed
!URxvt.perl-ext-common: default,keyboard-select,url-select,clipboard,tabbed
URxvt.perl-ext-common: default,keyboard-select,url-select,clipboard
! keyboard-select
URxvt.keysym.M-Escape: perl:keyboard-select:activate
URxvt.keysym.M-s: perl:keyboard-select:search
@ -76,7 +80,9 @@ URxvt.url-select.button: 2
URxvt.url-select.underline: true
!clipboard
URxvt.keysym.M-c: perl:clipboard:copy
URxvt.keysym.I-c: perl:clipboard:copy
URxvt.keysym.M-v: perl:clipboard:paste
URxvt.keysym.I-v: perl:clipboard:paste
URxvt.clipboard.autocopy: true
! tabbed

View File

@ -47,11 +47,11 @@ alias -s asy='asy2png'
# Directories
hash -d crs="$HOME/Cours"
hash -d dev="$HOME/Développement"
hash -d dld="$HOME/Téléchargements"
hash -d doc="$HOME/Documents"
hash -d vid="$HOME/Vidéos"
hash -d dot="$HOME/Dotfiles"
hash -d prj="$HOME/Projets"
hash -d dld="$HOME/Téléchargements"
hash -d vid="$HOME/Vidéos"
# Editors
#alias vim="nvim"

View File

@ -5,3 +5,10 @@ function gi() { curl -L -s https://www.gitignore.io/api/$@ ;}
# completion for kitty
kitty + complete setup zsh | source /dev/stdin
# pass
compdef _pass workpass
zstyle ':completion::complete:workpass::' prefix "$HOME/Private/.password-store"
workpass() {
PASSWORD_STORE_DIR=$HOME/Private/.password-store pass $@
}

View File

@ -18,7 +18,11 @@ export NVM_DIR="$HOME/nvm"
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
# environment variables
# export TERM=tmux-256color
export EDITOR=vim
export XDG_CURRENT_DESKTOP=
export DESKTOP_SESSION=
export RANGER_LOAD_DEFAULT_RC=False
export PASSWORD_STORE_DIR="$HOME/Private/.password-store"
export PASSWORD_STORE_ENABLE_EXTENSIONS=True
#export XDG_DATA_DIRS="/home/jeff/.local/share/flatpak/exports/share:/var/lib/flatpak/exports/share:$XDG_DATA_DIRS"

View File

@ -1,3 +1,17 @@
if [[ $DISPLAY ]]; then
# If not running interactively, do not do anything
[[ $- != *i* ]] && return
if which tmux >/dev/null 2>&1; then
# if no session is started, start a new session
test -z ${TMUX} && tmux
# when quitting tmux, try to attach
while test -z ${TMUX}; do
tmux attach || break
done
fi
fi
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
@ -65,6 +79,7 @@ plugins=(
gitignore
my_debian
my_helpers
pass
sudo
)
@ -115,3 +130,5 @@ fi
unset __conda_setup
# <<< conda initialize <<<
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh