aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdrian Kummerlaender2018-04-24 12:17:28 +0200
committerAdrian Kummerlaender2018-04-24 12:17:28 +0200
commitc88716541afe1b9eed807c8073f21b4dae31dac2 (patch)
tree419e25c3f52926d61ef0dd08c9466e45d6c58b28
parent7b9579d8559accb1f8e03b336de5edec9e78adbf (diff)
downloadnixos_home-c88716541afe1b9eed807c8073f21b4dae31dac2.tar
nixos_home-c88716541afe1b9eed807c8073f21b4dae31dac2.tar.gz
nixos_home-c88716541afe1b9eed807c8073f21b4dae31dac2.tar.bz2
nixos_home-c88716541afe1b9eed807c8073f21b4dae31dac2.tar.lz
nixos_home-c88716541afe1b9eed807c8073f21b4dae31dac2.tar.xz
nixos_home-c88716541afe1b9eed807c8073f21b4dae31dac2.tar.zst
nixos_home-c88716541afe1b9eed807c8073f21b4dae31dac2.zip
Make oomox-gtk-theme derivation configurable
-rw-r--r--conf/xmonad/xmonad.hs2
-rw-r--r--home.nix33
-rw-r--r--pkgs/oomox-gtk-theme.nix63
3 files changed, 65 insertions, 33 deletions
diff --git a/conf/xmonad/xmonad.hs b/conf/xmonad/xmonad.hs
index 16d0470..018768a 100644
--- a/conf/xmonad/xmonad.hs
+++ b/conf/xmonad/xmonad.hs
@@ -35,7 +35,7 @@ main = xmonad $ ewmh defaultConfig
{ modMask = mod4Mask -- super key as modifier
, borderWidth = 3
, normalBorderColor = "#161616"
- , focusedBorderColor = "#aadb0f"
+ , focusedBorderColor = "#909737"
, terminal = "urxvt"
, handleEventHook = handleEventHook defaultConfig <+> fullscreenEventHook
, layoutHook = availableLayouts
diff --git a/home.nix b/home.nix
index afcbc15..39e6e83 100644
--- a/home.nix
+++ b/home.nix
@@ -26,6 +26,7 @@
paraview
hotspot
qcachegrind
+ gitg
];
# required to enable auto-mounting in pcmanfm
@@ -77,9 +78,37 @@
gtk = {
enable = true;
- theme = {
+ theme = let
+ oomox-gtk-theme = pkgs.callPackage ./pkgs/oomox-gtk-theme.nix {
+ pkgs-unstable = import <nixpkgs-unstable> {};
+ theme = {
+ accent_bg = "aadb0f";
+ bg = "d8d8d8";
+ fg = "101010";
+ btn_bg = "f5f5f5";
+ btn_fg = "111111";
+ caret_size = 0.04;
+ caret1_fg = "101010";
+ caret2_fg = "101010";
+ hdr_btn_bg = "161616";
+ hdr_btn_fg = "aadb0f";
+ menu_bg = "909737";
+ menu_fg = "1a1a1a";
+ sel_bg = "aadb0f";
+ sel_fg = "101010";
+ txt_bg = "ffffff";
+ txt_fg = "101010";
+ gradient = 0.0;
+ roundness = 0;
+ spacing = 1;
+ wm_border_focus = "909737";
+ wm_border_unfocus = "909737";
+ gtk3_generate_dark = false;
+ };
+ };
+ in {
name = "oomox";
- package = import ./pkgs/oomox-gtk-theme.nix;
+ package = oomox-gtk-theme;
};
gtk2.extraConfig = ''
diff --git a/pkgs/oomox-gtk-theme.nix b/pkgs/oomox-gtk-theme.nix
index 73d466c..237c11a 100644
--- a/pkgs/oomox-gtk-theme.nix
+++ b/pkgs/oomox-gtk-theme.nix
@@ -1,48 +1,51 @@
-with import <nixpkgs-unstable> {};
+{ stdenv, pkgs, pkgs-unstable, theme, ... }:
stdenv.mkDerivation rec {
name = "oomox-gtk-theme";
- src = fetchFromGitHub {
+ src = pkgs.fetchFromGitHub {
repo = "oomox-gtk-theme";
owner = "themix-project";
rev = "aa9081b2899d7e8ba8ae47543173d2d9f0f13921";
sha256 = "1q4nksnkhdpfpgcbfqbmnkjrmwxa6zv3wy43zlas2agssjkcm4x9";
};
- nativeBuildInputs = [ sass sassc librsvg glib libxml2 gdk_pixbuf bc ];
- propagatedUserEnvPkgs = [ gtk-engine-murrine ];
+ nativeBuildInputs = with pkgs; [ librsvg glib libxml2 gdk_pixbuf bc pkgs-unstable.sass pkgs-unstable.sassc ];
+ propagatedUserEnvPkgs = with pkgs; [ gtk-engine-murrine ];
- config = ''
- ACCENT_BG=aadb0f
- BG=d8d8d8
- FG=101010
- BTN_BG=f5f5f5
- BTN_FG=111111
- CARET1_FG=101010
- CARET2_FG=101010
- CARET_SIZE=0.04
- GRADIENT=0.0
- GTK3_GENERATE_DARK=False
- HDR_BTN_BG=161616
- HDR_BTN_FG=aadb0f
- MATERIA_STYLE_COMPACT=True
- MENU_BG=909737
- MENU_FG=1a1a1a
- SEL_BG=aadb0f
- SEL_FG=101010
- TXT_BG=ffffff
- TXT_FG=101010
- WM_BORDER_FOCUS=909737
- WM_BORDER_UNFOCUS=909737
- ROUNDNESS=0
- SPACING=1
+ config = with theme; ''
+ ACCENT_BG=${accent_bg}
+ BG=${bg}
+ FG=${fg}
+ BTN_BG=${btn_bg}
+ BTN_FG=${btn_fg}
+ CARET1_FG=${caret1_fg}
+ CARET2_FG=${caret2_fg}
+ HDR_BTN_BG=${hdr_btn_bg}
+ HDR_BTN_FG=${hdr_btn_fg}
+ MENU_BG=${menu_bg}
+ MENU_FG=${menu_fg}
+ SEL_BG=${sel_bg}
+ SEL_FG=${sel_fg}
+ TXT_BG=${txt_bg}
+ TXT_FG=${txt_fg}
+ WM_BORDER_FOCUS=${wm_border_focus}
+ WM_BORDER_UNFOCUS=${wm_border_unfocus}
+ GTK3_GENERATE_DARK=${if gtk3_generate_dark then "True" else "False"}
+ CARET_SIZE=${toString caret_size}
+ GRADIENT=${toString gradient}
+ ROUNDNESS=${toString roundness}
+ SPACING=${toString spacing}
+ '';
+
+ postPatch = ''
+ patchShebangs .
'';
installPhase = ''
- cd oomox-gtk-theme-bb6169b10b12e8e9672ba828fa503d885b5041d5
+ cd oomox-gtk-theme-*
HOME="$out/share/themes/oomox"
- ./change_color.sh -m all --target-dir "$out/share/themes" --output oomox <(echo -e "${config}")
+ ./change_color.sh --make-opts all --target-dir "$out/share/themes" --output oomox <(echo -e "${config}")
'';
meta = {