Virtual desktop underlay for Wayland and X11
git clone https://github.com/m-col/xanadu
Files | Refs | Readme | License

Commit 9a226015aef13362d5bfa0977f04af6467f13909
Parent: f4f8927474e0be15d87cda2e022e6b6036a3fdc3
Author: mcol <mcol@posteo.net>
Date: 2021-11-03 00:05:37 +0000
Committer: mcol <mcol@posteo.net>
Committed: 2021-11-03 00:07:49 +0000

Add more styles to example style.css

style.css Modified

@@ -1,3 +1,36 @@
+/* Styling for xanada desktop metaphor
+ *
+ * GUI elements can be styled using GTK's CSS. The core widget inside the window
+ * is an icon view, and everything else is a child of that. For options, see:
+ * https://developer-old.gnome.org/gtk3/stable/chap-css-properties.html
+ */
+
+/* Make the main window background transparent */
 window,iconview {
     background-color: transparent;
 }
+
+/* Style the selected icon */
+.view:selected {
+    background-color: #15539e;
+    border-radius: 3px;
+    outline-style: none;
+}
+
+/* Style the selection rubberband */
+rubberband {
+    border: 1px solid #0f3b71;
+    background-color: rgba(15, 59, 113, 0.3);
+}
+
+/* Other styling ideas */
+/*
+iconview {
+    padding: 3px;
+}
+
+.view:selected {
+    background-color: unset;
+    border: 1px solid #0f3b71;
+}
+*/

src/Style.hs Modified

@@ -38,7 +38,7 @@
     Gtk.styleContextAddProviderForScreen screen cssProvider 800
 
     -- Default CSS
-    Gtk.cssProviderLoadFromData cssProvider "* { background-color: transparent; }"
+    Gtk.cssProviderLoadFromData cssProvider "window,iconview { background-color: transparent; }"
 
     -- Custom CSS
     configDir <- getConfigDir