diff --git a/.Xresources b/.Xresources index 6519e2b..ddfdd0d 100644 --- a/.Xresources +++ b/.Xresources @@ -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 diff --git a/.config/dunst/dunstrc b/.config/dunst/dunstrc index d3039e7..06a5ae9 100644 --- a/.config/dunst/dunstrc +++ b/.config/dunst/dunstrc @@ -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 diff --git a/.config/fish/completions/fisher.fish b/.config/fish/completions/fisher.fish new file mode 100644 index 0000000..61a3810 --- /dev/null +++ b/.config/fish/completions/fisher.fish @@ -0,0 +1 @@ +fisher --complete diff --git a/.config/fish/completions/pass.fish b/.config/fish/completions/pass.fish new file mode 100644 index 0000000..c32a42c --- /dev/null +++ b/.config/fish/completions/pass.fish @@ -0,0 +1,118 @@ +#!/usr/bin/env fish + +# Copyright (C) 2012-2014 Dmitry Medvinsky . 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' diff --git a/.config/fish/config.fish b/.config/fish/config.fish new file mode 100644 index 0000000..dc3ef3e --- /dev/null +++ b/.config/fish/config.fish @@ -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 diff --git a/.config/fish/fish_variables b/.config/fish/fish_variables new file mode 100644 index 0000000..26d1295 --- /dev/null +++ b/.config/fish/fish_variables @@ -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 diff --git a/.config/fish/fishd.thinkpad b/.config/fish/fishd.thinkpad new file mode 100644 index 0000000..1008753 --- /dev/null +++ b/.config/fish/fishd.thinkpad @@ -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 diff --git a/.config/fish/fishfile b/.config/fish/fishfile new file mode 100644 index 0000000..15f7bc4 --- /dev/null +++ b/.config/fish/fishfile @@ -0,0 +1,7 @@ +fisherman/await +fisherman/getopts +fisherman/humanize_duration +hasanozgan/theme-lambda +fisherman/last_job_id +fisherman/termcolours +fisherman/transfer diff --git a/.config/fish/functions/await.fish b/.config/fish/functions/await.fish new file mode 120000 index 0000000..0ce86f0 --- /dev/null +++ b/.config/fish/functions/await.fish @@ -0,0 +1 @@ +/home/breizh/.config/fisherman/await/functions/await.fish \ No newline at end of file diff --git a/.config/fish/functions/dclock.fish b/.config/fish/functions/dclock.fish new file mode 100644 index 0000000..d3b3d0c --- /dev/null +++ b/.config/fish/functions/dclock.fish @@ -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 diff --git a/.config/fish/functions/fish_prompt.fish b/.config/fish/functions/fish_prompt.fish new file mode 120000 index 0000000..5e22f0a --- /dev/null +++ b/.config/fish/functions/fish_prompt.fish @@ -0,0 +1 @@ +/home/breizh/.config/fisherman/lambda/fish_prompt.fish \ No newline at end of file diff --git a/.config/fish/functions/fish_right_prompt.fish b/.config/fish/functions/fish_right_prompt.fish new file mode 120000 index 0000000..fd95c0b --- /dev/null +++ b/.config/fish/functions/fish_right_prompt.fish @@ -0,0 +1 @@ +/home/breizh/.config/fisherman/lambda/fish_right_prompt.fish \ No newline at end of file diff --git a/.config/fish/functions/getopts.fish b/.config/fish/functions/getopts.fish new file mode 120000 index 0000000..388081d --- /dev/null +++ b/.config/fish/functions/getopts.fish @@ -0,0 +1 @@ +/home/breizh/.config/fisherman/getopts/getopts.fish \ No newline at end of file diff --git a/.config/fish/functions/humanize_duration.fish b/.config/fish/functions/humanize_duration.fish new file mode 120000 index 0000000..eafb723 --- /dev/null +++ b/.config/fish/functions/humanize_duration.fish @@ -0,0 +1 @@ +/home/breizh/.config/fisherman/humanize_duration/humanize_duration.fish \ No newline at end of file diff --git a/.config/fish/functions/l.fish b/.config/fish/functions/l.fish new file mode 100644 index 0000000..bcc27ed --- /dev/null +++ b/.config/fish/functions/l.fish @@ -0,0 +1,3 @@ +function l --description 'alias l=ls -lAh' + exa -lahb $argv +end diff --git a/.config/fish/functions/last_job_id.fish b/.config/fish/functions/last_job_id.fish new file mode 120000 index 0000000..b9eb1ad --- /dev/null +++ b/.config/fish/functions/last_job_id.fish @@ -0,0 +1 @@ +/home/breizh/.config/fisherman/last_job_id/last_job_id.fish \ No newline at end of file diff --git a/.config/fish/functions/latex_comp.fish b/.config/fish/functions/latex_comp.fish new file mode 100644 index 0000000..d2f1b6f --- /dev/null +++ b/.config/fish/functions/latex_comp.fish @@ -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 diff --git a/.config/fish/functions/man.fish b/.config/fish/functions/man.fish new file mode 100644 index 0000000..1685461 --- /dev/null +++ b/.config/fish/functions/man.fish @@ -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 + diff --git a/.config/fish/functions/mutt-breizh.fish b/.config/fish/functions/mutt-breizh.fish new file mode 100644 index 0000000..a84a59a --- /dev/null +++ b/.config/fish/functions/mutt-breizh.fish @@ -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 diff --git a/.config/fish/functions/pifs.fish b/.config/fish/functions/pifs.fish new file mode 100644 index 0000000..836a9db --- /dev/null +++ b/.config/fish/functions/pifs.fish @@ -0,0 +1,4 @@ +# Defined in - @ line 0 +function pifs --description 'alias pifs πfs' + πfs $argv; +end diff --git a/.config/fish/functions/powershell.fish b/.config/fish/functions/powershell.fish new file mode 100644 index 0000000..90935c4 --- /dev/null +++ b/.config/fish/functions/powershell.fish @@ -0,0 +1,4 @@ +# Defined in - @ line 0 +function powershell --description 'alias powershell pwsh' + pwsh $argv; +end diff --git a/.config/fish/functions/rtorrent.fish b/.config/fish/functions/rtorrent.fish new file mode 100644 index 0000000..8cddc93 --- /dev/null +++ b/.config/fish/functions/rtorrent.fish @@ -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 diff --git a/.config/fish/functions/termcolours.fish b/.config/fish/functions/termcolours.fish new file mode 120000 index 0000000..7d4d78a --- /dev/null +++ b/.config/fish/functions/termcolours.fish @@ -0,0 +1 @@ +/home/breizh/.config/fisherman/termcolours/termcolours.fish \ No newline at end of file diff --git a/.config/fish/functions/transfer.fish b/.config/fish/functions/transfer.fish new file mode 120000 index 0000000..222db0e --- /dev/null +++ b/.config/fish/functions/transfer.fish @@ -0,0 +1 @@ +/home/breizh/.config/fisherman/transfer/transfer.fish \ No newline at end of file diff --git a/.config/htop/htoprc b/.config/htop/htoprc index 7dc2216..eabc93c 100644 --- a/.config/htop/htoprc +++ b/.config/htop/htoprc @@ -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 diff --git a/.config/i3/config b/.config/i3/config index e995dc3..066289e 100644 --- a/.config/i3/config +++ b/.config/i3/config @@ -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 { diff --git a/.i3blocks/mocp b/.i3blocks/mocp index 7429664..a053d72 100755 --- a/.i3blocks/mocp +++ b/.i3blocks/mocp @@ -17,7 +17,7 @@ case $BLOCK_BUTTON in 5) mocp -j $(($(mocp -Q "%cs") + 5))s ;; esac -status=" ?" +status="" case $origstatus in STOP ) status="" ;; PAUSE ) status="" ;; diff --git a/.local/bin/reveil b/.local/bin/reveil index 029924a..781625b 100755 --- a/.local/bin/reveil +++ b/.local/bin/reveil @@ -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 diff --git a/.local/bin/ytdl-stream b/.local/bin/ytdl-stream new file mode 100755 index 0000000..ef9660f --- /dev/null +++ b/.local/bin/ytdl-stream @@ -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