Problem:
I have this script that I use in arch to toggle system wide dark/light
mode
if [[ -x $(command -v xfconf-query) ]]; then
xfconf-query -c xsettings -p /Net/ThemeName -s "Adapta-Nokto"
xfconf-query -c xsettings -p /Net/IconThemeName -s "Papirus-Dark"
xfconf-query -c xsettings -p /Gtk/CursorThemeName -s "Bibata-Modern-DarkRed"
fi
# https://github.com/ankitects/anki/pull/1905/files
if [[ -x $(command -v gsettings) ]]; then
gsettings set org.gnome.desktop.interface gtk-theme 'prefer-dark'
fi
I’ve switched to nixos
and I am trying to get this to work, but it doesn’t.
>xfconf-query -c xsettings -p /Net/ThemeName -s "Adapta-Nokto"
Property "/Net/ThemeName" does not exist on channel "xsettings". If a new property should be created, use the --create option.
> xfconf-query -c xsettings -l
/Gdk/WindowScalingFactor
/Gtk/ButtonImages
/Gtk/CanChangeAccels
/Gtk/ColorPalette
/Gtk/CursorThemeName
/Gtk/CursorThemeSize
/Gtk/DecorationLayout
/Gtk/DialogsUseHeader
/Gtk/FontName
/Gtk/IconSizes
/Gtk/KeyThemeName
/Gtk/MenuBarAccel
/Gtk/MenuImages
/Gtk/MonospaceFontName
/Gtk/TitlebarMiddleClick
/Gtk/ToolbarIconSize
/Gtk/ToolbarStyle
/Net/CursorBlink
/Net/CursorBlinkTime
/Net/DndDragThreshold
/Net/DoubleClickDistance
/Net/DoubleClickTime
/Net/EnableEventSounds
/Net/EnableInputFeedbackSounds
/Net/SoundThemeName
/Xft/Antialias
/Xft/Hinting
/Xft/HintStyle
/Xft/RGBA
My current nix setup is here
I am using the nix unstable channel
My setup consists of xfce
for desktop manager and i3
for window manager
My setup is extensive, but the main file where I set this up is this one:
{
programs.noisetorch.enable = true;
# Needed to fix home-manager/guis.nix#gtk.enable
programs.dconf.enable = true;
programs.nm-applet = {
enable = true;
indicator = true;
};
programs.xss-lock = {
enable = true;
lockerCommand = "${pkgs.i3lock-fancy-rapid}/bin/i3lock-fancy-rapid";
};
qt = {
enable = true;
platformTheme = "gtk2";
style = "gtk2";
};
programs.xfconf.enable = true;
hardware.brillo.enable = true;
services = {
picom.enable = true;
xserver = {
enable = true;
desktopManager = {
xterm.enable = false;
xfce = {
enable = true;
noDesktop = true;
enableXfwm = false;
};
};
# Touchpad
libinput.enable = true;
libinput.touchpad.tapping = true;
displayManager = {
defaultSession = "none+i3";
lightdm.enable = true;
autoLogin.enable = true;
autoLogin.user = "reinaldo";
};
windowManager.i3 = {
enable = true;
extraPackages = with pkgs; [
rofi #application launcher most people use
# https://nixos.wiki/wiki/Samba
lxqt.lxqt-policykit
i3lock-fancy-rapid
lxappearance
alttab
restic
xdotool
feh
redshift
qrencode
xclip
dunst
libnotify
scrot
flameshot
tdrop
ncpamixer
qalculate-qt
picom
# mimeo to handle default applications
# keyword: xdg-open
mimeo
xdg-utils
# TODO
xdg-ninja
];
};
};
};
}