Compare commits
5 Commits
2020-06-21
...
2020-06.22
Author | SHA1 | Date | |
---|---|---|---|
6b595f44a3 | |||
144190b1c9 | |||
bd729e5372 | |||
9c776c3400 | |||
09a53e2681 |
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,5 +1,6 @@
|
|||||||
*.pkg.tar.xz*
|
*.pkg.tar.xz*
|
||||||
helper-scripts
|
helper-scripts
|
||||||
|
helper-scripts.rb
|
||||||
helper-scripts.spec
|
helper-scripts.spec
|
||||||
PKGBUILD
|
PKGBUILD
|
||||||
pkg
|
pkg
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/bash
|
#!/usr/bin/env bash
|
||||||
# Copy a file from ~/Templates to a given name
|
# Copy a file from ~/Templates to a given name
|
||||||
#
|
#
|
||||||
# Dependencies:
|
# Dependencies:
|
||||||
|
2
ddusb.py
2
ddusb.py
@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/python3
|
#!/usr/bin/env python3
|
||||||
"""Wrapper script for using dd to write to a USB drive."""
|
"""Wrapper script for using dd to write to a USB drive."""
|
||||||
|
|
||||||
import argparse
|
import argparse
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/python3
|
#!/usr/bin/env python3
|
||||||
"""Check the temperature of a drive.
|
"""Check the temperature of a drive.
|
||||||
Functions:
|
Functions:
|
||||||
verify_device_node(query)
|
verify_device_node(query)
|
||||||
|
2
fedit.py
2
fedit.py
@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/python3
|
#!/usr/bin/env python3
|
||||||
"""
|
"""
|
||||||
Fuzzy-find a file and edit it.
|
Fuzzy-find a file and edit it.
|
||||||
|
|
||||||
|
2
fless.sh
2
fless.sh
@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/bash
|
#!/usr/bin/env bash
|
||||||
# fless - fuzzy find a file and run less on it
|
# fless - fuzzy find a file and run less on it
|
||||||
# Dependencies
|
# Dependencies
|
||||||
# - fd (soft)
|
# - fd (soft)
|
||||||
|
2
gek.sh
2
gek.sh
@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/bash
|
#!/usr/bin/env bash
|
||||||
# Export a key to a given keyfile
|
# Export a key to a given keyfile
|
||||||
|
|
||||||
echo -n "Enter the name of the output file: "
|
echo -n "Enter the name of the output file: "
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/python3
|
#!/usr/bin/env python3
|
||||||
"""Obtain a weather forecast."""
|
"""Obtain a weather forecast."""
|
||||||
|
|
||||||
import argparse
|
import argparse
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/bash
|
#!/usr/bin/env bash
|
||||||
# List all groups in the system
|
# List all groups in the system
|
||||||
|
|
||||||
sort <(awk -F ':' '{print $1}' < /etc/group)
|
sort <(awk -F ':' '{print $1}' < /etc/group)
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/bash
|
#!/usr/bin/env bash
|
||||||
# List all users on the system
|
# List all users on the system
|
||||||
|
|
||||||
sort --unique <(awk -F ':' '{print $1}' < /etc/passwd)
|
sort --unique <(awk -F ':' '{print $1}' < /etc/passwd)
|
||||||
|
2
open.sh
2
open.sh
@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/bash
|
#!/usr/bin/env bash
|
||||||
# open - fuzzy find, select, and open a file using xdg-open
|
# open - fuzzy find, select, and open a file using xdg-open
|
||||||
#
|
#
|
||||||
# Dependencies:
|
# Dependencies:
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/python3
|
#!/usr/bin/env python3
|
||||||
"""
|
"""
|
||||||
quickdel - delete any file matching a query
|
quickdel - delete any file matching a query
|
||||||
|
|
||||||
|
@ -1,22 +0,0 @@
|
|||||||
# Fuzzy cd from anywhere
|
|
||||||
# Dependencies
|
|
||||||
# * fzf
|
|
||||||
# * mlocate
|
|
||||||
|
|
||||||
# ========== Shortcuts ==========
|
|
||||||
cf() {
|
|
||||||
[[ -z "${*}" ]] && return 1
|
|
||||||
[[ ! -x /usr/bin/fzf ]] && return 1
|
|
||||||
|
|
||||||
dir="$(locate --all --ignore-case --null -- "${@}" | fzf --read0 --select-1 --exit-0)"
|
|
||||||
|
|
||||||
[[ -z "${dir}" ]] && return 1
|
|
||||||
|
|
||||||
if [[ -f "${dir}" ]]; then
|
|
||||||
cd "${dir%/*}"
|
|
||||||
else
|
|
||||||
cd "${dir}"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
autoload -Uz cf
|
|
@ -1,15 +0,0 @@
|
|||||||
# Fuzzy find a file and then edit it
|
|
||||||
|
|
||||||
_run_fedit() {
|
|
||||||
fedit && zle reset-prompt
|
|
||||||
}
|
|
||||||
|
|
||||||
_run_etcedit() {
|
|
||||||
fedit --etc && zle reset-prompt
|
|
||||||
}
|
|
||||||
|
|
||||||
zle -N _run_fedit
|
|
||||||
bindkey -M viins '^o' _run_fedit
|
|
||||||
|
|
||||||
zle -N _run_etcedit
|
|
||||||
bindkey -M viins '^e' _run_etcedit
|
|
@ -1,7 +0,0 @@
|
|||||||
# Fuzzy-find a file and open it in less
|
|
||||||
_run_fless() {
|
|
||||||
/usr/bin/fless && zle reset-prompt
|
|
||||||
}
|
|
||||||
|
|
||||||
zle -N _run_fless
|
|
||||||
bindkey -M viins '^n' _run_fless
|
|
@ -1,8 +0,0 @@
|
|||||||
# Make a directory, then change into it
|
|
||||||
|
|
||||||
mkcd() {
|
|
||||||
[[ ! -d "${1}" ]] && mkdir --parents -- "${1}"
|
|
||||||
cd "${1}" || exit
|
|
||||||
}
|
|
||||||
|
|
||||||
autoload -Uz mkcd
|
|
Reference in New Issue
Block a user