September 5, 2015 Switching to XFCE

Translation: ru

I really like Gnome 3 for its look and feel. In fact I've been using Gnome since at least version 1.2, when it came with Enlightenment for a window manager. However after recent update to Fedora 22 I've found several things in it to be just too annoying. Namely, sometimes it starts to use 100% of one of CPU cores, sometimes extensions get spontaneously unloaded, some extensions are never being updated for current Gnome versions, GDM is always running, etc. All these things compelled me to switch to something lighter and less complex.

I've already been using xfce4-panel in a sidebar mode along with Gnome Shell, so XFCE was the natural place for me to move. Here I tried to recreate familiar environment which resulted in the following layout:

top running in gnome-terminal and Midnight Commander with xoria256 theme running in xterm

top running in gnome-terminal and Midnight Commander with xoria256 theme running in xterm

another couple of screenshots and a bunch of patches

Ceti-2 GTK theme and the list of applets on the top panel

Ceti-2 GTK theme and the list of applets on the top panel

The theme is Ceti-2 slightly tweaked to reduce padding on tabs and to change panel fonts:

diff -u -r Ceti-2.orig/gtk-2.0/gtkrc Ceti-2/gtk-2.0/gtkrc
--- Ceti-2.orig/gtk-2.0/gtkrc       2015-09-05 23:07:25.158255238 +0600
+++ Ceti-2/gtk-2.0/gtkrc    2015-09-04 00:10:27.000000000 +0600
@@ -16,7 +16,7 @@
   GtkWidget::focus-line-width = 1
   GtkMenuBar::window-dragging = 1
   GtkToolbar::window-dragging = 1
-  GtkToolbar::internal-padding = 4
+  GtkToolbar::internal-padding = 0
   GtkToolButton::icon-spacing = 4

   GtkWidget::tooltip-radius = 2
diff -u -r Ceti-2.orig/gtk-2.0/panel.rc Ceti-2/gtk-2.0/panel.rc
--- Ceti-2.orig/gtk-2.0/panel.rc    2015-09-05 23:05:12.411546816 +0600
+++ Ceti-2/gtk-2.0/panel.rc 2015-08-31 22:41:08.000000000 +0600
@@ -1,6 +1,9 @@
+gtk-icon-sizes = "panel-tasklist-menu=64,64"
+
 style "theme-panel" {

   ythickness = 0
+  font_name = "RobotoAC Bold 9"

   bg[NORMAL] = "#2D3136"
   bg[ACTIVE] = shade(0.9, "#2D3136")
@@ -44,6 +47,8 @@

 style "panelbuttons" {

+  font_name = "RobotoAC Bold Condensed 10"
+
   xthickness = 4
   ythickness = 3

@@ -55,6 +60,8 @@
     gradient_shades = {1.0,0.9,0.9,0.8}
     border_shades = { 0.6, 0.6 }
   }
+
+  XfceTasklist::max-button-size = 32
 }

 style "theme-panel-text" {

With the above internal-padding fix the toolbar and editor tabs of Eclipse look almost normal.

maximized and undecorated window of Eclipse with almost normally sized tabs

maximized and undecorated window of Eclipse with almost normally sized tabs

The font on the panels and the widow titles is Google's Roboto manually (using fontforge) converted to all-caps variant. The modified versions can be found here.

I had to change some of the applets' code for nicer looks: added padding to hardware monitors, changed color/font of keyboard indicators, made volume icon white instead of dark grey. Maybe some of these things are themeable but at least some of the fonts and colors are hardcoded so patching the code was inevitable. I've basically changed one hardcoded values for others so the code is still ugly but at least the applets now fit with my theme visually:

diff -u -r xfce4-kbdleds-plugin-0.0.6.orig/panel-plugin/kbdleds.c xfce4-kbdleds-plugin-0.0.6/panel-plugin/kbdleds.c
--- xfce4-kbdleds-plugin-0.0.6.orig/panel-plugin/kbdleds.c  2011-10-13 22:51:23.000000000 +0700
+++ xfce4-kbdleds-plugin-0.0.6/panel-plugin/kbdleds.c       2015-09-01 00:07:03.000966168 +0600
@@ -220,7 +220,7 @@
 gboolean kbdleds_update_state(gpointer data) {
     int i;
     gchar *str;
-    gchar *template_on="<span background=\"#00ff00\" foreground=\"#000000\">%c</span>";
+    gchar *template_on="<span background=\"#ffffff\" foreground=\"#000000\">%c</span>";
     gchar *template_off="%c";
     gchar *tempstr[NUM_LEDS];
     gchar *templates[NUM_LEDS];
diff -u -r xfce4-pulseaudio-plugin-0.2.3.orig/panel-plugin/pulseaudio-button.c xfce4-pulseaudio-plugin-0.2.3/panel-plugin/pulseaudio-button.c
--- xfce4-pulseaudio-plugin-0.2.3.orig/panel-plugin/pulseaudio-button.c     2015-05-04 02:52:14.000000000 +0600
+++ xfce4-pulseaudio-plugin-0.2.3/panel-plugin/pulseaudio-button.c  2015-09-01 20:18:10.908803274 +0600
@@ -137,7 +137,7 @@

   /* Setup Gtk style */
   css_provider = gtk_css_provider_new ();
-  gtk_css_provider_load_from_data (css_provider, "#pulseaudio-button { -GtkWidget-focus-padding: 0; -GtkWidget-focus-line-width: 0; -GtkButton-default-border: 0; -GtkButton-inner-border: 0; padding: 1px; border-width: 1px;}", -1, NULL);
+  gtk_css_provider_load_from_data (css_provider, "#pulseaudio-button { -GtkWidget-focus-padding: 0; -GtkWidget-focus-line-width: 0; -GtkButton-default-border: 0; -GtkButton-inner-border: 0; padding: 1px; border-width: 1px; color: #ffffff; }", -1, NULL);
   gtk_style_context_add_provider (GTK_STYLE_CONTEXT (gtk_widget_get_style_context (GTK_WIDGET (button))), GTK_STYLE_PROVIDER (css_provider), GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);

   /* Intercept scroll events */
diff -u -r xfce4-xkb-plugin-0.7.1.orig/panel-plugin/xkb-cairo.c xfce4-xkb-plugin-0.7.1/panel-plugin/xkb-cairo.c
--- xfce4-xkb-plugin-0.7.1.orig/panel-plugin/xkb-cairo.c    2015-02-28 03:53:11.000000000 +0600
+++ xfce4-xkb-plugin-0.7.1/panel-plugin/xkb-cairo.c 2015-09-01 21:20:52.883016118 +0600
@@ -31,7 +31,7 @@
 #include <librsvg/rsvg-cairo.h>
 #endif

-#define XKB_PREFERRED_FONT "Courier New, Courier 10 Pitch, Monospace Bold"
+#define XKB_PREFERRED_FONT "RobotoAC Bold 9"

 #define xkb_cairo_arc_for_flag(cr, x, y, r, a1, a2) \
     xx = layoutx + width - 12 + x; \

I've also patched xfce4-panel itself to allow wider sidebar and bigger tasklist icons:

diff -u -r xfce4-panel-4.12.0.orig/panel/panel-itembar.c xfce4-panel-4.12.0/panel/panel-itembar.c
--- xfce4-panel-4.12.0.orig/panel/panel-itembar.c   2014-04-25 03:16:37.000000000 +0700
+++ xfce4-panel-4.12.0/panel/panel-itembar.c        2015-08-23 17:19:45.000000000 +0600
@@ -193,7 +193,7 @@
                                    PROP_SIZE,
                                    g_param_spec_uint ("size",
                                                       NULL, NULL,
-                                                      16, 128, 30,
+                                                      16, 256, 30,
                                                       EXO_PARAM_WRITABLE));

   g_object_class_install_property (gobject_class,
diff -u -r xfce4-panel-4.12.0.orig/panel/panel-preferences-dialog.glade xfce4-panel-4.12.0/panel/panel-preferences-dialog.glade
--- xfce4-panel-4.12.0.orig/panel/panel-preferences-dialog.glade    2015-02-27 02:32:17.000000000 +0600
+++ xfce4-panel-4.12.0/panel/panel-preferences-dialog.glade 2015-08-23 16:21:07.000000000 +0600
@@ -73,7 +73,7 @@
     <object class="GtkAdjustment" id="size">
     <property name="value">16</property>
     <property name="lower">16</property>
-    <property name="upper">128</property>
+    <property name="upper">256</property>
     <property name="step_increment">1</property>
     <property name="page_increment">10</property>
   </object>
diff -u -r xfce4-panel-4.12.0.orig/panel/panel-preferences-dialog-ui.h xfce4-panel-4.12.0/panel/panel-preferences-dialog-ui.h
--- xfce4-panel-4.12.0.orig/panel/panel-preferences-dialog-ui.h     2015-02-28 22:22:40.000000000 +0600
+++ xfce4-panel-4.12.0/panel/panel-preferences-dialog-ui.h  2015-08-23 16:21:22.000000000 +0600
@@ -28,7 +28,7 @@
   "id=\"0\" translatable=\"yes\">Background image</col></row></data></obje"
   "ct><object class=\"GtkAdjustment\" id=\"size\"><property name=\"value\""
   ">16</property><property name=\"lower\">16</property><property name=\"up"
-  "per\">128</property><property name=\"step_increment\">1</property><prop"
+  "per\">256</property><property name=\"step_increment\">1</property><prop"
   "erty name=\"page_increment\">10</property></object><object class=\"GtkA"
   "djustment\" id=\"length\"><property name=\"value\">25</property><proper"
   "ty name=\"lower\">1</property><property name=\"upper\">100</property><p"
diff -u -r xfce4-panel-4.12.0.orig/panel/panel-window.c xfce4-panel-4.12.0/panel/panel-window.c
--- xfce4-panel-4.12.0.orig/panel/panel-window.c    2015-02-28 20:52:27.000000000 +0600
+++ xfce4-panel-4.12.0/panel/panel-window.c 2015-08-23 17:19:38.000000000 +0600
@@ -392,7 +392,7 @@
   g_object_class_install_property (gobject_class,
                                    PROP_SIZE,
                                    g_param_spec_uint ("size", NULL, NULL,
-                                                      16, 128, 48,
+                                                      16, 256, 48,
                                                       EXO_PARAM_READWRITE));

   g_object_class_install_property (gobject_class,
diff -u -r xfce4-panel-4.12.0.orig/plugins/tasklist/tasklist-widget.c xfce4-panel-4.12.0/plugins/tasklist/tasklist-widget.c
--- xfce4-panel-4.12.0.orig/plugins/tasklist/tasklist-widget.c      2015-02-27 02:32:17.000000000 +0600
+++ xfce4-panel-4.12.0/plugins/tasklist/tasklist-widget.c   2015-09-05 22:35:33.794372013 +0600
@@ -46,7 +46,7 @@

 #define DEFAULT_BUTTON_SIZE          (25)
 #define DEFAULT_MAX_BUTTON_LENGTH    (200)
-#define DEFAULT_MENU_ICON_SIZE       (16)
+#define DEFAULT_MENU_ICON_SIZE       (32)
 #define DEFAULT_MIN_BUTTON_LENGTH    (DEFAULT_MAX_BUTTON_LENGTH / 4)
 #define DEFAULT_ICON_LUCENCY         (50)
 #define DEFAULT_ELLIPSIZE_MODE       (PANGO_ELLIPSIZE_END)
@@ -2449,7 +2449,7 @@
     return;

   /* get the window icon */
-  if (tasklist->show_labels)
+  if (0 && tasklist->show_labels)
     pixbuf = wnck_window_get_mini_icon (window);
   else
     pixbuf = wnck_window_get_icon (window);
@@ -3495,7 +3495,7 @@
     return;

   /* get the class group icon */
-  if (group_child->tasklist->show_labels)
+  if (0 && group_child->tasklist->show_labels)
     pixbuf = wnck_class_group_get_mini_icon (class_group);
   else
     pixbuf = wnck_class_group_get_icon (class_group);

All in all, I'm quite pleased with the results. Here's the before picture (running Gnome 3) for comparison:

gnome-shell with similar customizations

gnome-shell with similar customizations

It's not a whole lot different from the after version but that was the whole point.