First Commit
This is a first dotfiles config. I think I have a lot more to add tho...
This commit is contained in:
		
							
								
								
									
										20
									
								
								README.md
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										20
									
								
								README.md
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,20 @@ | |||||||
|  | # Tonitch's Dotfiles | ||||||
|  |  | ||||||
|  | This is mostly my dotfiles. I'm pretty sure I will forget to update it in some times but at least I will have | ||||||
|  | a setup to roll with... | ||||||
|  |  | ||||||
|  | ## Usage | ||||||
|  |  | ||||||
|  | some of these folder are stow packages. (see [stowed.list](./stowed.list)) | ||||||
|  |  | ||||||
|  | The best method to install these is: | ||||||
|  | 1) Clone this repo as $HOME/.dotfiles | ||||||
|  | 2) executes the bellow commands | ||||||
|  | ```sh | ||||||
|  | $ git clone https://git.herisson.ovh/tonitch/dotfiles $HOME/.dotfiles | ||||||
|  | $ cd $HOME/.dotfiles | ||||||
|  | $ cat stowed.list | xargs stow | ||||||
|  | ``` | ||||||
|  |  | ||||||
|  | Non-stow config files might have to be placed manually at their correct location. | ||||||
|  | I will try to put a INSTALL.md in folders to know what you are supposed to do with those. | ||||||
							
								
								
									
										5
									
								
								bin/.bin/WindowMinimiser
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										5
									
								
								bin/.bin/WindowMinimiser
									
									
									
									
									
										Executable file
									
								
							| @ -0,0 +1,5 @@ | |||||||
|  | #!/bin/bash | ||||||
|  |  | ||||||
|  | hiddens=$(bspc query --nodes --node .hidden | nl -w1 -s' ') | ||||||
|  | window_choice=$(echo "$hiddens" | cut -d ' ' -f 2 | xargs -L 1 bspc query -T -n | jq -r .client.className | nl -w1 -s' ' | dmenu -l 10 -i | cut -d ' ' -f 1) | ||||||
|  | echo "${hiddens}" | awk 'NR == n {print $2}' n=$window_choice | xargs -I{} bspc node {} --flag hidden | ||||||
							
								
								
									
										17
									
								
								bin/.bin/WindowSelector
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										17
									
								
								bin/.bin/WindowSelector
									
									
									
									
									
										Executable file
									
								
							| @ -0,0 +1,17 @@ | |||||||
|  | #!/bin/bash | ||||||
|  | # Script copied from AUR package dswitcher, and modified for theming and placement and removed unnecessary functions. | ||||||
|  | if ! [ -f "$HOME/.dmenurc" ]; then | ||||||
|  | 	cp /usr/share/dmenu/dmenurc $HOME/.dmenurc | ||||||
|  | fi | ||||||
|  | . $HOME/.dmenurc | ||||||
|  |  | ||||||
|  | # width=$(wattr w $(lsw -r)) | ||||||
|  | # height=$(wattr h $(lsw -r)) | ||||||
|  | # bar_width=$(( $width / 3 )) | ||||||
|  | # left_shift=$(( ($width - $bar_width) / 2 )) | ||||||
|  | # top_shift=$PANEL_HEIGHT | ||||||
|  |  | ||||||
|  | # num=$(wmctrl -l | sed 's/  / /' | cut -d " " -f 4- | nl -w 3 -n rn | sed -r 's/^([ 0-9]+)[ \t]*(.*)$/\1 - \2/' | dmenu -i -l 10 -x $left_shift -y $top_shift -w $bar_width -fn $DMENU_FN -nb $DMENU_NB -nf $DMENU_NF -sf $DMENU_SF -sb $DMENU_SB | cut -d '-' -f -1) | ||||||
|  | num=$(wmctrl -l | sed 's/  / /' | cut -d " " -f 4- | nl -w 3 -n rn | sed -r 's/^([ 0-9]+)[ \t]*(.*)$/\1 - \2/' | dmenu -i -l 10 -fn $DMENU_FN -nb $DMENU_NB -nf $DMENU_NF -sf $DMENU_SF -sb $DMENU_SB | cut -d '-' -f -1) | ||||||
|  | [[ -z "$num" ]] && exit | ||||||
|  | wmctrl -l | sed -n "$num p" | cut -c -10 | xargs wmctrl -i -a | ||||||
							
								
								
									
										26
									
								
								bin/.bin/avol
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										26
									
								
								bin/.bin/avol
									
									
									
									
									
										Executable file
									
								
							| @ -0,0 +1,26 @@ | |||||||
|  | #!/bin/bash | ||||||
|  | # | ||||||
|  | # Manage ALSA Master channel | ||||||
|  |  | ||||||
|  | test "$1" = "-h" && echo "usage `basename $0` [up|down|mute]" && exit 0 | ||||||
|  |  | ||||||
|  | level() { | ||||||
|  |     amixer get Master | sed -n 's/^.*\[\([0-9]\+%\).*$/\1/p' | uniq | ||||||
|  |  | ||||||
|  | } | ||||||
|  |  | ||||||
|  | state() { | ||||||
|  |     amixer get Master | sed -n 's/^.*\[\(o[nf]\+\)]$/\1/p' | uniq | ||||||
|  |  | ||||||
|  | } | ||||||
|  |  | ||||||
|  | test $# -eq 0 && echo "`level` `state`" && exit 0 | ||||||
|  |  | ||||||
|  | case $1 in | ||||||
|  |     up)      amixer set Master ${2:-5}%+ >/dev/null ||autoalsaconfamixer;; | ||||||
|  |     down)      amixer set Master ${2:-5}%- >/dev/null ||autoalsaconf;; | ||||||
|  |     mute)      amixer set Master toggle >/dev/null ||autoalsaconf;; | ||||||
|  |     state|level) $1 ||autoalsaconf;; | ||||||
|  |     set)    amixer set Master $2% >/dev/null ||autoalsaconf;; | ||||||
|  |     *)    amixer set Master $1% >/dev/null ||autoalsaconf;; | ||||||
|  | esac | ||||||
							
								
								
									
										13
									
								
								bin/.bin/bspwm_rename_desktop
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										13
									
								
								bin/.bin/bspwm_rename_desktop
									
									
									
									
									
										Executable file
									
								
							| @ -0,0 +1,13 @@ | |||||||
|  | #!/bin/bash | ||||||
|  |   | ||||||
|  | DMENU_NF="#A3A6AB" | ||||||
|  | DMENU_NB="#34322E" | ||||||
|  | DMENU_SF="#F6F9FF" | ||||||
|  | DMENU_SB="#5C5955" | ||||||
|  |   | ||||||
|  | DESKTOP_NAME=`echo '' | dmenu -b $DMENU_THEME -p 'Rename:'` | ||||||
|  | if [ -z $DESKTOP_NAME ]; then | ||||||
|  |     exit 0 | ||||||
|  | fi | ||||||
|  |   | ||||||
|  | bspc desktop -n "$DESKTOP_NAME" | ||||||
							
								
								
									
										41
									
								
								bin/.bin/bspwm_resize.sh
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										41
									
								
								bin/.bin/bspwm_resize.sh
									
									
									
									
									
										Executable file
									
								
							| @ -0,0 +1,41 @@ | |||||||
|  | #!/bin/bash | ||||||
|  |  | ||||||
|  | size=${2:-'10'} | ||||||
|  | dir=$1 | ||||||
|  |  | ||||||
|  | # Find current window mode | ||||||
|  | is_tiled() { | ||||||
|  | bspc query -T -n | grep -q '"state":"tiled"' | ||||||
|  | } | ||||||
|  | # If the window is floating, move it | ||||||
|  | if ! is_tiled; then | ||||||
|  | #only parse input if window is floating,tiled windows accept input as is | ||||||
|  |         case "$dir" in | ||||||
|  |                 west) switch="-w" | ||||||
|  |                 sign="-" | ||||||
|  |                 ;; | ||||||
|  |                 east) switch="-w" | ||||||
|  |                 sign="+" | ||||||
|  |                 ;; | ||||||
|  |                 north) switch="-h" | ||||||
|  |                 sign="-" | ||||||
|  |                 ;; | ||||||
|  |                 south) switch="-h" | ||||||
|  |                 sign="+" | ||||||
|  |                 ;; | ||||||
|  |                 esac | ||||||
|  |  xdo resize ${switch} ${sign}${size} | ||||||
|  |  | ||||||
|  | # Otherwise, window is tiled: switch with window in given direction | ||||||
|  | else | ||||||
|  |      case "$dir" in | ||||||
|  |                 west) bspc node @west -r -$size || bspc node @east -r -${size} | ||||||
|  |                 ;; | ||||||
|  |                 east) bspc node @west -r +$size || bspc node @east -r +${size} | ||||||
|  |                 ;; | ||||||
|  |                 north) bspc node @south -r -$size || bspc node @north -r -${size} | ||||||
|  |                 ;; | ||||||
|  |                 south) bspc node @south -r +$size || bspc node @north -r +${size} | ||||||
|  |                 ;; | ||||||
|  |                 esac | ||||||
|  | fi | ||||||
							
								
								
									
										9
									
								
								bin/.bin/colorshow
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										9
									
								
								bin/.bin/colorshow
									
									
									
									
									
										Executable file
									
								
							| @ -0,0 +1,9 @@ | |||||||
|  | for x in {0..8}; do  | ||||||
|  |     for i in {30..37}; do  | ||||||
|  |         for a in {40..47}; do  | ||||||
|  | 	echo -ne "\e[$x;$i;$a""m\\\e[$x;$i;$a""m\e[0;37;40m " | ||||||
|  |         done | ||||||
|  |         echo | ||||||
|  |     done | ||||||
|  | done | ||||||
|  | echo "" | ||||||
							
								
								
									
										22
									
								
								bin/.bin/emoji
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										22
									
								
								bin/.bin/emoji
									
									
									
									
									
										Executable file
									
								
							| @ -0,0 +1,22 @@ | |||||||
|  | #!/bin/sh | ||||||
|  | # Give dmenu list of all unicode characters to copy. | ||||||
|  | # Shows the selected character in dunst if running. | ||||||
|  |  | ||||||
|  | # Must have xclip installed to even show menu. | ||||||
|  | xclip -h >/dev/null || exit | ||||||
|  |  | ||||||
|  | if [ -e ~/.config/fontawesome ]; then | ||||||
|  |     chosen=$(grep -v "#" -h ~/.config/emoji ~/.config/fontawesome | dmenu -i -l 20 -fn Monospace-18) | ||||||
|  | else | ||||||
|  |     chosen=$(grep -v "#" ~/.config/emoji | dmenu -i -l 20 -fn Monospace-18) | ||||||
|  | fi | ||||||
|  |  | ||||||
|  | [ "$chosen" != "" ] || exit | ||||||
|  |  | ||||||
|  | c=$(echo "$chosen" | sed "s/ .*//") | ||||||
|  | echo "$c" | tr -d '\n' | xclip -sel clip | ||||||
|  | notify-send "'$c' copied to clipboard." & | ||||||
|  |  | ||||||
|  | s=$(echo "$chosen" | sed "s/.*; //" | awk '{print $1}') | ||||||
|  | echo "$s" | tr -d '\n' | xclip | ||||||
|  | notify-send "'$s' copied to primary." & | ||||||
							
								
								
									
										14
									
								
								bin/.bin/euclid_balancer
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										14
									
								
								bin/.bin/euclid_balancer
									
									
									
									
									
										Executable file
									
								
							| @ -0,0 +1,14 @@ | |||||||
|  | #!/bin/dash | ||||||
|  |  | ||||||
|  | if [ "$(pgrep -cx euclid_balancer)" -gt 1 ] ; then  | ||||||
|  | 	killall euclid_balancer && exit 0 | ||||||
|  | else | ||||||
|  |  | ||||||
|  | bspc subscribe node_add node_remove node_state node_geometry | while read line; do | ||||||
|  | 	for wid in $(bspc query -N -d -n .window); do | ||||||
|  | 		bspc node "${wid}#@north" -B || true | ||||||
|  | 		bspc node "${wid}#@south" -B || true | ||||||
|  | 	done | ||||||
|  | done | ||||||
|  |  | ||||||
|  | fi | ||||||
							
								
								
									
										15
									
								
								bin/.bin/euclid_mode
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										15
									
								
								bin/.bin/euclid_mode
									
									
									
									
									
										Executable file
									
								
							| @ -0,0 +1,15 @@ | |||||||
|  | #! /bin/sh | ||||||
|  |  | ||||||
|  | fwid=$(bspc query -N -n focused.automatic) | ||||||
|  | wid=$1 | ||||||
|  | class=$2 | ||||||
|  | instance=$3 | ||||||
|  | title=$(xtitle "$wid") | ||||||
|  | #floats=$(bspc query -N -n .local.floating | wc -l) | ||||||
|  | if bspc query -N -n "@/.!automatic" > /dev/null ; then | ||||||
|  |     echo "node=@/" | ||||||
|  | fi | ||||||
|  | if [ -n "$fwid" ] ; then | ||||||
|  | 			echo "split_dir=south" | ||||||
|  | fi | ||||||
|  | #window-placer $floats $wid | ||||||
							
								
								
									
										85
									
								
								bin/.bin/euclid_mover
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										85
									
								
								bin/.bin/euclid_mover
									
									
									
									
									
										Executable file
									
								
							| @ -0,0 +1,85 @@ | |||||||
|  | #!/bin/bash | ||||||
|  | # Originally by https://github.com/windelicato/ | ||||||
|  |  | ||||||
|  | size=${2:-'20'} | ||||||
|  | dir=$1 | ||||||
|  |  | ||||||
|  | transplanter() { | ||||||
|  | 	bspc node ${dir} -p south && bspc node -n ${dir} | ||||||
|  | } | ||||||
|  |  | ||||||
|  | northplanter() { | ||||||
|  | 	bspc node north -p north && bspc node -n north | ||||||
|  | } | ||||||
|  |  | ||||||
|  | rootplanter() { | ||||||
|  | 	bspc node @/ -p ${dir} && bspc node -n @/ || bspc node -s next.local && bspc node -n @/ | ||||||
|  | 	bspc node @/ -p cancel | ||||||
|  | } | ||||||
|  |  | ||||||
|  | bspc config pointer_follows_focus true | ||||||
|  | # Find current window mode | ||||||
|  | is_floating() { | ||||||
|  | bspc query -T -n | grep -q '"state":"floating"' | ||||||
|  | } | ||||||
|  | # If the window is floating, move it | ||||||
|  | if is_floating; then | ||||||
|  | #only parse input if window is floating,tiled windows accept input as is | ||||||
|  |         case "$dir" in | ||||||
|  |   		west) switch="-x" | ||||||
|  |   		sign="-" | ||||||
|  |         	;; | ||||||
|  |   		east) switch="-x" | ||||||
|  |          	sign="+" | ||||||
|  |        		;; | ||||||
|  |   		north) switch="-y" | ||||||
|  |          	sign="-" | ||||||
|  |         	;; | ||||||
|  |   		*) switch="-y" | ||||||
|  |      		sign="+" | ||||||
|  |      		;; | ||||||
|  |  		esac | ||||||
|  |  xdo move ${switch} ${sign}${size} | ||||||
|  |  | ||||||
|  | # Otherwise, window is tiled: switch with window in given direction | ||||||
|  | else | ||||||
|  | 	 if [[ $(bspc query -N -n .local.\!floating | wc -l) != 2 ]]; then  | ||||||
|  | 	 case "$dir" in | ||||||
|  |   		north) northplanter || rootplanter | ||||||
|  |         	;; | ||||||
|  |   		*) transplanter || rootplanter | ||||||
|  |      		;; | ||||||
|  |  	 esac | ||||||
|  |  	 else | ||||||
|  |  	 case "$dir" in | ||||||
|  |   		east) bspc node -s east || bspc query -N -n west.local || \ | ||||||
|  |         if bspc query -N -n south.local ; then | ||||||
|  |         	bspc node @/ -R 90 | ||||||
|  |         	else | ||||||
|  |         	bspc node @/ -R 270 | ||||||
|  |         fi | ||||||
|  |         	;; | ||||||
|  |         west) bspc node -s west || bspc query -N -n east.local || \ | ||||||
|  |         if bspc query -N -n north.local ; then | ||||||
|  |         	bspc node @/ -R 90 | ||||||
|  |         	else | ||||||
|  |         	bspc node @/ -R 270 | ||||||
|  |         fi | ||||||
|  |         	;; | ||||||
|  |         south) bspc node -s south || bspc query -N -n north.local || \ | ||||||
|  |         if bspc query -N -n west.local ; then | ||||||
|  |         	bspc node @/ -R 90 | ||||||
|  |         	else | ||||||
|  |         	bspc node @/ -R 270 | ||||||
|  |         fi  | ||||||
|  |         	;; | ||||||
|  |   		*) bspc node -s north || bspc query -N -n south.local || \ | ||||||
|  |         if bspc query -N -n west.local ; then | ||||||
|  |         	bspc node @/ -R 270 | ||||||
|  |         	else | ||||||
|  |         	bspc node @/ -R 90 | ||||||
|  |         fi | ||||||
|  |      		;; | ||||||
|  |      esac | ||||||
|  |      fi | ||||||
|  | fi | ||||||
							
								
								
									
										13
									
								
								bin/.bin/focusmover
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										13
									
								
								bin/.bin/focusmover
									
									
									
									
									
										Executable file
									
								
							| @ -0,0 +1,13 @@ | |||||||
|  | #!/bin/sh | ||||||
|  | #Focus windows by direction, works with multihead | ||||||
|  | #called like this in sxhkdrc: | ||||||
|  | #super +  {a,s,w,d} | ||||||
|  | #   focusmover {west,south,north,east}  | ||||||
|  |     bspc config pointer_follows_monitor true; \ | ||||||
|  |     bspc config pointer_follows_focus true; \ | ||||||
|  |     dir=$@; \ | ||||||
|  |         if ! bspc node -f $dir; then \ | ||||||
|  |     bspc monitor -f $dir; \ | ||||||
|  |     fi; \ | ||||||
|  |     bspc config pointer_follows_monitor false; \ | ||||||
|  |     bspc config pointer_follows_focus false | ||||||
							
								
								
									
										22
									
								
								bin/.bin/linkhandler
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										22
									
								
								bin/.bin/linkhandler
									
									
									
									
									
										Executable file
									
								
							| @ -0,0 +1,22 @@ | |||||||
|  | #!/bin/sh | ||||||
|  |  | ||||||
|  | # Feed script a url or file location. | ||||||
|  | # If an image, it will view in sxiv, | ||||||
|  | # if a video or gif, it will view in mpv | ||||||
|  | # if a music file or pdf, it will download, | ||||||
|  | # otherwise it opens link in browser. | ||||||
|  |  | ||||||
|  | # If no url given. Opens browser. For using script as $BROWSER. | ||||||
|  | [ -z "$1" ] && { "$BROWSER"; exit; } | ||||||
|  |  | ||||||
|  | case "$1" in | ||||||
|  | 	*mkv|*webm|*mp4|*youtube.com/watch*|*youtube.com/playlist*|*youtu.be*|*hooktube.com*|*bitchute.com*) | ||||||
|  | 		setsid -f mpv -quiet "$1" >/dev/null 2>&1 ;; | ||||||
|  | 	*png|*jpg|*jpe|*jpeg|*gif) | ||||||
|  | 		curl -sL "$1" > "/tmp/$(echo "$1" | sed "s/.*\///")" && sxiv -a "/tmp/$(echo "$1" | sed "s/.*\///")"  >/dev/null 2>&1 & ;; | ||||||
|  | 	*mp3|*flac|*opus|*mp3?source*) | ||||||
|  | 		setsid -f tsp curl -LO "$1" >/dev/null 2>&1 ;; | ||||||
|  | 	*) | ||||||
|  | 		if [ -f "$1" ]; then "$TERMINAL" -e "$EDITOR" "$1" | ||||||
|  | 	else setsid -f "$BROWSER" "$1" >/dev/null 2>&1; fi ;; | ||||||
|  | esac | ||||||
							
								
								
									
										4
									
								
								bin/.bin/maildecrypt
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										4
									
								
								bin/.bin/maildecrypt
									
									
									
									
									
										Executable file
									
								
							| @ -0,0 +1,4 @@ | |||||||
|  | #!/bin/sh | ||||||
|  |  | ||||||
|  | gpg --output /tmp/decrypt.html --decrypt "$@"  | ||||||
|  | firefox /tmp/decrypt.html | ||||||
							
								
								
									
										5
									
								
								bin/.bin/md2pdf
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										5
									
								
								bin/.bin/md2pdf
									
									
									
									
									
										Executable file
									
								
							| @ -0,0 +1,5 @@ | |||||||
|  | #!/bin/sh | ||||||
|  |  | ||||||
|  | MDFILE="$1" | ||||||
|  |  | ||||||
|  | [ -r $MDFILE -a -f $MDFILE ] && pandoc $MDFILE -t html -o ${MDFILE[@]/%md/pdf} || echo "what a freak" | ||||||
							
								
								
									
										4
									
								
								bin/.bin/quickssh
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										4
									
								
								bin/.bin/quickssh
									
									
									
									
									
										Executable file
									
								
							| @ -0,0 +1,4 @@ | |||||||
|  | #!/bin/sh | ||||||
|  | sshchoice=$(grep -Eo '^[^, ]+' $HOME/.ssh/known_hosts | dmenu) | ||||||
|  |  | ||||||
|  | $TERMINAL -e ssh $sshchoice | ||||||
							
								
								
									
										7
									
								
								bin/.bin/resetnotify
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										7
									
								
								bin/.bin/resetnotify
									
									
									
									
									
										Executable file
									
								
							| @ -0,0 +1,7 @@ | |||||||
|  | #!/bin/sh | ||||||
|  |  | ||||||
|  | pidof dunst && killall dunst | ||||||
|  | dunst & | ||||||
|  |  | ||||||
|  | notify-send "Hello, World!" & | ||||||
|  | notify-send "Hello, World!2" --urgency=critical & | ||||||
							
								
								
									
										5
									
								
								bin/.bin/scrot_copy
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										5
									
								
								bin/.bin/scrot_copy
									
									
									
									
									
										Executable file
									
								
							| @ -0,0 +1,5 @@ | |||||||
|  | #!/bin/sh | ||||||
|  |  | ||||||
|  | scrot -s -o /tmp/screenshot.png  | ||||||
|  | xclip -sel clip -i /tmp/screenshot.png -t "image/png" | ||||||
|  |  | ||||||
							
								
								
									
										23
									
								
								bin/.bin/search
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										23
									
								
								bin/.bin/search
									
									
									
									
									
										Executable file
									
								
							| @ -0,0 +1,23 @@ | |||||||
|  | #!/bin/bash | ||||||
|  |  | ||||||
|  | QUERY=$@ | ||||||
|  |  | ||||||
|  | if [[ -z $QUERY ]]; then | ||||||
|  | 	QUERY=$(dmenu -p "Search Query: " < /dev/null ) | ||||||
|  | fi | ||||||
|  |  | ||||||
|  | [[ -n $QUERY ]] || exit | ||||||
|  |  | ||||||
|  | QUERY=$(echo $QUERY | sed 's/ /+/g') | ||||||
|  |  | ||||||
|  | RESULT=$(curl "http://s.herisson.ovh/search?q=$QUERY&format=json") | ||||||
|  |  | ||||||
|  | TITLES=$(echo "$RESULT" | jq -r '.results[] | .title') | ||||||
|  | LINKS=$(echo "$RESULT" | jq -r '.results[] | .url') | ||||||
|  |  | ||||||
|  | SELECT=$(paste -d ": " <(seq $(echo "$TITLES" | wc -l)) <(echo "$TITLES") <(echo "$LINKS")| dmenu -l 15 | cut -d: -f1) | ||||||
|  | 	 | ||||||
|  | [[ -n $SELECT ]] || exit | ||||||
|  |  | ||||||
|  | echo "$LINKS" | head -n $SELECT | tail -1 | xclip -sel clip | ||||||
|  |  | ||||||
							
								
								
									
										22
									
								
								bin/.bin/search_open
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										22
									
								
								bin/.bin/search_open
									
									
									
									
									
										Executable file
									
								
							| @ -0,0 +1,22 @@ | |||||||
|  | #!/bin/bash | ||||||
|  |  | ||||||
|  | QUERY=$@ | ||||||
|  |  | ||||||
|  | if [[ -z $QUERY ]]; then | ||||||
|  | 	QUERY=$(dmenu -p "Search Query: " < /dev/null ) | ||||||
|  | fi | ||||||
|  |  | ||||||
|  | [[ -n $QUERY ]] || exit | ||||||
|  |  | ||||||
|  | QUERY=$(echo $QUERY | sed 's/ /+/g') | ||||||
|  |  | ||||||
|  | RESULT=$(curl "http://s.herisson.ovh/search?q=$QUERY&format=json") | ||||||
|  |  | ||||||
|  | TITLES=$(echo "$RESULT" | jq -r '.results[] | .title') | ||||||
|  | LINKS=$(echo "$RESULT" | jq -r '.results[] | .url') | ||||||
|  |  | ||||||
|  | SELECT=$(paste -d ": " <(seq $(echo "$TITLES" | wc -l)) <(echo "$TITLES") <(echo "$LINKS")| dmenu -l 15 | cut -d: -f1) | ||||||
|  | 	 | ||||||
|  | [[ -n $SELECT ]] || exit | ||||||
|  |  | ||||||
|  | echo "$LINKS" | head -n $SELECT | tail -1 | xargs xdg-open | ||||||
							
								
								
									
										1
									
								
								bin/.bin/steamlaunch
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										1
									
								
								bin/.bin/steamlaunch
									
									
									
									
									
										Executable file
									
								
							| @ -0,0 +1 @@ | |||||||
|  | steam steam://runappid/$1 | ||||||
							
								
								
									
										17
									
								
								bin/.bin/switchkblayout
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										17
									
								
								bin/.bin/switchkblayout
									
									
									
									
									
										Executable file
									
								
							| @ -0,0 +1,17 @@ | |||||||
|  | #!/usr/bin/env bash | ||||||
|  |  | ||||||
|  | key=`setxkbmap -query | grep "layout\|variant" | awk '{print $2}' | xargs` | ||||||
|  |  | ||||||
|  | if [[ $key = "fr" ]]; then | ||||||
|  | 	setxkbmap us | ||||||
|  | elif [[ $key = "us" ]]; then | ||||||
|  | 	setxkbmap us -variant dvorak	 | ||||||
|  | elif [[ $key = "us dvorak" ]]; then | ||||||
|  | 	setxkbmap fr | ||||||
|  | else  | ||||||
|  | 	setxkbmap fr | ||||||
|  | fi | ||||||
|  |  | ||||||
|  | key=`setxkbmap -query | grep "layout\|variant" | awk '{print $2}' | xargs` | ||||||
|  | notify-send "Keyboard Layout: $key" | ||||||
|  | 	 | ||||||
							
								
								
									
										3
									
								
								bin/.bin/tordone
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										3
									
								
								bin/.bin/tordone
									
									
									
									
									
										Executable file
									
								
							| @ -0,0 +1,3 @@ | |||||||
|  | #!/bin/sh | ||||||
|  |  | ||||||
|  | notify-send "✔ Transmission-daemon" "$TR_TORRENT_NAME has completely downloaded." | ||||||
							
								
								
									
										6
									
								
								bin/.bin/transadd
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										6
									
								
								bin/.bin/transadd
									
									
									
									
									
										Executable file
									
								
							| @ -0,0 +1,6 @@ | |||||||
|  | #!/bin/sh | ||||||
|  |  | ||||||
|  | pgrep -x transmission-da >/dev/null || (transmission-daemon && notify-send "Starting transmission daemon...") && sleep 3 | ||||||
|  |  | ||||||
|  | # ssh 192.168.1.100 "transmission-remote -a \"$@\"" && notify-send "🔻 Transmission-daemon" "Torrent Added." | ||||||
|  | transmission-remote -a "$@" && notify-send "🔻 Transmission-daemon" "Torrent Added." | ||||||
							
								
								
									
										8
									
								
								bin/.bin/volume
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										8
									
								
								bin/.bin/volume
									
									
									
									
									
										Executable file
									
								
							| @ -0,0 +1,8 @@ | |||||||
|  | #!/bin/bash | ||||||
|  | if [ $(pgrep pulseaudio >/dev/null) ]; then | ||||||
|  | 	volume_command=pulseaudio-ctl | ||||||
|  | else | ||||||
|  | 	volume_command=avol | ||||||
|  | fi | ||||||
|  |  | ||||||
|  | $volume_command $@ | ||||||
							
								
								
									
										5
									
								
								bin/.bin/wacom-to-first-screen.sh
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										5
									
								
								bin/.bin/wacom-to-first-screen.sh
									
									
									
									
									
										Executable file
									
								
							| @ -0,0 +1,5 @@ | |||||||
|  | Display="DVI-D-0" #find it with xrandr | ||||||
|  |  | ||||||
|  | Stylusid=$(xinput | grep -Po 'Wacom (.*)' | grep -Po 'id=(\d*)' | grep -Po '\d*') | ||||||
|  |  | ||||||
|  | $(echo $Stylusid | tr ' ' '\n' | xargs -i xinput map-to-output {} $Display) | ||||||
							
								
								
									
										43
									
								
								bin/.bin/windowgrabber
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										43
									
								
								bin/.bin/windowgrabber
									
									
									
									
									
										Executable file
									
								
							| @ -0,0 +1,43 @@ | |||||||
|  | #!/bin/bash | ||||||
|  | # Originally by https://github.com/windelicato/ | ||||||
|  | # edited beyound recognition | ||||||
|  |  | ||||||
|  | follower() { | ||||||
|  | if [ "$(pgrep -cx windowgrabber)" = 1 ] ; then | ||||||
|  | 	bspc config pointer_follows_focus false | ||||||
|  | fi | ||||||
|  | } | ||||||
|  |  | ||||||
|  | trap 'follower' INT TERM QUIT EXIT | ||||||
|  |  | ||||||
|  | size=${2:-'20'} | ||||||
|  | dir=$1 | ||||||
|  |  | ||||||
|  | bspc config pointer_follows_focus true | ||||||
|  | # Find current window mode | ||||||
|  | is_floating() { | ||||||
|  | bspc query -T -n | grep -q '"state":"floating"' | ||||||
|  | } | ||||||
|  | # If the window is floating, move it | ||||||
|  | if is_floating; then | ||||||
|  | #only parse input if window is floating,tiled windows accept input as is | ||||||
|  |         case "$dir" in | ||||||
|  |   		west) switch="-x" | ||||||
|  |   		sign="-" | ||||||
|  |         	;; | ||||||
|  |   		east) switch="-x" | ||||||
|  |          	sign="+" | ||||||
|  |        		;; | ||||||
|  |   		north) switch="-y" | ||||||
|  |          	sign="-" | ||||||
|  |         	;; | ||||||
|  |   		*) switch="-y" | ||||||
|  |      		sign="+" | ||||||
|  |      		;; | ||||||
|  |  		esac | ||||||
|  |  xdo move ${switch} ${sign}${size} | ||||||
|  |  | ||||||
|  | # Otherwise, window is tiled: switch with window in given direction | ||||||
|  | else | ||||||
|  |         bspc node -n ${dir}.!automatic || bspc node -s ${dir} ||  bspc node -m ${dir} && bspc monitor -f | ||||||
|  | fi | ||||||
							
								
								
									
										26
									
								
								bin/.bin/windowpromoter
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										26
									
								
								bin/.bin/windowpromoter
									
									
									
									
									
										Executable file
									
								
							| @ -0,0 +1,26 @@ | |||||||
|  | #!/usr/bin/sh | ||||||
|  |  | ||||||
|  | receptacle=$(bspc query -N -n ".leaf.!window.local" | awk NR==1) | ||||||
|  |  | ||||||
|  | window_promotion() | ||||||
|  | { | ||||||
|  | 	if [ -n "$receptacle" ] > /dev/null ; then | ||||||
|  |     bspc node -n "$receptacle"  | ||||||
|  |     elif [ -z "$(bspc query -N -n last.!automatic.local)" ]; then \ | ||||||
|  |         bspc node -s biggest.!focused.local; \ | ||||||
|  |     else \ | ||||||
|  |         bspc node -n last.!automatic.local; \ | ||||||
|  |     fi  | ||||||
|  | } | ||||||
|  |  | ||||||
|  | if bspc query -N -n "@/.!automatic" > /dev/null ; then | ||||||
|  | 	bspc node -n @/ || window_promotion | ||||||
|  | 	else | ||||||
|  |     	if [ -n "$receptacle" ] > /dev/null ; then | ||||||
|  |     			bspc node -n "$receptacle"  | ||||||
|  |     		elif [ -z "$(bspc query -N -n last.!automatic.local)" ]; then \ | ||||||
|  |        			 bspc node -s biggest.!focused.local; \ | ||||||
|  |     		else \ | ||||||
|  |        			 bspc node -n last.!automatic.local; \ | ||||||
|  |     	fi  | ||||||
|  | fi | ||||||
							
								
								
									
										51
									
								
								bin/.bin/workspaces_multimonitor
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										51
									
								
								bin/.bin/workspaces_multimonitor
									
									
									
									
									
										Executable file
									
								
							| @ -0,0 +1,51 @@ | |||||||
|  | #!/bin/bash | ||||||
|  | #all_monitors=$(xrandr -q | awk '/connected/ {print $1}') | ||||||
|  | #default_screen=$(xrandr | awk '/ connected/ {print $1;exit;}') | ||||||
|  | #extra_monitors=$(xrandr -q | awk '/connected/ {print $1}' | grep -v $default_screen) | ||||||
|  |  | ||||||
|  | ##First, configure stuff with xrandr | ||||||
|  | #[[ $(who) != "" ]] && USER=$(who | grep :0\) | cut -f 1 -d ' ') || \ | ||||||
|  | #USER=$(echo /home/* | cut -f 3 -d '/') | ||||||
|  |  | ||||||
|  | #export DISPLAY=:0.0 | ||||||
|  | #export XAUTHORITY=/home/$USER/.Xauthority | ||||||
|  |  | ||||||
|  | #for monitor in $extra_monitors; do | ||||||
|  | #	prev_mon=$(xrandr | awk '/connected/ {print $1}' | grep -B1 "^$monitor" | grep -vE "^$monitor|^--$") | ||||||
|  | #	xrandr --output $monitor \ | ||||||
|  | #		--auto \ | ||||||
|  | #		--right-of $prev_mon | ||||||
|  | #done | ||||||
|  |  | ||||||
|  | ##Then, create workspaces on all monitors | ||||||
|  |   I=1 | ||||||
|  |   M=$(bspc query -M | wc -l) | ||||||
|  |   if [[ "$M" == 1 ]]; then | ||||||
|  |     bspc monitor -d I II III IV V VI VII VIII IX X | ||||||
|  |   elif [[ "$M" == 2 ]]; then | ||||||
|  |      bspc monitor $(bspc query -M | awk NR==1) -d I II III IV V | ||||||
|  |      bspc monitor $(bspc query -M | awk NR==2) -d VI VII VIII IX X | ||||||
|  |   elif [[ "$M" == 3 ]]; then | ||||||
|  |      bspc monitor $(bspc query -M | awk NR==1) -d I II III IV | ||||||
|  |      bspc monitor $(bspc query -M | awk NR==2) -d V VI VII | ||||||
|  |      bspc monitor $(bspc query -M | awk NR==3) -d VIII IX X | ||||||
|  |   elif [[ "$M" == 4 ]]; then | ||||||
|  |      bspc monitor $(bspc query -M | awk NR==1) -d I II III | ||||||
|  |      bspc monitor $(bspc query -M | awk NR==2) -d IV V VI | ||||||
|  |      bspc monitor $(bspc query -M | awk NR==3) -d VII VIII | ||||||
|  |      bspc monitor $(bspc query -M | awk NR==4) -d IX X | ||||||
|  |   elif [[ "$M" == 5 ]]; then | ||||||
|  |      bspc monitor $(bspc query -M | awk NR==1) -d I II | ||||||
|  |      bspc monitor $(bspc query -M | awk NR==2) -d III IV | ||||||
|  |      bspc monitor $(bspc query -M | awk NR==3) -d V VI | ||||||
|  |      bspc monitor $(bspc query -M | awk NR==4) -d VII VIII | ||||||
|  |      bspc monitor $(bspc query -M | awk NR==5) -d IX X | ||||||
|  |   else | ||||||
|  |     for monitor in $(bspc query -M); do | ||||||
|  |     bspc monitor $monitor \ | ||||||
|  |         -n "$I" \ | ||||||
|  |         -d $I/{a,b,c} | ||||||
|  |      let I++ | ||||||
|  |      done | ||||||
|  |   fi | ||||||
|  |  | ||||||
							
								
								
									
										1646
									
								
								bin/.config/emoji
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1646
									
								
								bin/.config/emoji
									
									
									
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
							
								
								
									
										1483
									
								
								bin/.config/fontawesome
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1483
									
								
								bin/.config/fontawesome
									
									
									
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
							
								
								
									
										121
									
								
								bspwm/.config/bspwm/bspwmrc
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										121
									
								
								bspwm/.config/bspwm/bspwmrc
									
									
									
									
									
										Executable file
									
								
							| @ -0,0 +1,121 @@ | |||||||
|  | #! /bin/sh | ||||||
|  | gap=10 | ||||||
|  | cgap=5 | ||||||
|  | PANEL_HEIGHT=25 | ||||||
|  | export gap | ||||||
|  | export cgap | ||||||
|  | export PANEL_HEIGHT | ||||||
|  |  | ||||||
|  | #This creates negative padding equal to window gap so that gaps are shown only between windows and not on desktop edges. | ||||||
|  | bspc config window_gap $(($gap+$cgap)) | ||||||
|  | bspc config top_padding $(($PANEL_HEIGHT-$gap)) | ||||||
|  | bspc config left_padding -$gap | ||||||
|  | bspc config right_padding -$gap | ||||||
|  | bspc config bottom_padding -$gap | ||||||
|  |  | ||||||
|  | #Various settings | ||||||
|  | bspc config gapless_monocle     false #Default setup uses negative padding, and gapless monocle looks really weird like that | ||||||
|  | bspc config borderless_monocle  true | ||||||
|  | bspc config single_monocle true | ||||||
|  | bspc config paddingless_monocle false | ||||||
|  | #bspc config ignore_ewmh_focus      true | ||||||
|  | #bspc config initial_polarity second_child | ||||||
|  | bspc config remove_disabled_monitors true | ||||||
|  | bspc config remove_unplugged_monitors true | ||||||
|  | ## Honor size hints: do not make windows smaller than they wish to be | ||||||
|  | #bspc config honor_size_hints true  | ||||||
|  |  | ||||||
|  | ##Color settings | ||||||
|  | bspc config focused_border_color "#1ABB9B" | ||||||
|  | bspc config normal_border_color "#2D2D2D" | ||||||
|  | #"#000000" | ||||||
|  | bspc config presel_feedback_color "#1ABB9B" | ||||||
|  | #"#8F3724" | ||||||
|  | bspc config border_width 2 | ||||||
|  |  | ||||||
|  | bspc config focus_follows_pointer true | ||||||
|  | #bspc config pointer_follows_focus true #Some keybindings automatically enable and disable this setting | ||||||
|  |  | ||||||
|  | #Settings for manual splitting | ||||||
|  | bspc config split_ratio         0.52 | ||||||
|  |  | ||||||
|  | #bspc monitor -d i ii iii iv v vi vii viii ix x | ||||||
|  | #bspc monitor -d One Two Three Four Five Six Seven Eight Nine Ten | ||||||
|  | #bspc monitor -d I II III IV V VI VII VIII IX X | ||||||
|  | #bspc monitor -d • • • • • • • • • • | ||||||
|  | #bspc monitor -d I II III IV V VI | ||||||
|  |  | ||||||
|  | ###This creates and names desktops for multiple monitors. | ||||||
|  | workspaces_multimonitor & | ||||||
|  |  | ||||||
|  | bspc rule -a screenkey --unmanage | ||||||
|  | bspc rule -a gcolor2 state=floating center=true | ||||||
|  | bspc rule -a lxappearance state=floating center=true | ||||||
|  | bspc rule -a gmrun state=floating center=true | ||||||
|  | bspc rule -a lxterminal state=floating center=true sticky=true | ||||||
|  | #bspc rule -a urxvt state=floating center=true | ||||||
|  | bspc rule -a viewnior state=floating center=true | ||||||
|  | bspc rule -a file-roller state=floating center=true | ||||||
|  | bspc rule -a floaterm state=floating center=true | ||||||
|  | bspc rule -a spotify state=pseudo_tiled | ||||||
|  | #bspc rule -a nautilus state=pseudo_tiled | ||||||
|  | #bspc rule -a skype state=pseudo_tiled | ||||||
|  | bspc rule -a file-roller state=pseudo_tiled | ||||||
|  | bspc rule -a transmission-gtk state=pseudo_tiled | ||||||
|  | bspc rule -a conky sticky=on manage=off lower=on | ||||||
|  | bspc rule -a astime sticky=on | ||||||
|  | bspc rule -a yad state=floating | ||||||
|  | bspc rule -a Docky layer=above border=off manage=on | ||||||
|  | bspc rule -a Plank layer=above border=off manage=on | ||||||
|  | bspc rule -a wbar layer=above | ||||||
|  | bspc rule -a dockbarx layer=above | ||||||
|  | bspc rule -a google-chrome-unstable private=on | ||||||
|  | bspc rule -a google-chrome-stable private=on | ||||||
|  | bspc rule -a chromium private=on | ||||||
|  | bspc rule -a firefox private=on fullscreen=on | ||||||
|  | bspc rule -a midori private=on | ||||||
|  | bspc rule -a gnome-pie border=off manage=off | ||||||
|  | bspc rule -a wpa_gui state=pseudo_tiled | ||||||
|  | bspc rule -a libreoffice state=tiled | ||||||
|  | bspc rule -a '*:libreofficedev' state=tiled | ||||||
|  | bspc rule -a '*:soffice' state=tiled | ||||||
|  | #bspc rule -a firefox desktop=I | ||||||
|  | #bspc rule -a calibre desktop=II | ||||||
|  | #bspc rule -a geany desktop=II | ||||||
|  | #bspc rule -a deluge desktop=III | ||||||
|  | bspc rule -a 9menu border=off manage=off | ||||||
|  | bspc rule -a tint2 border=off manage=off | ||||||
|  | #bspc desktop I --layout monocle | ||||||
|  | #bspc desktop II --layout monocle | ||||||
|  | bspc rule -a Godot state=pseudo_tiled | ||||||
|  | bspc rule -a arduino state=pseudo_tiled | ||||||
|  | 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 | ||||||
|  |  | ||||||
|  |  | ||||||
|  | ##  Autogap adjusts windowgap automatically according to the number of | ||||||
|  | ##  windows on the desktop. Using it disables negative window gap. | ||||||
|  | # autogap & | ||||||
|  |  | ||||||
|  | ##  This script balances all windows when new one is spawned  | ||||||
|  | #euclid_balancer & | ||||||
|  |  | ||||||
|  | ##Edge-switcher switches to next workspace when moves moves to the  | ||||||
|  | ##edge of the monitor (behavior similar to enlightenment) | ||||||
|  | #edge-switcher & | ||||||
|  |  | ||||||
|  | ###External rules | ||||||
|  | ##Pseudo automatic mode: always splits focused window when opening new window | ||||||
|  | bspc config external_rules_command /usr/bin/pseudo_automatic_mode | ||||||
|  | ##Adjust new window: splits biggest windows to keep windows about the same size | ||||||
|  | #bspc config external_rules_command /usr/bin/adjust-new-window | ||||||
|  |  | ||||||
|  | ##Autostart apps | ||||||
|  | #Keybindings daemon | ||||||
|  | sxhkd & | ||||||
|  | #Source autostartfile. Uncomment this if you use bspwm-git | ||||||
|  | #. $HOME/.config/bspwm/autostart | ||||||
|  | #limepanel & | ||||||
|  | $HOME/.config/polybar/launch.sh & | ||||||
							
								
								
									
										73
									
								
								dmenu/.bin/dmenu_recent
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										73
									
								
								dmenu/.bin/dmenu_recent
									
									
									
									
									
										Executable file
									
								
							| @ -0,0 +1,73 @@ | |||||||
|  | #!/bin/bash | ||||||
|  |  | ||||||
|  | # Originally based on code by Dieter Plaetinck. | ||||||
|  | # Pretty much re-written by Mina Nagy (mnzaki) | ||||||
|  |  | ||||||
|  | if ! [ -f "$HOME/.dmenurc" ]; then | ||||||
|  | 	cp /usr/share/dmenu/dmenurc $HOME/.dmenurc | ||||||
|  | fi | ||||||
|  | . $HOME/.dmenurc | ||||||
|  |  | ||||||
|  | #dmenu_cmd="dmenu $DMENU_OPTIONS" | ||||||
|  | dmenu_cmd="dmenu $DMENU_OPTIONS" | ||||||
|  | terminal="$TERMINAL -e" | ||||||
|  | max_recent=199 # Number of recent commands to track | ||||||
|  |  | ||||||
|  | cache_dir="${XDG_CACHE_HOME:-$HOME/.cache}/dmenu-recent" | ||||||
|  | recent_cache="$cache_dir/recent" | ||||||
|  | rest_cache="$cache_dir/all" | ||||||
|  | known_types=" background terminal terminal_hold " | ||||||
|  |  | ||||||
|  | config_dir="${XDG_CONFIG_HOME:-$HOME/.config}/dmenu-recent" | ||||||
|  | mkdir -p "$cache_dir" | ||||||
|  | mkdir -p "$config_dir" | ||||||
|  | touch "$recent_cache" | ||||||
|  |  | ||||||
|  | # Without this, it won't remember $type | ||||||
|  | GREP_OPTIONS='--color=never' | ||||||
|  |  | ||||||
|  | IFS=: | ||||||
|  | if stest -dqr -n "$rest_cache" $PATH 2>/dev/null; then | ||||||
|  |      stest -flx $PATH | sort -u | grep -vf "$recent_cache" > "$rest_cache" | ||||||
|  | fi | ||||||
|  |  | ||||||
|  | IFS=" " | ||||||
|  | cmd=$(cat "$recent_cache" "$rest_cache" | $dmenu_cmd -p run: "$@") || exit | ||||||
|  |  | ||||||
|  | if ! grep -qx "$cmd" "$recent_cache" &> /dev/null; then | ||||||
|  |     grep -vx "$cmd" "$rest_cache" > "$rest_cache.$$" | ||||||
|  |     mv "$rest_cache.$$" "$rest_cache" | ||||||
|  | fi | ||||||
|  |  | ||||||
|  | echo "$cmd" > "$recent_cache.$$" | ||||||
|  | grep -vx "$cmd" "$recent_cache" | head -n "$max_recent" >> "$recent_cache.$$" | ||||||
|  | mv "$recent_cache.$$"  "$recent_cache" | ||||||
|  |  | ||||||
|  | # Figure out how to run the command based on the command name, disregarding | ||||||
|  | # arguments, if any. | ||||||
|  | word0=${cmd%% *} | ||||||
|  | match="^$word0$" | ||||||
|  |  | ||||||
|  | get_type () { | ||||||
|  |     while type=$(echo $known_types | xargs -n1 | $dmenu_cmd -p Type:); do | ||||||
|  |         [[ $known_types =~ " $type " ]] || continue | ||||||
|  |         echo "$word0" >> "$config_dir/$type" | ||||||
|  |         break | ||||||
|  |     done | ||||||
|  |     echo $type | ||||||
|  | } | ||||||
|  |  | ||||||
|  | if ! type=$(grep -lx "$match" -R "$config_dir"); then | ||||||
|  |     type=$(get_type) | ||||||
|  | else  | ||||||
|  |     type=${type##*/} | ||||||
|  |     if ! [[ $known_types =~ " $type " ]]; then | ||||||
|  |         rm "$config_dir/$type" | ||||||
|  |         type=$(get_type) | ||||||
|  |     fi | ||||||
|  | fi | ||||||
|  |  | ||||||
|  | [[ "$type" = "background" ]] && exec $cmd | ||||||
|  | [[ "$type" = "terminal" ]] && exec $TERMINAL -e "$cmd" | ||||||
|  | [[ "$type" = "terminal_hold" ]] && | ||||||
|  |     exec $TERMINAL -e sh -c "$cmd && echo Press Enter to kill me... && read line" | ||||||
							
								
								
									
										13
									
								
								dmenu/.dmenurc
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										13
									
								
								dmenu/.dmenurc
									
									
									
									
									
										Executable file
									
								
							| @ -0,0 +1,13 @@ | |||||||
|  | #!/bin/bash | ||||||
|  | # ~/.dmenurc | ||||||
|  | #DMENU_FN="Terminus-15" | ||||||
|  | DMENU_FN="consolas-14" | ||||||
|  | #DMENU_FN="TerminessTTF Nerd Font-15" -fn $DMENU_FN | ||||||
|  | DMENU_NB="#2f343f" | ||||||
|  | DMENU_NF="#1ABB9B" | ||||||
|  | DMENU_SB="#1ABB9B" | ||||||
|  | DMENU_SF="#2f343f" | ||||||
|  | TERMINAL_CMD="st" | ||||||
|  | PANEL_HEIGHT="25" | ||||||
|  | DMENU_OPTIONS="-nb $DMENU_NB -nf $DMENU_NF -sf $DMENU_SF -sb $DMENU_SB" | ||||||
|  | export DMENU_FN DMENU_NB DMENU_NF DMENU_SF DMENU_SB DMENU_OPTIONS PANEL_HEIGHT | ||||||
							
								
								
									
										3
									
								
								feh/.bin/chwp
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										3
									
								
								feh/.bin/chwp
									
									
									
									
									
										Executable file
									
								
							| @ -0,0 +1,3 @@ | |||||||
|  | #!/bin/sh | ||||||
|  |  | ||||||
|  | /home/tonitch/.fehbg | ||||||
							
								
								
									
										4
									
								
								feh/.fehbg
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										4
									
								
								feh/.fehbg
									
									
									
									
									
										Executable file
									
								
							| @ -0,0 +1,4 @@ | |||||||
|  | #!/bin/sh | ||||||
|  | wallpaper=$(find $HOME/Pictures/wallpaper -type f | awk '!/.git/' | shuf -n 1) | ||||||
|  | echo $wallpaper > /tmp/currwallpaper.txt | ||||||
|  | feh --no-fehbg --bg-fill "$wallpaper" | ||||||
							
								
								
									
										404
									
								
								polybar/.config/polybar/config
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										404
									
								
								polybar/.config/polybar/config
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,404 @@ | |||||||
|  | ;===================================================== | ||||||
|  | ; | ||||||
|  | ;   To learn more about how to configure Polybar | ||||||
|  | ;   go to https://github.com/jaagr/polybar | ||||||
|  | ; | ||||||
|  | ;   The README contains a lot of information | ||||||
|  | ; | ||||||
|  | ;===================================================== | ||||||
|  | ; find icon name : fc-match -a |grep -i Material | ||||||
|  | ; to find icon: xfd -fa MaterialIcons, | ||||||
|  | ; echo "\ueXXX" to print and paste here | ||||||
|  |  | ||||||
|  | ;This file has been edited by squash | ||||||
|  | [colors] | ||||||
|  | background = ${xrdb:background:#222} | ||||||
|  | foreground = ${xrdb:foreground:#222} | ||||||
|  |  | ||||||
|  | dark-black = ${xrdb:color0:#222} | ||||||
|  | black = ${xrdb:color8:#222} | ||||||
|  |  | ||||||
|  | dark-red = ${xrdb:color1:#222} | ||||||
|  | red = ${xrdb:color9:#222} | ||||||
|  |  | ||||||
|  | dark-green = ${xrdb:color2:#222} | ||||||
|  | green = ${xrdb:color10:#222} | ||||||
|  |  | ||||||
|  | dark-yellow = ${xrdb:color3:#222} | ||||||
|  | yellow = ${xrdb:color11:#222} | ||||||
|  |  | ||||||
|  | dark-blue = ${xrdb:color4:#222} | ||||||
|  | blue = ${xrdb:color12:#222} | ||||||
|  |  | ||||||
|  | dark-magenta = ${xrdb:color5:#222} | ||||||
|  | magenta = ${xrdb:color13:#222} | ||||||
|  |  | ||||||
|  | dark-cyan = ${xrdb:color6:#222} | ||||||
|  | cyan = ${xrdb:color14:#222} | ||||||
|  |  | ||||||
|  | dark-white = ${xrdb:color7:#222} | ||||||
|  | white = ${xrdb:color15:#222} | ||||||
|  |  | ||||||
|  | warning = ${xrdb:color3:#222} | ||||||
|  | active-led = ${xrdb:color1:#222} | ||||||
|  |  | ||||||
|  | foreground-alt = #555 | ||||||
|  | primary = #F1FA8C | ||||||
|  | secondary = #e60053 | ||||||
|  | alert = #FF5555 | ||||||
|  |  | ||||||
|  | [bar/bspbar1] | ||||||
|  | monitor = ${env:MONITOR:DVI-D-0} | ||||||
|  | width = 100%:-10 | ||||||
|  | height = 25 | ||||||
|  | offset-x = 5 | ||||||
|  | offset-y = 5 | ||||||
|  | # radius = 12 | ||||||
|  |  | ||||||
|  | fixed-center = true | ||||||
|  |  | ||||||
|  | background = ${xrdb:background} | ||||||
|  | foreground = ${xrdb:foreground} | ||||||
|  |  | ||||||
|  | line-size = 3 | ||||||
|  |  | ||||||
|  | padding-left = 3 | ||||||
|  | padding-right = 3 | ||||||
|  |  | ||||||
|  | module-margin-left = 2 | ||||||
|  | module-margin-right = 1 | ||||||
|  |  | ||||||
|  | font-0 = Google Sans:style=bold:antialias=true:pixelsize=11;1 | ||||||
|  | font-1 = Material Icons:size=12;2 | ||||||
|  | font-2 = Iosevka:size=12;1 | ||||||
|  |  | ||||||
|  | tray-position = right | ||||||
|  | tray-background = ${colors.background} | ||||||
|  |  | ||||||
|  | modules-left = powermenu bspwm  | ||||||
|  | modules-center = xwindow | ||||||
|  | modules-right = volume date | ||||||
|  |  | ||||||
|  | wm-restack = bspwm | ||||||
|  |  | ||||||
|  | [bar/bspbar2] | ||||||
|  | monitor = ${env:MONITOR:HDMI-0} | ||||||
|  | width = 1910 | ||||||
|  | height = 25 | ||||||
|  | offset-x = 5 | ||||||
|  | offset-y = 5 | ||||||
|  | # radius = 12 | ||||||
|  |  | ||||||
|  | fixed-center = true | ||||||
|  |  | ||||||
|  | background = ${xrdb:background} | ||||||
|  | foreground = ${xrdb:foreground} | ||||||
|  |  | ||||||
|  | line-size = 3 | ||||||
|  |  | ||||||
|  | padding-left = 3 | ||||||
|  | padding-right = 3 | ||||||
|  |  | ||||||
|  | module-margin-left = 2 | ||||||
|  | module-margin-right = 1 | ||||||
|  |  | ||||||
|  | font-0 = Google Sans:style=bold:antialias=true:pixelsize=11;1 | ||||||
|  | font-1 = Material Icons:size=12;2 | ||||||
|  |  | ||||||
|  | font-2 = Iosevka:size=12;1 | ||||||
|  |  | ||||||
|  | modules-left = bspwm | ||||||
|  | modules-center = xwindow | ||||||
|  | modules-right = spotify cpu memory network | ||||||
|  |  | ||||||
|  | tray-position = right | ||||||
|  | tray-background = ${colors.background} | ||||||
|  |  | ||||||
|  | wm-restack = bspwm | ||||||
|  |  | ||||||
|  | [module/xwindow] | ||||||
|  | type = internal/xwindow | ||||||
|  | label = %title:0:35:...% | ||||||
|  |  | ||||||
|  | [module/wlan] | ||||||
|  |  | ||||||
|  | type = internal/network | ||||||
|  | interface = wlp2s0  | ||||||
|  | interval = 3.0 | ||||||
|  |  | ||||||
|  | format-connected = <ramp-signal> <label-connected> | ||||||
|  | ;format-connected-underline = ${colors.primary} | ||||||
|  | label-connected = %essid% | ||||||
|  |  | ||||||
|  | format-disconnected = | ||||||
|  | ;format-disconnected = <label-disconnected> | ||||||
|  | ;format-disconnected-underline = ${self.format-connected-underline} | ||||||
|  | ;label-disconnected = %ifname% disconnected | ||||||
|  | ;label-disconnected-foreground = ${colors.foreground-alt} | ||||||
|  |  | ||||||
|  | ramp-signal-0 =  | ||||||
|  | ramp-signal-1 =  | ||||||
|  | ramp-signal-2 =  | ||||||
|  | ramp-signal-3 =  | ||||||
|  | ramp-signal-4 =  | ||||||
|  | ramp-signal-foreground = ${colors.foreground-alt} | ||||||
|  |  | ||||||
|  | [module/filesystem] | ||||||
|  | type = internal/fs | ||||||
|  | interval = 25 | ||||||
|  |  | ||||||
|  | mount-0 = / | ||||||
|  | format-mounted-prefix = " " | ||||||
|  | label-mounted = %{F#0a81f5}%mountpoint%%{F-}: %percentage_used%% | ||||||
|  | label-unmounted = %mountpoint% not mounted | ||||||
|  | label-unmounted-foreground = ${colors.foreground-alt} | ||||||
|  |  | ||||||
|  | [module/bspwm] | ||||||
|  | type = internal/bspwm | ||||||
|  | module-margin-left = 4 | ||||||
|  | module-margin-right = 4 | ||||||
|  |  | ||||||
|  | index-sort = true | ||||||
|  | fuzzy-match = true | ||||||
|  |  | ||||||
|  | format = <label-state> <label-mode> | ||||||
|  |  | ||||||
|  | ws-icon-0 = "" | ||||||
|  | ws-icon-1 = "♛" | ||||||
|  | ws-icon-2 = graphics;♜ | ||||||
|  | ws-icon-3 = mail;♝ | ||||||
|  | ws-icon-4 = web;♞ | ||||||
|  |  | ||||||
|  | label-focused = %name% | ||||||
|  | label-focused-background = ${xrdb:background} | ||||||
|  | label-focused-underline= ${xrdb:color9} | ||||||
|  | label-focused-padding = 1 | ||||||
|  |  | ||||||
|  | label-occupied = %name% | ||||||
|  | label-occupied-foreground = ${xrdb:foreground} | ||||||
|  | label-occupied-padding = 1 | ||||||
|  |  | ||||||
|  | label-urgent = %name% | ||||||
|  | label-urgent-background = ${xrdb:color3} | ||||||
|  | label-urgent-padding = 1 | ||||||
|  |  | ||||||
|  | label-empty = %name% | ||||||
|  | label-empty-foreground = ${xrdb:color8} | ||||||
|  | label-empty-padding = 1 | ||||||
|  |  | ||||||
|  | [module/spotify] | ||||||
|  | type = custom/script | ||||||
|  | interval = 1 | ||||||
|  | format-prefix = " " | ||||||
|  | format = <label> | ||||||
|  | exec = python $HOME/.config/polybar/polybar-spotify/spotify_status.py -f '{artist}: {song}' | ||||||
|  | format-underline = #1db954 | ||||||
|  | ;control players (optional) | ||||||
|  | click-left = playerctl --player=spotify play-pause  | ||||||
|  | click-right = playerctl --player=spotify next  | ||||||
|  | click-middle = playerctl --player=spotify previous  | ||||||
|  |  | ||||||
|  | [module/mpd] | ||||||
|  | type = internal/mpd | ||||||
|  | format-online = <icon-prev> <toggle> <icon-next> <label-song> | ||||||
|  | # format-online = <icon-prev> <toggle> <icon-next> <label-song>   |   <bar-progress> | ||||||
|  |  | ||||||
|  | format-online-underline = ${colors.dark-yellow} | ||||||
|  | host = 127.0.0.1 | ||||||
|  | port = 6600 | ||||||
|  | icon-prev =  | ||||||
|  | icon-stop =  | ||||||
|  | icon-play =  | ||||||
|  | icon-pause =  | ||||||
|  | icon-next =  | ||||||
|  |  | ||||||
|  | label-song-maxlen = 35 | ||||||
|  | label-song-ellipsis = true | ||||||
|  |  | ||||||
|  | bar-progress-width = 10 | ||||||
|  | bar-progress-indicator = "" | ||||||
|  | bar-progress-fill = ━ | ||||||
|  | bar-progress-empty = ━ | ||||||
|  |  | ||||||
|  | [module/volume] | ||||||
|  | type = internal/pulseaudio | ||||||
|  |  | ||||||
|  | format-volume = <label-volume> <bar-volume> | ||||||
|  | format-volume-underline = ${colors.dark-green} | ||||||
|  | label-volume = " " | ||||||
|  | label-volume-foreground = ${colors.foreground} | ||||||
|  |  | ||||||
|  |  | ||||||
|  | format-muted-prefix = " " | ||||||
|  | format-muted-foreground = ${colors.foreground-alt} | ||||||
|  | format-muted-underline = ${colors.foreground-alt} | ||||||
|  | label-muted = sound muted | ||||||
|  |  | ||||||
|  | bar-volume-width = 10 | ||||||
|  | bar-volume-foreground-0 = ${xrdb:color2} | ||||||
|  | bar-volume-foreground-1 = ${xrdb:color2} | ||||||
|  | bar-volume-foreground-2 = ${xrdb:color2} | ||||||
|  | bar-volume-foreground-3 = ${xrdb:color2} | ||||||
|  | bar-volume-foreground-4 = ${xrdb:color2} | ||||||
|  | bar-volume-foreground-5 = ${xrdb:color3} | ||||||
|  | bar-volume-foreground-6 = ${xrdb:color1} | ||||||
|  | bar-volume-underline = ${xrdb:color1} | ||||||
|  | bar-volume-gradient = true | ||||||
|  | bar-volume-indicator = ━ | ||||||
|  | bar-volume-indicator-font = 1 | ||||||
|  | bar-volume-fill = ━ | ||||||
|  | bar-volume-fill-font = 1 | ||||||
|  | bar-volume-empty = ━ | ||||||
|  | bar-volume-empty-font = 1 | ||||||
|  | bar-volume-empty-foreground = ${xrdb:color0} | ||||||
|  |  | ||||||
|  | [module/network] | ||||||
|  | type = internal/network | ||||||
|  | interface = enp3s0  | ||||||
|  |  | ||||||
|  | format-connected-prefix = "%{T3} %{T-}" | ||||||
|  | format-connected-prefix-foreground = ${colors.foreground} | ||||||
|  | format-connected-prefix-background = ${colors.background} | ||||||
|  | format-connected-underline = ${colors.dark-magenta} | ||||||
|  |  | ||||||
|  | format-connected = <label-connected> | ||||||
|  | format-connected-foreground = ${colors.foreground} | ||||||
|  | format-connected-background = ${colors.background} | ||||||
|  |  | ||||||
|  | label-connected = "%{A1:nm-connection-editor:}%downspeed:9%%{A}" | ||||||
|  | label-connected-foreground = ${colors.foreground} | ||||||
|  | label-connected-background = ${colors.background} | ||||||
|  |  | ||||||
|  | format-disconnected-prefix = "%{T3} %{T-}" | ||||||
|  | format-disconnected-prefix-foreground = ${colors.black} | ||||||
|  | format-disconnected-prefix-background = ${colors.background} | ||||||
|  | format-disconnected-underline = ${colors.black} | ||||||
|  |  | ||||||
|  | format-disconnected = <label-disconnected> | ||||||
|  | format-disconnected-foreground = ${colors.black} | ||||||
|  | format-disconnected-background = ${colors.background} | ||||||
|  |  | ||||||
|  | label-disconnected = "-" | ||||||
|  | label-disconnected-foreground = ${colors.black} | ||||||
|  | label-disconnected-background = ${colors.background} | ||||||
|  |  | ||||||
|  | [module/battery] | ||||||
|  |  | ||||||
|  | type = internal/battery | ||||||
|  | battery = BAT1 | ||||||
|  | adapter = ACAD | ||||||
|  | full-at = 98 | ||||||
|  |  | ||||||
|  | format-charging = <animation-charging> <label-charging> | ||||||
|  | format-charging-underline = ${xrdb:color3} | ||||||
|  | animation-charging-0 =  | ||||||
|  | animation-charging-1 =  | ||||||
|  |  | ||||||
|  | format-discharging = <label-discharging> | ||||||
|  | label-discharging =  %percentage%% | ||||||
|  | format-discharging-underline = ${xrdb:color5} | ||||||
|  |  | ||||||
|  | format-full-prefix = " " | ||||||
|  | format-full-prefix-foreground = ${colors.foreground-alt} | ||||||
|  | format-full-underline = ${xrdb:color2} | ||||||
|  |  | ||||||
|  | ramp-capacity-foreground = ${colors.foreground-alt} | ||||||
|  |  | ||||||
|  | animation-charging-foreground = ${colors.foreground-alt} | ||||||
|  | animation-charging-framerate = 750 | ||||||
|  |  | ||||||
|  | [module/cpu] | ||||||
|  | type = internal/cpu | ||||||
|  | interval = 2 | ||||||
|  | format-prefix = "%{F#fff} %{F-} " | ||||||
|  | format-prefix-foreground = ${colors.foreground-alt} | ||||||
|  | format-underline = ${xrdb:color6} | ||||||
|  | label = %percentage%% | ||||||
|  |  | ||||||
|  | [module/memory] | ||||||
|  | type = internal/memory | ||||||
|  | interval = 2 | ||||||
|  | format-prefix = "%{F#fff} %{F-}" | ||||||
|  | format-prefix-foreground = ${colors.foreground-alt} | ||||||
|  | format-underline = ${xrdb:color1} | ||||||
|  | label = %percentage_used%% | ||||||
|  |  | ||||||
|  | [module/date] | ||||||
|  | type = internal/date | ||||||
|  | interval = 5 | ||||||
|  |  | ||||||
|  | date = " %A, %d %B" | ||||||
|  |  | ||||||
|  | time = %H:%M | ||||||
|  |  | ||||||
|  | format-prefix = " " | ||||||
|  | format-prefix-foreground = ${colors.foreground} | ||||||
|  | format-underline = ${xrdb:color4} | ||||||
|  |  | ||||||
|  | label = %time% %date% | ||||||
|  |  | ||||||
|  | [module/temperature] | ||||||
|  | type = internal/temperature | ||||||
|  | thermal-zone = 0 | ||||||
|  | warn-temperature = 60 | ||||||
|  |  | ||||||
|  | format = <ramp> <label> | ||||||
|  | format-underline = #f50a4d | ||||||
|  | format-warn = <ramp> <label-warn> | ||||||
|  | format-warn-underline = ${self.format-underline} | ||||||
|  |  | ||||||
|  | label = %temperature% | ||||||
|  | label-warn = %temperature% | ||||||
|  | label-warn-foreground = ${colors.secondary} | ||||||
|  |  | ||||||
|  | ramp-0 =  | ||||||
|  | ramp-1 =  | ||||||
|  | ramp-2 =  | ||||||
|  | ramp-foreground = ${colors.foreground-alt} | ||||||
|  |  | ||||||
|  | [module/powermenu] | ||||||
|  | type = custom/menu | ||||||
|  |  | ||||||
|  | expand-right = true | ||||||
|  |  | ||||||
|  | label-open = "  " | ||||||
|  | label-open-foreground = ${colors.dark-red} | ||||||
|  | label-open-underline = ${colors.dark-red} | ||||||
|  |  | ||||||
|  | label-close = "  " | ||||||
|  | label-close-foreground = ${colors.white} | ||||||
|  | label-close-underline = ${colors.white} | ||||||
|  |  | ||||||
|  | menu-0-0 = "  " | ||||||
|  | menu-0-0-foreground = ${colors.dark-cyan} | ||||||
|  | menu-0-0-underline = ${colors.dark-cyan} | ||||||
|  | menu-0-0-exec = betterlockscreen -l | ||||||
|  |  | ||||||
|  | menu-0-1 = "  " | ||||||
|  | menu-0-1-foreground = ${colors.dark-green} | ||||||
|  | menu-0-1-underline = ${colors.dark-green} | ||||||
|  | menu-0-1-exec = kill -9 -1 | ||||||
|  |  | ||||||
|  | menu-0-2 = "  " | ||||||
|  | menu-0-2-foreground = ${colors.dark-yellow} | ||||||
|  | menu-0-2-underline = ${colors.dark-yellow} | ||||||
|  | menu-0-2-exec = shutdown -r now | ||||||
|  |  | ||||||
|  | menu-0-3 = "  " | ||||||
|  | menu-0-3-foreground = ${colors.dark-red} | ||||||
|  | menu-0-3-underline = ${colors.dark-red} | ||||||
|  | menu-0-3-exec = shutdown -h now | ||||||
|  |  | ||||||
|  | [settings] | ||||||
|  | screenchange-reload = true | ||||||
|  | compositing-background = xor | ||||||
|  | ;compositing-background = screen | ||||||
|  | compositing-foreground = source | ||||||
|  | ;compositing-border = over | ||||||
|  |  | ||||||
|  | [global/wm] | ||||||
|  | margin-top = -10 | ||||||
|  | margin-bottom = -10 | ||||||
|  |  | ||||||
|  |  | ||||||
|  | ; vim:ft=dosini | ||||||
							
								
								
									
										8
									
								
								polybar/.config/polybar/launch.sh
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										8
									
								
								polybar/.config/polybar/launch.sh
									
									
									
									
									
										Executable file
									
								
							| @ -0,0 +1,8 @@ | |||||||
|  | #!/bin/sh | ||||||
|  |  | ||||||
|  | killall -q polybar | ||||||
|  |  | ||||||
|  | polybar bspbar1 >> /tmp/polybar1.log 2>&1 & | ||||||
|  | polybar bspbar2 >> /tmp/polybar1.log 2>&1 & | ||||||
|  |  | ||||||
|  | echo "Bars launched..." | ||||||
							
								
								
									
										1
									
								
								polybar/.config/polybar/polybar-spotify
									
									
									
									
									
										Submodule
									
								
							
							
								
								
								
								
								
							
						
						
									
										1
									
								
								polybar/.config/polybar/polybar-spotify
									
									
									
									
									
										Submodule
									
								
							 Submodule polybar/.config/polybar/polybar-spotify added at 5edc2e598c
									
								
							
							
								
								
									
										7
									
								
								stowed.list
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										7
									
								
								stowed.list
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,7 @@ | |||||||
|  | bin | ||||||
|  | bspwm | ||||||
|  | dmenu | ||||||
|  | feh | ||||||
|  | polybar | ||||||
|  | sxhkd | ||||||
|  | vim | ||||||
							
								
								
									
										331
									
								
								sxhkd/.config/sxhkd/sxhkdrc
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										331
									
								
								sxhkd/.config/sxhkd/sxhkdrc
									
									
									
									
									
										Executable file
									
								
							| @ -0,0 +1,331 @@ | |||||||
|  | # bspwm hotkeys | ||||||
|  | # | ||||||
|  | # Cleanly quit bspwm | ||||||
|  | super + shift + a | ||||||
|  | 	bspc quit 1 && pkill lemonpanel && pkill lemonbar | ||||||
|  |  | ||||||
|  | # Show keybindings | ||||||
|  | super + F1 | ||||||
|  | 	$TERMINAL -e keybindings.sh | ||||||
|  | # | ||||||
|  | # Window manipulation | ||||||
|  | # ______________ | ||||||
|  |  | ||||||
|  | # Close window | ||||||
|  | super + x | ||||||
|  | 	bspc  node -c | ||||||
|  |  | ||||||
|  | # Kill window | ||||||
|  | super + shift + x | ||||||
|  | 	bspc  node -k | ||||||
|  |  | ||||||
|  | # Toggle tiling mode of window | ||||||
|  | super + shift + t | ||||||
|  | 	bspc node -t {pseudo_tiled,tiled} | ||||||
|  | super + t | ||||||
|  | 	{bspc node -t floating && window-placer $(bspc query -T -d | grep -o '"state":"floating"' | wc -l),bspc node -t tiled} | ||||||
|  | # Force all windows of the desktop to tile | ||||||
|  | super + ctrl + t | ||||||
|  | 	bspcp tile | ||||||
|  | # Force all windows of the desktop to float and arrange them | ||||||
|  | super + ctrl + shift + t | ||||||
|  | 	bspcp float | ||||||
|  | 	 | ||||||
|  | # Toggle fullscreen | ||||||
|  | super + shift + f  | ||||||
|  | 	bspc node -t {fullscreen,tiled}	 | ||||||
|  |  | ||||||
|  | # Try to keep size and position of the selected window | ||||||
|  | super + o | ||||||
|  | 	bspc node -g private | ||||||
|  |  | ||||||
|  | # Make window sticky | ||||||
|  | super + i | ||||||
|  | 	bspc node -g sticky | ||||||
|  |  | ||||||
|  | super + h | ||||||
|  | 	bspc node -g hidden | ||||||
|  |  | ||||||
|  | super + H | ||||||
|  | 	WindowMinimiser | ||||||
|  |  | ||||||
|  | # Lock a window from closing | ||||||
|  | super + Escape | ||||||
|  | 	bspc node -g locked  | ||||||
|  |  | ||||||
|  | # | ||||||
|  | # Window moving and splitting | ||||||
|  | # ______________     | ||||||
|  |  | ||||||
|  | # Autopresel (split window in its largest dimension) | ||||||
|  | super + ctrl + Return | ||||||
|  | 	auto-presel | ||||||
|  | 	 | ||||||
|  | # Presel window for splitting in certain direction | ||||||
|  | alt + ctrl + {q,s,z,d} | ||||||
|  | 	bspc node -p \~{west,south,north,east} -i | ||||||
|  |  | ||||||
|  | alt + ctrl + {h,j,k,l} | ||||||
|  | 	bspc node -p \~{west,south,north,east} | ||||||
|  |  | ||||||
|  | alt + ctrl + {Left,Down,Up,Right} | ||||||
|  | 	bspc node -p \~{west,south,north,east} | ||||||
|  |  | ||||||
|  | # Presel the desktop for splitting in certain direction | ||||||
|  | alt + shift + {q,s,z,d} | ||||||
|  | 	bspc node @/ -p \~{west,south,north,east} | ||||||
|  |  | ||||||
|  | alt + shift + {h,j,k,l} | ||||||
|  | 	bspc node @/ -p \~{west,south,north,east} | ||||||
|  |  | ||||||
|  | alt + shift + {Left,Down,Up,Right} | ||||||
|  | 	bspc node @/ -p \~{west,south,north,east} | ||||||
|  | # Set splitting ratio of windows | ||||||
|  | alt + ctrl + {1-9} | ||||||
|  | 	bspc node -o 0.{1-9} | ||||||
|  | 		 | ||||||
|  | # Move current window to largest space or preselected area if there is one. | ||||||
|  | super + Return | ||||||
|  |     windowpromoter | ||||||
|  |  | ||||||
|  | # # Create a new "master area", splitting the whole desktop instead of just windows. | ||||||
|  | # alt + Return | ||||||
|  | # 	bspc node -n @/ | ||||||
|  | 	 | ||||||
|  | # go (Shift=move) to desktop (and focus the monitor that the desktop is located on. Bspwm style) | ||||||
|  | super + {_,shift + }{ampersand,eacute,quotedbl,apostrophe,parenleft,minus,egrave,underscore,ccedilla,agrave} | ||||||
|  |     bspc {desktop -f,node -d} ^{1-9,10} | ||||||
|  |  | ||||||
|  | ## Alternative: i3 style behavior (focus nth, desktop of the focused monitor) | ||||||
|  | #super + {ampersand,eacute,quotedbl,apostrophe,parenleft,minus,egrave,underscore,ccedilla,agrave} | ||||||
|  | #	focusdesktopofthismonitor {1-9} | ||||||
|  | #super + shift + {ampersand,eacute,quotedbl,apostrophe,parenleft,minus,egrave,underscore,ccedilla,agrave} | ||||||
|  | #	movetodesktopofthismonitor {1-9,10} | ||||||
|  |  | ||||||
|  | ## Another alternative: xmonad style desktops. You have 10 desktops shared between all monitors, | ||||||
|  | ## and focusing a desktop focuses it on the currently focused monitor | ||||||
|  | #super + {ampersand,eacute,quotedbl,apostrophe,parenleft,minus,egrave,underscore,ccedilla,agrave} | ||||||
|  | #	summondesktop.sh {1-9,10} | ||||||
|  | #super + shift + {ampersand,eacute,quotedbl,apostrophe,parenleft,minus,egrave,underscore,ccedilla,agrave} | ||||||
|  | #	bspc node -d ^{1-9,10} | ||||||
|  |  | ||||||
|  | # Select previous / next desktop | ||||||
|  | super + {m,n} | ||||||
|  | 	bspc desktop -f {prev.occupied,next.occupied}  | ||||||
|  |  | ||||||
|  | # cycle windows | ||||||
|  | alt + {_,shift + }Tab | ||||||
|  |     bspc node -f {next,prev} | ||||||
|  |  | ||||||
|  | # Go to specific window | ||||||
|  | super + Tab | ||||||
|  | 	WindowSelector | ||||||
|  | 	 | ||||||
|  | #Focus windows by direction, works with multihead | ||||||
|  | super +  {q,s,z,d} | ||||||
|  |     focusmover {west,south,north,east} | ||||||
|  |  | ||||||
|  | super +  {h,j,k,l} | ||||||
|  |     focusmover {west,south,north,east} | ||||||
|  |  | ||||||
|  | super +  {Left,Down,Up,Right} | ||||||
|  |     focusmover {west,south,north,east} | ||||||
|  |         	 | ||||||
|  | # Move tiled windows. Moving a tiled window to  | ||||||
|  | # preselected one moves into preselection instead.  | ||||||
|  | # Moving out of the screen should move the window to next monitor if possible | ||||||
|  | super + shift + {q,s,z,d} | ||||||
|  | 	windowgrabber {west,south,north,east} | ||||||
|  |  | ||||||
|  | super + shift + {h,j,k,l} | ||||||
|  | 	windowgrabber {west,south,north,east} | ||||||
|  | 	 | ||||||
|  | # Different style of movement: transplant into window in chosen direction | ||||||
|  | super + shift + {Left,Down,Up,Right} | ||||||
|  | 	euclid_mover {west,south,north,east} | ||||||
|  |  | ||||||
|  | #resize windows | ||||||
|  | super + ctrl + {q,s,z,d} | ||||||
|  | 	bspwm_resize.sh {west,south,north,east} | ||||||
|  |  | ||||||
|  | super + ctrl + {h,j,k,l} | ||||||
|  | 	bspwm_resize.sh {west,south,north,east} | ||||||
|  | 	 | ||||||
|  | super + ctrl + {Left,Down,Up,Right} | ||||||
|  | 	bspwm_resize.sh {west,south,north,east} | ||||||
|  |  | ||||||
|  | # | ||||||
|  | # Layout manipulation/desktop level controls | ||||||
|  | # ______________     | ||||||
|  |  | ||||||
|  | # Toggle monocle mode | ||||||
|  | super + f  | ||||||
|  | 	bspc desktop -l next | ||||||
|  | 	 | ||||||
|  | # Balance tree | ||||||
|  | super + b | ||||||
|  | 	bspc node @/ -B | ||||||
|  |  | ||||||
|  | # Balance brother node. If you do this on biggest window of the desktop, it usually means balancing all windows with except the biggest. | ||||||
|  | super + alt + b | ||||||
|  | 	bspc node @brother -B | ||||||
|  | 	 | ||||||
|  | # Undo balancing (equalize windows) | ||||||
|  | super + ctrl + b | ||||||
|  | 	bspc node @/ -E | ||||||
|  |  | ||||||
|  | # Toggle automatic balancing of windows | ||||||
|  | alt + b | ||||||
|  | 	euclid_balancer | ||||||
|  |  | ||||||
|  | # Mirror and flip leaves of tree | ||||||
|  | super + {comma,period} | ||||||
|  | 	bspc node @/ -F {horizontal,vertical} | ||||||
|  | 	 | ||||||
|  | # Rotate leaves of tree | ||||||
|  | super + shift + {comma,period} | ||||||
|  | 	bspc node @/ -R {90,270} | ||||||
|  |  | ||||||
|  | # Change window gap | ||||||
|  |  | ||||||
|  | super + g | ||||||
|  | 	bspc config -d focused window_gap {$gap,$(($gap+$gap)),$(($gap+$gap+$gap))} | ||||||
|  |  | ||||||
|  | super + button{4,5} | ||||||
|  | 	bspc config -d focused window_gap $((`bspc config -d focused window_gap` {+,-} 2 )) | ||||||
|  | # | ||||||
|  | # mouse bindings | ||||||
|  | # __________________ | ||||||
|  |  | ||||||
|  | ~button1 | ||||||
|  | 	DidIClickDesktop.sh && gapgrab | ||||||
|  |  | ||||||
|  | ~button2 | ||||||
|  | 	DidIClickDesktop.sh && mygtkmenui -- .config/GTKmenu/BspwmDesktopMenui | ||||||
|  | 		 | ||||||
|  | ~button3 | ||||||
|  | 	DidIClickDesktop.sh && mygtkmenui -- .config/GTKmenu/LaunchMenu | ||||||
|  |  | ||||||
|  | # Switch workspace by scrolling on the desktop. Causes scrolling issues on some systems. | ||||||
|  | #~button4 | ||||||
|  | #	DidIClickDesktop.sh && bspc desktop -f next | ||||||
|  | #~button5 | ||||||
|  | #	DidIClickDesktop.sh && bspc desktop -f prev | ||||||
|  | 	 | ||||||
|  | ### Add or remove desktops by scrolling | ||||||
|  | super + ctrl + button5 | ||||||
|  |     bspcp dsktp rm | ||||||
|  |  | ||||||
|  | super + ctrl + button4 | ||||||
|  |     bspcp dsktp add | ||||||
|  |  | ||||||
|  | # Spawn applications popup menu and manually tile selected  | ||||||
|  | # app where your mouse was when you opened the menu. Smartsplit only chooses | ||||||
|  | # biggest dimension of the window, MouseLaunch only cares which edge is closer. | ||||||
|  | # mod5 is alt_gr (first key right from space) on most keyboards.  | ||||||
|  | mod5 + @button1 | ||||||
|  |     MouseLaunch ; mygtkmenui -- .config/GTKmenu/LaunchMenu | ||||||
|  | #	smartsplit ; dboxmenu | ||||||
|  |  | ||||||
|  | # Spawn window manipulation menu | ||||||
|  | # Mod1 is alt | ||||||
|  | #    BspwmWindowMenu | ||||||
|  | #mod1 + @button1 | ||||||
|  | #    mygtkmenui -- .config/GTKmenu/BspwmWindowMenui | ||||||
|  |  | ||||||
|  |  | ||||||
|  | # | ||||||
|  | # Touchpad "gestures" (depend on your touchpad driver, very likely to be unavailable) | ||||||
|  | #_____________________ | ||||||
|  |      | ||||||
|  | # | ||||||
|  | # spawn programs | ||||||
|  | # | ||||||
|  |  | ||||||
|  | # run applications | ||||||
|  | super + space | ||||||
|  | 	dmenu_recent -i -l 14 -w 600 -y $PANEL_HEIGHT | ||||||
|  |  | ||||||
|  | super + p | ||||||
|  | 	st spt | ||||||
|  |  | ||||||
|  | super + shift + Return | ||||||
|  | 	st	 | ||||||
|  |  | ||||||
|  | super + z | ||||||
|  | 	st	 | ||||||
|  |  | ||||||
|  | super + shift + z | ||||||
|  | 	open-terminal-here | ||||||
|  | 	 | ||||||
|  | super + r | ||||||
|  | 	rofi-finder.sh | ||||||
|  |  | ||||||
|  | super + shift + b | ||||||
|  | 	$BROWSER | ||||||
|  |     		 | ||||||
|  | super + e | ||||||
|  | 	spacefm -n | ||||||
|  |  | ||||||
|  | ctrl + alt + n  | ||||||
|  | 	switchkblayout | ||||||
|  |  | ||||||
|  | super + shift + e | ||||||
|  | 	st ranger | ||||||
|  |  | ||||||
|  | super + shift + n | ||||||
|  | 	newsboat | ||||||
|  |  | ||||||
|  | Print | ||||||
|  | 	scrot -s | ||||||
|  |  | ||||||
|  | # | ||||||
|  | # Media keys | ||||||
|  | # | ||||||
|  |  | ||||||
|  | XF86AudioRaiseVolume | ||||||
|  | 	volume up | ||||||
|  |  | ||||||
|  | XF86AudioLowerVolume | ||||||
|  | 	volume down | ||||||
|  |  | ||||||
|  | XF86AudioMute | ||||||
|  | 	volume mute | ||||||
|  | 	 | ||||||
|  | XF86MonBrightnessDown | ||||||
|  |  xbacklight -dec 10 | ||||||
|  |  | ||||||
|  | XF86MonBrightnessUp | ||||||
|  |  xbacklight -inc 10 | ||||||
|  |   | ||||||
|  |  | ||||||
|  | XF86Sleep | ||||||
|  | 	systemctl suspend | ||||||
|  |  | ||||||
|  | XF86AudioPlay | ||||||
|  | 	playerctl play-pause  | ||||||
|  |  | ||||||
|  | XF86AudioPlay | ||||||
|  | 	playerctl stop | ||||||
|  |  | ||||||
|  | XF86AudioPrev | ||||||
|  | 	playerctl previous | ||||||
|  |  | ||||||
|  | XF86AudioNext | ||||||
|  | 	playerctl next | ||||||
|  |  | ||||||
|  | # make sxhkd reload its configuration files: | ||||||
|  | super + shift + Escape | ||||||
|  | 	pkill -USR1 -x sxhkd | ||||||
|  |  | ||||||
|  | # In case bspwmrc fails to execute/you wish have plugged in a new monitor | ||||||
|  | super + shift + r | ||||||
|  | 	bspwmrc | ||||||
|  | # Toggle compositing | ||||||
|  | super + ctrl + space | ||||||
|  | 	{pkill picom ,\ | ||||||
|  | 	picom -b } | ||||||
|  |  | ||||||
|  | # Remove receptacles | ||||||
|  | super + BackSpace | ||||||
|  |   for i in $(bspc query -N -n .leaf.!window.local); do bspc node $i -k; done | ||||||
							
								
								
									
										4
									
								
								vim/.vim/UltiSnips/c.snippets
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								vim/.vim/UltiSnips/c.snippets
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,4 @@ | |||||||
|  | snippet pline "print a line" i | ||||||
|  | printf("----------------------------------------\n"); | ||||||
|  | endsnippet | ||||||
|  | 	 | ||||||
							
								
								
									
										2
									
								
								vim/.vim/UltiSnips/htmljinja.snippets
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										2
									
								
								vim/.vim/UltiSnips/htmljinja.snippets
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,2 @@ | |||||||
|  | extends jinja | ||||||
|  | extends html | ||||||
							
								
								
									
										49
									
								
								vim/.vim/UltiSnips/markdown_tex.snippets
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										49
									
								
								vim/.vim/UltiSnips/markdown_tex.snippets
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,49 @@ | |||||||
|  | # Md related | ||||||
|  |  | ||||||
|  | snippet check "put a open check box" | ||||||
|  | - [ ] ${1:${VISUAL:item}} $0 | ||||||
|  | endsnippet | ||||||
|  |  | ||||||
|  | # Tex related | ||||||
|  | snippet tex "Inline Latex" i | ||||||
|  | \\\\( ${1:${VISUAL}} \\\\) $0 | ||||||
|  | endsnippet | ||||||
|  |  | ||||||
|  | snippet Tex "Latex block" b | ||||||
|  | \\\\[ | ||||||
|  | 	${1:${VISUAL}} | ||||||
|  | \\\\] | ||||||
|  | $0 | ||||||
|  | endsnippet | ||||||
|  |  | ||||||
|  | snippet bb "mathbb" i | ||||||
|  | \mathbb{${1:${VISUAL:R}}} $0 | ||||||
|  | endsnippet | ||||||
|  |  | ||||||
|  | snippet text "implement text in tex" i | ||||||
|  | \text{ ${1:${VISUAL:text}} } $0 | ||||||
|  | endsnippet | ||||||
|  |  | ||||||
|  | snippet br "break a line in tex mode" i | ||||||
|  | \\\\\\\\ | ||||||
|  | $0 | ||||||
|  | endsnippet | ||||||
|  |  | ||||||
|  | snippet frac "fractions" i | ||||||
|  | \frac{$1}{$2} $0 | ||||||
|  | endsnippet | ||||||
|  |  | ||||||
|  | snippet beg "Beggin and end with the cursor on the type" i | ||||||
|  | \begin{${1:matrix}}} | ||||||
|  | 	${2:${VISUAL}} | ||||||
|  | \end{$1} | ||||||
|  | endsnippet | ||||||
|  |  | ||||||
|  | snippet set "prepare for a set in tex {}" i | ||||||
|  | \\\\{ ${1:${VISUAL:e}} \\\\} $0 | ||||||
|  | endsnippet | ||||||
|  |  | ||||||
|  | priority -1 | ||||||
|  | snippet "(\w+)" "latex default" r | ||||||
|  | \\`!p snip.rv = match.group(1)` $1 | ||||||
|  | endsnippet | ||||||
							
								
								
									
										23
									
								
								vim/.vim/compiler/esp.vim
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										23
									
								
								vim/.vim/compiler/esp.vim
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,23 @@ | |||||||
|  | " Vim compiler file modified for llvm esp | ||||||
|  | " Compiler:            	llvm  | ||||||
|  | " Previous Maintainer:  Nikolai Weibull <now@bitwi.se> | ||||||
|  | " Latest Revision:     	2023-10-19  | ||||||
|  | " 						forking by tonitch | ||||||
|  |  | ||||||
|  | if exists("current_compiler") | ||||||
|  |   finish | ||||||
|  | endif | ||||||
|  | let current_compiler = "esp" | ||||||
|  |  | ||||||
|  | let s:cpo_save = &cpo | ||||||
|  | set cpo&vim | ||||||
|  |  | ||||||
|  | let g:ycm_clangd_binary_path="/opt/llvm-esp/esp-clang/bin/clangd" | ||||||
|  | YcmRestartServer | ||||||
|  | let &makeprg="idf.py -C .." | ||||||
|  |  | ||||||
|  | "Should do a CompilerSet One day | ||||||
|  |  | ||||||
|  | let &cpo = s:cpo_save | ||||||
|  | unlet s:cpo_save | ||||||
|  |  | ||||||
							
								
								
									
										5
									
								
								vim/.vim/ftplugin/c.vim
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										5
									
								
								vim/.vim/ftplugin/c.vim
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,5 @@ | |||||||
|  | " nnoremap <F12> :vert term ./build.sh<CR> | ||||||
|  | " nnoremap <Leader><F12> :execute 'tab term ./'. $prgname<CR> | ||||||
|  |  | ||||||
|  | let $MANPAGER='cat' | ||||||
|  | let $MANWIDTH=(&columns/2-4) | ||||||
							
								
								
									
										3
									
								
								vim/.vim/ftplugin/go.vim
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										3
									
								
								vim/.vim/ftplugin/go.vim
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,3 @@ | |||||||
|  | set keywordprg=go\ doc | ||||||
|  | unmap K | ||||||
|  | set makeprg=go\ run\ . | ||||||
							
								
								
									
										1
									
								
								vim/.vim/ftplugin/python.vim
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								vim/.vim/ftplugin/python.vim
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1 @@ | |||||||
|  | set foldmethod=indent | ||||||
							
								
								
									
										61
									
								
								vim/.vim/plugin/Make.vim
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										61
									
								
								vim/.vim/plugin/Make.vim
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,61 @@ | |||||||
|  | let s:making = 0 | ||||||
|  |  | ||||||
|  | command -nargs=* Make call s:make(<q-args>) | ||||||
|  |  | ||||||
|  | function s:make(args) abort | ||||||
|  |  | ||||||
|  | 	if s:making | ||||||
|  | 		if bufwinid(s:make_buf) == -1 | ||||||
|  | 			" show making buffer | ||||||
|  | 			exe 'sbuffer' s:make_buf | ||||||
|  | 			wincmd p | ||||||
|  | 		else | ||||||
|  | 			"hide making buffer | ||||||
|  | 			exe printf('%d wincmd q', bufwinnr(s:make_buf)) | ||||||
|  | 		endif | ||||||
|  | 		return | ||||||
|  | 	endif | ||||||
|  |  | ||||||
|  | 	" delete last result | ||||||
|  | 	if exists('s:make_buf') && bufexists(s:make_buf) | ||||||
|  | 		silent! exe 'bdelete' s:make_buf | ||||||
|  | 	endif | ||||||
|  |  | ||||||
|  | 	"spawn new make | ||||||
|  | 	let cmd = &makeprg  | ||||||
|  | 	if !empty(a:args) | ||||||
|  | 		let cmd .= ' ' . a:args | ||||||
|  | 	endif | ||||||
|  |  | ||||||
|  | 	let options = {'close_cb': function('s:make_callback'), 'term_rows': 16} | ||||||
|  |  | ||||||
|  | 	let s:make_buf = term_start(cmd, options) | ||||||
|  | 	let s:making = 1 | ||||||
|  |  | ||||||
|  | 	wincmd p | ||||||
|  | endfunction | ||||||
|  |  | ||||||
|  | func s:make_callback(channel) | ||||||
|  |  | ||||||
|  |   " look, you can not get buffer content directly here. | ||||||
|  |   call timer_start(10, function('s:make_callback_impl')) | ||||||
|  | endfunction | ||||||
|  |  | ||||||
|  | function s:make_callback_impl(timer) abort | ||||||
|  |  | ||||||
|  |   exe 'cgetbuffer' s:make_buf | ||||||
|  |  | ||||||
|  |   " consider entry with num zero bufnr and lnum an error or warning | ||||||
|  |   let qfl = filter(getqflist(), {k,v -> v.bufnr != 0 && v.lnum != 0}) | ||||||
|  |  | ||||||
|  |   if empty(qfl) | ||||||
|  |     echo "make successful" | ||||||
|  |   else | ||||||
|  |     echohl WarningMsg | ||||||
|  |     echom printf('found %d qf entries', len(qfl)) | ||||||
|  |     echohl None | ||||||
|  |   endif | ||||||
|  |  | ||||||
|  |   let s:making = 0 | ||||||
|  |  | ||||||
|  | endfunction | ||||||
							
								
								
									
										6
									
								
								vim/.vim/vimfile/after/syntax/html.vim
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										6
									
								
								vim/.vim/vimfile/after/syntax/html.vim
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,6 @@ | |||||||
|  | syn region djangotagmarkers start="{{" end="}}" | ||||||
|  | syn region djangovariablemarkers start="{%" end="%}" | ||||||
|  | command! -nargs=+ HiLink hi def link <args> | ||||||
|  | HiLink djangotagmarkers PreProc | ||||||
|  | HiLink djangovariablemarkers PreProc | ||||||
|  | delcommand HiLink | ||||||
							
								
								
									
										194
									
								
								vim/.vimrc
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										194
									
								
								vim/.vimrc
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,194 @@ | |||||||
|  | autocmd Filetype python noremap <F11> <ESC>:vert term python -i %<CR> | ||||||
|  | autocmd Filetype python noremap <F12> <ESC>:vert term python %<CR>  | ||||||
|  |  | ||||||
|  | autocmd Filetype tex noremap <silent> <F12> <ESC>:silent !pdflatex % && mupdf %:r.pdf&<CR> | ||||||
|  |  | ||||||
|  | autocmd FileType asm noremap <F12> <ESC>:execute 'silent !qtspim' expand('%::p')<CR> | ||||||
|  |  | ||||||
|  | " 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 <silent><CR> <CR><Plug>AutoPairsReturn | ||||||
|  |  | ||||||
|  | nnoremap <C-p> :GFiles<CR> | ||||||
|  | nnoremap <C-g> :Ag<CR> | ||||||
|  |  | ||||||
|  | nnoremap <leader><CR> :vert term<CR> | ||||||
|  |  | ||||||
|  | let python_highlight_all=1 | ||||||
|  | let g:pymode_python = 'python3' | ||||||
|  | let g:pymode_options_max_line_length = 120 | ||||||
|  | " let g:ctrlp_cmd = 'CtrlPTag' | ||||||
|  | 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' | ||||||
|  |  | ||||||
|  | " nnoremap <c-p> <plug>(YCMFindSymbolInDirectory) | ||||||
|  | " nnoremap <c-P> <plug>(YCMFindSymbolInWorkspace) | ||||||
|  |  | ||||||
|  | function ManPage(expr) | ||||||
|  | 	execute 'silent vert term' &keywordprg a:expr | ||||||
|  | endfunction | ||||||
|  |  | ||||||
|  | nnoremap gd :YcmCompleter GoToDefinition<CR> | ||||||
|  | nnoremap gr :YcmCompleter GoToReferences<CR> | ||||||
|  | nnoremap K :YcmCompleter GetDoc<CR> | ||||||
|  | nnoremap <F12> :Make<CR> | ||||||
|  | nnoremap <leader><F12> :Make run<CR> | ||||||
|  |  | ||||||
|  | "Documentation | ||||||
|  | " nnoremap K :execute 'Man' expand('<cexpr>')<cr> | ||||||
|  | command Curl :execute 'vert term lynx -dump' escape(@+, '#') | ||||||
|  | command OpenLink :silent w !urlscan | ||||||
|  | command -nargs=? Man call fzf#run(fzf#wrap({'source': 'whatis ' .  shellescape(<q-args>) . '| sed -r "s/(^\w*)\s\((.*)\).*/\2 \1/"', 'sink': function('ManPage') , 'options': ['--preview', 'MANPAGER=cat MANWIDTH='.  (&columns/2-4) .' man {1} {2}']})) | ||||||
|  |  | ||||||
|  | " AgIn: Start ag in the specified directory | ||||||
|  | " | ||||||
|  | " e.g. | ||||||
|  | "   :AgIn .. foo | ||||||
|  | function! s:ag_in(bang, ...) | ||||||
|  |   let start_dir=expand(a:1) | ||||||
|  |  | ||||||
|  |   if !isdirectory(start_dir) | ||||||
|  |     throw 'not a valid directory: ' .. start_dir | ||||||
|  |   endif | ||||||
|  |   " Press `?' to enable preview window. | ||||||
|  |   call fzf#vim#ag(join(a:000[1:], ' '), fzf#vim#with_preview({'dir': start_dir}, 'up:50%:hidden', '?'), a:bang) | ||||||
|  |  | ||||||
|  | endfunction | ||||||
|  |  | ||||||
|  | command! -bang -nargs=+ -complete=dir AgIn call s:ag_in(<bang>0, <f-args>) | ||||||
|  |  | ||||||
|  | let g:UltiSnipsExpandTrigger="<c-l>" | ||||||
|  | let g:UltiSnipsListSnipets="<c-h>" | ||||||
|  | let g:UltiSnipsEditSplit="vertical" | ||||||
|  |  | ||||||
|  | let g:cpp_attributes_highlight = 1 | ||||||
|  |  | ||||||
|  | let g:ycm_always_populate_location_list = 1 | ||||||
|  | let g:ycm_goto_buffer_command = "'split-or-existing-window'" | ||||||
|  | let g:ycm_java_binary_path = "/usr/lib/jvm/java-17-openjdk/bin/java" | ||||||
|  |  | ||||||
|  | " let g:completor_clang_binary = "/usr/bin/clang" | ||||||
|  | "fold with space | ||||||
|  | nnoremap <space> za | ||||||
|  | syntax on | ||||||
|  |  | ||||||
|  | set nu | ||||||
|  | set rnu | ||||||
|  | set hls | ||||||
|  | set tabstop=4 | ||||||
|  | set shiftwidth=4 | ||||||
|  | set encoding=utf-8 | ||||||
|  | set nocompatible | ||||||
|  | set ignorecase | ||||||
|  | set nowrap | ||||||
|  | set splitbelow splitright | ||||||
|  | set spelllang+=fr | ||||||
|  | set foldmethod=syntax | ||||||
|  | set foldlevel=99 | ||||||
|  | set incsearch | ||||||
|  | set autochdir | ||||||
|  | " set foldcolumn=1 | ||||||
|  | set clipboard^=unnamed,unnamedplus | ||||||
|  | set listchars=eol:$,tab:>-,trail:~,extends:>,precedes:<,space:· | ||||||
|  | set concealcursor= | ||||||
|  | set conceallevel=2 | ||||||
|  | set mouse=a | ||||||
|  |  | ||||||
|  | color desert  | ||||||
|  | hi Normal ctermfg=None ctermbg=None | ||||||
|  | hi NonText ctermfg=None ctermbg=None | ||||||
|  |  | ||||||
|  | packadd termdebug | ||||||
|  |  | ||||||
|  | filetype off | ||||||
|  | set rtp+=$HOME/.vim/bundle/vundle.vim/ | ||||||
|  | call vundle#begin() | ||||||
|  |  | ||||||
|  | "Mandatory | ||||||
|  | Plugin 'vundleVim/Vundle.vim'		"plugin Manager | ||||||
|  |  | ||||||
|  | "Quality of life (any)  | ||||||
|  | Plugin 'itchyny/lightline.vim'		"status bar | ||||||
|  | Plugin 'kien/rainbow_parentheses.vim'	"Better Raimbow Parentheses | ||||||
|  | Plugin 'mhinz/vim-startify'		"start screen  | ||||||
|  | Plugin 'lilydjwg/colorizer'		"color hexcode | ||||||
|  | Plugin 'jiangmiao/auto-pairs'		"auto Pair Brackets | ||||||
|  | " Plugin 'Yggdroot/indentLine'		"show indent - bugging conceal | ||||||
|  | Plugin 'szw/vim-maximizer' | ||||||
|  | " Plugin 'preservim/nerdtree'		"Directory Visulaliser :Nerdtree | ||||||
|  | Plugin 'junegunn/fzf', {'do': { -> fzf#install() }} | ||||||
|  | Plugin 'junegunn/fzf.vim' | ||||||
|  | Plugin 'junegunn/vim-peekaboo'		"see content of register before past for @ C-R and \" | ||||||
|  |  | ||||||
|  | "useful in multiple languages | ||||||
|  | Plugin 'SirVer/ultisnips'		"fast write | ||||||
|  | Plugin 'honza/vim-snippets'		"lib of snips | ||||||
|  | Plugin 'majutsushi/tagbar'		"display tagBar with :TagbarToggle | ||||||
|  | " Plugin 'maralla/completor.vim'		"completion menu | ||||||
|  | " Plugin 'tokorom/completor-shell'	"Add on of completor.vim for shell scripting | ||||||
|  | Plugin 'tpope/vim-commentary'		"comment with <gcc> | ||||||
|  | " Plugin 'dense-analysis/ale'		"Async error checker (test usefulness) | ||||||
|  | Plugin 'puremourning/vimspector'	"Debugger | ||||||
|  |  | ||||||
|  | Plugin 'ycm-core/YouCompleteMe'		"completion tool | ||||||
|  |  | ||||||
|  | "git | ||||||
|  | Plugin 'mhinz/vim-signify'		"git diff show | ||||||
|  | Plugin 'tpope/vim-fugitive'		"for the :Git <command> | ||||||
|  |  | ||||||
|  | "php | ||||||
|  | " Plugin 'StanAngeloff/php.vim'		"php syntax | ||||||
|  | " Plugin 'phpactor/phpactor'		"php auto-completion | ||||||
|  |  | ||||||
|  | "python | ||||||
|  | " Plugin 'python-mode/python-mode'	"A python IDE | ||||||
|  | Plugin 'mitsuhiko/vim-jinja' | ||||||
|  |  | ||||||
|  | "html/css | ||||||
|  | Plugin 'mattn/emmet-vim'		"Fast http | ||||||
|  | Plugin 'vim-scripts/loremipsum'		"ipsum generator :Loremipsum <word> | ||||||
|  | Plugin 'tpope/vim-surround'		"Surround html tags | ||||||
|  | Plugin 'sukima/xmledit'		"Edit XML and HTML | ||||||
|  |  | ||||||
|  | "lua | ||||||
|  | " Plugin 'wsdjeg/vim-lua'			"lua syntax | ||||||
|  |  | ||||||
|  | "markdown | ||||||
|  | Plugin 'iamcco/markdown-preview.nvim', { 'do': { -> mkdp#util#install() }, 'for': ['markdown', 'vundle'] } | ||||||
|  |  | ||||||
|  | "c & cpp | ||||||
|  | Plugin 'bfrg/vim-cpp-modern'		"Extended vim syntax highlight c++ | ||||||
|  | Plugin 'a.vim'				"go from hpp to cpp with :A | ||||||
|  | " Plugin 'xavierd/clang_complete'		"CLang Complete (don't work with ycm) | ||||||
|  | " Plugin 'ctrlpvim/ctrlp.vim'		"ctrl p support | ||||||
|  | Plugin 'cdelledonne/vim-cmake' | ||||||
|  |  | ||||||
|  | "glsl (shader) | ||||||
|  | Plugin 'tikhomirov/vim-glsl' | ||||||
|  |  | ||||||
|  | "c sharp | ||||||
|  | " Plugin 'OmniSharp/omnisharp-vim' | ||||||
|  |  | ||||||
|  | "java | ||||||
|  |  | ||||||
|  | Plugin 'hdiniz/vim-gradle' | ||||||
|  |  | ||||||
|  | "latex | ||||||
|  |  | ||||||
|  | Plugin 'lervag/vimtex' | ||||||
|  |  | ||||||
|  | "uml | ||||||
|  | Plugin 'weirongxu/plantuml-previewer.vim' | ||||||
|  | Plugin 'tyru/open-browser.vim' | ||||||
|  | Plugin 'aklt/plantuml-syntax' | ||||||
|  |  | ||||||
|  | call vundle#end() | ||||||
|  |  | ||||||
|  | filetype plugin indent on | ||||||
|  | set omnifunc=syntaxcomplete#Complete | ||||||
		Reference in New Issue
	
	Block a user