fixup sway and add mimeapps

This commit is contained in:
tristan 2024-01-08 02:12:09 +00:00
parent 879489efcb
commit 829c8d9392
9 changed files with 71 additions and 33 deletions

View file

@ -33,6 +33,7 @@
home.homeDirectory = "/home/${config.home.username}";
xdg.userDirs.enable = true;
xdg.mimeApps.enable = true;
manual.html.enable = true;

View file

@ -5,6 +5,7 @@
...
}: let
term = config.programs.terminal;
termcmd = "${ config.programs.terminal }/bin/${config.programs.terminal.pname}";
in {
options.programs = {
terminal = lib.mkPackageOption pkgs "foot" {
@ -19,5 +20,6 @@ in {
};
home.packages = [term];
home.sessionVariables.TERMINAL = termcmd;
};
}

View file

@ -1,4 +1,9 @@
{
home.sessionVariables.BROWSER = "qutebrowser";
xdg.mimeApps.defaultApplications = {
"application/xhtml+xml" = "org.qutebrowser.qutebrowser.desktop";
"text/html" = "org.qutebrowser.qutebrowser.desktop";
};
programs.qutebrowser = {
enable = true;
searchEngines = {

View file

@ -5,6 +5,7 @@
...
}: let
modifier = config.windowManager.modifierKey;
in {
imports = [
(import ./swaylock.nix)
@ -171,6 +172,14 @@ in {
bind = ${modifier}, R, submap,reset
bind = CONTROL, C, submap,reset
submap = reset
bind = ${modifier}_CONTROL, V, submap, passthrough
submap = passthrough
bind = ${modifier}_CONTROL, V, submap, reset
bind = SUPER, escape, submap, reset
submap = reset
'';
};

View file

@ -64,10 +64,12 @@ in {
echo "$items" | ${my-deps.menu} | xargs -I_ rbw get --field username _ \
| awk '{print $2}' | wl-copy
'';
hotkeys = [{
modifier = "${modifier}_CONTROL";
key = "P";
}];
hotkeys = [
{
modifier = "${modifier}_CONTROL";
key = "P";
}
];
install = false;
}
{

View file

@ -1,4 +1,17 @@
{pkgs, ...}: {
{
pkgs,
config,
...
}: let
term = "${ config.programs.terminal }/bin/${config.programs.terminal.pname}";
modKeyName = config.windowManager.modifierKey;
modifier =
if modKeyName == "SUPER"
then "Mod4"
else if modKeyName == "ALT"
then "Mod1"
else null;
in {
imports = [
(import ./swaylock.nix)
(import ./swayidle.nix)
@ -12,6 +25,10 @@
wayland.windowManager.sway = {
enable = true;
config = {
inherit modifier;
bars = [];
};
};
services.swayidle = {