From: Mart Lubbers Date: Fri, 11 Jun 2021 08:03:42 +0000 (+0200) Subject: minor changes X-Git-Url: https://git.martlubbers.net/?a=commitdiff_plain;h=6b1ae31fff239fd2223223acf861b71f829ee858;p=dotfiles.git minor changes --- diff --git a/music/.local/bin/music_toggle b/music/.local/bin/music_toggle index dc6b297..eaddd60 100755 --- a/music/.local/bin/music_toggle +++ b/music/.local/bin/music_toggle @@ -1,10 +1,13 @@ #!/bin/sh - -# Quodlibet is running -if ! quodlibet --status +if quodlibet --status then quodlibet --play-pause - +elif mpc status +then + mpc toggle +elif cmus-remote -Q +then + cmus-remote --pause +else + echo "$(date) $0: no music player detected" fi - - diff --git a/shell/.bashrc b/shell/.bashrc index 0b597e4..9ea8e26 100644 --- a/shell/.bashrc +++ b/shell/.bashrc @@ -22,31 +22,44 @@ export NOTMUCH_CONFIG="${XDG_CONFIG_HOME:-$HOME/.config}"/notmuch/config export PASSWORD_STORE_DIR="${XDG_DATA_HOME:-$HOME/.local/share}"/pass export TMUX_TMPDIR="$XDG_RUNTIME_DIR" -export CLEAN_HOME=/opt/clean-x64 +if [ "$SCHROOT_CHROOT_NAME" = "x86" ] +then + export CLEAN_HOME=/opt/clean-x86 +else + export CLEAN_HOME=/opt/clean-x64 +fi export PATH=$CLEAN_HOME/bin:~/.local/bin:$PATH -export PATH=/opt/texlive/2020/bin/x86_64-linux:/opt/zotero:/opt/arduino:/opt/beets/bin:/opt/firefox:$PATH +export PATH=/opt/texlive/2021/bin/x86_64-linux:/opt/zotero:/opt/arduino:/opt/beets/bin:/opt/firefox:$PATH -export MANPATH=~/.local/share/man:/opt/texlive/2020/texmf-dist/doc/man:/opt/arduino/java/man:$MANPATH +export MANPATH=~/.local/share/man:/opt/texlive/2021/texmf-dist/doc/man:/opt/arduino/java/man:$MANPATH -export GTK_IM_MODULE=xim -export QT_IM_MODULE=xim -export QT_QPA_PLATFORMTHEME=qt5ct +#export GTK_IM_MODULE=xim +#export QT_IM_MODULE=xim +#export QT_QPA_PLATFORMTHEME=qt5ct export NNTPSERVER=news.tweak.nl alias slrn="slrn -i \"${XDG_CONFIG_HOME:-$HOME/.config}/slrn/slrnrc\"" alias ls='ls --color=auto' alias grep='grep --color=auto' -alias vi=vim +alias vi='vim --servername VIM' alias shutdown="echo \"Are you sure? I\'m Ygdrassil\" && read && shutdown" -. /etc/bash_completion +if [ -f /etc/bash_completion ] +then + . /etc/bash_completion +fi set_prompt(){ last_c=$? PS1='\H' [[ $last_c -ge 1 ]] && PS1="($last_c) $PS1" - PS1="$PS1\w\$ " + if [[ -n "$SCHROOT_CHROOT_NAME" ]] + then + PS1="($SCHROOT_CHROOT_NAME)$PS1\w\$ " + else + PS1="$PS1\w\$ " + fi } PROMPT_COMMAND='set_prompt' diff --git a/shell/.local/bin/update b/shell/.local/bin/update index f9c8470..69ed36f 100755 --- a/shell/.local/bin/update +++ b/shell/.local/bin/update @@ -1,5 +1,5 @@ #!/bin/sh -NUL='>/dev/null 2>&1' +NUL=">/dev/null 2>&1" offlineimap -o -u ttyui @@ -10,8 +10,8 @@ cmd() { sudo sh -c "$(cmd)" tlmgr update --self && tlmgr update --all -khal calendar $NUL -khard $NUL +eval "khal calendar $NUL" +eval "khard $NUL" pass git pull origin master if ! tmux list-sessions then diff --git a/vim/.vim/after/ftplugin/tex.vim b/vim/.vim/after/ftplugin/tex.vim index 978ea51..4743f66 100644 --- a/vim/.vim/after/ftplugin/tex.vim +++ b/vim/.vim/after/ftplugin/tex.vim @@ -3,7 +3,10 @@ setlocal tw=0 setlocal colorcolumn=0 " Vimtex options -let g:vimtex_compiler_enabled = 0 let g:vimtex_toc_enabled = 1 let g:vimtex_toc_help = 0 let g:vimtex_toc_refresh_always = 1 + +let g:vimtex_view_general_viewer = 'okular' +let g:vimtex_view_general_options = '--unique file:@pdf\#src:@line@tex' +let g:vimtex_view_general_options_latexmk = '--unique' diff --git a/vim/.vim/after/ftplugin/vim.vim b/vim/.vim/after/ftplugin/vim.vim new file mode 100644 index 0000000..163a3a5 --- /dev/null +++ b/vim/.vim/after/ftplugin/vim.vim @@ -0,0 +1,2 @@ +" Automaticly source some files after writing +autocmd! bufwritepost .vimrc source % diff --git a/vim/.vimrc b/vim/.vimrc index 3479ab3..f3ea493 100644 --- a/vim/.vimrc +++ b/vim/.vimrc @@ -1,6 +1,3 @@ -" Automaticly source some files after writing -autocmd! bufwritepost .vimrc source % - " Some general options syntax enable filetype indent plugin on @@ -32,6 +29,9 @@ set sidescrolloff=1 set listchars=nbsp:¬,tab:▸\ ,eol:↩,extends:»,precedes:«,trail:• set list +" Make sure the last line is shown as much as possible +set display+=lastline + " Move through long lines as they were short multiple lines map j gj map k gk @@ -82,6 +82,3 @@ let g:syntastic_always_populate_loc_list = 1 let g:syntastic_auto_loc_list = 1 let g:syntastic_check_on_open = 0 let g:syntastic_check_on_wq = 0 - -" Vimtex options -let g:vimtex_compiler_enabled = 0