From 71b5d1313a1a6f192f3a07c4715453edadfec048 Mon Sep 17 00:00:00 2001 From: Debucquoy Date: Sat, 6 Jan 2024 18:02:00 +0100 Subject: [PATCH] Some changes from minitoninux --- bin/.bin/DidIClickDesktop.sh | 10 ++++++++++ bspwm/.config/bspwm/bspwmrc | 1 + sxhkd/.config/sxhkd/sxhkdrc | 17 ++++++++++------- vim/.vim/UltiSnips/tex.snippets | 6 +++++- vim/.vimrc | 16 ++++++---------- zathura/.config/zathura/zathurarc | 2 +- 6 files changed, 33 insertions(+), 19 deletions(-) create mode 100755 bin/.bin/DidIClickDesktop.sh diff --git a/bin/.bin/DidIClickDesktop.sh b/bin/.bin/DidIClickDesktop.sh new file mode 100755 index 0000000..67ad6ce --- /dev/null +++ b/bin/.bin/DidIClickDesktop.sh @@ -0,0 +1,10 @@ +#!/bin/bash +# Did I just click the desktop? + +#Get the window id of the window that is under the pointer and set variable WINDOW to it +eval $(xdotool getmouselocation --shell) + +#Get the window id of the rootwindow aka desktop and convert the id into decimal form that xdotool uses so we can easily compare the values +rootwindowid=$(($(lsw | head -1))) +#Compare window ids to see if window under mouse is the rootwindow. Returns false if not. +[ "$WINDOW" = "$rootwindowid" ] diff --git a/bspwm/.config/bspwm/bspwmrc b/bspwm/.config/bspwm/bspwmrc index 826f468..b23b2bd 100755 --- a/bspwm/.config/bspwm/bspwmrc +++ b/bspwm/.config/bspwm/bspwmrc @@ -93,6 +93,7 @@ bspc rule -a Tk state=pseudo_tiled bspc rule -a mcedit.py state=floating bspc rule -a yakuake manage=off layer=above bspc rule -a xsane manage=off layer=above +bspc rule -a Zathura state=tiled ## Autogap adjusts windowgap automatically according to the number of diff --git a/sxhkd/.config/sxhkd/sxhkdrc b/sxhkd/.config/sxhkd/sxhkdrc index 183abbf..b79d835 100755 --- a/sxhkd/.config/sxhkd/sxhkdrc +++ b/sxhkd/.config/sxhkd/sxhkdrc @@ -189,7 +189,7 @@ super + shift + {comma,period} # Change window gap super + g - bspc config -d focused window_gap {$gap,$(($gap+$gap)),$(($gap+$gap+$gap))} + bspc config -d focused window_gap {$gap,$(($gap+$cgap)),$(($gap+$cgap+$gap))} super + button{4,5} bspc config -d focused window_gap $((`bspc config -d focused window_gap` {+,-} 2 )) @@ -197,14 +197,14 @@ super + button{4,5} # mouse bindings # __________________ -~button1 - DidIClickDesktop.sh && gapgrab +# ~button1 +# DidIClickDesktop.sh && gapgrab -~button2 - DidIClickDesktop.sh && mygtkmenui -- .config/GTKmenu/BspwmDesktopMenui +# ~button2 +# DidIClickDesktop.sh && mygtkmenui -- .config/GTKmenu/BspwmDesktopMenui -~button3 - DidIClickDesktop.sh && mygtkmenui -- .config/GTKmenu/LaunchMenu +# ~button3 +# DidIClickDesktop.sh && mygtkmenui -- .config/GTKmenu/LaunchMenu # Switch workspace by scrolling on the desktop. Causes scrolling issues on some systems. #~button4 @@ -279,6 +279,9 @@ alt + z Print scrot -s +shift + Print + scrot_copy + # # Media keys # diff --git a/vim/.vim/UltiSnips/tex.snippets b/vim/.vim/UltiSnips/tex.snippets index b330d30..1320248 100644 --- a/vim/.vim/UltiSnips/tex.snippets +++ b/vim/.vim/UltiSnips/tex.snippets @@ -6,10 +6,14 @@ snippet base "Description" b \usepackage[french]{babel} \usepackage{amsmath, amsfonts, amssymb, amsthm} +\title{${2:${VISUAL:Titre}}} +\author{${3:${VISUAL:Debucquoy Anthony}}} + \begin{document} +\maketitle + $0 \end{document} endsnippet - diff --git a/vim/.vimrc b/vim/.vimrc index 493f814..bb31edc 100644 --- a/vim/.vimrc +++ b/vim/.vimrc @@ -5,18 +5,14 @@ autocmd Filetype tex noremap :silent !pdflatex % && mupdf %: autocmd FileType asm noremap :execute 'silent !qtspim' expand('%::p') -" autocmd FileType python set sw=4 -" autocmd FileType python set ts=4 -" autocmd FileType python set sts=4 - -" let g:AutoPairsMapCR = 0 "Workaround for 27_AutoPairsReturn -" imap AutoPairsReturn - nnoremap :GFiles nnoremap :Ag nnoremap :vert term +let g:netrw_keepdir=0 +let g:netrw_banner=0 +let g:netrw_liststyle=3 let python_highlight_all=1 let g:pymode_python = 'python3' let g:pymode_options_max_line_length = 120 @@ -25,7 +21,7 @@ let g:htmljinja_disable_detection = 1 let g:vimtex_grammar_vlty = {'lt_command': 'languagetool'} let g:vimtex_grammar_textidote = {'jar': '/usr/share/java/textidote.jar'} -let g:vimtex_view_method = 'mupdf' +let g:vimtex_view_method = 'zathura' " nnoremap (YCMFindSymbolInDirectory) " nnoremap (YCMFindSymbolInWorkspace) @@ -80,8 +76,8 @@ let g:ycm_language_server = [ \ { \ 'name': 'tex', \ 'cmdline': ['texlab'], - \ 'filetype' : ['tex'] - \ } + \ 'filetypes': ['tex'], + \ }, \ ] " let g:completor_clang_binary = "/usr/bin/clang" diff --git a/zathura/.config/zathura/zathurarc b/zathura/.config/zathura/zathurarc index 0beba78..5d5abdc 100644 --- a/zathura/.config/zathura/zathurarc +++ b/zathura/.config/zathura/zathurarc @@ -3,4 +3,4 @@ set recolor true set recolor-darkcolor "#ffffff" set recolor-lightcolor rgba(32,34,34,0.8) set guioptions "" - +map f toggle_fullscreen