treewide: format using nixfmt-rfc-style
This commit is contained in:
parent
5218277b3e
commit
15c5e33060
98 changed files with 1930 additions and 990 deletions
|
@ -1,6 +1,16 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (pkgs.uservars) key theme accent font;
|
||||
inherit (pkgs.uservars)
|
||||
key
|
||||
theme
|
||||
accent
|
||||
font
|
||||
;
|
||||
inherit (theme) color;
|
||||
in
|
||||
{
|
||||
|
@ -10,7 +20,9 @@ in
|
|||
settings = {
|
||||
font = {
|
||||
size = font.size.small;
|
||||
normal = { family = font.mono; };
|
||||
normal = {
|
||||
family = font.mono;
|
||||
};
|
||||
};
|
||||
colors = {
|
||||
primary = {
|
||||
|
@ -40,31 +52,34 @@ in
|
|||
|
||||
hints = {
|
||||
alphabet = key.hints;
|
||||
enabled = [{
|
||||
regex =
|
||||
let
|
||||
mimes =
|
||||
"(mailto:|gemini:|gopher:|https:|http:|news:|file:|git:|ssh:|ftp:)";
|
||||
# I fucking hate regex, look at this bullshit
|
||||
delimiters = ''^\\u0000-\\u001F\\u007F-\\u009F<>"\\s{-}\\^⟨⟩`'';
|
||||
# Kakoune uses these characters to represent whitespace,
|
||||
# but alacritty doesn't know about them
|
||||
whitespace_characters = ''¬·→'';
|
||||
in
|
||||
"${mimes}[${delimiters}${whitespace_characters}]+";
|
||||
command = "xdg-open";
|
||||
post_processing = true;
|
||||
mouse = {
|
||||
enabled = true;
|
||||
mods = "None";
|
||||
};
|
||||
binding = {
|
||||
key = "U";
|
||||
mods = "Control|Shift";
|
||||
};
|
||||
}];
|
||||
enabled = [
|
||||
{
|
||||
regex =
|
||||
let
|
||||
mimes = "(mailto:|gemini:|gopher:|https:|http:|news:|file:|git:|ssh:|ftp:)";
|
||||
# I fucking hate regex, look at this bullshit
|
||||
delimiters = ''^\\u0000-\\u001F\\u007F-\\u009F<>"\\s{-}\\^⟨⟩`'';
|
||||
# Kakoune uses these characters to represent whitespace,
|
||||
# but alacritty doesn't know about them
|
||||
whitespace_characters = ''¬·→'';
|
||||
in
|
||||
"${mimes}[${delimiters}${whitespace_characters}]+";
|
||||
command = "xdg-open";
|
||||
post_processing = true;
|
||||
mouse = {
|
||||
enabled = true;
|
||||
mods = "None";
|
||||
};
|
||||
binding = {
|
||||
key = "U";
|
||||
mods = "Control|Shift";
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
mouse = {
|
||||
hide_when_typing = true;
|
||||
};
|
||||
mouse = { hide_when_typing = true; };
|
||||
keyboard.bindings = [
|
||||
{
|
||||
key = lib.toUpper key.up;
|
||||
|
@ -141,7 +156,9 @@ in
|
|||
};
|
||||
};
|
||||
|
||||
home.sessionVariables = { TERMINAL = "alacritty"; };
|
||||
home.sessionVariables = {
|
||||
TERMINAL = "alacritty";
|
||||
};
|
||||
|
||||
# Look at this fucking bullshit:
|
||||
# https://gitlab.gnome.org/GNOME/glib/-/blob/20c4fcb2a7246a2b205649eae3ebda4296217afc/gio/gdesktopappinfo.c#L2702
|
||||
|
|
|
@ -1,6 +1,17 @@
|
|||
{ config, pkgs, lib, inputs, ... }:
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
inputs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (pkgs.uservars) key theme accent font;
|
||||
inherit (pkgs.uservars)
|
||||
key
|
||||
theme
|
||||
accent
|
||||
font
|
||||
;
|
||||
inherit (theme) color;
|
||||
in
|
||||
{
|
||||
|
|
|
@ -1,4 +1,11 @@
|
|||
{ config, pkgs, lib, inputs, ... }: {
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
inputs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
wayland.windowManager.sway = {
|
||||
extraConfig = ''
|
||||
exec thunderbird
|
||||
|
|
|
@ -1,4 +1,11 @@
|
|||
{ config, pkgs, lib, inputs, ... }: {
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
inputs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
xdg.desktopEntries = {
|
||||
connect-controller = {
|
||||
name = "Connect Controller";
|
||||
|
|
|
@ -1,4 +1,10 @@
|
|||
{ config, pkgs, lib, ... }: {
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
{
|
||||
xdg.desktopEntries = {
|
||||
kak = {
|
||||
name = "Kakoune";
|
||||
|
@ -8,7 +14,10 @@
|
|||
terminal = true;
|
||||
type = "Application";
|
||||
icon = "kak.desktop";
|
||||
categories = [ "Utility" "TextEditor" ];
|
||||
categories = [
|
||||
"Utility"
|
||||
"TextEditor"
|
||||
];
|
||||
startupNotify = true;
|
||||
mimeType = [
|
||||
"text/english"
|
||||
|
@ -40,10 +49,15 @@
|
|||
terminal = true;
|
||||
type = "Application";
|
||||
icon = "mutt";
|
||||
categories = [ "Network" "Email" ];
|
||||
categories = [
|
||||
"Network"
|
||||
"Email"
|
||||
];
|
||||
startupNotify = false;
|
||||
mimeType = [ "x-scheme-handler/mailto" ];
|
||||
settings = { Keywords = "Mail;E-mail;"; };
|
||||
settings = {
|
||||
Keywords = "Mail;E-mail;";
|
||||
};
|
||||
};
|
||||
down_meme = {
|
||||
name = "DownMeme";
|
||||
|
|
|
@ -1,6 +1,16 @@
|
|||
{ config, pkgs, lib, font, ... }:
|
||||
let inherit (pkgs.uservars) desktop browser;
|
||||
bugfixedFirefox = pkgs.firefox-esr-unwrapped // { requireSigning = false; allowAddonSideload = true; };
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
font,
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (pkgs.uservars) desktop browser;
|
||||
bugfixedFirefox = pkgs.firefox-esr-unwrapped // {
|
||||
requireSigning = false;
|
||||
allowAddonSideload = true;
|
||||
};
|
||||
in
|
||||
{
|
||||
config = {
|
||||
|
|
|
@ -1,6 +1,21 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
let inherit (pkgs.uservars) key theme color accent font editor desktop;
|
||||
in {
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (pkgs.uservars)
|
||||
key
|
||||
theme
|
||||
color
|
||||
accent
|
||||
font
|
||||
editor
|
||||
desktop
|
||||
;
|
||||
in
|
||||
{
|
||||
config = {
|
||||
programs.fish = {
|
||||
enable = true;
|
||||
|
@ -34,10 +49,12 @@ in {
|
|||
};
|
||||
shellAbbrs = {
|
||||
off = "shutdown now";
|
||||
v = {
|
||||
"helix" = "hx";
|
||||
"kakoune" = "kak";
|
||||
}.${editor};
|
||||
v =
|
||||
{
|
||||
"helix" = "hx";
|
||||
"kakoune" = "kak";
|
||||
}
|
||||
.${editor};
|
||||
ns = "nix develop --command $SHELL";
|
||||
wcf = "wl-copy-file";
|
||||
c = "cargo";
|
||||
|
@ -64,7 +81,9 @@ in {
|
|||
gr = "cd (git root)";
|
||||
gri = "git rebase --interactive FETCH_HEAD";
|
||||
};
|
||||
functions = { fish_greeting = ""; };
|
||||
functions = {
|
||||
fish_greeting = "";
|
||||
};
|
||||
};
|
||||
programs = {
|
||||
zoxide.enable = true;
|
||||
|
@ -85,13 +104,18 @@ in {
|
|||
};
|
||||
# programs.command-not-found.enable = true;
|
||||
programs.nix-index.enable = true;
|
||||
home.packages = (with pkgs; with fishPlugins;[
|
||||
trash-cli
|
||||
wl-copy-file
|
||||
foreign-env
|
||||
] ++ (lib.optionals (desktop == "sway") [
|
||||
async-prompt
|
||||
done
|
||||
]));
|
||||
home.packages = (
|
||||
with pkgs;
|
||||
with fishPlugins;
|
||||
[
|
||||
trash-cli
|
||||
wl-copy-file
|
||||
foreign-env
|
||||
]
|
||||
++ (lib.optionals (desktop == "sway") [
|
||||
async-prompt
|
||||
done
|
||||
])
|
||||
);
|
||||
};
|
||||
}
|
||||
|
|
30
user/fzf.nix
30
user/fzf.nix
|
@ -1,6 +1,17 @@
|
|||
{ config, pkgs, lib, inputs, ... }:
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
inputs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (pkgs.uservars) key theme accent font;
|
||||
inherit (pkgs.uservars)
|
||||
key
|
||||
theme
|
||||
accent
|
||||
font
|
||||
;
|
||||
inherit (theme) color;
|
||||
|
||||
colors = {
|
||||
|
@ -15,22 +26,21 @@ let
|
|||
makeOptList = lib.mapAttrsToList makeKeyValue colors;
|
||||
makeColorValue = lib.strings.concatStringsSep "," makeOptList;
|
||||
color_opts = "--color=${makeColorValue}";
|
||||
preview_opts =
|
||||
"--preview '${pkgs.bat}/bin/bat --style=numbers --color=always {}'";
|
||||
|
||||
preview_opts = "--preview '${pkgs.bat}/bin/bat --style=numbers --color=always {}'";
|
||||
in
|
||||
{
|
||||
programs.fzf = {
|
||||
enable = true;
|
||||
|
||||
fileWidgetCommand = "${pkgs.fd}/bin/fd --type f";
|
||||
fileWidgetOptions =
|
||||
[ "--preview '${pkgs.bat}/bin/bat --style=numbers --color=always {}'" ];
|
||||
fileWidgetOptions = [ "--preview '${pkgs.bat}/bin/bat --style=numbers --color=always {}'" ];
|
||||
|
||||
changeDirWidgetCommand = "${pkgs.fd}/bin/fd --type d";
|
||||
changeDirWidgetOptions =
|
||||
[ "--preview '${pkgs.eza}/bin/eza -T L3 | head -200'" ];
|
||||
changeDirWidgetOptions = [ "--preview '${pkgs.eza}/bin/eza -T L3 | head -200'" ];
|
||||
|
||||
defaultOptions = [ color_opts preview_opts ];
|
||||
defaultOptions = [
|
||||
color_opts
|
||||
preview_opts
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
13
user/git.nix
13
user/git.nix
|
@ -1,6 +1,13 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
let inherit (pkgs.uservars) username mail;
|
||||
in {
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (pkgs.uservars) username mail;
|
||||
in
|
||||
{
|
||||
config = {
|
||||
programs.git = {
|
||||
enable = true;
|
||||
|
|
|
@ -1,4 +1,10 @@
|
|||
{ pkgs, lib, inputs, ... }: lib.mkIf (pkgs.uservars.desktop == "gnome") {
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
inputs,
|
||||
...
|
||||
}:
|
||||
lib.mkIf (pkgs.uservars.desktop == "gnome") {
|
||||
|
||||
home.pointerCursor = {
|
||||
name = "Adwaita";
|
||||
|
@ -14,9 +20,7 @@
|
|||
cursor-theme = "Adwaita";
|
||||
# color-scheme = "default";
|
||||
};
|
||||
"org/gnome/desktop/wm/preferences" = lib.mkForce {
|
||||
button-layout = "appmenu:close";
|
||||
};
|
||||
"org/gnome/desktop/wm/preferences" = lib.mkForce { button-layout = "appmenu:close"; };
|
||||
"org/gnome/desktop/input-sources" = {
|
||||
xkb-options = [ "lv3:lsgt_switch" ];
|
||||
};
|
||||
|
@ -40,7 +44,9 @@
|
|||
qt6Packages.qtstyleplugin-kvantum
|
||||
];
|
||||
|
||||
home.sessionVariables = { QT_QPA_PLATFORMTHEME = "qt5ct"; };
|
||||
home.sessionVariables = {
|
||||
QT_QPA_PLATFORMTHEME = "qt5ct";
|
||||
};
|
||||
|
||||
xdg.defaultApplications = {
|
||||
enable = true;
|
||||
|
|
17
user/gpg.nix
17
user/gpg.nix
|
@ -1,4 +1,10 @@
|
|||
{ config, pkgs, lib, ... }: {
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
{
|
||||
config = {
|
||||
services.gpg-agent = {
|
||||
enable = true;
|
||||
|
@ -16,7 +22,9 @@
|
|||
PartOf = [ "graphical-session.target" ];
|
||||
After = [ "graphical-session.target" ];
|
||||
};
|
||||
Service = { ExecStart = "${pkgs._gpg-unlock}/bin/_gpg-unlock"; };
|
||||
Service = {
|
||||
ExecStart = "${pkgs._gpg-unlock}/bin/_gpg-unlock";
|
||||
};
|
||||
};
|
||||
};
|
||||
systemd.user.timers = {
|
||||
|
@ -31,9 +39,10 @@
|
|||
OnUnitActiveSec = "300";
|
||||
Unit = "gpg_unlock.service";
|
||||
};
|
||||
Install = { WantedBy = [ "sway-session.target" ]; };
|
||||
Install = {
|
||||
WantedBy = [ "sway-session.target" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
}
|
||||
|
|
|
@ -74,7 +74,9 @@ in
|
|||
g.n = "goto_line_start";
|
||||
g.o = "goto_line_end";
|
||||
};
|
||||
keys.insert = { "A-k" = "normal_mode"; };
|
||||
keys.insert = {
|
||||
"A-k" = "normal_mode";
|
||||
};
|
||||
};
|
||||
languages.language = [
|
||||
{
|
||||
|
@ -96,14 +98,29 @@ in
|
|||
my-theme = {
|
||||
"inherits" = "gruvbox";
|
||||
"ui.menu" = "none";
|
||||
"ui.background" = { bg = "none"; };
|
||||
"ui.background" = {
|
||||
bg = "none";
|
||||
};
|
||||
"ui.virtual.whitespace" = color.nontxt;
|
||||
"ui.cursor.primary" = { fg = accent.fg; bg = accent.color; };
|
||||
"ui.cursorline.primary" = { bg = color.bg_dark; };
|
||||
"ui.cursorcolumn.primary" = { modifiers = [ "bold" ]; };
|
||||
"ui.cursorline" = { bg = "none"; };
|
||||
"ui.cursorcolumn" = { bg = "none"; };
|
||||
"ui.linenr.selected" = { fg = color.txt; };
|
||||
"ui.cursor.primary" = {
|
||||
fg = accent.fg;
|
||||
bg = accent.color;
|
||||
};
|
||||
"ui.cursorline.primary" = {
|
||||
bg = color.bg_dark;
|
||||
};
|
||||
"ui.cursorcolumn.primary" = {
|
||||
modifiers = [ "bold" ];
|
||||
};
|
||||
"ui.cursorline" = {
|
||||
bg = "none";
|
||||
};
|
||||
"ui.cursorcolumn" = {
|
||||
bg = "none";
|
||||
};
|
||||
"ui.linenr.selected" = {
|
||||
fg = color.txt;
|
||||
};
|
||||
|
||||
function = color.normal.orange;
|
||||
module = color.normal.brown;
|
||||
|
@ -124,8 +141,6 @@ in
|
|||
};
|
||||
};
|
||||
};
|
||||
home.sessionVariables = lib.mkIf (editor == "helix") {
|
||||
EDITOR = "hx";
|
||||
};
|
||||
home.sessionVariables = lib.mkIf (editor == "helix") { EDITOR = "hx"; };
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,4 +1,12 @@
|
|||
{ config, pkgs, lib, inputs, osConfig, ... }: {
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
inputs,
|
||||
osConfig,
|
||||
...
|
||||
}:
|
||||
{
|
||||
imports = [
|
||||
./controller.nix
|
||||
./waybar
|
||||
|
@ -70,9 +78,7 @@
|
|||
comma
|
||||
|
||||
# System monitors
|
||||
(btop.override {
|
||||
cudaSupport = true;
|
||||
})
|
||||
(btop.override { cudaSupport = true; })
|
||||
amdgpu_top
|
||||
inxi
|
||||
dmidecode
|
||||
|
@ -140,10 +146,11 @@
|
|||
};
|
||||
};
|
||||
home.sessionVariables = {
|
||||
VOLUME_CHANGE_SOUND =
|
||||
"${pkgs.sound-theme-freedesktop}/share/sounds/freedesktop/stereo/audio-volume-change.oga";
|
||||
VOLUME_CHANGE_SOUND = "${pkgs.sound-theme-freedesktop}/share/sounds/freedesktop/stereo/audio-volume-change.oga";
|
||||
};
|
||||
programs.bash = {
|
||||
enable = true;
|
||||
};
|
||||
programs.bash = { enable = true; };
|
||||
|
||||
xdg.defaultApplications = {
|
||||
enable = true;
|
||||
|
@ -154,7 +161,8 @@
|
|||
{
|
||||
firefox = lib.mkDefault "firefox.desktop";
|
||||
qutebrowser = lib.mkDefault "org.qutebrowser.qutebrowser.desktop";
|
||||
}.${pkgs.uservars.browser}
|
||||
}
|
||||
.${pkgs.uservars.browser}
|
||||
);
|
||||
document-viewer = lib.mkDefault "org.pwmt.zathura.desktop";
|
||||
file-manager = lib.mkDefault "thunar.desktop";
|
||||
|
@ -163,12 +171,14 @@
|
|||
torrent-client = lib.mkDefault "torrent.desktop";
|
||||
};
|
||||
|
||||
wayland.windowManager.sway.extraConfig = lib.optionalString (osConfig.networking.hostName or "" == "monolith") ''
|
||||
exec steam
|
||||
exec obs --startreplaybuffer --disable-shutdown-check
|
||||
exec deluge-gtk
|
||||
exec nicotine
|
||||
'';
|
||||
wayland.windowManager.sway.extraConfig =
|
||||
lib.optionalString (osConfig.networking.hostName or "" == "monolith")
|
||||
''
|
||||
exec steam
|
||||
exec obs --startreplaybuffer --disable-shutdown-check
|
||||
exec deluge-gtk
|
||||
exec nicotine
|
||||
'';
|
||||
|
||||
systemd.user.services.rm-target = {
|
||||
Unit = {
|
||||
|
@ -182,12 +192,16 @@
|
|||
};
|
||||
};
|
||||
systemd.user.timers.rm-target = {
|
||||
Unit = { Description = "Remove directories named 'target'"; };
|
||||
Unit = {
|
||||
Description = "Remove directories named 'target'";
|
||||
};
|
||||
Timer = {
|
||||
OnCalendar = "weekly";
|
||||
Unit = "rm-target.service";
|
||||
};
|
||||
Install = { WantedBy = [ "timers.target" ]; };
|
||||
Install = {
|
||||
WantedBy = [ "timers.target" ];
|
||||
};
|
||||
};
|
||||
|
||||
# This value determines the Home Manager release that your
|
||||
|
|
|
@ -1,4 +1,10 @@
|
|||
{ config, pkgs, lib, ... }: {
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
{
|
||||
config = lib.mkIf (pkgs.uservars.desktop == "hyprland") {
|
||||
wayland.windowManager.hyprland = {
|
||||
enable = false;
|
||||
|
@ -122,6 +128,9 @@
|
|||
'';
|
||||
};
|
||||
home.file.".config/eww".source = ./eww;
|
||||
home.packages = with pkgs; [ eww-wayland jq ];
|
||||
home.packages = with pkgs; [
|
||||
eww-wayland
|
||||
jq
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,4 +1,9 @@
|
|||
{ pkgs, lib, color, accent }:
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
color,
|
||||
accent,
|
||||
}:
|
||||
let
|
||||
colors = lib.mapAttrs (_: lib.replaceStrings [ "#" ] [ "rgb:" ]) {
|
||||
accent_fg = accent.fg;
|
||||
|
@ -94,8 +99,9 @@ with colors;
|
|||
face global InlayHint ${bg_light}+buif
|
||||
|
||||
# Lsp
|
||||
'' + (
|
||||
lib.concatStringsSep "\n" (lib.mapAttrsToList
|
||||
''
|
||||
+ (lib.concatStringsSep "\n" (
|
||||
lib.mapAttrsToList
|
||||
(name: color: ''
|
||||
face global HighlightDiagnostic${name} ${color},default+bu
|
||||
face global Diagnostic${name} ${color},default+bu
|
||||
|
@ -106,6 +112,5 @@ with colors;
|
|||
Error = "red";
|
||||
Warning = "yellow";
|
||||
Hint = "blue";
|
||||
})
|
||||
)
|
||||
|
||||
}
|
||||
))
|
||||
|
|
|
@ -1,6 +1,17 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (pkgs.uservars) key dmenu editor theme accent;
|
||||
inherit (pkgs.uservars)
|
||||
key
|
||||
dmenu
|
||||
editor
|
||||
theme
|
||||
accent
|
||||
;
|
||||
inherit (theme) color;
|
||||
inherit (pkgs) kakounePlugins;
|
||||
inherit (pkgs.kakouneUtils) buildKakounePlugin;
|
||||
|
@ -74,26 +85,39 @@ in
|
|||
})
|
||||
];
|
||||
extraConfig =
|
||||
lib.concatStringsSep "\n"
|
||||
(map (lib.readFile) ([
|
||||
./filetypes.kak
|
||||
./hooks.kak
|
||||
./indent.kak
|
||||
./keys.kak
|
||||
./lsp-config.kak
|
||||
./usermode.kak
|
||||
./git-mode.kak
|
||||
] ++ lib.optional (dmenu == "rofi") ./rofi-commands.kak)) + ''
|
||||
lib.concatStringsSep "\n" (
|
||||
map (lib.readFile) (
|
||||
[
|
||||
./filetypes.kak
|
||||
./hooks.kak
|
||||
./indent.kak
|
||||
./keys.kak
|
||||
./lsp-config.kak
|
||||
./usermode.kak
|
||||
./git-mode.kak
|
||||
]
|
||||
++ lib.optional (dmenu == "rofi") ./rofi-commands.kak
|
||||
)
|
||||
)
|
||||
+ ''
|
||||
|
||||
set global scrolloff 10,20
|
||||
set global autoreload yes
|
||||
set global startup_info_version 99999999
|
||||
set global scrolloff 10,20
|
||||
set global autoreload yes
|
||||
set global startup_info_version 99999999
|
||||
|
||||
'' + (import ./colors.nix {
|
||||
inherit pkgs lib color accent;
|
||||
''
|
||||
+ (import ./colors.nix {
|
||||
inherit
|
||||
pkgs
|
||||
lib
|
||||
color
|
||||
accent
|
||||
;
|
||||
});
|
||||
};
|
||||
home.file = { ".config/kak-lsp/kak-lsp.toml".source = ./kak-lsp.toml; };
|
||||
home.file = {
|
||||
".config/kak-lsp/kak-lsp.toml".source = ./kak-lsp.toml;
|
||||
};
|
||||
home.packages = with pkgs; [
|
||||
terminal
|
||||
ranger
|
||||
|
@ -123,4 +147,3 @@ in
|
|||
};
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,11 @@
|
|||
{ config, pkgs, lib, inputs, ... }: {
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
inputs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
programs.lf = {
|
||||
enable = true;
|
||||
keybindings = {
|
||||
|
|
19
user/man.nix
19
user/man.nix
|
@ -1,5 +1,20 @@
|
|||
{ config, pkgs, lib, inputs, ... }:
|
||||
let inherit (pkgs.uservars) key theme color accent font desktop editor;
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
inputs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (pkgs.uservars)
|
||||
key
|
||||
theme
|
||||
color
|
||||
accent
|
||||
font
|
||||
desktop
|
||||
editor
|
||||
;
|
||||
pagers = rec {
|
||||
kak = kakoune;
|
||||
kakoune = {
|
||||
|
|
|
@ -1,6 +1,20 @@
|
|||
{ config, pkgs, lib, font, ... }:
|
||||
let inherit (pkgs.uservars) key theme color accent font;
|
||||
in {
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
font,
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (pkgs.uservars)
|
||||
key
|
||||
theme
|
||||
color
|
||||
accent
|
||||
font
|
||||
;
|
||||
in
|
||||
{
|
||||
config = {
|
||||
programs.mangohud = {
|
||||
enable = true;
|
||||
|
|
|
@ -1,4 +1,10 @@
|
|||
{ config, pkgs, lib, font, ... }:
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
font,
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (pkgs.uservars) browser;
|
||||
cfg = config.xdg.defaultApplications;
|
||||
|
@ -26,20 +32,21 @@ in
|
|||
xdg.mimeApps =
|
||||
let
|
||||
|
||||
createMimeAssociation = (mime_prefix: application: mime_suffix: {
|
||||
"${mime_prefix}/${mime_suffix}" = application;
|
||||
});
|
||||
createMimeAssociation = (
|
||||
mime_prefix: application: mime_suffix: { "${mime_prefix}/${mime_suffix}" = application; }
|
||||
);
|
||||
|
||||
createMimeAssociations = (mime_prefix: application: mime_suffixes:
|
||||
lib.foldAttrs (n: _: n) { }
|
||||
(map (createMimeAssociation mime_prefix application) mime_suffixes));
|
||||
createMimeAssociations = (
|
||||
mime_prefix: application: mime_suffixes:
|
||||
lib.foldAttrs (n: _: n) { } (map (createMimeAssociation mime_prefix application) mime_suffixes)
|
||||
);
|
||||
|
||||
mimes = simple
|
||||
mimes =
|
||||
simple
|
||||
// (createMimeAssociations "text" cfg.text-editor text_suffixes)
|
||||
// (createMimeAssociations "image" cfg.image-viewer image_suffixes)
|
||||
// (createMimeAssociations "video" cfg.video-player video_suffixes)
|
||||
// (createMimeAssociations "application" cfg.archive-manager archive-suffixes)
|
||||
;
|
||||
// (createMimeAssociations "application" cfg.archive-manager archive-suffixes);
|
||||
|
||||
simple = {
|
||||
"inode/directory" = cfg.file-manager;
|
||||
|
@ -421,7 +428,6 @@ in
|
|||
"x-theora+ogg"
|
||||
];
|
||||
|
||||
|
||||
archive-suffixes = [
|
||||
"bzip2"
|
||||
"gzip"
|
||||
|
@ -487,6 +493,5 @@ in
|
|||
enable = true;
|
||||
defaultApplications = mimes;
|
||||
};
|
||||
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,4 +1,10 @@
|
|||
{ lib, pkgs, config, ... }: {
|
||||
{
|
||||
lib,
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
{
|
||||
config = lib.mkIf (pkgs.uservars.desktop != "gnome") {
|
||||
services.mpd = {
|
||||
enable = true;
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
{ pkgs, ... }: {
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
config = {
|
||||
programs.mpv = {
|
||||
enable = true;
|
||||
|
@ -6,8 +7,7 @@
|
|||
# ytdl-format='best';
|
||||
# ytdl_path = "yt-dlp";
|
||||
ytdl-format = "bestvideo[height<=1080][vcodec!=vp9]+bestaudio/best";
|
||||
ytdl-raw-options =
|
||||
"cookies=~/.cache/cookies-youtube-com.txt,mark-watched=";
|
||||
ytdl-raw-options = "cookies=~/.cache/cookies-youtube-com.txt,mark-watched=";
|
||||
osd-fractions = true;
|
||||
save-position-on-quit = true;
|
||||
keep-open = true;
|
||||
|
|
|
@ -1,10 +1,15 @@
|
|||
{ config, pkgs, lib, inputs, ... }: {
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
inputs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
config = {
|
||||
programs.password-store = {
|
||||
enable = true;
|
||||
package = pkgs.pass.withExtensions (ex: with ex; [
|
||||
pass-otp
|
||||
]);
|
||||
package = pkgs.pass.withExtensions (ex: with ex; [ pass-otp ]);
|
||||
};
|
||||
services = {
|
||||
pass-secret-service.enable = true;
|
||||
|
|
|
@ -1,4 +1,10 @@
|
|||
{ config, pkgs, lib, ... }: {
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
{
|
||||
# RNNoise is a noise supperssion neural network
|
||||
# Here we use it as a plugin for pipewire to create a virtual microphone
|
||||
config = {
|
||||
|
|
|
@ -1,8 +1,21 @@
|
|||
{ config, pkgs, lib, inputs, ... }:
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
inputs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (pkgs.uservars) key theme color accent font;
|
||||
inherit (pkgs.uservars)
|
||||
key
|
||||
theme
|
||||
color
|
||||
accent
|
||||
font
|
||||
;
|
||||
|
||||
make_direction_binds = lib.imap0 (idx: direction:
|
||||
make_direction_binds = lib.imap0 (
|
||||
idx: direction:
|
||||
let
|
||||
sign = if (idx < 2) then 1 else -1;
|
||||
axis = if ((lib.mod idx 2) != 0) then "y" else "x";
|
||||
|
@ -15,8 +28,8 @@ let
|
|||
montage_mode_shift_${axis}(${toString (sign * -1)})
|
||||
}
|
||||
}
|
||||
'');
|
||||
|
||||
''
|
||||
);
|
||||
in
|
||||
{
|
||||
# My bemenu wrapper
|
||||
|
@ -45,7 +58,12 @@ in
|
|||
<Left> { goto_file_relative(-1) }
|
||||
<Right> { goto_file_relative(1); }
|
||||
|
||||
${lib.concatStrings (make_direction_binds [ "left" "up" "right" "down" ])}
|
||||
${lib.concatStrings (make_direction_binds [
|
||||
"left"
|
||||
"up"
|
||||
"right"
|
||||
"down"
|
||||
])}
|
||||
|
||||
${key.tabL} { goto_file_relative(-1) }
|
||||
${key.tabR} { goto_file_relative(1); }
|
||||
|
@ -54,10 +72,7 @@ in
|
|||
d { send_keys(6) }
|
||||
y { send_keys(8) }
|
||||
|
||||
${if (key.layout == "colemak") then
|
||||
"\n t { toggle_scale_mode(0) }\n "
|
||||
else
|
||||
""}
|
||||
${if (key.layout == "colemak") then "\n t { toggle_scale_mode(0) }\n " else ""}
|
||||
|
||||
# vim: ft=ini
|
||||
'';
|
||||
|
|
|
@ -1,6 +1,18 @@
|
|||
{ config, pkgs, lib, font, ... }:
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
font,
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (pkgs.uservars) key theme accent font browser;
|
||||
inherit (pkgs.uservars)
|
||||
key
|
||||
theme
|
||||
accent
|
||||
font
|
||||
browser
|
||||
;
|
||||
inherit (theme) color;
|
||||
in
|
||||
{
|
||||
|
@ -38,9 +50,12 @@ in
|
|||
};
|
||||
in
|
||||
{
|
||||
bar = { bg = color.bg; };
|
||||
bar = {
|
||||
bg = color.bg;
|
||||
};
|
||||
pinned = tabs_defaults;
|
||||
} // tabs_defaults;
|
||||
}
|
||||
// tabs_defaults;
|
||||
|
||||
########################################################
|
||||
# Completion for urls and commands
|
||||
|
@ -48,10 +63,18 @@ in
|
|||
|
||||
completion = {
|
||||
fg = color.txt;
|
||||
even = { bg = color.bg; };
|
||||
odd = { bg = color.bg; };
|
||||
scrollbar = { bg = color.bg_dark; };
|
||||
match = { fg = accent.color; };
|
||||
even = {
|
||||
bg = color.bg;
|
||||
};
|
||||
odd = {
|
||||
bg = color.bg;
|
||||
};
|
||||
scrollbar = {
|
||||
bg = color.bg_dark;
|
||||
};
|
||||
match = {
|
||||
fg = accent.color;
|
||||
};
|
||||
category = {
|
||||
fg = color.txt;
|
||||
bg = color.bg_dark;
|
||||
|
@ -68,7 +91,9 @@ in
|
|||
top = color.bg_dark;
|
||||
bottom = color.bg_dark;
|
||||
};
|
||||
match = { fg = color.txt; };
|
||||
match = {
|
||||
fg = color.txt;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -102,10 +127,16 @@ in
|
|||
};
|
||||
url = {
|
||||
success = {
|
||||
https = { fg = color.txt; };
|
||||
http = { fg = color.normal.red; };
|
||||
https = {
|
||||
fg = color.txt;
|
||||
};
|
||||
http = {
|
||||
fg = color.normal.red;
|
||||
};
|
||||
};
|
||||
hover = {
|
||||
fg = color.normal.cyan;
|
||||
};
|
||||
hover = { fg = color.normal.cyan; };
|
||||
};
|
||||
};
|
||||
########################################################
|
||||
|
@ -113,9 +144,15 @@ in
|
|||
########################################################
|
||||
|
||||
downloads = {
|
||||
start = { bg = color.normal.blue; };
|
||||
stop = { bg = color.normal.green; };
|
||||
bar = { bg = color.bg; };
|
||||
start = {
|
||||
bg = color.normal.blue;
|
||||
};
|
||||
stop = {
|
||||
bg = color.normal.green;
|
||||
};
|
||||
bar = {
|
||||
bg = color.bg;
|
||||
};
|
||||
};
|
||||
|
||||
########################################################
|
||||
|
@ -125,7 +162,9 @@ in
|
|||
hints = {
|
||||
fg = color.txt;
|
||||
bg = color.bg;
|
||||
match = { fg = accent.color; };
|
||||
match = {
|
||||
fg = accent.color;
|
||||
};
|
||||
};
|
||||
|
||||
########################################################
|
||||
|
@ -135,7 +174,9 @@ in
|
|||
keyhint = {
|
||||
fg = color.txt;
|
||||
bg = color.bg;
|
||||
suffix = { fg = accent.color; };
|
||||
suffix = {
|
||||
fg = accent.color;
|
||||
};
|
||||
};
|
||||
|
||||
########################################################
|
||||
|
@ -151,7 +192,9 @@ in
|
|||
fg = accent.fg;
|
||||
bg = accent.color;
|
||||
};
|
||||
disabled = { fg = color.bg_light; };
|
||||
disabled = {
|
||||
fg = color.bg_light;
|
||||
};
|
||||
};
|
||||
|
||||
########################################################
|
||||
|
@ -216,4 +259,3 @@ in
|
|||
'';
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -1,63 +1,71 @@
|
|||
{ config, pkgs, lib, font, ... }:
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
font,
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (pkgs.uservars) theme;
|
||||
inherit (theme) color;
|
||||
|
||||
# ".config/qutebrowser/greasemonkey/darkreader.js".text =
|
||||
darkThemeUserscript = enabled: pkgs.writeText "darkreader.js" ''
|
||||
// ==UserScript==
|
||||
// @name Dark Reader (Unofficial)
|
||||
// @icon https://darkreader.org/images/darkreader-icon-256x256.png
|
||||
// @namespace DarkReader
|
||||
// @description Inverts the brightness of pages to reduce eye strain
|
||||
// @version 4.7.15
|
||||
// @author https://github.com/darkreader/darkreader#contributors
|
||||
// @homepageURL https://darkreader.org/ | https://github.com/darkreader/darkreader
|
||||
// @run-at document-end
|
||||
// @grant none
|
||||
// @include http*
|
||||
// @require https://cdn.jsdelivr.net/npm/darkreader/darkreader.min.js
|
||||
// @noframes
|
||||
// ==/UserScript==
|
||||
darkThemeUserscript =
|
||||
enabled:
|
||||
pkgs.writeText "darkreader.js" ''
|
||||
// ==UserScript==
|
||||
// @name Dark Reader (Unofficial)
|
||||
// @icon https://darkreader.org/images/darkreader-icon-256x256.png
|
||||
// @namespace DarkReader
|
||||
// @description Inverts the brightness of pages to reduce eye strain
|
||||
// @version 4.7.15
|
||||
// @author https://github.com/darkreader/darkreader#contributors
|
||||
// @homepageURL https://darkreader.org/ | https://github.com/darkreader/darkreader
|
||||
// @run-at document-end
|
||||
// @grant none
|
||||
// @include http*
|
||||
// @require https://cdn.jsdelivr.net/npm/darkreader/darkreader.min.js
|
||||
// @noframes
|
||||
// ==/UserScript==
|
||||
|
||||
DarkReader.setFetchMethod(window.fetch)
|
||||
DarkReader.setFetchMethod(window.fetch)
|
||||
|
||||
if (${if enabled then "false" else "true"}) {
|
||||
DarkReader.disable();
|
||||
return;
|
||||
}
|
||||
if (${if enabled then "false" else "true"}) {
|
||||
DarkReader.disable();
|
||||
return;
|
||||
}
|
||||
|
||||
const ignore_list = [
|
||||
"askubuntu.com",
|
||||
"mathoverflow.com",
|
||||
"mathoverflow.net",
|
||||
"serverfault.com",
|
||||
"stackapps.com",
|
||||
"stackexchange.com",
|
||||
"stackoverflow.com",
|
||||
"superuser.com",
|
||||
"hub.docker.com",
|
||||
];
|
||||
const ignore_list = [
|
||||
"askubuntu.com",
|
||||
"mathoverflow.com",
|
||||
"mathoverflow.net",
|
||||
"serverfault.com",
|
||||
"stackapps.com",
|
||||
"stackexchange.com",
|
||||
"stackoverflow.com",
|
||||
"superuser.com",
|
||||
"hub.docker.com",
|
||||
];
|
||||
|
||||
for (let item of ignore_list) {
|
||||
if (window.location.origin.indexOf(item) >= 0) {
|
||||
console.log("URL matched dark-mode ignore list");
|
||||
return;
|
||||
}
|
||||
}
|
||||
for (let item of ignore_list) {
|
||||
if (window.location.origin.indexOf(item) >= 0) {
|
||||
console.log("URL matched dark-mode ignore list");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
DarkReader.enable({
|
||||
brightness: 100,
|
||||
contrast: 100,
|
||||
sepia: 0,
|
||||
DarkReader.enable({
|
||||
brightness: 100,
|
||||
contrast: 100,
|
||||
sepia: 0,
|
||||
|
||||
darkSchemeBackgroundColor: "${color.bg}",
|
||||
darkSchemeTextColor: "${color.txt}",
|
||||
darkSchemeBackgroundColor: "${color.bg}",
|
||||
darkSchemeTextColor: "${color.txt}",
|
||||
|
||||
lightSchemeBackgroundColor: "${color.bg}",
|
||||
lightSchemeTextColor: "${color.txt}",
|
||||
});
|
||||
'';
|
||||
lightSchemeBackgroundColor: "${color.bg}",
|
||||
lightSchemeTextColor: "${color.txt}",
|
||||
});
|
||||
'';
|
||||
in
|
||||
{
|
||||
programs.qutebrowser.keyBindings = {
|
||||
|
@ -87,4 +95,3 @@ in
|
|||
'';
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,10 @@
|
|||
{ config, pkgs, lib, font, ... }:
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
font,
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (pkgs.uservars) key browser editor;
|
||||
in
|
||||
|
@ -59,7 +65,6 @@ in
|
|||
|
||||
"${key.insertMode}" = "mode-enter insert";
|
||||
};
|
||||
|
||||
};
|
||||
settings = {
|
||||
tabs.tree_tabs = true;
|
||||
|
@ -78,7 +83,8 @@ in
|
|||
{
|
||||
kakoune = "kak";
|
||||
helix = "hx";
|
||||
}.${editor}
|
||||
}
|
||||
.${editor}
|
||||
"{file}"
|
||||
"+{line}"
|
||||
];
|
||||
|
@ -112,7 +118,9 @@ in
|
|||
ExecStart = "${pkgs.qutebrowser}/bin/qutebrowser";
|
||||
Restart = "on-failure";
|
||||
};
|
||||
Install = { WantedBy = [ "sway-session.target" ]; };
|
||||
Install = {
|
||||
WantedBy = [ "sway-session.target" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
home.file = {
|
||||
|
@ -149,4 +157,3 @@ in
|
|||
};
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -33,4 +33,3 @@ in
|
|||
};
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,11 @@
|
|||
{ config, pkgs, lib, inputs, ... }: {
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
inputs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
xdg.configFile = {
|
||||
"ranger/rc.conf".source = ./rc.conf;
|
||||
"ranger/rifle.conf".source = ./rifle.conf;
|
||||
|
|
|
@ -1,6 +1,17 @@
|
|||
{ config, pkgs, lib, font, ... }:
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
font,
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (pkgs.uservars) key theme accent font;
|
||||
inherit (pkgs.uservars)
|
||||
key
|
||||
theme
|
||||
accent
|
||||
font
|
||||
;
|
||||
inherit (theme) color;
|
||||
in
|
||||
{
|
||||
|
@ -42,14 +53,15 @@ in
|
|||
};
|
||||
|
||||
"#window" = {
|
||||
background-color = mkLiteral
|
||||
"${color.bg}${lib.toHexString (theme.opacity * 255 / 100)}";
|
||||
background-color = mkLiteral "${color.bg}${lib.toHexString (theme.opacity * 255 / 100)}";
|
||||
# children = map mkLiteral [ "prompt" "entry" ];
|
||||
border = mkLiteral "2px solid";
|
||||
border-color = mkLiteral accent.color;
|
||||
padding = 0;
|
||||
};
|
||||
"#inputbar" = { margin = mkLiteral "10px"; };
|
||||
"#inputbar" = {
|
||||
margin = mkLiteral "10px";
|
||||
};
|
||||
"#listview" = {
|
||||
# fixed-height=0;
|
||||
border = mkLiteral "2px solid 0px 0px";
|
||||
|
@ -78,9 +90,7 @@ in
|
|||
margin-right = mkLiteral "20px";
|
||||
size = 24;
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
13
user/ssh.nix
13
user/ssh.nix
|
@ -1,6 +1,13 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
let inherit (pkgs.uservars) username mail;
|
||||
in {
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (pkgs.uservars) username mail;
|
||||
in
|
||||
{
|
||||
config = {
|
||||
programs.ssh.enable = true;
|
||||
programs.ssh.matchBlocks = {
|
||||
|
|
|
@ -1,6 +1,16 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (pkgs.uservars) key accent font theme;
|
||||
inherit (pkgs.uservars)
|
||||
key
|
||||
accent
|
||||
font
|
||||
theme
|
||||
;
|
||||
inherit (theme) color;
|
||||
in
|
||||
{
|
||||
|
@ -42,7 +52,13 @@ in
|
|||
bg_color = color.bg_dark;
|
||||
alert = "#000000";
|
||||
client = border: background: text: indicator: childBorder: {
|
||||
inherit border background text indicator childBorder;
|
||||
inherit
|
||||
border
|
||||
background
|
||||
text
|
||||
indicator
|
||||
childBorder
|
||||
;
|
||||
};
|
||||
in
|
||||
{
|
||||
|
@ -79,9 +95,7 @@ in
|
|||
};
|
||||
# setup cursor based on home.pointerCursor
|
||||
seat."*" = {
|
||||
xcursor_theme = "${config.home.pointerCursor.name} ${
|
||||
toString config.home.pointerCursor.size
|
||||
}";
|
||||
xcursor_theme = "${config.home.pointerCursor.name} ${toString config.home.pointerCursor.size}";
|
||||
hide_cursor = "when-typing enable";
|
||||
};
|
||||
};
|
||||
|
@ -132,7 +146,10 @@ in
|
|||
grim
|
||||
swappy
|
||||
(tesseract5.override {
|
||||
enableLanguages = [ "eng" "por" ];
|
||||
enableLanguages = [
|
||||
"eng"
|
||||
"por"
|
||||
];
|
||||
})
|
||||
];
|
||||
};
|
||||
|
|
|
@ -1,6 +1,16 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (pkgs.uservars) key accent font theme;
|
||||
inherit (pkgs.uservars)
|
||||
key
|
||||
accent
|
||||
font
|
||||
theme
|
||||
;
|
||||
inherit (theme) color;
|
||||
in
|
||||
{
|
||||
|
@ -26,11 +36,13 @@ in
|
|||
{
|
||||
profile = {
|
||||
name = "nomad";
|
||||
outputs = [{
|
||||
criteria = "eDP-1";
|
||||
status = "enable";
|
||||
position = "1920,312";
|
||||
}];
|
||||
outputs = [
|
||||
{
|
||||
criteria = "eDP-1";
|
||||
status = "enable";
|
||||
position = "1920,312";
|
||||
}
|
||||
];
|
||||
exec = [ "xrdb .Xresources" ];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,6 +1,16 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (pkgs.uservars) key accent font theme;
|
||||
inherit (pkgs.uservars)
|
||||
key
|
||||
accent
|
||||
font
|
||||
theme
|
||||
;
|
||||
inherit (theme) color;
|
||||
in
|
||||
{
|
||||
|
@ -48,6 +58,8 @@ in
|
|||
ExecStart = "${pkgs.mako}/bin/mako";
|
||||
Restart = "on-failure";
|
||||
};
|
||||
Install = { WantedBy = [ "sway-session.target" ]; };
|
||||
Install = {
|
||||
WantedBy = [ "sway-session.target" ];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,20 +1,18 @@
|
|||
{ config, pkgs, ... }:
|
||||
let
|
||||
# inherit (pkgs.uservars) key accent font theme;
|
||||
# inherit (theme) color;
|
||||
# inherit (pkgs) lib;
|
||||
|
||||
# mod = "Mod4";
|
||||
# menu = "wlauncher";
|
||||
# terminal = "alacritty";
|
||||
|
||||
# locked_binds =
|
||||
# lib.mapAttrs' (k: v: lib.nameValuePair "--locked ${k}" v);
|
||||
# code_binds =
|
||||
# lib.mapAttrs' (k: v: lib.nameValuePair "--to-code ${k}" v);
|
||||
# return_mode = lib.mapAttrs (k: v: "${v}; mode default");
|
||||
# playerctl = "exec ${pkgs.playerctl}/bin/playerctl";
|
||||
in
|
||||
# inherit (pkgs.uservars) key accent font theme;
|
||||
# inherit (theme) color;
|
||||
# inherit (pkgs) lib;
|
||||
# mod = "Mod4";
|
||||
# menu = "wlauncher";
|
||||
# terminal = "alacritty";
|
||||
# locked_binds =
|
||||
# lib.mapAttrs' (k: v: lib.nameValuePair "--locked ${k}" v);
|
||||
# code_binds =
|
||||
# lib.mapAttrs' (k: v: lib.nameValuePair "--to-code ${k}" v);
|
||||
# return_mode = lib.mapAttrs (k: v: "${v}; mode default");
|
||||
# playerctl = "exec ${pkgs.playerctl}/bin/playerctl";
|
||||
{
|
||||
wayland.windowManager.sway.config = {
|
||||
assigns = {
|
||||
|
|
|
@ -1,6 +1,11 @@
|
|||
{ config, pkgs, ... }:
|
||||
let
|
||||
inherit (pkgs.uservars) key accent font theme;
|
||||
inherit (pkgs.uservars)
|
||||
key
|
||||
accent
|
||||
font
|
||||
theme
|
||||
;
|
||||
inherit (theme) color;
|
||||
inherit (pkgs) lib;
|
||||
|
||||
|
@ -21,29 +26,27 @@ let
|
|||
|
||||
# mod+1 to swich to workspace 1
|
||||
# mod+shift+1 to move to workspace 1
|
||||
workspace_binds = lib.forEachMerge (lib.range 1 10) (i:
|
||||
workspace_binds = lib.forEachMerge (lib.range 1 10) (
|
||||
i:
|
||||
let
|
||||
key = toString (lib.mod i 10);
|
||||
workspaceNumber = toString i;
|
||||
in
|
||||
{
|
||||
"${mod}+${key}" = "workspace number ${workspaceNumber}";
|
||||
"${mod}+Shift+${key}" =
|
||||
"move container to workspace number ${workspaceNumber}";
|
||||
});
|
||||
"${mod}+Shift+${key}" = "move container to workspace number ${workspaceNumber}";
|
||||
}
|
||||
);
|
||||
|
||||
prev_next_binds =
|
||||
let
|
||||
maybe_window = key:
|
||||
if (lib.strings.hasInfix "button" key) then
|
||||
"--whole-window"
|
||||
else
|
||||
"";
|
||||
makePrevNextBindFunction = (prev_or_next:
|
||||
maybe_window = key: if (lib.strings.hasInfix "button" key) then "--whole-window" else "";
|
||||
makePrevNextBindFunction = (
|
||||
prev_or_next:
|
||||
map (key: {
|
||||
"${maybe_window key} ${mod}+${key}" =
|
||||
"workspace ${prev_or_next}_on_output";
|
||||
}));
|
||||
"${maybe_window key} ${mod}+${key}" = "workspace ${prev_or_next}_on_output";
|
||||
})
|
||||
);
|
||||
prev_binds = makePrevNextBindFunction "prev" [
|
||||
key.tabL
|
||||
"bracketleft"
|
||||
|
@ -67,36 +70,51 @@ let
|
|||
# for every direction with both arrow keys and vim keys
|
||||
movement_binds =
|
||||
let
|
||||
directions = [ "Left" "Up" "Right" "Down" ];
|
||||
directions = [
|
||||
"Left"
|
||||
"Up"
|
||||
"Right"
|
||||
"Down"
|
||||
];
|
||||
makeVimKeys = (k: key.${lib.toLower k});
|
||||
makeArrowKeys = (k: k);
|
||||
makeResizeCommand = direction:
|
||||
makeResizeCommand =
|
||||
direction:
|
||||
{
|
||||
Left = "shrink width 20px";
|
||||
Up = "shrink height 20px";
|
||||
Right = "grow width 20px";
|
||||
Down = "grow height 20px";
|
||||
}.${direction};
|
||||
}
|
||||
.${direction};
|
||||
in
|
||||
lib.forEachMerge [ makeVimKeys makeArrowKeys ] (prefixFun:
|
||||
lib.forEachMerge directions (direction:
|
||||
let
|
||||
resize_cmd = makeResizeCommand direction;
|
||||
keyBind = prefixFun direction;
|
||||
in
|
||||
{
|
||||
# Move focus
|
||||
"${mod}+${keyBind}" = "focus ${direction}";
|
||||
# Move window
|
||||
"${mod}+Shift+${keyBind}" = "move ${direction}";
|
||||
# Resize window
|
||||
"${mod}+Control+${keyBind}" = "resize ${resize_cmd}";
|
||||
# focus output
|
||||
"${mod}+mod1+${keyBind}" = "focus output ${direction}";
|
||||
# Move workspace to output
|
||||
"${mod}+mod1+Shift+${keyBind}" =
|
||||
"move workspace output ${direction}";
|
||||
}));
|
||||
lib.forEachMerge
|
||||
[
|
||||
makeVimKeys
|
||||
makeArrowKeys
|
||||
]
|
||||
(
|
||||
prefixFun:
|
||||
lib.forEachMerge directions (
|
||||
direction:
|
||||
let
|
||||
resize_cmd = makeResizeCommand direction;
|
||||
keyBind = prefixFun direction;
|
||||
in
|
||||
{
|
||||
# Move focus
|
||||
"${mod}+${keyBind}" = "focus ${direction}";
|
||||
# Move window
|
||||
"${mod}+Shift+${keyBind}" = "move ${direction}";
|
||||
# Resize window
|
||||
"${mod}+Control+${keyBind}" = "resize ${resize_cmd}";
|
||||
# focus output
|
||||
"${mod}+mod1+${keyBind}" = "focus output ${direction}";
|
||||
# Move workspace to output
|
||||
"${mod}+mod1+Shift+${keyBind}" = "move workspace output ${direction}";
|
||||
}
|
||||
)
|
||||
);
|
||||
|
||||
parenting_binds = {
|
||||
"${mod}+equal" = "focus parent";
|
||||
|
@ -116,8 +134,7 @@ let
|
|||
XF86AudioRaiseVolume = "exec volumesh -i 10";
|
||||
XF86AudioLowerVolume = "exec volumesh -d 10";
|
||||
XF86AudioMute = "exec volumesh -t";
|
||||
XF86AudioMicMute =
|
||||
"exec pactl set-source-mute @DEFAULT_SOURCE@ toggle";
|
||||
XF86AudioMicMute = "exec pactl set-source-mute @DEFAULT_SOURCE@ toggle";
|
||||
# Control media
|
||||
XF86AudioPlay = "exec playerctl play-pause";
|
||||
XF86AudioPause = "exec playerctl play-pause";
|
||||
|
@ -136,8 +153,7 @@ let
|
|||
# Screen area to file
|
||||
"Shift+Print" = "exec ${pkgs.screenshotsh}/bin/screenshotsh area";
|
||||
# Screen area to clipboard
|
||||
"Control+Shift+Print" =
|
||||
"exec ${pkgs.screenshotsh}/bin/screenshotsh area-clip";
|
||||
"Control+Shift+Print" = "exec ${pkgs.screenshotsh}/bin/screenshotsh area-clip";
|
||||
# Focused monitor to clipboard
|
||||
"Control+Print" = "exec ${pkgs.screenshotsh}/bin/screenshotsh clip";
|
||||
};
|
||||
|
@ -155,8 +171,7 @@ let
|
|||
"${mod}+Alt+x" = "exec pkill wl-crosshair || exec wl-crosshair";
|
||||
"${mod}+x" = "kill";
|
||||
"${mod}+m" = "mode audio";
|
||||
"${mod}+escape" =
|
||||
"mode passthrough;exec notify-send 'Passthrough on'";
|
||||
"${mod}+escape" = "mode passthrough;exec notify-send 'Passthrough on'";
|
||||
"${mod}+ctrl+k" = "exec swaymsg input type:pointer events disabled";
|
||||
"${mod}+ctrl+shift+k" = "exec swaymsg input type:pointer events enabled";
|
||||
"${mod}+f" = "fullscreen toggle";
|
||||
|
|
|
@ -1,6 +1,11 @@
|
|||
{ config, pkgs, ... }:
|
||||
let
|
||||
inherit (pkgs.uservars) key accent font theme;
|
||||
inherit (pkgs.uservars)
|
||||
key
|
||||
accent
|
||||
font
|
||||
theme
|
||||
;
|
||||
inherit (theme) color;
|
||||
inherit (pkgs) lib;
|
||||
|
||||
|
@ -8,10 +13,8 @@ let
|
|||
menu = "wlauncher";
|
||||
terminal = "alacritty";
|
||||
|
||||
locked =
|
||||
lib.mapAttrs' (k: v: lib.nameValuePair "--locked ${k}" v);
|
||||
to-code =
|
||||
lib.mapAttrs' (k: v: lib.nameValuePair "--to-code ${k}" v);
|
||||
locked = lib.mapAttrs' (k: v: lib.nameValuePair "--locked ${k}" v);
|
||||
to-code = lib.mapAttrs' (k: v: lib.nameValuePair "--to-code ${k}" v);
|
||||
quit-mode = lib.mapAttrs (k: v: "${v}; mode default");
|
||||
playerctl = "exec ${pkgs.playerctl}/bin/playerctl";
|
||||
|
||||
|
@ -20,20 +23,32 @@ in
|
|||
{
|
||||
wayland.windowManager.sway.config.modes = {
|
||||
audio =
|
||||
(bind_group [ to-code locked ] {
|
||||
${key.tabR} = "exec volumesh -i 10";
|
||||
${key.tabL} = "exec volumesh -d 10";
|
||||
${key.right} = "exec mpc next";
|
||||
${key.left} = "exec mpc prev";
|
||||
${key.up} = "exec volumesh --mpd -i 10";
|
||||
${key.down} = "exec volumesh --mpd -d 10";
|
||||
}) //
|
||||
(bind_group [ locked quit-mode ] {
|
||||
"space" = "exec mpc toggle";
|
||||
"escape" = "";
|
||||
"q" = "";
|
||||
}) //
|
||||
(bind_group [ quit-mode ] {
|
||||
(bind_group
|
||||
[
|
||||
to-code
|
||||
locked
|
||||
]
|
||||
{
|
||||
${key.tabR} = "exec volumesh -i 10";
|
||||
${key.tabL} = "exec volumesh -d 10";
|
||||
${key.right} = "exec mpc next";
|
||||
${key.left} = "exec mpc prev";
|
||||
${key.up} = "exec volumesh --mpd -i 10";
|
||||
${key.down} = "exec volumesh --mpd -d 10";
|
||||
}
|
||||
)
|
||||
// (bind_group
|
||||
[
|
||||
locked
|
||||
quit-mode
|
||||
]
|
||||
{
|
||||
"space" = "exec mpc toggle";
|
||||
"escape" = "";
|
||||
"q" = "";
|
||||
}
|
||||
)
|
||||
// (bind_group [ quit-mode ] {
|
||||
"m" = "exec volumesh -t";
|
||||
"s" = "exec ${pkgs.pulse_sink}/bin/pulse_sink";
|
||||
|
||||
|
@ -47,28 +62,38 @@ in
|
|||
"Ctrl+s" = "exec ${pkgs.musmenu}/bin/musmenu psave";
|
||||
"Ctrl+o" = "exec ${pkgs.musmenu}/bin/musmenu pload";
|
||||
"Ctrl+d" = "exec ${pkgs.musmenu}/bin/musmenu pdelete";
|
||||
}) //
|
||||
{
|
||||
})
|
||||
// {
|
||||
"p" = "mode playerctl";
|
||||
"Ctrl+c" = "exec musmenu pclear";
|
||||
}
|
||||
;
|
||||
};
|
||||
|
||||
playerctl =
|
||||
(bind_group [ to-code locked ] {
|
||||
${key.left} = "${playerctl} previous";
|
||||
${key.right} = "${playerctl} next";
|
||||
${key.up} = "${playerctl} volume 10+";
|
||||
${key.down} = "${playerctl} volume 10-";
|
||||
${key.tabR} = "${playerctl} volume 10+";
|
||||
${key.tabL} = "${playerctl} volume 10-";
|
||||
}) //
|
||||
(bind_group [ to-code quit-mode ] {
|
||||
"space" = "${playerctl} play-pause";
|
||||
"escape" = "";
|
||||
"q" = "";
|
||||
})
|
||||
;
|
||||
(bind_group
|
||||
[
|
||||
to-code
|
||||
locked
|
||||
]
|
||||
{
|
||||
${key.left} = "${playerctl} previous";
|
||||
${key.right} = "${playerctl} next";
|
||||
${key.up} = "${playerctl} volume 10+";
|
||||
${key.down} = "${playerctl} volume 10-";
|
||||
${key.tabR} = "${playerctl} volume 10+";
|
||||
${key.tabL} = "${playerctl} volume 10-";
|
||||
}
|
||||
)
|
||||
// (bind_group
|
||||
[
|
||||
to-code
|
||||
quit-mode
|
||||
]
|
||||
{
|
||||
"space" = "${playerctl} play-pause";
|
||||
"escape" = "";
|
||||
"q" = "";
|
||||
}
|
||||
);
|
||||
|
||||
passthrough = {
|
||||
"${mod}+escape" = "mode default;exec notify-send 'Passthrough off'";
|
||||
|
|
|
@ -1,6 +1,16 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (pkgs.uservars) key accent font theme;
|
||||
inherit (pkgs.uservars)
|
||||
key
|
||||
accent
|
||||
font
|
||||
theme
|
||||
;
|
||||
inherit (theme) color;
|
||||
|
||||
asScript = filename: text: toString (pkgs.writeShellScript filename text);
|
||||
|
|
|
@ -1,6 +1,16 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (pkgs.uservars) key accent font theme;
|
||||
inherit (pkgs.uservars)
|
||||
key
|
||||
accent
|
||||
font
|
||||
theme
|
||||
;
|
||||
inherit (theme) color;
|
||||
in
|
||||
{
|
||||
|
|
|
@ -1,38 +1,53 @@
|
|||
{ config, pkgs, lib, inputs, ... }:
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
inputs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (pkgs.uservars) theme font desktop;
|
||||
inherit (theme) color gtk_theme icon_theme cursor_theme;
|
||||
inherit (theme)
|
||||
color
|
||||
gtk_theme
|
||||
icon_theme
|
||||
cursor_theme
|
||||
;
|
||||
in
|
||||
lib.mkIf (desktop == "sway")
|
||||
{
|
||||
lib.mkIf (desktop == "sway") {
|
||||
home.pointerCursor = {
|
||||
name = cursor_theme;
|
||||
size = 24;
|
||||
package = pkgs.bibata-cursors;
|
||||
gtk.enable = true;
|
||||
};
|
||||
gtk = {
|
||||
enable = true;
|
||||
font = {
|
||||
name = font.interface;
|
||||
size = font.size.small;
|
||||
};
|
||||
theme = {
|
||||
name = gtk_theme;
|
||||
package = pkgs.orchis_theme_compact;
|
||||
};
|
||||
iconTheme = {
|
||||
name = icon_theme;
|
||||
package = pkgs.papirus_red;
|
||||
};
|
||||
} // (
|
||||
let
|
||||
shared.extraConfig = {
|
||||
gtk-decoration-layout = "menu:";
|
||||
gtk =
|
||||
{
|
||||
enable = true;
|
||||
font = {
|
||||
name = font.interface;
|
||||
size = font.size.small;
|
||||
};
|
||||
in
|
||||
{ gtk4 = shared; gtk3 = shared; }
|
||||
);
|
||||
theme = {
|
||||
name = gtk_theme;
|
||||
package = pkgs.orchis_theme_compact;
|
||||
};
|
||||
iconTheme = {
|
||||
name = icon_theme;
|
||||
package = pkgs.papirus_red;
|
||||
};
|
||||
}
|
||||
// (
|
||||
let
|
||||
shared.extraConfig = {
|
||||
gtk-decoration-layout = "menu:";
|
||||
};
|
||||
in
|
||||
{
|
||||
gtk4 = shared;
|
||||
gtk3 = shared;
|
||||
}
|
||||
);
|
||||
qt = {
|
||||
enable = true;
|
||||
platformTheme.name = "qtct";
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
{ ... }: {
|
||||
{ ... }:
|
||||
{
|
||||
services.syncthing = {
|
||||
enable = true;
|
||||
tray = {
|
||||
|
|
|
@ -1,8 +1,12 @@
|
|||
{ pkgs, ... }: {
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
_thunar-terminal
|
||||
(xfce.thunar.override {
|
||||
thunarPlugins = with pkgs.xfce; [ thunar-volman thunar-archive-plugin ];
|
||||
thunarPlugins = with pkgs.xfce; [
|
||||
thunar-volman
|
||||
thunar-archive-plugin
|
||||
];
|
||||
})
|
||||
];
|
||||
|
||||
|
|
|
@ -1,19 +1,23 @@
|
|||
{ pkgs, lib, ... }:
|
||||
let
|
||||
inherit (pkgs.uservars) nextcloud;
|
||||
pass_cmd = (pkgs.writeShellScript "get_pass" ''
|
||||
pass "${nextcloud.pass}" | head -n1
|
||||
'');
|
||||
pass_cmd = (
|
||||
pkgs.writeShellScript "get_pass" ''
|
||||
pass "${nextcloud.pass}" | head -n1
|
||||
''
|
||||
);
|
||||
in
|
||||
{
|
||||
systemd.user.services.vdirsyncer = {
|
||||
Unit.Description = "vdirsyncer calendar and contacts synchronization";
|
||||
Service = {
|
||||
Type = "oneshot";
|
||||
ExecStart = toString (pkgs.writeShellScript "run-vdirsyncer" ''
|
||||
${pkgs.coreutils}/bin/yes | ${pkgs.vdirsyncer}/bin/vdirsyncer discover
|
||||
${pkgs.coreutils}/bin/yes | ${pkgs.vdirsyncer}/bin/vdirsyncer sync
|
||||
'');
|
||||
ExecStart = toString (
|
||||
pkgs.writeShellScript "run-vdirsyncer" ''
|
||||
${pkgs.coreutils}/bin/yes | ${pkgs.vdirsyncer}/bin/vdirsyncer discover
|
||||
${pkgs.coreutils}/bin/yes | ${pkgs.vdirsyncer}/bin/vdirsyncer sync
|
||||
''
|
||||
);
|
||||
};
|
||||
};
|
||||
systemd.user.timers.vdirsyncer = {
|
||||
|
@ -45,9 +49,9 @@ in
|
|||
|
||||
[storage contacts_remote]
|
||||
type = "carddav"
|
||||
url = "https://${ nextcloud.host }/remote.php/dav/addressbooks/users/${ nextcloud.user }/"
|
||||
username = "${ nextcloud.user }"
|
||||
password.fetch = [ "command", "${ pass_cmd }" ]
|
||||
url = "https://${nextcloud.host}/remote.php/dav/addressbooks/users/${nextcloud.user}/"
|
||||
username = "${nextcloud.user}"
|
||||
password.fetch = [ "command", "${pass_cmd}" ]
|
||||
|
||||
[pair calendar]
|
||||
a = "calendar_local"
|
||||
|
@ -63,9 +67,9 @@ in
|
|||
|
||||
[storage calendar_remote]
|
||||
type = "caldav"
|
||||
url = "https://${ nextcloud.host }/remote.php/dav/calendars/${ nextcloud.user }/"
|
||||
username = "${ nextcloud.user }"
|
||||
password.fetch = [ "command", "${ pass_cmd }" ]
|
||||
url = "https://${nextcloud.host}/remote.php/dav/calendars/${nextcloud.user}/"
|
||||
username = "${nextcloud.user}"
|
||||
password.fetch = [ "command", "${pass_cmd}" ]
|
||||
'';
|
||||
"todoman/config.py".text = ''
|
||||
path = "~/.local/share/calendars/*"
|
||||
|
@ -76,10 +80,8 @@ in
|
|||
'';
|
||||
};
|
||||
|
||||
|
||||
home.packages = with pkgs; [
|
||||
vdirsyncer
|
||||
todoman
|
||||
];
|
||||
|
||||
}
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
{ pkgs, config, ... }: {
|
||||
{ pkgs, config, ... }:
|
||||
{
|
||||
|
||||
programs.vscode = {
|
||||
enable = true;
|
||||
|
|
|
@ -1,6 +1,18 @@
|
|||
{ config, osConfig, pkgs, lib, font, ... }:
|
||||
{
|
||||
config,
|
||||
osConfig,
|
||||
pkgs,
|
||||
lib,
|
||||
font,
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (pkgs.uservars) key theme accent font;
|
||||
inherit (pkgs.uservars)
|
||||
key
|
||||
theme
|
||||
accent
|
||||
font
|
||||
;
|
||||
inherit (theme) color;
|
||||
in
|
||||
{
|
||||
|
@ -9,184 +21,226 @@ in
|
|||
enable = true;
|
||||
systemd.enable = true;
|
||||
systemd.target = "sway-session.target";
|
||||
settings = [{
|
||||
layer = "top";
|
||||
modules-left = [ "sway/workspaces" "sway/mode" "sway/window" ];
|
||||
modules-center = [ "clock" ];
|
||||
modules-right = lib.flatten [
|
||||
"sway/language"
|
||||
"mpd"
|
||||
"custom/playerctl"
|
||||
"tray"
|
||||
"custom/caffeine"
|
||||
"pulseaudio"
|
||||
(lib.optional (osConfig.services.vpn.enable or false) "custom/vpn")
|
||||
"network"
|
||||
"battery"
|
||||
];
|
||||
battery = {
|
||||
tooltip = true;
|
||||
states = {
|
||||
full = 100;
|
||||
good = 95;
|
||||
warning = 25;
|
||||
};
|
||||
format = "{icon} ";
|
||||
format-charging = "";
|
||||
format-plugged = "";
|
||||
format-full = "";
|
||||
format-warning = "{icon} {time}";
|
||||
format-icons = [ "" "" "" "" "" "" ];
|
||||
};
|
||||
network = {
|
||||
interval = 5;
|
||||
tooltip = false;
|
||||
on-click = "terminal -e iwd";
|
||||
format-wifi = "{icon}";
|
||||
format-icons = [ "" "" "" "" "" ];
|
||||
format-ethernet = "";
|
||||
format-linked = "";
|
||||
format-disconnected = "";
|
||||
};
|
||||
"sway/workspaces" = {
|
||||
enable-bar-scroll = true;
|
||||
format = "{icon}";
|
||||
format-icons = {
|
||||
"1" = "";
|
||||
"2" = "";
|
||||
"3" = "";
|
||||
"4" = "";
|
||||
"5" = "";
|
||||
"6" = "";
|
||||
"7" = "";
|
||||
"8" = "";
|
||||
"9" = "";
|
||||
"10" = "";
|
||||
urgent = "";
|
||||
# focused = "";
|
||||
default = "";
|
||||
};
|
||||
};
|
||||
"sway/window" = { max-length = 40; };
|
||||
"tray" = {
|
||||
"spacing" = 7;
|
||||
"icon-size" = 19;
|
||||
};
|
||||
clock = {
|
||||
interval = 60;
|
||||
format = "<b>{:%H:%M %a %d/%m}</b>";
|
||||
tooltip-format = "<tt><small>{calendar}</small></tt>";
|
||||
calendar = {
|
||||
mode = "year";
|
||||
mode-mon-col = 3;
|
||||
weeks-pos = "right";
|
||||
on-scroll = 1;
|
||||
on-click-right = "mode";
|
||||
format = {
|
||||
months = "<span color='${color.normal.magenta}'><b>{}</b></span>";
|
||||
days = "<span color='${color.txt}'><b>{}</b></span>";
|
||||
weeks = "<span color='${color.normal.cyan}'><b>W{}</b></span>";
|
||||
weekdays = "<span color='${color.normal.yellow}'><b>{}</b></span>";
|
||||
today = "<span color='${accent.color}'><b><u>{}</u></b></span>";
|
||||
settings = [
|
||||
{
|
||||
layer = "top";
|
||||
modules-left = [
|
||||
"sway/workspaces"
|
||||
"sway/mode"
|
||||
"sway/window"
|
||||
];
|
||||
modules-center = [ "clock" ];
|
||||
modules-right = lib.flatten [
|
||||
"sway/language"
|
||||
"mpd"
|
||||
"custom/playerctl"
|
||||
"tray"
|
||||
"custom/caffeine"
|
||||
"pulseaudio"
|
||||
(lib.optional (osConfig.services.vpn.enable or false) "custom/vpn")
|
||||
"network"
|
||||
"battery"
|
||||
];
|
||||
battery = {
|
||||
tooltip = true;
|
||||
states = {
|
||||
full = 100;
|
||||
good = 95;
|
||||
warning = 25;
|
||||
};
|
||||
format = "{icon} ";
|
||||
format-charging = "";
|
||||
format-plugged = "";
|
||||
format-full = "";
|
||||
format-warning = "{icon} {time}";
|
||||
format-icons = [
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
];
|
||||
};
|
||||
actions = {
|
||||
on-click-right = "mode";
|
||||
on-click-forward = "tz_up";
|
||||
on-click-backward = "tz_down";
|
||||
on-scroll-up = "shift_up";
|
||||
on-scroll-down = "shift_down";
|
||||
};
|
||||
};
|
||||
mpd =
|
||||
let
|
||||
mpc = "${pkgs.mpc-cli}/bin/mpc";
|
||||
in
|
||||
{
|
||||
format = "{stateIcon} {title} - {artist}";
|
||||
format-paused = "{stateIcon}";
|
||||
format-stopped = "";
|
||||
state-icons = {
|
||||
stopped = "";
|
||||
paused = "";
|
||||
playing = "";
|
||||
};
|
||||
network = {
|
||||
interval = 5;
|
||||
tooltip = false;
|
||||
on-click = "${mpc} toggle";
|
||||
on-scroll-up = "${mpc} vol +10";
|
||||
on-scroll-down = "${mpc} vol -10";
|
||||
on-click = "terminal -e iwd";
|
||||
format-wifi = "{icon}";
|
||||
format-icons = [
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
];
|
||||
format-ethernet = "";
|
||||
format-linked = "";
|
||||
format-disconnected = "";
|
||||
};
|
||||
"custom/playerctl" = {
|
||||
format = "{} ";
|
||||
exec = "${pkgs.playerctl-status}/bin/playerctl-status";
|
||||
on-click = "${pkgs.playerctl}/bin/playerctl --ignore-player=mpd play-pause";
|
||||
interval = 1;
|
||||
tooltip = false;
|
||||
};
|
||||
"sway/language" = { format = "{short} {variant}"; };
|
||||
"custom/caffeine" = {
|
||||
format = "{}";
|
||||
exec = "systemctl --user status swayidle > /dev/null && echo || echo ";
|
||||
on-click = "${pkgs._sway_idle_toggle}/bin/_sway_idle_toggle";
|
||||
interval = 1;
|
||||
tooltip = false;
|
||||
};
|
||||
"custom/vpn" = lib.mkIf (osConfig.services.vpn.enable or false) {
|
||||
format = "{}";
|
||||
exec = ''
|
||||
${pkgs.mullvad}/bin/mullvad status | ${pkgs.gnugrep}/bin/grep "^Connected" > /dev/null \
|
||||
&& echo "" \
|
||||
|| echo ""
|
||||
'';
|
||||
on-click = "mullvad connect";
|
||||
on-click-right = "mullvad disconnect";
|
||||
interval = 1;
|
||||
tooltip = false;
|
||||
};
|
||||
pulseaudio = {
|
||||
interval = 5;
|
||||
tooltip = false;
|
||||
scroll-step = 10;
|
||||
format = "{icon}";
|
||||
format-bluetooth = "";
|
||||
format-bluetooth-muted = "";
|
||||
format-muted = "";
|
||||
format-icons = {
|
||||
"rtp-sink" =
|
||||
[ "" "" "" ];
|
||||
"alsa_output.usb-C-Media_Electronics_Inc._USB_Audio_Device-00.analog-stereo" =
|
||||
[ " " " " " " ];
|
||||
"alsa_output.pci-0000_09_00.4.analog-stereo" =
|
||||
[ " " " " " " ];
|
||||
headphone = [ " " " " " " ];
|
||||
handsfree = "";
|
||||
headset = "";
|
||||
phone = "";
|
||||
portable = "";
|
||||
car = "";
|
||||
default = [ "" "" "" ];
|
||||
"sway/workspaces" = {
|
||||
enable-bar-scroll = true;
|
||||
format = "{icon}";
|
||||
format-icons = {
|
||||
"1" = "";
|
||||
"2" = "";
|
||||
"3" = "";
|
||||
"4" = "";
|
||||
"5" = "";
|
||||
"6" = "";
|
||||
"7" = "";
|
||||
"8" = "";
|
||||
"9" = "";
|
||||
"10" = "";
|
||||
urgent = "";
|
||||
# focused = "";
|
||||
default = "";
|
||||
};
|
||||
};
|
||||
on-click = "pavucontrol";
|
||||
on-click-right = "${pkgs.pulse_sink}/bin/pulse_sink";
|
||||
on-scroll-up = "${pkgs.volumesh}/bin/volumesh -i 10";
|
||||
on-scroll-down = "${pkgs.volumesh}/bin/volumesh -d 10";
|
||||
};
|
||||
}];
|
||||
style = builtins.readFile (pkgs.substituteAll {
|
||||
src = ./style.css;
|
||||
"sway/window" = {
|
||||
max-length = 40;
|
||||
};
|
||||
"tray" = {
|
||||
"spacing" = 7;
|
||||
"icon-size" = 19;
|
||||
};
|
||||
clock = {
|
||||
interval = 60;
|
||||
format = "<b>{:%H:%M %a %d/%m}</b>";
|
||||
tooltip-format = "<tt><small>{calendar}</small></tt>";
|
||||
calendar = {
|
||||
mode = "year";
|
||||
mode-mon-col = 3;
|
||||
weeks-pos = "right";
|
||||
on-scroll = 1;
|
||||
on-click-right = "mode";
|
||||
format = {
|
||||
months = "<span color='${color.normal.magenta}'><b>{}</b></span>";
|
||||
days = "<span color='${color.txt}'><b>{}</b></span>";
|
||||
weeks = "<span color='${color.normal.cyan}'><b>W{}</b></span>";
|
||||
weekdays = "<span color='${color.normal.yellow}'><b>{}</b></span>";
|
||||
today = "<span color='${accent.color}'><b><u>{}</u></b></span>";
|
||||
};
|
||||
};
|
||||
actions = {
|
||||
on-click-right = "mode";
|
||||
on-click-forward = "tz_up";
|
||||
on-click-backward = "tz_down";
|
||||
on-scroll-up = "shift_up";
|
||||
on-scroll-down = "shift_down";
|
||||
};
|
||||
};
|
||||
mpd =
|
||||
let
|
||||
mpc = "${pkgs.mpc-cli}/bin/mpc";
|
||||
in
|
||||
{
|
||||
format = "{stateIcon} {title} - {artist}";
|
||||
format-paused = "{stateIcon}";
|
||||
format-stopped = "";
|
||||
state-icons = {
|
||||
stopped = "";
|
||||
paused = "";
|
||||
playing = "";
|
||||
};
|
||||
tooltip = false;
|
||||
on-click = "${mpc} toggle";
|
||||
on-scroll-up = "${mpc} vol +10";
|
||||
on-scroll-down = "${mpc} vol -10";
|
||||
};
|
||||
"custom/playerctl" = {
|
||||
format = "{} ";
|
||||
exec = "${pkgs.playerctl-status}/bin/playerctl-status";
|
||||
on-click = "${pkgs.playerctl}/bin/playerctl --ignore-player=mpd play-pause";
|
||||
interval = 1;
|
||||
tooltip = false;
|
||||
};
|
||||
"sway/language" = {
|
||||
format = "{short} {variant}";
|
||||
};
|
||||
"custom/caffeine" = {
|
||||
format = "{}";
|
||||
exec = "systemctl --user status swayidle > /dev/null && echo || echo ";
|
||||
on-click = "${pkgs._sway_idle_toggle}/bin/_sway_idle_toggle";
|
||||
interval = 1;
|
||||
tooltip = false;
|
||||
};
|
||||
"custom/vpn" = lib.mkIf (osConfig.services.vpn.enable or false) {
|
||||
format = "{}";
|
||||
exec = ''
|
||||
${pkgs.mullvad}/bin/mullvad status | ${pkgs.gnugrep}/bin/grep "^Connected" > /dev/null \
|
||||
&& echo "" \
|
||||
|| echo ""
|
||||
'';
|
||||
on-click = "mullvad connect";
|
||||
on-click-right = "mullvad disconnect";
|
||||
interval = 1;
|
||||
tooltip = false;
|
||||
};
|
||||
pulseaudio = {
|
||||
interval = 5;
|
||||
tooltip = false;
|
||||
scroll-step = 10;
|
||||
format = "{icon}";
|
||||
format-bluetooth = "";
|
||||
format-bluetooth-muted = "";
|
||||
format-muted = "";
|
||||
format-icons = {
|
||||
"rtp-sink" = [
|
||||
""
|
||||
""
|
||||
""
|
||||
];
|
||||
"alsa_output.usb-C-Media_Electronics_Inc._USB_Audio_Device-00.analog-stereo" = [
|
||||
" "
|
||||
" "
|
||||
" "
|
||||
];
|
||||
"alsa_output.pci-0000_09_00.4.analog-stereo" = [
|
||||
" "
|
||||
" "
|
||||
" "
|
||||
];
|
||||
headphone = [
|
||||
" "
|
||||
" "
|
||||
" "
|
||||
];
|
||||
handsfree = "";
|
||||
headset = "";
|
||||
phone = "";
|
||||
portable = "";
|
||||
car = "";
|
||||
default = [
|
||||
""
|
||||
""
|
||||
""
|
||||
];
|
||||
};
|
||||
on-click = "pavucontrol";
|
||||
on-click-right = "${pkgs.pulse_sink}/bin/pulse_sink";
|
||||
on-scroll-up = "${pkgs.volumesh}/bin/volumesh -i 10";
|
||||
on-scroll-down = "${pkgs.volumesh}/bin/volumesh -d 10";
|
||||
};
|
||||
}
|
||||
];
|
||||
style = builtins.readFile (
|
||||
pkgs.substituteAll {
|
||||
src = ./style.css;
|
||||
|
||||
accent_color = accent.color;
|
||||
accent_color = accent.color;
|
||||
|
||||
color_bg = color.bg;
|
||||
color_bg_dark = color.bg_dark;
|
||||
color_bg_light = color.bg_light;
|
||||
color_txt = color.txt;
|
||||
color_bg = color.bg;
|
||||
color_bg_dark = color.bg_dark;
|
||||
color_bg_light = color.bg_light;
|
||||
color_txt = color.txt;
|
||||
|
||||
font_interface = font.interface;
|
||||
font_interface = font.interface;
|
||||
|
||||
font_size_big = "${toString font.size.big}px";
|
||||
font_size_medium = "${toString font.size.medium}px";
|
||||
});
|
||||
font_size_big = "${toString font.size.big}px";
|
||||
font_size_medium = "${toString font.size.medium}px";
|
||||
}
|
||||
);
|
||||
};
|
||||
home.packages = with pkgs; [ waybar ];
|
||||
};
|
||||
|
|
|
@ -1,4 +1,10 @@
|
|||
{ config, pkgs, lib, inputs, ... }:
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
inputs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
HOME = config.home.homeDirectory;
|
||||
in
|
||||
|
|
|
@ -1,6 +1,17 @@
|
|||
{ config, pkgs, lib, font, ... }:
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
font,
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (pkgs.uservars) key accent font theme;
|
||||
inherit (pkgs.uservars)
|
||||
key
|
||||
accent
|
||||
font
|
||||
theme
|
||||
;
|
||||
inherit (theme) color;
|
||||
in
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue