mirror of
https://github.com/nmasur/dotfiles
synced 2025-07-06 06:10:13 +00:00
remove some old unnecessary configs
This commit is contained in:
15
bin/bookmark
15
bin/bookmark
@ -1,15 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
URL=$1
|
||||
TITLE=$2
|
||||
DESCRIPTION=$3
|
||||
FEED=$4
|
||||
|
||||
printf "\n\n## [%s](%s)\n%s\nFrom %s: added on [%s](%s.md).\n\n---\n" \
|
||||
"$TITLE" \
|
||||
"$URL" \
|
||||
"$DESCRIPTION" \
|
||||
"$FEED" \
|
||||
"$TODAY_NOTE" \
|
||||
"$TODAY_NOTE" \
|
||||
>>"$NOTES_PATH/bookmarks.md"
|
13
bin/calc
13
bin/calc
@ -1,13 +0,0 @@
|
||||
#!/usr/bin/env ruby
|
||||
#
|
||||
# Run a quick calculation with Ruby
|
||||
#
|
||||
# Usage: calc "1/2"
|
||||
|
||||
class Integer
|
||||
def /(other)
|
||||
fdiv(other)
|
||||
end
|
||||
end
|
||||
|
||||
puts eval(ARGV.join(""))
|
@ -1,3 +0,0 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
doas -u localtimed localtimed
|
@ -1,3 +0,0 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
nixos-rebuild switch -I nixos-config="/home/noah/dev/personal/dotfiles/nixos/configuration.nix"
|
@ -1,3 +0,0 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
home-manager switch -f "/home/noah/dev/personal/dotfiles/nixos/home.nix"
|
13
bin/nuke
13
bin/nuke
@ -1,13 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
nuke() {
|
||||
local pid
|
||||
pid=$(ps -ef | grep -v ^root | sed 1d | fzf -m | awk '{print $2}')
|
||||
|
||||
if [ "x$pid" != "x" ]
|
||||
then
|
||||
echo $pid | xargs kill -${1:-9}
|
||||
fi
|
||||
}
|
||||
|
||||
nuke
|
@ -1,4 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
security find-generic-password -s 1Password -w | op signin enterprise_console --output=raw > $HOME/.op_tmux_token_tmp
|
||||
|
44
bin/vimv
44
bin/vimv
@ -1,44 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
set -eu
|
||||
|
||||
# Lists the current directory's files in Vim, so you can edit it and save to rename them
|
||||
# USAGE: vimv [file1 file2]
|
||||
# https://github.com/thameera/vimv
|
||||
|
||||
declare -r FILENAMES_FILE=$(mktemp "${TMPDIR:-/tmp}/vimv.XXX")
|
||||
|
||||
trap '{ rm -f "${FILENAMES_FILE}" ; }' EXIT
|
||||
|
||||
if [ $# -ne 0 ]; then
|
||||
src=( "$@" )
|
||||
else
|
||||
IFS=$'\r\n' GLOBIGNORE='*' command eval 'src=($(ls))'
|
||||
fi
|
||||
|
||||
for ((i=0;i<${#src[@]};++i)); do
|
||||
echo "${src[i]}" >> "${FILENAMES_FILE}"
|
||||
done
|
||||
|
||||
${EDITOR:-vi} "${FILENAMES_FILE}"
|
||||
|
||||
IFS=$'\r\n' GLOBIGNORE='*' command eval 'dest=($(cat "${FILENAMES_FILE}"))'
|
||||
|
||||
if (( ${#src[@]} != ${#dest[@]} )); then
|
||||
echo "WARN: Number of files changed. Did you delete a line by accident? Aborting.." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
declare -i count=0
|
||||
for ((i=0;i<${#src[@]};++i)); do
|
||||
if [ "${src[i]}" != "${dest[i]}" ]; then
|
||||
mkdir -p "$(dirname "${dest[i]}")"
|
||||
if git ls-files --error-unmatch "${src[i]}" > /dev/null 2>&1; then
|
||||
git mv "${src[i]}" "${dest[i]}"
|
||||
else
|
||||
mv "${src[i]}" "${dest[i]}"
|
||||
fi
|
||||
((++count))
|
||||
fi
|
||||
done
|
||||
|
||||
echo "$count" files renamed.
|
Reference in New Issue
Block a user