Add shared bin
This commit is contained in:
parent
a94b794c76
commit
7436e52200
9 changed files with 58 additions and 0 deletions
10
bin/default-open
Executable file
10
bin/default-open
Executable file
|
|
@ -0,0 +1,10 @@
|
|||
#!/bin/sh
|
||||
|
||||
mimetype=$1
|
||||
original=$2
|
||||
ext=$(grep "$mimetype" /etc/mime.types | awk '{print $2}')
|
||||
|
||||
destination=$(mktemp --suffix=".$ext")
|
||||
cp $original $destination
|
||||
xdg-open $destination &> /dev/null
|
||||
cat $destination
|
||||
3
bin/email
Executable file
3
bin/email
Executable file
|
|
@ -0,0 +1,3 @@
|
|||
#!/bin/sh
|
||||
|
||||
mutt -F ~/.mutt/$1
|
||||
13
bin/passget
Executable file
13
bin/passget
Executable file
|
|
@ -0,0 +1,13 @@
|
|||
#!/bin/sh
|
||||
|
||||
if [[ -z "$1" ]]; then
|
||||
echo 'Nothing to get'
|
||||
exit 1
|
||||
fi
|
||||
|
||||
contents=$(gopass show $1) || exit 1
|
||||
echo "$contents" | grep '^user:' | cut -d' ' -f2 | xsel -b
|
||||
echo 'Username clipped'
|
||||
read
|
||||
|
||||
gopass show --clip $1
|
||||
6
bin/pipe
Executable file
6
bin/pipe
Executable file
|
|
@ -0,0 +1,6 @@
|
|||
#!/bin/sh
|
||||
|
||||
command=$1
|
||||
file=$(mktemp --suffix=$2)
|
||||
cat < /dev/stdin > $file
|
||||
$command $file
|
||||
6
bin/qutebrowser
Executable file
6
bin/qutebrowser
Executable file
|
|
@ -0,0 +1,6 @@
|
|||
#!/bin/sh
|
||||
|
||||
QT_SCALE_FACTOR=''
|
||||
QT_AUTO_SCREEN_SCALE_FACTOR=''
|
||||
|
||||
/usr/bin/qutebrowser --backend webengine "$@"
|
||||
11
bin/wallpaper-rotate
Executable file
11
bin/wallpaper-rotate
Executable file
|
|
@ -0,0 +1,11 @@
|
|||
#!/usr/bin/env tako
|
||||
|
||||
from datetime import datetime
|
||||
|
||||
image_dir = $HOME + '/images/wallpapers/BitDay/'
|
||||
hour = datetime.now().hour
|
||||
image_number = int(hour / 2)
|
||||
image_file = image_dir + '{}.png'.format(image_number)
|
||||
|
||||
ln -s -f @(image_file) @($HOME + '/images/wallpaper.png')
|
||||
nitrogen --restore
|
||||
3
bin/xsel-clear
Executable file
3
bin/xsel-clear
Executable file
|
|
@ -0,0 +1,3 @@
|
|||
#!/bin/sh
|
||||
|
||||
xsel -c && xsel -sc && xsel -bc
|
||||
5
bin/xsel-swap
Executable file
5
bin/xsel-swap
Executable file
|
|
@ -0,0 +1,5 @@
|
|||
#!/usr/bin/env tako
|
||||
|
||||
tmp = ?(xsel) # primary -> tmp
|
||||
xsel -b | xsel -i # clipboard -> primary
|
||||
echo @(tmp) | xsel -bi # tmp -> clipboard
|
||||
Loading…
Add table
Add a link
Reference in a new issue