mirror of
https://github.com/m1k1o/neko.git
synced 2024-07-24 14:40:50 +12:00
desktop display from env.
This commit is contained in:
@ -1,6 +1,7 @@
|
||||
package config
|
||||
|
||||
import (
|
||||
"os"
|
||||
"regexp"
|
||||
"strconv"
|
||||
|
||||
@ -9,6 +10,8 @@ import (
|
||||
)
|
||||
|
||||
type Desktop struct {
|
||||
Display string
|
||||
|
||||
ScreenWidth int
|
||||
ScreenHeight int
|
||||
ScreenRate int16
|
||||
@ -24,6 +27,9 @@ func (Desktop) Init(cmd *cobra.Command) error {
|
||||
}
|
||||
|
||||
func (s *Desktop) Set() {
|
||||
// Display is provided by env variable
|
||||
s.Display = os.Getenv("DISPLAY")
|
||||
|
||||
s.ScreenWidth = 1280
|
||||
s.ScreenHeight = 720
|
||||
s.ScreenRate = 30
|
||||
|
Reference in New Issue
Block a user