mirror of https://github.com/Flinner/dots.git
stuff
This commit is contained in:
parent
426f55bdce
commit
f284ce8192
|
@ -1,4 +1,5 @@
|
|||
setxkbmap -option ctrl:swapcaps
|
||||
setxkbmap -option altwin:swap_lalt_lwin
|
||||
setxkbmap -model pc105 -layout us,ar -variant ,qwerty -option grp:shifts_toggle
|
||||
xinput set-prop 18 309 1
|
||||
|
||||
|
|
|
@ -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
|
|
@ -39,10 +39,20 @@ solution_url="$domain/$solution_path"
|
|||
|
||||
# ==== get solution =========
|
||||
# download if not already downloaded
|
||||
echo '** Item
|
||||
:PROPERTIES:
|
||||
:ANKI_DECK: Math::Calculus-III
|
||||
:ANKI_NOTE_TYPE: Basic
|
||||
:END:
|
||||
'
|
||||
solution_path=`curl_cache "$solution_url"`
|
||||
|
||||
echo '*** Front'
|
||||
echo "$question_text"
|
||||
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"
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#!/bin/bash
|
||||
#img=$(mktemp /tmp/XXXXXXXXXX.png)
|
||||
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
|
||||
#import -window root $img
|
||||
## Pixelate the screenshot
|
||||
|
|
|
@ -743,7 +743,7 @@ better sorting for ivy, company..
|
|||
org-agenda-files (list org-directory (concat org-roam-directory "life.org"))
|
||||
rmh-elfeed-org-files (list "~/Documents/private.el/elfeed.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")
|
||||
)
|
||||
#+end_src
|
||||
|
@ -760,7 +760,6 @@ Modes To Start
|
|||
use-package
|
||||
#+begin_src emacs-lisp
|
||||
(use-package org
|
||||
:defer 3
|
||||
:hook (org-mode . my/org-mode/org-mode-setup)
|
||||
(org-mode . my/org-mode/load-prettify-symbols); symbols
|
||||
(org-mode . auto-fill-mode)
|
||||
|
@ -1020,7 +1019,7 @@ launch with =emacsclient -e '(make-orgcapture-frame)'=
|
|||
:unnarrowed t)))
|
||||
:config
|
||||
;; side window
|
||||
(require 'org-roam-protocol)
|
||||
;(require 'org-roam-protocol)
|
||||
(add-to-list 'display-buffer-alist
|
||||
'("\\*org-roam\\*"
|
||||
(display-buffer-in-side-window)
|
||||
|
@ -1069,6 +1068,13 @@ launch with =emacsclient -e '(make-orgcapture-frame)'=
|
|||
|
||||
#+end_src
|
||||
|
||||
** org-download
|
||||
#+begin_src emacs-lisp
|
||||
(use-package org-download
|
||||
:after org
|
||||
)
|
||||
#+end_src
|
||||
|
||||
** Anki
|
||||
#+begin_src emacs-lisp
|
||||
(use-package anki-editor
|
||||
|
@ -1385,6 +1391,12 @@ prettier
|
|||
(use-package prettier)
|
||||
#+end_src
|
||||
|
||||
lsp hooks setups
|
||||
#+begin_src emacs-lisp
|
||||
(add-hook 'html-mode-hook 'lsp)
|
||||
(add-hook 'js-mode-hook 'lsp)
|
||||
#+end_src
|
||||
|
||||
*** Markdown
|
||||
Better Diff in header sizes
|
||||
#+begin_src emacs-lisp
|
||||
|
@ -1424,6 +1436,14 @@ Better Diff in header sizes
|
|||
(setq parinfer-rust-auto-download t))
|
||||
#+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
|
||||
** Restart Emacs
|
||||
#+begin_src emacs-lisp
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
# Beware! This file is rewritten by htop when settings are changed in the interface.
|
||||
# The parser is also very primitive, and not human-friendly.
|
||||
fields=0 48 17 18 38 39 40 2 46 47 49 1
|
||||
sort_key=47
|
||||
sort_direction=1
|
||||
sort_key=49
|
||||
sort_direction=-1
|
||||
tree_sort_key=46
|
||||
tree_sort_direction=1
|
||||
hide_kernel_threads=1
|
||||
|
|
|
@ -6,12 +6,12 @@
|
|||
deck_name=Japanese::Mining
|
||||
|
||||
# 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.
|
||||
sentence_field=SentKanji
|
||||
audio_field=SentAudio
|
||||
image_field=Image
|
||||
sentence_field=Sentence
|
||||
audio_field=SentenceAudio
|
||||
image_field=Picture
|
||||
|
||||
# The tag(s) added to new notes. Spaces separate multiple tags.
|
||||
# Leave nothing after `=` to disable tagging completely.
|
||||
|
|
|
@ -40,7 +40,7 @@ set show_hidden false
|
|||
# Ask for a confirmation when running the "delete" command?
|
||||
# Valid values are "always", "never", "multiple" (default)
|
||||
# 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?
|
||||
# ranger ships with scope.sh, a script that calls external programs (see
|
||||
|
|
|
@ -37,8 +37,8 @@ super + Return
|
|||
#mlterm -e zsh || alacritty
|
||||
|
||||
# make sxhkd reload its configuration files:
|
||||
super + Escape
|
||||
pkill -usr1 -x sxhkd && notify-send 'sxhkd' 'Reloaded Config'
|
||||
#super + Escape
|
||||
#pkill -usr1 -x sxhkd && notify-send 'sxhkd' 'Reloaded Config'
|
||||
|
||||
# Doom Emacs Capture
|
||||
#super + ctrl + space
|
||||
|
|
21
zsh/.zshrc
21
zsh/.zshrc
|
@ -43,7 +43,7 @@ zplugin snippet OMZ::plugins/vi-mode/vi-mode.plugin.zsh
|
|||
zplugin ice wait'1' lucid
|
||||
zplugin load zdharma/fast-syntax-highlighting
|
||||
|
||||
zplugin ice wait'1' lucid
|
||||
zplugin ice wait'0' lucid
|
||||
zplugin load 'flinner/zsh-emacs'
|
||||
|
||||
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_zsh() { exit }
|
||||
zle -N exit_zsh
|
||||
bindkey '^v' edit-command-line
|
||||
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 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 sudo='sudo '
|
||||
|
||||
|
@ -166,6 +178,9 @@ alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo
|
|||
alias ip='ip --color=auto'
|
||||
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
|
||||
|
@ -238,3 +253,7 @@ PS1="> "
|
|||
RPS1=" "
|
||||
#zplugin ice wait'!0' lucid pick"async.zsh" src"pure.zsh"; zplugin light sindresorhus/pure
|
||||
eval "$(starship init zsh)"
|
||||
[ -f "/home/user/.ghcup/env" ] && source "/home/user/.ghcup/env" # ghcup-env
|
||||
|
||||
#~/bin/dennis
|
||||
#cutefetch 2> /dev/null
|
||||
|
|
Loading…
Reference in New Issue