update styling of rofi menu
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1 +1,2 @@
|
|||||||
.git
|
.git
|
||||||
|
screenshot
|
||||||
|
|||||||
@@ -46,12 +46,12 @@ func checkDeps() {
|
|||||||
func main() {
|
func main() {
|
||||||
checkDeps()
|
checkDeps()
|
||||||
options := []Option{
|
options := []Option{
|
||||||
{"Select a region and save", []string{"sh", "-c", fmt.Sprintf("slurp | grim -g - '%s'", tmpScreenshot)}},
|
{"1. 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"}},
|
{"2. Select a region and copy to clipboard", []string{"sh", "-c", "slurp | grim -g - - | wl-copy"}},
|
||||||
{"Whole screen", []string{"grim", tmpScreenshot}},
|
{"3. 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)}},
|
{"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)}},
|
||||||
{"Edit", []string{"sh", "-c", "slurp | grim -g - - | swappy -f -"}},
|
{"5. Edit", []string{"sh", "-c", "slurp | grim -g - - | swappy -f -"}},
|
||||||
{"Quit", []string{"true"}},
|
{"6. Quit", []string{"true"}},
|
||||||
}
|
}
|
||||||
|
|
||||||
var menu bytes.Buffer
|
var menu bytes.Buffer
|
||||||
@@ -60,7 +60,7 @@ func main() {
|
|||||||
menu.WriteByte('\n')
|
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
|
rofi.Stdin = &menu
|
||||||
out, err := rofi.Output()
|
out, err := rofi.Output()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|||||||
Reference in New Issue
Block a user