Compare commits

...

7 Commits

Author SHA1 Message Date
cho
d9b03108b1 add mpv config 2023-09-05 20:44:34 +07:00
cho
8bdd17332f update 2023-09-05 20:43:34 +07:00
cho
3aa5120c24 properly kill emacs instead of using kill 2023-09-05 20:41:22 +07:00
cho
186f9af806 add syncplay.desktop 2023-09-05 20:40:57 +07:00
cho
a83355aa32 update settings, costumize org-capture and roam capture. etc. 2023-09-05 20:34:18 +07:00
cho
e01793f1bf fix sc-im opens neovim after exit 2023-09-05 20:27:22 +07:00
cho
5547096020 fix for org-roam on termux 2023-09-05 20:26:46 +07:00
9 changed files with 221 additions and 32 deletions

View File

@ -22,7 +22,9 @@
;; accept. For example: ;; accept. For example:
;; ;;
(setq doom-variable-pitch-font (font-spec :family "Libertinus Serif" :size 13)) (setq doom-variable-pitch-font (font-spec :family "Libertinus Serif" :size 13))
;;(setq doom-variable-pitch-font (font-spec :family "DejaVu Serif" :size 13))
;; ;;
;; If you or Emacs can't find your font, use 'M-x describe-font' to look them ;; If you or Emacs can't find your font, use 'M-x describe-font' to look them
;; up, `M-x eval-region' to execute elisp code, and 'M-x doom/reload-font' to ;; up, `M-x eval-region' to execute elisp code, and 'M-x doom/reload-font' to
;; refresh your font settings. If Emacs still can't find your font, it likely ;; refresh your font settings. If Emacs still can't find your font, it likely
@ -35,6 +37,7 @@
;(setq doom-theme 'doom-one) ;(setq doom-theme 'doom-one)
;(setq doom-theme 'doom-wilmersdorf) ;(setq doom-theme 'doom-wilmersdorf)
;(setq doom-theme 'doom-plain-dark) ;(setq doom-theme 'doom-plain-dark)
;(setq doom-theme 'doom-feather-dark)
;(setq doom-theme 'doom-plain) ;(setq doom-theme 'doom-plain)
;(setq doom-theme 'doom-flatwhite) ;(setq doom-theme 'doom-flatwhite)
@ -80,13 +83,15 @@
;; You can also try 'gd' (or 'C-c c d') to jump to their definition and see how ;; You can also try 'gd' (or 'C-c c d') to jump to their definition and see how
;; they are implemented. ;; they are implemented.
(after! org
;;; agenda files ;;; agenda files
(setq org-agenda-files '("~/housekeeping/calendar.org" (setq org-agenda-files '("~/housekeeping/calendar.org"
"~/notebook/ag/" "~/notebook/ag/"
"~/notebook/refile.org")) "~/notebook/refile.org"
"~/notebook/notes/events/birthdays.org"))
(after! org
(setq org-log-done 'time) (setq org-log-done 'time)
(use-package! org-journal (use-package! org-journal
@ -134,12 +139,137 @@
(setq org-wild-notifier-keyword-whitelist nil)) (setq org-wild-notifier-keyword-whitelist nil))
(setq org-wild-notifier-keyword-blacklist '("DONE")) (setq org-wild-notifier-keyword-blacklist '("DONE"))
;; org-roam configurations
(use-package! org-roam (use-package! org-roam
:ensure t :ensure t
:custom :custom
(setq org-roam-directory "~/notebook/roam/") (setq org-roam-directory "~/notebook/roam/")
:config :config
(org-roam-setup)) (org-roam-setup))
(setq org-roam-capture-templates
'(("d" "default" plain "%?"
:target (file+head "%<%Y%m%d%H%M%S>-${slug}.org"
"#+title: ${title}\n")
:unnarrowed t)
;; main things
("l" "literature" plain "%?"
:if-new
(file+head "literature/%<%Y%m%d%H%M%S>-${title}.org" "#+title: ${title}\n")
:immediate-finish t
:unnarrowed t)
("p" "permanent" plain "%?"
:if-new
(file+head "permanent/%<%Y%m%d%H%M%S>-${title}.org" "#+title: ${title}\n")
:immediate-finish t
:unnarrowed t)
("f" "fleeting" plain "%?"
:if-new
(file+head "fleeting/%<%Y%m%d%H%M%S>-${title}.org" "#+title: ${title}\n")
:immediate-finish t
:unnarrowed t)
;; other categories
("r" "reference" plain "%?"
:if-new
(file+head "reference/%<%Y%m%d%H%M%S>-${title}.org" "#+title: ${title}\n")
:immediate-finish t
:unnarrowed t)
("a" "article" plain "%?"
:if-new
(file+head "articles/%<%Y%m%d%H%M%S>-${title}.org" "#+title: ${title}\n#+filetags: :article:\n")
:immediate-finish t
:unnarrowed t)))
;(cl-defmethod org-roam-node-type ((node org-roam-node))
; "Return the TYPE of NODE."
; (condition-case nil
; (file-name-nondirectory
; (directory-file-name
; (file-name-directory
; (file-relative-name (org-roam-node-file node) org-roam-directory))))
; (error "")))
;(setq org-roam-node-display-template
; (concat "${type:15} ${title:*} " (propertize "${tags:10}" 'face 'org-tag)))
;;; org-capture stuff
(setq +org-capture-todo-file "ag/todo.org")
;; this sets Personal notes to refile instead
(defvar +org-capture-refile-file "refile.org")
(setq +org-capture-refile-file
(expand-file-name +org-capture-refile-file org-directory))
;(add-to-list 'org-capture-templates
; '(("s" "Slipbox" entry (file "braindump/org/inbox.org")
; "* %?\n")
; ("t" "Personal todo" entry
; (file+headline +org-capture-todo-file "Inbox")
; "* [ ] %?\n%i\n%a" :prepend t)
; )
(setq org-capture-templates
'(("t" "Personal todo" entry
(file+headline +org-capture-todo-file "todo")
"* [ ] %?\n%i\n%a")
("T" "Personal todo (single)" entry
(file+headline +org-capture-todo-file "todo")
"* [ ] %?\n")
("n" "Personal notes" entry
(file +org-capture-refile-file)
"* %u %?\n%i\n%a" :prepend t)
;; using org-journal atm..
;("j" "Journal" entry
;(file+olp+datetree +org-capture-journal-file)
;"* %U %?\n%i\n%a" :prepend t)
;; Will use {project-root}/{todo,notes,changelog}.org, unless a
;; {todo,notes,changelog}.org file is found in a parent directory.
;; Uses the basename from `+org-capture-todo-file',
;; `+org-capture-changelog-file' and `+org-capture-notes-file'.
("p" "Templates for projects")
("pt" "Project-local todo" entry ; {project-root}/todo.org
(file+headline +org-capture-project-todo-file "Inbox")
"* TODO %?\n%i\n%a" :prepend t)
("pn" "Project-local notes" entry ; {project-root}/notes.org
(file+headline +org-capture-project-notes-file "Inbox")
"* %U %?\n%i\n%a" :prepend t)
("pc" "Project-local changelog" entry ; {project-root}/changelog.org
(file+headline +org-capture-project-changelog-file "Unreleased")
"* %U %?\n%i\n%a" :prepend t)
;; Will use {org-directory}/{+org-capture-projects-file} and store
;; these under {ProjectName}/{Tasks,Notes,Changelog} headings. They
;; support `:parents' to specify what headings to put them under, e.g.
;; :parents ("Projects")
("o" "Centralized templates for projects")
("ot" "Project todo" entry
(function +org-capture-central-project-todo-file)
"* TODO %?\n %i\n %a"
:heading "Tasks"
:prepend nil)
("on" "Project notes" entry
(function +org-capture-central-project-notes-file)
"* %U %?\n %i\n %a"
:heading "Notes"
:prepend t)
("oc" "Project changelog" entry
(function +org-capture-central-project-changelog-file)
"* %U %?\n %i\n %a"
:heading "Changelog"
:prepend t)
;; org books / general logging
("b" "Book log" item (function org-books-visit-book-log)
"- %U %?" :prepend t)
;; zettelkasten
("s" "Slipbox" entry (file "roam/inbox.org")
"* %?\n")))
) )
;;; end of (!after org ... ;;; end of (!after org ...
@ -178,3 +308,12 @@
(let ((org-agenda-tag-filter-preset '("-habits"))) (let ((org-agenda-tag-filter-preset '("-habits")))
(org-agenda arg "a"))) (org-agenda arg "a")))
(bind-key "<f5>" 'agenda/hide-daily-schedule-1) (bind-key "<f5>" 'agenda/hide-daily-schedule-1)
;;; termux specific
;(setq browse-url-browser-function 'browse-url-generic
; browse-url-generic-program "termux-open")
(defun jethro/org-archive-done-tasks ()
"Archive all done tasks."
(interactive)
(org-map-entries 'org-archive-subtree "/DONE" 'file))

View File

@ -50,6 +50,11 @@
;(unpin! t) ;(unpin! t)
;(package! org-wild-notifier :disable t) ;; currently using a customized version loaded locally ;(package! org-wild-notifier :disable t) ;; currently using a customized version loaded locally
;; for termux only: straight and org (org-roam) are as of writing (early 2023-08) unstable
;(package! straight :pin "921a449")
;(package! org :pin "ca873f7")
(package! org-books) (package! org-books)
;;; customized to support repeated tasks, see https://github.com/akhramov/org-wild-notifier.el/issues/41 ;;; customized to support repeated tasks, see https://github.com/akhramov/org-wild-notifier.el/issues/41

View File

@ -16,7 +16,7 @@ cmd open ${{
case "$(printf "%s\n" "$f" | awk '{print tolower($0)}')" in case "$(printf "%s\n" "$f" | awk '{print tolower($0)}')" in
*.kra|*.krz|*.ora) setsid -f krita $f >/dev/null 2>&1 && exit 0 ;; *.kra|*.krz|*.ora) setsid -f krita $f >/dev/null 2>&1 && exit 0 ;;
*.xlsx) setsid -f libreoffice $f >/dev/null 2>&1 && exit 0 ;; *.xlsx) setsid -f libreoffice $f >/dev/null 2>&1 && exit 0 ;;
*.sc) sc-im $f ;; *.sc) sc-im $f && exit 0;;
*.org) setsid -f em $f >/dev/null 2>&1 && exit 0 ;; *.org) setsid -f em $f >/dev/null 2>&1 && exit 0 ;;
esac esac
case $(file --mime-type "$(readlink -f $f)" -b) in case $(file --mime-type "$(readlink -f $f)" -b) in

View File

@ -0,0 +1,4 @@
l seek 5
h seek -5
j seek -60
k seek 60

View File

@ -0,0 +1 @@
save-position-on-quit

View File

@ -25,7 +25,7 @@ case "$(printf "🔒 lock\n🚪 leave $WM\n♻ renew $WM\n🐻 hibernate\n
' fcitx5') fcitx5 ;; ' fcitx5') fcitx5 ;;
' kill fcitx5') killall fcitx5 ;; ' kill fcitx5') killall fcitx5 ;;
' start emacs daemon') emacs --daemon && notify-send 'emacs daemon started' ;; ' start emacs daemon') emacs --daemon && notify-send 'emacs daemon started' ;;
' kill emacs daemon') killall emacs && notify-send 'emacs daemon killed' ;; ' kill emacs daemon') emacsclient -e '(kill-emacs)' && notify-send 'emacs daemon killed' ;;
' restart emacs daemon') killall emacs && notify-send 'emacs daemon killed' ; emacs --daemon && notify-send 'emacs daemon started' ;; ' restart emacs daemon') emacsclient -e '(kill-emacs)' && notify-send 'emacs daemon killed' ; emacs --daemon && notify-send 'emacs daemon started' ;;
*) exit 1 ;; *) exit 1 ;;
esac esac

View File

@ -0,0 +1,4 @@
[Desktop Entry]
Type=Application
Name=Syncplay
Exec=/home/default/.local/bin/syncplay

View File

@ -1,6 +1,8 @@
#+title: Instructions #+title: Instructions
setting up the system and packages ** information
This org document is a list of instructions on how to install the whole setup of my personal system, including installation of standalone programs.
** installing fedora minimal with btrfs snapshots (snapper) ** installing fedora minimal with btrfs snapshots (snapper)
@ -65,7 +67,7 @@ for building/installing packages, also some dependencies for doomemacs, and zsh.
sudo dnf install curl ca-certificates make automake gcc gcc-c++ kernel-devel git util-linux-user zsh ntpsec dnf-plugins-core golang flatpak cmake libevdev-devel systemd-devel yaml-cpp-devel boost-devel ripgrep fd-find ShellCheck tar pip npm sudo dnf install curl ca-certificates make automake gcc gcc-c++ kernel-devel git util-linux-user zsh ntpsec dnf-plugins-core golang flatpak cmake libevdev-devel systemd-devel yaml-cpp-devel boost-devel ripgrep fd-find ShellCheck tar pip npm
#+END_SRC #+END_SRC
** get dotfiles ** installing dotfiles
#+BEGIN_SRC sh #+BEGIN_SRC sh
# getting dotfiles # getting dotfiles
@ -82,6 +84,7 @@ mkdir -p ~/.config/shell
mkdir -p ~/.config/mpd mkdir -p ~/.config/mpd
mkdir -p ~/.config/zsh mkdir -p ~/.config/zsh
mkdir -p ~/.config/newsboat mkdir -p ~/.config/newsboat
mkdir -p ~/.config/nvim
cd ~/.dots/home/ && stow default --target=$HOME/ cd ~/.dots/home/ && stow default --target=$HOME/
#+END_SRC #+END_SRC
@ -92,7 +95,7 @@ cd ~/.dots/home/ && stow default --target=$HOME/
cd ~/.dots/home/ && stow -D default --target=$HOME/ cd ~/.dots/home/ && stow -D default --target=$HOME/
#+END_SRC #+END_SRC
** rpmfusion ** setting up rpmfusion
from https://rpmfusion.org/Configuration and https://rpmfusion.org/Howto/Multimedia from https://rpmfusion.org/Configuration and https://rpmfusion.org/Howto/Multimedia
@ -128,7 +131,7 @@ the other dependency not included in packages.txt is `pup` (included in a sectio
sudo dnf install -y $(cat ~/.dots/packages.txt) sudo dnf install -y $(cat ~/.dots/packages.txt)
#+END_SRC #+END_SRC
** sudoers ** configuring sudoers
Allow wheel users to sudo with password and allow several system commands Allow wheel users to sudo with password and allow several system commands
(like `shutdown` to run without password). (like `shutdown` to run without password).
@ -167,7 +170,7 @@ https://addons.mozilla.org/en-US/firefox/addon/multi-account-containers/
** doom emacs ** doom emacs
first we need marked for markdown support first we need to install marked for markdown support
#+BEGIN_SRC sh #+BEGIN_SRC sh
sudo npm install -g marked sudo npm install -g marked
@ -191,7 +194,7 @@ mkdir -p $HOME/.cache/lf
** interception tools (keyboard input mappings) ** interception tools (keyboard input mappings)
change caps lock to escape (pressed) and mod (held down) change caps lock to escape (when pressed) and mod (when held down)
INSTALL FROM SOURCE INSTALL FROM SOURCE
@ -243,10 +246,13 @@ pip install autotiling==1.8
** sc-im (terminal spreadsheet) ** sc-im (terminal spreadsheet)
from https://github.com/andmarti1424/sc-im/wiki/Installing-on-Fedora-36--(packaged) from https://github.com/andmarti1424/sc-im/wiki/Installing-on-Fedora-27
#+BEGIN_SRC sh #+BEGIN_SRC sh
sudo dnf copr enable marcusmueller/sc-im sudo dnf install libzip-devel libxml2-devel ncurses-devel byacc git gcc gnuplot
sudo dnf install sc-im git clone https://github.com/andmarti1424/sc-im.git
cd sc-im/src/
make
sudo make install
#+END_SRC #+END_SRC
** nsxiv (image viewer) ** nsxiv (image viewer)
@ -256,7 +262,7 @@ dnf copr enable mamg22/nsxiv
dnf install nsxiv dnf install nsxiv
#+END_SRC #+END_SRC
** pip ** pip packages
*** keepmenu (dmenu keepassxc client) *** keepmenu (dmenu keepassxc client)
https://github.com/firecat53/keepmenu/blob/main/docs/install.md#install-recommended https://github.com/firecat53/keepmenu/blob/main/docs/install.md#install-recommended
@ -286,6 +292,25 @@ go install github.com/ericchiang/pup@latest
#+END_SRC #+END_SRC
** packages from source/binaries ** packages from source/binaries
*** simple-mtpfs (for mounting usb)
install dependencies:
#+begin_src sh
sudo dnf install libgcc fuse-devel libmtp-devel autoconf-archive
#+end_src
https://github.com/phatina/simple-mtpfs#installation
#+begin_src sh
git clone https://github.com/phatina/simple-mtpfs
cd simple-mtpfs
./autogen.sh
mkdir build && cd build
../configure
make
sudo make install
#+end_src
*** mpvpaper *** mpvpaper
animated wallpapers (used by `change-background`) animated wallpapers (used by `change-background`)
@ -319,7 +344,23 @@ tar -xvf ../<filename>.tar.xz
sudo cp 7zz /usr/local/bin/ sudo cp 7zz /usr/local/bin/
#+END_SRC #+END_SRC
#+RESULTS: ** AppImages
*** syncplay
from https://syncplay.pl/download/
#+begin_src sh
curl -LOv https://github.com/Syncplay/syncplay/releases/download/v1.7.0/Syncplay-1.7.0-x86_64.AppImage
chmod +x Syncplay-*.AppImage
mv Syncplay-*.AppImage ~/.local/bin/syncplay
#+end_src
** installing cargo
https://doc.rust-lang.org/cargo/getting-started/installation.html
#+BEGIN_SRC shell
curl https://sh.rustup.rs -sSf | sh
# choose to customize installation, and choose `no` when it asks to modify PATH variable.
#+END_SRC
** setting up flatpak ** setting up flatpak
@ -337,7 +378,7 @@ sudo usermod -a -G vboxusers default
** flatpak packages ** flatpak packages
remember to set permissions, especially access to personal files according to what you want the software to have before launching them. remember to set permissions with Flatseal, especially access to personal files according to what you want the software to have before launching them.
*** flatseal *** flatseal
@ -404,16 +445,8 @@ flatpak install flathub io.github.hrkfdn.ncspot
flatpak install flathub com.spotify.Client flatpak install flathub com.spotify.Client
#+END_SRC #+END_SRC
** installing cargo * fixes
https://doc.rust-lang.org/cargo/getting-started/installation.html ** crashes with wayland under amd gpus
#+BEGIN_SRC shell
curl https://sh.rustup.rs -sSf | sh
# choose to customize installation, and choose `no` when it asks to modify PATH variable.
#+END_SRC
** other
*** crashes with wayland under amd gpus
see https://bbs.archlinux.org/viewtopic.php?id=270468 see https://bbs.archlinux.org/viewtopic.php?id=270468
https://forum.manjaro.org/t/graphics-glitches-freeze-up-with-new-comp-error-ring-gfx-timeout/55979/6 https://forum.manjaro.org/t/graphics-glitches-freeze-up-with-new-comp-error-ring-gfx-timeout/55979/6
@ -432,7 +465,3 @@ power_dpm_force_performance_level: high
* todos * todos
** TODO write dependencies and programs to separate files ** TODO write dependencies and programs to separate files
** add packages ** add packages
*** TODO add simple-mtpfs
dnf package unmaintained
*** TODO add syncplay
the copr repository batmanfeynman/syncplay is unmaintained

View File

@ -127,6 +127,13 @@ mono-devel
VirtualBox VirtualBox
virtualbox-guest-additions virtualbox-guest-additions
@virtualization @virtualization
texlive-scheme-basic texlive-scheme-full
texlive-dvipng
rofi rofi
kanshi kanshi
gvfs-mtp
usbutils
android-tools
java-1.8.0-openjdk
java-17-openjdk
easyeffects