bin: useful script shortcut additions
This commit is contained in:
parent
02b22627ef
commit
5d7deb24d7
|
@ -2,6 +2,7 @@ test -n "$PS1" || return 0
|
|||
|
||||
test $(id -u) -eq 0 || sudo=sudo
|
||||
|
||||
alias jc="$sudo journalctl --boot --unit"
|
||||
alias sc="$sudo systemctl"
|
||||
alias scs="$sudo systemctl status"
|
||||
alias sce="$sudo systemctl enable --now"
|
||||
|
|
|
@ -342,7 +342,8 @@ Version 2019-11-04 2021-02-16"
|
|||
(setq org-priority-faces '((65 . error) (66 . "DarkGoldenRod") (67 . warning) (68 . "bisque") (69 . "grey")))
|
||||
|
||||
(push "PERM(e)" (cdr (car org-todo-keywords)))
|
||||
; #+TODO: IDEA(i!) PROMPT(p!) OUTLINE(o!) DRAFT(t!) | DONE(d!) REVIEWED(r!) ABANDON(a!)
|
||||
; #+TODO: IDEA(i!) PROMPT(p!) OUTLINE(o!) DRAFT(t!) | REVIEW(r!) DONE(d!) ABANDON(a!)
|
||||
; highlight review keyword
|
||||
|
||||
;; Org startup - https://orgmode.org/manual/In_002dbuffer-Settings.html
|
||||
(setq org-startup-folded 'show2levels
|
||||
|
@ -770,6 +771,7 @@ Version 2019-11-04 2021-02-16"
|
|||
:map Info-mode-map
|
||||
:desc "Go Home" :n "gu" 'Info-directory
|
||||
:desc "Go Home" :n "gU" 'Info-directory
|
||||
:desc "Search next" :n "," 'Info-search-next
|
||||
:map thumbs-mode-map
|
||||
:n "q" 'thumbs-kill-buffer
|
||||
)
|
||||
|
@ -991,6 +993,11 @@ Version 2019-11-04 2021-02-16"
|
|||
(use-package! lilypond-mode
|
||||
:mode ("\\.ly\\'" . LilyPond-mode)
|
||||
:config
|
||||
|
||||
(map! :map rdictcc-buffer-mode-map
|
||||
:leader
|
||||
"hi" 'LilyPond-info)
|
||||
|
||||
(set-file-template! 'LilyPond-mode :mode 'LilyPond-mode)
|
||||
(setq LilyPond-pdf-command "xdg-open")
|
||||
(add-hook 'LilyPond-mode-hook 'turn-on-font-lock)
|
||||
|
|
|
@ -4,7 +4,6 @@ state_file "~/.local/state/mpd/state"
|
|||
pid_file "~/.local/state/mpd/mpd.pid"
|
||||
db_file "~/.local/state/mpd/mpd.db"
|
||||
|
||||
|
||||
music_directory "{{ env.MUSIC }}"
|
||||
playlist_directory "{{ env.MUSIC }}/Playlists"
|
||||
playlist_plugin {
|
||||
|
|
|
@ -18,6 +18,7 @@ let g:firenvim_config = {
|
|||
\ },
|
||||
\
|
||||
\ '.*wiki.*\.org.*': { 'priority': 9, 'takeover': 'never', },
|
||||
\ '://wiki\..*': { 'priority': 9, 'takeover': 'never', },
|
||||
\ '.*openstreetmap\.org.*': { 'priority': 9, 'takeover': 'once', },
|
||||
\ '.*openstreetmap\.de.*': { 'priority': 9, 'takeover': 'once', },
|
||||
\
|
||||
|
|
|
@ -51,7 +51,7 @@ highlight "s :: recursively remove logs"
|
|||
|
||||
highlight "m :: recursively remove mac-files"
|
||||
if [[ $1 =~ "m" ]]; then
|
||||
find \( -name '__MACOSX' -o -name '._.Trashes' \) -print -exec rm -r {} +
|
||||
find \( -name '__MACOSX' -o -name '._*' \) -print -exec rm -r {} +
|
||||
find \( -iname '.spotlight*' -o -name 'System Volume Information' -o -name '.fseventsd' \) -print -exec rm -rI {} +
|
||||
find -name '*.DS_Store' -delete
|
||||
echo 'Removed DS Stores'
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
#!/bin/sh -e
|
||||
# Flatten folder hierarchy
|
||||
# Args: depth
|
||||
find -mindepth 2 -maxdepth ${depth:-2} -depth -type d "$@" | while read folder; do
|
||||
depth=$(expr 1 \& $# \| 2)
|
||||
case $1 in ([0-9]|[0-9][0-9]) depth=$1; shift;; esac
|
||||
find "$@" -mindepth $depth -maxdepth $depth -depth -type d | while read folder; do
|
||||
newname="$(echo "$folder" | sed 's|^./||;s|/|_|g')"
|
||||
mv -v "$folder" "$newname"
|
||||
parent="$(dirname "$folder")"
|
||||
|
@ -9,4 +11,4 @@ find -mindepth 2 -maxdepth ${depth:-2} -depth -type d "$@" | while read folder;
|
|||
rm -d "$parent" &&
|
||||
mv -v "$newname" "$parent"
|
||||
done
|
||||
find -maxdepth ${depth:-2} -empty -type d -delete
|
||||
find -maxdepth $depth -empty -type d -delete
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
# optdepends: rewrite(part of my dotfiles, for unzip line rewriting) 7z p7zip unzip
|
||||
# TODO auto-delete archive, auto-extract in current dir, trim .tar.gz fully
|
||||
if test $# -eq 0
|
||||
then ex *.zip
|
||||
exit
|
||||
then file -- * | grep -e '(*compress*\|*archive*)' | cut -d: -f1 | xargs ex
|
||||
exit $?
|
||||
fi
|
||||
|
||||
for arg do
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
#!/bin/sh
|
||||
# Upload website to iridion
|
||||
# TODO: derive from id
|
||||
site=$1
|
||||
shift
|
||||
scp -r "$@" "iridion:web/$site/public_html$(test "$#" -gt 1 || echo '/index.html')"
|
|
@ -1,6 +1,8 @@
|
|||
#!/bin/sh -ex
|
||||
# Execute in target directory or with that as parameter
|
||||
target="${1:-$PWD}"
|
||||
cd $DATA/5*
|
||||
archive=$(find $DATA/5* -maxdepth 2 -name Qobuz-commandes.tar)
|
||||
cd $(dirname "$archive")
|
||||
mkdir -p qobuz
|
||||
cd qobuz
|
||||
tar xf ../Qobuz-commandes.tar
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
#!/bin/sh
|
||||
# TODO set brightness? light -S
|
||||
pkill electron
|
||||
pkill --ignore-case discord
|
||||
pkill signal
|
||||
pkill aw-server
|
||||
pkill aw-qt
|
||||
#!/bin/sh -x
|
||||
light -S .01
|
||||
pkill --echo electron
|
||||
pkill --echo --ignore-case discord
|
||||
pkill --echo signal
|
||||
pkill --echo aw-server
|
||||
pkill --echo aw-qt
|
||||
systemctl stop --user syncthing plasma-baloorunner kde-baloo openvpn-client@deltaPeak.service
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
#!/bin/sh
|
||||
# Force Sway Scaling
|
||||
shift=1
|
||||
scale=1
|
||||
case $1 in
|
||||
("") shift=0;;
|
||||
([0-9]*) scale=$1;;
|
||||
(col) way-displays -s ARRANGE_ALIGN COLUMN MIDDLE; exit $?;;
|
||||
esac
|
||||
shift $shift
|
||||
way-displays -s SCALE '' $scale "$@" || swaymsg output \* scale $scale
|
|
@ -1,2 +1,3 @@
|
|||
#!/bin/sh -e
|
||||
test -f "$1" || cd "$XDG_DATA_HOME/openvpn"
|
||||
tmux new-session -s "$@" "sudo openvpn $@"
|
||||
|
|
Loading…
Reference in New Issue