Advertisement
daddy_jones

SFWBar config

Apr 13th, 2024
1,015
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
CSS 6.17 KB | None | 0 0
  1. # Override gtk theme
  2. # theme = "Adwaita-dark"
  3. # Override gtk icon theme
  4. # IconTheme = "Adwaita"
  5.  
  6. Set Term = "alacritty"
  7.  
  8. # Window Placer
  9. placer {
  10.   xorigin = 5  # place the first window at X% from the left
  11.   yorigin = 5  # place the first window at X% from the top
  12.   xstep = 5    # step by X% of desktop horizontally
  13.   ystep = 5    # step by X% of desktop vertically
  14.   children = true
  15. }
  16.  
  17. # Task Switcher
  18. switcher {
  19.   interval = 700
  20.   icons = true
  21.   labels = false
  22.   cols = 5
  23. }
  24.  
  25. function("SfwbarInit") {
  26.   SetBarId "bar-0"
  27.   SetLayer "top"
  28.   SetExclusiveZone "auto"
  29.   SetMonitor "eDP-1"
  30.   SetBarSize "80%"
  31. #  SetBarSize "bar1","800"
  32.   SetMirror "*"
  33. }
  34.  
  35. include("winops.widget")
  36.  
  37. # Panel layout
  38.  
  39. layout "sfwbar" {
  40.  ##  include("startmenu.widget")
  41.   include("showdesktop.widget")
  42.  
  43.   taskbar {
  44.     rows = 1
  45.     group = true
  46.     group cols = 1
  47.     group style = "taskbar_group"
  48.     group labels = true
  49.     group icons = true
  50.     icons = true
  51.     labels = false
  52.     action[3] = Menu "winops"
  53.     ## filter=output
  54.   }
  55.  
  56.   label { css = "* { -GtkWidget-hexpand: true; min-height: 28px; }" }
  57.  
  58.   tray {
  59.     rows = 1
  60.   }
  61.  
  62. #  include("battery-svg.widget")
  63.    include("bluez.widget")
  64. # include("rfkill-wifi.widget")
  65. # include("rfkill-bt.widget")
  66.   include("network-module.widget")
  67. # Select pulse-module or alsa-module based on your sound configuration
  68.   include("pulse-module.widget")
  69. # include("alsa-module.widget")
  70.    include("mpd-intmod.widget")
  71.    include("sway-lang.widget")
  72.  
  73.   Label {
  74.   Value = Str(NetStat("rxrate") / 1024 / 1024) + " Mbps"
  75.   Css = "* { min-width: 100px; }"
  76.   }
  77.  
  78.   grid {
  79.     css = "* { -GtkWidget-direction: bottom; padding: 5px; padding-left: 0px; }"
  80.     label {
  81.       value = Time("%k:%M")
  82.       style ="clock"
  83.     }
  84.     label {
  85.       value = Time("%x")
  86.       style ="clock"
  87.     }
  88.   }
  89. }
  90.  
  91. #CSS
  92. @define-color theme_bg_color #353231;
  93. @define-color theme_fg_color #d1d1d1;
  94. @define-color theme_text_color #d1d1d1;
  95. @define-color borders #777777;
  96.  
  97. window {
  98.   -GtkWidget-direction: bottom;
  99.   background-color: #353231;
  100. }
  101.  
  102. label {
  103.   font: 12px sans;
  104.   color: @theme_text_color;
  105.   text-shadow: none;
  106. }
  107.  
  108. button,
  109. button image {
  110.   outline-style: none;
  111.   box-shadow: none;
  112.   background-image: none;
  113.   border-image: none;
  114. }
  115.  
  116. window#taskbar_group {
  117.   background-color: RGBA(0.2,0.2,0.2,0.5);
  118. }
  119.  
  120. #hidden {
  121.   -GtkWidget-visible: false;
  122. }
  123.  
  124. button#taskbar_group_normal,
  125. button#taskbar_group_normal:hover,
  126. button#taskbar_group_active {
  127.   margin: 0px;
  128.   border: 0px;
  129.   border-radius: 0px;
  130.   -GtkWidget-valign: center;
  131. }
  132.  
  133. button#taskbar_group_normal image,
  134. button#taskbar_group_normal:hover image,
  135. button#taskbar_group_active image {
  136.   min-height: 30px;
  137.   min-width: 30px;
  138.   margin: 0px;
  139. }
  140.  
  141. button#taskbar_group_active {
  142.   background-color: #493B41;
  143. }
  144.  
  145. button#taskbar_normal:hover,
  146. button#taskbar_group_normal:hover,
  147. button#taskbar_group_active:hover {
  148.   background-color: #535353;
  149. }
  150.  
  151. button#taskbar_normal grid {
  152.   padding-right: 0px;
  153.   margin-right: 0px;
  154.   min-height: 0px;
  155. }
  156.  
  157. button#taskbar_normal image,
  158. button#taskbar_active image,
  159. button#taskbar_normal:hover image {
  160.   min-width: 18px;
  161.   min-height: 18px;
  162. }
  163.  
  164. button#taskbar_normal label,
  165. button#taskbar_active label,
  166. button#taskbar_normal:hover label {
  167.   -GtkWidget-hexpand: true;
  168.   -GtkWidget-halign: start;
  169.   padding: 0px 7px 0px 0px;
  170. }
  171.  
  172. button#taskbar_normal,
  173. button#taskbar_active,
  174. button#taskbar_normal:hover {
  175.   border-radius: 0;
  176.   border: 0px;
  177.   box-shadow: none;
  178.   -GtkWidget-hexpand: false;
  179.   -GtkWidget-vexpand: false;
  180.   min-height: 0px;
  181.   background-color: #535353;
  182. }
  183.  
  184. button#taskbar_active {
  185.   background-color: #646464;
  186. }
  187.  
  188.  
  189. button#taskbar_normal:hover {
  190.   background-color: #646464;
  191. }
  192.  
  193. #menu_item,
  194. #menu_item *,
  195. #menu_item image,
  196. #menu_item label {
  197.   -GtkWidget-halign: start;
  198.   color: white;
  199. }
  200.  
  201. #menu_item image {
  202.   min-width: 16px;
  203.   min-height: 16px;
  204.   padding-right: 2px;
  205. }
  206.  
  207. menu {
  208.   background-color: #353231;
  209. }
  210.  
  211. menu arrow {
  212.   background: none;
  213. }
  214.  
  215. button#pager_normal,
  216. button#pager_visible,
  217. button#pager_focused {
  218.   padding: 0px 5px 0px 5px;
  219.   border-radius: 0;
  220. }
  221.  
  222. button#pager_focused {
  223.   background-color: #bbddff;
  224. }
  225.  
  226. button#pager_preview {
  227.   border-radius: 0;
  228.   border-color: #000000;
  229.   border-width: 0.25mm;
  230.   color: #777777;
  231.   min-width: 5cm;
  232.   min-height: 2.8125cm;
  233. }
  234.  
  235. grid#pager {
  236.   outline-color: #000000;
  237.   outline-style: dashed;
  238.   outline-width: 0.25mm;
  239. }
  240.  
  241. grid#switcher_active image,
  242. grid#switcher_active {
  243.   min-width: 50px;
  244.   min-height: 50px;
  245.   padding: 5px;
  246.   background-color: #646464;
  247.   border-radius: 5px;
  248.   -GtkWidget-hexpand: true;
  249. }
  250.  
  251. grid#switcher_normal image,
  252. grid#switcher_normal {
  253.   min-width: 50px;
  254.   min-height: 50px;
  255.   padding: 5px;
  256.   -GtkWidget-direction: right;
  257.   -GtkWidget-hexpand: true;
  258. }
  259.  
  260. window#switcher {
  261.   border: 1px solid @borders;
  262.   border-radius: 5px;
  263.   padding: 5px;
  264.   -GtkWidget-hexpand: true;
  265. }
  266.  
  267. grid#switcher {
  268.   border-radius: 5px;
  269.   padding: 5px;
  270.   -GtkWidget-hexpand: true;
  271. }
  272.  
  273. button#tray_active,
  274. button#tray_passive,
  275. button#tray_attention {
  276.   border: 0px;
  277.   margin: 0px;
  278.   border-radius: 0px;
  279. }
  280.  
  281. button#tray_passive {
  282.   -GtkWidget-visible: false;
  283. }
  284.  
  285. button#tray_active label,
  286. button#tray_passive label,
  287. button#tray_attention label {
  288.   padding: 1px;
  289.   color: @theme_text_color;
  290. }
  291.  
  292. button#tray_active image,
  293. button#tray_passive image,
  294. button#tray_attention image {
  295.   min-width: 18px;
  296.   min-height: 18px;
  297.   -GtkWidget-vexpand: true;
  298.   -GtkWidget-halign: center;
  299.   -GtkWidget-valign: center;
  300. }
  301.  
  302. label#clock {
  303.   color: @theme_text_color;
  304.   -GtkWidget-vexpand: true;
  305.   -GtkWidget-valign: center;
  306.   font-size: 12px;
  307. }
  308.  
  309. label#sway_lang {
  310.   margin-left: 3px;
  311.   margin-right: 5px;
  312. }
  313.  
  314. grid#layout {
  315.   -GtkWidget-direction: right;
  316. }
  317.  
  318. button#module,
  319. button#showdesktop,
  320. button#startmenu {
  321.   margin: 0px;
  322.   border: 0px;
  323.   border-radius: 0px;
  324.   min-height: 18px;
  325.   min-width: 18px;
  326.   -GtkWidget-valign: center;
  327.   -GtkWidget-vexpand: true;
  328.   padding: 0px 3px 0px 3px;
  329. }
  330.  
  331. button#startmenu,
  332. button#showdesktop {
  333.   min-width: 24px;
  334.   min-height: 24px;
  335. }
  336.  
  337. * {
  338.   color: #ffffff;
  339. }
  340.  
Tags: sfwbar
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement