Why do we rice?
I. Aesthetics
We want to add style to generic, default desktops and create something pleasant to work in.
II. Efficiency
We want to improve how we work with our desktops so we can achive higher productivity.
III. Comfort
We want to work in an environment that is comfortable and relaxing.
IV. Fun
We rice our interfaces because we can and because it's fun!
How do we rice?
Welcome, young grasshopper.
Unfortunately, this is not the time nor place to give you a lecture on how to rice. But keep in mind that only you can develop a taste suited for you. However, it doesn't hurt to find inspiration and some help.
Here are some excellent resources to help you on your journey:
-
/g/wiki - A general GNU/Linux rice guide
-
twily.info - Twily's legendary Openbox set up can be seen here among other things
-
nanami-tan.info - A good resource for Windows ricing
-
urukrama - A comprehensive Openbox guide
-
/r/unixporn - A community dedicated to modifying Unix interfaces
-
wallhaven - A haven filled with wallpapers
-
/g/ - Home to desktop threads and some of the greatest ricers
-
/w/ - Anime wallpapers and dedicated desktop threads
-
/wg/ - Wallpapers and dedicated desktop threads
-
deviantart - Has both Unix and Windows Ricing material
-
digitalvanity - A blog showcasing customised interfaces
-
ricehalla - Teknik's dedicated rice gallery
-
colourlovers - A community dedicated to colours, palletes, and patterns
-
palleton - Create your own palletes!
-
Adobe Color CC - Adobe's colour designer
-
terminal.sexy - A website dedicated to creating terminal colour schemes for various terminal and terminal apps
-
4bit - Another terminal colour scheme designer
Colophon
Using free tools and technologies this site is able to stay afloat. It will never ask for donations, but feel free to donate to the projects below - it's a way of supporting us indirectly.
-
Static Site Generator: Pelican
-
Image Hosting: Pomf
-
Site Hosting: Neocities
-
Version Control: Git
-
CSS Preprocessor: SASS
-
Glue: Python 3.4 & Bash
A Vision
A static image gallery with no database and no server side logic, hosted with free web services, and completely administrated and controlled by a terminal.
For these requirements, I chose Neocities as it offers a free plan with 50 MB of storage. The site will be relatively low-scaling but given that there is no server-side or client-side logics, service static files is quite fast.
As for the gallery, my needs are simple. I needed an index page that gave a view of all desktops, single pages for individual desktops, a tagging system and something that would generate these for me easily. Pelican was my choice, as it is Python-based, used Jinja2 for templates, and I have previous experience with it.
Adminning the site would be entirely done within a terminal, such as adding new content, uploading images, generating thumbnails, generating the entire site and uploading it to our host.
The Workflow
Follow along with this Gist page to see the relevant code.
- Find a desktop screenshot I like
- Generate thumbnails
- Upload images to Pomf
- Add new article entry with appropriate data
- Regenerate the site
- Upload the site to neocities
Steps 2-4 are handled by a shell script, add_desktop.sh
. Adding/Updating desktops is as easy as evoking the command:
$ add_desktop.sh Pictures/screenshot.jpg
Step 5 is simply done by evoking pelican
on the same directory as the pelicanconf.py
to build the site in an output folder. However I wanted to work on the root directory on a day-to-day basis, so I wrote a convinience script:
$ generate_content.sh
Step 6 utilizies curl and the neocities API to deploy entire site in the output
folder.
$ update_neocities.sh
The Work Done
The majority of the work is done by Pelican by editing it's pelicanconf.py. I had to create a separate theme, desktops-theme, for the site. I will not go into detail on making Pelican themes here.
I like writing my CSS in SASS since its easier and it ensures my CSS output is valid.
The site uses Google Fonts for convinience.
Once I find a desktop screenshot I want to display in my gallery, I run the script aptly named add_desktop.sh
. The script has two main functions:
- To upload files to POMF
- Generate a desktop entry with the uploaded image link included in the entry
Along the way I was met with a problem of thumbnails. As it is impractical to load full size images and display them on the front-page (well, nothing wrong with it inherently, just that humans have short attention spans), I had to generate a thumbnail of the screenshot. I used ImageMagick's convert
to convert and crop the images to lessen the file size. If the script detects that the desired screenshot has a safe file extension (jpg, png, gif) it creates a thumbnail of the image and upload's the original file to Pomf.
A special case for animated gifs, I wanted to preseve animations so I wrote a separate convert
just for gifs:
$ convert ${file} -coalesce -strip -quality 75 -thumbnail 531x350^ -gravity Center -extent 531x350 +repage thumb.gif
add.desktop.sh also lets me edit the post data such as tags, who shot the screenshot, source link etc.
After adding a new desktop in the gallery, we must now build our new site. Simply run pelican
in the generator folder.
$ pushd generator ; pelican ; popd
And once that is done we can now upload the site!
Limitations and Future Changes
Uploading to Neocities is quite slow since it only allows one file per payload. The script solves that problem but the API doesn't allow directory creation. For this reason, I had to make the site in one level.
The limitation to update_neocities.sh
is that it cannot create directories and it can't upload subdirectories. Still investigating a way to fix this, since I have to upload the theme folder by hand every time I update the theme.
add_desktops.sh
is limited to three formats, I'd like to support webm in the future.