Theme switcher (Light/Dark Mode) #380
nebulosa2007
started this conversation in
Show and tell
Replies: 1 comment 2 replies
-
For me Telegram uses the standard dark style preference from the portal. Combined with this it works out of the box: |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
At last release, 0.1.6 - there was a video with new implemented function
do-screen-transition
with simple principle switching themes between dark and light that interest me.I spent some time and here is my implementation of the theme switch! Just like in Mac OSX (or Gnome or KDE, I guess), it automatically switches when the sun rises/sets.
It uses darkman and some hacks (all instructions also written in script):
$XDG_DATA_DIRS/{dark,light}-mode.d/
and execute scripts in it. So, you need to duplicate scripts in both folders with some edits (on|off commands). I tested another configuration of it with symlinks and it works! You need just one script withcase
options that execute commands in depends what mode you are using:.service
file that provides in package not work withNiri
- got errorNIRI_SOCKET is not set
, so it need another service file that describe at wiki:And finally
~/.config/darkman/
mode_swither.sh that can switch:and send notification after.
Not all will work for you but it's an worked example. List of commands can be extended (for inspiration you could use Dracula project)
I also use it together with wlsunset.
P.S. If anyone knows how to switch modes for Qt5/6 apps (especially Telegram) via shell commands - please let me know.
Beta Was this translation helpful? Give feedback.
All reactions