Skip to content

Commit

Permalink
Use single config for cinnamon theme
Browse files Browse the repository at this point in the history
I only switch between two themes anyway...
  • Loading branch information
simonrw committed Aug 17, 2023
1 parent 9112635 commit 19c027c
Showing 1 changed file with 67 additions and 67 deletions.
134 changes: 67 additions & 67 deletions home/cinnamon.nix
Original file line number Diff line number Diff line change
Expand Up @@ -15,79 +15,79 @@ let
in
{
options = with lib; {
me.cinnamon.theme = mkOption {
type = types.str;
default = "Mint-Y-Dark-Aqua";
};
me.cinnamon.dark-mode = mkOption {
type = types.bool;
};
};
config = {
dconf.settings = {
# custom keybindings
"org/cinnamon/desktop/keybindings/custom-keybindings/custom0" = {
binding = [ "<Alt><Super>s" ];
command = mkShortcutCommand "slack";
name = "Slack";
};
"org/cinnamon/desktop/keybindings/custom-keybindings/custom1" = {
binding = [ "<Alt><Super>t" ];
command = mkShortcutCommand terminal;
name = "Terminal";
};
"org/cinnamon/desktop/keybindings/custom-keybindings/custom2" = {
binding = [ "<Alt><Super>c" ];
command = mkShortcutCommand browser;
name = "Browser";
};
"org/cinnamon/desktop/keybindings/custom-keybindings/custom3" = {
binding = [ "<Alt><Super>e" ];
command = mkShortcutCommand "obsidian";
name = "Notes";
};
"org/cinnamon/desktop/keybindings/custom-keybindings/custom4" = {
binding = [ "<Alt><Super>r" ];
command = mkShortcutCommand "zeal";
name = "Documentation";
};
"org/cinnamon/desktop/keybindings" = {
custom-list = [ "__dummy__" "custom0" "custom1" "custom2" "custom3" "custom4" ];
};
# media keys
"org/cinnamon/desktop/keybindings/media-keys" = {
previous = [ "XF86AudioPrev" "<Super>F7" ];
play = [ "XF86AudioPlay" "<Super>F8" ];
next = [ "XF86AudioNext" "<Super>F9" ];
mute = [ "XF86AudioMute" "<Super>F10" ];
volume-down = [ "XF86AudioLowerVolume" "<Super>F11" ];
volume-up = [ "XF86AudioRaiseVolume" "<Super>F12" ];
};
# other
"org/cinnamon/desktop/wm/preferences" = {
button-layout = "close,maximize,minimize:";
titlebar-font = "Ubuntu Bold 10";
};
"org/cinnamon" = {
alttab-switcher-style = "icons+preview";
};
config =
let
theme = if cfg.dark-mode then "Mint-Y-Dark-Aqua" else "Mint-Y-Aqua";
in
{
dconf.settings = {
# custom keybindings
"org/cinnamon/desktop/keybindings/custom-keybindings/custom0" = {
binding = [ "<Alt><Super>s" ];
command = mkShortcutCommand "slack";
name = "Slack";
};
"org/cinnamon/desktop/keybindings/custom-keybindings/custom1" = {
binding = [ "<Alt><Super>t" ];
command = mkShortcutCommand terminal;
name = "Terminal";
};
"org/cinnamon/desktop/keybindings/custom-keybindings/custom2" = {
binding = [ "<Alt><Super>c" ];
command = mkShortcutCommand browser;
name = "Browser";
};
"org/cinnamon/desktop/keybindings/custom-keybindings/custom3" = {
binding = [ "<Alt><Super>e" ];
command = mkShortcutCommand "obsidian";
name = "Notes";
};
"org/cinnamon/desktop/keybindings/custom-keybindings/custom4" = {
binding = [ "<Alt><Super>r" ];
command = mkShortcutCommand "zeal";
name = "Documentation";
};
"org/cinnamon/desktop/keybindings" = {
custom-list = [ "__dummy__" "custom0" "custom1" "custom2" "custom3" "custom4" ];
};
# media keys
"org/cinnamon/desktop/keybindings/media-keys" = {
previous = [ "XF86AudioPrev" "<Super>F7" ];
play = [ "XF86AudioPlay" "<Super>F8" ];
next = [ "XF86AudioNext" "<Super>F9" ];
mute = [ "XF86AudioMute" "<Super>F10" ];
volume-down = [ "XF86AudioLowerVolume" "<Super>F11" ];
volume-up = [ "XF86AudioRaiseVolume" "<Super>F12" ];
};
# other
"org/cinnamon/desktop/wm/preferences" = {
button-layout = "close,maximize,minimize:";
titlebar-font = "Ubuntu Bold 10";
};
"org/cinnamon" = {
alttab-switcher-style = "icons+preview";
};

# theming
"org/x/apps/portal" = {
color-scheme = if cfg.dark-mode then "prefer-dark" else "prefer-light";
};
"org/cinnamon/desktop/interface" = {
gtk-theme = cfg.theme;
icon-theme = cfg.theme;
font-name = "Ubuntu Medium 10";
};
"org/nemo/desktop" = {
font = "Ubuntu Medium 10";
};
"org/cinnamon/theme" = {
name = cfg.theme;
# theming
"org/x/apps/portal" = {
color-scheme = if cfg.dark-mode then "prefer-dark" else "prefer-light";
};
"org/cinnamon/desktop/interface" = {
gtk-theme = theme;
icon-theme = theme;
font-name = "Ubuntu Medium 10";
};
"org/nemo/desktop" = {
font = "Ubuntu Medium 10";
};
"org/cinnamon/theme" = {
name = theme;
};
};
};
};
}

0 comments on commit 19c027c

Please sign in to comment.