This commit is contained in:
Geoffrey Frogeye 2018-07-10 14:50:07 +02:00
parent 4f5005aaad
commit 16f9814d64
9 changed files with 48 additions and 20 deletions

View file

@ -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

View file

@ -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 "$@"

View file

@ -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

View file

@ -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"

View file

@ -9,4 +9,4 @@
[ -f "$HOME/.config/linuxColors.sh" ] && . "$HOME/.config/linuxColors.sh"
# Bashrc
[ -f ~/.bashrc ] && . ~/.bashrc
[ -f ~/.bashrc ] && source ~/.bashrc

View file

@ -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

View file

@ -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)

View file

@ -1,3 +1,3 @@
#!/usr/bin/env bash
echo ssh "$1" date --set="'$(date -R)'"
echo ssh "$1" sudo date --set="'$(date -R)'"

31
vimrc
View file

@ -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 <F3> :Autoformat<CR>
""" 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:<CR>
nmap gS :History/<CR>
nmap gs :Snippets<CR>
" 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 = "<c-n>" " Go down when completing
let g:SuperTabContextDefaultCompletionType = "<c-n>"
""" 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 <Esc>
imap <Esc>
vmap <Enter> <Esc>
nmap <Enter> o<Esc>
nmap <C-H> :bp<CR>