desktop building?
This commit is contained in:
126
modules/home/programs/btop/default.nix
Executable file
126
modules/home/programs/btop/default.nix
Executable file
@@ -0,0 +1,126 @@
|
||||
{ config, lib, ... }:
|
||||
with lib;
|
||||
let
|
||||
cfg = config.mjallen.programs.btop;
|
||||
nord = import ../../desktop/theme/nord.nix;
|
||||
in
|
||||
{
|
||||
imports = [ ./options.nix ];
|
||||
config = mkIf cfg.enable {
|
||||
programs.btop = {
|
||||
enable = true;
|
||||
settings = {
|
||||
color_theme = "nord"; # todo
|
||||
theme_background = true;
|
||||
truecolor = true;
|
||||
force_tty = false;
|
||||
presets = "cpu:1:default,proc:0:default cpu:0:default,mem:0:default,net:0:default cpu:0:block,net:0:tty";
|
||||
vim_keys = true;
|
||||
rounded_corners = true;
|
||||
graph_symbol = "braille";
|
||||
graph_symbol_cpu = "default";
|
||||
graph_symbol_mem = "default";
|
||||
graph_symbol_net = "default";
|
||||
graph_symbol_proc = "default";
|
||||
shown_boxes = "cpu mem net proc";
|
||||
update_ms = 2000;
|
||||
proc_sorting = "cpu lazy";
|
||||
proc_reversed = false;
|
||||
proc_tree = false;
|
||||
proc_colors = true;
|
||||
proc_gradient = true;
|
||||
proc_per_core = false;
|
||||
proc_mem_bytes = true;
|
||||
proc_cpu_graphs = true;
|
||||
proc_info_smaps = false;
|
||||
proc_left = false;
|
||||
proc_filter_kernel = false;
|
||||
cpu_graph_upper = "total";
|
||||
cpu_graph_lower = "total";
|
||||
cpu_invert_lower = true;
|
||||
cpu_single_graph = false;
|
||||
cpu_bottom = false;
|
||||
show_uptime = true;
|
||||
check_temp = true;
|
||||
cpu_sensor = "Auto";
|
||||
show_coretemp = true;
|
||||
cpu_core_map = "";
|
||||
temp_scale = "celsius";
|
||||
base_10_sizes = false;
|
||||
show_cpu_freq = true;
|
||||
clock_format = "%X";
|
||||
background_update = true;
|
||||
custom_cpu_name = "";
|
||||
disks_filter = "";
|
||||
mem_graphs = true;
|
||||
mem_below_net = false;
|
||||
zfs_arc_cached = true;
|
||||
show_swap = true;
|
||||
swap_disk = true;
|
||||
show_disks = true;
|
||||
only_physical = true;
|
||||
use_fstab = true;
|
||||
zfs_hide_datasets = false;
|
||||
disk_free_priv = false;
|
||||
show_io_stat = true;
|
||||
io_mode = false;
|
||||
io_graph_combined = false;
|
||||
io_graph_speeds = "";
|
||||
net_download = 100;
|
||||
net_upload = 100;
|
||||
net_auto = true;
|
||||
net_sync = true;
|
||||
net_iface = "";
|
||||
show_battery = true;
|
||||
selected_battery = "Auto";
|
||||
log_level = "WARNING";
|
||||
};
|
||||
themes = {
|
||||
nord = ''
|
||||
theme[main_bg]="${nord.polarNight.nord0}"
|
||||
theme[main_fg]="${nord.snowStorm.nord6}"
|
||||
theme[title]="${nord.snowStorm.nord6}"
|
||||
theme[hi_fg]="${nord.frost.nord7}"
|
||||
theme[selected_bg]="${nord.polarNight.nord1}"
|
||||
theme[selected_fg]="${nord.frost.nord7}"
|
||||
theme[inactive_fg]="${nord.polarNight.nord2}"
|
||||
theme[graph_text]="${nord.snowStorm.nord6}"
|
||||
theme[meter_bg]="${nord.polarNight.nord1}"
|
||||
theme[proc_misc]="${nord.snowStorm.nord6}"
|
||||
theme[cpu_box]="${nord.aurora.nord15}"
|
||||
theme[mem_box]="${nord.aurora.nord14}"
|
||||
theme[net_box]="${nord.aurora.nord12}"
|
||||
theme[proc_box]="${nord.aurora.nord11}"
|
||||
theme[div_line]="${nord.polarNight.nord1}"
|
||||
theme[temp_start]="${nord.aurora.nord14}"
|
||||
theme[temp_mid]="${nord.aurora.nord13}"
|
||||
theme[temp_end]="${nord.aurora.nord11}"
|
||||
theme[cpu_start]="${nord.aurora.nord15}"
|
||||
theme[cpu_mid]="${nord.aurora.nord12}"
|
||||
theme[cpu_end]="${nord.aurora.nord11}"
|
||||
theme[free_start]="${nord.aurora.nord14}"
|
||||
theme[free_mid]="${nord.aurora.nord13}"
|
||||
theme[free_end]="${nord.aurora.nord12}"
|
||||
theme[cached_start]="${nord.aurora.nord14}"
|
||||
theme[cached_mid]="${nord.aurora.nord13}"
|
||||
theme[cached_end]="${nord.aurora.nord12}"
|
||||
theme[available_start]="${nord.snowStorm.nord6}"
|
||||
theme[available_mid]="${nord.aurora.nord11}"
|
||||
theme[available_end]="${nord.aurora.nord11}"
|
||||
theme[used_start]="${nord.aurora.nord14}"
|
||||
theme[used_mid]="${nord.aurora.nord13}"
|
||||
theme[used_end]="${nord.aurora.nord11}"
|
||||
theme[download_start]="${nord.frost.nord8}"
|
||||
theme[download_mid]="${nord.frost.nord8}"
|
||||
theme[download_end]="${nord.aurora.nord12}"
|
||||
theme[upload_start]="${nord.frost.nord7}"
|
||||
theme[upload_mid]="${nord.frost.nord7}"
|
||||
theme[upload_end]="${nord.aurora.nord12}"
|
||||
theme[process_start]="${nord.aurora.nord15}"
|
||||
theme[process_mid]="${nord.aurora.nord12}"
|
||||
theme[process_end]="${nord.aurora.nord11}"
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
7
modules/home/programs/btop/options.nix
Normal file
7
modules/home/programs/btop/options.nix
Normal file
@@ -0,0 +1,7 @@
|
||||
{ lib, ... }:
|
||||
with lib;
|
||||
{
|
||||
options.mjallen.programs.btop = {
|
||||
enable = mkEnableOption "enable btop";
|
||||
};
|
||||
}
|
||||
106
modules/home/programs/kitty/default.nix
Executable file
106
modules/home/programs/kitty/default.nix
Executable file
@@ -0,0 +1,106 @@
|
||||
{ lib, config, ... }:
|
||||
with lib;
|
||||
let
|
||||
cfg = config.mjallen.programs.kitty;
|
||||
nord = import ../../desktop/theme/nord.nix;
|
||||
in
|
||||
{
|
||||
imports = [ ./options.nix ];
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
programs.kitty = {
|
||||
enable = true;
|
||||
shellIntegration.enableZshIntegration = true;
|
||||
|
||||
font = {
|
||||
name = cfg.font.name;
|
||||
package = cfg.font.package;
|
||||
size = cfg.font.size;
|
||||
};
|
||||
|
||||
settings = {
|
||||
bold_font = "auto";
|
||||
italic_font = "auto";
|
||||
bold_italic_font = "auto";
|
||||
mouse_hide_wait = "2.0";
|
||||
cursor_shape = "block";
|
||||
url_style = "dotted";
|
||||
confirm_os_window_close = "0";
|
||||
background_opacity = "0.85";
|
||||
|
||||
# The basic colors
|
||||
foreground = nord.snowStorm.nord6;
|
||||
background = nord.polarNight.nord0;
|
||||
selection_foreground = nord.polarNight.nord0;
|
||||
selection_background = nord.aurora.nord15;
|
||||
|
||||
# Cursor colors
|
||||
cursor = nord.aurora.nord15;
|
||||
cursor_text_color = nord.polarNight.nord0;
|
||||
|
||||
# URL underline color when hovering with mouse
|
||||
url_color = nord.aurora.nord15;
|
||||
|
||||
# Kitty window border colors
|
||||
active_border_color = nord.frost.nord10;
|
||||
inactive_border_color = nord.polarNight.nord1;
|
||||
bell_border_color = nord.aurora.nord13;
|
||||
|
||||
# OS Window titlebar colors
|
||||
wayland_titlebar_color = nord.polarNight.nord0;
|
||||
macos_titlebar_color = nord.polarNight.nord0;
|
||||
|
||||
# Tab bar colors
|
||||
active_tab_foreground = nord.polarNight.nord3;
|
||||
active_tab_background = nord.aurora.nord15;
|
||||
inactive_tab_foreground = nord.snowStorm.nord6;
|
||||
inactive_tab_background = nord.polarNight.nord1;
|
||||
tab_bar_background = nord.polarNight.nord3;
|
||||
|
||||
# Colors for marks (marked text in the terminal)
|
||||
mark1_foreground = nord.polarNight.nord0;
|
||||
mark1_background = nord.frost.nord10;
|
||||
mark2_foreground = nord.polarNight.nord0;
|
||||
mark2_background = nord.aurora.nord15;
|
||||
mark3_foreground = nord.polarNight.nord0;
|
||||
mark3_background = nord.frost.nord8;
|
||||
|
||||
# The 16 terminal colors
|
||||
|
||||
# black
|
||||
color0 = nord.polarNight.nord0;
|
||||
|
||||
# Autosuggestion
|
||||
color8 = nord.frost.nord10;
|
||||
|
||||
# red
|
||||
color1 = nord.aurora.nord11;
|
||||
color9 = nord.aurora.nord11;
|
||||
|
||||
# green
|
||||
color2 = nord.aurora.nord14;
|
||||
color10 = nord.aurora.nord14;
|
||||
|
||||
# yellow
|
||||
color3 = nord.aurora.nord13;
|
||||
color11 = nord.aurora.nord13;
|
||||
|
||||
# blue
|
||||
color4 = nord.frost.nord10;
|
||||
color12 = nord.frost.nord10;
|
||||
|
||||
# magenta
|
||||
color5 = nord.aurora.nord15;
|
||||
color13 = nord.aurora.nord15;
|
||||
|
||||
# cyan
|
||||
color6 = nord.frost.nord8;
|
||||
color14 = nord.frost.nord8;
|
||||
|
||||
# white
|
||||
color7 = nord.snowStorm.nord5;
|
||||
color15 = nord.snowStorm.nord4;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
27
modules/home/programs/kitty/options.nix
Normal file
27
modules/home/programs/kitty/options.nix
Normal file
@@ -0,0 +1,27 @@
|
||||
{ lib, ... }:
|
||||
with lib;
|
||||
{
|
||||
options.mjallen.programs.kitty = {
|
||||
enable = mkEnableOption "enable kitty terminal";
|
||||
|
||||
font = {
|
||||
name = mkOption {
|
||||
type = types.str;
|
||||
default = "DejaVu Sans";
|
||||
};
|
||||
package = mkOption {
|
||||
type = types.package;
|
||||
default = pkgs.dejavu_fonts;
|
||||
};
|
||||
size = mkOption {
|
||||
type = with types; int;
|
||||
default = 8;
|
||||
};
|
||||
};
|
||||
|
||||
theme = mkOption {
|
||||
type = types.attrs;
|
||||
default = import ../../desktop/theme/nord.nix;
|
||||
};
|
||||
};
|
||||
}
|
||||
32
modules/home/programs/mako/default.nix
Executable file
32
modules/home/programs/mako/default.nix
Executable file
@@ -0,0 +1,32 @@
|
||||
{ config, lib, ... }:
|
||||
with lib;
|
||||
let
|
||||
cfg = config.mjallen.programs.mako;
|
||||
nord = import ../../desktop/theme/nord.nix;
|
||||
in
|
||||
{
|
||||
imports = [ ./options.nix ];
|
||||
config = mkIf cfg.enable {
|
||||
services.mako = {
|
||||
enable = true;
|
||||
settings = {
|
||||
font = cfg.fontName;
|
||||
icons = true;
|
||||
ignore-timeout = true;
|
||||
sort = "-time";
|
||||
width = 500;
|
||||
height = 110;
|
||||
layer = "overlay";
|
||||
border-radius = 15;
|
||||
border-size = 1;
|
||||
max-icon-size = 64;
|
||||
default-timeout = 5000;
|
||||
|
||||
background-color = nord.polarNight.nord0;
|
||||
text-color = nord.snowStorm.nord6;
|
||||
border-color = nord.frost.nord10;
|
||||
progress-color = "over ${nord.frost.nord8}";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
12
modules/home/programs/mako/options.nix
Normal file
12
modules/home/programs/mako/options.nix
Normal file
@@ -0,0 +1,12 @@
|
||||
{ lib, ... }:
|
||||
with lib;
|
||||
{
|
||||
options.mjallen.programs.mako = {
|
||||
enable = mkEnableOption "enable mako";
|
||||
|
||||
fontName = mkOption {
|
||||
type = types.str;
|
||||
default = "DejaVu Sans";
|
||||
};
|
||||
};
|
||||
}
|
||||
60
modules/home/programs/nwg-dock/default.nix
Normal file
60
modules/home/programs/nwg-dock/default.nix
Normal file
@@ -0,0 +1,60 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
with lib;
|
||||
let
|
||||
cfg = config.mjallen.programs.nwg-dock;
|
||||
nord = import ../../desktop/theme/nord.nix;
|
||||
in
|
||||
{
|
||||
imports = [ ./options.nix ];
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
home.packages = with pkgs; [ nwg-dock-hyprland ];
|
||||
|
||||
home.file = {
|
||||
".config/nwg-dock-hyprland/drawer.css".text = ''
|
||||
window {
|
||||
background: ${nord.polarNight.nord0};
|
||||
border-radius: 10px;
|
||||
border-style: none;
|
||||
border-width: 1px;
|
||||
border-color: ${nord.aurora.nord15}b0
|
||||
}
|
||||
|
||||
#box {
|
||||
/* Define attributes of the box surrounding icons here */
|
||||
padding: 10px
|
||||
}
|
||||
|
||||
active {
|
||||
/* This is to underline the button representing the currently active window */
|
||||
border-bottom: solid 1px;
|
||||
border-color: ${nord.aurora.nord14}1a
|
||||
}
|
||||
|
||||
button, image {
|
||||
background: none;
|
||||
border-style: none;
|
||||
box-shadow: none;
|
||||
color: ${nord.frost.nord10}
|
||||
}
|
||||
|
||||
button {
|
||||
padding: 4px;
|
||||
margin-left: 4px;
|
||||
margin-right: 4px;
|
||||
color: #eee;
|
||||
font-size: 12px
|
||||
}
|
||||
|
||||
button:hover {
|
||||
background-color: ${nord.polarNight.nord0}1a;
|
||||
border-radius: 2px;
|
||||
}
|
||||
|
||||
button:focus {
|
||||
box-shadow: none
|
||||
}
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
7
modules/home/programs/nwg-dock/options.nix
Normal file
7
modules/home/programs/nwg-dock/options.nix
Normal file
@@ -0,0 +1,7 @@
|
||||
{ lib, ... }:
|
||||
with lib;
|
||||
{
|
||||
options.mjallen.programs.nwg-dock = {
|
||||
enable = mkEnableOption "enable nwg-dock";
|
||||
};
|
||||
}
|
||||
52
modules/home/programs/nwg-drawer/default.nix
Normal file
52
modules/home/programs/nwg-drawer/default.nix
Normal file
@@ -0,0 +1,52 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
with lib;
|
||||
let
|
||||
cfg = config.mjallen.programs.nwg-drawer;
|
||||
nord = import ../../desktop/theme/nord.nix;
|
||||
in
|
||||
{
|
||||
imports = [ ./options.nix ];
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
home.packages = with pkgs; [ nwg-drawer ];
|
||||
|
||||
home.file = {
|
||||
".config/nwg-drawer/drawer.css".text = ''
|
||||
window {
|
||||
background-color: ${nord.polarNight.nord0}bf;
|
||||
color: ${nord.snowStorm.nord5}00
|
||||
}
|
||||
|
||||
/* search entry */
|
||||
entry {
|
||||
background-color: ${nord.polarNight.nord1}0f
|
||||
}
|
||||
|
||||
button, image {
|
||||
background: none;
|
||||
border: none
|
||||
}
|
||||
|
||||
button:hover {
|
||||
background-color: ${nord.frost.nord10}1a
|
||||
}
|
||||
|
||||
/* in case you wanted to give category buttons a different look */
|
||||
#category-button {
|
||||
margin: 0 10px 0 10px
|
||||
}
|
||||
|
||||
#pinned-box {
|
||||
padding-bottom: 5px;
|
||||
border-bottom: 1px dotted ${nord.polarNight.nord3}
|
||||
}
|
||||
|
||||
#files-box {
|
||||
padding: 5px;
|
||||
border: 1px dotted ${nord.polarNight.nord3};
|
||||
border-radius: 15px
|
||||
}
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
7
modules/home/programs/nwg-drawer/options.nix
Normal file
7
modules/home/programs/nwg-drawer/options.nix
Normal file
@@ -0,0 +1,7 @@
|
||||
{ lib, ... }:
|
||||
with lib;
|
||||
{
|
||||
options.mjallen.programs.nwg-drawer = {
|
||||
enable = mkEnableOption "enable nwg-drawer";
|
||||
};
|
||||
}
|
||||
26
modules/home/programs/nwg-panel/default.nix
Normal file
26
modules/home/programs/nwg-panel/default.nix
Normal file
@@ -0,0 +1,26 @@
|
||||
{ config, lib, ... }:
|
||||
with lib;
|
||||
let
|
||||
cfg = config.mjallen.programs.nwg-panel;
|
||||
in
|
||||
{
|
||||
imports = [ ./options.nix ];
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
home.file = {
|
||||
".config/nwg-panel/excluded-dirs".text = ''
|
||||
|
||||
'';
|
||||
".config/nwg-panel/preferred-apps.json".text = ''
|
||||
{
|
||||
"\\.pdf$": "${cfg.defaultApps.browser.pname}",
|
||||
"\\.svg$": "inkscape",
|
||||
"\\.(jpg|png|tiff|gif)$": "${cfg.defaultApps.imageViewer.pname}",
|
||||
"\\.(mp3|ogg|flac|wav|wma)$": "audacious",
|
||||
"\\.(avi|mp4|mkv|mov|wav)$": "${cfg.defaultApps.video.pname}",
|
||||
"\\.(doc|docx|xls|xlsx)$": "${cfg.defaultApps.office.pname}"
|
||||
}
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
23
modules/home/programs/nwg-panel/options.nix
Normal file
23
modules/home/programs/nwg-panel/options.nix
Normal file
@@ -0,0 +1,23 @@
|
||||
{ lib, pkgs, ... }:
|
||||
with lib;
|
||||
{
|
||||
options.mjallen.programs.nwg-panel = {
|
||||
enable = mkEnableOption "enable nwg-panel";
|
||||
|
||||
defaultApps = mkOption {
|
||||
type = types.submodule {
|
||||
options = {
|
||||
browser = mkOption { type = types.package; default = pkgs.firefox; };
|
||||
editor = mkOption { type = types.package; default = pkgs.micro; };
|
||||
fileExplorer = mkOption { type = types.package; default = pkgs.nemo; };
|
||||
visual = mkOption { type = types.package; default = pkgs.vscodium; };
|
||||
terminal = mkOption { type = types.package; default = pkgs.kitty; };
|
||||
office = mkOption { type = types.package; default = pkgs.onlyoffice-bin_latest; };
|
||||
video = mkOption { type = types.package; default = pkgs.vlc; };
|
||||
imageViewer = mkOption { type = types.package; default = pkgs.gnome-photos; };
|
||||
};
|
||||
};
|
||||
description = "Default applications used across the system.";
|
||||
};
|
||||
};
|
||||
}
|
||||
534
modules/home/programs/waybar/default.nix
Executable file
534
modules/home/programs/waybar/default.nix
Executable file
@@ -0,0 +1,534 @@
|
||||
{ config, lib, ... }:
|
||||
with lib;
|
||||
let
|
||||
cfg = config.mjallen.programs.waybar;
|
||||
nord = import ../../desktop/theme/nord.nix;
|
||||
|
||||
defaultOpacity = "opacity: 0.85;";
|
||||
defaultBorderRadius = "border-radius: 1rem;";
|
||||
defaultCenterOptions = ''
|
||||
padding-top: 0.2rem;
|
||||
padding-bottom: 0.2rem;
|
||||
padding-left: 0.5rem;
|
||||
padding-right: 0.5rem;
|
||||
margin: 3px 0;
|
||||
'';
|
||||
borderRight = ''
|
||||
padding-top: 0.2rem;
|
||||
padding-bottom: 0.2rem;
|
||||
padding-left: 0.5rem;
|
||||
padding-right: 0.5rem;
|
||||
margin: 3px 0;
|
||||
border-radius: 0rem 1rem 1rem 0rem;
|
||||
margin-right: 0.5rem;
|
||||
'';
|
||||
borderLeft = ''
|
||||
padding-top: 0.2rem;
|
||||
padding-bottom: 0.2rem;
|
||||
padding-left: 0.5rem;
|
||||
padding-right: 0.5rem;
|
||||
margin: 3px 0;
|
||||
border-radius: 1rem 0rem 0rem 1rem;
|
||||
margin-left: 0.5rem;
|
||||
'';
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
./options.nix
|
||||
./scripts/hass.nix
|
||||
./scripts/weather.nix
|
||||
];
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
# https://github.com/Alexays/Waybar/wiki/Module:-Hyprland
|
||||
# https://www.nerdfonts.com/cheat-sheet
|
||||
|
||||
programs.waybar = {
|
||||
enable = true;
|
||||
systemd.enable = true;
|
||||
settings = {
|
||||
mainBar = {
|
||||
layer = cfg.layer;
|
||||
position = "top";
|
||||
mod = "dock";
|
||||
exclusive = true;
|
||||
passthrough = false;
|
||||
gtk-layer-shell = true;
|
||||
height = 0;
|
||||
|
||||
# Module Layout
|
||||
modules-left = [ "hyprland/workspaces" ];
|
||||
|
||||
modules-center = [ "hyprland/window" ];
|
||||
|
||||
modules-right = cfg.modules-right;
|
||||
|
||||
# Module Definitions
|
||||
# Left
|
||||
"hyprland/workspaces" = {
|
||||
disable-scroll = true;
|
||||
all-outputs = true;
|
||||
on-click = "activate";
|
||||
persistent_workspaces = {
|
||||
"*" = 1;
|
||||
};
|
||||
};
|
||||
|
||||
# Center
|
||||
"hyprland/window" = {
|
||||
separate-outputs = true;
|
||||
format = { };
|
||||
};
|
||||
|
||||
# Left
|
||||
tray = {
|
||||
icon-size = 16;
|
||||
spacing = 10;
|
||||
};
|
||||
|
||||
temperature = {
|
||||
hwmon-path = "/sys/class/hwmon/hwmon4/temp1_input";
|
||||
critical-threshold = 110;
|
||||
format-critical = "{temperatureC}°C ";
|
||||
format = "{temperatureC}°C {icon}";
|
||||
format-icons = [
|
||||
"" # fa-temperature-empty
|
||||
"" # fa-temperature-quarter
|
||||
"" # fa-temperature-half
|
||||
"" # fa-temperature-three-quarters
|
||||
"" # fa-temperature-full
|
||||
];
|
||||
tooltip-format = "CPU: {temperatureC}°C";
|
||||
};
|
||||
|
||||
"temperature#gpu" = {
|
||||
hwmon-path = "/sys/class/hwmon/hwmon0/temp1_input";
|
||||
critical-threshold = 110;
|
||||
format-critical = "{temperatureC}°C ";
|
||||
format = "{temperatureC}°C {icon}";
|
||||
format-icons = [
|
||||
"" # fa-temperature-empty
|
||||
"" # fa-temperature-quarter
|
||||
"" # fa-temperature-half
|
||||
"" # fa-temperature-three-quarters
|
||||
"" # fa-temperature-full
|
||||
];
|
||||
on-click = "lact";
|
||||
tooltip-format = "GPU: {temperatureC}°C";
|
||||
};
|
||||
|
||||
"keyboard-state#capslock" = {
|
||||
capslock = true;
|
||||
format = "{icon}";
|
||||
tooltip-format = "Caps Lock {state}";
|
||||
format-icons = {
|
||||
locked = "";
|
||||
unlocked = "";
|
||||
};
|
||||
};
|
||||
|
||||
"keyboard-state#numlock" = {
|
||||
numlock = true;
|
||||
format = "{icon}";
|
||||
tooltip-format = "Num Lock {state}";
|
||||
format-icons = {
|
||||
locked = "";
|
||||
unlocked = "";
|
||||
};
|
||||
};
|
||||
|
||||
"wireplumber#sink" = {
|
||||
format = "{icon} {volume}%";
|
||||
tooltip = false;
|
||||
format-muted = "{icon} Muted";
|
||||
on-click = "wpctl set-mute @DEFAULT_SINK@ toggle";
|
||||
on-click-right = "pavucontrol -t 1";
|
||||
on-scroll-up = "wpctl set-volume @DEFAULT_SINK@ 5%+";
|
||||
on-scroll-down = "wpctl set-volume @DEFAULT_SINK@ 5%-";
|
||||
scroll-step = 5;
|
||||
format-icons = {
|
||||
headphone = "";
|
||||
headphone-muted = "";
|
||||
hands-free = "";
|
||||
headset = "";
|
||||
phone = "";
|
||||
portable = "";
|
||||
car = "";
|
||||
default = [
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
"wireplumber#source" = {
|
||||
node-type = "Audio/Source";
|
||||
format = "";
|
||||
format-muted = "";
|
||||
tooltip = false;
|
||||
# tooltip-format = "{source_desc} | {source_volume}%";
|
||||
on-click = "wpctl set-mute @DEFAULT_SOURCE@ toggle";
|
||||
on-click-right = "pavucontrol -t 2";
|
||||
on-scroll-up = "wpctl set-volume @DEFAULT_SOURCE@ 5%+";
|
||||
on-scroll-down = "wpctl set-volume @DEFAULT_SOURCE@ 5%-";
|
||||
scroll-step = 5;
|
||||
};
|
||||
|
||||
"bluetooth" = {
|
||||
on-click = "overskride";
|
||||
tooltip = true;
|
||||
format = "{icon}";
|
||||
tooltip-format = "{status}";
|
||||
tooltip-format-disabled = "{status}";
|
||||
tooltip-format-off = "{status}";
|
||||
tooltip-format-on = "{status}";
|
||||
tooltip-format-connected = "{status}";
|
||||
tooltip-format-enumerate-connected = { };
|
||||
format-icons = {
|
||||
disabled = "";
|
||||
off = "";
|
||||
on = "";
|
||||
connected = "";
|
||||
};
|
||||
};
|
||||
|
||||
network = {
|
||||
interface = cfg.networkInterface;
|
||||
on-click = "nm-connection-editor";
|
||||
format = "{icon}";
|
||||
tooltip-format = "{ifname} via {gwaddr} ";
|
||||
tooltip-format-wifi = ''
|
||||
{essid} ({signalStrength}%) {icon}
|
||||
{bandwidthDownBits} {bandwidthUpBits}
|
||||
'';
|
||||
tooltip-format-ethernet = "{ifname} ";
|
||||
tooltip-format-disconnected = "Disconnected";
|
||||
max-length = 50;
|
||||
format-icons = {
|
||||
wifi = [
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
];
|
||||
ethernet = "";
|
||||
linked = "";
|
||||
disconnected = "";
|
||||
};
|
||||
};
|
||||
|
||||
idle_inhibitor = {
|
||||
format = "{icon}";
|
||||
format-icons = {
|
||||
activated = "";
|
||||
deactivated = "";
|
||||
};
|
||||
};
|
||||
|
||||
clock = {
|
||||
format = "{:%I:%M %p}";
|
||||
tooltip-format = "<tt><small>{calendar}</small></tt>";
|
||||
calendar = {
|
||||
mode = "month";
|
||||
format = {
|
||||
months = "<span color='${nord.frost.nord9}'><b>{}</b></span>";
|
||||
days = "<span color='${nord.frost.nord10}'><b>{}</b></span>";
|
||||
weekdays = "<span color='${nord.frost.nord8}'><b>{}</b></span>";
|
||||
today = "<span color='${nord.aurora.nord14}'><b><u>{}</u></b></span>";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
battery = {
|
||||
# bat = "macsmc-battery";
|
||||
interval = 60;
|
||||
# statuses: 'Charging', 'Discharging'
|
||||
states = {
|
||||
warning = 30;
|
||||
critical = 15;
|
||||
};
|
||||
format = "{capacity}% {icon}";
|
||||
format-icons = {
|
||||
default = [
|
||||
"" # critical
|
||||
"" # 10%
|
||||
"" # 20%
|
||||
"" # 30%
|
||||
"" # 40%
|
||||
"" # 50%
|
||||
"" # 60%
|
||||
"" # 70%
|
||||
"" # 80%
|
||||
"" # 90%
|
||||
"" # 100%
|
||||
];
|
||||
charging = [
|
||||
"" # critical
|
||||
"" # 10%
|
||||
"" # 20%
|
||||
"" # 30%
|
||||
"" # 40%
|
||||
"" # 50%
|
||||
"" # 60%
|
||||
"" # 70%
|
||||
"" # 80%
|
||||
"" # 90%
|
||||
"" # 100%
|
||||
];
|
||||
};
|
||||
max-length = 25;
|
||||
};
|
||||
|
||||
"custom/weather" = {
|
||||
tooltip = true;
|
||||
format = { };
|
||||
interval = 30;
|
||||
exec = "waybar-weather";
|
||||
return-type = "json";
|
||||
markup = "pango";
|
||||
};
|
||||
} // cfg.extraModules;
|
||||
};
|
||||
|
||||
# * { font-size: 13px; }
|
||||
# window.eDP-1 * { font-size: 10px; }
|
||||
|
||||
style = ''
|
||||
.blink_me {
|
||||
animation: blinker 1s linear infinite;
|
||||
}
|
||||
|
||||
@keyframes blinker {
|
||||
50% {
|
||||
color: ${nord.aurora.nord11};
|
||||
}
|
||||
}
|
||||
|
||||
* {
|
||||
font-family:
|
||||
Jetbrains Mono Nerd Font,
|
||||
monospace;
|
||||
font-size: 14px;
|
||||
min-height: 0;
|
||||
}
|
||||
|
||||
#waybar {
|
||||
background: transparent;
|
||||
color: ${nord.snowStorm.nord6};
|
||||
margin: 5px 5px;
|
||||
}
|
||||
|
||||
#workspaces {
|
||||
background-color: ${nord.polarNight.nord0};
|
||||
${defaultBorderRadius}
|
||||
${defaultOpacity}
|
||||
${defaultCenterOptions}
|
||||
margin-left: 0.6rem;
|
||||
}
|
||||
|
||||
#workspaces button {
|
||||
color: ${nord.frost.nord10};
|
||||
${defaultBorderRadius}
|
||||
padding: 0.4rem;
|
||||
}
|
||||
|
||||
#workspaces button.active {
|
||||
color: ${nord.frost.nord8};
|
||||
${defaultBorderRadius}
|
||||
}
|
||||
|
||||
#workspaces button:hover {
|
||||
color: ${nord.frost.nord7};
|
||||
${defaultBorderRadius}
|
||||
}
|
||||
|
||||
#workspaces button.focused {
|
||||
color: ${nord.snowStorm.nord6};
|
||||
background: ${nord.aurora.nord13};
|
||||
${defaultBorderRadius}
|
||||
}
|
||||
|
||||
#workspaces button.urgent {
|
||||
color: ${nord.polarNight.nord0};
|
||||
background: ${nord.snowStorm.nord6};
|
||||
${defaultBorderRadius}
|
||||
}
|
||||
|
||||
#tooltip {
|
||||
background: ${nord.polarNight.nord0};
|
||||
border-color: ${nord.polarNight.nord0};
|
||||
${defaultBorderRadius}
|
||||
border-width: 1rem;
|
||||
border-style: solid;
|
||||
}
|
||||
|
||||
#window {
|
||||
color: ${nord.aurora.nord15};
|
||||
background-color: ${nord.polarNight.nord0};
|
||||
${defaultOpacity}
|
||||
${defaultBorderRadius}
|
||||
${defaultCenterOptions}
|
||||
margin-left: 4rem
|
||||
margin-right: 4rem
|
||||
}
|
||||
|
||||
/* make window module transparent when no windows present */
|
||||
#window.empty {
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
#custom-weather {
|
||||
color: ${nord.frost.nord10};
|
||||
background-color: ${nord.polarNight.nord0};
|
||||
${defaultOpacity}
|
||||
${borderRight}
|
||||
}
|
||||
|
||||
#battery {
|
||||
color: ${nord.aurora.nord15};
|
||||
background-color: ${nord.polarNight.nord0};
|
||||
${defaultOpacity}
|
||||
${defaultCenterOptions}
|
||||
border-radius: 0;
|
||||
min-width: 3rem;
|
||||
}
|
||||
|
||||
#clock {
|
||||
color: ${nord.frost.nord9};
|
||||
background-color: ${nord.polarNight.nord0};
|
||||
${defaultOpacity}
|
||||
${borderLeft}
|
||||
}
|
||||
|
||||
/* ------------- */
|
||||
|
||||
#idle_inhibitor {
|
||||
color: ${nord.frost.nord10};
|
||||
background-color: ${nord.polarNight.nord0};
|
||||
${defaultOpacity}
|
||||
${borderRight}
|
||||
padding-right: 1rem;
|
||||
}
|
||||
|
||||
#idle_inhibitor:hover {
|
||||
background: ${nord.polarNight.nord3};
|
||||
}
|
||||
|
||||
#network {
|
||||
color: ${nord.aurora.nord15};
|
||||
background-color: ${nord.polarNight.nord0};
|
||||
${defaultOpacity}
|
||||
${defaultCenterOptions}
|
||||
border-radius: 0;
|
||||
padding-right: 15px;
|
||||
}
|
||||
|
||||
#network:hover {
|
||||
background: ${nord.polarNight.nord3};
|
||||
}
|
||||
|
||||
#bluetooth {
|
||||
color: ${nord.frost.nord9};
|
||||
background-color: ${nord.polarNight.nord0};
|
||||
${defaultOpacity}
|
||||
${defaultCenterOptions}
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
#bluetooth:hover {
|
||||
background: ${nord.polarNight.nord3};
|
||||
}
|
||||
|
||||
#wireplumber.source {
|
||||
color: ${nord.frost.nord8};
|
||||
background-color: ${nord.polarNight.nord0};
|
||||
${defaultOpacity}
|
||||
${defaultCenterOptions}
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
#wireplumber.source.muted {
|
||||
animation-name: blinker;
|
||||
animation-duration: 2s;
|
||||
animation-timing-function: linear;
|
||||
animation-iteration-count: infinite;
|
||||
padding-right: 1rem;
|
||||
}
|
||||
|
||||
#wireplumber.source:hover {
|
||||
background: ${nord.polarNight.nord3};
|
||||
}
|
||||
|
||||
#wireplumber.sink {
|
||||
color: ${nord.frost.nord7};
|
||||
background-color: ${nord.polarNight.nord0};
|
||||
${defaultOpacity}
|
||||
${defaultCenterOptions}
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
#wireplumber.sink.muted {
|
||||
animation-name: blinker;
|
||||
animation-duration: 5s;
|
||||
animation-timing-function: linear;
|
||||
animation-iteration-count: infinite;
|
||||
}
|
||||
|
||||
#wireplumber.sink:hover {
|
||||
background: ${nord.polarNight.nord3};
|
||||
}
|
||||
|
||||
#keyboard-state.numlock {
|
||||
color: ${nord.frost.nord8};
|
||||
background-color: ${nord.polarNight.nord0};
|
||||
${defaultOpacity}
|
||||
${defaultCenterOptions}
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
#keyboard-state.capslock {
|
||||
color: ${nord.frost.nord9};
|
||||
background-color: ${nord.polarNight.nord0};
|
||||
${defaultOpacity}
|
||||
${defaultCenterOptions}
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
#temperature.gpu {
|
||||
color: ${nord.frost.nord10};
|
||||
background-color: ${nord.polarNight.nord0};
|
||||
${defaultOpacity}
|
||||
${defaultCenterOptions}
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
#temperature.gpu:hover {
|
||||
background: ${nord.polarNight.nord3};
|
||||
}
|
||||
|
||||
#temperature {
|
||||
color: ${nord.frost.nord9};
|
||||
background-color: ${nord.polarNight.nord0};
|
||||
${defaultOpacity}
|
||||
${defaultCenterOptions}
|
||||
border-radius: 0
|
||||
}
|
||||
|
||||
/* ------------- */
|
||||
|
||||
#tray {
|
||||
background-color: ${nord.polarNight.nord0};
|
||||
${defaultOpacity}
|
||||
${defaultCenterOptions}
|
||||
${defaultBorderRadius}
|
||||
margin-right: 0.6rem;
|
||||
}
|
||||
|
||||
/* ------------- */
|
||||
'' + cfg.extraModulesStyle or '''';
|
||||
};
|
||||
};
|
||||
}
|
||||
32
modules/home/programs/waybar/options.nix
Normal file
32
modules/home/programs/waybar/options.nix
Normal file
@@ -0,0 +1,32 @@
|
||||
{ lib, ... }:
|
||||
with lib;
|
||||
{
|
||||
options.mjallen.programs.waybar = {
|
||||
enable = mkEnableOption "enable waybar";
|
||||
|
||||
layer = mkOption {
|
||||
type = types.str;
|
||||
default = "top";
|
||||
};
|
||||
|
||||
modules-right = mkOption {
|
||||
type = with types; listOf str;
|
||||
default = [];
|
||||
};
|
||||
|
||||
networkInterface = mkOption {
|
||||
type = types.str;
|
||||
default = "wlan0";
|
||||
};
|
||||
|
||||
extraModules = mkOption {
|
||||
type = types.attrs;
|
||||
default = { };
|
||||
};
|
||||
|
||||
extraModulesStyle = mkOption {
|
||||
type = types.str;
|
||||
default = "";
|
||||
};
|
||||
};
|
||||
}
|
||||
76
modules/home/programs/waybar/scripts/hass.nix
Executable file
76
modules/home/programs/waybar/scripts/hass.nix
Executable file
@@ -0,0 +1,76 @@
|
||||
{ config, lib, namespace, pkgs, ... }:
|
||||
let
|
||||
cfg = config.mjallen.programs.waybar;
|
||||
|
||||
pythonEnv = pkgs.python3.withPackages (ps: [
|
||||
pkgs.${namespace}.homeassistant-api
|
||||
]);
|
||||
|
||||
waybar-hass = pkgs.writeScriptBin "waybar-hass" ''
|
||||
#!${pythonEnv}/bin/python
|
||||
"""run with the special python"""
|
||||
|
||||
import argparse
|
||||
import time
|
||||
import json
|
||||
from homeassistant_api import WebsocketClient
|
||||
|
||||
HASS_URL = 'ws://homeassistant.local:8123/api/websocket'
|
||||
|
||||
parser = argparse.ArgumentParser(prog='hass python wrapper')
|
||||
parser.add_argument('--toggle_light')
|
||||
parser.add_argument('--get_light')
|
||||
args = parser.parse_args()
|
||||
|
||||
def load_key():
|
||||
"""Read the api key"""
|
||||
token_path = "/run/secrets/desktop/hass_token"
|
||||
with open(token_path, "r") as key_file:
|
||||
key = key_file.readline()
|
||||
return key
|
||||
|
||||
def get_light_state(client, light):
|
||||
"""Get light status"""
|
||||
light_entity = client.get_entity(entity_id=light)
|
||||
state = light_entity.get_state()
|
||||
if state.state == 'on':
|
||||
return ""
|
||||
return ""
|
||||
|
||||
def toggle_light(client, light):
|
||||
"""Toggle light status"""
|
||||
lights = client.get_domain("light")
|
||||
lights.toggle(entity_id=light)
|
||||
time.sleep(0.5)
|
||||
light_entity = client.get_entity(entity_id=light)
|
||||
state = light_entity.get_state()
|
||||
if state.state == 'on':
|
||||
return ""
|
||||
return ""
|
||||
|
||||
def main():
|
||||
"""Main"""
|
||||
token = load_key()
|
||||
status = "err"
|
||||
|
||||
with WebsocketClient(HASS_URL, token) as client:
|
||||
# toggle a light
|
||||
if args.toggle_light is not None:
|
||||
status = toggle_light(client=client, light=args.toggle_light)
|
||||
# get the current light status
|
||||
if args.get_light is not None:
|
||||
status = get_light_state(client=client, light=args.get_light)
|
||||
|
||||
print(json.dumps({ "text": status }))
|
||||
|
||||
main()
|
||||
|
||||
'';
|
||||
in
|
||||
{
|
||||
imports = [ ../options.nix ];
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
home.packages = [ waybar-hass ];
|
||||
};
|
||||
}
|
||||
439
modules/home/programs/waybar/scripts/weather.nix
Normal file
439
modules/home/programs/waybar/scripts/weather.nix
Normal file
@@ -0,0 +1,439 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
let
|
||||
cfg = config.mjallen.programs.waybar;
|
||||
|
||||
waybar-weather = pkgs.writeScriptBin "waybar-weather" ''
|
||||
#!/usr/bin/env nix-shell
|
||||
#! nix-shell -i python3 --pure
|
||||
#! nix-shell -p python3 python3Packages.requests
|
||||
|
||||
"""get waybar weather"""
|
||||
import os
|
||||
import json
|
||||
import shutil
|
||||
from datetime import datetime, timedelta
|
||||
|
||||
import requests
|
||||
|
||||
WWO_CODE = {
|
||||
"113": "Sunny",
|
||||
"116": "PartlyCloudy",
|
||||
"119": "Cloudy",
|
||||
"122": "VeryCloudy",
|
||||
"143": "Fog",
|
||||
"176": "LightShowers",
|
||||
"179": "LightSleetShowers",
|
||||
"182": "LightSleet",
|
||||
"185": "LightSleet",
|
||||
"200": "ThunderyShowers",
|
||||
"227": "LightSnow",
|
||||
"230": "HeavySnow",
|
||||
"248": "Fog",
|
||||
"260": "Fog",
|
||||
"263": "LightShowers",
|
||||
"266": "LightRain",
|
||||
"281": "LightSleet",
|
||||
"284": "LightSleet",
|
||||
"293": "LightRain",
|
||||
"296": "LightRain",
|
||||
"299": "HeavyShowers",
|
||||
"302": "HeavyRain",
|
||||
"305": "HeavyShowers",
|
||||
"308": "HeavyRain",
|
||||
"311": "LightSleet",
|
||||
"314": "LightSleet",
|
||||
"317": "LightSleet",
|
||||
"320": "LightSnow",
|
||||
"323": "LightSnowShowers",
|
||||
"326": "LightSnowShowers",
|
||||
"329": "HeavySnow",
|
||||
"332": "HeavySnow",
|
||||
"335": "HeavySnowShowers",
|
||||
"338": "HeavySnow",
|
||||
"350": "LightSleet",
|
||||
"353": "LightShowers",
|
||||
"356": "HeavyShowers",
|
||||
"359": "HeavyRain",
|
||||
"362": "LightSleetShowers",
|
||||
"365": "LightSleetShowers",
|
||||
"368": "LightSnowShowers",
|
||||
"371": "HeavySnowShowers",
|
||||
"374": "LightSleetShowers",
|
||||
"377": "LightSleet",
|
||||
"386": "ThunderyShowers",
|
||||
"389": "ThunderyHeavyRain",
|
||||
"392": "ThunderySnowShowers",
|
||||
"395": "HeavySnowShowers",
|
||||
}
|
||||
|
||||
WEATHER_SYMBOL = {
|
||||
"Unknown": "",
|
||||
"Cloudy": "",
|
||||
"Fog": "",
|
||||
"HeavyRain": "",
|
||||
"HeavyShowers": "",
|
||||
"HeavySnow": "",
|
||||
"HeavySnowShowers": "",
|
||||
"LightRain": "",
|
||||
"LightShowers": "",
|
||||
"LightSleet": "",
|
||||
"LightSleetShowers": "",
|
||||
"LightSnow": "",
|
||||
"LightSnowShowers": "",
|
||||
"PartlyCloudy": "",
|
||||
"Sunny": "",
|
||||
"ThunderyHeavyRain": "",
|
||||
"ThunderyShowers": "",
|
||||
"ThunderySnowShowers": "",
|
||||
"VeryCloudy": "",
|
||||
}
|
||||
|
||||
WEATHER_CODES = {key: WEATHER_SYMBOL[value] for key, value in WWO_CODE.items()}
|
||||
|
||||
WIND_DIRECTION = {
|
||||
"S": "↓",
|
||||
"SW": "↙",
|
||||
"W": "←",
|
||||
"NW": "↖",
|
||||
"N": "↑",
|
||||
"NE": "↗",
|
||||
"E": "→",
|
||||
"SE": "↘",
|
||||
}
|
||||
|
||||
MOON_PHASES = (
|
||||
"", "", "", "", "", "", "", ""
|
||||
)
|
||||
|
||||
WEATHER_SYMBOL_WI_DAY = {
|
||||
"Unknown": "",
|
||||
"Cloudy": "",
|
||||
"Fog": "",
|
||||
"HeavyRain": "",
|
||||
"HeavyShowers": "",
|
||||
"HeavySnow": "",
|
||||
"HeavySnowShowers": "",
|
||||
"LightRain": "",
|
||||
"LightShowers": "",
|
||||
"LightSleet": "",
|
||||
"LightSleetShowers": "",
|
||||
"LightSnow": "",
|
||||
"LightSnowShowers": "",
|
||||
"PartlyCloudy": "",
|
||||
"Sunny": "",
|
||||
"ThunderyHeavyRain": "",
|
||||
"ThunderyShowers": "",
|
||||
"ThunderySnowShowers": "",
|
||||
"VeryCloudy": "",
|
||||
}
|
||||
|
||||
WEATHER_CODES_WI_DAY = {key: WEATHER_SYMBOL_WI_DAY[value] for key, value in WWO_CODE.items()}
|
||||
|
||||
WEATHER_SYMBOL_WI_NIGHT = {
|
||||
"Unknown": "",
|
||||
"Cloudy": "",
|
||||
"Fog": "",
|
||||
"HeavyRain": "",
|
||||
"HeavyShowers": "",
|
||||
"HeavySnow": "",
|
||||
"HeavySnowShowers": "",
|
||||
"LightRain": "",
|
||||
"LightShowers": "",
|
||||
"LightSleet": "",
|
||||
"LightSleetShowers": "",
|
||||
"LightSnow": "",
|
||||
"LightSnowShowers": "",
|
||||
"PartlyCloudy": "",
|
||||
"Sunny": "",
|
||||
"ThunderyHeavyRain": "",
|
||||
"ThunderyShowers": "",
|
||||
"ThunderySnowShowers": "",
|
||||
"VeryCloudy": "",
|
||||
}
|
||||
|
||||
WEATHER_CODES_WI_NIGHT = {key: WEATHER_SYMBOL_WI_NIGHT[value] for key, value in WWO_CODE.items()}
|
||||
|
||||
WEATHER_SYMBOL_WEGO = {
|
||||
"Unknown": [
|
||||
" .-. ",
|
||||
" __) ",
|
||||
" ( ",
|
||||
" `-’ ",
|
||||
" • "],
|
||||
"Sunny": [
|
||||
'<span foreground=\"#FFFF00\"> \\ / </span>',
|
||||
'<span foreground=\"#FFFF00\"> .-. </span>',
|
||||
'<span foreground=\"#FFFF00\"> ― ( ) ― </span>',
|
||||
'<span foreground=\"#FFFF00\"> `-’ </span>',
|
||||
'<span foreground=\"#FFFF00\"> / \\ </span>'],
|
||||
"PartlyCloudy": [
|
||||
'<span foreground=\"#FFFF00\"> \\ / </span>',
|
||||
'<span foreground=\"#FFFF00\"> _ /\'\'</span>"<span foreground=\"#BBBBBB\">.-. </span>',
|
||||
'<span foreground=\"#FFFF00\"> \\_</span>"<span foreground=\"#BBBBBB\">( ). </span>',
|
||||
'<span foreground=\"#FFFF00\"> /</span>"<span foreground=\"#BBBBBB\">(___(__) </span>',
|
||||
' '
|
||||
],
|
||||
"Cloudy": [
|
||||
' ',
|
||||
'<span foreground=\"#BBBBBB\"> .--. </span>',
|
||||
'<span foreground=\"#BBBBBB\"> .-( ). </span>',
|
||||
'<span foreground=\"#BBBBBB\"> (___.__)__) </span>',
|
||||
' '],
|
||||
"VeryCloudy": [
|
||||
' ',
|
||||
'<span foreground=\"#585858\"; font-weight: bold;"> .--. </span>',
|
||||
'<span foreground=\"#585858\"; font-weight: bold;"> .-( ). </span>',
|
||||
'<span foreground=\"#585858\"; font-weight: bold;"> (___.__)__) </span>',
|
||||
' '],
|
||||
"LightShowers": [
|
||||
'<span foreground=\"#FFFF00\"> _`/\'\'</span>"<span foreground=\"#BBBBBB\">.-. </span>',
|
||||
'<span foreground=\"#FFFF00\"> ,\\_</span>"<span foreground=\"#BBBBBB\">( ). </span>',
|
||||
'<span foreground=\"#FFFF00\"> /</span>"<span foreground=\"#BBBBBB\">(___(__) </span>',
|
||||
'<span foreground=\"#87afff\";"> ‘ ‘ ‘ ‘ </span>',
|
||||
'<span foreground=\"#87afff\";"> ‘ ‘ ‘ ‘ </span>'],
|
||||
"HeavyShowers": [
|
||||
'<span foreground=\"#FFFF00\"> _`/\'\'</span>"<span foreground=\"#585858\"; font-weight: bold;">.-. </span>',
|
||||
'<span foreground=\"#FFFF00\"> ,\\_</span>"<span foreground=\"#585858\"; font-weight: bold;">( ). </span>',
|
||||
'<span foreground=\"#FFFF00\"> /</span>"<span foreground=\"#585858\"; font-weight: bold;">(___(__) </span>',
|
||||
'<span foreground=\"#0000ff\"; font-weight: bold;"> ‚‘‚‘‚‘‚‘ </span>',
|
||||
'<span foreground=\"#0000ff\"; font-weight: bold;"> ‚’‚’‚’‚’ </span>'],
|
||||
"LightSnowShowers": [
|
||||
'<span foreground=\"#FFFF00\"> _`/\'\'</span>"<span foreground=\"#BBBBBB\">.-. </span>',
|
||||
'<span foreground=\"#FFFF00\"> ,\\_</span>"<span foreground=\"#BBBBBB\">( ). </span>',
|
||||
'<span foreground=\"#FFFF00\"> /</span>"<span foreground=\"#BBBBBB\">(___(__) </span>',
|
||||
'<span foreground=\"#eeeeee\";"> * * * </span>',
|
||||
'<span foreground=\"#eeeeee\";"> * * * </span>'],
|
||||
"HeavySnowShowers": [
|
||||
'<span foreground=\"#FFFF00\"> _`/\'\'</span>"<span foreground=\"#585858\"; font-weight: bold;">.-. </span>',
|
||||
'<span foreground=\"#FFFF00\"> ,\\_</span>"<span foreground=\"#585858\"; font-weight: bold;">( ). </span>',
|
||||
'<span foreground=\"#FFFF00\"> /</span>"<span foreground=\"#585858\"; font-weight: bold;">(___(__) </span>',
|
||||
'<span foreground=\"#eeeeee\"; font-weight: bold;"> * * * * </span>',
|
||||
'<span foreground=\"#eeeeee\"; font-weight: bold;"> * * * * </span>'],
|
||||
"LightSleetShowers": [
|
||||
'<span foreground=\"#FFFF00\"> _`/\'\'</span>"<span foreground=\"#BBBBBB\">.-. </span>',
|
||||
'<span foreground=\"#FFFF00\"> ,\\_</span>"<span foreground=\"#BBBBBB\">( ). </span>',
|
||||
'<span foreground=\"#FFFF00\"> /</span>"<span foreground=\"#BBBBBB\">(___(__) </span>',
|
||||
'<span foreground=\"#87afff\";"> ‘ </span>"<span foreground=\"#eeeeee\";">*</span>"<span foreground=\"#87afff\";"> ‘ </span>"<span foreground=\"#eeeeee\";">* </span>',
|
||||
'<span foreground=\"#eeeeee\";"> *</span>"<span foreground=\"#87afff\";"> ‘ </span>"<span foreground=\"#eeeeee\";">*</span>"<span foreground=\"#87afff\";"> ‘ </span>'],
|
||||
"ThunderyShowers": [
|
||||
'<span foreground=\"#FFFF00\"> _`/\'\'</span>"<span foreground=\"#BBBBBB\">.-. </span>',
|
||||
'<span foreground=\"#FFFF00\"> ,\\_</span>"<span foreground=\"#BBBBBB\">( ). </span>',
|
||||
'<span foreground=\"#FFFF00\"> /</span>"<span foreground=\"#BBBBBB\">(___(__) </span>',
|
||||
'<span foreground=\"#ffff87\";"> ⚡\\</span>"<span foreground=\"#87afff\";">‘ ‘</span>"<span foreground=\"#ffff87\";">⚡\\</span>"<span foreground=\"#87afff\";">‘ ‘ </span>',
|
||||
'<span foreground=\"#87afff\";"> ‘ ‘ ‘ ‘ </span>'],
|
||||
"ThunderyHeavyRain": [
|
||||
'<span foreground=\"#585858\"; font-weight: bold;"> .-. </span>',
|
||||
'<span foreground=\"#585858\"; font-weight: bold;"> ( ). </span>',
|
||||
'<span foreground=\"#585858\"; font-weight: bold;"> (___(__) </span>',
|
||||
'<span foreground=\"#0000ff\"; font-weight: bold;"> ‚‘</span>"<span foreground=\"#ffff87\";">⚡\\</span>"<span foreground=\"#0000ff\";">‘‚</span>"<span foreground=\"#ffff87\";">⚡\\</span>"<span foreground=\"#0000ff\";">‚‘ </span>',
|
||||
'<span foreground=\"#0000ff\"; font-weight: bold;"> ‚’‚’</span>"<span foreground=\"#ffff87\";">⚡\\</span>"<span foreground=\"#0000ff\";">’‚’ </span>'],
|
||||
"ThunderySnowShowers": [
|
||||
'<span foreground=\"#FFFF00\"> _`/\'\'</span>"<span foreground=\"#BBBBBB\">.-. </span>',
|
||||
'<span foreground=\"#FFFF00\"> ,\\_</span>"<span foreground=\"#BBBBBB\">( ). </span>',
|
||||
'<span foreground=\"#FFFF00\"> /</span>"<span foreground=\"#BBBBBB\">(___(__) </span>',
|
||||
'<span foreground=\"#eeeeee\";"> *</span>"<span foreground=\"#ffff87\";">⚡\\</span>"<span foreground=\"#eeeeee\";">*</span>"<span foreground=\"#ffff87\";">⚡\\</span>"<span foreground=\"#eeeeee\";">* </span>',
|
||||
'<span foreground=\"#eeeeee\";"> * * * </span>'],
|
||||
"LightRain": [
|
||||
'<span foreground=\"#BBBBBB\"> .-. </span>',
|
||||
'<span foreground=\"#BBBBBB\"> ( ). </span>',
|
||||
'<span foreground=\"#BBBBBB\"> (___(__) </span>',
|
||||
'<span foreground=\"#87afff\";"> ‘ ‘ ‘ ‘ </span>',
|
||||
'<span foreground=\"#87afff\";"> ‘ ‘ ‘ ‘ </span>'],
|
||||
"HeavyRain": [
|
||||
'<span foreground=\"#585858\"; font-weight: bold;"> .-. </span>',
|
||||
'<span foreground=\"#585858\"; font-weight: bold;"> ( ). </span>',
|
||||
'<span foreground=\"#585858\"; font-weight: bold;"> (___(__) </span>',
|
||||
'<span foreground=\"#0000ff\"; font-weight: bold;"> ‚‘‚‘‚‘‚‘ </span>',
|
||||
'<span foreground=\"#0000ff\"; font-weight: bold;"> ‚’‚’‚’‚’ </span>'],
|
||||
"LightSnow": [
|
||||
'<span foreground=\"#BBBBBB\"> .-. </span>',
|
||||
'<span foreground=\"#BBBBBB\"> ( ). </span>',
|
||||
'<span foreground=\"#BBBBBB\"> (___(__) </span>',
|
||||
'<span foreground=\"#eeeeee\";"> * * * </span>',
|
||||
'<span foreground=\"#eeeeee\";"> * * * </span>'],
|
||||
"HeavySnow": [
|
||||
'<span foreground=\"#585858\"; font-weight: bold;"> .-. </span>',
|
||||
'<span foreground=\"#585858\"; font-weight: bold;"> ( ). </span>',
|
||||
'<span foreground=\"#585858\"; font-weight: bold;"> (___(__) </span>',
|
||||
'<span foreground=\"#eeeeee\"; font-weight: bold;"> * * * * </span>',
|
||||
'<span foreground=\"#eeeeee\"; font-weight: bold;"> * * * * </span>'],
|
||||
"LightSleet": [
|
||||
'<span foreground=\"#BBBBBB\"> .-. </span>',
|
||||
'<span foreground=\"#BBBBBB\"> ( ). </span>',
|
||||
'<span foreground=\"#BBBBBB\"> (___(__) </span>',
|
||||
'<span foreground=\"#87afff\";"> ‘ </span>"<span foreground=\"#eeeeee\";">*</span>"<span foreground=\"#87afff\";"> ‘ </span>"<span foreground=\"#eeeeee\";">* </span>',
|
||||
'<span foreground=\"#eeeeee\";"> *</span>"<span foreground=\"#87afff\";"> ‘ </span>"<span foreground=\"#eeeeee\";">*</span>"<span foreground=\"#87afff\";"> ‘ </span>'],
|
||||
"Fog": [
|
||||
' ',
|
||||
'<span foreground=\"#c0c0c0\";"> _ - _ - _ - </span>',
|
||||
'<span foreground=\"#c0c0c0\";"> _ - _ - _ </span>',
|
||||
'<span foreground=\"#c0c0c0\";"> _ - _ - _ - </span>',
|
||||
' '],
|
||||
}
|
||||
|
||||
WEATHER_CODES_WEGO = {key: WEATHER_SYMBOL_WEGO[value] for key, value in WWO_CODE.items()}
|
||||
|
||||
data = {}
|
||||
|
||||
|
||||
def format_time(time):
|
||||
"""get the time formatted"""
|
||||
return datetime.strptime(format_24_time(time), "%H").strftime("%I %p")
|
||||
|
||||
def format_24_time(time):
|
||||
"""get the time formatted"""
|
||||
return time.replace("00", "").zfill(2)
|
||||
|
||||
|
||||
def format_temp(temp):
|
||||
"""get the temp formatted"""
|
||||
return (temp + "°").ljust(3)
|
||||
|
||||
|
||||
def format_chances(hour):
|
||||
"""get the chances formatted"""
|
||||
chances = {
|
||||
"chanceoffog": "Fog",
|
||||
"chanceoffrost": "Frost",
|
||||
"chanceofovercast": "Overcast",
|
||||
"chanceofrain": "Rain",
|
||||
"chanceofsnow": "Snow",
|
||||
"chanceofsunshine": "Sunshine",
|
||||
"chanceofthunder": "Thunder",
|
||||
"chanceofwindy": "Wind",
|
||||
}
|
||||
|
||||
conditions = []
|
||||
for chance, event in chances.items():
|
||||
if int(hour[chance]) > 0:
|
||||
conditions.append(event + " " + hour[chance] + "%")
|
||||
return ", ".join(conditions)
|
||||
|
||||
def build_text(current_condition):
|
||||
"""build the text string"""
|
||||
feels_like_f = current_condition["FeelsLikeF"]
|
||||
weather_code = current_condition["weatherCode"]
|
||||
|
||||
tempint = int(feels_like_f)
|
||||
extrachar = ""
|
||||
if 0 < tempint < 10:
|
||||
extrachar = "+"
|
||||
|
||||
current_weather = f"{WEATHER_CODES[weather_code]} {extrachar} {feels_like_f}°F"
|
||||
|
||||
return current_weather
|
||||
|
||||
def build_tooltip(current_condition, astronomy, moon_icon):
|
||||
"""build the tooltip text"""
|
||||
weather_description = current_condition['weatherDesc'][0]['value']
|
||||
feels_like_f = current_condition["FeelsLikeF"]
|
||||
temp_f = current_condition['temp_F']
|
||||
humidity = current_condition['humidity']
|
||||
wind_speed = current_condition['windspeedMiles']
|
||||
wind_dir = current_condition['winddir16Point']
|
||||
moon_phase = astronomy['moon_phase']
|
||||
wego = WEATHER_CODES_WEGO[current_condition['weatherCode']]
|
||||
|
||||
tooltip = f"{wego[0]}{weather_description} {temp_f}°\n"
|
||||
tooltip += f"{wego[1]}Feels like: {feels_like_f}°\n"
|
||||
tooltip += f"{wego[2]}Wind: {wind_speed}mph {WIND_DIRECTION[wind_dir]}\n"
|
||||
tooltip += f"{wego[3]}Humidity: {humidity}%\n"
|
||||
tooltip += f"{wego[4]}Moon phase: {moon_phase} " + moon_icon + "\n"
|
||||
|
||||
return tooltip
|
||||
|
||||
def build_forecast(weather):
|
||||
"""build a 3 day forecast"""
|
||||
tooltip = "\n"
|
||||
|
||||
for i, day in enumerate(weather):
|
||||
# determine day
|
||||
if i == 0:
|
||||
tooltip += "Today, "
|
||||
if i == 1:
|
||||
tooltip += "Tomorrow, "
|
||||
# format the date
|
||||
date = datetime.strptime(day['date'], "%Y-%m-%d").strftime("%a %b %d %Y")
|
||||
tooltip += f"<b>{date}</b>\n"
|
||||
# set the high and low
|
||||
max_temp = day['maxtempF']
|
||||
min_temp = day['mintempF']
|
||||
tooltip += f" {max_temp}°F {min_temp}°F"
|
||||
|
||||
sunrise = day['astronomy'][0]['sunrise']
|
||||
sunset = day['astronomy'][0]['sunset']
|
||||
tooltip += f" {sunrise} {sunset}\n"
|
||||
|
||||
tooltip += build_hourly_forecast(i, day['hourly'], sunrise, sunset)
|
||||
return tooltip
|
||||
|
||||
|
||||
def build_hourly_forecast(day_num, hourly, sunrise, sunset):
|
||||
"""build an hourly forecast"""
|
||||
sunrise_hour = datetime.strptime(sunrise, "%I:%M %p").hour
|
||||
sunset_hour = datetime.strptime(sunset, "%I:%M %p").hour
|
||||
current_hour = datetime.now().hour
|
||||
tooltip = ""
|
||||
|
||||
for hour in hourly:
|
||||
time_24_hr = int(format_24_time(hour["time"]))
|
||||
|
||||
if day_num == 0:
|
||||
if time_24_hr < current_hour - 2:
|
||||
continue
|
||||
|
||||
# determine which code to use
|
||||
if is_night_hour(time_24_hr, sunrise_hour, sunset_hour):
|
||||
codes = WEATHER_CODES_WI_NIGHT
|
||||
else:
|
||||
codes = WEATHER_CODES_WI_DAY
|
||||
|
||||
current_time = format_time(hour['time'])
|
||||
current_weather_code = codes[hour['weatherCode']]
|
||||
feels_like = format_temp(hour['FeelsLikeF'])
|
||||
weather_desc = hour['weatherDesc'][0]['value']
|
||||
current_chances = format_chances(hour)
|
||||
|
||||
tooltip += f"{current_time} {current_weather_code} "
|
||||
tooltip += f"{feels_like} {weather_desc}, {current_chances}\n"
|
||||
|
||||
return tooltip
|
||||
|
||||
def is_night_hour(time_24_hr, sunrise_hour, sunset_hour):
|
||||
"""returns true if the hour is night"""
|
||||
before_sunrise = time_24_hr < sunrise_hour
|
||||
after_sunset = time_24_hr > sunset_hour
|
||||
return after_sunset or before_sunrise
|
||||
|
||||
def get_wttr_json():
|
||||
"""get the weather json"""
|
||||
weather = requests.get("https://wttr.in/?u&format=j1", timeout=30).json()
|
||||
moon = requests.get("https://wttr.in/?format=%m", timeout=30)
|
||||
moon_icon = moon.text
|
||||
|
||||
current_condition = weather["current_condition"][0]
|
||||
astronomy = weather["weather"][0]['astronomy'][0]
|
||||
|
||||
data["text"] = build_text(current_condition)
|
||||
data["tooltip"] = build_tooltip(current_condition, astronomy, moon_icon)
|
||||
data["tooltip"] += build_forecast(weather["weather"])
|
||||
|
||||
return json.dumps(data)
|
||||
|
||||
def main():
|
||||
"""main"""
|
||||
try:
|
||||
print(get_wttr_json())
|
||||
except Exception as e:
|
||||
print(e)
|
||||
|
||||
main()
|
||||
'';
|
||||
in
|
||||
{
|
||||
imports = [ ../options.nix ];
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
home.packages = [ waybar-weather ];
|
||||
};
|
||||
}
|
||||
104
modules/home/programs/wlogout/default.nix
Normal file
104
modules/home/programs/wlogout/default.nix
Normal file
@@ -0,0 +1,104 @@
|
||||
{ config, lib, ... }:
|
||||
with lib;
|
||||
let
|
||||
cfg = config.mjallen.programs.wlogout;
|
||||
nord = import ../../desktop/theme/nord.nix;
|
||||
in
|
||||
{
|
||||
imports = [ ./options.nix ];
|
||||
config = mkIf cfg.enable {
|
||||
programs.wlogout = {
|
||||
enable = false;
|
||||
layout = {
|
||||
lock = {
|
||||
label = "lock";
|
||||
action = "hyprlock --immediate";
|
||||
text = "Lock";
|
||||
keybind = "l";
|
||||
};
|
||||
hibernate = {
|
||||
label = "hibernate";
|
||||
action = "systemctl hibernate";
|
||||
text = "Hibernate";
|
||||
keybind = "h";
|
||||
};
|
||||
logout = {
|
||||
label = "logout";
|
||||
action = "sleep 1; hyprctl dispatch exit";
|
||||
text = "Logout";
|
||||
keybind = "e";
|
||||
};
|
||||
shutdown = {
|
||||
label = "shutdown";
|
||||
action = "systemctl poweroff";
|
||||
text = "Shutdown";
|
||||
keybind = "s";
|
||||
};
|
||||
suspend = {
|
||||
label = "suspend";
|
||||
action = "systemctl suspend";
|
||||
text = "Suspend";
|
||||
keybind = "u";
|
||||
};
|
||||
reboot = {
|
||||
label = "reboot";
|
||||
action = "reboot";
|
||||
text = "Reboot";
|
||||
keybind = "r";
|
||||
};
|
||||
};
|
||||
style = ''
|
||||
* {
|
||||
background-image: none;
|
||||
}
|
||||
|
||||
window {
|
||||
background-color: ${nord.polarNight.nord0}f0
|
||||
}
|
||||
|
||||
button {
|
||||
margin: 8px;
|
||||
color: ${nord.frost.nord7};
|
||||
background-color: ${nord.polarNight.nord1};
|
||||
border-style: solid;
|
||||
border-width: 2px;
|
||||
background-repeat: no-repeat;
|
||||
background-position: center;
|
||||
background-size: 25%;
|
||||
}
|
||||
|
||||
button:active,
|
||||
button:focus,
|
||||
button:hover {
|
||||
color: ${nord.frost.nord8};
|
||||
background-color: ${nord.polarNight.nord2};
|
||||
outline-style: none;
|
||||
}
|
||||
|
||||
#lock {
|
||||
background-image: image(url("icons/lock.png"));
|
||||
}
|
||||
|
||||
#logout {
|
||||
background-image: image(url("icons/logout.png"));
|
||||
}
|
||||
|
||||
#suspend {
|
||||
background-image: image(url("icons/suspend.png"));
|
||||
}
|
||||
|
||||
#hibernate {
|
||||
background-image: image(url("icons/hibernate.png"));
|
||||
}
|
||||
|
||||
#shutdown {
|
||||
background-image: image(url("icons/shutdown.png"));
|
||||
}
|
||||
|
||||
#reboot {
|
||||
background-image: image(url("icons/reboot.png"));
|
||||
}
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
BIN
modules/home/programs/wlogout/icons/hibernate.png
Executable file
BIN
modules/home/programs/wlogout/icons/hibernate.png
Executable file
Binary file not shown.
|
After Width: | Height: | Size: 10 KiB |
BIN
modules/home/programs/wlogout/icons/lock.png
Executable file
BIN
modules/home/programs/wlogout/icons/lock.png
Executable file
Binary file not shown.
|
After Width: | Height: | Size: 4.6 KiB |
BIN
modules/home/programs/wlogout/icons/logout.png
Executable file
BIN
modules/home/programs/wlogout/icons/logout.png
Executable file
Binary file not shown.
|
After Width: | Height: | Size: 7.6 KiB |
BIN
modules/home/programs/wlogout/icons/reboot.png
Executable file
BIN
modules/home/programs/wlogout/icons/reboot.png
Executable file
Binary file not shown.
|
After Width: | Height: | Size: 8.4 KiB |
BIN
modules/home/programs/wlogout/icons/shutdown.png
Executable file
BIN
modules/home/programs/wlogout/icons/shutdown.png
Executable file
Binary file not shown.
|
After Width: | Height: | Size: 9.5 KiB |
BIN
modules/home/programs/wlogout/icons/suspend.png
Executable file
BIN
modules/home/programs/wlogout/icons/suspend.png
Executable file
Binary file not shown.
|
After Width: | Height: | Size: 11 KiB |
12
modules/home/programs/wlogout/options.nix
Normal file
12
modules/home/programs/wlogout/options.nix
Normal file
@@ -0,0 +1,12 @@
|
||||
{ lib, ... }:
|
||||
with lib;
|
||||
{
|
||||
options.mjallen.programs.wlogout = {
|
||||
enable = mkEnableOption "enable wlogout";
|
||||
|
||||
fontName = mkOption {
|
||||
type = types.str;
|
||||
default = "Deja Vu Sans";
|
||||
};
|
||||
};
|
||||
}
|
||||
102
modules/home/programs/wofi/default.nix
Executable file
102
modules/home/programs/wofi/default.nix
Executable file
@@ -0,0 +1,102 @@
|
||||
{ config, lib, ... }:
|
||||
with lib;
|
||||
let
|
||||
cfg = config.mjallen.programs.wofi;
|
||||
nord = import ../../desktop/theme/nord.nix;
|
||||
in
|
||||
{
|
||||
imports = [ ./options.nix ];
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
programs.wofi = {
|
||||
enable = true;
|
||||
style = ''
|
||||
* {
|
||||
font-family: "${cfg.fontName}", monospace;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
/* Window */
|
||||
window {
|
||||
margin: 0px;
|
||||
padding: 10px;
|
||||
border: 0.16em solid ${nord.aurora.nord15};
|
||||
border-radius: 0.1em;
|
||||
background-color: ${nord.polarNight.nord0};
|
||||
}
|
||||
|
||||
/* Inner Box */
|
||||
#inner-box {
|
||||
margin: 5px;
|
||||
padding: 10px;
|
||||
border: none;
|
||||
background-color: ${nord.polarNight.nord0};
|
||||
}
|
||||
|
||||
/* Outer Box */
|
||||
#outer-box {
|
||||
margin: 5px;
|
||||
padding: 10px;
|
||||
border: none;
|
||||
background-color: ${nord.polarNight.nord0};
|
||||
}
|
||||
|
||||
/* Scroll */
|
||||
#scroll {
|
||||
margin: 0px;
|
||||
padding: 10px;
|
||||
border: none;
|
||||
background-color: ${nord.polarNight.nord0};
|
||||
}
|
||||
|
||||
/* Input */
|
||||
#input {
|
||||
margin: 5px 20px;
|
||||
padding: 10px;
|
||||
border: none;
|
||||
border-radius: 0.1em;
|
||||
color: ${nord.snowStorm.nord6};
|
||||
background-color: ${nord.polarNight.nord0};
|
||||
}
|
||||
|
||||
#input image {
|
||||
border: none;
|
||||
color: ${nord.aurora.nord11};
|
||||
}
|
||||
|
||||
#input * {
|
||||
outline: 4px solid ${nord.aurora.nord11}!important;
|
||||
}
|
||||
|
||||
/* Text */
|
||||
#text {
|
||||
margin: 5px;
|
||||
border: none;
|
||||
color: ${nord.snowStorm.nord6};
|
||||
}
|
||||
|
||||
#entry {
|
||||
background-color: ${nord.polarNight.nord0};
|
||||
}
|
||||
|
||||
#entry arrow {
|
||||
border: none;
|
||||
color: ${nord.aurora.nord15};
|
||||
}
|
||||
|
||||
/* Selected Entry */
|
||||
#entry:selected {
|
||||
border: 0.11em solid ${nord.aurora.nord15};
|
||||
}
|
||||
|
||||
#entry:selected #text {
|
||||
color: ${nord.frost.nord7};
|
||||
}
|
||||
|
||||
#entry:drop(active) {
|
||||
background-color: ${nord.aurora.nord15}!important;
|
||||
}
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
12
modules/home/programs/wofi/options.nix
Normal file
12
modules/home/programs/wofi/options.nix
Normal file
@@ -0,0 +1,12 @@
|
||||
{ lib, ... }:
|
||||
with lib;
|
||||
{
|
||||
options.mjallen.programs.wofi = {
|
||||
enable = mkEnableOption "enable wofi";
|
||||
|
||||
fontName = mkOption {
|
||||
type = types.str;
|
||||
default = "Deja Vu Sans";
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user