focus more on qutebrowser
This commit is contained in:
parent
783790a2e9
commit
c49fa057cc
|
@ -1,5 +1,5 @@
|
||||||
{ config, pkgs, lib, font, ... }:
|
{ config, pkgs, lib, font, ... }:
|
||||||
let inherit (import ./variables.nix) desktop;
|
let inherit (import ./variables.nix) desktop browser;
|
||||||
in {
|
in {
|
||||||
config = {
|
config = {
|
||||||
programs.firefox = {
|
programs.firefox = {
|
||||||
|
@ -51,7 +51,7 @@ in {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
systemd.user.services = {
|
systemd.user.services = lib.mkIf (browser == "firefox") {
|
||||||
firefox = {
|
firefox = {
|
||||||
Unit = {
|
Unit = {
|
||||||
Description = "Firefox Web client";
|
Description = "Firefox Web client";
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{ config, pkgs, lib, font, ... }:
|
{ config, pkgs, lib, font, ... }:
|
||||||
let inherit (import ./variables.nix) key theme color accent font;
|
let inherit (import ./variables.nix) browser;
|
||||||
in {
|
in {
|
||||||
config = {
|
config = {
|
||||||
xdg.desktopEntries = {
|
xdg.desktopEntries = {
|
||||||
|
@ -66,6 +66,11 @@ in {
|
||||||
// (createMimeAssociations "image" "pqiv.desktop" image_suffixes)
|
// (createMimeAssociations "image" "pqiv.desktop" image_suffixes)
|
||||||
// (createMimeAssociations "video" "mpv.desktop" video_suffixes);
|
// (createMimeAssociations "video" "mpv.desktop" video_suffixes);
|
||||||
|
|
||||||
|
browser_desktop = {
|
||||||
|
firefox = "firefox.desktop";
|
||||||
|
qutebrowser = "org.qutebrowser.qutebrowser.desktop";
|
||||||
|
}.${browser};
|
||||||
|
|
||||||
simple = {
|
simple = {
|
||||||
"text/plain" = "kak.desktop";
|
"text/plain" = "kak.desktop";
|
||||||
"inode/directory" = "thunar.desktop";
|
"inode/directory" = "thunar.desktop";
|
||||||
|
@ -73,9 +78,9 @@ in {
|
||||||
"application/pdf" = "org.pwmt.zathura.desktop";
|
"application/pdf" = "org.pwmt.zathura.desktop";
|
||||||
"application/epub+zip" = "org.pwmt.zathura.desktop";
|
"application/epub+zip" = "org.pwmt.zathura.desktop";
|
||||||
|
|
||||||
"text/html" = "firefox.desktop";
|
"text/html" = browser_desktop;
|
||||||
"x-scheme-handler/http" = "firefox.desktop";
|
"x-scheme-handler/http" = browser_desktop;
|
||||||
"x-scheme-handler/https" = "firefox.desktop";
|
"x-scheme-handler/https" = browser_desktop;
|
||||||
|
|
||||||
"x-scheme-handler/magnet" = "torrent.desktop";
|
"x-scheme-handler/magnet" = "torrent.desktop";
|
||||||
"application/x-bittorrent" = "torrent.desktop";
|
"application/x-bittorrent" = "torrent.desktop";
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{ config, pkgs, lib, font, ... }:
|
{ config, pkgs, lib, font, ... }:
|
||||||
let inherit (pkgs.uservars) key theme color accent font;
|
let inherit (pkgs.uservars) key theme color accent font browser;
|
||||||
in {
|
in {
|
||||||
config = {
|
config = {
|
||||||
programs.qutebrowser = {
|
programs.qutebrowser = {
|
||||||
|
@ -227,6 +227,21 @@ in {
|
||||||
# config.source("config/config.py")
|
# config.source("config/config.py")
|
||||||
# '';
|
# '';
|
||||||
};
|
};
|
||||||
|
systemd.user.services = lib.mkIf (browser == "qutebrowser") {
|
||||||
|
qutebrowser = {
|
||||||
|
Unit = {
|
||||||
|
Description = "Qutebrowser Web client";
|
||||||
|
PartOf = [ "graphical-session.target" ];
|
||||||
|
After = [ "graphical-session.target" ];
|
||||||
|
};
|
||||||
|
Service = {
|
||||||
|
ExecStartPre = "/usr/bin/env sleep 10s";
|
||||||
|
ExecStart = "${pkgs.qutebrowser}/bin/qutebrowser";
|
||||||
|
Restart = "on-failure";
|
||||||
|
};
|
||||||
|
Install = { WantedBy = [ "sway-session.target" ]; };
|
||||||
|
};
|
||||||
|
};
|
||||||
home.file = {
|
home.file = {
|
||||||
# For some stupid reason qutebrowser crashes if this dir does not exist
|
# For some stupid reason qutebrowser crashes if this dir does not exist
|
||||||
".local/share/qutebrowser/greasemonkey/.keep".text = "";
|
".local/share/qutebrowser/greasemonkey/.keep".text = "";
|
||||||
|
|
|
@ -124,4 +124,5 @@ in rec {
|
||||||
|
|
||||||
dmenu = "bmenu";
|
dmenu = "bmenu";
|
||||||
desktop = "sway";
|
desktop = "sway";
|
||||||
|
browser = "qutebrowser";
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue