aboutsummaryrefslogtreecommitdiff
path: root/scripts/.scripts/create_tmp.sh
blob: 56d5fbbb6861cff987354a8e3861948fa0d1b55d (plain)
1
2
3
4
5
6
7
8
9
10
#!/bin/sh

# Choose an extenstion for the temp file
choice=$(echo -e "cpp\nc\npy\nrs\njs\nts\ngo\ntxt\nmd\nhtml\ncss" | dmenu -p "Select extension: " -l 10)

# choose random word from a dictionary
random_word=$(cat /usr/share/dict/cracklib-small | shuf -n 1)

# create temp file and open it in nvim
alacritty -e nvim /tmp/$random_word.$choice