mass reformat

This commit is contained in:
notgne2 2022-10-03 17:08:32 -07:00
parent ed1c53e94c
commit 9cb456ad60
No known key found for this signature in database
GPG key ID: 5CE0A245A2DAC84A
25 changed files with 1216 additions and 1043 deletions

View file

@ -1,10 +1,12 @@
inputs:
{ config, lib, pkgs, ... }:
with lib;
let
inputs: {
config,
lib,
pkgs,
...
}:
with lib; let
cfg = config.de2u;
in
{
in {
options.de2u = {
enable = mkEnableOption "Enable de2 user stuff";
@ -33,19 +35,24 @@ in
'');
};
Install = rec {
WantedBy = [ "graphical-session.target" ];
WantedBy = ["graphical-session.target"];
};
};
programs.firefox = {
enable = lib.mkDefault true;
package = lib.mkDefault ((if pkgs ? librewolf then pkgs.librewolf else pkgs.firefox).override {
cfg = {
enableGnomeExtensions = true;
pipewireSupport = true;
};
});
package = lib.mkDefault ((
if pkgs ? librewolf
then pkgs.librewolf
else pkgs.firefox
)
.override {
cfg = {
enableGnomeExtensions = true;
pipewireSupport = true;
};
});
extensions = lib.optionals (pkgs ? nur.repos.rycee.firefox-addons) (with pkgs.nur.repos.rycee.firefox-addons; [
darkreader
@ -138,12 +145,20 @@ in
xdg.configFile."gtk-4.0/gtk.css".text = ''
/* UNITE windowDecorations */
@import url('${config.home.homeDirectory}/.nix-profile/share/gnome-shell/extensions/unite@hardpixel.eu/styles/gtk4/buttons-right/${if (cfg.tiling && !cfg.touch) then "always" else "both"}.css');
@import url('${config.home.homeDirectory}/.nix-profile/share/gnome-shell/extensions/unite@hardpixel.eu/styles/gtk4/buttons-right/${
if (cfg.tiling && !cfg.touch)
then "always"
else "both"
}.css');
/* windowDecorations UNITE */
'';
gtk.gtk3.extraCss = ''
/* UNITE windowDecorations */
@import url('${config.home.homeDirectory}/.nix-profile/share/gnome-shell/extensions/unite@hardpixel.eu/styles/gtk3/buttons-right/${if (cfg.tiling && !cfg.touch) then "always" else "both"}.css');
@import url('${config.home.homeDirectory}/.nix-profile/share/gnome-shell/extensions/unite@hardpixel.eu/styles/gtk3/buttons-right/${
if (cfg.tiling && !cfg.touch)
then "always"
else "both"
}.css');
/* windowDecorations UNITE */
'';
home.activation.gtk3css-over-unite = {
@ -151,22 +166,21 @@ in
$DRY_RUN_CMD rm -f ~/.config/gtk-3.0/gtk.css
$DRY_RUN_CMD rm -f ~/.config/gtk-4.0/gtk.css
'';
before = [ "checkLinkTargets" ];
after = [ ];
before = ["checkLinkTargets"];
after = [];
};
xdg.configFile."mimeapps.list".force = true;
xdg.mimeApps = let
browser =
if config.programs.firefox.enable then
if config.programs.firefox.enable
then
(
if config.programs.firefox.package.pname == "firefox" then
"firefox.desktop"
else
"librewolf.desktop"
if config.programs.firefox.package.pname == "firefox"
then "firefox.desktop"
else "librewolf.desktop"
)
else
"chromium-browser.desktop";
else "chromium-browser.desktop";
apps = {
"text/plain" = "org.gnome.TextEditor.desktop";
@ -244,7 +258,10 @@ in
tray-pos = "center";
};
"org/gnome/shell/extensions/user-theme" = {
name = if config.ezcolors.enable then "Generated" else "Default";
name =
if config.ezcolors.enable
then "Generated"
else "Default";
};
"org/gnome/shell/extensions/just-perfection" = {
# activities-button = !cfg.tiling; # conflicts with unite?
@ -257,7 +274,7 @@ in
};
"org/gnome/shell" = {
disable-user-extensions = false;
disabled-extensions = [ "" ];
disabled-extensions = [""];
enabled-extensions = [
"pop-shell@system76.com"
"rrc@ogarcia.me"
@ -289,9 +306,18 @@ in
only-on-primary = cfg.tiling;
};
"org/gnome/shell/extensions/unite" = {
hide-window-titlebars = if (cfg.tiling && !cfg.touch) then "always" else "both";
hide-activities-button = if (cfg.tiling || cfg.touch) then "never" else "always";
show-window-buttons = if cfg.tiling then "never" else "both";
hide-window-titlebars =
if (cfg.tiling && !cfg.touch)
then "always"
else "both";
hide-activities-button =
if (cfg.tiling || cfg.touch)
then "never"
else "always";
show-window-buttons =
if cfg.tiling
then "never"
else "both";
notifications-position = "center";
restrict-to-primary-screen = false;
show-legacy-tray = false;
@ -315,7 +341,10 @@ in
snap-color = "rgba(0,0,0,0)";
};
"org/gnome/desktop/wm/preferences" = {
focus-mode = if cfg.tiling then "sloppy" else "click";
focus-mode =
if cfg.tiling
then "sloppy"
else "click";
resize-with-right-button = true;
num-workspaces = 9;
};
@ -327,80 +356,82 @@ in
enabled = true;
};
"org/gnome/desktop/wm/keybindings" =
let
workspaceAttrsList = lib.flatten (map
(n: [
(lib.nameValuePair "move-to-workspace-${n}" [ "<Shift><Super>${n}" ])
(lib.nameValuePair "switch-to-workspace-${n}" [ "<Super>${n}" ])
])
(map (n: toString n) (lib.range 1 9)));
in
lib.listToAttrs workspaceAttrsList // {
minimize = [ "<Super>comma" ];
maximize = [ "" ];
unmaximize = [ "" ];
move-to-monitor-up = [ "" ];
move-to-monitor-down = [ "" ];
move-to-monitor-left = [ "" ];
move-to-monitor-right = [ "" ];
move-to-workspace-down = [ "" ];
move-to-workspace-up = [ "" ];
switch-to-workspace-down = [ "<Primary><Super>Down" "<Primary><Super>j" ];
switch-to-workspace-up = [ "<Primary><Super>Up" "<Primary><Super>k" ];
toggle-maximized = [ "<Super>m" ];
close = [ "<Super>q" ];
cycle-windows = [ "" ];
panel-run-dialog = [ "<Super>d" ];
move-to-workspace-right = [ "" ];
move-to-workspace-left = [ "" ];
switch-to-workspace-right = [ "" ];
switch-to-workspace-left = [ "" ];
"org/gnome/desktop/wm/keybindings" = let
workspaceAttrsList = lib.flatten (map
(n: [
(lib.nameValuePair "move-to-workspace-${n}" ["<Shift><Super>${n}"])
(lib.nameValuePair "switch-to-workspace-${n}" ["<Super>${n}"])
])
(map (n: toString n) (lib.range 1 9)));
in
lib.listToAttrs workspaceAttrsList
// {
minimize = ["<Super>comma"];
maximize = [""];
unmaximize = [""];
move-to-monitor-up = [""];
move-to-monitor-down = [""];
move-to-monitor-left = [""];
move-to-monitor-right = [""];
move-to-workspace-down = [""];
move-to-workspace-up = [""];
switch-to-workspace-down = ["<Primary><Super>Down" "<Primary><Super>j"];
switch-to-workspace-up = ["<Primary><Super>Up" "<Primary><Super>k"];
toggle-maximized = ["<Super>m"];
close = ["<Super>q"];
cycle-windows = [""];
panel-run-dialog = ["<Super>d"];
move-to-workspace-right = [""];
move-to-workspace-left = [""];
switch-to-workspace-right = [""];
switch-to-workspace-left = [""];
# And deal with the remaining alt keys, screw alt keys
cycle-windows-backward = [ "" ];
activate-window-menu = [ "" ];
cycle-panels = [ "" ];
cycle-panels-backward = [ "" ];
switch-panels = [ "" ];
switch-panels-backward = [ "" ];
switch-applications = [ "<Super>Tab" ];
switch-applications-backward = [ "<Shift><Super>Tab" ];
cycle-group = [ "" ];
cycle-group-backward = [ "" ];
switch-group = [ "" ];
switch-group-backward = [ "" ];
begin-resize = [ "" ];
begin-move = [ "" ];
cycle-windows-backward = [""];
activate-window-menu = [""];
cycle-panels = [""];
cycle-panels-backward = [""];
switch-panels = [""];
switch-panels-backward = [""];
switch-applications = ["<Super>Tab"];
switch-applications-backward = ["<Shift><Super>Tab"];
cycle-group = [""];
cycle-group-backward = [""];
switch-group = [""];
switch-group-backward = [""];
begin-resize = [""];
begin-move = [""];
};
"org/gnome/mutter/keybindings" = {
toggle-tiled-left = [ "" ];
toggle-tiled-right = [ "" ];
toggle-tiled-left = [""];
toggle-tiled-right = [""];
};
"org/gnome/mutter/wayland/keybindings" = {
restore-shortcuts = [ "" ];
};
"org/gnome/shell/keybindings" = lib.listToAttrs (map (n: lib.nameValuePair "switch-to-application-${toString n}" [ "" ]) (lib.range 1 9)) // {
open-application-menu = [ "" ];
toggle-message-tray = [ "<Super>v" ];
toggle-overview = [ "" ];
restore-shortcuts = [""];
};
"org/gnome/shell/keybindings" =
lib.listToAttrs (map (n: lib.nameValuePair "switch-to-application-${toString n}" [""]) (lib.range 1 9))
// {
open-application-menu = [""];
toggle-message-tray = ["<Super>v"];
toggle-overview = [""];
};
"org/gnome/settings-daemon/plugins/media-keys" = {
play = [ "<Super>backslash" ];
next = [ "<Super>bracketright" ];
previous = [ "<Super>bracketleft" ];
play = ["<Super>backslash"];
next = ["<Super>bracketright"];
previous = ["<Super>bracketleft"];
volume-down = [ "<Super>minus" ];
volume-up = [ "<Super>equal" ];
volume-down = ["<Super>minus"];
volume-up = ["<Super>equal"];
screensaver = [ "<Super>Escape" ];
home = [ "<Super>f" ];
email = [ "<Super>e" ];
www = [ "<Super>b" ];
screensaver = ["<Super>Escape"];
home = ["<Super>f"];
email = ["<Super>e"];
www = ["<Super>b"];
rotate-video-lock-static = [ "" ];
rotate-video-lock-static = [""];
screenshot-clip = [ "Print" ];
screenshot-clip = ["Print"];
};
"org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0" = {
binding = "<Super>t";