1
0
mirror of https://github.com/kmein/niveum synced 2026-03-16 10:11:08 +01:00

fix(constants): extract browser to $BROWSER

This commit is contained in:
Kierán Meinhardt
2019-12-08 22:38:19 +01:00
parent 309318c4b6
commit e8e83873e7
5 changed files with 15 additions and 5 deletions

View File

@@ -13,5 +13,5 @@
environment.systemPackages = [ pkgs.chromium ];
niveum.applications.browser = "chromium";
environment.variables.BROWSER = "chromium";
}

View File

@@ -81,6 +81,18 @@ in
{
services.dbus.packages = [ pkgs.gnome3.dconf ];
}
{
environment.systemPackages = [
(pkgs.writers.writeDashBin "x-www-browser" ''
for browser in $BROWSER firefox chromium google-chrome google-chrome-stable opera vivaldi qupzilla iceweasel konqueror firefox-aurora google-chrome-beta opera-beta vivaldi-beta google-chrome-dev opera-developer vivaldi-snapshot luakit midori epiphany lynx w3m dillo elinks vimb; do
if command -v $browser > /dev/null 2>&1; then
exec $browser "$@"
fi
done
exit 1
'')
];
}
{
nixpkgs = {
config.allowUnfree = true;

View File

@@ -31,7 +31,7 @@ with config.niveum; {
sticky_history = true;
history_length = 20;
dmenu = "${pkgs.rofi}/bin/rofi -display-run dunst -show run";
browser = applications.browser;
browser = "x-www-browser";
verbosity = "mesg";
corner_radius = 0;
mouse_left_click = "do_action";

View File

@@ -105,7 +105,7 @@ in with config.niveum; {
"${modifier}+v" = "split v";
"${modifier}+w" = "layout tabbed";
"${modifier}+x" = "exec --no-startup-id ${new-workspace}";
"${modifier}+y" = "exec ${applications.browser}";
"${modifier}+y" = "exec x-www-browser";
"XF86AudioLowerVolume" = "exec --no-startup-id ${pkgs.pamixer}/bin/pamixer -d 5";
"XF86AudioMute" = "exec --no-startup-id ${pkgs.pamixer}/bin/pamixer -t";
"XF86AudioRaiseVolume" = "exec --no-startup-id ${pkgs.pamixer}/bin/pamixer -i 5";

View File

@@ -35,8 +35,6 @@ let
in {
options.niveum = {
applications = {
terminal = mkOption { type = types.str; };
browser = mkOption { type = types.str; };
fileManager = mkOption { type = types.str; };
};