config: improve documentation and update a few options

This commit is contained in:
xeruf 2022-09-08 00:43:28 +02:00
parent 323def710e
commit 87e0feeab0
5 changed files with 54 additions and 27 deletions

View File

@ -17,14 +17,14 @@
"microbreakPostponeTime": 120000, "microbreakPostponeTime": 120000,
"breakPostponeTime": 300000, "breakPostponeTime": 300000,
"microbreakPostponesLimit": 1, "microbreakPostponesLimit": 1,
"microbreakPostponableDurationPercent": 30, "microbreakPostponableDurationPercent": 20,
"breakPostponesLimit": 1, "breakPostponesLimit": 3,
"breakPostponableDurationPercent": 30, "breakPostponableDurationPercent": 20,
"mainColor": "#633738", "mainColor": "#633738",
"transparentMode": false, "transparentMode": false,
"opacity": 0.9, "opacity": 0.8,
"audio": "crystal-glass", "audio": "crystal-glass",
"volume": 1, "volume": 0.4,
"fullscreen": true, "fullscreen": true,
"ideas": true, "ideas": true,
"naturalBreaks": true, "naturalBreaks": true,

View File

@ -1,5 +1,6 @@
#!/bin/sh -e #!/bin/sh -e
# Mount a partition by label or device identifier automatically # Mount a partition by label or device identifier automatically
# TODO make this interactive with a fuzzy finder :)
_help="$0 <device> [mountpoint] [options...]" _help="$0 <device> [mountpoint] [options...]"
case $1 in case $1 in
("") ds && echo "$_help" && exit 2;; ("") ds && echo "$_help" && exit 2;;

View File

@ -1,6 +1,6 @@
#!/bin/sh -e #!/bin/sh -e
# Blocks internet at night using iptables and enables it only upon request # Blocks internet at night using iptables and enables it only upon request
# TODO Migrate to nftables # REPLACED by netkeeper with nftables
# Auto-elevate # Auto-elevate
test ${EUID:-0} -eq 0 || exec sudo "$0" "$@" test ${EUID:-0} -eq 0 || exec sudo "$0" "$@"
@ -15,8 +15,6 @@ time9=$(date -u -d "$(date -d 9:00)" +%k)
iptables -A chain-times -m owner --uid-owner janek -j DROP -m time \ iptables -A chain-times -m owner --uid-owner janek -j DROP -m time \
--timestart $(date -u -d "$(date -d "${1:-15 min}")" +%k:%M) --timestop $(expr $time9):00 --timestart $(date -u -d "$(date -d "${1:-15 min}")" +%k:%M) --timestop $(expr $time9):00
# TODO Only 10 minutes every hour, anything else needs justification
# Only allow periodical internet access in the morning # Only allow periodical internet access in the morning
#iptables -A chain-times -m owner --uid-owner janek -j DROP -m time --weekdays 1-5 \ #iptables -A chain-times -m owner --uid-owner janek -j DROP -m time --weekdays 1-5 \
# --timestart $time9:20 --timestop $(expr $time9 + 1):00 # --timestart $time9:20 --timestop $(expr $time9 + 1):00

View File

@ -105,7 +105,7 @@ export LESS_TERMCAP_se=$'\e[0m' # reset reverse video
export LESS_TERMCAP_ue=$'\e[0m' # reset underline export LESS_TERMCAP_ue=$'\e[0m' # reset underline
export GROFF_NO_SGR=1 # for konsole and gnome-terminal export GROFF_NO_SGR=1 # for konsole and gnome-terminal
## fzf defaults ## fzf defaults
[[ "$(fzf --version 2>/dev/null | grep --only-matching '[0-9]\.[^. ]*')" > 0.24 ]] && _fzf_latest=true || _fzf_latest=false [[ "$(fzf --version 2>/dev/null | grep --only-matching '[0-9]\.[^. ]*')" > 0.31 ]] && _fzf_latest=true || _fzf_latest=false
FZF_BINDINGS=$(echo " FZF_BINDINGS=$(echo "
change:top change:top
alt-enter:execute(test -O {} && $EDITOR {} || sudoedit {}) alt-enter:execute(test -O {} && $EDITOR {} || sudoedit {})
@ -125,7 +125,7 @@ alt-shift-down:preview-down,alt-shift-up:preview-up,esc:close")
export FZF_HISTDIR="$XDG_STATE_HOME/fzf" export FZF_HISTDIR="$XDG_STATE_HOME/fzf"
mkdir -p "$XDG_STATE_HOME/fzf" mkdir -p "$XDG_STATE_HOME/fzf"
export FZF_DEFAULT_OPTS="--select-1 --ansi export FZF_DEFAULT_OPTS="--select-1 --ansi
--tiebreak=chunk,end,length --history=$FZF_HISTDIR/history --bind='$FZF_BINDINGS' --tiebreak=$($_fzf_latest && echo "chunk,")end,length --history=$FZF_HISTDIR/history --bind='$FZF_BINDINGS'
$($_fzf_latest && echo '--preview-window=60%,border-left --marker=o')" $($_fzf_latest && echo '--preview-window=60%,border-left --marker=o')"
FD_BASE="fd --hidden --color=always --no-ignore-vcs" FD_BASE="fd --hidden --color=always --no-ignore-vcs"
export FZF_DEFAULT_COMMAND="$FD_BASE --type file" export FZF_DEFAULT_COMMAND="$FD_BASE --type file"

View File

@ -1,16 +1,51 @@
* Dotfiles * Dotfiles
Welcome to Janek's dotfiles,
thousands of lines of handcraft shell code
to make the live of a linux sysadmin
and developer easier!
I mainly use Arch Linux, I mainly use Arch Linux,
currently with the KDE desktop environment currently with the KDE desktop environment with tiling extension
with the intention of moving a tiling WM (Awesome or Sway) soon. with the intention of moving a proper tiling WM (Awesome or Sway) soon.
This config is opinionated,
but currently deployed on multiple machines
including some other eager users
who run Manjaro Sway.
Thus I am progressively generalising it.
If you are not one of those,
you can safely skip the following section.
** Usage
Here are some basic commands you should remember:
- ~u~ to upgrade everything (works on arch-based systems with topgrade installed and any debian-based system, with safeguards to ensure upgrade stability even on longtime dormant machines)
- yas :: interactively install software packages
- yar :: interactively uninstall software packages
- loc :: quickly find a file on your system, case-insensitive
- loca :: do a deep search for a file on the whole system, case-insensitive
- loce :: find a file/directory with exact name match
To mount a device,
first check ~ds~ ([d]isk [s]tats, a prettification of ~lsblk --fs~)
and find your device,
then call ~moul~ with the respective name or label,
e.g. ~moul my-usb~ or ~moul sdc2~.
This will mount the device and jump to the mounted directory.
As long as you are in the device directory
you can unmount it simply by calling ~umoul~,
otherwise provide the argument used above again.
* Overview
If you are looking to snag some of my handy tools, If you are looking to snag some of my handy tools,
focus on [[.local/bin/scripts]] and [[.config/shell]]. focus on [[./.local/bin/scripts][.local/bin/scripts]] and [[./.config/shell][.config/shell]].
Among daily use are ~b~, ~edbin~, ~edconf~, ~edit~, ~help~, [[.config/shell/arch][~yas~]] Among daily use are ~b~, ~edit-*~, ~help~, [[./.config/shell/arch][~yas~]]
and [[https://github.com/ajeetdsouza/zoxide][zoxide]]-based ~d~ / ~di~ and [[https://github.com/ajeetdsouza/zoxide][zoxide]]-based ~d~ / ~di~
which in turn use ~zfz~, ~zf~ & ~locz~. which in turn use ~zfz~, ~zf~ and ~locz~.
~ex~, ~m~, ~moul~, ~rpl~, ~s~, ~sd~, ~tl~, ~walli~ are also commonly used conveniences. ~ex~, ~m~, ~moul~, ~grpr~ / ~rpl~, ~s~, ~sd~, ~tl~ are also commonly used conveniences.
** Root
Below is an overview of the structure
** Home
I am trying to keep my home clean, I am trying to keep my home clean,
but some files unfortunately cannot be moved. but some files unfortunately cannot be moved.
Out of these, only [[.zprofile][.zprofile]] is of interest, Out of these, only [[.zprofile][.zprofile]] is of interest,
@ -26,7 +61,7 @@ and configuration for ~less~ and ~fzf~.
- [[.local/bin/scripts][scripts]] :: lots of useful scripts, - [[.local/bin/scripts][scripts]] :: lots of useful scripts,
most have a short documentation header - most have a short documentation header -
including many essential git scripts including many essential git scripts
* Packages * Package Setup (moving to [[https://git.jfischer.org/xeruf/instalee][Instalee]])
: pacman -Qe | cut -d\ -f1 | xclip -selection clipboard : pacman -Qe | cut -d\ -f1 | xclip -selection clipboard
- dotfiles :: yadm - dotfiles :: yadm
: yadm clone --bootstrap git@git.jfischer.org:xeruf/dotfiles.git : yadm clone --bootstrap git@git.jfischer.org:xeruf/dotfiles.git
@ -86,14 +121,7 @@ https://addons.mozilla.org/firefox/addon/passff
https://addons.mozilla.org/firefox/addon/masterpassword-firefox https://addons.mozilla.org/firefox/addon/masterpassword-firefox
**** [[https://addons.mozilla.org/en-US/firefox/collections/15727735/integration?collection_sort=-popularity][System Integration]] **** [[https://addons.mozilla.org/en-US/firefox/collections/15727735/integration?collection_sort=-popularity][System Integration]]
**** [[https://addons.mozilla.org/en-US/firefox/collections/15727735/privacy?collection_sort=-popularity][Privacy]] **** [[https://addons.mozilla.org/en-US/firefox/collections/15727735/privacy?collection_sort=-popularity][Privacy]]
* Setup Tools to consider
** Ansible
:PROPERTIES:
:ID: ansible
:END:
https://github.com/Oefenweb/ansible-updatedb
* Issues * Issues
- emacstty sometimes breaks terminals
** Manjaro Sway ** Manjaro Sway
- zsh vim bindings don't work properly - zsh vim bindings don't work properly
- clipboard sync does not work in Doom Emacs - clipboard sync does not work in Doom Emacs (fixed?)