New laptop part 4: Dracula theme

Monday, February 6, 2023

laptopframeworkdracula

Introduction

One thing I decided to do a bit better than usual with this new latpop is trying to apply the same theme everywhere for consistency. I’ve always preferred dark type of theme, while keeping good color contrast. Over the year, I tried many and very often selecting zenburn. But few years ago, I discoverd the Dracula UI guideline and became very found of it. That’s why this will be the theme applied everywhere I can on this laptop.

A quick screenshot trying to showcase some of it (i3wm, zsh / xfce4-terminal, dunst, roffi, thunar, firefox):

Figure 1: My dracula theme desktop:

Figure 1: My dracula theme desktop:

Applying the Dracula theme

Global note: I clone all related dracula repo within ~/workspace/contrib/dracula, and then symlink or copy depending on the tool to theme. It will be used as $DRACULA_REPOS in this post.

zsh

As discussed in the part 2 of this series, I use zsh. To apply a dracula theme to it:

git clone https://github.com/dracula/zsh.git ~/workspace/contrib/dracula/zsh
ln -s ~/workspace/contrib/dracula/zsh/dracula.zsh-theme ~/.oh-my-zsh/themes/dracula.zsh-theme

Then add in your ~/.zshrc:

ZSH_THEME="dracula"

i3

I detailed at length my i3wm configuration in part 3 of this blog post series, if you are interested. To apply the dracula theme:

Simply paste the content of this in ~/.config/i3/config: https://github.com/dracula/i3/blob/master/.config/i3/config

Gtk (for thunar)

Installed with EndeavourOS, thunar is the default file browser. I’m more than not browsing file in a terminal, but sometime I like having a GUI file browser. And thunar is light and do more than I need from such software. So only thing to do was to dracula-ize it.

git clone https://github.com/dracula/gtk ~/workspace/contrib/dracula/gtk
mkdir -p ~/.local/share/themes
ln -s ~/workspace/contrib/dracula/gtk ~/.local/share/themes/Dracula
# copy old files just in case:
cp ~/.config/gtk-3.0/settings.ini ~/.config/gtk-3.0/settings.ini.endeavouros
cp ~/.config/gtk-4.0/settings.ini ~/.config/gtk-4.0/settings.ini.endeavouros

Then edit ~/.config/gtk-3.0/settings.ini and ~/.config/gtk-4.0/settings.ini to change gtk-theme-name line:

gtk-theme-name=Dracula

tmux

I install tmux plugin via TPM (see post 2 of this series), and there is a Dracula plugin for tmux. To install it, add to your configuration file (in my case ~/.config/tmux/tmux.conf):

set -g @plugin 'dracula/tmux'
set -g @dracula-plugins "time"
set -g @dracula-show-powerline true
set -g @dracula-refresh-rate 60

Adapt the option according to your needs.

And then prefix (ctrl+a) + I to install the new plugin, then tmux source ~/.config/tmux/tmux.conf to reload (if inside tmux, otherwise just launch tmux :)).

xfce4-terminal

Xfce4-terminal is the default terminal emulator with EndeavourOS, never used it before (never used xfce), so I decided to give it a shot… So far, it is nice and fast, so I’m still using it, but after changing its theme to Dracula.

Clone the repo and add it to xfce4-terminal colorschemes directory:

git clone https://github.com/dracula/xfce4-terminal.git ~/workspace/contrib/dracula/xfce4-terminal
mkdir -p ~/.local/share/xfce4/terminal/colorschemes/
ln -s ~/workspace/contrib/dracula/xfce4-terminal/Dracula.theme ~/.local/share/xfce4/terminal/colorschemes/

Then right click in xfce4-terminal to open preferences panel. Go to colors and choose your theme in the list at the bottom.

Dunst

Clone the repo and copy the config file. Be carreful if you had custom config in your dunstrc, make sure you won’t loose anything.

git clone https://github.com/dracula/dunst.git ~/workspace/contrib/dracula/dunst
# preserve EndeavourOS default dunstrc:
mv ~/.config/dunst/dunstrc ~/.config/dunst/dunstrc.endeavouros
ln -s ~/workspace/contrib/dracula/dunst/dunstrc ~/.config/dunst/dunstrc

Emacs

I’m using emacs via doom-emacs, which makes it even simpler to enable dracula theme, by adding in your configuration:

(setq doom-theme 'doom-dracula)

Neomutt

I haven’t talk yet about my neomutt configuration, maybe more on that later, but to configure the theme with Dracula:

git clone https://github.com/dracula/mutt.git ~/workspace/contrib/dracula/mutt
ln -s ~/workspace/contrib/dracula/mutt/dracula.muttrc ~/.config/neomutt/

Then in ~/.config/neomutt/neomuttrc add:

source ~/.config/neomutt/draculatheme/dracula.muttrc

Firefox

Simply search for dracula in about:addons or go there: https://addons.mozilla.org/en-US/firefox/addon/dracula-dark/?utm_source=addons.mozilla.org&utm_medium=referral&utm_content=search

Chromium

Simply search for dracula in chrome://extensions/ or go there: https://chrome.google.com/webstore/detail/dracula-chrome-theme/gfapcejdoghpoidkfodoiiffaaibpaem

Rofi

Same as before, clone the repo and store the file at the right place.

git clone https://github.com/dracula/rofi
cp rofi/theme/config1.rasi ~/.config/rofi/config.rasi

Wallpaper

For fun, I went all the way and decided to use the “official” Dracula wallpaper for EndeavourOS:

Figure 2: Dracula EndeavourOS wallpaper

Figure 2: Dracula EndeavourOS wallpaper

wget https://raw.githubusercontent.com/dracula/wallpaper/master/endeavour.png ~/Images/endeavour.png

Edit ~/.fehbg and change the command to:

feh --no-fehbg --bg-fill '/home/bacardi55/Images/endeavour.os'

But most distro have their “official” Dracula wallpaper: https://github.com/dracula/wallpaper

Amfora

While I’m using lagrange as a day to day gemini browser, I like using Amfora too sometimes. There is a dracula theme for amfora already as well! Lagrange has already some nice dark themes available but doesn’t allow this full level of customization.

git clone https://github.com/dracula/amfora.git ~/workspace/contrib/dracula/amfora

Then copy the content of ~/workspace/contrib/dracula/amfora/ in ~/.config/amfora/config.toml.

Conclusion

That’s it for this post, it is nice to have everything consistent, even though this never has been a real focus for me :).


Contact

If you find any issue or have any question about this article, feel free to reach out to me via email, mastodon, matrix or even IRC, see the About Me page for details.

See Also

New laptop part 5: power management

Setting up OpenPGP Web Key Directory (WKD)