mirror of
https://github.com/m1k1o/neko.git
synced 2024-07-24 14:40:50 +12:00
lint fix.
This commit is contained in:
parent
8f60041b2d
commit
bd062d3949
@ -9,7 +9,7 @@ func (manager *DesktopManagerCtx) HandleFileChooserDialog(uri string) error {
|
|||||||
defer mu.Unlock()
|
defer mu.Unlock()
|
||||||
|
|
||||||
// TOOD: Use native API.
|
// TOOD: Use native API.
|
||||||
cmd := exec.Command(
|
cmd := exec.Command(
|
||||||
"xdotool",
|
"xdotool",
|
||||||
"search", "--name", "Open", "windowfocus",
|
"search", "--name", "Open", "windowfocus",
|
||||||
"sleep", "0.2",
|
"sleep", "0.2",
|
||||||
@ -52,7 +52,7 @@ func (manager *DesktopManagerCtx) IsFileChooserDialogOpen() bool {
|
|||||||
defer mu.Unlock()
|
defer mu.Unlock()
|
||||||
|
|
||||||
// TOOD: Use native API.
|
// TOOD: Use native API.
|
||||||
cmd := exec.Command(
|
cmd := exec.Command(
|
||||||
"xdotool",
|
"xdotool",
|
||||||
"search", "--name", "Open", "windowfocus",
|
"search", "--name", "Open", "windowfocus",
|
||||||
)
|
)
|
||||||
|
@ -58,14 +58,14 @@ func (manager *DesktopManagerCtx) GetScreenSize() *types.ScreenSize {
|
|||||||
|
|
||||||
func (manager *DesktopManagerCtx) SetKeyboardMap(kbd types.KeyboardMap) error {
|
func (manager *DesktopManagerCtx) SetKeyboardMap(kbd types.KeyboardMap) error {
|
||||||
// TOOD: Use native API.
|
// TOOD: Use native API.
|
||||||
cmd := exec.Command("setxkbmap", "-layout", kbd.Layout, "-variant", kbd.Variant)
|
cmd := exec.Command("setxkbmap", "-layout", kbd.Layout, "-variant", kbd.Variant)
|
||||||
_, err := cmd.Output()
|
_, err := cmd.Output()
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
func (manager *DesktopManagerCtx) GetKeyboardMap() (*types.KeyboardMap, error) {
|
func (manager *DesktopManagerCtx) GetKeyboardMap() (*types.KeyboardMap, error) {
|
||||||
// TOOD: Use native API.
|
// TOOD: Use native API.
|
||||||
cmd := exec.Command("setxkbmap", "-query")
|
cmd := exec.Command("setxkbmap", "-query")
|
||||||
res, err := cmd.Output()
|
res, err := cmd.Output()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
@ -2,8 +2,8 @@ package utils
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
"image"
|
"image"
|
||||||
"image/color"
|
"image/color"
|
||||||
"image/png"
|
"image/png"
|
||||||
"encoding/base64"
|
"encoding/base64"
|
||||||
|
|
||||||
@ -29,8 +29,8 @@ func GetCursorImageURI(cursor *types.CursorImage) (string, error) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
out := new(bytes.Buffer)
|
out := new(bytes.Buffer)
|
||||||
err := png.Encode(out, img)
|
err := png.Encode(out, img)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return "", err
|
return "", err
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user