Linux User Group of Mauritius Promoting open source software in our beautiful island

22Mar/160

Customizing the GNOME Shell

Posted by Ish

A couple of weeks back I was customizing the GNOME Shell on my openSUSE Tumbleweed laptop by tinkering with the CSS files of the desktop theme. A colleague of mine who peeked onto my screen at that moment, as he needed to show me something, nudged at the ugly rounded-corner buttons he saw on the taskbar. To be precise that was the “window list” that he saw, an extension that can be installed from gnome.org.

I told him it only requires editing the Cascading Style Sheet (CSS) of the extension, which could be found at /usr/share/gnome-shell/extensions/window-list@gnome-shell-extensions.gcampax.github.com, to adapt it to the desktop theme and make it more appealing. In fact, it did not take long to realize that removing the border-radius and the box-shadow actually blended the button better with the theme.

GNOME 3 - GNOME Shell, window list

.window-button > StWidget {
  -st-natural-width: 18.75em;
  max-width: 18.75em;
  color: #bbb;
  background-color: #393f3f;
  /* border-radius: 1px; */
  padding: 3px 6px 1px;
  /* box-shadow: inset 1px 1px 4px rgba(255,255,255,0.5); */
  text-shadow: 1px 1px 4px rgba(0,0,0,0.8);
}

He then pointed to title bar of the Firefox window and said “see, this thickness of the title bar makes it waste space.”

I looked at the window and replied “yeah, indeed but those should be configurable in some CSS file lying around.”

I then got back to work. Today, however, I looked at the title bar again and thought of reducing it’s size. A few hacks have been proposed by people who wished to achieve the same. The best proposal I saw was configuring through the gtk.css file rather than editing the individual theme files. If you do not find the gtk.css file, then create one ~/.config/gtk-3.0/gtk.css.

.header-bar.default-decoration {
    padding-top: 3px;
    padding-bottom: 3px;
}

.header-bar.default-decoration .button.titlebutton {
    padding-top: 2px;
    padding-bottom: 2px;
}

Adjust the padding value to get the desired result. The above gave me a slimmer title bar that would not waste space as before.

GNOME 3, GNOME Shell, window title bar

The post Customizing the GNOME Shell appeared first on HACKLOG.

Tagged as: No Comments
20Mar/160

Build a personal wiki using Vim

Posted by Ish

I used to have random notes in text files scattered on the disk. Then I tried being an organized person by using things like Google Docs… but, after some time I would find myself coming back to the simple text editor when in need of quick notes. On my openSUSE laptop I would either fire up Gedit or if the terminal is already open I’d use Vim.

A few days ago while searching for some packages in the openSUSE repo, I came across the vim-plugin-vimwiki package for Vim. It turned out to be a handy plugin for the Vim text editor.

sudo zypper in vim-plugin-vimwiki

At next launch of Vim, type ww and press “enter” to start the wiki.

gVim text editor

Screenshot of gVim

A folder named “vimwiki” will be created in the home directory of the user. For example for the user “ish”, the following message will appear upon typing ww:

Vimwiki: Make new directory: /home/ish/vimwiki
 [Y]es/[n]o?

A first blank file named “index.wiki” will be created in the “vimwiki” directory. The wiki has support for links, which are created using double brackets, e.g [[Hello Wiki]]. The text between the brackets become click-able and the file “~/vimwiki/Hello Wiki.wiki” is created.

Vim Wiki links

One can navigate through the pages by pressing “enter” while the cursor is on the “link text” and using the backspace button to go to the previous page.

What about existing text files?

The existing text files can be renamed with a .wiki extension and moved to the vimwiki directory. Then use the double brackets to link to that file.

I find the Vim Wiki being a simple & effective solution to take quick (re-usable) notes in an organized manner. Surely other solutions exist but at the moment I’d stick to Vim Wiki.

The post Build a personal wiki using Vim appeared first on HACKLOG.

Tagged as: No Comments