update styling of rofi menu
This commit is contained in:
parent
99ae96eef9
commit
0fa6ed045b
1
.gitignore
vendored
1
.gitignore
vendored
@ -1 +1,2 @@
|
||||
.git
|
||||
screenshot
|
||||
|
@ -46,12 +46,12 @@ func checkDeps() {
|
||||
func main() {
|
||||
checkDeps()
|
||||
options := []Option{
|
||||
{"Select a region and save", []string{"sh", "-c", fmt.Sprintf("slurp | grim -g - '%s'", tmpScreenshot)}},
|
||||
{"Select a region and copy to clipboard", []string{"sh", "-c", "slurp | grim -g - - | wl-copy"}},
|
||||
{"Whole screen", []string{"grim", tmpScreenshot}},
|
||||
{"Current window", []string{"sh", "-c", fmt.Sprintf("hyprctl -j activewindow | jq -r '\\.at[0],(\\.at[1]) \\.size[0]x(\\.size[1])' | grim -g - '%s'", tmpScreenshot)}},
|
||||
{"Edit", []string{"sh", "-c", "slurp | grim -g - - | swappy -f -"}},
|
||||
{"Quit", []string{"true"}},
|
||||
{"1. Select a region and save", []string{"sh", "-c", fmt.Sprintf("slurp | grim -g - '%s'", tmpScreenshot)}},
|
||||
{"2. Select a region and copy to clipboard", []string{"sh", "-c", "slurp | grim -g - - | wl-copy"}},
|
||||
{"3. Whole screen", []string{"grim", tmpScreenshot}},
|
||||
{"4. Current window", []string{"sh", "-c", fmt.Sprintf("hyprctl -j activewindow | jq -r '\\.at[0],(\\.at[1]) \\.size[0]x(\\.size[1])' | grim -g - '%s'", tmpScreenshot)}},
|
||||
{"5. Edit", []string{"sh", "-c", "slurp | grim -g - - | swappy -f -"}},
|
||||
{"6. Quit", []string{"true"}},
|
||||
}
|
||||
|
||||
var menu bytes.Buffer
|
||||
@ -60,7 +60,7 @@ func main() {
|
||||
menu.WriteByte('\n')
|
||||
}
|
||||
|
||||
rofi := exec.Command("rofi", "-dmenu", "-i", "-p", "Enter option or select from the list", "-mesg", "Select a Screenshot Option", "-format", "i")
|
||||
rofi := exec.Command("rofi", "-dmenu", "-i", "-p", "Enter option or select from the list", "-mesg", "Select a Screenshot Option", "-format", "i", "-theme-str", "listview {columns: 2; lines: 3;} window {width: 55%;}", "-yoffset", "30", "-xoffset", "30", "-a", "0", "-no-custom", "-location", "0")
|
||||
rofi.Stdin = &menu
|
||||
out, err := rofi.Output()
|
||||
if err != nil {
|
||||
@ -110,4 +110,4 @@ func main() {
|
||||
} else {
|
||||
notify(fmt.Sprintf("Screenshot saved to %s", dest), "")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user