Compare commits
No commits in common. "7546b13d58f914e2276324e2a417178120d556a1" and "67e38f594c8f613113301b5c608848d016798279" have entirely different histories.
7546b13d58
...
67e38f594c
@ -38,6 +38,8 @@ end
|
|||||||
|
|
||||||
# Neomutt configs
|
# Neomutt configs
|
||||||
function neomutt.local; neomutt -F .config/neomutt/neomuttrc.local; end
|
function neomutt.local; neomutt -F .config/neomutt/neomuttrc.local; end
|
||||||
|
function neomutt.disroot; neomutt -F .config/neomutt/neomuttrc.disroot; end
|
||||||
|
function neomutt.work; neomutt -F .config/neomutt/neomuttrc.work; end
|
||||||
|
|
||||||
# Specific to my Gentoo system
|
# Specific to my Gentoo system
|
||||||
function genlop; doas -u portage /usr/bin/genlop; end
|
function genlop; doas -u portage /usr/bin/genlop; end
|
||||||
|
26
src/.config/neomutt/disroot.muttrc
Normal file
26
src/.config/neomutt/disroot.muttrc
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
# vim: filetype=muttrc
|
||||||
|
|
||||||
|
set from="dogeystamp@disroot.org"
|
||||||
|
set realname="dogeystamp"
|
||||||
|
|
||||||
|
set imap_user="dogeystamp"
|
||||||
|
set imap_pass="`keepassxc-cli show -s -a password \"$KEEPASSDB\" msg/disroot`"
|
||||||
|
|
||||||
|
set smtp_url="smtps://$ID_EMAIL_USER@disroot.org/"
|
||||||
|
set smtp_pass="$imap_pass"
|
||||||
|
set smtp_authenticators = 'login'
|
||||||
|
|
||||||
|
set folder="imaps://disroot.org/"
|
||||||
|
set spoolfile=+INBOX
|
||||||
|
set record="+Sent"
|
||||||
|
set postponed="+Drafts"
|
||||||
|
mailboxes =INBOX =Sent =Drafts =Junk =Trash
|
||||||
|
mailboxes "~/dox/mail/arc"
|
||||||
|
|
||||||
|
macro index gd "<change-folder>=Drafts<enter>" "Go to drafts"
|
||||||
|
macro index gi "<change-folder>=INBOX<enter>" "Go to inbox"
|
||||||
|
macro index gS "<change-folder>=Sent<enter>" "Go to sent messages"
|
||||||
|
macro index gt "<change-folder>=Trash<enter>" "Go to trash"
|
||||||
|
macro index ga "<change-folder>~/dox/mail/arc<enter>" "Go to archive"
|
||||||
|
macro index,pager d "<save-message>=Trash<enter><enter>" "Trash"
|
||||||
|
macro index,pager y "<save-message>=~/dox/mail/arc<enter><enter>" "Archive"
|
19
src/.config/neomutt/gmail-common.muttrc
Normal file
19
src/.config/neomutt/gmail-common.muttrc
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
# vim: filetype=muttrc
|
||||||
|
|
||||||
|
set smtp_pass="$imap_pass"
|
||||||
|
set smtp_authenticators = 'login'
|
||||||
|
|
||||||
|
set folder="imaps://imap.gmail.com/"
|
||||||
|
set spoolfile=+INBOX
|
||||||
|
set record="+[Gmail]/Sent Mail"
|
||||||
|
set postponed="+[Gmail]/Drafts"
|
||||||
|
mailboxes =INBOX =[Gmail]/Sent\ Mail =[Gmail]/All\ Mail =[Gmail]/Starred =[Gmail]/Drafts =[Gmail]/Spam =[Gmail]/Trash
|
||||||
|
|
||||||
|
macro index ga "<change-folder>=[Gmail]/All Mail<enter>" "Go to all mail"
|
||||||
|
macro index gd "<change-folder>=[Gmail]/Drafts<enter>" "Go to drafts"
|
||||||
|
macro index gi "<change-folder>=INBOX<enter>" "Go to inbox"
|
||||||
|
macro index gs "<change-folder>=[Gmail]/Starred<enter>" "Go to starred messages"
|
||||||
|
macro index gS "<change-folder>=[Gmail]/Sent Mail<enter>" "Go to sent messages"
|
||||||
|
macro index gt "<change-folder>=[Gmail]/Trash<enter>" "Go to trash"
|
||||||
|
macro index,pager d "<save-message>=[Gmail]/Trash<enter><enter>" "Trash"
|
||||||
|
macro index,pager y "<save-message>=[Gmail]/All Mail<enter><enter>" "Archive"
|
10
src/.config/neomutt/gmail-work.muttrc
Normal file
10
src/.config/neomutt/gmail-work.muttrc
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
# vim: filetype=muttrc
|
||||||
|
|
||||||
|
set from="$ID_EMAIL_WORK"
|
||||||
|
set realname="$ID_REALNAME"
|
||||||
|
|
||||||
|
set imap_user="$ID_EMAIL_WORK"
|
||||||
|
set imap_pass="`keepassxc-cli show -s -a neomutt \"$KEEPASSDB\" work/gmail`"
|
||||||
|
set smtp_url="smtps://$ID_EMAIL_WORK_USER@smtp.gmail.com/"
|
||||||
|
|
||||||
|
source ~/.config/neomutt/gmail-common.muttrc
|
10
src/.config/neomutt/gmail.muttrc
Normal file
10
src/.config/neomutt/gmail.muttrc
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
# vim: filetype=muttrc
|
||||||
|
|
||||||
|
set from="$ID_EMAIL"
|
||||||
|
set realname="$ID_REALNAME"
|
||||||
|
|
||||||
|
set imap_user="$ID_EMAIL"
|
||||||
|
set imap_pass="`keepassxc-cli show -s -a neomutt \"$KEEPASSDB\" meta/gmail`"
|
||||||
|
set smtp_url="smtps://$ID_EMAIL_USER@smtp.gmail.com/"
|
||||||
|
|
||||||
|
source ~/.config/neomutt/gmail-common.muttrc
|
@ -1 +1,2 @@
|
|||||||
source ~/.config/neomutt/common.muttrc
|
source ~/.config/neomutt/common.muttrc
|
||||||
|
source ~/.config/neomutt/gmail.muttrc
|
||||||
|
2
src/.config/neomutt/neomuttrc.disroot
Normal file
2
src/.config/neomutt/neomuttrc.disroot
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
source ~/.config/neomutt/common.muttrc
|
||||||
|
source ~/.config/neomutt/disroot.muttrc
|
2
src/.config/neomutt/neomuttrc.work
Normal file
2
src/.config/neomutt/neomuttrc.work
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
source ~/.config/neomutt/common.muttrc
|
||||||
|
source ~/.config/neomutt/gmail-work.muttrc
|
@ -47,7 +47,6 @@ vmap <C-S>y "+y
|
|||||||
nmap <C-S>d "+d
|
nmap <C-S>d "+d
|
||||||
vmap <C-S>d "+d
|
vmap <C-S>d "+d
|
||||||
nmap <C-S>c "+c
|
nmap <C-S>c "+c
|
||||||
nmap <C-S>C "+C
|
|
||||||
vmap <C-S>c "+c
|
vmap <C-S>c "+c
|
||||||
nmap <C-S>p "+p
|
nmap <C-S>p "+p
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@ if vim.g.neovide then
|
|||||||
vim.g.neovide_padding_top = 8
|
vim.g.neovide_padding_top = 8
|
||||||
vim.g.neovide_padding_bottom = 8
|
vim.g.neovide_padding_bottom = 8
|
||||||
vim.g.neovide_padding_left = 8
|
vim.g.neovide_padding_left = 8
|
||||||
vim.g.transparency = 1
|
vim.g.transparency = 0
|
||||||
vim.g.neovide_background_color = "#000000" .. 0
|
vim.g.neovide_background_color = "#000000" .. 0
|
||||||
|
|
||||||
vim.g.neovide_cursor_trail_size = 0.1
|
vim.g.neovide_cursor_trail_size = 0.1
|
||||||
|
@ -44,6 +44,8 @@ export CARGO_HOME="$XDG_DATA_HOME/cargo"
|
|||||||
export npm_config_userconfig=$XDG_CONFIG_HOME/npm/config
|
export npm_config_userconfig=$XDG_CONFIG_HOME/npm/config
|
||||||
export npm_config_cache=$XDG_CACHE_HOME/npm
|
export npm_config_cache=$XDG_CACHE_HOME/npm
|
||||||
export npm_config_prefix=$XDG_DATA_HOME/npm
|
export npm_config_prefix=$XDG_DATA_HOME/npm
|
||||||
|
# xpilot
|
||||||
|
export XPILOTRC=$XDG_CONFIG_HOME/xpilotrc
|
||||||
# stardict
|
# stardict
|
||||||
export STARDICT_DATA_DIR=$HOME/dox/doc/dic
|
export STARDICT_DATA_DIR=$HOME/dox/doc/dic
|
||||||
|
|
||||||
|
10
src/.config/xpilotrc
Normal file
10
src/.config/xpilotrc
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
xpilot.name: immy
|
||||||
|
xpilot.user:imogen
|
||||||
|
xpilot.host:localhost
|
||||||
|
|
||||||
|
xpilot.keyTurnLeft: a
|
||||||
|
xpilot.keyTurnRight: d
|
||||||
|
xpilot.keyThrust: w
|
||||||
|
|
||||||
|
xpilot.keyLockClose: e
|
||||||
|
xpilot.keyLockClose: q
|
93
src/.local/bin/bridge.sh
Executable file
93
src/.local/bin/bridge.sh
Executable file
@ -0,0 +1,93 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# PulseAudio script to categorise audio streams
|
||||||
|
#
|
||||||
|
# - playing music while recording a call
|
||||||
|
# - piping sound files into a call via virtual mic
|
||||||
|
#
|
||||||
|
# Use the -b switch for bridging
|
||||||
|
# - connect calls from different applications
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# Important settings
|
||||||
|
|
||||||
|
# Your real mic (pactl list short sources)
|
||||||
|
mic="alsa_input.usb-C-Media_Electronics_Inc._USB_Audio_Device-00.mono-fallback"
|
||||||
|
|
||||||
|
# Output sound to this sink (pactl list short sinks)
|
||||||
|
out="alsa_output.usb-C-Media_Electronics_Inc._USB_Audio_Device-00.analog-stereo"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# Naming settings
|
||||||
|
|
||||||
|
# Virtual mic for both voice and media
|
||||||
|
virt_mic="virtual_mic"
|
||||||
|
virt_mic_desc="Virtual\ mic"
|
||||||
|
|
||||||
|
# Input for media to pipe to call
|
||||||
|
media_in="media_in"
|
||||||
|
media_in_desc="Media\ input"
|
||||||
|
|
||||||
|
# Virtual mic for call
|
||||||
|
c1_in="c1_in"
|
||||||
|
c1_in_desc="Call\ input"
|
||||||
|
|
||||||
|
# Output of call
|
||||||
|
c1_out="c1_out"
|
||||||
|
c1_out_desc="Call\ output"
|
||||||
|
|
||||||
|
# Virtual mic for bridged call
|
||||||
|
c2_in="c2_in"
|
||||||
|
c2_in_desc="C2\ input"
|
||||||
|
|
||||||
|
# Output of bridged call
|
||||||
|
c2_out="c2_out"
|
||||||
|
c2_out_desc="C2\ output"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
MODE="normal"
|
||||||
|
while getopts "b" o; do
|
||||||
|
case "${o}" in
|
||||||
|
b) MODE="bridge" ;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
# Set up call input/output
|
||||||
|
# Create sinks
|
||||||
|
pactl load-module module-null-sink sink_name="$c1_out" sink_properties=device.description="'$c1_out_desc'"
|
||||||
|
pactl load-module module-null-sink sink_name="$c1_in" sink_properties=device.description="'$c1_in_desc'"
|
||||||
|
# Output to real speakers
|
||||||
|
pactl load-module module-loopback source="$c1_out".monitor sink="$out"
|
||||||
|
|
||||||
|
# Set up media input
|
||||||
|
# Create sink
|
||||||
|
pactl load-module module-null-sink sink_name="$media_in" sink_properties=device.description="'$media_in_desc'"
|
||||||
|
# Output to real speakers
|
||||||
|
pactl load-module module-loopback source="$media_in".monitor sink="$out"
|
||||||
|
|
||||||
|
# Set up virtual mic
|
||||||
|
# Create sink
|
||||||
|
pactl load-module module-null-sink sink_name="$virt_mic" sink_properties=device.description="'$virt_mic_desc'"
|
||||||
|
# Loop in real mic
|
||||||
|
pactl load-module module-loopback source="$mic" sink="$virt_mic"
|
||||||
|
# Loop in media input
|
||||||
|
pactl load-module module-loopback source="$media_in".monitor sink="$virt_mic"
|
||||||
|
# Output to call input
|
||||||
|
pactl load-module module-loopback source="$virt_mic".monitor sink="$c1_in"
|
||||||
|
|
||||||
|
# Bridging
|
||||||
|
if [ $MODE = "bridge" ]; then
|
||||||
|
# Create bridged call input/output sinks
|
||||||
|
pactl load-module module-null-sink sink_name="$c2_out" sink_properties=device.description="'$c2_out_desc'"
|
||||||
|
pactl load-module module-null-sink sink_name="$c2_in" sink_properties=device.description="'$c2_in_desc'"
|
||||||
|
# Loop in virtual mic
|
||||||
|
pactl load-module module-loopback source="$virt_mic".monitor sink="$c2_in"
|
||||||
|
# Output to real speakers
|
||||||
|
pactl load-module module-loopback source="$c2_out".monitor sink="$out"
|
||||||
|
# Connect calls into each other
|
||||||
|
pactl load-module module-loopback source="$c1_out".monitor sink="$c2_in"
|
||||||
|
pactl load-module module-loopback source="$c2_out".monitor sink="$c1_in"
|
||||||
|
fi
|
6
src/.local/bin/dic.sh
Executable file
6
src/.local/bin/dic.sh
Executable file
@ -0,0 +1,6 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
# local text dictionary
|
||||||
|
# download dictionary here:
|
||||||
|
# https://github.com/sujithps/Dictionary/raw/master/Oxford%20English%20Dictionary.txt
|
||||||
|
|
||||||
|
cat dox/dic | sed '/^$/d' | fzf -q "^"
|
33
src/.local/bin/kcon
Executable file
33
src/.local/bin/kcon
Executable file
@ -0,0 +1,33 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# Configure the Gentoo kernel, then compile and install it
|
||||||
|
|
||||||
|
cd /usr/src/linux
|
||||||
|
|
||||||
|
make nconfig
|
||||||
|
|
||||||
|
# Alternatively
|
||||||
|
#make menuconfig
|
||||||
|
|
||||||
|
# Stop the script here if you only need to configure
|
||||||
|
sleep 2
|
||||||
|
|
||||||
|
# Compile kernel
|
||||||
|
make -j8
|
||||||
|
notify-send "Kernel compilation finished."
|
||||||
|
|
||||||
|
# Comment out this line if you disable modules
|
||||||
|
make modules_install
|
||||||
|
|
||||||
|
# Install kernel to /boot
|
||||||
|
make install
|
||||||
|
|
||||||
|
# Generate initramfs
|
||||||
|
genkernel --install --kernel-config=.config --luks initramfs #--no-ramdisk-modules # Uncomment for modules
|
||||||
|
|
||||||
|
# Regenerate grub config
|
||||||
|
update-grub
|
||||||
|
|
||||||
|
# Notify when finished
|
||||||
|
tput bel
|
||||||
|
notify-send "Kernel installation finished."
|
98
src/.local/bin/msync
Executable file
98
src/.local/bin/msync
Executable file
@ -0,0 +1,98 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# Use go-mtpfs to sync files from an Android device
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
SCRIPT_NAME="$(basename $0)"
|
||||||
|
|
||||||
|
ACTION=NONE
|
||||||
|
|
||||||
|
MNT="$HOME/quar/mnt"
|
||||||
|
DEST="$HOME/quar"
|
||||||
|
|
||||||
|
while getopts "prhs:d:" o; do
|
||||||
|
case "${o}" in
|
||||||
|
p) ACTION=PUSH ;;
|
||||||
|
r) ACTION=RECV ;;
|
||||||
|
h) ACTION=HELP ;;
|
||||||
|
s)
|
||||||
|
ROOT="$OPTARG"
|
||||||
|
if ! [ -e "$MNT" ]; then
|
||||||
|
printf "$SCRIPT_NAME: source mountpoint $MNT does not exist"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
d)
|
||||||
|
DEST="$OPTARG"
|
||||||
|
if ! [ -e "$DEST" ]; then
|
||||||
|
printf "$SCRIPT_NAME: destination $DEST does not exist"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
ROOT="$MNT/Internal shared storage"
|
||||||
|
|
||||||
|
imp () {
|
||||||
|
find "$1" -type f | xargs -I{} mv "{}" "$2"
|
||||||
|
}
|
||||||
|
|
||||||
|
impf () {
|
||||||
|
find "$1" -mindepth 1 -maxdepth 1 | xargs -I{} mv "{}"/ "$2"
|
||||||
|
}
|
||||||
|
|
||||||
|
impf_cp () {
|
||||||
|
find "$1" -mindepth 1 -maxdepth 1 | xargs -I{} cp -r "{}"/ "$2"
|
||||||
|
}
|
||||||
|
|
||||||
|
exp () {
|
||||||
|
find "$1" -type f | xargs -I{} cp -n "{}" "$2"
|
||||||
|
}
|
||||||
|
|
||||||
|
display_help () {
|
||||||
|
cat << EOF
|
||||||
|
usage: $SCRIPT_NAME [-r] [-p] [-h] [-s PATH] [-d PATH]
|
||||||
|
-r: receive files from mobile device
|
||||||
|
-p: send files to mobile device
|
||||||
|
-s: set go-mtpfs source mountpoint path
|
||||||
|
-d: set local download destination path
|
||||||
|
EOF
|
||||||
|
}
|
||||||
|
|
||||||
|
case "$ACTION" in
|
||||||
|
PUSH)
|
||||||
|
# Optionally send sorted files back
|
||||||
|
|
||||||
|
exp ~/med/memes/woof/ "$ROOT/Pictures/memes/"
|
||||||
|
exp ~/med/memes/bork/ "$ROOT/Pictures/memes2/"
|
||||||
|
;;
|
||||||
|
|
||||||
|
RECV)
|
||||||
|
# Move files to the quarantine zone for categorisation and renaming
|
||||||
|
|
||||||
|
imp "$ROOT/Pictures/Infinity/" $DEST
|
||||||
|
imp "$ROOT/Pictures/Tachiyomi/" $DEST/crop/
|
||||||
|
imp "$ROOT/Pictures/Screenshots/" $DEST
|
||||||
|
|
||||||
|
imp "$ROOT/Movies/Infinity/" $DEST
|
||||||
|
|
||||||
|
imp "$ROOT/DCIM/OpenCamera/" $DEST
|
||||||
|
imp "$ROOT/DCIM/Camera/" $DEST
|
||||||
|
|
||||||
|
imp "$ROOT/Recordings/Sound records/" $DEST
|
||||||
|
|
||||||
|
impf_cp "$ROOT/.SeedVaultAndroidBackup/" $DEST/seedvault/ &
|
||||||
|
;;
|
||||||
|
|
||||||
|
HELP)
|
||||||
|
# show help
|
||||||
|
display_help
|
||||||
|
;;
|
||||||
|
|
||||||
|
NONE)
|
||||||
|
# Default
|
||||||
|
printf "$SCRIPT_NAME: no option specified, see $SCRIPT_NAME -h for help"
|
||||||
|
;;
|
||||||
|
esac
|
19
src/.local/bin/pulse_move.sh
Executable file
19
src/.local/bin/pulse_move.sh
Executable file
@ -0,0 +1,19 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
# pulse_move.sh [binary name] [sink name]
|
||||||
|
#
|
||||||
|
# Use pactl list short sinks to find sink names.
|
||||||
|
# Will move all streams from a certain binary to the sink.
|
||||||
|
|
||||||
|
|
||||||
|
SINK_ID=$(pactl -f json list short sinks |
|
||||||
|
jq -r ".[] | select(.name == \"$2\") | .index")
|
||||||
|
|
||||||
|
pactl -f json list clients |
|
||||||
|
jq -r ".[] | select(.properties.\"application.process.binary\" == \"$1\") | .index" |
|
||||||
|
while read -r clientindex; do
|
||||||
|
pactl -f json list short sink-inputs |
|
||||||
|
jq -r ".[] | select(.client == \"$clientindex\") | .index"
|
||||||
|
done |
|
||||||
|
while read -r inputindex; do
|
||||||
|
pacmd move-sink-input $inputindex $SINK_ID
|
||||||
|
done
|
9
src/.local/bin/update-grub
Executable file
9
src/.local/bin/update-grub
Executable file
@ -0,0 +1,9 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# Regenerate grub config
|
||||||
|
|
||||||
|
grub-mkconfig -o /boot/grub/grub.cfg
|
||||||
|
|
||||||
|
# I don't mount the efi partition normally.
|
||||||
|
mount /dev/nvme0n1p1 /boot/efi
|
||||||
|
grub-mkconfig -o /boot/efi/EFI/gentoo/grub.cfg
|
23
src/.local/bin/upkern
Executable file
23
src/.local/bin/upkern
Executable file
@ -0,0 +1,23 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# Move kernel configuration files to new kernel
|
||||||
|
# Takes a single argument, the number of the kernel in eselect
|
||||||
|
|
||||||
|
# Sleep in case user wants to cancel
|
||||||
|
sleep 2
|
||||||
|
|
||||||
|
cd /usr/src/linux
|
||||||
|
|
||||||
|
# Store config in /usr/src/.config
|
||||||
|
cp .config ../.config
|
||||||
|
cp .config /home/dogeystamp/dox/bak/kernelconf
|
||||||
|
|
||||||
|
# Switch to new kernel
|
||||||
|
eselect kernel set $1
|
||||||
|
cd /usr/src/linux
|
||||||
|
|
||||||
|
# Apply new configuration file
|
||||||
|
cp ../.config .config
|
||||||
|
|
||||||
|
# Upgrade configuration file with new features
|
||||||
|
make olddefconfig
|
18
src/.local/bin/watson-shell
Executable file
18
src/.local/bin/watson-shell
Executable file
@ -0,0 +1,18 @@
|
|||||||
|
#!/bin/fish
|
||||||
|
|
||||||
|
# thing for running watson subcommands quickly
|
||||||
|
|
||||||
|
|
||||||
|
prod.sh &
|
||||||
|
|
||||||
|
while true
|
||||||
|
read -S -p 'set_color green; echo -n watson; set_color normal; echo "> "' -c "watson " CMD
|
||||||
|
if test "$CMD" = "exit"
|
||||||
|
or test "$CMD" = "watson exit"
|
||||||
|
or test "$CMD" = "watson quit"
|
||||||
|
break
|
||||||
|
end
|
||||||
|
eval $CMD
|
||||||
|
end
|
||||||
|
|
||||||
|
kill %1
|
16
src/.local/bin/wikt
Executable file
16
src/.local/bin/wikt
Executable file
@ -0,0 +1,16 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
# Open word on Wiktionary in a browser
|
||||||
|
# Requires fzf
|
||||||
|
|
||||||
|
# Empty query to abort
|
||||||
|
# $1 sets the language to scroll to in the page
|
||||||
|
|
||||||
|
# wikt [language]
|
||||||
|
|
||||||
|
while true; do
|
||||||
|
WORD="$(cat ~/.local/bin/wikt-words | fzf | iconv -f UTF-8 -t ASCII//TRANSLIT | tr -d '-')"
|
||||||
|
if [ -z "$WORD" ]; then
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
$BROWSER "https://wiktionary.org/wiki/$WORD#$1" > /dev/null 2>&1 &
|
||||||
|
done
|
35739
src/.local/bin/wikt-words
Normal file
35739
src/.local/bin/wikt-words
Normal file
File diff suppressed because it is too large
Load Diff
95
src/.local/share/man/man1/z.1
Normal file
95
src/.local/share/man/man1/z.1
Normal file
@ -0,0 +1,95 @@
|
|||||||
|
.\" generated with Ronn/v0.7.3
|
||||||
|
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
||||||
|
.
|
||||||
|
.TH "Z" "1" "August 2019" "" ""
|
||||||
|
.
|
||||||
|
.SH "NAME"
|
||||||
|
\fBz\fR \- jump around
|
||||||
|
.
|
||||||
|
.SH "Name"
|
||||||
|
z \- jump around: port of rupa\'s z
|
||||||
|
.
|
||||||
|
.SH "SYNOPSIS"
|
||||||
|
\fBz [\-cehlprt] string1 string2\.\.\.\fR
|
||||||
|
.
|
||||||
|
.br
|
||||||
|
\fBzo [\-cehlprt] string1 string2\.\.\.\fR
|
||||||
|
.
|
||||||
|
.SH "DESCRIPTION"
|
||||||
|
Port of rupa\'s z:
|
||||||
|
.
|
||||||
|
.P
|
||||||
|
Tracks your most used directories, based on \'frecency\'\. The data is stored in a file located at \fB$Z_DATA\fR\.
|
||||||
|
.
|
||||||
|
.P
|
||||||
|
After a short learning phase, z will take you to the most \'frecent\' directory that matches ALL of the strings given on the command line, in order\.
|
||||||
|
.
|
||||||
|
.P
|
||||||
|
For more details about frecency, see https://github\.com/rupa/z\.
|
||||||
|
.
|
||||||
|
.SH "OPTIONS"
|
||||||
|
.
|
||||||
|
.TP
|
||||||
|
\fB\-c\fR, \fB\-\-clean\fR
|
||||||
|
Removes directories that no longer exist from \fB$Z_DATA\fR\.
|
||||||
|
.
|
||||||
|
.TP
|
||||||
|
\fB\-e\fR, \fB\-\-echo\fR
|
||||||
|
Prints the best match\. No cd\.
|
||||||
|
.
|
||||||
|
.TP
|
||||||
|
\fB\-h\fR, \fB\-\-help\fR
|
||||||
|
Show a brief help message\.
|
||||||
|
.
|
||||||
|
.TP
|
||||||
|
\fB\-l\fR, \fB\-\-list\fR
|
||||||
|
Show a list of matches, and their scores\. No cd\.
|
||||||
|
.
|
||||||
|
.TP
|
||||||
|
\fB\-r\fR, \fB\-\-rank\fR
|
||||||
|
Match by rank only\.
|
||||||
|
.
|
||||||
|
.TP
|
||||||
|
\fB\-t\fR, \fB\-\-recent\fR
|
||||||
|
Match by recent only\.
|
||||||
|
.
|
||||||
|
.TP
|
||||||
|
\fB\-x\fR, \fB\-\-delete\fR
|
||||||
|
Removes the current directory from \fB$Z_DATA\fR\.
|
||||||
|
.
|
||||||
|
.SH "EXAMPLES"
|
||||||
|
.
|
||||||
|
.TP
|
||||||
|
\fBz foo\fR
|
||||||
|
Goes to directory best matching \fBfoo\fR\.
|
||||||
|
.
|
||||||
|
.TP
|
||||||
|
\fBzo foo\fR
|
||||||
|
Opens file manager of directory best matching \fBfoo\fR\.
|
||||||
|
.
|
||||||
|
.TP
|
||||||
|
\fBz \-t foo\fR
|
||||||
|
Goes to most recent directory matching \fBfoo\fR\.
|
||||||
|
.
|
||||||
|
.TP
|
||||||
|
\fBz \-x\fR
|
||||||
|
Removes the current directory from \fB$Z_DATA\fR\.
|
||||||
|
.
|
||||||
|
.SH "CONFIGURATION"
|
||||||
|
.
|
||||||
|
.TP
|
||||||
|
\fBset \-U Z_CMD "j"\fR
|
||||||
|
Change commands to \fBj\fR and \fBjo\fR
|
||||||
|
.
|
||||||
|
.TP
|
||||||
|
\fBset \-U Z_DATA "$HOME/\.foo"\fR
|
||||||
|
Set data file to \fB$HOME/\.foo\fR
|
||||||
|
.
|
||||||
|
.TP
|
||||||
|
\fBset \-U ZO_METHOD "opencmd"\fR
|
||||||
|
Runs \fBopencmd dir\fR on \fBzo dir\fR (defaults to \fBopen\fR or \fBxdg\-open\fR)
|
||||||
|
.
|
||||||
|
.TP
|
||||||
|
\fBset \-U Z_OWNER "username"\fR
|
||||||
|
Ensure data file is owned by \fBusername\fR\. This prevents usage of \fBz\fR with \fBsudo\fR to cause file to be inaccessible in non\-sudo sessions\.
|
||||||
|
|
1
suckless/dmenu/.gitignore
vendored
1
suckless/dmenu/.gitignore
vendored
@ -4,5 +4,4 @@
|
|||||||
*.tar.gz
|
*.tar.gz
|
||||||
*.diff
|
*.diff
|
||||||
dmenu
|
dmenu
|
||||||
stest
|
|
||||||
config.h
|
config.h
|
||||||
|
1
suckless/dwm/.gitignore
vendored
1
suckless/dwm/.gitignore
vendored
@ -4,5 +4,4 @@
|
|||||||
*.tar.gz
|
*.tar.gz
|
||||||
*.diff
|
*.diff
|
||||||
dwm
|
dwm
|
||||||
dwmswallow
|
|
||||||
config.h
|
config.h
|
||||||
|
120
suckless/dwm/dwmswallow
Executable file
120
suckless/dwm/dwmswallow
Executable file
@ -0,0 +1,120 @@
|
|||||||
|
#!/usr/bin/env sh
|
||||||
|
|
||||||
|
# Separator and command prefix, as defined in dwm.c:fakesignal()
|
||||||
|
SEP='###'
|
||||||
|
PREFIX='#!'
|
||||||
|
|
||||||
|
# Asserts that all arguments are valid X11 window IDs, i.e. positive integers.
|
||||||
|
# For the purpose of this script 0 is declared invalid.
|
||||||
|
is_winid() {
|
||||||
|
while :; do
|
||||||
|
# Given input incompatible to %d, some implementations of printf return
|
||||||
|
# an error while others silently evaluate the expression to 0.
|
||||||
|
if ! wid=$(printf '%d' "$1" 2>/dev/null) || [ "$wid" -le 0 ]; then
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
[ -n "$2" ] && shift || break
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
# Prints usage help. If "$1" is provided, function exits script after
|
||||||
|
# execution.
|
||||||
|
usage() {
|
||||||
|
[ -t 1 ] && myprintf=printf || myprintf=true
|
||||||
|
msg="$(cat <<-EOF
|
||||||
|
dwm window swallowing command-line interface. Usage:
|
||||||
|
|
||||||
|
$($myprintf "\033[1m")dwmswallow $($myprintf "\033[3m")SWALLOWER [-c CLASS] [-i INSTANCE] [-t TITLE]$($myprintf "\033[0m")
|
||||||
|
Register window $($myprintf "\033[3m")SWALLOWER$($myprintf "\033[0m") to swallow the next future window whose attributes
|
||||||
|
match the $($myprintf "\033[3m")CLASS$($myprintf "\033[0m") name, $($myprintf "\033[3m")INSTANCE$($myprintf "\033[0m") name and window $($myprintf "\033[3m")TITLE$($myprintf "\033[0m") filters using basic
|
||||||
|
string-matching. An omitted filter will match anything.
|
||||||
|
|
||||||
|
$($myprintf "\033[1m")dwmswallow $($myprintf "\033[3m")SWALLOWER -d$($myprintf "\033[0m")
|
||||||
|
Deregister queued swallow for window $($myprintf "\033[3m")SWALLOWER$($myprintf "\033[0m"). Inverse of above signature.
|
||||||
|
|
||||||
|
$($myprintf "\033[1m")dwmswallow $($myprintf "\033[3m")SWALLOWER SWALLOWEE$($myprintf "\033[0m")
|
||||||
|
Perform immediate swallow of window $($myprintf "\033[3m")SWALLOWEE$($myprintf "\033[0m") by window $($myprintf "\033[3m")SWALLOWER$($myprintf "\033[0m").
|
||||||
|
|
||||||
|
$($myprintf "\033[1m")dwmswallow $($myprintf "\033[3m")SWALLOWEE -s$($myprintf "\033[0m")
|
||||||
|
Stop swallow of window $($myprintf "\033[3m")SWALLOWEE$($myprintf "\033[0m"). Inverse of the above signature. Visible
|
||||||
|
windows only.
|
||||||
|
|
||||||
|
$($myprintf "\033[1m")dwmswallow -h$($myprintf "\033[0m")
|
||||||
|
Show this usage information.
|
||||||
|
EOF
|
||||||
|
)"
|
||||||
|
|
||||||
|
if [ -n "$1" ]; then
|
||||||
|
echo "$msg" >&2
|
||||||
|
exit "$1"
|
||||||
|
else
|
||||||
|
echo "$msg"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# Determine number of leading positional arguments
|
||||||
|
arg1="$1" # save for later
|
||||||
|
arg2="$2" # save for later
|
||||||
|
num_pargs=0
|
||||||
|
while :; do
|
||||||
|
case "$1" in
|
||||||
|
-*|"") break ;;
|
||||||
|
*) num_pargs=$((num_pargs + 1)); shift ;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
case "$num_pargs" in
|
||||||
|
1)
|
||||||
|
! is_winid "$arg1" && usage 1
|
||||||
|
|
||||||
|
widswer="$arg1"
|
||||||
|
if [ "$1" = "-d" ] && [ "$#" -eq 1 ]; then
|
||||||
|
if name="$(printf "${PREFIX}swalunreg${SEP}%u" "$widswer" 2>/dev/null)"; then
|
||||||
|
xsetroot -name "$name"
|
||||||
|
else
|
||||||
|
usage 1
|
||||||
|
fi
|
||||||
|
elif [ "$1" = "-s" ] && [ "$#" -eq 1 ]; then
|
||||||
|
widswee="$arg1"
|
||||||
|
if name="$(printf "${PREFIX}swalstop${SEP}%u" "$widswee" 2>/dev/null)"; then
|
||||||
|
xsetroot -name "$name"
|
||||||
|
else
|
||||||
|
usage 1
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
while :; do
|
||||||
|
case "$1" in
|
||||||
|
-c) [ -n "$2" ] && { class="$2"; shift 2; } || usage 1 ;;
|
||||||
|
-i) [ -n "$2" ] && { instance="$2"; shift 2; } || usage 1 ;;
|
||||||
|
-t) [ -n "$2" ] && { title="$2"; shift 2; } || usage 1 ;;
|
||||||
|
"") break ;;
|
||||||
|
*) usage 1 ;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
widswer="$arg1"
|
||||||
|
if name="$(printf "${PREFIX}swalreg${SEP}%u${SEP}%s${SEP}%s${SEP}%s" "$widswer" "$class" "$instance" "$title" 2>/dev/null)"; then
|
||||||
|
xsetroot -name "$name"
|
||||||
|
else
|
||||||
|
usage 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
2)
|
||||||
|
! is_winid "$arg1" "$arg2" || [ -n "$1" ] && usage 1
|
||||||
|
|
||||||
|
widswer="$arg1"
|
||||||
|
widswee="$arg2"
|
||||||
|
if name="$(printf "${PREFIX}swal${SEP}%u${SEP}%u" "$widswer" "$widswee" 2>/dev/null)"; then
|
||||||
|
xsetroot -name "$name"
|
||||||
|
else
|
||||||
|
usage 1
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
if [ "$arg1" = "-h" ] && [ $# -eq 1 ]; then
|
||||||
|
usage
|
||||||
|
else
|
||||||
|
usage 1
|
||||||
|
fi
|
||||||
|
esac
|
Loading…
Reference in New Issue
Block a user