nix: update to 24.11

Reviewed-on: https://codeberg.org/leana8959/.files/pulls/1
Co-authored-by: Léana 江 <leana.jiang+git@icloud.com>
Co-committed-by: Léana 江 <leana.jiang+git@icloud.com>
This commit is contained in:
Primrose 2024-11-30 18:42:54 +00:00 committed by Léana
parent 57ed96f0ea
commit f6a89cba08
60 changed files with 696 additions and 752 deletions

View file

@ -0,0 +1,13 @@
{
nixosConfig ? null,
lib,
...
}:
{
nix.gc = lib.mkIf (!nixosConfig.nix.gc.automatic or false) {
automatic = true;
frequency = "weekly";
options = "--delete-older-than 15d";
};
}

View file

@ -1,59 +1,49 @@
{ pkgs, lib, ... }:
{
pkgs,
lib,
config,
...
}:
{
options.programs.cmus.enable = lib.mkEnableOption "cmus";
config = lib.mkIf config.programs.cmus.enable {
home.packages = [ pkgs.cmus ];
xdg.configFile."cmus/rc".text = lib.mkMerge [
(builtins.readFile ./rc)
programs.cmus.extraConfig =
let
# dispatch to multiple callbacks
callback-script = pkgs.writeShellApplication {
name = "cmus-callback-script";
runtimeInputs = [
pkgs.cmusfm
pkgs.libnotify
];
text = ''
argv=("$@")
declare -A map
while [ $# -gt 0 ]; do
map["$1"]="$2"
shift
shift
done
(lib.mkIf pkgs.stdenv.isLinux (
let
# dispatch to multiple callbacks
callback = pkgs.writeShellApplication {
name = "cmus-callback-script";
runtimeInputs = [
pkgs.cmusfm
pkgs.libnotify
];
text = ''
argv=("$@")
declare -A map
while [ $# -gt 0 ]; do
map["$1"]="$2"
shift
shift
done
notify-send "''${map[title]}" "''${map[artist]} / ''${map[album]}"
cmusfm "''${argv[@]}"
'';
};
in
(builtins.readFile ./rc)
notify-send "''${map[title]}" "''${map[artist]} / ''${map[album]}"
cmusfm "''${argv[@]}"
'';
};
in
''
set status_display_program=${lib.getExe callback}
''
))
+ (lib.optionalString pkgs.stdenv.isLinux ''
set status_display_program=${lib.getExe callback-script}
'')
(lib.mkIf pkgs.stdenv.isDarwin ''
set status_display_program=${lib.getExe pkgs.cmusfm}
'')
+ (lib.optionalString pkgs.stdenv.isDarwin ''
set status_display_program=${lib.getExe pkgs.cmusfm}
'')
(lib.mkIf pkgs.stdenv.isLinux ''
set output_plugin=alsa
'')
+ (lib.optionalString pkgs.stdenv.isLinux ''
set output_plugin=alsa
'')
# When switching over bluetooth, toggle the output device to coreaudio
# and back to ao would fix the no sound issue.
+ (lib.optionalString pkgs.stdenv.isDarwin ''
# distortion fix https://github.com/cmus/cmus/issues/1130#issuecomment-1003324193
set output_plugin=ao
'');
# When switching over bluetooth, toggle the output device to coreaudio
# and back to ao would fix the no sound issue.
(lib.mkIf pkgs.stdenv.isDarwin ''
# distortion fix https://github.com/cmus/cmus/issues/1130#issuecomment-1003324193
set output_plugin=ao
'')
];
};
}

View file

@ -1,13 +1,13 @@
{ config, ... }:
{
programs.direnv = {
nix-direnv.enable = true;
config = builtins.fromTOML ''
[whitelist]
prefix = [ "${config.home.homeDirectory}/.dotfiles" ]
[global]
strict_env = true
'';
config = {
whitelist.prefix = [ "${config.home.homeDirectory}/.dotfiles" ];
global.strict_env = true;
};
};
}

View file

@ -0,0 +1,21 @@
{
pkgs,
config,
lib,
...
}:
{
i18n.inputMethod = {
fcitx5.addons = [
pkgs.fcitx5-chinese-addons
pkgs.fcitx5-table-extra
];
};
xdg.configFile = lib.mkIf (config.i18n.inputMethod.enabled != null) {
"fcitx5".source = ./fcitx;
};
}

View file

@ -0,0 +1,16 @@
# vim:ft=ini
DarkTheme=default-dark
PerScreenDPI=false
PreferTextIcon=false
ShowLayoutNameInIcon=true
Theme=default
UseAccentColor=true
UseDarkTheme=false
UseInputMethodLanguageToDisplayText=true
Vertical Candidate List=false
WheelForPaging=true
Font="Noto Sans Mono CJK TC 18"
MenuFont="Noto Sans Mono CJK TC 12"
TrayFont="Noto Sans Mono CJK TC 12"

View file

@ -0,0 +1,48 @@
# vim:ft=ini
[Behavior]
ActiveByDefault=false
AllowInputMethodForPassword=false
AutoSavePeriod=30
CompactInputmethodInformation=true
CustomXkbOption=
DefaultPageSize=5
DisabledAddons=
EnabledAddons=
OverriedXkbOption=false
PreeditEnabledByDefault=true
PreloadInputMethod=true
ShareInputState=No
ShowFirstInputMethodInformation=true
ShowInputMethodInformation=true
ShowInputMethodInformationWhenFocusIn=false
ShowPreeditForPassword=false
[Hotkey]
EnumerateBackwardKeys=
EnumerateForwardKeys=
EnumerateSkipFirst=
EnumerateWithTriggerKeys=true
[Hotkey/AltTriggerKeys]
0=Shift_L
[Hotkey/EnumerateGroupBackwardKeys]
0=Control+Shift+space
[Hotkey/EnumerateGroupForwardKeys]
0=Control+space
[Hotkey/NextCandidate]
0=Tab
[Hotkey/NextPage]
0=Down
[Hotkey/PrevCandidate]
0=Shift+Tab
[Hotkey/PrevPage]
0=Up
[Hotkey/TriggerKeys]

View file

@ -0,0 +1,33 @@
# vim:ft=ini
[GroupOrder]
0=gDvorak
1=gDvorakFrench
2=gCangjie
[Groups/0]
Default Layout=us
DefaultIM=cangjie3
Name=gCangjie
[Groups/0/Items/0]
Layout=
Name=cangjie3
[Groups/1]
Default Layout=myDvorak
DefaultIM=keyboard-myDvorak
Name=gDvorak
[Groups/1/Items/0]
Layout=
Name=keyboard-myDvorak
[Groups/2]
Default Layout=myDvorakFrench
DefaultIM=keyboard-myDvorakFrench
Name=gDvorakFrench
[Groups/2/Items/0]
Layout=
Name=keyboard-myDvorakFrench

View file

@ -0,0 +1,87 @@
[Table]
# Select Second Candidate
SecondCandidate=
# Select Third Candidate
ThirdCandidate=
# Page size
PageSize=10
# Commit after auto select candidates
CommitAfterSelect=True
# Commit buffer when deactivating input method
CommitWhenDeactivate=True
# Commit Invalid Segment
CommitInvalidSegment=False
# Use full width
UseFullWidth=True
# Ignore built in punctuation
IgnorePunc=False
# First candidate as Preedit
FirstCandidateAsPreedit=False
# Fix embedded preedit cursor at the beginning of the preedit
PreeditCursorPositionAtBeginning=True
# Key to trigger quickphrase
QuickPhraseKey=
# Text to trigger quickphrase
QuickPhraseText=
# Don't sort word shorter than
NoSortInputLength=-1
# Sort candidate by code length
SortByCodeLength=True
# Order policy
OrderPolicy=Freq
# Use system language model
UseSystemLanguageModel=True
# Sort candidates based on current context
UseContextRelatedOrder=True
# Wildcard matching Key
MatchingKey=z
# Prefix key to trigger Pinyin
PinyinKey=
# Auto select candidate
AutoSelect=True
# Length limit of selecting the only candidate
AutoSelectLength=-2
# Regular expression for selecting the only candidate
AutoSelectRegex=
# Auto select when no match is found
NoMatchAutoSelectLength=0
# Regular expression for auto select when no match is found
NoMatchAutoSelectRegex=
# Auto phrase length
AutoPhraseLength=-1
# Learn auto phrase with phrase
AutoPhraseWithPhrase=False
# Marker for auto phrase in the candidates
MarkerForAutoPhrase=*
# Save auto phrase after being typed for ... times
SaveAutoPhraseAfter=4
# Exact Match
ExactMatch=False
# Learning
Learning=True
# Display Hint for word
Hint=False
# Display custom hint
DisplayCustomHint=True
# Separator text between hint and candidate
HintSeparator=" ~ "
# Candidate List orientation
CandidateLayoutHint=Vertical
# Allow use keypad key as table input
KeypadAsInput=False
[Table/PrevPage]
0=Left
[Table/NextPage]
0=Right
[Table/PrevCandidate]
0=Up
[Table/NextCandidate]
0=Down
[Table/DefaultCandidate]
0=space

View file

@ -0,0 +1,26 @@
{
programs.feh = {
keybindings = {
prev_img = [
"Left"
"Up"
];
next_img = [
"Right"
"Down"
];
scroll_left = "h";
scroll_right = "l";
scroll_up = "k";
scroll_down = "j";
# mimic sioyek
zoom_in = "plus";
zoom_out = "minus";
zoom_fit = "=";
};
};
}

View file

@ -0,0 +1,90 @@
{ pkgs, ... }:
let
inherit (pkgs) nur;
in
{
home.packages = [
pkgs.cascadia-code # Used in tab bar
];
programs.firefox = {
# some options only works with firefox-esr
package = pkgs.firefox-esr;
# https://mozilla.github.io/policy-templates
policies = {
HardwareAcceleration = true;
DisableFirefoxScreenshots = true;
DisablePocket = true;
DisplayMenuBar = "never";
DisplayBookmarksToolbar = "never";
NoDefaultBookmarks = true;
OfferToSaveLogins = false;
OfferToSaveLoginsDefault = false;
PasswordManagerEnabled = false;
FirefoxHome = {
Search = true;
TopSites = true;
SponsoredTopSites = false;
Highlights = false;
Pocket = false;
SponsoredPocket = false;
};
UserMessaging = {
ExtensionRecommendations = false;
SkipOnboarding = true;
};
DNSOverHTTPS = {
Enabled = true;
};
EnableTrackingProtection = {
Value = true;
Cryptomining = true;
Fingerprinting = true;
};
};
profiles.leana = {
userChrome =
let
onebar = pkgs.fetchFromGitea {
domain = "git.gay";
owner = "freeplay";
repo = "Firefox-Onebar";
rev = "197a5e5298985be3767da504bac153f3b75b63f7";
hash = "sha256-+AG6dp92//zEROtKQgPPB0YCTGtHywM8AtobvguF1PM=";
};
in
''
#statuspanel-label {
font-size: 18px !important;
font-family: "Cascadia Code" !important;
}
.urlbar-input-box {
font-size: 18px !important;
font-family: "Cascadia Code" !important;
}
${builtins.readFile "${onebar}/onebar.css"}
'';
extensions =
let
addons = nur.repos.rycee.firefox-addons;
in
[
addons.ublock-origin
addons.privacy-badger
addons.tridactyl
addons.languagetool
addons.news-feed-eradicator
];
};
};
}

View file

@ -6,7 +6,7 @@
}:
{
programs.fish = {
shellAbbrs = lib.mkMerge [
shellAbbrs = lib.mergeAttrsList [
{
# Docker
dc = "docker compose";
@ -22,7 +22,7 @@
":q" = "exit";
}
(lib.mkIf pkgs.stdenv.isLinux {
(lib.optionalAttrs pkgs.stdenv.isLinux {
ssys = "sudo systemctl";
sys = "systemctl";
se = "SUDO_EDITOR=(which \$EDITOR) sudoedit";
@ -30,25 +30,25 @@
hswitch = "home-manager switch --flake ~/.dotfiles#${hostname}";
})
(lib.mkIf pkgs.stdenv.isDarwin {
(lib.optionalAttrs pkgs.stdenv.isDarwin {
nswitch = "darwin-rebuild switch -L --flake ~/.dotfiles#${hostname} --option sandbox false";
})
];
shellAliases = lib.mkMerge [
shellAliases = lib.mergeAttrsList [
{
rm = "rm -I"; # idiot protection
tree = "tree -Cph";
restow = "cd ~/.dotfiles/ && stow -D . && stow -S . && prevd";
}
(lib.mkIf pkgs.stdenv.isLinux {
(lib.optionalAttrs pkgs.stdenv.isLinux {
# idiot protection
chmod = "chmod --preserve-root";
chown = "chown --preserve-root";
})
(lib.mkIf pkgs.stdenv.isDarwin (
(lib.optionalAttrs pkgs.stdenv.isDarwin (
let
cmds = builtins.concatStringsSep ";";
in

View file

@ -4,6 +4,11 @@
pkgs,
...
}:
let
inherit (pkgs) myPkgs;
in
{
imports = [
./aliasesAbbrs.nix
@ -18,14 +23,27 @@
home.packages = [
pkgs.vivid
pkgs.myPkgs.hutils
myPkgs.hutils
];
programs = {
fd.enable = true;
fzf.enable = true;
tmux.enable = true;
fzf = {
enable = true;
enableFishIntegration = true;
};
starship = {
enable = true;
enableFishIntegration = true;
};
kitty = {
settings.shell = ''${pkgs.fish}/bin/fish --command="tmux-home" --login'';
shellIntegration.enableFishIntegration = true;
};
};
services.gpg-agent.enableFishIntegration = true;
xdg.configFile = lib.mapAttrs' (path: _: {
name = "fish/functions/${path}";
value.source = lib.path.append ./functions path;
@ -33,7 +51,7 @@
programs.fish = {
sourcePaths = lib.mkMerge [
sourcePaths =
[
# Make sure wrapper comes first
# https://discourse.nixos.org/t/sudo-run-current-system-sw-bin-sudo-must-be-owned-by-uid-0-and-have-the-setuid-bit-set-and-cannot-chdir-var-cron-bailing-out-var-cron-permission-denied/20463/2
@ -53,8 +71,7 @@
]
# Add brew, but as fallback
(lib.mkIf pkgs.stdenv.isDarwin "/opt/homebrew/bin")
];
++ (lib.optional pkgs.stdenv.isDarwin "/opt/homebrew/bin");
interactiveShellInit = builtins.readFile ./shellInit.fish;

View file

@ -1,15 +1,14 @@
{
programs.fzf = {
enableFishIntegration = true;
defaultOptions = [
"--cycle"
"--border=none"
"--preview-window=wrap"
"--color=fg:#000000,bg:#eeeeee,hl:#ca1243"
"--color=fg+:#000000,bg+:#d0d0d0,hl+:#ca1243"
"--color=info:#0184bc,prompt:#645199,pointer:#645199"
"--color=marker:#0184bc,spinner:#645199,header:#645199"
"--color=gutter:#eeeeee"
];
};
programs.fzf.defaultOptions = [
"--cycle"
"--border=none"
"--preview-window=wrap"
"--color=fg:#000000,bg:#eeeeee,hl:#ca1243"
"--color=fg+:#000000,bg+:#d0d0d0,hl+:#ca1243"
"--color=info:#0184bc,prompt:#645199,pointer:#645199"
"--color=marker:#0184bc,spinner:#645199,header:#645199"
"--color=gutter:#eeeeee"
];
}

View file

@ -2,7 +2,6 @@
{
services = {
gpg-agent.enableFishIntegration = true;
gpg-agent.defaultCacheTtl = 1209600;
gpg-agent.pinentryPackage = pkgs.pinentry-tty;
};
@ -38,7 +37,6 @@
# istic
{
text = ''
-----BEGIN PGP PUBLIC KEY BLOCK-----
@ -47,15 +45,15 @@
Z0BldHVkaWFudC51bml2LXJlbm5lczEuZnI+iJMEExYKADsWIQTrVEpkQrO2zojN
hZcyA125fnd+6wUCY/CoXQIbAwULCQgHAgIiAgYVCgkICwIEFgIDAQIeBwIXgAAK
CRAyA125fnd+69LtAP4+CUIJEPUMlsQIxeR7D0P36Gc99H2CetbFnvuwbjx+6AD+
NUpPeodNBF9bkehOXXVeozYsl9KVdnrUDi/k6PpVTQK4OARj8KhdEgorBgEEAZdV
AQUBAQdAoxVYfP8bPtJmzdEjZqeAz3c5xfb3i2WXgjgzSCddBFMDAQgHiHgEGBYK
ACAWIQTrVEpkQrO2zojNhZcyA125fnd+6wUCY/CoXQIbDAAKCRAyA125fnd+697N
AP0TUgyl0CS5SLNYMXQsfmv+mQMduFHD3k2dFEuto3mEOwEAie95uXDRFHaV/LMv
TRwwyv2P9C8usDGCDj1e+h8PtAI=
=MmSo
NUpPeodNBF9bkehOXXVeozYsl9KVdnrUDi/k6PpVTQK0REzDqWFuYSBDSElBTkcg
KGdpdGxhYjIuaXN0aWMpIDxsZWFuYS5jaGlhbmdAZXR1ZGlhbnQudW5pdi1yZW5u
ZXMuZnI+iI4EExYKADYWIQTrVEpkQrO2zojNhZcyA125fnd+6wUCZz+qdAIbAwQL
CQgHBBUKCQgFFgIDAQACHgUCF4AACgkQMgNduX53fusnZwEAoq33+pdQlBnzU5HG
3vmaJSHNtgYzIAiLpkU7ahufgM0A/0FKGNFTPnamSEOui4lANJvSZumv4QkVRVmB
Q+D9ElYO
=gs3q
-----END PGP PUBLIC KEY BLOCK-----
'';
trust = 5;
}
];

View file

@ -1,11 +1,11 @@
{ lib, config, ... }:
let
cfg = config.programs.kitty;
in
{
pkgs,
lib,
config,
...
}:
{
programs.kitty = lib.mkIf config.programs.kitty.enable {
programs.kitty = lib.mkIf cfg.enable {
font = {
name = "AltiosevkaNFM";
size = 14;
@ -15,7 +15,6 @@
background = "#ffffff";
confirm_os_window_close = 0;
text_composition_strategy = "1.7 0";
shell = ''${pkgs.fish}/bin/fish --command="tmux-home" --login'';
};
extraConfig = ''
background #f8f8f8
@ -40,6 +39,5 @@
color15 #ffffff
selection_foreground #f8f8f8
'';
shellIntegration.enableFishIntegration = true;
};
}

View file

@ -0,0 +1,10 @@
{
nixosConfig ? null,
...
}:
{
home.language = {
base = nixosConfig.i18n.defaultLocale or "en_US.UTF-8";
};
}

View file

@ -6,31 +6,29 @@
}:
{
config = {
programs.neovim = {
defaultEditor = true;
extraPackages = [
# might be useful for servers, serves as minimal configuration
pkgs.nodePackages.bash-language-server
pkgs.shellcheck
pkgs.shfmt
];
};
xdg.configFile =
let
fr_utf-8_spl = builtins.fetchurl {
url = "http://ftp.vim.org/vim/runtime/spell/fr.utf-8.spl";
sha256 = "abfb9702b98d887c175ace58f1ab39733dc08d03b674d914f56344ef86e63b61";
};
fr_utf-8_sug = builtins.fetchurl {
url = "http://ftp.vim.org/vim/runtime/spell/fr.utf-8.sug";
sha256 = "0294bc32b42c90bbb286a89e23ca3773b7ef50eff1ab523b1513d6a25c6b3f58";
};
in
lib.mkIf config.programs.neovim.enable {
"nvim/spell/fr.utf-8.spl".source = fr_utf-8_spl;
"nvim/spell/fr.utf-8.sug".source = fr_utf-8_sug;
};
programs.neovim = {
defaultEditor = true;
extraPackages = [
# might be useful for servers, serves as minimal configuration
pkgs.nodePackages.bash-language-server
pkgs.shellcheck
pkgs.shfmt
];
};
xdg.configFile =
let
fr_utf-8_spl = builtins.fetchurl {
url = "http://ftp.vim.org/vim/runtime/spell/fr.utf-8.spl";
sha256 = "abfb9702b98d887c175ace58f1ab39733dc08d03b674d914f56344ef86e63b61";
};
fr_utf-8_sug = builtins.fetchurl {
url = "http://ftp.vim.org/vim/runtime/spell/fr.utf-8.sug";
sha256 = "0294bc32b42c90bbb286a89e23ca3773b7ef50eff1ab523b1513d6a25c6b3f58";
};
in
lib.mkIf config.programs.neovim.enable {
"nvim/spell/fr.utf-8.spl".source = fr_utf-8_spl;
"nvim/spell/fr.utf-8.sug".source = fr_utf-8_sug;
};
}

View file

@ -6,11 +6,13 @@
fish.enable = true;
git.enable = true;
vim.enable = true;
starship.enable = true;
tmux.enable = true;
};
services.gpg-agent.enable = lib.mkIf pkgs.stdenv.isLinux true;
services.gpg-agent.enable = lib.mkDefault pkgs.stdenv.isLinux;
home.packages = lib.mkMerge [
home.packages =
[
pkgs.file
pkgs.gnused
@ -19,7 +21,6 @@
]
# coreutils for darwin
(lib.mkIf pkgs.stdenv.isDarwin [ pkgs.uutils-coreutils-noprefix ])
];
++ (lib.optional pkgs.stdenv.isDarwin pkgs.uutils-coreutils-noprefix);
}

View file

@ -0,0 +1,24 @@
{
programs.sioyek = {
bindings = {
"move_up" = "k";
"move_down" = "j";
"move_left" = "l";
"move_right" = "h";
"screen_down" = [
"d"
"<C-d>"
];
"screen_up" = [
"u"
"<C-u>"
];
};
config.should_launch_new_window = "1";
};
}

View file

@ -1,6 +1,13 @@
{ lib, config, ... }:
let
cfg = config.programs.starship;
in
{
programs.starship = {
enableFishIntegration = true;
settings = fromTOML (builtins.readFile ./starship.toml);
xdg.configFile = lib.mkIf cfg.enable {
"starship.toml".source = ./starship.toml;
};
}

View file

@ -1,9 +1,14 @@
{ pkgs, lib, ... }:
{
nixosConfig ? null,
lib,
pkgs,
...
}:
{
nix = {
package = lib.mkForce pkgs.nixVersions.nix_2_23;
package = lib.mkDefault (nixosConfig.nix.package or pkgs.nix);
settings = {
allow-import-from-derivation = "true";

View file

@ -0,0 +1,27 @@
{
pkgs,
config,
lib,
...
}:
let
cfg = config.programs.wired;
in
{
options = {
programs.wired = {
enable = lib.mkEnableOption "wired";
};
};
config = lib.mkIf cfg.enable {
home.packages = [ pkgs.wired ];
xdg.configFile = {
"wired/wired.ron".source = ./wired.ron;
};
};
}

View file

@ -0,0 +1,167 @@
(
// Maximum number of notifications to show at any one time.
// A value of 0 means that there is no limit.
max_notifications: 0,
// The default timeout, in miliseconds, for notifications that don't have an initial timeout set.
// 1000ms = 1s.
timeout: 10000,
// `poll_interval` decides decides how often (in milliseconds) Wired checks events,
// draws notifications (if necessary) -- the update loop while any notification is present.
// Note that when no notifications are present, Wired polls at `idle_poll_interval` instead.
// 16ms ~= 60hz / 7ms ~= 144hz.
poll_interval: 16,
// The interval at which wired updates when no notifications/windows are present.
//idle_poll_interval: 500,
// Wired will pause notifications if you are idle (no mouse or keyboard input) for longer than
// `idle_threshold` seconds.
// Note that notifications will not be automatically unpaused on wake, and will need to be manually
// cleared, unless `unpause_on_input` is set to true.
// Also note that no distinction is made between manually paused and idle paused notifications.
// If `idle_threshold` is not specified, the behavior will be disabled entirely.
//idle_threshold: 3600,
// Notifications will spawn paused, and have to be manually unpaused or cleared by the user,
// unless `unpause_on_input` is also set.
//notifications_spawn_paused: false,
// Unpause notifications when we receive any input after being idle for longer than 1 second.
// Note that no distinction is made between manually paused notifications and idle paused/spawned notifications.
//unpause_on_input: false,
// Enable/disable replacement functionality.
// If this is disabled, replacement requests will just send a new notification.
// E.g., with replacing_enabled: true, Pidgin will only show the latest message from each contact,
// instead of sending a new one for each message.
// Default: true
//replacing_enabled: true,
// Whether a notification should reset its timeout when it is replaced.
// No effect if replacing_enabled is set to false.
// Default: false
//replacing_resets_timeout: false,
// Some apps/programs close notifications on their own by sending a request to dbus.
// Sometimes this is not desired.
// Default: true
//closing_enabled: true,
// How many notifications are kept in history.
// Each notification is roughly 256 bytes (excluding buffers!), so there's some math to do here.
// Default: 10
//history_length: 10,
// When a `NotificationBlock` has monitorr: -1 (i.e. should follow active monitor), then what input
// should we use to determine the active monitor?
// Options: Mouse, Window
// Default: Mouse
//focus_follows: Mouse,
// Enable printing notification data to a file.
// Useful for scripting purposes.
// The data is written as JSON.
// Default: None
//print_to_file: "/tmp/wired.log",
// Minimum window width and height. This is used to create the base rect that the notification
// grows within.
// The notification window will never be smaller than this.
// A value of 1 means that the window will generally always resize with notification, unless
// you have a 1x1 pixel notification...
// Generally, you shouldn't need to set this.
//min_window_width: 1,
//min_window_height: 1,
// Enable/disable debug rendering.
debug: false,
debug_color: Color(r: 0.0, g: 1.0, b: 0.0, a: 1.0), // Primary color for debug rectangles.
debug_color_alt: Color(r: 1.0, g: 0.0, b: 0.0, a: 1.0), // Secondary color for debug rectangles.
layout_blocks: [
(
name: "root",
parent: "",
hook: Hook(parent_anchor: BR, self_anchor: BR),
offset: Vec2(x: -20.0, y: -20.0),
params: NotificationBlock((
monitor: 0,
border_width: 0,
border_rounding: 0.0,
background_color: Color(hex: "#383A42"),
border_color: Color(hex: "#696c77"),
border_color_low: Color(hex: "#383A42"),
border_color_critical: Color(hex: "#ff1414"),
border_color_paused: Color(hex: "#fabd2f"),
gap: Vec2(x: 0.0, y: -6.0),
notification_hook: Hook(parent_anchor: TL, self_anchor: BL),
)),
),
(
name: "image",
parent: "root",
hook: Hook(parent_anchor: TL, self_anchor: TL),
offset: Vec2(x: 0.0, y: 0.0),
params: ImageBlock((
image_type: Hint,
padding: Padding(left: 7.0, right: 0.0, top: 7.0, bottom: 7.0),
rounding: 3.0,
scale_width: 48,
scale_height: 48,
filter_mode: Lanczos3,
)),
),
(
name: "summary",
parent: "image",
hook: Hook(parent_anchor: MR, self_anchor: BL),
offset: Vec2(x: 0.0, y: 0.0),
params: ScrollingTextBlock((
text: "%s",
font: "JetBrains Mono 24",
color: Color(hex: "#fafafa"),
padding: Padding(left: 7.0, right: 7.0, top: 1.0, bottom: 0.0),
width: (min: 400, max: 400),
scroll_speed: 0.1,
lhs_dist: 35.0,
rhs_dist: 35.0,
scroll_t: 1.0,
)),
),
(
name: "body",
parent: "summary",
hook: Hook(parent_anchor: BL, self_anchor: TL),
offset: Vec2(x: 0.0, y: -3.0),
params: ScrollingTextBlock((
text: "%b",
font: "Altiosevka NFM 18",
color: Color(hex: "#fafafa"),
padding: Padding(left: 7.0, right: 7.0, top: 3.0, bottom: 7.0),
width: (min: 400, max: 400),
scroll_speed: 0.1,
lhs_dist: 35.0,
rhs_dist: 35.0,
scroll_t: 1.0,
)),
),
],
// https://github.com/Toqozz/wired-notify/wiki/Shortcuts
shortcuts: ShortcutsConfig (
notification_interact: 1,
notification_close: 2,
// notification_closeall: 99,
// notification_pause: 99,
notification_action1: 3,
// notification_action2: 99,
// notification_action3: 99,
// notification_action4: 99,
),
)

View file

@ -0,0 +1,43 @@
{
programs.xmobar.extraConfig = ''
Config { overrideRedirect = False
, font = "Iosevka 11"
, additionalFonts = [ "Noto Color Emoji 9"
]
, bgColor = "#000000"
, fgColor = "#FFFFFF"
, position = Bottom
, commands = [ Run Kbd
[ ("myDvorakFrench", "🇫🇷")
, ("myDvorak", "🇺🇸")
, ("us", "🇹🇼")
]
, Run ThermalZone 0 ["-t", "󰔏 <temp>°C"] 30
, Run Alsa "default" "Master"
[ "-t", "<status> <volume>%"
, "--"
, "-O", "󰕾"
, "-o", "󰖁"
]
, Run Memory [ "-t", "󰍛 <usedratio>%" ] 30
, Run Date "%a %d %H:%M:%S" "date" 10
, Run Battery
[ "-t", "<acstatus>:<left>%"
, "--"
, "-O", "󰂄"
, "-i", "󱟦"
, "-o", "󰁾"
, "-h", "green"
, "-m", "yell"
, "-l", "red"
] 10
, Run XMonadLog
]
, sepChar = "%"
, alignSep = "}{"
, template = "%XMonadLog% }{ %kbd% | %alsa:default:Master% | %thermal0% | %memory% | %battery% | %date% "
}
'';
}