add idea of distraction free view

This commit is contained in:
2022-12-29 14:32:07 +01:00
parent 99a0d6a185
commit a4e15965bb
4 changed files with 112 additions and 33 deletions

View File

@@ -21,6 +21,12 @@ sh -c "$(fetch -o - http://gitea.weseng.de/daniel/emacs/raw/master/scripts/insta
Installation path is =~/.config/emacs=. See details and other
installed linux packages as requirements inside =sripts/install.sh=.
* External programs
:PROPERTIES:
:CUSTOM_ID: programs
:END:
- =ripgrep= (optional) used by =counsel-rg= (package =counsel=)
* Usage
:PROPERTIES:
:CUSTOM_ID: usage
@@ -55,10 +61,11 @@ General key bindings and functions
- (=diff-buffer-with-file=) show a diff between buffer (current state) and file (saved state)
#+begin_src sh :exports results
dir=$HOME/repos/emacs-conf/lisp
dir=$(pwd)/lisp
verinfo() {
#echo -n $1 ''
# $dir: directory of packages
# $1: package name (basenaem and w/o extension)
if test -f $dir/$1.el; then
ver=$(grep -i package-version: $dir/$1.el | cut -d":" -f2 | xargs)
if test -z $ver; then
@@ -71,31 +78,31 @@ verinfo() {
fi
}
pkg_custom=$(
for i in $(echo awesome-tray dialog); do
map_pkg_ver() {
# $1: list of package names, either full path (can include a version) or just the package name
# $2: repo name
# 1st: get package name: strips list element to basename and removes version and extension
# 2nd: get package version (from the installed directory)
# 3rd: print info
for i in $1; do
pkg=$(sed 's/-[0-9].*//' <(basename $i))
ver=$(verinfo $pkg)
echo $pkg $ver custom
done)
pkg_elpagnu=$(
for i in $(ls -F ~/repos/my-elpa-gnu/archive/*.tar | grep -v @); do
pkg=$(sed 's/-[0-9].*//' <(basename $i))
ver=$(verinfo $pkg)
echo $pkg $ver elpa-gnu
done)
pkg_elpanongnu=$(
for i in $(ls -F ~/repos/my-elpa-nongnu/archive/*.tar | grep -v @); do
pkg=$(sed 's/-[0-9].*//' <(basename $i))
ver=$(verinfo $pkg)
echo $pkg $ver elpa-nongnu
done)
pkg_melpa=$(
for i in $(sort <(ls ~/repos/my-melpa/packages/*.tar | xargs -n1) <(ls ~/repos/my-melpa/packages/*.el | xargs -n1)); do
pkg=$(sed 's/-[0-9].*//' <(basename $i))
ver=$(verinfo $pkg)
echo $pkg $ver melpa
done)
echo -e "$pkg_custom\n$pkg_elpagnu\n$pkg_elpanongnu\n$pkg_melpa" | sort | column -t -N PACKAGE_____________________,VERSION______,REPO_______
echo $pkg $ver $2
done
}
pkg_custom_list=$(echo awesome-tray dialog)
pkg_elpagnu_list=$(ls -F ~/repos/my-elpa-gnu/archive/*.tar | grep -v @)
pkg_elpanongnu_list=$(ls -F ~/repos/my-elpa-nongnu/archive/*.tar | grep -v @)
pkg_melpa_list=$(sort <(ls ~/repos/my-melpa/packages/*.tar | xargs -n1) <(ls ~/repos/my-melpa/packages/*.el | xargs -n1))
pkg_custom=$(map_pkg_ver "$pkg_custom_list" custom)
pkg_elpagnu=$(map_pkg_ver "$pkg_elpagnu_list" elpa-gnu)
pkg_elpanongnu=$(map_pkg_ver "$pkg_elpanongnu_list" elpa-nongnu)
pkg_melpa=$(map_pkg_ver "$pkg_melpa_list" melpa)
echo -e "$pkg_custom\n$pkg_elpagnu\n$pkg_elpanongnu\n$pkg_melpa" | \
sort | \
column -t -N PACKAGE_____________________,VERSION______,REPO_______
#+end_src
#+RESULTS:
@@ -103,6 +110,7 @@ echo -e "$pkg_custom\n$pkg_elpagnu\n$pkg_elpanongnu\n$pkg_melpa" | sort | column
| ace-window | 20220911.358 | melpa |
| adaptive-wrap | 0.8 | elpa-gnu |
| all-the-icons | 20220929.2303 | melpa |
| all-the-icons-ivy-rich | 20221202.1336 | melpa |
| amx | 20210305.118 | melpa |
| anaconda-mode | 20220922.741 | melpa |
| async | 20221217.649 | melpa |
@@ -169,6 +177,7 @@ echo -e "$pkg_custom\n$pkg_elpagnu\n$pkg_elpanongnu\n$pkg_melpa" | sort | column
| multiple-cursors | 20221126.743 | melpa |
| notmuch | 20221115.1134 | melpa |
| ob-async | 20210428.2052 | melpa |
| olivetti | 20220330.635 | melpa |
| ol-notmuch | 20220428.1337 | melpa |
| org | 9.6 | elpa-gnu |
| org-appear | 20220617.2355 | melpa |
@@ -202,6 +211,7 @@ echo -e "$pkg_custom\n$pkg_elpagnu\n$pkg_elpanongnu\n$pkg_melpa" | sort | column
| polymode | 20220820.163 | melpa |
| popup | 20220927.161 | melpa |
| popwin | 20210215.1849 | melpa |
| posframe | 20221220.544 | melpa |
| pos-tip | 20220715.102 | melpa |
| powershell | 20220805.1712 | melpa |
| pythonic | 20220723.1741 | melpa |
@@ -221,7 +231,7 @@ echo -e "$pkg_custom\n$pkg_elpagnu\n$pkg_elpanongnu\n$pkg_melpa" | sort | column
| systemd | 20210209.2052 | melpa |
| tablist | 20200427.2205 | melpa |
| transient | 20221202.1727 | melpa |
| treemacs | 20221107.2105 | melpa |
| treemacs | 20221221.1301 | melpa |
| treemacs-magit | 20220917.1026 | melpa |
| use-package | 20221209.2013 | melpa |
| virtual-auto-fill | 20200906.2038 | melpa |