repos/wm-scheme-toggle

generic window manager scheme toggler
Commits Files Refs README LICENSE
README.md (43 lines)

Window Manager Scheme Toggler

Scripts to change the system color scheme between dark and light.

Toggling dark scheme

Dependencies

The basic dependencies for my use case are:

  • sed
  • perl
  • qt5ct
  • qt6ct
  • gsettings
  • xsettingsd
  • neovim-remote
  • st patched (support sending user signals to switch schemes)

This will vary from system to system, for example, if you don't use neovim and you use a different editor or terminal, etc. In that case, you can modify the scripts in order to fit your system.

Quick Start

If you want to switch the color scheme just run $ ./sys-toggle-scheme which is a wrapper around sys-dark-scheme and sys-light-scheme.

Troubleshooting

As of 11 march 2024 some GTK4 apps are not following the preferred scheme due to a problem apparently on xdg-desktop-portal (check out this discussion) the solution taken from the linked discussion is to create ~/.config/xdg-desktop-portal/portals.conf and add the following content

[preferred]
default=gtk

LICENSE

MIT

   1 # Window Manager Scheme Toggler
   2 
   3 Scripts to change the system color scheme between dark and light.
   4 
   5 ![Toggling dark scheme](https://github.com/mjkloeckner/wm-scheme-toggle/assets/64109770/55188134-b6e2-42dd-96d4-cd9058de0a5c)
   6 
   7 ## Dependencies
   8 The basic dependencies for my use case are:
   9 
  10 - sed
  11 - perl
  12 - qt5ct
  13 - qt6ct
  14 - gsettings
  15 - xsettingsd
  16 - neovim-remote
  17 - st patched (support sending user signals to switch schemes)
  18 
  19 This will vary from system to system, for example, if you don't use neovim and
  20 you use a different editor or terminal, etc. In that case, you can modify the
  21 scripts in order to fit your system.
  22 
  23 ## Quick Start
  24 
  25 If you want to switch the color scheme just run `$ ./sys-toggle-scheme` which is
  26 a wrapper around `sys-dark-scheme` and `sys-light-scheme`.
  27 
  28 ## Troubleshooting
  29 
  30 As of `11 march 2024` some GTK4 apps are not following the preferred scheme due
  31 to a problem apparently on `xdg-desktop-portal` (check out [this
  32 discussion](https://bbs.archlinux.org/viewtopic.php?id=289408)) the solution
  33 taken from the linked discussion is to create
  34 `~/.config/xdg-desktop-portal/portals.conf` and add the following content
  35 
  36 ```
  37 [preferred]
  38 default=gtk
  39 ```
  40 
  41 ## LICENSE
  42 
  43 [MIT](https://opensource.org/licenses/MIT)