modules: move tui, gui, cli to programs
This commit is contained in:
parent
febb421800
commit
47a79eea64
106 changed files with 3 additions and 47 deletions
31
modules/programs/tui/btop.nix
Normal file
31
modules/programs/tui/btop.nix
Normal file
|
@ -0,0 +1,31 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.modules.programs.btop;
|
||||
inherit (config.modules.other.system) username;
|
||||
in {
|
||||
options.modules.programs.btop.enable = mkEnableOption "btop";
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
home-manager.users.${username} = {
|
||||
programs.btop = {
|
||||
enable = true;
|
||||
settings = {
|
||||
theme_background = false;
|
||||
vim_keys = true;
|
||||
update_ms = 1000;
|
||||
cpu_single_graph = true;
|
||||
clock_format = "%X";
|
||||
use_fstab = true;
|
||||
io_mode = true;
|
||||
net_sync = true;
|
||||
net_iface = "enp4s0";
|
||||
log_level = "WARNING";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
3
modules/programs/tui/default.nix
Normal file
3
modules/programs/tui/default.nix
Normal file
|
@ -0,0 +1,3 @@
|
|||
_: {
|
||||
imports = [./btop.nix ./newsboat.nix ./ncmpcpp.nix ./yazi.nix ./wtfutil.nix];
|
||||
}
|
162
modules/programs/tui/ncmpcpp.nix
Normal file
162
modules/programs/tui/ncmpcpp.nix
Normal file
|
@ -0,0 +1,162 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.modules.usrEnv.programs.media.ncmpcpp;
|
||||
inherit (config.modules.other.system) username;
|
||||
inherit (config.modules.usrEnv.services.media.mpd) musicDirectory;
|
||||
in {
|
||||
config = mkIf cfg.enable {
|
||||
home-manager.users.${username} = {
|
||||
programs.ncmpcpp = {
|
||||
enable = true;
|
||||
package = pkgs.ncmpcpp.override {visualizerSupport = true;};
|
||||
mpdMusicDir = "${musicDirectory}";
|
||||
|
||||
bindings = [
|
||||
{
|
||||
key = "j";
|
||||
command = "scroll_down";
|
||||
}
|
||||
{
|
||||
key = "k";
|
||||
command = "scroll_up";
|
||||
}
|
||||
{
|
||||
key = "J";
|
||||
command = ["select_item" "scroll_down"];
|
||||
}
|
||||
{
|
||||
key = "K";
|
||||
command = ["select_item" "scroll_up"];
|
||||
}
|
||||
];
|
||||
settings = {
|
||||
# Miscelaneous
|
||||
ignore_leading_the = true;
|
||||
external_editor = "nvim";
|
||||
message_delay_time = 1;
|
||||
playlist_disable_highlight_delay = 2;
|
||||
autocenter_mode = "yes";
|
||||
centered_cursor = "yes";
|
||||
allow_for_physical_item_deletion = "no";
|
||||
lines_scrolled = "0";
|
||||
follow_now_playing_lyrics = "yes";
|
||||
lyrics_fetchers = "musixmatch";
|
||||
connected_message_on_startup = "no";
|
||||
mouse_support = "yes";
|
||||
|
||||
# visualizer
|
||||
visualizer_data_source = "/tmp/mpd.fifo";
|
||||
visualizer_output_name = "mpd_visualizer";
|
||||
visualizer_type = "ellipse";
|
||||
visualizer_look = "●● ";
|
||||
visualizer_color = "blue, green";
|
||||
|
||||
# appearance
|
||||
colors_enabled = "yes";
|
||||
browser_playlist_prefix = "$2 ♥ $5 ";
|
||||
playlist_display_mode = "classic";
|
||||
user_interface = "classic";
|
||||
volume_color = "white";
|
||||
|
||||
# window
|
||||
song_window_title_format = "Music";
|
||||
statusbar_visibility = "no";
|
||||
header_visibility = "no";
|
||||
titles_visibility = "no";
|
||||
|
||||
# progress bar
|
||||
progressbar_look = "━━━";
|
||||
progressbar_color = "black";
|
||||
progressbar_elapsed_color = "blue";
|
||||
|
||||
# song list
|
||||
song_status_format = "$7%t";
|
||||
song_list_format = "$(008)%t$R $(247)%a$R$5 %l$8";
|
||||
song_columns_list_format = "(53)[blue]{tr} (45)[blue]{a}";
|
||||
|
||||
current_item_prefix = "$b$2| ";
|
||||
current_item_suffix = "$/b$5";
|
||||
|
||||
now_playing_prefix = "$b$5| ";
|
||||
now_playing_suffix = "$/b$5";
|
||||
|
||||
song_library_format = "{{%a - %t} (%b)}|{%f}";
|
||||
|
||||
# colors
|
||||
main_window_color = "blue";
|
||||
|
||||
current_item_inactive_column_prefix = "$b$5";
|
||||
current_item_inactive_column_suffix = "$/b$5";
|
||||
|
||||
color1 = "white";
|
||||
color2 = "blue";
|
||||
/*
|
||||
alternative_header_first_line_format = "$5{$b%t$/b}$9";
|
||||
alternative_header_second_line_format = "$3by $7{$b%a$/b}$9 $3from $7{$b%b$/b}$9 $5{(%y)}";
|
||||
song_list_format = "♫ $2%n$(end) $9 $3%a$(end) $(245)-$9 $(246)%t$9 $R{ $5%y$9}$(end) $(246)%lq$(end)";
|
||||
song_columns_list_format = "(3f)[red]{n} (3f)[246]{} (35)[white]{t} (18)[blue]{a} (30)[green]{b} (5f)[yellow]{d} (5f)[red]{y} (7f)[magenta]{l}";
|
||||
song_status_format = "$b $8%A $8•$3• $3%t $3•$5• $5%b $5•$2• $2%y $2•$8• %g";
|
||||
playlist_display_mode = "columns";
|
||||
browser_display_mode = "columns";
|
||||
search_engine_display_mode = "columns";
|
||||
now_playing_prefix = "$b";
|
||||
now_playing_suffix = "$/b";
|
||||
browser_playlist_prefix = "$2 ♥ $5 ";
|
||||
playlist_disable_highlight_delay = "1";
|
||||
message_delay_time = "1";
|
||||
progressbar_look = "━━━";
|
||||
colors_enabled = "yes";
|
||||
empty_tag_color = "red";
|
||||
statusbar_color = "blue";
|
||||
state_line_color = "black";
|
||||
state_flags_color = "default";
|
||||
main_window_color = "blue";
|
||||
header_window_color = "white";
|
||||
alternative_ui_separator_color = "black";
|
||||
window_border_color = "green";
|
||||
active_window_border = "red";
|
||||
volume_color = "default";
|
||||
progressbar_color = "black";
|
||||
progressbar_elapsed_color = "blue";
|
||||
statusbar_time_color = "blue";
|
||||
player_state_color = "default";
|
||||
display_bitrate = "yes";
|
||||
autocenter_mode = "yes";
|
||||
centered_cursor = "yes";
|
||||
titles_visibility = "no";
|
||||
enable_window_title = "yes";
|
||||
statusbar_visibility = "yes";
|
||||
empty_tag_marker = "";
|
||||
mouse_support = "yes";
|
||||
header_visibility = "no";
|
||||
display_remaining_time = "no";
|
||||
ask_before_clearing_playlists = "yes";
|
||||
discard_colors_if_item_is_selected = "yes";
|
||||
user_interface = "alternative";
|
||||
default_find_mode = "wrapped";
|
||||
lyrics_directory = "~/.lyrics";
|
||||
follow_now_playing_lyrics = "yes";
|
||||
store_lyrics_in_song_dir = "no";
|
||||
ignore_leading_the = "yes";
|
||||
lines_scrolled = "1";
|
||||
mouse_list_scroll_whole_page = "no";
|
||||
show_hidden_files_in_local_browser = "no";
|
||||
startup_screen = "playlist";
|
||||
connected_message_on_startup = "no";
|
||||
playlist_separate_albums = "no";
|
||||
allow_for_physical_item_deletion = "no";
|
||||
visualizer_in_stereo = "yes";
|
||||
visualizer_data_source = "/tmp/mpd.fifo";
|
||||
visualizer_type = "wave_filled";
|
||||
visualizer_look = "▉▋";
|
||||
*/
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
83
modules/programs/tui/newsboat.nix
Normal file
83
modules/programs/tui/newsboat.nix
Normal file
|
@ -0,0 +1,83 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.modules.programs.newsboat;
|
||||
username = config.modules.other.system.username;
|
||||
in {
|
||||
options.modules.programs.newsboat.enable = mkEnableOption "newsboat";
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
home-manager.users.${username} = {
|
||||
programs.newsboat = {
|
||||
enable = true;
|
||||
autoReload = true;
|
||||
extraConfig = ''
|
||||
download-full-page yes
|
||||
download-retries 3
|
||||
error-log /dev/null
|
||||
cookie-cache ~/.cache/newsboat/cookies.txt
|
||||
bind-key j down
|
||||
bind-key k up
|
||||
bind-key G end
|
||||
bind-key g home
|
||||
bind-key d pagedown
|
||||
bind-key u pageup
|
||||
bind-key a toggle-article-read
|
||||
macro x set browser "setsid -f mpv --really-quiet --no-terminal" ; open-in-browser ; set browser librewolf
|
||||
|
||||
color listnormal color15 default
|
||||
color listnormal_unread color2 default
|
||||
color listfocus_unread color2 color0
|
||||
color listfocus default color0
|
||||
color background default default
|
||||
color article default default
|
||||
color end-of-text-marker color8 default
|
||||
color info color4 color8
|
||||
color hint-separator default color8
|
||||
color hint-description default color8
|
||||
color title color14 color8
|
||||
|
||||
highlight article "^(Feed|Title|Author|Link|Date): .+" color4 default bold
|
||||
highlight article "^(Feed|Title|Author|Link|Date):" color14 default bold
|
||||
highlight article "\\((link|image|video)\\)" color8 default
|
||||
highlight article "https?://[^ ]+" color4 default
|
||||
highlight article "\[[0-9]+\]" color6 default bold
|
||||
user-agent "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36"
|
||||
'';
|
||||
urls = [
|
||||
{
|
||||
title = "NixOS Weekly";
|
||||
url = "https://weekly.nixos.org/feeds/all.rss.xml";
|
||||
}
|
||||
{
|
||||
title = "Veronica Explains";
|
||||
url = "https://www.youtube.com/feeds/videos.xml?channel_id=UCMiyV_Ib77XLpzHPQH_q0qQ";
|
||||
}
|
||||
{
|
||||
title = "Mental Outlaw";
|
||||
url = "https://www.youtube.com/feeds/videos.xml?channel_id=UC7YOGHUfC1Tb6E4pudI9STA";
|
||||
}
|
||||
{
|
||||
title = "Hacker News";
|
||||
url = "https://hnrss.org/newest";
|
||||
}
|
||||
{
|
||||
title = "Phoronix";
|
||||
url = "https://www.phoronix.com/rss.php";
|
||||
}
|
||||
{
|
||||
title = "LWN";
|
||||
url = "https://lwn.net/headlines/rss";
|
||||
}
|
||||
{
|
||||
title = "Hyprland Commit Feed";
|
||||
url = "https://github.com/hyprwm/Hyprland/commits/main.atom";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
133
modules/programs/tui/wtfutil.nix
Normal file
133
modules/programs/tui/wtfutil.nix
Normal file
|
@ -0,0 +1,133 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf mkEnableOption;
|
||||
cfg = config.modules.programs.wtfutil;
|
||||
inherit (config.modules.other.system) username;
|
||||
in {
|
||||
options.modules.programs.wtfutil.enable = mkEnableOption "wtfutil";
|
||||
config = mkIf cfg.enable {
|
||||
environment.systemPackages = with pkgs; [
|
||||
wtf
|
||||
];
|
||||
home-manager.users.${username}.xdg.configFile."wtf/config.yml".text = builtins.toJSON {
|
||||
wtf = {
|
||||
refreshInterval = 1;
|
||||
colors = {
|
||||
border = {
|
||||
focusable = "darkslateblue";
|
||||
focused = "orange";
|
||||
normal = "gray";
|
||||
};
|
||||
};
|
||||
grid = {
|
||||
columns = "[15, 15, 15, 15, 40]";
|
||||
rows = "[10, 10, 10, 4, 4, 90]";
|
||||
};
|
||||
mods = {
|
||||
clocks_a = {
|
||||
enabled = true;
|
||||
locations = {Zurich = "Europe/Zurich";};
|
||||
position = {
|
||||
top = 0;
|
||||
left = 0;
|
||||
height = 2;
|
||||
width = 3;
|
||||
};
|
||||
refreshInterval = 15;
|
||||
sort = "alphabetical";
|
||||
title = "Clock!";
|
||||
type = "clocks";
|
||||
colors = {
|
||||
rows = {
|
||||
even = "lightblue";
|
||||
odd = "white";
|
||||
};
|
||||
};
|
||||
};
|
||||
git = {
|
||||
enabled = true;
|
||||
showModuleName = true;
|
||||
commitCount = 50;
|
||||
commitFormat = "[forestgreen]%h [grey]%cd [white]%s [grey]%an[white]";
|
||||
dateFormat = "%H:%M %d %b %y";
|
||||
position = {
|
||||
top = 0;
|
||||
left = 5;
|
||||
height = 4;
|
||||
width = 4;
|
||||
};
|
||||
refreshInterval = 10;
|
||||
repositories = [
|
||||
"/home/${username}/repos/nichts"
|
||||
"/home/${username}/repos/analysis-1-cheatsheet"
|
||||
];
|
||||
};
|
||||
ipapi = {
|
||||
enabled = true;
|
||||
refreshInterval = 300;
|
||||
position = {
|
||||
top = 6;
|
||||
left = 0;
|
||||
height = 3;
|
||||
width = 3;
|
||||
};
|
||||
colors = {
|
||||
name = "red";
|
||||
value = "white";
|
||||
};
|
||||
};
|
||||
lunarphase = {
|
||||
enabled = false;
|
||||
refreshInterval = "5h";
|
||||
language = "en";
|
||||
position = {
|
||||
top = 3;
|
||||
left = 5;
|
||||
height = 7;
|
||||
width = 3;
|
||||
};
|
||||
};
|
||||
power = {
|
||||
enabled = false;
|
||||
refreshInterval = 15;
|
||||
position = {
|
||||
top = 5;
|
||||
left = 0;
|
||||
height = 2;
|
||||
width = 1;
|
||||
};
|
||||
};
|
||||
resourceusage = {
|
||||
enabled = true;
|
||||
showModuleName = false;
|
||||
refreshInterval = 1;
|
||||
showCPU = true;
|
||||
showMem = true;
|
||||
showSwp = true;
|
||||
cpuCombined = true;
|
||||
position = {
|
||||
top = 2;
|
||||
left = 0;
|
||||
height = 2;
|
||||
width = 3;
|
||||
};
|
||||
};
|
||||
security = {
|
||||
enabled = true;
|
||||
refreshInterval = "1h";
|
||||
position = {
|
||||
top = 0;
|
||||
left = 3;
|
||||
height = 3;
|
||||
width = 2;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
20
modules/programs/tui/yazi.nix
Normal file
20
modules/programs/tui/yazi.nix
Normal file
|
@ -0,0 +1,20 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.modules.programs.yazi;
|
||||
inherit (config.modules.other.system) username;
|
||||
in {
|
||||
options.modules.programs.yazi = {enable = mkEnableOption "yazi";};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
home-manager.users.${username} = {
|
||||
programs.yazi = {
|
||||
enable = true;
|
||||
enableFishIntegration = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue