This commit is contained in:
Flinner 2021-09-06 09:38:06 +03:00
parent 426f55bdce
commit f284ce8192
Signed by: flinner
GPG Key ID: 95CE0DA7F0E58CA6
10 changed files with 78 additions and 17 deletions

View File

@ -1,4 +1,5 @@
setxkbmap -option ctrl:swapcaps setxkbmap -option ctrl:swapcaps
setxkbmap -option altwin:swap_lalt_lwin setxkbmap -option altwin:swap_lalt_lwin
setxkbmap -model pc105 -layout us,ar -variant ,qwerty -option grp:shifts_toggle setxkbmap -model pc105 -layout us,ar -variant ,qwerty -option grp:shifts_toggle
xinput set-prop 18 309 1

11
bin/bin/paul-content.sh Executable file
View File

@ -0,0 +1,11 @@
curl_cache (){
local cache_path=`echo $1 | sed 's|/|_|g'`
local cache_path="/tmp/$cache_path"
[ -f "$cache_path" ] || curl -s "$1" -o "$cache_path"
cat "$cache_path"
}
curl_cache "$1" | pup 'body .content text{}' | sed -r '/^\s*$/d' | bat --language=html

View File

@ -39,10 +39,20 @@ solution_url="$domain/$solution_path"
# ==== get solution ========= # ==== get solution =========
# download if not already downloaded # download if not already downloaded
echo '** Item
:PROPERTIES:
:ANKI_DECK: Math::Calculus-III
:ANKI_NOTE_TYPE: Basic
:END:
'
solution_path=`curl_cache "$solution_url"` solution_path=`curl_cache "$solution_url"`
echo '*** Front'
echo "$question_text" echo "$question_text"
echo "\n" echo "\n"
cat "$solution_path" | pup 'body .soln-content p text{}' echo '*** Back'
cat "$solution_path" | pup 'body .soln-content text{}' | sed -r '/^\s*$/d'
solution_title=`cat "$solution_path" | pup 'title text{}' | sed -r '/^\s*$/d'`
echo "\n"
echo "[[$solution_url][$solution_title]]"
echo "\n"

View File

@ -1,7 +1,7 @@
#!/bin/bash #!/bin/bash
#img=$(mktemp /tmp/XXXXXXXXXX.png) #img=$(mktemp /tmp/XXXXXXXXXX.png)
qdbus org.keepassxc.KeePassXC.MainWindow /keepassxc org.keepassxc.MainWindow.lockAllDatabases & qdbus org.keepassxc.KeePassXC.MainWindow /keepassxc org.keepassxc.MainWindow.lockAllDatabases &
img="$HOME/Pictures/wallpapers/arch-linux-dunno.png" img="$HOME/Pictures/wall.png"
# Take a screenshot of current desktop # Take a screenshot of current desktop
#import -window root $img #import -window root $img
## Pixelate the screenshot ## Pixelate the screenshot

View File

@ -743,7 +743,7 @@ better sorting for ivy, company..
org-agenda-files (list org-directory (concat org-roam-directory "life.org")) org-agenda-files (list org-directory (concat org-roam-directory "life.org"))
rmh-elfeed-org-files (list "~/Documents/private.el/elfeed.org") rmh-elfeed-org-files (list "~/Documents/private.el/elfeed.org")
elfeed-dashboard-file "~/Documents/private.el/elfeed-dashboard.org" elfeed-dashboard-file "~/Documents/private.el/elfeed-dashboard.org"
org-preview-latex-image-directory "/tmp/ltximg" org-preview-latex-image-directory "~/.cache/ltximg"
org-my-anki-file (concat org-roam-directory "anki.org") org-my-anki-file (concat org-roam-directory "anki.org")
) )
#+end_src #+end_src
@ -760,7 +760,6 @@ Modes To Start
use-package use-package
#+begin_src emacs-lisp #+begin_src emacs-lisp
(use-package org (use-package org
:defer 3
:hook (org-mode . my/org-mode/org-mode-setup) :hook (org-mode . my/org-mode/org-mode-setup)
(org-mode . my/org-mode/load-prettify-symbols); symbols (org-mode . my/org-mode/load-prettify-symbols); symbols
(org-mode . auto-fill-mode) (org-mode . auto-fill-mode)
@ -1020,7 +1019,7 @@ launch with =emacsclient -e '(make-orgcapture-frame)'=
:unnarrowed t))) :unnarrowed t)))
:config :config
;; side window ;; side window
(require 'org-roam-protocol) ;(require 'org-roam-protocol)
(add-to-list 'display-buffer-alist (add-to-list 'display-buffer-alist
'("\\*org-roam\\*" '("\\*org-roam\\*"
(display-buffer-in-side-window) (display-buffer-in-side-window)
@ -1069,6 +1068,13 @@ launch with =emacsclient -e '(make-orgcapture-frame)'=
#+end_src #+end_src
** org-download
#+begin_src emacs-lisp
(use-package org-download
:after org
)
#+end_src
** Anki ** Anki
#+begin_src emacs-lisp #+begin_src emacs-lisp
(use-package anki-editor (use-package anki-editor
@ -1385,6 +1391,12 @@ prettier
(use-package prettier) (use-package prettier)
#+end_src #+end_src
lsp hooks setups
#+begin_src emacs-lisp
(add-hook 'html-mode-hook 'lsp)
(add-hook 'js-mode-hook 'lsp)
#+end_src
*** Markdown *** Markdown
Better Diff in header sizes Better Diff in header sizes
#+begin_src emacs-lisp #+begin_src emacs-lisp
@ -1424,6 +1436,14 @@ Better Diff in header sizes
(setq parinfer-rust-auto-download t)) (setq parinfer-rust-auto-download t))
#+end_src #+end_src
*** C and cpp
#+begin_src emacs-lisp
(use-package cc-mode
:hook (cc-mode . lsp)
:hook (c-mode . lsp)
:hook (c++-mode . lsp))
#+end_src
* Misc * Misc
** Restart Emacs ** Restart Emacs
#+begin_src emacs-lisp #+begin_src emacs-lisp

View File

@ -1,8 +1,8 @@
# Beware! This file is rewritten by htop when settings are changed in the interface. # Beware! This file is rewritten by htop when settings are changed in the interface.
# The parser is also very primitive, and not human-friendly. # The parser is also very primitive, and not human-friendly.
fields=0 48 17 18 38 39 40 2 46 47 49 1 fields=0 48 17 18 38 39 40 2 46 47 49 1
sort_key=47 sort_key=49
sort_direction=1 sort_direction=-1
tree_sort_key=46 tree_sort_key=46
tree_sort_direction=1 tree_sort_direction=1
hide_kernel_threads=1 hide_kernel_threads=1

View File

@ -6,12 +6,12 @@
deck_name=Japanese::Mining deck_name=Japanese::Mining
# Model names are listed in `Tools -> Manage note types` menu in Anki. # Model names are listed in `Tools -> Manage note types` menu in Anki.
model_name=Japanese sentences model_name=animecards
# Field names as they appear in the selected note type. # Field names as they appear in the selected note type.
sentence_field=SentKanji sentence_field=Sentence
audio_field=SentAudio audio_field=SentenceAudio
image_field=Image image_field=Picture
# The tag(s) added to new notes. Spaces separate multiple tags. # The tag(s) added to new notes. Spaces separate multiple tags.
# Leave nothing after `=` to disable tagging completely. # Leave nothing after `=` to disable tagging completely.

View File

@ -40,7 +40,7 @@ set show_hidden false
# Ask for a confirmation when running the "delete" command? # Ask for a confirmation when running the "delete" command?
# Valid values are "always", "never", "multiple" (default) # Valid values are "always", "never", "multiple" (default)
# With "multiple", ranger will ask only if you delete multiple files at once. # With "multiple", ranger will ask only if you delete multiple files at once.
set confirm_on_delete multiple set confirm_on_delete always
# Use non-default path for file preview script? # Use non-default path for file preview script?
# ranger ships with scope.sh, a script that calls external programs (see # ranger ships with scope.sh, a script that calls external programs (see

View File

@ -37,8 +37,8 @@ super + Return
#mlterm -e zsh || alacritty #mlterm -e zsh || alacritty
# make sxhkd reload its configuration files: # make sxhkd reload its configuration files:
super + Escape #super + Escape
pkill -usr1 -x sxhkd && notify-send 'sxhkd' 'Reloaded Config' #pkill -usr1 -x sxhkd && notify-send 'sxhkd' 'Reloaded Config'
# Doom Emacs Capture # Doom Emacs Capture
#super + ctrl + space #super + ctrl + space

View File

@ -43,7 +43,7 @@ zplugin snippet OMZ::plugins/vi-mode/vi-mode.plugin.zsh
zplugin ice wait'1' lucid zplugin ice wait'1' lucid
zplugin load zdharma/fast-syntax-highlighting zplugin load zdharma/fast-syntax-highlighting
zplugin ice wait'1' lucid zplugin ice wait'0' lucid
zplugin load 'flinner/zsh-emacs' zplugin load 'flinner/zsh-emacs'
zplugin ice wait lucid atload'_zsh_autosuggest_start' zplugin ice wait lucid atload'_zsh_autosuggest_start'
@ -93,6 +93,7 @@ bindkey jk vi-cmd-mode
# exit on partianl command with Ctrl-D # exit on partianl command with Ctrl-D
exit_zsh() { exit } exit_zsh() { exit }
zle -N exit_zsh zle -N exit_zsh
bindkey '^v' edit-command-line
bindkey '^D' exit_zsh bindkey '^D' exit_zsh
#=============================================================================================== #===============================================================================================
@ -143,6 +144,17 @@ ip.me () { curl eth0.me ; curl ipv6.icanhazip.com } # or ip.me
curl -F "file=@$file" 0x0.st | xclip -sel clip curl -F "file=@$file" 0x0.st | xclip -sel clip
} }
# curl with cache
curl_cache(){
local cache_path=`echo $1 | sed 's|/|_|g'`
local cache_path="/tmp/$cache_path"
[ -f "$cache_path" ] || curl -s "$1" -o "$cache_path"
cat "$cache_path"
}
alias doas='sudo ' alias doas='sudo '
alias sudo='sudo ' alias sudo='sudo '
@ -166,6 +178,9 @@ alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo
alias ip='ip --color=auto' alias ip='ip --color=auto'
alias ytfzfd='YTFZF_PLAYER="youtube-dl --embed-subs --write-sub --sub-lang en" ytfzf' alias ytfzfd='YTFZF_PLAYER="youtube-dl --embed-subs --write-sub --sub-lang en" ytfzf'
alias cargo-doc-server="python -m http.server -d target/doc/ -b 127.0.0.1"
alias sc="bat ~/schedule.org"
#=============================================================================================== #===============================================================================================
#VARS #VARS
@ -238,3 +253,7 @@ PS1="> "
RPS1=" " RPS1=" "
#zplugin ice wait'!0' lucid pick"async.zsh" src"pure.zsh"; zplugin light sindresorhus/pure #zplugin ice wait'!0' lucid pick"async.zsh" src"pure.zsh"; zplugin light sindresorhus/pure
eval "$(starship init zsh)" eval "$(starship init zsh)"
[ -f "/home/user/.ghcup/env" ] && source "/home/user/.ghcup/env" # ghcup-env
#~/bin/dennis
#cutefetch 2> /dev/null