From 16f9814d64e15bdfcf0a4bf7a29dfedb45d64074 Mon Sep 17 00:00:00 2001 From: Geoffrey Frogeye Date: Tue, 10 Jul 2018 14:50:07 +0200 Subject: [PATCH] ouyeah --- config/i3/config | 7 ++----- config/i3/dmenu_cmd | 2 +- config/i3/sshmenu | 2 +- config/vdirsyncer/config | 2 ++ profile | 2 +- scripts/install-prefs | 3 +++ scripts/updateCompressedMusic | 17 ++++++++++++----- scripts/updatedate | 2 +- vimrc | 31 +++++++++++++++++++++++++------ 9 files changed, 48 insertions(+), 20 deletions(-) diff --git a/config/i3/config b/config/i3/config index 94f97fa..35fb8d2 100644 --- a/config/i3/config +++ b/config/i3/config @@ -144,19 +144,14 @@ set $WS10 10 # Workspace output workspace "$WS1" output LVDS1 workspace "$WS2" output VGA1 -workspace "$WS2" output HDMI1 workspace "$WS3" output LVDS1 workspace "$WS4" output VGA1 -workspace "$WS4" output HDMI1 workspace "$WS5" output LVDS1 workspace "$WS6" output VGA1 -workspace "$WS6" output HDMI1 workspace "$WS7" output LVDS1 workspace "$WS8" output VGA1 -workspace "$WS8" output HDMI1 workspace "$WS9" output LVDS1 workspace "$WS10" output VGA1 -workspace "$WS10" output HDMI1 # switch to workspace bindsym $mod+1 workspace $WS1 @@ -244,6 +239,8 @@ for_window [class="qutebrowser"] layout tabbed for_window [window_role="pop-up"] floating enable for_window [window_role="task_dialog"] floating enable +for_window [ title="^pdfpc.*" window_role="presenter" ] move to output left, fullscreen +for_window [ title="^pdfpc.*" window_role="presentation" ] move to output right, fullscreen # switch to workspace with urgent window automatically for_window [urgent=latest] focus diff --git a/config/i3/dmenu_cmd b/config/i3/dmenu_cmd index a0d3180..2806540 100755 --- a/config/i3/dmenu_cmd +++ b/config/i3/dmenu_cmd @@ -1,2 +1,2 @@ #!/bin/sh -dmenu -fn 'DejaVu Sans Mono-10' -nb '#48483e' -nf '#f1ebeb' -sb '#8fc029' -sf '#272822' -l 8 -f "$@" +dmenu -fn 'DejaVu Sans Mono-10' -nb '#48483e' -nf '#f1ebeb' -sb '#8fc029' -sf '#272822' -i -l 8 -f "$@" diff --git a/config/i3/sshmenu b/config/i3/sshmenu index 7b3fdc5..e306c40 100755 --- a/config/i3/sshmenu +++ b/config/i3/sshmenu @@ -5,5 +5,5 @@ if [ "$1" == 'root' ]; then fi machine=$(cat ~/.ssh/config | grep '^Host ' | cut -d ' ' -f 2 | grep -v '*' | sort | $HOME/.config/i3/dmenu_cmd -p "SSH$a to ") if [ ! -z $machine ]; then - xterm -e "ssh $machine $b" + urxvtc -e ssh $machine $b fi diff --git a/config/vdirsyncer/config b/config/vdirsyncer/config index 148fa0e..7ef5e40 100644 --- a/config/vdirsyncer/config +++ b/config/vdirsyncer/config @@ -55,6 +55,8 @@ collections = ["from a", "from b"] # Calendars also have a color property metadata = ["displayname", "color"] +# conflict_resolution = "a wins" +# conflict_resolution = "b wins" [storage geoffrey_calendar_local] type = "filesystem" diff --git a/profile b/profile index 4de32f2..614b95f 100644 --- a/profile +++ b/profile @@ -9,4 +9,4 @@ [ -f "$HOME/.config/linuxColors.sh" ] && . "$HOME/.config/linuxColors.sh" # Bashrc -[ -f ~/.bashrc ] && . ~/.bashrc +[ -f ~/.bashrc ] && source ~/.bashrc diff --git a/scripts/install-prefs b/scripts/install-prefs index dac24f8..055cc90 100755 --- a/scripts/install-prefs +++ b/scripts/install-prefs @@ -244,6 +244,9 @@ if [ $GUI == 1 ]; then inst debhelper cmake libxcb-icccm4-dev libxcb-image0-dev libxcb-randr0-dev libx11-dev libxcb1-dev libxcb-util-dev libx11-xcb-dev linux-libc-dev libboost-dev x11proto-core-dev libxcb-ewmh-dev libxft-dev libasound2-dev libiw-dev libmpdclient-dev xcb-proto python-xcbgen libxcb-xkb-dev i3-wm libcairo2-dev libxcb-xrm-dev # TODO Figure which one are really needed #inst libasound2 libc6 libgcc1 libiw30 libmpdclient2 libstdc++6 libx11-6 libx11-xcb1 libxcb-ewmh2 libxcb-icccm4 libxcb-randr0 libxcb-xkb1 libxcb1 libxft2 + # ↓ really needed + inst libcairo2-dev libxcb-xkb-dev libxcb-randr0-dev xcb-proto libxcb-image0-dev libxcb-icccm4-dev libxcb-ewmh-dev libxcb-util0-dev python-xcbgen + TMP=$(mktemp -d) git clone --branch 3.0.5 --recursive https://github.com/jaagr/polybar $TMP mkdir $TMP/build diff --git a/scripts/updateCompressedMusic b/scripts/updateCompressedMusic index e4aefce..543151e 100755 --- a/scripts/updateCompressedMusic +++ b/scripts/updateCompressedMusic @@ -7,7 +7,7 @@ import subprocess # Constants SOURCE_FOLDER = os.path.join(os.path.expanduser("~"), "Musique") OUTPUT_FOLDER = os.path.join(os.path.expanduser("~"), ".MusiqueCompressed") -CONVERSIONS = {"flac": "m4a"} +CONVERSIONS = {"flac": "opus"} FORBIDDEN_EXTENSIONS = ["jpg", "pdf", "ffs_db"] FORGIVEN_FILENAMES = ["cover.jpg"] IGNORED_EMPTY_FOLDER = [".stfolder"] @@ -31,6 +31,7 @@ for root, dirs, files in os.walk(OUTPUT_FOLDER): remainingConversions = dict() extraFiles = list(outputFiles.keys()) + def convertPath(path): filename, extension = os.path.splitext(path) extension = extension[1:].lower() @@ -48,6 +49,7 @@ def convertPath(path): # In all other case, this is a simple copy return path + for sourceFile in sourceFiles: outputFile = convertPath(sourceFile) # If the file should not be converted, do nothing @@ -56,7 +58,8 @@ for sourceFile in sourceFiles: # If the file already has something as an output elif outputFile in outputFiles: extraFiles.remove(outputFile) - # If the output file is newer than the source file, do not initiate a conversion + # If the output file is newer than the source file, do not initiate a + # conversion if outputFiles[outputFile] >= sourceFiles[sourceFile]: continue # If the file needs to be converted, do it @@ -76,13 +79,19 @@ for sourceFile in remainingConversions: print(fullSourceFile, "→", fullOutputFile) if sourceFile == outputFile: # shutil.copy(fullSourceFile, fullOutputFile) + if os.path.isfile(fullOutputFile): + os.remove(fullOutputFile) os.link(fullSourceFile, fullOutputFile) else: - subprocess.run(["ffmpeg", "-y", "-i", fullSourceFile, "-codec:a", "libfdk_aac", "-cutoff", "18000", "-movflags", "+faststart", "-vbr", "5", fullOutputFile]) + subprocess.run( + ["ffmpeg", "-y", "-i", fullSourceFile, "-c:a", "libopus", + "-movflags", "+faststart", "-b:a", "128k", "-vbr", "on", + "-compression_level", "10", fullOutputFile]) # Removing extra files for extraFile in extraFiles: fullExtraFile = os.path.join(OUTPUT_FOLDER, extraFile) + print("×", fullExtraFile) os.remove(fullExtraFile) # Removing empty dirs @@ -91,5 +100,3 @@ for root, dirs, files in os.walk(OUTPUT_FOLDER): dirBasename = os.path.basename(root) if dirBasename not in IGNORED_EMPTY_FOLDER: os.rmdir(root) - - diff --git a/scripts/updatedate b/scripts/updatedate index 7339128..c2d01c3 100755 --- a/scripts/updatedate +++ b/scripts/updatedate @@ -1,3 +1,3 @@ #!/usr/bin/env bash -echo ssh "$1" date --set="'$(date -R)'" +echo ssh "$1" sudo date --set="'$(date -R)'" diff --git a/vimrc b/vimrc index 184db61..6908367 100644 --- a/vimrc +++ b/vimrc @@ -23,10 +23,10 @@ call plug#begin() " Plug 'L9' " Plug 'rstacruz/sparkup', {'rtp': 'vim/'} Plug 'tomasr/molokai' -" Plug 'tpope/vim-surround' +Plug 'tpope/vim-surround' " Plug 'tpope/vim-fugitive' " Plug 'tpope/vim-repeat' -" Plug 'tpope/tpope-vim-abolish' +Plug 'tpope/tpope-vim-abolish' Plug 'vim-airline/vim-airline' Plug 'vim-airline/vim-airline-themes' Plug 'airblade/vim-gitgutter' @@ -34,7 +34,7 @@ Plug 'mbbill/undotree' Plug 'xolox/vim-misc' " Required for 'xolox/vim-easytags' Plug 'xolox/vim-easytags' Plug 'majutsushi/tagbar' -" Plug 'wellle/targets.vim' +Plug 'wellle/targets.vim' Plug 'Chiel92/vim-autoformat' Plug 'tomtom/tcomment_vim' " Plug 'Shougo/denite.nvim' @@ -45,6 +45,8 @@ Plug 'maralla/completor.vim' Plug 'python-mode/python-mode', { 'branch': 'develop' } Plug 'junegunn/fzf', {'do': './install --bin'} Plug 'junegunn/fzf.vim' +Plug 'ervandew/supertab' +Plug 'dpelle/vim-LanguageTool' call plug#end() @@ -74,10 +76,13 @@ nmap :Autoformat """ PYMODE """ -" let g:pymode_lint_ignore = ["C901"] - +let g:pymode_lint_ignore = ["W0401"] let g:pymode_lint_cwindow = 0 +" TODO Even with magic pymod_motion complains about the option `magic&` being not set :/ +let g:pymode_motion = 0 +set magic + """ FZF """ let g:fzf_layout = { 'down': '~100%' } @@ -110,6 +115,18 @@ nmap gH :History: nmap gS :History/ nmap gs :Snippets +" TODO `gd` → go to tag matching selected word, or show a list with that +" of tags pre-filtered with that word + +""" SUPERTAB """ + +let g:SuperTabDefaultCompletionType = "" " Go down when completing +let g:SuperTabContextDefaultCompletionType = "" + +""" LanguageTool """ + +let g:languagetool_jar = "/usr/share/java/languagetool/languagetool-commandline.jar" + """ VIM SETTINGS """ @@ -143,6 +160,8 @@ set updatetime=250 set cursorcolumn +set splitbelow + syntax enable set background=dark @@ -180,7 +199,7 @@ endif cmap w!! w !sudo tee > /dev/null % imap jk -imap mù +vmap nmap o nmap :bp