Added PIM, lf, xmpp, moved to termite, my muttrc (cleaned peronal info as much as possible) and started working on snippets

This commit is contained in:
Etienne Werly 2020-06-01 13:27:04 +02:00
parent b13ce29060
commit c1c739341c
30 changed files with 1603 additions and 54 deletions

View File

@ -2,12 +2,28 @@
! ~/.Xresources !
! ------------------- !
!! URXVT {{{
! Ricing the terminal
! Remove the ugly scrollbar
URxvt.scrollBar: false
URxvt.scrollBar_right: false
URxvt.cursorBlink: true
URxvt*transparent: true
! Feels like a cheat but woks IMO (displays the underlying desktop background...
! so floating over a window won't show the underlying window but dig a hole in it)
! Useful to simply handle monocle and fullscreen terms though.
urxvt.highlightTextColor: rgb:E0/CE/91
urxvt.highlightColor: rgb:F0/84/54
! }}}
!! Colors {{{
! I keep my color themes in '.Xresources.d/colors', just use "#include '.Xresources.d/colors/yourColorTheme'"
! Note : the #include method requires a C preprocessor to work, you should be OK if you have gcc installed.
! Color themes can be browsed, created and downloaded from the amazing 'http://terminal.sexy'
#include ".Xresources.d/colors/mocha"
!#include ".Xresources.d/colors/mocha"
#include ".Xresources.d/colors/seamless2"
! }}}
!! Fonts {{{
@ -15,10 +31,12 @@
xterm*faceName: DejaVu Sans Mono
xterm*faceSize: 9
xterm*renderFont: true
URxvt.letterSpace: -1
URxvt.font: xft:DejaVu Sans Mono:size=9,xft:Noto Emoji:pixelsize=9
URxvt.boldFont: xft:DejaVu Sans Mono:style=Bold:size=9
! }}}
!! Rofi {{{
! Rofi, the smart launcher, looks and fee
! Rofi, the smart launcher, looks and feel
! 'bg' 'border' 'separator'
rofi.color-window: argb:c82d303b, #7c8389, argb:00000000

View File

@ -0,0 +1,37 @@
! special
*.foreground: #565e65
!*.background: rgba:f3f3/f4f4/f5f5/0000
*.background: rgb:f3/f4/f5
*.cursorColor: #565e65
! black
*.color0: #1c2023
*.color8: #747c84
! red
*.color1: #c7ae95
*.color9: #c7ae95
! green
*.color2: #95c7ae
*.color10: #95c7ae
! yellow
*.color3: #aec795
*.color11: #aec795
! blue
*.color4: #ae95c7
*.color12: #ae95c7
! magenta
*.color5: #c795ae
*.color13: #c795ae
! cyan
*.color6: #95aec7
*.color14: #95aec7
! white
*.color7: #c7ccd1
*.color15: #e1eaf3

View File

@ -0,0 +1,37 @@
! special
*.foreground: #565e65
*.background: #f8f1b1
*.cursorColor: #565e65
! black
*.color0: #222425
*.color8: #747c84
! red
*.color1: #eca55c
*.color9: #ed723b
! green
*.color2: #75daa6
*.color10: #95ac41
! yellow
*.color3: #f9ca62
*.color11: #dfe96f
! blue
*.color4: #ae95c7
*.color12: #ae95c7
! magenta
*.color5: #c795ae
*.color13: #c795ae
! cyan
*.color6: #95aec7
*.color14: #95aec7
! white
*.color7: #c8ced5
*.color15: #cedbe8

View File

@ -2,6 +2,11 @@
# Aliases #
# ############ #
# Use vim as default editor
export EDITOR=/usr/bin/vim
# Easily handle dotfiles with git
alias dots='git --git-dir=$HOME/.dotfiles.git/ --work-tree=$HOME'
# Some khal short commands
alias skhal='khal calendar'

View File

@ -6,12 +6,14 @@
## Initialisation {{{
# The initialisation sequence (ran at boot and refreshes)
killall -q sxhkd # Is it a good practice? Annoys me to have useless sxhkd stacking up when I refresh
killall -q sxhkd polybar # Is it a good practice? Annoys me to have useless services stacking up when I refresh
sxhkd & # Starts up sxhkd to listen to keyboard inputs
picom --daemon
setxkbmap fr
picom --daemon # Starts the picom compositor in the background
polybar top & # Fires up the top bar
polybar bottom &
setxkbmap fr # Useful for rofi-pass
killall cleanfullscreen
~/.config/bspwm/cleanfullscreen & # Clean full screen for BSP
# }}}
### Monitors {{{
## Define your workspaces (10 by default). It is possible to use some logic
@ -31,13 +33,13 @@ bspc config focus_follows_pointer true # focus windows without clicking
feh --bg-fill $HOME/Images/frog.png & # Sets the background
bspc config border_width 2 # border around tiles
bspc config window_gap 25 # gap between tiles
bspc config window_gap 15 # gap between tiles
bspc config normal_border_color "#76715e"
bspc config active_border_color "#a7e22e"
bspc config focused_border_color "#C49D72"
bspc config split_ratio 0.52 # Default split ratio
bspc config split_ratio 0.5 # Default split ratio
bspc config borderless_monocle true # Remove borders in monocle mode
bspc config gapless_monocle true # Remove gaps in monocle mode

99
.config/bspwm/cleanfullscreen Executable file
View File

@ -0,0 +1,99 @@
#!/bin/sh
# Many Thanks to Brodie Robertson for this!
# https://github.com/BrodieRobertson
# Clean fullscreen aims to provide a means to have a clean desktop when using
# transparency in bspwm, the issue I found was that when a window entered,
# fullscreen mode I was still able to see the windows behind it, I think this
# looks kind of gross so that's why this exists.
HideBar() {
polybar-msg cmd hide
}
ShowBar() {
polybar-msg cmd show
}
HideNodes() {
for node in $1; do
bspc node "$node" -g hidden=on
done
}
HideTiled() {
Nodes=$(bspc query -N -n .tiled -d "$1")
HideNodes "$Nodes"
}
ShowNodes() {
Nodes=$(bspc query -N -n .hidden -d "$1")
for node in $Nodes; do
bspc node "$node" -g hidden=off
done
}
bspc subscribe node_state | while read -r Event Monitor Desktop Node State Active
do
PrimaryMonitor=$(bspc query -M -m primary)
# Hide bar and nodes when node becomes fullscreen, otherwise show
if [ "$State" = "fullscreen" ] && [ "$Active" = "on" ]; then
# Only consider nodes on primary monitor
if [ "$PrimaryMonitor" = "$Monitor" ]; then
HideBar
fi
HideTiled "$Desktop"
else
if [ "$PrimaryMonitor" = "$Monitor" ]; then
ShowBar
fi
ShowNodes "$Desktop"
fi
done &
bspc subscribe node_remove | while read Event Monitor Desktop Node
do
PrimaryMonitor="$(bspc query -M -m primary)"
# Show bar if no nodes are fullscreen on current desktop
if [ "$Monitor" = "$PrimaryMonitor" ] && \
[ -z "$(bspc query -N -n .fullscreen -d "$Desktop")" ]; then
ShowBar
fi
ShowNodes "$Desktop"
done &
bspc subscribe node_transfer | while read -r Event SrcMonitor SrcDesktop SrcNode DestMonitor Dest Desktop DestNode
do
# Show nodes on src desktop and hide nodes on dest desktop
# If src node is in full screen mode
if [ -n "$(bspc query -N -n "$SrcNode".fullscreen)" ]; then
ShowNodes "$SrcDesktop"
HideTiled "$DestDesktop"
ShowBar
fi
# Hide any fullscreen nodes on destination desktop
FullscreenDest=$(bspc query -N -n .fullscreen -d "$DestDesktop" \
| sed "/$SrcNode/d")
if [ -n "$FullscreenDest" ]; then
HideNodes "$FullscreenDest"
fi
done &
bspc subscribe desktop_focus | while read -r Event Monitor Desktop
do
PrimaryMonitor="$(bspc query -M -m primary)"
FullscreenNode="$(bspc query -N -n .fullscreen -d "$Desktop")"
# Only consider nodes on primary monitor
if [ "$PrimaryMonitor" = "$Monitor" ]; then
# Hide bar if desktop contains fullscreen node
if [ -n "$FullscreenNode" ]; then
HideBar
# Otherwise show the bar
else
ShowBar
fi
fi
done &

42
.config/khal/config Normal file
View File

@ -0,0 +1,42 @@
# ################ #
# khal config #
# ################ #
# Diplayed calendars
[calendars]
[[calendars]]
path = ~/.vdirsyncer/calendars/*
type = discover
color = light blue
[sqlite]
path = ~/.khal/khal.db
[locale]
local_timezone = Europe/Paris
#default_timezone = America/New_York
timeformat = %H:%M
dateformat = %d.%m.
longdateformat = %d.%m.%Y
datetimeformat = %d.%m. %H:%M
longdatetimeformat = %d.%m.%Y %H:%M
unicode_symbols = False
firstweekday = 0
weeknumbers = right
[default]
default_calendar = Ordinaire
timedelta = 7d # the default timedelta that list uses
highlight_event_days = True # the default is False
[highlight_days]
default_color = dark green
multiple = dark green
[view]
monthdisplay = firstday
theme = mine
# vim:ft=conf

View File

@ -0,0 +1,132 @@
# Copyright (c) 2013-2017 Christian Geier et al.
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modify, merge, publish,
# distribute, sublicense, and/or sell copies of the Software, and to
# permit persons to whom the Software is furnished to do so, subject to
# the following conditions:
#
# The above copyright notice and this permission notice shall be
# included in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
# Add your themes here defined by a unique name (e.g. 'mine'). Then
# sudo cp $XDG_CONFIG/khal/themes/colors.py /usr/lib/python3.8/site-packages/khal/ui/colors.py
# and inform your new themes in khal/settings/khal.spec
dark = [
('header', 'white', 'black'),
('footer', 'white', 'black'),
('line header', 'black', 'white', 'bold'),
('bright', 'dark blue', 'white', ('bold', 'standout')),
('list', 'black', 'white'),
('list focused', 'white', 'light blue', 'bold'),
('edit', 'black', 'white'),
('edit focused', 'white', 'light blue', 'bold'),
('button', 'black', 'dark cyan'),
('button focused', 'white', 'light blue', 'bold'),
('reveal focus', 'black', 'light gray'),
('today focus', 'white', 'dark magenta'),
('today', 'dark gray', 'dark green',),
('date header', 'light gray', 'black'),
('date header focused', 'black', 'white'),
('date header selected', 'dark gray', 'light gray'),
('dayname', 'light gray', ''),
('monthname', 'light gray', ''),
('weeknumber_right', 'light gray', ''),
('edit', 'white', 'dark blue'),
('alert', 'white', 'dark red'),
('mark', 'white', 'dark green'),
('frame', 'white', 'black'),
('frame focus', 'light red', 'black'),
('frame focus color', 'dark blue', 'black'),
('frame focus top', 'dark magenta', 'black'),
('editfc', 'white', 'dark blue', 'bold'),
('editbx', 'light gray', 'dark blue'),
('editcp', 'black', 'light gray', 'standout'),
('popupbg', 'white', 'black', 'bold'),
]
light = [
('header', 'black', 'white'),
('footer', 'black', 'white'),
('line header', 'black', 'white', 'bold'),
('bright', 'dark blue', 'white', ('bold', 'standout')),
('list', 'black', 'white'),
('list focused', 'white', 'light blue', 'bold'),
('edit', 'black', 'white'),
('edit focused', 'white', 'light blue', 'bold'),
('button', 'black', 'dark cyan'),
('button focused', 'white', 'light blue', 'bold'),
('reveal focus', 'black', 'dark cyan', 'standout'),
('today focus', 'white', 'dark cyan', 'standout'),
('today', 'black', 'light gray', 'dark cyan'),
('date header', '', 'white'),
('date header focused', 'white', 'dark gray', ('bold', 'standout')),
('date header selected', 'dark gray', 'light cyan'),
('dayname', 'dark gray', 'white'),
('monthname', 'dark gray', 'white'),
('weeknumber_right', 'dark gray', 'white'),
('edit', 'white', 'dark blue'),
('alert', 'white', 'dark red'),
('mark', 'white', 'dark green'),
('frame', 'dark gray', 'white'),
('frame focus', 'light red', 'white'),
('frame focus color', 'dark blue', 'white'),
('frame focus top', 'dark magenta', 'white'),
('editfc', 'white', 'dark blue', 'bold'),
('editbx', 'light gray', 'dark blue'),
('editcp', 'black', 'light gray', 'standout'),
('popupbg', 'white', 'black', 'bold'),
]
mine = [
('header', 'black', 'white'),
('footer', 'black', 'white'),
('line header', 'black', 'white', 'bold'),
('bright', 'dark blue', 'white', ('bold', 'standout')),
('list', 'black', 'white','bold'),
('list focused', 'white', 'light blue', 'bold'),
('edit', 'black', 'dark blue'),
('edit focused', 'white', 'light blue', 'bold'),
('button', 'black', 'dark cyan'),
('button focused', 'white', 'light blue', 'bold'),
('reveal focus', 'white', 'dark cyan', 'standout'),
('today focus', 'white', 'dark cyan', 'standout'),
('today', 'black', 'light gray', 'dark cyan'),
('date header focused', 'white', 'dark gray', ('bold', 'standout')),
('date header selected', 'dark gray', 'light cyan'),
('dayname', 'dark gray', ''),
('monthname', 'dark gray', ''),
('weeknumber_right', 'dark gray', ''),
('edit', 'white', 'dark blue'),
('alert', 'white', 'dark red'),
('mark', 'white', 'dark green'),
('frame', 'dark gray', 'white'),
('frame focus', 'light red', 'white'),
('frame focus color', 'dark blue', 'white'),
('frame focus top', 'dark magenta', 'white'),
('editfc', 'white', 'dark blue', 'bold'),
('editbx', 'light gray', 'dark blue'),
('editcp', 'black', 'light gray', 'standout'),
('popupbg', 'white', 'black', 'bold'),
]

67
.config/khard/khard.conf Normal file
View File

@ -0,0 +1,67 @@
# ############## #
# khard config #
# ############## #
[addressbooks]
[[potes]]
path = ~/.vdirsyncer/contacts/e0b8b1bd-bd84-44c4-9ddf-19426b06103b
[[mif]]
path=~/.vdirsyncer/contacts/4aa55f78-e37f-4c67-869c-fdf9bb365b51
[[admin]]
path=~/.vdirsyncer/contacts/31bb6d1a-c8fb-47a8-ac74-6be769593140
[[batuk]]
path=~/.vdirsyncer/contacts/83833105-b7e2-47be-a5bb-065b3458da37
[[sphere2]]
path=~/.vdirsyncer/contacts/b643c914-bc15-4c13-acca-1373174051a6
[[archive]]
path=~/.vdirsyncer/contacts/cd87a04f-e754-40b4-8820-007eb163732d
[[cours]]
path=~/.vdirsyncer/contacts/e32988de-8511-419e-b560-edf51fb8b69f
[[pro]]
path=~/.vdirsyncer/contacts/fee16c68-2eff-4e1b-a045-30c0194291a7
[general]
debug = no
default_action = list
# These are either strings or comma seperated lists
editor = vim, -i, NONE
merge_editor = vimdiff
[contact table]
# display names by first or last name: first_name / last_name / formatted_name
display = first_name
# group by address book: yes / no
group_by_addressbook = yes
# reverse table ordering: yes / no
reverse = no
# append nicknames to name column: yes / no
show_nicknames = no
# show uid table column: yes / no
show_uids = yes
# sort by first or last name: first_name / last_name / formatted_name
sort = last_name
# localize dates: yes / no
localize_dates = yes
# set a comma separated list of preferred phone number types in descending priority
# or nothing for non-filtered alphabetical order
preferred_phone_number_type = pref, cell, home
# set a comma separated list of preferred email address types in descending priority
# or nothing for non-filtered alphabetical order
preferred_email_address_type = pref, work, home
[vcard]
# extend contacts with your own private objects
# these objects are stored with a leading "X-" before the object name in the vcard files
# every object label may only contain letters, digits and the - character
# example:
# private_objects = Jabber, Skype, Twitter
# default: , (the empty list)
private_objects = Jabber, Skype, Twitter
# preferred vcard version: 3.0 / 4.0
preferred_version = 3.0
# Look into source vcf files to speed up search queries: yes / no
search_in_source_files = no
# skip unparsable vcard files: yes / no
skip_unparsable = no

114
.config/lf/lfrc Normal file
View File

@ -0,0 +1,114 @@
# ######## #
# lfrc #
# ######## #
# Based on https://raw.githubusercontent.com/gokcehan/lf/master/etc/lfrc.example
## Base settings {{{
# interpreter for shell commands (needs to be POSIX compatible)
set shell sh
# set '-eu' options for shell commands
# These options are used to have safer shell commands. Option '-e' is used to
# exit on error and option '-u' is used to give error for unset variables.
# Option '-f' disables pathname expansion which can be useful when $f, $fs, and
# $fx variables contain names with '*' or '?' characters. However, this option
# is used selectively within individual commands as it can be limiting at
# times.
set shellopts '-eu'
# set internal field separator (IFS) to "\n" for shell commands
# This is useful to automatically split file names in $fs and $fx properly
# since default file separator used in these variables (i.e. 'filesep' option)
# is newline. You need to consider the values of these options and create your
# commands accordingly.
set ifs "\n"
# leave some space at the top and the bottom of the screen
set scrolloff 10
# }}}
## Commands {{{
# define a custom 'open' command
# This command is called when current file is not a directory. You may want to
# use either file extensions and/or mime types here. Below uses an editor for
# text files and a file opener for the rest.
cmd open ${{
case $(file --mime-type $f -b) in
text/*) $EDITOR $fx;;
application/gpg) $EDITOR $fx;;
application/pdf) zathura $fx;;
*) for f in $fx; do setsid $OPENER $f > /dev/null 2> /dev/null & done;;
esac
}}
# make sure trash folder exists
%mkdir -p ~/.trash
# move current file or selected files to trash folder
# (also see 'man mv' for backup/overwrite options)
cmd trash %set -f; mv $fx ~/.trash
# extract the current file with the right command
# (xkcd link: https://xkcd.com/1168/)
cmd extract ${{
set -f
case $f in
*.tar.bz|*.tar.bz2|*.tbz|*.tbz2) tar xjvf $f;;
*.tar.gz|*.tgz) tar xzvf $f;;
*.tar.xz|*.txz) tar xJvf $f;;
*.zip) unzip $f;;
*.rar) unrar x $f;;
*.7z) 7z x $f;;
esac
}}
# compress current file or selected files with tar and gunzip
cmd tar ${{
set -f
mkdir $1
cp -r $fx $1
tar czf $1.tar.gz $1
rm -rf $1
}}
# compress current file or selected files with zip
cmd zip ${{
set -f
mkdir $1
cp -r $fx $1
zip -r $1.zip $1
rm -rf $1
}}
# Print selected files (using hp-print)
cmd print $hp-print $fx
# }}}
## Keyboard mappings {{{
# use enter for shell commands
map <enter> shell
# execute current file (must be executable)
map x $$f
map X !$f
# dedicated keys for file opener actions
map o &mimeopen $f
map O $mimeopen --ask $f
### Navigation
# map gh cd $HOME # Go Home!
map gt push :cd<space>/ # Go to...
# Command history
# map <c-n> cmd-history-next
map <c-N> cmd-history-prev
# Usage
map U $du -hd1|less # Usage of a directory
# Print
map <c-p> print
### Delete
map D trash
map <a-D> %set -f; rm -rf $fx
# }}}

View File

@ -154,6 +154,7 @@ focus-exclude = [ "class_g = 'Cairo-clock'" ];
# opacity-rule = []
opacity-rule = [ "97:class_g = 'UXTerm'" ];
#################################
# Background-Blurring #
#################################

View File

@ -20,6 +20,7 @@
; {{{
;background = ${xrdb:color0:#222}
background = #222
;background = #aarrggbb
background-alt = #444
;foreground = ${xrdb:color7:#222}
foreground = #dfdfdf
@ -29,7 +30,7 @@ secondary = #e60053
alert = #bd2c40
; }}}
[bar/example]
[bar/top]
; {{{
;monitor = ${env:MONITOR:HDMI-1}
width = 100%
@ -46,7 +47,7 @@ line-size = 3
line-color = #f00
border-size = 4
border-color = #00000000
border-color = #00
padding-left = 0
padding-right = 2
@ -58,11 +59,13 @@ font-0 = fixed:pixelsize=10;1
;font-1 = unifont:fontformat=truetype:size=8:antialias=false;0
font-1 = "DejaVu Sans Mono:size=8"
font-2 = siji:pixelsize=10;1
font-3 = "Symbols Nerd Font"
font-3 = "Symbols Nerd Font;2"
#font-4 = "Symbols Nerd Font:pixelsize=25;5"
font-4 = "PowerlineSymbols:size=18;4"
modules-left = bspwm appmenu
modules-left = bspwm
;modules-center = mpd
modules-right = xbacklight alsa memory cpu wlan eth battery temperature date powermenu
modules-right = xbacklight alsa wlan eth battery date powermenu
tray-position = right
tray-padding = 2
@ -82,6 +85,48 @@ tray-padding = 2
cursor-click = pointer
cursor-scroll = ns-resize
;enable ipc to send messages to the bar
enable-ipc = true
; }}}
[bar/bottom]
; {{{
;monitor = ${env:MONITOR:HDMI-1}
width = 100%
height = 12
bottom = true
background = #00
foreground = ${colors.background}
line-size = 3
line-color = #f00
border-size = 4
border-color = #00
padding-left = 0
padding-right = 2
module-margin-left = 1
module-margin-right = 2
font-0 = fixed:pixelsize=10;1
font-1 = "DejaVu Sans Mono:size=8"
font-2 = siji:pixelsize=10;1
font-3 = "Symbols Nerd Font:size=10;2"
font-4 = "PowerlineSymbols:size=12;4"
modules-left = appmenu
;modules-center = mpd
modules-right = memory cpu temperature
tray-position = right
tray-padding = 2
cursor-click = pointer
cursor-scroll = ns-resize
enable-ipc = true
; }}}
[module/xwindow]
@ -248,10 +293,11 @@ card = intel_backlight
; {{{
type = internal/cpu
interval = 2
format = <ramp-coreload> <label>
format-prefix = " "
format = <ramp-coreload>
format-prefix-font = 5
format-prefix = " "
format-prefix-foreground = ${colors.foreground-alt}
format-underline = #f90000
#format-underline = #f90000
label = %percentage:2%%
; Spacing between individual per-core ramps
ramp-coreload-spacing = 1
@ -285,21 +331,36 @@ ramp-coreload-7-foreground = #ff5555
; {{{
type = internal/memory
interval = 2
format-prefix = " "
format-prefix-foreground = ${colors.foreground-alt}
format-underline = #4bffdc
label = %percentage_used%%
format = <bar-used>
format-prefix-font = 5
#format-suffix-font = 5
format-prefix = ""
#format-suffix = ""
format-prefix-foreground = ${colors.foreground-alt}
#format-suffix-foreground = #f5f5f5
label = %percentage_used%%
label-background = #f5f5f5
; Only applies if <bar-used> is used
bar-used-indicator =
bar-used-width = 50
bar-used-foreground-0 = #55aa55
bar-used-foreground-1 = #557755
bar-used-foreground-2 = #f5a70a
bar-used-foreground-3 = #ff5555
bar-used-fill = |
bar-used-empty = |
bar-used-empty-foreground = #444444
; }}}
[module/wlan]
; {{{
type = internal/network
interface = net1
interface = wlp2s0
interval = 3.0
format-connected = <ramp-signal> <label-connected>
format-connected-underline = #9f78e1
label-connected = %essid%
label-connected = %essid% %upspeed%
format-disconnected =
;format-disconnected = <label-disconnected>
@ -307,18 +368,21 @@ format-disconnected =
;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-0 = ▁
ramp-signal-1 = ▂
ramp-signal-2 = ▃
ramp-signal-3 = ▄
ramp-signal-4 = ▅
ramp-signal-5 = ▆
ramp-signal-6 = ▇
ramp-signal-7 = █
ramp-signal-foreground = ${colors.foreground-alt}
; }}}
[module/eth]
; {{{
type = internal/network
interface = eno1
interface = enp1s0f2
interval = 3.0
format-connected-underline = #55aa55
@ -385,12 +449,12 @@ bar-volume-empty-forEGROUND = ${colors.foreground-alt}
type = internal/alsa
format-volume = <label-volume> <bar-volume>
label-volume = VOL
label-volume =
label-volume-foreground = ${root.foreground}
format-muted-prefix = " "
#format-muted-prefix = "ﱙ"
format-muted-foreground = ${colors.foreground-alt}
label-muted = sound muted
label-muted = "ﱙ"
bar-volume-width = 10
bar-volume-foreground-0 = #55aa55
@ -470,18 +534,21 @@ type = internal/temperature
thermal-zone = 0
warn-temperature = 60
format-prefix = " "
format-prefix-font = 5
format-prefix-foreground = ${colors.foreground-alt}
format = <ramp> <label>
format-underline = #f50a4d
#format-underline = #00
format-warn = <ramp> <label-warn>
format-warn-underline = ${self.format-underline}
#format-warn-underline = ${self.format-underline}
label = %temperature-c%
label-warn = %temperature-c%
label-warn-foreground = ${colors.secondary}
ramp-0 =
ramp-1 =
ramp-2 =
ramp-0 =
ramp-1 =
ramp-2 =
ramp-foreground = ${colors.foreground-alt}
; }}}
[module/powermenu]
@ -524,11 +591,11 @@ format-spacing = 1
label-open = 
label-open-foreground = #35BF5C
label-close =
label-close =
menu-0-0 = 
menu-0-0-foreground = #123456
menu-0-0-exec = xterm &
menu-0-0-exec = urxvt &
menu-0-1 = 
menu-0-1-exec = qutebrowser &

64
.config/profanity/profrc Normal file
View File

@ -0,0 +1,64 @@
# ########## #
# profrc #
# ########## #
[ui]
splash=true
intype=true
beep=false
statuses.muc=all
theme=mine
history=true
titlebar=true
mouse=true
flash=false
vercheck=false
statuses.console=all
statuses.chat=all
color.nick=true
[chatstates]
enabled=true
outtype=false
gone=10
[notifications]
remind=60
invite=true
sub=true
message=true
room=false
message.current=true
room.current=true
typing=true
typing.current=false
message.text=true
room.text=true
room.mention=true
[alias]
q=/quit
w=/close
[logging]
chlog=true
grlog=true
maxsize=1048580
rotate=true
shared=true
[otr]
warn=true
log=redact
policy=manual
[presence]
autoaway.mode=away
autoaway.check=true
autoaway.awaytime=15
autoaway.awaymessage=Away from computer
# vim:ft=conf

View File

@ -0,0 +1,153 @@
[colours]
bkgnd=default
titlebar=blue
titlebar.text=bold_black
titlebar.brackets=bold_black
titlebar.unencrypted=bold_red
titlebar.encrypted=bold_black
titlebar.untrusted=red
titlebar.trusted=bold_yellow
titlebar.online=bold_black
titlebar.offline=bold_red
titlebar.away=bold_white
titlebar.chat=bold_cyan
titlebar.dnd=bold_red
titlebar.xa=bold_white
statusbar=blue
statusbar.text=bold_black
statusbar.time=bold_black
statusbar.brackets=bold_black
statusbar.active=bold_black
statusbar.new=bold_white
statusbar.current=bold_white
main.text=black
main.text.me=green
main.text.them=bold_black
main.text.history=black
main.splash=bold_red
main.time=cyan
main.trackbar=black
input.text=blue
subscribed=green
unsubscribed=red
otr.started.trusted=bold_black
otr.started.untrusted=red
otr.ended=blue
otr.trusted=yellow
otr.untrusted=red
online=cyan
away=white
chat=cyan
dnd=red
xa=white
offline=bold_black
incoming=bold_yellow
mention=bold_cyan
trigger=blue
typing=yellow
gone=red
error=red
roominfo=yellow
roommention=bold_yellow
roommention.term=bold_blue
roomtrigger=black
roomtrigger.term=bold_black
me=green
them=black
roster.header=bold_blue
roster.chat=yellow
roster.online=yellow
roster.away=white
roster.xa=white
roster.dnd=red
roster.offline=red
roster.chat.active=yellow
roster.online.active=yellow
roster.away.active=cyan
roster.xa.active=cyan
roster.dnd.active=red
roster.offline.active=red
roster.chat.unread=bold_black
roster.online.unread=bold_black
roster.away.unread=bold_black
roster.xa.unread=bold_black
roster.dnd.unread=bold_black
roster.offline.unread=bold_black
roster.room=magenta
roster.room.unread=bold_magenta
roster.room.trigger=bold_blue
roster.room.mention=bold_magenta
occupants.header=bold_yellow
receipt.sent=bold_black
untrusted=black
cmd.wins.unread=bold_red
[ui]
beep=false
flash=false
splash=true
wrap=true
time.console=%H:%M:%S
time.chat=%d/%m/%y %H:%M:%S
time.muc=%d/%m/%y %H:%M:%S
time.config=off
time.private=%d/%m/%y %H:%M:%S
time.xmlconsole=%H:%M:%S
time.lastactivity=%d/%m/%y %H:%M:%S
time.statusbar=%H:%M:%S
privileges=true
presence=true
intype=true
enc.warn=true
resource.title=true
resource.message=true
statuses.console=none
statuses.chat=none
statuses.muc=none
roster=true
roster.offline=false
roster.empty=false
roster.by=none
roster.order=presence
roster.unread=after
roster.count=false
roster.priority=false
roster.size=25
roster.wrap=true
roster.header.char=+
roster.contact.char=-
roster.contact.indent=1
roster.resource=true
roster.resource.char=/
roster.resource.indent=1
roster.resource.join=true
roster.presence=true
roster.presence.indent=-1
roster.status=true
roster.contacts=true
roster.unsubscribed=true
roster.rooms=true
roster.rooms.order=name
roster.rooms.unread=after
roster.rooms.pos=last
roster.rooms.by=none
roster.rooms.char=/
roster.rooms.private.char=/
roster.private=room
roster.private.char=/
occupants=true
occupants.size=15
occupants.char=-
occupants.jid=false
occupants.wrap=true
occupants.indent=1
occupants.header.char=-
wins.autotidy=true
otr.char=@
pgp.char=%
omemo.char=*
console.muc=first
console.chat=all
console.private=all
inputwin.position=4
correction.char=+

100
.config/rofi-pass/config Normal file
View File

@ -0,0 +1,100 @@
#╔══════════════════╗
#║ Rofi pass config ║
#╚══════════════════╝
# rofi command. Make sure to have "$@" as last argument
_rofi () {
rofi -i -no-auto-select "$@"
}
# default command to generate passwords
_pwgen () {
pwgen -y "$@"
}
# image viewer to display qrcode of selected entry
# qrencode is needed to generate the image and a viewer
# that can read from pipes. Known viewers to work are feh and display
_image_viewer () {
feh -
# display
}
# xdotool needs the keyboard layout to be set using setxkbmap
# You can do this in your autostart scripts (e.g. xinitrc)
# If for some reason, you cannot do this, you can set the command here.
# and set fix_layout to true
fix_layout=false
layout_cmd () {
setxkbmap us
}
# fields to be used
URL_field='URL'
USERNAME_field='LOGIN'
AUTOTYPE_field='autotype'
# delay to be used for :delay keyword
delay=1
# rofi-pass needs to close itself before it can type passwords. Set delay here.
wait=0.2
# delay between keypresses when typing (in ms)
xdotool_delay=12
## Programs to be used
# Editor
EDITOR='gvim -f'
# Browser
BROWSER='xdg-open'
## Misc settings
default_do='menu' # menu, autotype, copyPass, typeUser, typePass, copyUser, copyUrl, viewEntry, typeMenu, actionMenu, copyMenu, openUrl
auto_enter='false'
notify='false'
default_autotype='user :tab pass'
# color of the help messages
# leave empty for autodetection
help_color="#4872FF"
# Clipboard settings
# Possible options: primary, clipboard, both
clip=primary
# Seconds before clearing pass from clipboard
clip_clear=45
## Options for generating new password entries
# open new password entries in editor
edit_new_pass="true"
# default_user is also used for password files that have no user field.
#default_user="${ROFI_PASS_DEFAULT_USER-$(whoami)}"
#default_user=":filename"
#password_length=12
# Custom Keybindings
autotype="Alt+1"
type_user="Alt+2"
type_pass="Alt+3"
open_url="Alt+4"
copy_name="Alt+u"
copy_url="Alt+l"
copy_pass="Alt+p"
show="Alt+o"
copy_entry="Alt+2"
type_entry="Alt+1"
copy_menu="Alt+c"
action_menu="Alt+a"
type_menu="Alt+t"
help="Alt+h"
switch="Alt+x"
insert_pass="Alt+n"

View File

@ -7,7 +7,7 @@
# terminal emulator
super + Return
uxterm
termite
# program launcher
super + @space
@ -129,5 +129,3 @@ ctrl + {Left,Down,Up,Right}
bspc node -v {-20 0,0 20,0 -20,20 0}
# }}}
# vim:foldmethod=marker:foldlevel=0

126
.config/termite/config Normal file
View File

@ -0,0 +1,126 @@
[options]
allow_bold = true
#audible_bell = false
bold_is_bright = true
#cell_height_scale = 1.0
#cell_width_scale = 1.0
clickable_url = true
dynamic_title = true
font = Symbola 9
font = DejaVu Sans Mono 9
fullscreen = true
#icon_name = terminal
#mouse_autohide = false
#scroll_on_output = false
#scroll_on_keystroke = true
# Length of the scrollback buffer, 0 disabled the scrollback buffer
# and setting it to a negative value means "infinite scrollback"
scrollback_lines = 10000
#search_wrap = true
#urgent_on_bell = true
#hyperlinks = false
# $BROWSER is used by default if set, with xdg-open as a fallback
browser = qutebrowser
# "system", "on" or "off"
#cursor_blink = system
# "block", "underline" or "ibeam"
#cursor_shape = block
# Hide links that are no longer valid in url select overlay mode
#filter_unmatched_urls = true
# Emit escape sequences for extra modified keys
#modify_other_keys = false
# set size hints for the window
#size_hints = false
# "off", "left" or "right"
#scrollbar = off
[colors]
# If both of these are unset, cursor falls back to the foreground color,
# and cursor_foreground falls back to the background color.
#cursor = #dcdccc
#cursor_foreground = #dcdccc
#foreground = #dcdccc
#foreground_bold = #ffffff
#background = #3f3f3f
foreground = #565e65
foreground_bold = #565e65
cursor = #565e65
# 20% background transparency (requires a compositor)
background = rgba(63, 63, 63, 0.)
# If unset, will reverse foreground and background
highlight = #2f2f2f
# Colors from color0 to color254 can be set
#color0 = #3f3f3f
#color1 = #705050
#color2 = #60b48a
#color3 = #dfaf8f
#color4 = #506070
#color5 = #dc8cc3
#color6 = #8cd0d3
#color7 = #dcdccc
#color8 = #709080
#color9 = #dca3a3
#color10 = #c3bf9f
#color11 = #f0dfaf
#color12 = #94bff3
#color13 = #ec93d3
#color14 = #93e0e3
#color15 = #ffffff
# black
color0 = #222425
color8 = #747c84
# red
color1 = #eca55c
color9 = #ed723b
# green
color2 = #75daa6
color10 = #95ac41
# yellow
color3 = #f9ca62
color11 = #dfe96f
# blue
color4 = #ae95c7
color12 = #ae95c7
# magenta
color5 = #c795ae
color13 = #c795ae
# cyan
color6 = #95aec7
color14 = #95aec7
# white
color7 = #c8ced5
color15 = #cedbe8
[hints]
#font = Monospace 12
#foreground = #dcdccc
#background = #3f3f3f
#active_foreground = #e68080
#active_background = #3f3f3f
#padding = 2
#border = #3f3f3f
#border_width = 0.5
#roundness = 2.0
# vim: ft=dosini cms=#%s

View File

@ -0,0 +1,7 @@
[main]
# A glob expression which matches all directories relevant.
path = ~/.vdirsyncer/calendars/*
date_format = %Y-%m-%d
time_format = %H:%M
default_list = Personal
default_due = 48

48
.config/vdirsyncer/config Normal file
View File

@ -0,0 +1,48 @@
# #################### #
# vdirsyncer config #
# #################### #
# General vdirsyncer config {{{
[general]
status_path = "~/.vdirsyncer/status"
# }}}
# Define storages here {{{
[storage remote_contacts]
type = "carddav"
url = "https://dav.moqueur.chat/dav.php"
auth = "digest"
username = "etienne"
password.fetch = ["command", "pass", "Yuno/DAV"]
[storage remote_calendars]
type = "caldav"
url = "https://dav.moqueur.chat/dav.php"
auth = "digest"
username = "etienne"
password.fetch = ["command", "pass", "Yuno/DAV"]
[storage local_contacts]
type = "filesystem"
path = "~/.vdirsyncer/contacts/"
fileext = ".vcf"
[storage local_calendars]
type = "filesystem"
path = "~/.vdirsyncer/calendars/"
fileext = ".ics"
# }}}
# Define pairings here {{{
[pair contacts]
a = "local_contacts"
b = "remote_contacts"
collections = ["from a", "from b"]
conflict_resolution = "b wins"
metadata = ["displayname"]
[pair calendars]
a = "local_calendars"
b = "remote_calendars"
collections = ["from a","from b"]
conflict_resolution = "b wins"
metadata = ["color","displayname"]
# }}}

View File

@ -19,5 +19,3 @@ set hightlight-color-active "#F8EC7C" # Active highlighted part
set adjust-open "width" # Open documents adjusted to the width
# }}}
# vim:foldmethod=marker:foldlevel=0

12
.mailcap Normal file
View File

@ -0,0 +1,12 @@
# ############### #
# .mutt/mailcap #
# ############### #
# How to open stuff
# HTML mails
text/html; lynx --display_charset=utf8 -dump %s; nametemplate=%s.html; copiousoutput;
# Images
image/*; feh %s
# PDF
application/pdf; zathura %s

171
.mutt/add_account.sh Executable file
View File

@ -0,0 +1,171 @@
#!/bin/bash
### A simple script I use to add a mailbox to mutt
## Inform the script about the specifics of your mailbox (mail, user name, password, ...)
## The script will then write:
## * .mbsyncrc to configure the imap part
## * .msmtprc to configure the smtp part
## * .mutt/accounts, .mutt/$account and .mutt/sidebar-accounts for the mutt part
##
## This provides a basic config, which may have to be modified afterwards for specific uses
echo
echo "-----------------------"
echo "----- ADD MAILBOX -----"
echo "-----------------------"
echo
### Get info
read -p "account name: " account
read -p "mail address: " mail
# grep the domain name
domain=$(echo $mail | grep -o "@[[:alnum:][:graph:]]*" | sed -e 's/@//g')
read -p "user name (defaults as $mail): " user
if [ -z $user ];then user=$mail;fi
read -p "full name: " name
read -p "signature (defaults to $name): " sign
if [ -z $sign ];then sign=$name;fi
read -p "imap server (defaults to imap.$domain): " imap
if [ -z $imap ];then imap="imap.$domain";fi
read -p "smtp server (defaults to smtp.$domain): " smtp
if [ -z $smtp ];then smtp="smtp.$domain";fi
read -p "smtp port (defaults to 587): " sport
if [ -z $sport ];then sport=587;fi
read -p "Use plaintext pass? [y/N]: " choice
if [ -z $choice ] || [ $choice = "N" ] || [ $choice = "n" ];then
read -p "password evaluation command: " password
else
read -p "Password: " password
fi
### Write files
## .mbsyncrc
outfile=$HOME/.mbsyncrc
if [ -z $choice ] || [ $choice = "n" ] || [ $choice = "N" ];then
passcmd=PassCmd
else
passcmd=Password
fi
if [ ! -f $outfile ];then
echo "# ########### #
# .mbsyncrc #
# ########### #
# from https://gist.github.com/chandraratnam/f00ab7d4a5298830f692021964fdb99f
Create Both
Expunge Both
SyncState *
">>$outfile
fi
echo "## $account {{{
IMAPAccount $account
# Account info
Host $imap
User $user
$passcmd \"$password\"
# Use SSL
SSLType IMAPS
CertificateFile /etc/ssl/certs/ca-certificates.crt
AuthMechs LOGIN
IMAPStore $account-remote
Account $account
MaildirStore $account-local
Subfolders Verbatim
Path ~/.mail/$account/
Inbox ~/.mail/$account/Inbox
Channel $account
Master :$account-remote:
Slave :$account-local:
Patterns "INBOX" "Sent" "Trash" "Drafts"
# }}}">>$outfile
mkdir $HOME/.mail/$account
## .msmtprc
outfile=$HOME/.msmtprc
if [ -z $choice ] || [ $choice = "n" ] || [ $choice = "N" ];then
passcmd=passwordeval
else
passcmd=password
fi
if [ ! -f $outfile ];then
echo "# ########## #
# .msmtprc #
# ########## #
## General config {{{
# Set default values for all following accounts.
defaults
auth on
tls on
tls_trust_file /etc/ssl/certs/ca-certificates.crt
logfile ~/.msmtp.log
# }}}
">>$outfile
fi
echo "
## $account {{{
account $account
host $smtp
port $sport
from $mail
user $user
$passcmd \"$password\"
# }}}">>$outfile
## .mutt/accounts
outfile=$HOME/.mutt/accounts
if [ ! -f $outfile ];then
echo "### Accounts configuration"
fi
echo "## $account {{{
source "~/.mutt/$account"
folder-hook \$folder 'source ~/.mutt/$account'
# Change inbox (and source)
macro index,pager <f2> '<enter-command>source ~/.mutt/$account<enter><change-folder>!<enter>'
# }}}">>$outfile
## .mutt/$account
# It is assumed that .mutt/$account does not exist yet
outfile=$HOME/.mutt/$account
echo "color status yellow default
## Receive options.
set folder = "~/.mail/$account"
set spoolfile = +Inbox
set postponed = +Drafts
set record = +Sent
## Send options.
set realname='$name'
set from = \"$mail\"
set sendmail = \"/usr/bin/msmtp -a $account\"
set sendmail_wait = 0 # Wait for mail to be sent before going back to mail list
unset record # Do not record sent mails (done server side)
set signature=\"$name\"">>$outfile
## .mutt/sidebar-accounts
outfile=$HOME/.mutt/sidebar-accounts
if [ ! -f $outfile ];then
echo "### Add the relevant boxes to the sidebar
# vim: ft=muttrc"
fi
echo "mailboxes -label $account '~/.mail/$account/Inbox'">>$outfile

14
.mutt/model Normal file
View File

@ -0,0 +1,14 @@
color status yellow default
## Receive options.
set folder = "~/.mail/model"
set spoolfile = +Inbox
set postponed = +Drafts
set record = +Sent
## Send options.
set realname='First Last'
set from = "user@domain.tld"
set sendmail = "/usr/bin/msmtp -a model"
set sendmail_wait = 0 # Wait for mail to be sent before going back to mail list
unset record # Do not record sent mails (done server side)
set signature="Sign"

89
.muttrc Normal file
View File

@ -0,0 +1,89 @@
# ########### #
# .muttrc #
# ########### #
## General options {{{
set header_cache = "~/.cache/mutt"
set mail_check = 60
set mbox_type=Maildir
set editor=vim
auto_view text/html
# }}}
## Shortcuts {{{
macro index S "!mbsync -a^M" "Update through mbsync"
bind index <space> collapse-thread
# Scan and open URLs
macro pager \cu |urlscan<enter>
# Add address to khard (see address book)
macro index,pager A "<pipe-message>khard add-email<return>" "add the sender email address to khard"
# }}}
## Appearance {{{
set date_format = "%d/%m (%H:%M)" # Date as day/month
set index_format = "[%Z] %D %-20.20F %s" # Display [status] date Who What
set sort = threads # Nice tree view for threads
set sort_aux = reverse-last-date-received # New mail on top
unset markers # Remove those '+' signs at line breaks
# }}}
## Colors {{{
# Palette for use with the Linux console. Black background.
#color hdrdefault blue default
color quoted blue default
color signature blue default
color attachment brightyellow default
color prompt brightmagenta default
color message brightred default
color error brightred default
color indicator black white
color status brightgreen blue
color tree default default
color normal default default
color markers red default
color search white default
color tilde brightmagenta default
# Colors by tags:
# all ~A
# del ~D
# flag ~F
# new ~N
# old ~O
# repl ~Q
# read ~R
# tag ~T
# unrea ~U
color index blue default ~F
color index brightcyan default "~N|~O"
color index green default "~Q"
color body brightwhite default '\*+[^*]+\*+'
color body brightgreen default '_+[^_]+_+'
# }}}
## Sidebar {{{
# Sidebar info and colors
set sidebar_visible = yes
set sidebar_width = 20
set sidebar_short_path = yes
set sidebar_sort_method = unsorted
set sidebar_format = '%B%?F? [%F]?%* %?N?%N/?%S'
source '~/.mutt/sidebar-accounts'
# }}}
## Address Book {{{
# Use khard as an addressbook
set query_command= "echo %s | xargs khard email --parsable --search-in-source-files"
bind editor <Tab> complete-query
bind editor ^T complete
# }}}
### Accounts {{{
# Typical account declaration:
# mailboxes '------- Mailbox -------' # Add a delimiter to the sidebar
# source "./mutt/model
# folder-hook $folder 'source ~/.mutt/model'
# macro index,pager <fN> '<enter-command>source ~/.mutt/model<enter><change-folder>!<enter>'
#
#All accounts declarations are kept in .mutt/accounts and sourced here (only because I don't want to widespread all my mail addresse :)
source ~/.mutt/accounts
# }}}
# vim:foldmethod=marker:foldlevel=0

View File

@ -0,0 +1,26 @@
snippet tdy "prints the date dd/mm/yyyy"
`date +%d/%m/%Y`
endsnippet
snippet box "a simple box"
`!p snip.rv = '┌' + '─' * (len(t[1]) + 2) + '┐'`
│ $1 │
`!p snip.rv = '└' + '─' * (len(t[1]) + 2) + '┘'`
$0
endsnippet
snippet bbox "a double walled box"
`!p snip.rv = '╔' + '═' * (len(t[1]) + 2) + '╗'`
║ $1 ║
`!p snip.rv = '╚' + '═' * (len(t[1]) + 2) + '╝'`
$0
endsnippet
snippet test "this one's just a test"
${VISUAL}`!p snip.rv = path`
`!p snip.rv = snip.v.text+'╔' + '═' * (len(t[1]) + 2) + '╗'`
${VISUAL}║ $1 ║
`!p snip.rv = snip.v.text+'╚' + '═' * (len(t[1]) + 2) + '╝'`
$0
endsnippet

View File

@ -0,0 +1,27 @@
# ################ #
# Mail snippets #
# ################ #
snippet bj "bonjour" bA
Bonjour`!p if t[1]:
snip.rv=' '
else:
snip.rv=''
`$1,
$0
Amitiés,
Etienne
endsnippet
snippet bs "bonsoir" bA
Bonsoir`!p if t[1]:
snip.rv=' '
else:
snip.rv=''
`$1,
$0
Amitiés,
Etienne
endsnippet

View File

@ -0,0 +1,3 @@
snippet ln "Markdown hyperlink" w
(${1:$VISUAL})[https://$2]$0
endsnippet

View File

@ -0,0 +1,56 @@
# #################################### #
# Tex snippets #
# Mostly thanks to https://castel.dev/ #
# #################################### #
# Define a math zone to control snippets expansions
global !p
texMathZones = ['texMathZone' + x for x in ['A', 'AS', 'B', 'BS', 'C', 'CS',
'D', 'DS', 'E', 'ES', 'F', 'FS', 'G', 'GS', 'H', 'HS', 'I', 'IS', 'J', 'JS',
'K', 'KS', 'L', 'LS', 'DS', 'V', 'W', 'X', 'Y', 'Z', 'AmsA', 'AmsB', 'AmsC',
'AmsD', 'AmsE', 'AmsF', 'AmsG', 'AmsAS', 'AmsBS', 'AmsCS', 'AmsDS', 'AmsES',
'AmsFS', 'AmsGS' ]]
texIgnoreMathZones = ['texMathText']
texMathZoneIds = vim.eval('map('+str(texMathZones)+", 'hlID(v:val)')")
texIgnoreMathZoneIds = vim.eval('map('+str(texIgnoreMathZones)+", 'hlID(v:val)')")
ignore = texIgnoreMathZoneIds[0]
def math():
synstackids = vim.eval("synstack(line('.'), col('.') - (col('.')>=2 ? 1 : 0))")
try:
first = next(
i for i in reversed(synstackids)
if i in texIgnoreMathZoneIds or i in texMathZoneIds
)
return first != ignore
except StopIteration:
return False
endglobal
# Environments
snippet beg "begin{} / end{}" bA
\begin{$1}
$0
\end{$1}
endsnippet
snippet mk "Inline math" wA
$${1}$`!p
if t[2] and t[2][0] not in [',', '.', '?', '-', ' ']:
snip.rv = ' '
else:
snip.rv = ''
`$2
endsnippet
snippet dm "Display math" wA
\[
$1
\] $0
endsnippet

21
.vimrc
View File

@ -14,12 +14,16 @@ set expandtab " TABS are (actually) spaces
"}}}
" Various UI config {{{
" Various tweakings of the UI
set number " Show line number
set number " Show line number
set cursorline " Highlights the current line
set wildmenu " Visual menu for autocompletion
set lazyredraw " Do not redraw screen too often (to make macros quicker)
set showmatch " Shows matching pairs of [] () etc.
" }}}
" Leader Shortcuts {{{
" Various shortcuts called by the <leader> char
let mapleader="," " the <leader> char is , (\ by default)
" }}}
" Searching {{{
" How search results are displayed
set incsearch " search as typing
@ -36,9 +40,15 @@ set foldmethod=indent " Base folding on the indentation
" Use space to unfold a block
nnoremap <space> za
" }}}
" Leader Shortcuts {{{
" Various shortcuts called by the <leader> char
let mapleader="," " the <leader> char is , (\ by default)
" Autogroups {{{
" Set some file specific rules
filetype plugin on " Run ftplugin now to be able to ovewrite..
augroup configgroup
autocmd!
autocmd VimEnter * highlight clear SignColumn
autocmd Filetype conf setlocal foldmethod=marker " I like to fold my rc files
autocmd Filetype conf setlocal foldlevel=0
augroup END
" }}}
" Plugins {{{
" Plugin specific settings, using vim-plug https://github.com/junegunn/vim-plug
@ -65,7 +75,7 @@ Plug 'SirVer/ultisnips'
let g:UltiSnipsExpandTrigger='<tab>' " Expand snippets with a TAB
let g:UltiSnipsJumpForwardTrigger='<tab>' " Use TAB to navigate the different zones of your snippet
let g:UltiSnipsJumpBackwardTrigger='<s-tab>' " Use SUPER+TAB to naviguate backwards
let g:UltiSnipsSnippetDirectories=['~/.vim/snippets']
let g:UltiSnipsSnippetDirectories=['~/.vim/ultisnips']
" palenight theme
Plug 'drewtempelmeyer/palenight.vim'
@ -95,5 +105,4 @@ set t_Co=256
syntax enable " If you want syntax coloring...
" }}}
" vim: foldmethod=marker:foldlevel=0

View File

@ -2,12 +2,35 @@
My all important dotfiles 😁
## My environment
Working with bspwm, uxterm, polybar, rofi, picom, text editting with vim and mailing with mutt. I take no to little credit to those files, as they are mainly bits and bobs from around the internet. I try to give credit (when I really rip away a file ina chunck) to where I found it.
Working with bspwm, termite, polybar, rofi, picom, text editing with vim and mailing with mutt (mbsync + mutt + msmtp). I take no to little credit to those files, as they are mainly bits and bobs from around the internet. I try to give credit as much as I can to where I found it.
Feel free to rip away at your turn!
## A quick review of the dots alias
I used the method presented in https://github.com/jaagr/dots to handle those files.
## Software choices
Here are the softs I decided to install, with a reason why...
* Window managing:
* Window manager: (bspwm)[https://github.com/baskerville/bspwm]. A tiling window manager (I wanted to try it, and chose one rather arbitrarily)
* Desktop bars: are of course with (polybar)[https://github.com/polybar/polybar], a super flexible, fully configurable bar.
* Compositor: (picom)[https://github.com/yshui/picom] handle windows transparency and shadows.
* Basic workflow:
* Terminal emulation: (termite)[https://github.com/thestinger/termite]. Great terminal emulator, I chose it for two main reasons, emoji support (😅) and a selection mode _à la_ vim. My original choice was rxvt-unicode but it does not support full unicode... (Cons: haven't found a way to simply manage color themes yet)
* App launcher: (rofi)[https://github.com/davatorium/rofi] is a super useful launcher that replaced dmenu for me. I've also installed (rofi-pass)[https://github.com/carnager/rofi-pass] and (rofimoji)[https://github.com/fwd/rofimoij] to improve the efficiency (Cons: rofi-pass and rofimoji are on separate key-bindings at the moment)
* File manager: (lf)[https://github.com/gokcehan/lf] a simple and efficient CLI file manager written in Go.
* Text editing: (vim)[https://github.com/vim/vim] do I need to present it?
* Communication:
* Mail: (mutt)[http://www.mutt.org], a CLI mail client. It's kinda long to configure and having just the email text can seem strange, butit's super-configurable and lightweight.
* XMPP: (profanity)[https://profanity-im.github.io], a CLI XMPP client. I like that it's one of the rare client that lets you really tweak all the settings you want (resource name, priority, encryption...)
* PIM (personal information management): I basically installed the (pimutils)[https://pimutils.org] suite.
* Dav sync with vdirsyncer
* Calendar with khal
* Contacts with khard
* Tasks with todoman
## About the repo
I used the method presented on (ArchWiki)[https://wiki.archlinux.org/index.php/Dotfiles], or (here)[https://github.com/jaagr/dots] (originally from (hackernews)[https://news.ycombinator.com/item?id=11070797]) to handle those files.
Setting `alias dots=git --git-dir=$HOME/.dotfiles.git/ --work-tree=$HOME'`, and initializing `git init --bare $HOME/.dotfiles.git` you are able to simply:
* check which dotfiles are tracked with `dots status` (set `dots config status.showUntrackedFiles no` to unclutter the output).
@ -20,3 +43,7 @@ rsync -rvl --exclude ".git" /tmp/dots/ $HOME/
rm -r /tmp/dots
dots submodule update --init --recursive $HOME/
```
## A final word (and a note to self)
> Ricing a desktop is looooooooong
> do bear that in mind