Ajout conf fish et mise à jour du reste

This commit is contained in:
Breizh 2019-01-30 22:34:10 +01:00
parent 50af322892
commit 13c97134cc
29 changed files with 375 additions and 8 deletions

View file

@ -56,7 +56,7 @@ Xautolock.locker: i3lock-wrapper -e
XTerm*reverseVideo: on
XTerm*selectToClipboard: true
URxvt.font: xft:IBM Plex Mono:size=10,DejaVu Sans Mono
URxvt.font: xft:IBM Plex Mono:size=10,xft:DejaVu Sans Mono:size=10
!URxvt.font: xft:xos4 Terminus,xft:DejaVu Sans Mono,xft:Noto Sans
!URxvt.font: xft:Fira Mono,xft:DejaVu Sans Mono,xft:Noto Sans
!URxvt.font: xft:Latin Modern Mono:size=12, xft:xos4 Terminus, xft:DejaVu Sans Mono

View file

@ -29,7 +29,7 @@
# the top and down respectively.
# The width can be negative. In this case the actual width is the
# screen width minus the width defined in within the geometry option.
geometry = "1860x5-30+20"
geometry = "1122x5-30+20"
# Show how many messages are currently hidden (because of geometry).
indicate_hidden = yes

View file

@ -0,0 +1 @@
fisher --complete

View file

@ -0,0 +1,118 @@
#!/usr/bin/env fish
# Copyright (C) 2012-2014 Dmitry Medvinsky <me@dmedvinsky.name>. All Rights Reserved.
# This file is licensed under the GPLv2+. Please see COPYING for more information.
set PROG 'pass'
function __fish_pass_get_prefix
set -l prefix "$PASSWORD_STORE_DIR"
if [ -z "$prefix" ]
set prefix "$HOME/.password-store"
end
echo "$prefix"
end
function __fish_pass_needs_command
set -l cmd (commandline -opc)
if [ (count $cmd) -eq 1 -a $cmd[1] = $PROG ]
return 0
end
return 1
end
function __fish_pass_uses_command
set cmd (commandline -opc)
if [ (count $cmd) -gt 1 ]
if [ $argv[1] = $cmd[2] ]
return 0
end
end
return 1
end
function __fish_pass_print_gpg_keys
gpg2 --list-keys | grep uid | sed 's/.*<\(.*\)>/\1/'
end
function __fish_pass_print_entry_dirs
set -l prefix (__fish_pass_get_prefix)
set -l dirs
eval "set dirs "$prefix"/**/"
for dir in $dirs
set entry (echo "$dir" | sed "s#$prefix/\(.*\)#\1#")
echo "$entry"
end
end
function __fish_pass_print_entries
set -l prefix (__fish_pass_get_prefix)
set -l files
eval "set files "$prefix"/**.gpg"
for file in $files
set file (echo "$file" | sed "s#$prefix/\(.*\)\.gpg#\1#")
echo "$file"
end
end
function __fish_pass_print_entries_and_dirs
__fish_pass_print_entry_dirs
__fish_pass_print_entries
end
complete -c $PROG -e
complete -c $PROG -f -A -n '__fish_pass_needs_command' -a help -d 'Command: show usage help'
complete -c $PROG -f -A -n '__fish_pass_needs_command' -a version -d 'Command: show program version'
complete -c $PROG -f -A -n '__fish_pass_needs_command' -a init -d 'Command: initialize new password storage'
complete -c $PROG -f -A -n '__fish_pass_uses_command init' -s p -l path -d 'Assign gpg-id for specified sub folder of password store'
complete -c $PROG -f -A -n '__fish_pass_needs_command' -a ls -d 'Command: list passwords'
complete -c $PROG -f -A -n '__fish_pass_uses_command ls' -a "(__fish_pass_print_entry_dirs)"
complete -c $PROG -f -A -n '__fish_pass_needs_command' -a insert -d 'Command: insert new password'
complete -c $PROG -f -A -n '__fish_pass_uses_command insert' -s e -l echo -d 'Echo the password on console'
complete -c $PROG -f -A -n '__fish_pass_uses_command insert' -s m -l multiline -d 'Provide multiline password entry'
complete -c $PROG -f -A -n '__fish_pass_uses_command insert' -s f -l force -d 'Do not prompt before overwritting'
complete -c $PROG -f -A -n '__fish_pass_uses_command insert' -a "(__fish_pass_print_entry_dirs)"
complete -c $PROG -f -A -n '__fish_pass_needs_command' -a generate -d 'Command: generate new password'
complete -c $PROG -f -A -n '__fish_pass_uses_command generate' -s n -l no-symbols -d 'Do not use special symbols'
complete -c $PROG -f -A -n '__fish_pass_uses_command generate' -s c -l clip -d 'Put the password in clipboard'
complete -c $PROG -f -A -n '__fish_pass_uses_command generate' -s f -l force -d 'Do not prompt before overwritting'
complete -c $PROG -f -A -n '__fish_pass_uses_command generate' -s i -l in-place -d 'Replace only the first line with the generated password'
complete -c $PROG -f -A -n '__fish_pass_uses_command generate' -a "(__fish_pass_print_entry_dirs)"
complete -c $PROG -f -A -n '__fish_pass_needs_command' -a mv -d 'Command: rename existing password'
complete -c $PROG -f -A -n '__fish_pass_uses_command mv' -s f -l force -d 'Force rename'
complete -c $PROG -f -A -n '__fish_pass_uses_command mv' -a "(__fish_pass_print_entries_and_dirs)"
complete -c $PROG -f -A -n '__fish_pass_needs_command' -a cp -d 'Command: copy existing password'
complete -c $PROG -f -A -n '__fish_pass_uses_command cp' -s f -l force -d 'Force copy'
complete -c $PROG -f -A -n '__fish_pass_uses_command cp' -a "(__fish_pass_print_entries_and_dirs)"
complete -c $PROG -f -A -n '__fish_pass_needs_command' -a rm -d 'Command: remove existing password'
complete -c $PROG -f -A -n '__fish_pass_uses_command rm' -s r -l recursive -d 'Remove password groups recursively'
complete -c $PROG -f -A -n '__fish_pass_uses_command rm' -s f -l force -d 'Force removal'
complete -c $PROG -f -A -n '__fish_pass_uses_command rm' -a "(__fish_pass_print_entries_and_dirs)"
complete -c $PROG -f -A -n '__fish_pass_needs_command' -a edit -d 'Command: edit password using text editor'
complete -c $PROG -f -A -n '__fish_pass_uses_command edit' -a "(__fish_pass_print_entries)"
complete -c $PROG -f -A -n '__fish_pass_needs_command' -a show -d 'Command: show existing password'
complete -c $PROG -f -A -n '__fish_pass_uses_command show' -s c -l clip -d 'Put password in clipboard'
complete -c $PROG -f -A -n '__fish_pass_uses_command show' -a "(__fish_pass_print_entries)"
# When no command is given, `show` is defaulted.
complete -c $PROG -f -A -n '__fish_pass_needs_command' -s c -l clip -d 'Put password in clipboard'
complete -c $PROG -f -A -n '__fish_pass_needs_command' -a "(__fish_pass_print_entries)"
complete -c $PROG -f -A -n '__fish_pass_uses_command -c' -a "(__fish_pass_print_entries)"
complete -c $PROG -f -A -n '__fish_pass_uses_command --clip' -a "(__fish_pass_print_entries)"
complete -c $PROG -f -A -n '__fish_pass_needs_command' -a git -d 'Command: execute a git command'
complete -c $PROG -f -A -n '__fish_pass_uses_command git' -a 'init' -d 'Initialize git repository'
complete -c $PROG -f -A -n '__fish_pass_uses_command git' -a 'status' -d 'Show status of the repo'
complete -c $PROG -f -A -n '__fish_pass_uses_command git' -a 'add' -d 'Add changes to the index'
complete -c $PROG -f -A -n '__fish_pass_uses_command git' -a 'commit' -d 'Commit changes to the repo'
complete -c $PROG -f -A -n '__fish_pass_uses_command git' -a 'push' -d 'Push changes to remote repo'
complete -c $PROG -f -A -n '__fish_pass_uses_command git' -a 'pull' -d 'Pull changes from remote repo'
complete -c $PROG -f -A -n '__fish_pass_uses_command git' -a 'log' -d 'View changelog'
complete -c $PROG -f -A -n '__fish_pass_needs_command' -a find -d 'Command: find a password file or directory matching pattern'
complete -c $PROG -f -A -n '__fish_pass_needs_command' -a grep -d 'Command: search inside of decrypted password files for matching pattern'

91
.config/fish/config.fish Normal file
View file

@ -0,0 +1,91 @@
set fish_greeting
set -g theme_display_virtualenv no
set -g theme_display_ruby no
set -g fish_prompt_pwd_dir_length 0
set base00 2D2D2D
set base01 393939
set base02 515151
set base03 747369
set base04 A09F93
set base05 D3D0C8
set base06 E8E6DF
set base07 F2F0EC
set base08 F2777A
set base09 F99157
set base0A FFCC66
set base0B 99CC99
set base0C 66CCCC
set base0D 6699CC
set base0E CC99CC
set base0F D27B53
#if status --is-interactive
source $HOME/.config/base16-shell/profile_helper.fish
#end
function colortest
~/.config/base16-shell/colortest base16-$argv[1].sh
end
function config
git --git-dir $HOME/.myconf --work-tree $HOME $argv
end
function pdf_comp
pandoc -o $argv.pdf $argv.md
zathura $argv.pdf &
while true
inotifywait -e modify $argv.md
pandoc -o $argv.pdf $argv.md
or notify-send "pandoc" "Erreur de compilation"
end
end
function dot_comp
dot -Tps2 $argv.dot | epstopdf --filter -o=$argv.pdf
zathura $argv.pdf &
while true
inotifywait -e modify $argv.dot
dot -Tps2 $argv.dot | epstopdf --filter -o=$argv.pdf
or notify-send "dot" "Erreur de compilation"
end
end
function su
/usr/bin/su --shell /usr/bin/fish $argv
end
function send_image
scp "$argv" breizh.me:/srv/files/Images/
end
function ranger
set tempfile (mktemp -t tmp.XXXXXX)
if test -n "$argv"
set argv $PWD
end
/usr/bin/ranger --choosedir="$tempfile" $argv
test -f $tempfile
and if test (cat "$tempfile") != (echo -n (pwd))
cd (cat $tempfile)
end
rm -f -- "$tempfile"
end
function rm
/usr/bin/rm -vI $argv
end
function arch-vm-install
echo "type \"boot tftp://10.0.2.2/archlinux.ipxe\""
qemu-system-x86_64 -enable-kvm -m 2G -hda VMs/arch_linux -netdev user,id=mynet0,tftp=Téléchargements/,bootfile=ipxe.pxe -device e1000,netdev=mynet0 -boot n;
end
function arch-vm-start
qemu-system-x86_64 -enable-kvm -m 2G -hda VMs/arch_linux -netdev user,id=mynet0 -device e1000,netdev=mynet0;
end
abbr sa ssh-add

View file

@ -0,0 +1,39 @@
# This file contains fish universal variable definitions.
# VERSION: 3.0
SETUVAR __fish_classic_git_prompt_initialized:\x1d
SETUVAR __fish_init_2_39_8:\x1d
SETUVAR __fish_init_2_3_0:\x1d
SETUVAR _fish_abbr_sa:ssh\x2dadd
SETUVAR _fish_abbr_up:yay\x20\x2dSyu
SETUVAR fish_color_autosuggestion:555\x1ebrblack
SETUVAR fish_color_cancel:\x2dr
SETUVAR fish_color_command:\x2d\x2dbold
SETUVAR fish_color_comment:red
SETUVAR fish_color_cwd:green
SETUVAR fish_color_cwd_root:red
SETUVAR fish_color_end:brmagenta
SETUVAR fish_color_error:brred
SETUVAR fish_color_escape:bryellow\x1e\x2d\x2dbold
SETUVAR fish_color_history_current:\x2d\x2dbold
SETUVAR fish_color_host:normal
SETUVAR fish_color_match:\x2d\x2dbackground\x3dbrblue
SETUVAR fish_color_normal:normal
SETUVAR fish_color_operator:bryellow
SETUVAR fish_color_param:cyan
SETUVAR fish_color_quote:yellow
SETUVAR fish_color_redirection:brblue
SETUVAR fish_color_search_match:bryellow\x1e\x2d\x2dbackground\x3dbrblack
SETUVAR fish_color_selection:white\x1e\x2d\x2dbold\x1e\x2d\x2dbackground\x3dbrblack
SETUVAR fish_color_status:red
SETUVAR fish_color_user:brgreen
SETUVAR fish_color_valid_path:\x2d\x2dunderline
SETUVAR fish_greeting:\x1d
SETUVAR fish_key_bindings:fish_default_key_bindings
SETUVAR fish_pager_color_completion:\x1d
SETUVAR fish_pager_color_description:B3A06D\x1eyellow
SETUVAR fish_pager_color_prefix:white\x1e\x2d\x2dbold\x1e\x2d\x2dunderline
SETUVAR fish_pager_color_progress:brwhite\x1e\x2d\x2dbackground\x3dcyan
SETUVAR fish_prompt_pwd_dir_length:0
SETUVAR fish_user_abbreviations:sa\x20ssh\x2dadd\x1eup\x20yay\x20\x2dSyu
SETUVAR fisher_active_prompt:lambda
SETUVAR fisher_dependency_count:await\x1egetopts\x1etransfer\x1etermcolours\x1elast_job_id\x1elambda\x1ehumanize_duration

View file

@ -0,0 +1,37 @@
# This file is automatically generated by the fish.
# Do NOT edit it directly, your changes will be overwritten.
SET __fish_classic_git_prompt_initialized:\x1d
SET __fish_init_2_39_8:\x1d
SET __fish_init_2_3_0:\x1d
SET fish_color_autosuggestion:555\x1ebrblack
SET fish_color_cancel:\x2dr
SET fish_color_command:\x2d\x2dbold
SET fish_color_comment:red
SET fish_color_cwd:green
SET fish_color_cwd_root:red
SET fish_color_end:brmagenta
SET fish_color_error:brred
SET fish_color_escape:bryellow\x1e\x2d\x2dbold
SET fish_color_history_current:\x2d\x2dbold
SET fish_color_host:normal
SET fish_color_match:\x2d\x2dbackground\x3dbrblue
SET fish_color_normal:normal
SET fish_color_operator:bryellow
SET fish_color_param:cyan
SET fish_color_quote:yellow
SET fish_color_redirection:brblue
SET fish_color_search_match:bryellow\x1e\x2d\x2dbackground\x3dbrblack
SET fish_color_selection:white\x1e\x2d\x2dbold\x1e\x2d\x2dbackground\x3dbrblack
SET fish_color_status:red
SET fish_color_user:brgreen
SET fish_color_valid_path:\x2d\x2dunderline
SET fish_greeting:\x1d
SET fish_key_bindings:fish_default_key_bindings
SET fish_pager_color_completion:\x1d
SET fish_pager_color_description:B3A06D\x1eyellow
SET fish_pager_color_prefix:white\x1e\x2d\x2dbold\x1e\x2d\x2dunderline
SET fish_pager_color_progress:brwhite\x1e\x2d\x2dbackground\x3dcyan
SET fish_prompt_pwd_dir_length:0
SET fish_user_abbreviations:sa\x20ssh\x2dadd\x1eup\x20yay\x20\x2dSyu
SET fisher_active_prompt:lambda
SET fisher_dependency_count:await\x1egetopts\x1etransfer\x1etermcolours\x1elast_job_id\x1elambda\x1ehumanize_duration

7
.config/fish/fishfile Normal file
View file

@ -0,0 +1,7 @@
fisherman/await
fisherman/getopts
fisherman/humanize_duration
hasanozgan/theme-lambda
fisherman/last_job_id
fisherman/termcolours
fisherman/transfer

View file

@ -0,0 +1 @@
/home/breizh/.config/fisherman/await/functions/await.fish

View file

@ -0,0 +1,4 @@
# Defined in - @ line 0
function dclock --description 'alias dclock dclock -miltime -fg red -led_off black -seconds -scroll -notails &; disown; exit'
command dclock -miltime -fg red -led_off black -scroll -notails &; disown; exit $argv;
end

View file

@ -0,0 +1 @@
/home/breizh/.config/fisherman/lambda/fish_prompt.fish

View file

@ -0,0 +1 @@
/home/breizh/.config/fisherman/lambda/fish_right_prompt.fish

View file

@ -0,0 +1 @@
/home/breizh/.config/fisherman/getopts/getopts.fish

View file

@ -0,0 +1 @@
/home/breizh/.config/fisherman/humanize_duration/humanize_duration.fish

View file

@ -0,0 +1,3 @@
function l --description 'alias l=ls -lAh'
exa -lahb $argv
end

View file

@ -0,0 +1 @@
/home/breizh/.config/fisherman/last_job_id/last_job_id.fish

View file

@ -0,0 +1,8 @@
function latex_comp
zathura $argv[1].pdf &
while true
inotifywait -e modify $argv[1].tex
make
or notify-send "Make" "Erreur de compilation"
end
end

View file

@ -0,0 +1,13 @@
function man
set -x LESS_TERMCAP_mb (tput blink)
set -x LESS_TERMCAP_md (tput bold)(tput setaf 1)
set -x LESS_TERMCAP_me (tput sgr0)
set -x LESS_TERMCAP_so (tput smso)
set -x LESS_TERMCAP_se (tput rmso)
set -x LESS_TERMCAP_us (tput sitm)(tput setaf 2)
set -x LESS_TERMCAP_ue (tput sgr0)
set -x MANWIDTH (tput cols)
test $MANWIDTH -gt 80; and set -x MANWIDTH 80
/usr/bin/man $argv
end

View file

@ -0,0 +1,4 @@
# Defined in - @ line 0
function mutt-breizh --description 'alias mutt-breizh mutt -F .mutt/muttrc_breizh'
mutt -F .mutt/muttrc_breizh $argv;
end

View file

@ -0,0 +1,4 @@
# Defined in - @ line 0
function pifs --description 'alias pifs πfs'
πfs $argv;
end

View file

@ -0,0 +1,4 @@
# Defined in - @ line 0
function powershell --description 'alias powershell pwsh'
pwsh $argv;
end

View file

@ -0,0 +1,6 @@
# Defined in - @ line 0
function rtorrent --description 'alias rtorrent tmux -L rt attach -t rt'
stty stop undef
stty start undef
tmux -L rt attach -t rt $argv;
end

View file

@ -0,0 +1 @@
/home/breizh/.config/fisherman/termcolours/termcolours.fish

View file

@ -0,0 +1 @@
/home/breizh/.config/fisherman/transfer/transfer.fish

View file

@ -1,7 +1,7 @@
# Beware! This file is rewritten by htop when settings are changed in the interface.
# The parser is also very primitive, and not human-friendly.
fields=0 48 17 18 38 39 40 2 46 47 49 1
sort_key=47
fields=0 17 18 48 49 38 39 113 111 46 47 2 1
sort_key=113
sort_direction=1
hide_threads=0
hide_kernel_threads=1

View file

@ -52,7 +52,7 @@ bindsym $mod+n border normal 1
# is used in the bar {} block below.
# font xft:xos4 Terminus
# font xft:Linux Biolinum 11
font xft:IBM Plex Sans 10
font xft:IBM Plex Sans, DejaVu Sans 10
# Use Mouse+$mod to drag floating windows
floating_modifier $mod
@ -390,7 +390,7 @@ bar {
bindsym button4 nop
bindsym button5 nop
# font -xos4-terminus-medium-r-normal--14-140-72-72-c-80-iso10646-1
font xft:IBM Plex Mono 10
font xft:IBM Plex Mono, DejaVu Sans Mono 10
strip_workspace_numbers yes
colors {

View file

@ -17,7 +17,7 @@ case $BLOCK_BUTTON in
5) mocp -j $(($(mocp -Q "%cs") + 5))s ;;
esac
status="<span foreground=\"#6699CC\"> ?</span>"
status="<span foreground=\"#6699CC\"></span>"
case $origstatus in
STOP ) status="<span foreground=\"#F2777A\">▣</span>" ;;
PAUSE ) status="<span foreground=\"#FFCC66\">▣</span>" ;;

View file

@ -2,9 +2,15 @@
[[ -z "$3" ]] && volume=90 || volume="$3"
#if [[ "$(date "+%F" -d "$2")" = "$(date "+%F")" ]]
#then
# set -- "$1" "tomorrow $2" "$3"
#fi
sleeptime=$(date -Iseconds -d "$1")
wakeuptime=$(date -Iseconds -d "$2")
#if [[ "$(whoami)" != "root" ]]
#then
# echo "Ce script doit être exécuté en root" >&2
@ -32,7 +38,7 @@ amixer -q -D default sset Master "$volume%"
echo 0 on > /proc/acpi/ibm/led
pkill mpv
mpv --loop-file ${HOME}/Musique_old/Sons/reveil.mp3
mpv --loop-file ${HOME}/Musique_old/Sons/girlswithguns.mp3
xscreensaver &
#mpv --loop-file /home/breizh/Musique/Radio_caroline.m3u

14
.local/bin/ytdl-stream Executable file
View file

@ -0,0 +1,14 @@
#!/bin/bash
youtube-dl -F "$1"
printf "Choose the audio format: "
read afmt
printf "Choose the video format: "
read vfmt
audio=$(youtube-dl -f "${afmt}" -g "$1")
video=$(youtube-dl -f "${vfmt}" -g "$1")
title=$(youtube-dl -e "$1")
ffmpeg -i "${audio}" -i "${video}" -f matroska -c:a copy -c:v copy "$title.mkv"
exit 0