Posts tagged customization
Dark interface
Force web UI dark mode
|
--enable-features=WebUIDarkMode --force-dark-mode
|
Hardware acceleration
Accelerated video decoding and GPU support
|
--enable-accelerated-video-decode --enable-gpu
|
Reader mode
Runtime cache
Use the cache directory /run/user/1000/chrome/cache
|
--disk-cache-dir=${XDG_RUNTIME_DIR}/chrome/cache
|
Window size
Sawn a window of size 1200x900
Full config
The file /etc/chromium/default
is sourced by the Chromium launcher, that's why we can sue bash syntax here.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20 |
#!/usr/bin/env bash
# Dark interface
# Force web UI dark mode
CHROMIUM_FLAGS="${CHROMIUM_FLAGS} --enable-features=WebUIDarkMode --force-dark-mode"
# Hardware acceleration
# Accelerated video decoding and GPU support
CHROMIUM_FLAGS="${CHROMIUM_FLAGS} --enable-accelerated-video-decode --enable-gpu"
# Reader mode
CHROMIUM_FLAGS="${CHROMIUM_FLAGS} --enable-reader-mode"
# Runtime cache
# Use the cache directory /run/user/1000/chrome/cache
CHROMIUM_FLAGS="${CHROMIUM_FLAGS} --disk-cache-dir=${XDG_RUNTIME_DIR}/chrome/cache"
# Window size
# Sawn a window of size 1200x900
CHROMIUM_FLAGS="${CHROMIUM_FLAGS} --window-size=1200,900"
|
Binary
If you use www-client/chromium-bin
, then the config is located at /etc/chromium/default
and CHROMIUM_FLAGS
is CHROMIUM_BIN_FLAGS
.
Proper window size
Sometimes while the Emacs GUI window is tiled to a side or maximized small gaps may appear around the window. This "bug" can be worked around by:
- right-click on the title bar,
- "More Actions",
- "Configure Special Window Settings…",
- "Add Property",
- "Obey Geometry Restrictions",
- Select "Force" form the combo box,
- Select "No" from the radio buttons.
Opening files from Dolphin in one Emacs instance
Emacs daemon can help with that. But before you run emacs --daemon
, I need You to know that there might be a better way:
|
(unless (or noninteractive (server-running-p))
(server-start))
|
Adding the above to Your Emacs config will cause Emacs to start a daemon after it is opened (and no other Emacs servers are running), this also does not require --daemon
flag.
After the daemon is started You can open files by right-clicking on them and selecting to open them in "Emacsclient".
Furthermore: You also utilize --iconic
and add emacs --iconic
to your Plasma startup. This is way better than using emacs --daemon
because you can just click on your taskbar to open the minimized Emacs window. Also, Emacs will load all Your graphical libraries and configurations so Your theme will look properly and not as if Emacs was being used on the console.
Breeze theme
Sadly I have not found any theme that would look like Plasma. I use the spacemacs theme which looks a little bit similar, especially the background color comes close to Breeze's dark background color.
Note that the theme which You load with the function load-theme
is a different thing that the GTK theme Emacs uses.
The GTK theme should be enabled if Your Emacs version is built with GTK support. On Gentoo this setting is controlled with the gtk
USE flag. Also the flag toolkit-scroll-bars
can be enabled for a look of scroll-bars consistent with the selected toolkit.
Xresources
There is a different approach to theming Your Emacs that loading a theme defined in ELisp - You can use a ~/.Xresource
file.
If you do not load any theme in your configuration Emacs will by default read the .Xresources file, unless the --no-x-resources
flag is used.
Here are a few Xresources config files that come close to the default Breeze theme:
Dbus integration
Emacs can be built with FreeDesktop's D-Bus support to communicate over the dbus protocol. This can come handy when using ERC as it has a setting to enable desktop notifications on mentions (erc-desktop-notifications.el).
The dbus interface can also be utilized to query desktop-oriented daemons, for example this library talks to the Bluetooth daemon.
KDE development
Those are some ELisp libraries that I found while browsing GitHub, they might be useful for somebody who delves into KDE app development.
Opening files in different applications
In addition to async-shell-command
and start-process-shell-command
I wrote this small library that may come handy.
Outside Emacs, inside Plasma
Sadly the KDE team did not add support to emulate Emacs-like keys in Plasma itself, but some applications like, for example Kate have configuration options to customize the key bindings. This is a repository explaining how to setup Kate's bindings.
Make gallery-dl work like youtube-dl
A configuration file to download everything into current directory, like yotube-dl does.
File: ~/.config/gallery-dl/config.json
|
{
"directory": [],
"base-directory": "./"
}
|