Desktop

Many settings formerly present in this website’s index are related to my desktop settings, while some others are not.

Theme and graphical tweaks

GTK Settings

GTK2

  1. General configuration

    This file is tangled at $HOME/.config/gtk-2.0/gtkrc. This is an equivalent for the GTK3 configuration file you will see below, and it shares most of its settings. First, let’s select the Nordic theme for GTK2. Let’s also set the icon theme.

    # -*- mode: unix-config -*-
    gtk-theme-name="Nordic"
    gtk-icon-theme-name="Flat-Remix-Dark"
    
    gtk-xft-antialias=1
    gtk-xft-hinting=1
    gtk-xft-hintstyle="hintslight"
    

    This changes the shortcuts in menu, let’s also make the menus snappier.

    gtk-can-change-accels=1
    gtk-menu-bar-popup-delay=0
    gtk-menu-popdown-delay=0
    gtk-menu-popup-delay=0
    
  2. Filechooser

    [Filechooser Settings]
    

    The first option allows me to open the file chooser in the current working directory:

    StartupMode=cwd
    

    Next, setting the location mode to path-bar will show the path as buttons that can be clicked rather than the full path.

    LocationMode=path-bar
    

    With this configuration, by default we won’t see hidden files.

    ShowHidden=true
    

    And we’ll also see the size of the visible files.

    ShowSizeColumn=true
    

    Now, let’s choose the geometry of our file picker. These two first lines set where the file picker appears:

    GeometryX=566
    GeometryY=202
    

    And these two describe the size of the window:

    GeometryWidth=800
    GeometryHeight=400
    

    With these two lines, we set how our files are sorted: by name, and in the ascending order.

    SortColumn=name
    SortOrder=ascending
    

    Our default view mode is a list of files:

    ViewMode=list-view
    

    And finally, setting our icon view scale to -1 sets the icon view to the max size.

    IconViewScale=-1
    

GTK3

The following file helps me to choose the aspect of various GTK+ 3 software, including their theme and icons. First, let’s declare the header:

[Settings]

Now, let’s hint to GTK that I prefer dark themes. This can have an influence also on some websites that can detect this preference and therefore set their own theme to dark by themselves.

gtk-application-prefer-dark-theme = true

Next, the icon theme is the Flat Remix Dark icon theme:

gtk-icon-theme-name = Nordzy

Now, the general theme for GTK3 is Nordic.

gtk-theme-name = Nordic
gtk-can-change-accels=1
gtk-menu-bar-popup-delay=0
gtk-menu-popdown-delay=0
gtk-menu-popup-delay=0
gtk-xft-antialias=1
gtk-xft-hinting=1
gtk-xft-hintstyle=hintslight
# gtk-xft-rgba=rgb

Since window decorations are handled by my WMs, I will leave this variable empty.

gtk-decoration-layout=

Xresources

The main body in my Xresources declaration is the declaration of my colour theme. It is based on the Nordopen in new window theme, from their Git repositoryopen in new window.

#define nord0 #2E3440
#define nord1 #3B4252
#define nord2 #434C5E
#define nord3 #4C566A
#define nord4 #D8DEE9
#define nord5 #E5E9F0
#define nord6 #ECEFF4
#define nord7 #8FBCBB
#define nord8 #88C0D0
#define nord9 #81A1C1
#define nord10 #5E81AC
#define nord11 #BF616A
#define nord12 #D08770
#define nord13 #EBCB8B
#define nord14 #A3BE8C
#define nord15 #B48EAD

*.foreground:   nord4
*.background:   nord0
*.cursorColor:  nord4
*fading: 35
*fadeColor: nord3

*.color0: nord1
*.color1: nord11
*.color2: nord14
*.color3: nord13
*.color4: nord9
*.color5: nord15
*.color6: nord8
*.color7: nord5
*.color8: nord3
*.color9: nord11
*.color10: nord14
*.color11: nord13
*.color12: nord9
*.color13: nord15
*.color14: nord7
*.color15: nord6

Email signature

This file gets inserted automatically at the end of my emails.

Lucien “Phundrak” Cartier-Tilet
https://phundrak.com (Français)
https://phundrak.com/en (English)
Sent from GNU/Emacs

.desktop files for custom applications

Some software I use are not packaged (yet) on my system. Therefore, in order to make them available in rofi, I need to write a .desktop file to launch them.

Emacs

Emacs does have a default .desktop file, but I want to override it to just “open with Emacs” from other software (such as Nemo) and it will open with emacsclient instead of just emacs.

[Desktop Entry]
Name=Emacs
GenericName=Text Editor
Comment=Edit text
MimeType=text/english;text/plain;text/x-makefile;text/x-c++hdr;text/x-c++src;text/x-chdr;text/x-csrc;text/x-java;text/x-moc;text/x-pascal;text/x-tcl;text/x-tex;application/x-shellscript;text/x-c;text/x-c++;
Exec=emacsclient -c %F
Icon=emacs
Type=Application
Terminal=false
Categories=Development;TextEditor;
StartupWMClass=Emacs
Keywords=Text;Editor;

I also have mu4e.desktop which is used to set my default email client. It relies on emacsmail defined in this document.

[Desktop Entry]
Name=Mu4e
GenericName=Mu4e
Comment=Maildir Utils for Emacs
MimeType=x-scheme-handler/mailto;
Exec=/home/phundrak/.local/bin/emacsmail %U
Icon=emacs
Type=Application
Terminal=false
Categories=Network;Email;TextEditor
StartupWMClass=Gnus
Keywords=Text;Editor;

Then I also have org-protocol.desktop that helps capture elements from other software, mainly web pages from Firefox through the org-capture extensionopen in new window.

[Desktop Entry]
Name=org-protocol
Exec=emacsclient %u
Type=Application
Terminal=false
Categories=System;
MimeType=x-scheme-handler/org-protocol;

FlowScape

FlowScapeopen in new window is a nice 3D compositing software I sometimes use to create landscapes. I always install it in ~/.local/opt/Flowscape, so the .desktop file is relatively straightforward.

[Desktop Entry]
Version=1.5
Name=FlowScape
Comment=Create gorgeous 3D landscapes with ease.
Exec=/usr/bin/prime-run /home/phundrak/.local/opt/FlowScape/FlowScape.x86_64
Path=/home/phundrak/.local/opt/FlowScape
Icon=/home/phundrak/.local/opt/FlowScape/icon.jpg
Terminal=false
Type=Application
Categories=Graphics

macOS

You did not read wrong! Yes I have an entry for macOS, but this is for a virtual machine located in ~/VMs/macOS.

[Desktop Entry]
Version=1
Name=macOS
Comment=macOS in a virtual machine
Exec=/usr/bin/prime-run /home/phundrak/VMs/macOS/basic.sh
Path=/home/phundrak/VMs/macOS
Icon=/home/phundrak/VMs/macOS/macOS.png
Terminal=false
Type=Application
Categories=Development

Minecraft

Yup, I play Minecraft. And yes, it does have a default .desktop file, but this one overrides it to launch automatically Minecraft with prime-runopen in new window, using my Nvidia GPU instead of my integrated GPU.

[Desktop Entry]
Type=Application
Version=1.0
Name=Minecraft Launcher (Nvidia)
Comment=Official Minecraft Launcher
Exec=/usr/bin/prime-run /usr/bin/minecraft-launcher
Path=/usr/bin/
Icon=minecraft-launcher
Terminal=false
Categories=Game;Application;

OtherWorldMapper

OtherWorldMapper is a map creation software. It is always installed in ~/.local/opt/OtherWorldMapper.

[Desktop Entry]
Version=1.0.4
Name=OtherWorldMapper
Comment=OtherWorldMapper is a powerful yet intuitive fantasy map creation tool.
Exec=/usr/bin/prime-run /home/phundrak/.local/opt/OtherWorldMapper/OWM
Path=/home/phundrak/.local/opt/OtherWorldMapper
Icon=/home/phundrak/.local/opt/OtherWorldMapper/owm.ico
Terminal=false
Type=Application
Categories=Graphics

Plover

[Desktop Entry]
Version=4.0.0-rc2
Name=Plover
Comment=Free, opensource stenography engine by the Open Steno Project
Exec=/home/phundrak/.local/bin/plover
Path=/home/phundrak/.local/bin/plover
Terminal=false
Type=Application

YouTube .desktop files

The first .desktop file related to YouTube is ytdl.desktop which runs ytdl defined in this document.

[Desktop Entry]
Version=0.3
Name=YTDL
Comment=YouTube (and more) video downloader
Exec=/home/phundrak/.local/bin/rofi-ytdl
Path=/home/phundrak/.local/bin
Terminal=false
Type=Application
Categories=Network;Video

There is also ytplay.desktop for ytplay defined in this document.

[Desktop Entry]
Type=Application
Version=1.0
Name=ytplay (YouTube in mpv)
Comment=Play YouTube videos in mpv
Exec=/home/phundrak/.local/bin/ytplay
Path=/home/phundrak/.local/bin
Terminal=false
Categories=Media