modules: move tui, gui, cli to programs

This commit is contained in:
Charlie Root 2024-08-16 13:44:44 +02:00
commit 47a79eea64
106 changed files with 3 additions and 47 deletions

View file

@ -0,0 +1,13 @@
_: {
imports = [
./vesktop.nix
./foot.nix
./mpv.nix
./zathura.nix
./spicetify.nix
./steam.nix
./waybar.nix
./schizofox.nix
./minecraft.nix
];
}

View file

@ -0,0 +1,88 @@
{
config,
inputs',
lib,
pkgs,
...
}: let
cfg = config.modules.system.programs.terminals.foot;
inherit (config.modules.other.system) username;
inherit (lib) mkIf;
in {
config = mkIf cfg.enable {
home-manager.users.${username} = {
home.sessionVariables.TERM = "foot";
programs.foot = {
enable = true;
package = inputs'.nixpkgs-wayland.packages.foot;
settings = {
main = {
term = "foot";
app-id = "foot";
title = "foot";
locked-title = "no";
# line-height = 20;
letter-spacing = 0;
horizontal-letter-offset = 0;
vertical-letter-offset = -0.75;
box-drawings-uses-font-glyphs = "no";
dpi-aware = "no";
initial-window-size-chars = "104x36";
initial-window-mode = "windowed";
pad = "5x5 center";
resize-delay-ms = 100;
bold-text-in-bright = "no";
word-delimiters = '',`|:"'()[]{}<>'';
selection-target = "primary";
};
desktop-notifications.command = "${pkgs.libnotify}/bin/notify-send -a \${app-id} -i \${app-id} \${title} \${body}";
bell = {
urgent = "yes";
notify = "yes";
command = "${pkgs.libnotify}/bin/notify-send bell";
command-focused = "no";
};
scrollback = {
lines = 100000;
multiplier = 10.0;
indicator-position = "relative";
indicator-format = "line";
};
url = {
launch = "${pkgs.xdg-utils}/bin/xdg-open \${url}";
label-letters = "sadfjklewcmpgh";
osc8-underline = "always";
protocols = "http, https, ftp, ftps, file, gemini, gopher, irc, ircs";
uri-characters = ''
abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_.,~:;/?#@!$&%*+="'()[]'';
};
cursor = {
style = "beam";
blink = "true";
};
mouse = {
hide-when-typing = "yes"; # not really needed since we already enable this in Hyprland
alternate-scroll-mode = "yes";
};
csd = {preferred = "server";};
key-bindings = {
show-urls-launch = "Control+Shift+u";
unicode-input = "Control+Shift+i";
};
};
};
};
};
}

View file

@ -0,0 +1,22 @@
{
config,
lib,
pkgs,
...
}:
with lib; let
inherit (config.modules.other.system) username;
cfg = config.modules.programs.minecraft;
in {
options.modules.programs.minecraft = {
enable = mkEnableOption "minecraft";
wayland = mkEnableOption "wayland";
};
config = mkIf cfg.enable {
home-manager.users.${username} = {
# Install minecraft
home.packages = with pkgs; [prismlauncher];
};
};
}

View file

@ -0,0 +1,26 @@
{
config,
lib,
pkgs,
...
}: let
cfg = config.modules.usrEnv.programs.media.mpv;
inherit (config.modules.other.system) username;
inherit (lib) mkIf;
in {
config = mkIf cfg.enable {
home-manager.users.${username} = {
programs.mpv = {
enable = true;
config = {
hwdec = "auto";
volume = 50;
osc = "no";
osd-bar = "no";
border = "no";
};
scripts = with pkgs.mpvScripts; [mpris thumbfast sponsorblock uosc];
};
};
};
}

View file

@ -0,0 +1,193 @@
{
config,
inputs,
lib,
...
}: let
cfg = config.modules.system.programs.firefox;
inherit (config.modules.other.system) username;
inherit (lib) mkIf;
inherit (builtins) listToAttrs;
in {
config = mkIf cfg.enable {
home-manager.users.${username} = {
imports = [inputs.schizofox.homeManagerModule];
programs.schizofox = {
enable = true;
theme = {
colors = {
background-darker = "000000";
background = "000000";
foreground = "f7f7f7";
};
font = "Lexend";
extraUserChrome = ''
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); /* set default namespace to XUL */
/*
* Hide tab bar, navigation bar and scrollbars
* !important may be added to force override, but not necessary
* #content is not necessary to hide scroll bars
*/
#TabsToolbar {visibility: collapse;}
'';
};
search = {
defaultSearchEngine = "DuckDuckGo";
removeEngines = ["Google" "Bing" "Amazon.com" "eBay" "Twitter" "Wikipedia"];
addEngines = [
{
Name = "NixOS Packages";
Description = "NixOS Unstable package search";
Alias = "!np";
Method = "GET";
URLTemplate = "https://search.nixos.org/packages?channel=unstable&query={searchTerms}";
}
{
Name = "NixOS Options";
Description = "NixOS Unstable option search";
Alias = "!no";
Method = "GET";
URLTemplate = "https://search.nixos.org/options?channel=unstable&query={searchTerms}";
}
{
Name = "NixOS Wiki";
Description = "NixOS Wiki search";
Alias = "!nw";
Method = "GET";
URLTemplate = "https://nixos.wiki/index.php?search={searchTerms}";
}
{
Name = "Home Manager Options";
Description = "Home Manager option search";
Alias = "!hm";
Method = "GET";
URLTemplate = "https://home-manager-options.extranix.com/?query={searchTerms}&release=master";
}
{
Name = "Arch Wiki";
Description = "Arch Wiki search";
Alias = "!aw";
Method = "GET";
URLTemplate = "https://wiki.archlinux.org/index.php?search={searchTerms}";
}
{
Name = "Gentoo Wiki";
Description = "Gentoo Wiki search";
Alias = "!gw";
Method = "GET";
URLTemplate = "https://wiki.gentoo.org/index.php?search={searchTerms}";
}
{
Name = "Debian Wiki";
Description = "Debian Wiki search";
Alias = "!dw";
Method = "GET";
URLTemplate = "https://wiki.debian.org/FrontPage?action=fullsearch&value={searchTerms}";
}
{
Name = "noogle";
Descriptiom = "Noogle Search";
Alias = "!ng";
Method = "GET";
URLTemplate = "https://noogle.dev/";
}
];
};
extensions = {
simplefox.enable = true;
darkreader.enable = true;
enableExtraExtensions = true;
enableDefaultExtensions = true;
extraExtensions = let
extensions = [
{
id = "{c2c003ee-bd69-42a2-b0e9-6f34222cb046}";
name = "auto-tab-discard";
}
{
id = "{74145f27-f039-47ce-a470-a662b129930a}";
name = "clearurls";
}
{
id = "DontFuckWithPaste@raim.ist";
name = "dont-fuck-with-paste";
}
{
id = "{96ef5869-e3ba-4d21-b86e-21b163096400}";
name = "font-fingerprint-defender";
}
{
id = "uBlock0@raymondhill.net";
name = "uBlock Origin";
}
{
id = "{d7742d87-e61d-4b78-b8a1-b469842139fa}";
name = "vimium-ff";
}
{
id = "{a4c4eda4-fb84-4a84-b4a1-f7c1cbf2a1ad}";
name = "refined-github-";
}
{
id = "sponsorBlocker@ajay.app";
name = "sponsorblock";
}
{
id = "treestyletab@piro.sakura.ne.jp";
name = "Tree Style Tab";
}
];
# shamelessly stolen from raf, thanks.
mappedExtensions =
map (extension: {
name = extension.id;
value = {
install_url = "https://addons.mozilla.org/firefox/downloads/latest/${extension.name}/latest.xpi";
};
})
extensions;
in
listToAttrs mappedExtensions;
};
security = {
sanitizeOnShutdown = false;
sandbox = false;
noSessionRestore = false;
userAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:106.0) Gecko/20100101 Firefox/106.0";
};
misc = {
drm.enable = true;
contextMenu.enable = true;
};
# taken from diniamo
settings = {
"gfx.webrender.all" = true;
"media.ffmpeg.vaapi.enabled" = true;
"media.rdd-ffmpeg.enabled" = true;
"media.av1.enabled" = true;
"gfx.x11-egl.force-enabled" = true;
"widget.dmabuf.force-enabled" = true;
"layers.acceleration.force-enabled" = true;
"browser.startup.page" = 3;
"browser.ctrlTab.sortByRecentlyUsed" = true;
# This makes websites prefer a dark theme (in theory)
"layout.css.prefers-color-scheme.content-override" = 0;
};
};
};
};
}

View file

@ -0,0 +1,31 @@
{
config,
pkgs,
lib,
inputs,
inputs',
...
}: let
cfg = config.modules.system.programs.spotify;
inherit (config.modules.other.system) username;
spicePkgs = inputs'.spicetify-nix.legacyPackages;
in {
config = lib.mkIf cfg.enable {
home-manager.users.${username} = {
imports = [inputs.spicetify-nix.homeManagerModules.default];
programs.spicetify = {
enable = true;
spotifyPackage = pkgs.spotify;
theme = spicePkgs.themes.catppuccin;
colorScheme = "mocha";
enabledExtensions = with spicePkgs.extensions; [
# shuffle
# popupLyrics
adblock
# betterGenres
# playlistIcons
];
};
};
};
}

View file

@ -0,0 +1,20 @@
{
config,
lib,
pkgs,
...
}:
with lib; let
cfg = config.modules.system.programs.steam;
in {
config = mkIf cfg.enable {
programs.steam = {
enable = true;
gamescopeSession.enable = true;
extraCompatPackages = with pkgs; [proton-ge-bin];
};
# See
# https://wiki.nixos.org/wiki/GameMode
programs.gamemode.enable = true;
};
}

View file

@ -0,0 +1,372 @@
{
config,
lib,
pkgs,
...
}:
with lib; let
cfg = config.modules.system.programs.discord;
inherit (config.modules.other.system) username;
in {
config = mkIf cfg.enable {
home-manager.users.${username} = {
home.packages = with pkgs; [vesktop];
xdg.configFile."vesktop/settings.json".text = builtins.toJSON {
discordBranch = "ptb";
firstLaunch = false;
arRPC = "on";
splashColor = "rgb(219, 222, 225)";
splashBackground = "rgb(49, 51, 56)";
checkUpdates = false;
staticTitle = true;
disableMinSize = true;
minimizeToTray = false;
tray = false;
appBadge = false;
};
xdg.configFile."vesktop/settings/settings.json".text = builtins.toJSON {
notifyAboutUpdates = false;
autoUpdate = false;
autoUpdateNotification = false;
useQuickCss = true;
themeLinks = [
"https://github.com/Costeer/Gruvbox-Material-Themes/blob/main/Discord%20Theme/gruvboxmaterial.theme.css"
];
enabledThemes = ["gruvboxmaterial.theme.css"];
enableReactDevtools = true;
frameless = false;
transparent = false;
winCtrlQ = false;
macosTranslucency = false;
disableMinSize = true;
winNativeTitleBar = false;
plugins = {
BadgeAPI.enabled = true;
CommandsAPI.enabled = true;
ContextMenuAPI.enabled = true;
MemberListDecoratorsAPI.enabled = true;
MessageAccessoriesAPI.enabled = true;
MessageDecorationsAPI.enabled = true;
MessageEventsAPI.enabled = true;
MessagePopoverAPI.enabled = true;
NoticesAPI.enabled = true;
ServerListAPI.enabled = true;
SettingsStoreAPI.enabled = true;
NoTrack.enabled = true;
Settings = {
enabled = true;
settingsLocation = "aboveActivity";
};
AlwaysAnimate.enabled = false;
AlwaysTrust.enabled = false;
AnonymiseFileNames.enabled = false;
"WebRichPresence (arRPC)".enabled = false;
BANger.enabled = false;
BetterFolders = {
enabled = true;
sidebar = true;
sidebarAnim = true;
closeAllFolders = false;
closeAllHomeButton = false;
closeOthers = false;
forceOpen = false;
keepIcons = false;
showFolderIcon = 1;
};
BetterGifAltText.enabled = false;
BetterNotesBox.enabled = false;
BetterRoleDot.enabled = false;
BetterUploadButton.enabled = true;
BiggerStreamPreview.enabled = true;
BlurNSFW.enabled = false;
CallTimer = {
enabled = true;
format = "human";
};
ClearURLs.enabled = true;
ColorSighted.enabled = true;
ConsoleShortcuts.enabled = false;
CopyUserURLs.enabled = true;
CrashHandler.enabled = true;
CustomRPC.enabled = false;
Dearrow.enabled = true;
DisableDMCallIdle.enabled = true;
EmoteCloner.enabled = false;
Experiments = {
enabled = true;
enableIsStaff = false;
};
F8Break.enabled = false;
FakeNitro = {
enabled = true;
enableEmojiBypass = true;
emojiSize = 48;
transformEmojis = true;
enableStickerBypass = true;
stickerSize = 160;
transformStickers = true;
transformCompoundSentence = false;
enableStreamQualityBypass = true;
};
FakeProfileThemes = {
enabled = true;
nitroFirst = true;
};
FavoriteEmojiFirst.enabled = true;
FavoriteGifSearch = {
enabled = true;
searchOption = "hostandpath";
};
FixImagesQuality.enabled = true;
FixSpotifyEmbed = {
enabled = true;
volume = 10;
};
ForceOwnerCrown.enabled = true;
FriendInvites.enabled = false;
GameActivityToggle.enabled = true;
GifPaste.enabled = true;
HideAttachments.enabled = true;
iLoveSpam.enabled = true;
IgnoreActivities = {
enabled = true;
ignoredActivities = [];
};
ImageZoom = {
enabled = true;
saveZoomValues = true;
invertScroll = true;
nearestNeighbour = false;
square = false;
zoom = 2;
size = 100;
zoomSpeed = 0.5;
};
InvisibleChat = {
enabled = true;
savedPasswords = "password";
};
KeepCurrentChannel.enabled = true;
LastFMRichPresence.enabled = false;
LoadingQuotes.enabled = false;
MemberCount.enabled = true;
MessageClickActions = {
enabled = true;
enableDeleteOnClick = true;
enableDoubleClickToEdit = true;
enableDoubeClickToReply = true;
requireModifier = true;
};
MessageLinkEmbeds = {
enabled = true;
automodEmbeds = "never";
listMode = "blacklist";
idList = "";
};
MessageLogger = {
enabled = true;
deleteStyle = "text";
ignoreBots = false;
ignoreSelf = false;
ignoreUsers = "";
ignoreChannels = "";
ignoreGuilds = "";
};
MessageTags.enabled = false;
MoreCommands.enabled = true;
MoreKaomoji.enabled = true;
MoreUserTags.enabled = true;
Moyai.enabled = false;
MuteNewGuild = {
enabled = true;
guild = false;
everyone = true;
role = true;
};
MutualGroupDMs.enabled = true;
NoBlockedMessages = {
enabled = false;
ignoreBlockedMessages = false;
};
NoDevtoolsWarning.enabled = false;
NoF1.enabled = false;
NoPendingCount.enabled = false;
NoProfileThemes.enabled = true;
NoReplyMention = {
enabled = true;
userList = "372809091208445953";
shouldPingListed = false;
inverseShiftReply = true;
};
NoScreensharePreview.enabled = true;
NoTypingAnimation = true;
NoUnblockToJump.enabled = true;
NSFWGateBypass.enabled = true;
oneko.enabled = false;
OpenInApp.enabled = false;
"Party mode 🎉".enabled = false;
PermissionFreeWill = {
enabled = true;
lockout = true;
onboarding = true;
};
PermissionsViewer = {
enabled = true;
permissionsSortOrder = 0;
defaultPermissionsDropdownState = false;
};
petpet.enabled = true;
PictureInPicture = {
enabled = true;
loop = false;
};
PinDMs.enabled = true;
PlainFolderIcon.enabled = false;
PlatformIndicators = {
enabled = true;
list = true;
badges = true;
messages = true;
colorMobileIndicator = true;
};
PreviewMessage.enabled = true;
PronounDB.enabled = false;
QuickMention.enabled = false;
QuickReply.enabled = false;
ReactErrorDecoder.enabled = false;
ReadAllNotificationsButton.enabled = false;
RelationshipNotifier = {
enabled = true;
notices = true;
offlineRemovals = true;
friends = true;
friendRequestCancels = true;
servers = true;
groups = true;
};
RevealAllSpoilers.enabled = true;
ReverseImageSearch.enabled = false;
ReviewDB.enabled = false;
RoleColorEverywhere = {
enabled = true;
chatMentions = true;
memberList = true;
voiceUsers = true;
};
SearchReply.enabled = true;
SendTimestamps.enabled = false;
ServerListIndicators = {
enabled = true;
mode = 3;
};
ServerProfile.enabled = true;
ShikiCodeblocks = {
enabled = true;
theme = "https://raw.githubusercontent.com/shikijs/shiki/0b28ad8ccfbf2615f2d9d38ea8255416b8ac3043/packages/shiki/themes/dark-plus.json";
tryHljs = "SECONDARY";
uesDevIcon = "GREYSCALE";
};
ShowAllMessageButtons.enabled = true;
ShowConnections = {
enabled = true;
iconSize = 32;
iconSpacing = 1;
};
ShowHiddenChannels = {
enabled = true;
hideUnreads = true;
showMode = 0;
defaultAllowedUsersAndRolesDropdownState = true;
};
ShowMeYourName.enabled = false;
ShowTimeouts.enabled = true;
SilentMessageToggle = {
enabled = true;
persistState = false;
autoDisable = true;
};
SilentTyping = {
enabled = true;
showIcon = false;
isEnabled = true;
};
SortFriendRequests.enabled = false;
SpotifyControls.enabled = false;
SpotifyCrack.enabled = false;
SpotifyShareCommands.enabled = false;
StartupTimings.enabled = false;
SupportHelper.enabled = true;
TextReplace.enabled = false;
TimeBarAllActivities.enabled = false;
Translate.enabled = false;
TypingIndicator = {
enabled = true;
includeMutedChannels = false;
includeBlockedUsers = true;
};
TypingTweaks = {
enabled = true;
showAvatars = true;
showRoleColors = true;
alternativeFormatting = true;
};
Unindent.enabled = true;
UnsuppressEmbeds.enabled = true;
UrbanDictionary.enabled = false;
UserVoiceShow = {
enabled = true;
showInUserProfileModal = true;
showVoiceChannelSectionHeader = true;
};
USRBG.enabled = false;
UwUifier.enabled = false;
ValidUser.enabled = false;
VoiceChatDoubleClick.enabled = true;
VcNarrator.enabled = false;
VencordToolbox.enabled = false;
ViewIcons = {
enabled = true;
format = "png";
imgSize = "2048";
};
ViewRaw = {
enabled = true;
clickMethod = "Left";
};
VoiceMessages = {
enabled = true;
noiseSuppression = true;
echoCancellation = true;
};
WebContextMenus = {
enabled = true;
addBack = true;
};
WebKeybinds.enabled = true;
GreetStickerPicker.enabled = false;
WhoReacted.enabled = true;
Wikisearch.enabled = false;
NormalizeMessageLinks.enabled = false;
"AI Noise Suppression" = {
enabled = true;
isEnabled = true;
};
SecretRingToneEnabler.enabled = false;
};
notifications = {
timeout = 5000;
position = "bottom-right";
useNative = "not-focused";
logLimit = 50;
};
cloud = {
authenticated = false;
url = "https://api.vencord.dev/";
settingsSync = false;
settingsSyncVersion = 1682768329526;
};
};
};
};
}

View file

@ -0,0 +1,46 @@
{pkgs, ...}: let
vivado-desktop-symbol = pkgs.makeDesktopItem {
name = "vivado2019.2";
desktopName = "Vivado";
exec = "${pkgs.nur.repos.Nick1296.vivado-2019-2}/bin/vivado";
};
in {
environment.systemPackages = [
# this propietary software is huge, but I need it for
# university
pkgs.nur.repos.Nick1296.vivado-2019-2
vivado-desktop-symbol
];
# Create udev rules. Reference: https://blog.kotatsu.dev/posts/2021-09-14-vivado-on-nixos/
services.udev.packages = [
(pkgs.writeTextFile {
name = "xilinx-dilligent-usb-udev";
destination = "/etc/udev/rules.d/52-xilinx-digilent-usb.rules";
text = ''
ATTR{idVendor}=="1443", MODE:="666"
ACTION=="add", ATTR{idVendor}=="0403", ATTR{manufacturer}=="Digilent", MODE:="666"
'';
})
(pkgs.writeTextFile {
name = "xilinx-pcusb-udev";
destination = "/etc/udev/rules.d/52-xilinx-pcusb.rules";
text = ''
ATTR{idVendor}=="03fd", ATTR{idProduct}=="0008", MODE="666"
ATTR{idVendor}=="03fd", ATTR{idProduct}=="0007", MODE="666"
ATTR{idVendor}=="03fd", ATTR{idProduct}=="0009", MODE="666"
ATTR{idVendor}=="03fd", ATTR{idProduct}=="000d", MODE="666"
ATTR{idVendor}=="03fd", ATTR{idProduct}=="000f", MODE="666"
ATTR{idVendor}=="03fd", ATTR{idProduct}=="0013", MODE="666"
ATTR{idVendor}=="03fd", ATTR{idProduct}=="0015", MODE="666"
'';
})
(pkgs.writeTextFile {
name = "xilinx-ftdi-usb-udev";
destination = "/etc/udev/rules.d/52-xilinx-ftdi-usb.rules";
text = ''
ACTION=="add", ATTR{idVendor}=="0403", ATTR{manufacturer}=="Xilinx", MODE:="666"
'';
})
];
}

View file

@ -0,0 +1,324 @@
{
config,
lib,
pkgs,
...
}: let
cfg = config.modules.programs.waybar;
inherit (config.modules.other.system) username;
in {
options.modules.programs.waybar.enable = lib.mkEnableOption "waybar";
config = lib.mkIf cfg.enable {
home-manager.users.${username} = {
programs.waybar = {
enable = true;
package = pkgs.waybar;
settings.mainBar = {
gtk-layer-shell = true;
layer = "top";
position = "bottom";
modules-left = ["tray" "mpd"];
modules-center = ["hyprland/workspaces"];
modules-right = [
"cpu"
"memory"
"pulseaudio"
"clock"
"backlight"
"battery"
];
pulseaudio = {
tooltip = false;
scroll-step = "1";
format = " {icon} {volume}%";
format-muted = " 󰸈 {volume}%";
format-icons = {default = ["󰕿" "󰖀" "󰕾"];};
on-click = "${pkgs.wireplumber}/bin/wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle";
};
"hyprland/workspaces" = {
sort-by-name = true;
sort-by-coordinates = false;
on-click = "activate";
#on-scroll = "~/Scripts/cycle_workspace.sh 1";
active-only = true;
format = "{icon}";
format-icons = {
"1" = "1";
"2" = "2";
"3" = "3";
"4" = "4";
"5" = "5";
"6" = "6";
"7" = "7";
"8" = "8";
"9" = "9";
"10" = "10";
"11" = "1";
"12" = "2";
"13" = "3";
"14" = "4";
"15" = "5";
"16" = "6";
"17" = "7";
"18" = "8";
"19" = "9";
"20" = "10";
"21" = "1";
"22" = "2";
"23" = "3";
"24" = "4";
"25" = "5";
"26" = "6";
"27" = "7";
"28" = "8";
"29" = "9";
"30" = "10";
};
};
tray = {
icon-size = 12;
spacing = 5;
};
# 󰃰
clock = {
interval = 1;
format = " {:%a %d %b %H:%M:%S}";
};
battery = {
interval = 10;
states = {
good = 75;
warning = 20;
critical = 10;
};
format = "{icon}{capacity}%";
format-charging = "󰚥{icon}{capacity}%";
format-discharging = "{icon}{capacity}%";
format-icons = ["󰂎" "󰁺" "󰁻" "󰁼" "󰁽" "󰁾" "󰁿" "󰂀" "󰂁" "󰂂" "󰁹"];
format-charging-icons = ["󰢟" "󰢜" "󰂆" "󰂇" "󰂈" "󰢝" "󰂉" "󰢞" "󰂊" "󰂋" "󰂅"];
};
cpu = {
interval = 1;
format = "󰻠 {}%";
max-length = 10;
};
memory = {
interval = 1;
format = "󰍛 {}%";
max-length = 10;
};
"hyprland/window" = {
format = "{}";
separate-outputs = true;
};
mpd = {
format = "󰝚 {artist} - {title} ({elapsedTime:%M:%S}/{totalTime:%M:%S})";
format-disconnected = "󰝚 Disconnected";
format-stopped = "󰝚 Stopped";
interval = 1;
tooltip-format = "MPD (connected)";
tooltip-format-disconnected = "MPD (disconnected)";
on-click = "mpc toggle";
};
};
style = ''
@define-color base #000000;
@define-color inactive #ab8f44;
@define-color active #1565c0;
@define-color text #ffffff;
* {
border-radius: 1px;
font-family: ComicShannsMono Nerd Font;
font-size: 16px;
}
window#waybar {
background-color: alpha(@base, 1.0);
border-radius: 0px;
}
window#waybar.hidden {
opacity: 0.2;
}
#window {
margin-top: 2px;
margin-bottom: 2px;
padding-left: 2px;
padding-right: 2px;
background: @base;
color: @text;
font-family: ComicShannsMono Nerd Font;
}
#workspaces {
padding-left: 5px;
}
#workspaces button {
border-radius: 0px;
padding-top: 0px;
padding-right: 0px;
padding-bottom: 0px;
padding-left: 0px;
margin-top: 2px;
margin-right: 2px;
margin-bottom: 2px;
margin-left: 2px;
background-color: @inactive;
color: @text;
min-width: 15px;
}
#workspaces button.active {
padding-top: 0px;
padding-bottom: 0px;
padding-right: 0px;
padding-left: 0px;
margin-top: 2px;
margin-right: 2px;
margin-bottom: 2px;
margin-left: 2px;
background-color: @active;
color: @base;
min-width: 15px;
}
#workspaces button.urgent {
background-color: @red;
}
.modules-left > widget:first-child > #workspaces {
margin-left: 0;
}
.modules-right > widget:first-child > #workspaces {
margin-right: 0;
}
#pulseaudio {
margin-top: 2px;
margin-bottom: 2px;
margin-left: 2px;
margin-right: 2px;
padding-left: 0px;
padding-right: 0px;
transition: none;
background: @base;
color: @text;
}
#battery {
margin-top: 3px;
margin-bottom: 3px;
margin-left: 8px;
padding-left: 10px;
padding-right: 10px;
transition: none;
background: @base;
color: @text;
}
@keyframes blink {
to {
background-color: @red;
}
}
#battery.charging, #battery.plugged {
background-color: @base;
}
#battery.critical:not(.charging) {
background-color: @base;
animation-name: blink;
animation-duration: 0.5s;
animation-timing-function: linear;
animation-iteration-count: infinite;
animation-direction: alternate;
}
#backlight {
margin-top: 3px;
margin-bottom: 3px;
margin-left: 8px;
padding-left: 10px;
padding-right: 10px;
transition: none;
background: @base;
color: @yellow;
}
#clock {
margin-top: 3px;
margin-bottom: 3px;
margin-left: 8px;
padding-left: 10px;
padding-right: 10px;
transition-property: min-width;
transition-duration: 0.5s;
background: @base;
color: @text;
}
#tray {
margin-top: 2px;
margin-bottom: 2px;
margin-left: 2px;
padding-left: 2px;
padding-right: 2px;
transition: none;
background: @base;
}
#custom-power {
font-size: 20px;
margin-top: 3px;
margin-bottom: 3px;
margin-left: 8px;
margin-right: 8px;
padding-left: 10px;
padding-right: 10px;
transition: none;
background: @base;
color: @red;
}
#custom-media {
margin-top: 3px;
margin-bottom: 3px;
margin-left: 8px;
padding-left: 10px;
padding-right: 10px;
transition: none;
background: @mantle;
}
#mpd {
margin-top: 3px;
margin-bottom: 3px;
margin-left: 8px;
padding-left: 10px;
padding-right: 10px;
transition: none;
background: @base;
color: @text;
}
'';
};
};
};
}

View file

@ -0,0 +1,28 @@
{
config,
lib,
pkgs,
...
}:
with lib; let
cfg = config.modules.system.programs.zathura;
inherit (config.modules.other.system) username;
in {
config = mkIf cfg.enable {
home-manager.users.${username} = {
programs.zathura = {
enable = true;
options = {
selection-clipboard = "clipboard";
adjust-open = "best-fit";
pages-per-row = "1";
scroll-page-aware = "true";
scroll-full-overlap = "0.01";
scroll-step = "100";
zoom-min = "10";
guioptions = "none";
};
};
};
};
}