mirror of
https://gitlab.com/dwt1/dotfiles.git
synced 2026-04-22 11:00:27 +10:00
Pushing dmenu and related scripts.
This commit is contained in:
20
.dmenu/dmenu_edit_dwm
Executable file
20
.dmenu/dmenu_edit_dwm
Executable file
@@ -0,0 +1,20 @@
|
||||
#!/bin/bash
|
||||
# ____ _____
|
||||
# | _ \_ _| Derek Taylor (DistroTube)
|
||||
# | | | || | http://www.youtube.com/c/DistroTube
|
||||
# | |_| || | http://www.gitlab.com/dwt1/
|
||||
# |____/ |_|
|
||||
#
|
||||
# Use dmenu to open and edit a file from a given list.
|
||||
# I use this to quickly open my dwm source files in vim.
|
||||
|
||||
# Global variables:
|
||||
FILES=${1:-"/home/dt/dwm"}
|
||||
DMENU='dmenu -l -i'
|
||||
EDITOR='st -e vim'
|
||||
# Show list of options
|
||||
choice=$(ls -a "${FILES}" | $DMENU -p "« dwm » source code:")
|
||||
|
||||
if [ $choice ]; then
|
||||
$EDITOR ${FILES}/${choice}
|
||||
fi
|
||||
Reference in New Issue
Block a user