aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcrecher <crecher@crecher.net>2026-09-17 18:50:53 +0200
committercrecher <crecher@crecher.net>2026-09-17 18:50:53 +0200
commit30aed3099e557d7096ac05b532415795e1b0ac39 (patch)
tree86d8abbb59c27203b9db512aa4d24d1fa821cf8e
parentf5062dc7183c69cfdc1d036f16d3e3ccdd83d1d7 (diff)
downloadwm-30aed3099e557d7096ac05b532415795e1b0ac39.tar.gz
wm-30aed3099e557d7096ac05b532415795e1b0ac39.zip
BAR ACTUALLY KIS THE CORRECT COLOR NOW!!1 1
im an idiot :D
-rw-r--r--config/config.go1
-rw-r--r--main.go28
2 files changed, 2 insertions, 27 deletions
diff --git a/config/config.go b/config/config.go
index 9539280..c8f58f6 100644
--- a/config/config.go
+++ b/config/config.go
@@ -2,6 +2,7 @@ package config
var BarHeight uint16 = 20
var GapSize int = 10
+var BarColor uint32 = 0x000000
// commands that get executed on startup
var Startup = []string{"notify-send hello world!"}
diff --git a/main.go b/main.go
index c4f6905..373e87c 100644
--- a/main.go
+++ b/main.go
@@ -481,24 +481,6 @@ func switchTags(conn *xgb.Conn, tags BitMask) {
updateWindows(conn)
}
-func switchTagsNew(conn *xgb.Conn, tags BitMask) {
- GlobalTags = tags
- // master := nil
- // unmap everything
- //
- for _, client := range clients {
- xproto.UnmapWindow(conn, client.Win)
- if client.Tags >= tags && client.MasterTags != tags {
- client.MasterTags = tags
- master := client
- }
- }
-
- updateNew(conn, master)
-
- // find and map master window -> map next until next == nil
-}
-
func tileVertical(conn *xgb.Conn) {
screen := xproto.Setup(conn).DefaultScreen(conn)
screenWidth := int(screen.WidthInPixels)
@@ -647,10 +629,9 @@ func createBar(conn *xgb.Conn) {
root := screen.Root
// create the window
- // TODO: make this actually black and not green for some reason :D
cw := []uint32{
+ config.BarColor, // should be black background
xproto.EventMaskExposure, // redraw on expose
- uint32(0x00000000), // "black" background (its green)
}
barWindow, _ = xproto.NewWindowId(conn)
@@ -725,13 +706,6 @@ func getWindowTitle(conn *xgb.Conn, win xproto.Window) string {
return string(prop.Value)
}
-func updateNew(conn *xgb.Conn, client Client) {
- xproto.MapWindow(conn, client.Win)
- if client.Next != nil {
- updateNew(conn, *client.Next)
- }
-}
-
func updateWindows(conn *xgb.Conn) {
ActiveClients = ActiveClients[:0]
for _, client := range clients {