Minor revisions + pkgs list

This commit is contained in:
Etienne Werly 2021-11-11 19:44:10 +01:00
parent 93cfee450e
commit 1a0e633964
11 changed files with 114 additions and 7 deletions

View File

@ -9,7 +9,7 @@ export PATH=$PATH:$HOME/.bin
export EDITOR=/usr/bin/vim
# qutebrowser as default browser
#export BROWSER='/usr/bin/qutebrowser --target tab'
export BROWSER='/usr/bin/luakit'
export BROWSER='/usr/bin/vimb'
# bat theme
export BAT_THEME="OneHalfLight"
# Bluetooth devices
@ -28,7 +28,7 @@ alias skhal='khal calendar'
alias newcourse='khal new -a "Cours particuliers" --alarms 1hour'
# start email notifications upon starting mutt
alias premutt='if [[ -z $(pgrep -fa mutt) ]]; then mutt; else mutt -e "set read_only = yes"; fi'
alias premutt='if [[ -z $(pgrep -fa ^mutt) ]]; then mutt; else mutt -e "set read_only = yes"; fi'
alias mut='if [[ -z $(pgrep -fa python | grep mail_notifications.py) ]]; then python ~/.bin/mail_notifications.py & premutt; else premutt ;fi'
@ -41,6 +41,7 @@ alias pdfcomp='gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/eboo
# Official letter template
alias lettre='git clone gitea@git.moqueur.chat:etienne/lettre-officielle.git'
alias pdfscan='function _(){ hp-scan -d $HP -o $1 && pdfcomp $1 && mv output.pdf $1; }; _'
alias qcmscan='function _(){ hp-scan -d $HP --res=150 --duplex --logging=none -o $1 && pdfcomp $1 && mv output.pdf $1 && pdfjam $1 --a4paper -o $1 && notify-send "qcmscan" "Scan complete"; }; _'
# }}}
## Music {{{
# Wrapper for ncmpcpp

View File

@ -32,7 +32,7 @@ bspc config focus_follows_pointer true # focus windows without clicking
### BSPWM appearance configuration {{{
## Various look tweakings
feh --bg-fill $HOME/Images/frog.png & # Sets the background
feh --bg-fill $HOME/.wallpaper.png & # Sets the background
bspc config border_width 2 # border around tiles
bspc config window_gap 15 # gap between tiles

37
.config/bspwm/focus_mode Executable file
View File

@ -0,0 +1,37 @@
#!/bin/sh
# Focus mode discards the top polybar, removes window gap.
# It makes it easier to focus and work...
HideBar() {
ID=$(pidof polybar)
case $1 in
top)
echo $ID
polybar-msg -p $(awk '//{print $2}' <<< $ID) cmd hide
;;
bottom)
polybar-msg -p $(awk '//{print $1}' <<< $ID) cmd hide
;;
*)
polybar-msg cmd hide
;;
esac
}
#ShowBar() {
# ID=$(pidof polybar)
# case $1 in
# top)
# polybar-msg -p $(awk '//{print $2}' <<< $ID) cmd show
# ;;
# bottom)
# polybar-msg -p $(awk '//{print $1}' <<< $ID) cmd show
# ;;
# *)
# polybar-msg cmd show
# ;;
# esac
#}
HideBar top
bspc config window_gap 0

View File

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

View File

@ -78,7 +78,7 @@ font-4 = "PowerlineSymbols:size=18;4"
modules-left = bspwm
;modules-center = mpd
modules-right = xbacklight pulseaudio wlan eth battery date
modules-right = backlight-acpi pulseaudio wlan eth battery date
tray-position = right
tray-padding = 2
@ -286,6 +286,9 @@ bar-progress-empty = ─
[module/xbacklight]
; {{{
type = internal/xbacklight
card = intel_backlight
enable_scroll = true
format = <ramp>
;format-underline = #9f78e1

12
.config/polybar/launch.sh Executable file
View File

@ -0,0 +1,12 @@
#!/bin/sh
# Simple script to launch the bars
# Kill existing instances
killall -q polybar
# Launch bars
echo "---" | tee -a /tmp/polybar_top.log /tmp/polybar_bottom.log
polybar top >>/tmp/polybar_top.log 2>&1 & disown
polybar bottom >>/tmp/polybar_bottom.log 2>&1 & disown
echo "Bars launched..."

View File

@ -10,14 +10,14 @@ status_path = "~/.vdirsyncer/status"
[storage remote_contacts]
type = "carddav"
url = "https://dav.moqueur.chat/dav.php"
auth = "digest"
auth = "guess"
username = "etienne"
password.fetch = ["command", "pass", "Yuno/DAV"]
[storage remote_calendars]
type = "caldav"
url = "https://dav.moqueur.chat/dav.php"
auth = "digest"
auth = "guess"
username = "etienne"
password.fetch = ["command", "pass", "Yuno/DAV"]

1
.pkgs/mails Normal file
View File

@ -0,0 +1 @@
isync msmtp notmuch neomutt

1
.pkgs/wm Normal file
View File

@ -0,0 +1 @@
xorg-server xorg-xinit picom feh dunst bspwm sxhkd termite rofi rofi-calc rofi-pass rofimoji

View File

@ -0,0 +1,48 @@
snippet qst "question basique" bA
\element{$1}{
\begin{questionmult}{$1$2}
$3
\begin{multicols}{2}
\begin{reponses}
$4
\end{reponses}
\end{multicols}
\end{questionmult}
}
$0
endsnippet
snippet bon "bonne reponse" w
\bonne{$1}
$0
endsnippet
snippet mav "mauvaise reponse" w
\mauvaise{$1}
$0
endsnippet
snippet qlib "question libre" bA
\element{$1}{
\begin{question}{$1$2}
$3
\AMCOpen{lines=3,backgroundcol=gray!10!,dots=false}{\wrongchoice{0}\scoring{0}\wrongchoice{0,5}\scoring{0.5}\correctchoice{1}\scoring{1}}
\end{question}
}
$0
endsnippet
snippet qnum "question numerique" bA
\element{$1}{
\begin{questionmultx}{$1$2}
$3
\AMCnumericChoices{$4}{digits=1,decimals=0,exact=1,scoreexact=1,approx=0,scoreapprox=0,sign=false,vertical=false,borderwidth=.2mm,bordercol=gray,hspace=.2ex,vspace=0em,reverse=false}
\end{questionmultx}
}
$0
endsnippet

4
.vimrc
View File

@ -141,6 +141,10 @@ inoremap <leader>o <Esc>:Files<CR>
nnoremap <leader>o :Files<CR>
inoremap <leader>b <Esc>:Buffers<CR>
nnoremap <leader>b :Buffers<CR>
inoremap <leader>m <Esc>:call fzf#run(fzf#wrap({'source' : 'khard email --parsable', 'sink' : ':r !firstcolumn'}))<CR>
" notmuch-vim
Plug 'felipec/notmuch-vim'
" Declare plugins to vim
call plug#end()