Restructuring the repo
This commit is contained in:
parent
21e3cf65e6
commit
3d67598c27
45 changed files with 368 additions and 77 deletions
30
bin/dmscrot
30
bin/dmscrot
|
@ -1,30 +0,0 @@
|
|||
#!/usr/bin/env ruby
|
||||
|
||||
require 'dmenu'
|
||||
|
||||
def run_menu(items, prompt)
|
||||
menu = Dmenu.new
|
||||
menu.case_insensitive = true
|
||||
menu.lines = items.length
|
||||
menu.items = items
|
||||
menu.prompt = prompt
|
||||
menu.run.value
|
||||
end
|
||||
modes = [
|
||||
Dmenu::Item.new('multidisp', '-m'),
|
||||
Dmenu::Item.new('select', '-s'),
|
||||
Dmenu::Item.new('focused', '-u -d 1'),
|
||||
Dmenu::Item.new('normal', '')
|
||||
]
|
||||
|
||||
actions = [
|
||||
Dmenu::Item.new('move to screenshots', 'mv $f ~/media/screenshots'),
|
||||
Dmenu::Item.new('view image', 'xdg-open $f'),
|
||||
Dmenu::Item.new('make draggable', 'dragon -x $f'),
|
||||
Dmenu::Item.new('nothing', 'true')
|
||||
]
|
||||
|
||||
mode = run_menu(modes, "Screenshot type")
|
||||
action = run_menu(actions, "and then")
|
||||
|
||||
system('scrot', mode, '-e', action)
|
Loading…
Add table
Add a link
Reference in a new issue