aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcrecher <crecher@crecher.net>2026-04-01 14:33:45 +0200
committercrecher <crecher@crecher.net>2026-04-01 14:33:45 +0200
commit273b21c2045f81dc73e05590d834ba10b948a3e6 (patch)
treedd1901135e4189654621f740930fb535b4dc0cae
parent981920710bfa7e3eae535a0a65c3d89b421eb752 (diff)
downloadwm-273b21c2045f81dc73e05590d834ba10b948a3e6.tar.gz
wm-273b21c2045f81dc73e05590d834ba10b948a3e6.zip
added startup commands
-rw-r--r--config/config.go3
-rw-r--r--main.go7
-rwxr-xr-xwmbin4284232 -> 4284639 bytes
3 files changed, 9 insertions, 1 deletions
diff --git a/config/config.go b/config/config.go
index e094dfb..9539280 100644
--- a/config/config.go
+++ b/config/config.go
@@ -2,3 +2,6 @@ package config
var BarHeight uint16 = 20
var GapSize int = 10
+
+// commands that get executed on startup
+var Startup = []string{"notify-send hello world!"}
diff --git a/main.go b/main.go
index 70cd869..f5828b1 100644
--- a/main.go
+++ b/main.go
@@ -9,7 +9,7 @@ import (
"github.com/BurntSushi/xgb"
"github.com/BurntSushi/xgb/xproto"
- config "github.com/crecheer/wm/config"
+ "github.com/crecheer/wm/config"
"github.com/crecheer/wm/keysym"
)
@@ -115,6 +115,11 @@ func setup(conn *xgb.Conn) {
if barHeight != 0 {
createBar(conn)
}
+
+ for _, cmd := range config.Startup {
+ exec.Command(cmd)
+ log.Println(cmd)
+ }
}
func spawn(cmd string, args ...string) {
diff --git a/wm b/wm
index 5ed3e13..e0e649d 100755
--- a/wm
+++ b/wm
Binary files differ