refactor(treewide): format with alejandra

This commit is contained in:
ooks-io 2024-07-29 15:00:38 +12:00
parent 7fefb94400
commit 61cef505da
216 changed files with 5995 additions and 3969 deletions

View file

@ -1,6 +1,11 @@
{ pkgs, lib, inputs, config, osConfig, ... }:
let
{
pkgs,
lib,
inputs,
config,
osConfig,
...
}: let
inherit (lib) mkIf mkMerge;
addons = inputs.firefox-addons.packages.${pkgs.system};
@ -22,16 +27,13 @@ let
"application/x-extension-xht" = ["firefox.desktop"];
"application/json" = ["firefox.desktop"];
};
in
{
imports = [ ./tridactyl.nix ];
config = mkMerge [
in {
imports = [./tridactyl.nix];
config = mkMerge [
(mkIf (cfg.enable || browser == "firefox") {
programs.firefox = {
enable = true;
nativeMessagingHosts = [ pkgs.tridactyl-native ];
nativeMessagingHosts = [pkgs.tridactyl-native];
profiles.${admin.name} = {
extensions = with addons; [
ublock-origin
@ -54,6 +56,5 @@ in
defaultApplications = firefoxMime;
};
})
];
}

File diff suppressed because it is too large Load diff

View file

@ -35,7 +35,7 @@
"toolkit.telemetry.updatePing.enabled" = false;
"toolkit.telemetry.bhrPing.enabled" = false;
"toolkit.telemetry.firstShutdownPing.enabled" = false;
"toolkit.telemetry.coverage.opt-out" = true;
"toolkit.telemetry.coverage.opt-out" = true;
"toolkit.coverage.opt-out" = true;
"toolkit.coverage.endpoint.base" = "";
"browser.ping-centre.telemetry" = false;
@ -64,5 +64,5 @@
"geo.provider.use_geoclue" = false;
#Calculator
"browser.urlbar.suggest.calculator" = true;
"browser.urlbar.suggest.calculator" = true;
}

View file

@ -1,4 +1,6 @@
/* css */
/*
css
*/
''
/* config */
@ -177,4 +179,3 @@
/* Removes the annoying rainbow thing from the hamburger */
#appMenu-fxa-separator{border-image:none !important;}
''

View file

@ -1,4 +1,7 @@
/* css */ ''
/*
css
*/
''
@-moz-document url-prefix(about:){
/* Removes the scrollbar on some places */

View file

@ -1,16 +1,15 @@
{ lib, config, ... }:
let
{
lib,
config,
...
}: let
inherit (lib) mkIf;
inherit (config.colorscheme) palette;
inherit (config.colorscheme) palette;
cfg = config.ooknet.browser.firefox;
browser = config.ooknet.desktop.browser;
fonts = config.ooknet.fonts;
in
{
in {
config = mkIf (browser == "firefox" || cfg.enable) {
xdg.configFile = {
"tridactyl/tridactylrc".text = ''
@ -20,14 +19,14 @@ in
unbind --mode=normal t
unbind --mode=normal gt
bind / fillcmdline find
bind n findnext 1
bind N findnext -1
bind gtr open http://192.168.1.210:9091/transmission/web/
bind ttr tabopen http://192.168.1.210:9091/transmission/web/
bind gem open https://gmail.com
bind tem tabopen https://gmail.com
@ -37,189 +36,193 @@ in
# based off base16 themes
# source: <https://github.com/bezmi/base16-tridactyl>
"tridactyl/themes/ooknet.css".text = /* css */ ''
:root {
--font: ${fonts.monospace.family};
--bg: #${palette.base00};
--fg: #${palette.base05};
--red: #${palette.base08};
--green: #${palette.base0B};
--blue: #${palette.base0D};
--yellow: #${palette.base0A};
--purple: #${palette.base0E};
--orange: #${palette.base09};
--cyan: #${palette.base0C};
--comment: #${palette.base04};
--selectedline: #${palette.base02};
"tridactyl/themes/ooknet.css".text =
/*
css
*/
''
:root {
--font: ${fonts.monospace.family};
--bg: #${palette.base00};
--fg: #${palette.base05};
--red: #${palette.base08};
--green: #${palette.base0B};
--blue: #${palette.base0D};
--yellow: #${palette.base0A};
--purple: #${palette.base0E};
--orange: #${palette.base09};
--cyan: #${palette.base0C};
--comment: #${palette.base04};
--selectedline: #${palette.base02};
--tridactyl-fg: var(--fg);
--tridactyl-bg: var(--bg);
--tridactyl-fg: var(--fg);
--tridactyl-bg: var(--bg);
--tridactyl-url-fg: var(--green);
--tridactyl-url-bg: var(--bg);
--tridactyl-highlight-box-bg: var(--selectedline);
--tridactyl-highlight-box-fg: var(--fg);
--tridactyl-url-fg: var(--green);
--tridactyl-url-bg: var(--bg);
--tridactyl-of-fg: var(--fg);
--tridactyl-of-bg: var(--selectedline);
--tridactyl-highlight-box-bg: var(--selectedline);
--tridactyl-highlight-box-fg: var(--fg);
--tridactyl-cmdl-fg: var(--bg);
--tridactyl-cmdl-font-family: var(--selectedline);
--tridactyl-of-fg: var(--fg);
--tridactyl-of-bg: var(--selectedline);
--tridactyl-cmplt-font-family: var(--font);
--tridactyl-hintspan-font-family: var(--font);
--tridactyl-hintspan-fg: var(--bg) !important;
--tridactyl-hintspan-bg: var(--orange) !important;
--tridactyl-cmdl-fg: var(--bg);
--tridactyl-cmdl-font-family: var(--selectedline);
--tridactyl-hint-active-fg: none;
--tridactyl-hint-active-bg: var(--tridactyl-bg);
--tridactyl-hint-active-outline: var(--green);
--tridactyl-hint-bg: none;
--tridactyl-hint-outline: none;
}
--tridactyl-cmplt-font-family: var(--font);
#tridactyl-colon::before {
content: " ";
font-family: var(--font);
font-size: 1.5rem;
color: var(--green);
display: inline;
margin-left: 15px;
}
--tridactyl-hintspan-font-family: var(--font);
--tridactyl-hintspan-fg: var(--bg) !important;
--tridactyl-hintspan-bg: var(--orange) !important;
#command-line-holder {
order: 1;
display: flex;
justify-content: center;
align-items: center;
border: 2px solid var(--tridactyl-fg);
background: var(--tridactyl-bg);
}
--tridactyl-hint-active-fg: none;
--tridactyl-hint-active-bg: var(--tridactyl-bg);
--tridactyl-hint-active-outline: var(--green);
--tridactyl-hint-bg: none;
--tridactyl-hint-outline: none;
}
#tridactyl-input {
padding: 1rem;
color: var(--tridactyl-fg);
width: 90%;
font-family: var(--font);
font-size: 1.5rem;
line-height: 1.5;
background: var(--tridactyl-bg);
padding-left: unset;
padding: 1rem;
}
#tridactyl-colon::before {
content: " ";
font-family: var(--font);
font-size: 1.5rem;
color: var(--green);
display: inline;
margin-left: 15px;
}
#command-line-holder {
order: 1;
display: flex;
justify-content: center;
align-items: center;
border: 2px solid var(--tridactyl-fg);
background: var(--tridactyl-bg);
}
#tridactyl-input {
padding: 1rem;
color: var(--tridactyl-fg);
width: 90%;
font-family: var(--font);
font-size: 1.5rem;
line-height: 1.5;
background: var(--tridactyl-bg);
padding-left: unset;
padding: 1rem;
}
#completions table {
font-size: 0.8rem;
font-weight: 200;
border-spacing: 0;
table-layout: fixed;
padding: 1rem;
padding-top: 1rem;
padding-bottom: 1rem;
}
#completions table {
font-size: 0.8rem;
font-weight: 200;
border-spacing: 0;
table-layout: fixed;
padding: 1rem;
padding-top: 1rem;
padding-bottom: 1rem;
}
#completions > div {
max-height: calc(20 * var(--option-height));
min-height: calc(10 * var(--option-height));
}
#completions > div {
max-height: calc(20 * var(--option-height));
min-height: calc(10 * var(--option-height));
}
#completions {
--option-height: 1.4em;
color: var(--tridactyl-fg);
background: var(--tridactyl-bg);
display: inline-block;
font-size: unset;
font-weight: 200;
overflow: hidden;
width: 100%;
border-top: unset;
order: 2;
}
#completions {
--option-height: 1.4em;
color: var(--tridactyl-fg);
background: var(--tridactyl-bg);
display: inline-block;
font-size: unset;
font-weight: 200;
overflow: hidden;
width: 100%;
border-top: unset;
order: 2;
}
#completions .HistoryCompletionSource {
max-height: unset;
min-height: unset;
}
#completions .HistoryCompletionSource {
max-height: unset;
min-height: unset;
}
#completions .HistoryCompletionSource table {
width: 100%;
font-size: 9pt;
border-spacing: 0;
table-layout: fixed;
}
#completions .HistoryCompletionSource table {
width: 100%;
font-size: 9pt;
border-spacing: 0;
table-layout: fixed;
}
#completions .BmarkCompletionSource {
max-height: unset;
min-height: unset;
}
#completions .BmarkCompletionSource {
max-height: unset;
min-height: unset;
}
#completions table tr td.prefix,
#completions table tr td.privatewindow,
#completions table tr td.container,
#completions table tr td.icon {
display: none;
}
#completions table tr td.prefix,
#completions table tr td.privatewindow,
#completions table tr td.container,
#completions table tr td.icon {
display: none;
}
#completions .BufferCompletionSource table {
width: unset;
font-size: unset;
border-spacing: unset;
table-layout: unset;
}
#completions .BufferCompletionSource table {
width: unset;
font-size: unset;
border-spacing: unset;
table-layout: unset;
}
#completions table tr .title {
width: 50%;
}
#completions table tr .title {
width: 50%;
}
#completions table tr {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
#completions table tr {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
#completions .sectionHeader {
background: unset;
font-weight: bold;
border-bottom: unset;
padding: 1rem !important;
padding-left: unset;
padding-bottom: 0.2rem;
}
#completions .sectionHeader {
background: unset;
font-weight: bold;
border-bottom: unset;
padding: 1rem !important;
padding-left: unset;
padding-bottom: 0.2rem;
}
#cmdline_iframe {
position: fixed !important;
bottom: unset;
top: 25% !important;
left: 10% !important;
z-index: 2147483647 !important;
width: 80% !important;
box-shadow: rgba(0, 0, 0, 0.5) 0px 0px 20px !important;
}
#cmdline_iframe {
position: fixed !important;
bottom: unset;
top: 25% !important;
left: 10% !important;
z-index: 2147483647 !important;
width: 80% !important;
box-shadow: rgba(0, 0, 0, 0.5) 0px 0px 20px !important;
}
.TridactylStatusIndicator {
position: fixed !important;
bottom: 0 !important;
background: var(--tridactyl-bg) !important;
border: unset !important;
border: 1px var(--green) solid !important;
font-size: 12pt !important;
padding: 0.8ex !important;
}
.TridactylStatusIndicator {
position: fixed !important;
bottom: 0 !important;
background: var(--tridactyl-bg) !important;
border: unset !important;
border: 1px var(--green) solid !important;
font-size: 12pt !important;
padding: 0.8ex !important;
}
#completions .focused {
background: var(--green);
color: var(--bg);
}
#completions .focused {
background: var(--green);
color: var(--bg);
}
#completions .focused .url {
background: var(--green);
color: var(--bg);
}
'';
#completions .focused .url {
background: var(--green);
color: var(--bg);
}
'';
};
};
}

View file

@ -1,6 +1,9 @@
{ config, lib, pkgs, ... }:
let
{
config,
lib,
pkgs,
...
}: let
inherit (config.colorscheme) palette;
inherit (lib) mkIf mkMerge;
@ -10,157 +13,159 @@ let
vesktopMime = {
"x-scheme-handler/discord" = ["vesktop.desktop"];
};
in
{
config = mkMerge [
in {
config = mkMerge [
(mkIf (cfg.enable || discord == "vesktop") {
# <https://github.com/AlephNought0/Faery/blob/main/Home/Programs/Vesktop/patchedvesktop.patch>
home.packages = [
# <https://github.com/AlephNought0/Faery/blob/main/Home/Programs/Vesktop/patchedvesktop.patch>
home.packages = [
(pkgs.vesktop.overrideAttrs (old: {
patches = (old.patches or []) ++ [./vesktop-patch.patch];
}))
];
xdg.configFile."vesktop/themes/nix.css".text = /* css */ ''
/**
* @name nix-colors-minimal
* @author aoku
* @description minimal theme designed with nix colors
xdg.configFile."vesktop/themes/nix.css".text =
/*
css
*/
:root {
--nix-bg1: #${palette.base00};
--nix-bg2: #${palette.base01};
--nix-bg3: #${palette.base02};
--nix-fg1: #${palette.base05};
--nix-fg2: #${palette.base07};
--nix-fg3: #${palette.base03};
--nix-link: #${palette.base0D};
''
/**
* @name nix-colors-minimal
* @author aoku
* @description minimal theme designed with nix colors
*/
--nix-accent: #${palette.base08};
--nix-hi: #${palette.base0B};
:root {
--nix-bg1: #${palette.base00};
--nix-bg2: #${palette.base01};
--nix-bg3: #${palette.base02};
--nix-fg1: #${palette.base05};
--nix-fg2: #${palette.base07};
--nix-fg3: #${palette.base03};
--nix-link: #${palette.base0D};
--nix-accent: #${palette.base08};
--nix-hi: #${palette.base0B};
--font-mono: ${fonts.monospace.family}, monospace;
--font-regular: ${fonts.regular.family}, sans serif;
/* server collapse */
--sb-collapsed-width: 12px;
--sb-transition-duration: 0s;
}
.theme-dark {
--background-primary: var(--nix-bg1);
--background-secondary: var(--nix-bg1);
--background-secondary-alt: var(--nix-bg1);
--background-accent: var(--nix-accent);
--background-tertiary: var(--nix-bg1);
--background-floating: var(--nix-bg1);
--background-mentioned: var(--nix-bg1);
--background-mentioned-hover: var(--nix-bg1);
--background-mobile: var(--nix-bg1);
--background-mobile-secondary: var(--nix-bg2);
--background-modifier-selected: var(--nix-bg1);
--channeltextarea-background:var(--nix-bg1);
--background-modifier-hover:var(--nix-bg1);
--activity-card-background: var(--nix-bg2);
--header-primary: var(--nix-fg2);
--header-secondary: var(--nix-fg1);
--text-normal: var(--nix-fg1);
--text-muted: var(--nix-fg1);
--text-link: var(--nix-link);
--text-warning: var(--nix-accent);
--font-primary: var(--font-mono);
--font-headline: var(--font-mono);
--font-display: var(--font-mono);
--interactive-normal: var(--nix-fg1); /*base05*/
--interactive-hover: var(--nix-hi); /*base0B*/
--interactive-active: var(--nix-fg2);
--interactive-muted: var(--nix-fg3); /*base03*/
--channels-default: var(--nix-fg1);
--scrollbar-thin-thumb: transparent;
--scrollbar-thin-track: transparent;
--scrollbar-auto-thumb: var(--nix-fg1);
--scrollbar-auto-track:var(--nix-bg1);
--scrollbar-auto-scrollbar-color-thumb: var(--nix-accent);
}
.messagesWrapper_ea2b0b {
font-family: var(--font-regular);
}
.titleWrapper__482dc {
font-family: var(--font-mono);
}
.link__95dc0 /* text channel*/{
border-radius: 0px;
margin-left: -10px;
font-family: var(--font-mono);
}
.container_ca50b9 .avatar_f8541f { /*avatar*/
display: none;
}
.form__13a2c /* text input box resize */ {
height: 50px;
font-family: var(--font-regular);
}
.containerDefault__3187b .wrapper__7bcde:before /* text channel */{
content: "";
display:inline-block;
background: var(--nix-hi);
height: 100%;
position: absolute;
left: 0;
}
--font-mono: ${fonts.monospace.family}, monospace;
--font-regular: ${fonts.regular.family}, sans serif;
/* server collapse */
--sb-collapsed-width: 12px;
--sb-transition-duration: 0s;
}
.guilds__2b93a /* servers */{
overflow: hidden !important;
width: var(--sb-collapsed-width, 75px);
transition: width var(--sb-transition-duration);
}
.guilds__2b93a:hover /* expand server bar on hover */{
width: 70px;
overflow: visible !important;
animation: server-bar-overflow 0s linear 0ms forwards
}
.guilds__2b93a ~ .base__3e6af /* friends list, chat */{
position: absolute;
left: var(--sb-collapsed-left, var(--sb-collapsed-width));
top: var(--sb-collapsed-top, 0px);
bottom: var(--sb-collapsed-bottom, 0px);
right: var(--sb-collapsed-right, 0px);
transition-property: var(--sb-transition-property, left);
transition-duration: var(--sb-transition-duration);
}
.guilds__2b93a:hover ~ .base__3e6af /* friends list, chat */{
position: absolute;
left: var(--sb-left, 70px);
top: var(--sb-top, 0px);
bottom: var(--sb-bottom, 0px);
right: var(--sb-right, 0px);
}
@keyframes server-bar-overflow{
from{
overflow: hidden;
}
to{
overflow: visible;
}
}
'';
})
.theme-dark {
--background-primary: var(--nix-bg1);
--background-secondary: var(--nix-bg1);
--background-secondary-alt: var(--nix-bg1);
--background-accent: var(--nix-accent);
--background-tertiary: var(--nix-bg1);
--background-floating: var(--nix-bg1);
--background-mentioned: var(--nix-bg1);
--background-mentioned-hover: var(--nix-bg1);
--background-mobile: var(--nix-bg1);
--background-mobile-secondary: var(--nix-bg2);
--background-modifier-selected: var(--nix-bg1);
--channeltextarea-background:var(--nix-bg1);
--background-modifier-hover:var(--nix-bg1);
--activity-card-background: var(--nix-bg2);
--header-primary: var(--nix-fg2);
--header-secondary: var(--nix-fg1);
--text-normal: var(--nix-fg1);
--text-muted: var(--nix-fg1);
--text-link: var(--nix-link);
--text-warning: var(--nix-accent);
--font-primary: var(--font-mono);
--font-headline: var(--font-mono);
--font-display: var(--font-mono);
--interactive-normal: var(--nix-fg1); /*base05*/
--interactive-hover: var(--nix-hi); /*base0B*/
--interactive-active: var(--nix-fg2);
--interactive-muted: var(--nix-fg3); /*base03*/
--channels-default: var(--nix-fg1);
--scrollbar-thin-thumb: transparent;
--scrollbar-thin-track: transparent;
--scrollbar-auto-thumb: var(--nix-fg1);
--scrollbar-auto-track:var(--nix-bg1);
--scrollbar-auto-scrollbar-color-thumb: var(--nix-accent);
}
.messagesWrapper_ea2b0b {
font-family: var(--font-regular);
}
.titleWrapper__482dc {
font-family: var(--font-mono);
}
.link__95dc0 /* text channel*/{
border-radius: 0px;
margin-left: -10px;
font-family: var(--font-mono);
}
.container_ca50b9 .avatar_f8541f { /*avatar*/
display: none;
}
.form__13a2c /* text input box resize */ {
height: 50px;
font-family: var(--font-regular);
}
.containerDefault__3187b .wrapper__7bcde:before /* text channel */{
content: "";
display:inline-block;
background: var(--nix-hi);
height: 100%;
position: absolute;
left: 0;
}
/* server collapse */
.guilds__2b93a /* servers */{
overflow: hidden !important;
width: var(--sb-collapsed-width, 75px);
transition: width var(--sb-transition-duration);
}
.guilds__2b93a:hover /* expand server bar on hover */{
width: 70px;
overflow: visible !important;
animation: server-bar-overflow 0s linear 0ms forwards
}
.guilds__2b93a ~ .base__3e6af /* friends list, chat */{
position: absolute;
left: var(--sb-collapsed-left, var(--sb-collapsed-width));
top: var(--sb-collapsed-top, 0px);
bottom: var(--sb-collapsed-bottom, 0px);
right: var(--sb-collapsed-right, 0px);
transition-property: var(--sb-transition-property, left);
transition-duration: var(--sb-transition-duration);
}
.guilds__2b93a:hover ~ .base__3e6af /* friends list, chat */{
position: absolute;
left: var(--sb-left, 70px);
top: var(--sb-top, 0px);
bottom: var(--sb-bottom, 0px);
right: var(--sb-right, 0px);
}
@keyframes server-bar-overflow{
from{
overflow: hidden;
}
to{
overflow: visible;
}
}
'';
})
(mkIf (discord == "vesktop") {
ooknet.binds.discord = "vesktop";
xdg.mimeApps = {

View file

@ -1,12 +1,13 @@
{ lib, config, pkgs, ... }:
let
{
lib,
config,
pkgs,
...
}: let
inherit (lib) mkIf;
cfg = config.ooknet.creative.audacity;
in
{
in {
config = mkIf cfg.enable {
home.packages = [ pkgs.audacity ];
home.packages = [pkgs.audacity];
};
}

View file

@ -1,13 +1,13 @@
{ lib, config, pkgs, ... }:
let
{
lib,
config,
pkgs,
...
}: let
inherit (lib) mkIf;
cfg = config.ooknet.creative.inkscape;
in
{
in {
config = mkIf cfg.enable {
home.packages = [ pkgs.inkscape-with-extensions ];
home.packages = [pkgs.inkscape-with-extensions];
};
}

View file

@ -7,7 +7,7 @@
./terminal
./wayland
./productivity
./gaming
./gaming
./security
./tools
./file-manager

View file

@ -1,25 +1,26 @@
{ lib, config, pkgs, ... }:
let
{
lib,
config,
pkgs,
...
}: let
inherit (lib) mkIf mkMerge;
cfg = config.ooknet.fileManager.nemo;
fileManager = config.ooknet.desktop.fileManager;
nemoMime = {
"inode/directory" = ["nemo.desktop"];
};
in
{
in {
config = mkMerge [
(mkIf (cfg.enable || fileManager == "nemo") {
home.packages = [ pkgs.cinnamon.nemo-with-extensions ];
home.packages = [pkgs.cinnamon.nemo-with-extensions];
})
(mkIf (fileManager == "nemo") {
ooknet.binds.fileManager = "nemo";
ooknet.binds.fileManager = "nemo";
xdg.mimeApps = {
associations.added = nemoMime;
defaultApplications = nemoMime;
defaultApplications = nemoMime;
};
})
];

View file

@ -1,15 +1,15 @@
{ lib, config, pkgs, ... }:
let
{
lib,
config,
pkgs,
...
}: let
inherit (lib) mkIf;
cfg = config.ooknet.gaming.bottles;
in
{
in {
config = mkIf cfg.enable {
home.packages = with pkgs; [
bottles
];
};
}

View file

@ -1,11 +1,12 @@
{ lib, config, pkgs, ... }:
let
cfg = config.ooknet.gaming.factorio;
in
{
lib,
config,
pkgs,
...
}: let
cfg = config.ooknet.gaming.factorio;
in {
config = lib.mkIf cfg.enable {
home.packages = with pkgs; [ factorio ];
home.packages = with pkgs; [factorio];
};
}

View file

@ -1,11 +1,12 @@
{ lib, config, pkgs, ... }:
let
{
lib,
config,
pkgs,
...
}: let
inherit (lib) mkIf;
cfg = config.ooknet.gaming.lutris;
in
{
in {
config = mkIf cfg.enable {
home.packages = with pkgs; [
(lutris.override {

View file

@ -1,11 +1,12 @@
{ lib, config, pkgs, ... }:
let
{
lib,
config,
pkgs,
...
}: let
inherit (lib) mkIf;
cfg = config.ooknet.gaming.wine;
in
{
in {
config = mkIf cfg.enable {
home.packages = with pkgs; [
winetricks

View file

@ -1,14 +1,14 @@
{ lib, config, ... }:
let
{
lib,
config,
...
}: let
inherit (lib) mkIf;
cfg = config.ooknet.media.image.imv;
imvMime = {
"image/*" = ["imv.desktop"];
};
in
{
in {
config = mkIf cfg.enable {
programs = {
imv = {

View file

@ -1,17 +1,18 @@
{ osConfig, pkgs, config, lib, ... }:
let
{
osConfig,
pkgs,
config,
lib,
...
}: let
inherit (config.colorscheme) palette;
inherit (lib) mkIf getExe;
cfg = config.ooknet.media.music.tui;
zellij = config.ooknet.multiplexer.zellij;
multiplexer= config.ooknet.console.multiplexer;
multiplexer = config.ooknet.console.multiplexer;
hostName = osConfig.networking.hostName;
in
{
in {
config = mkIf cfg.enable {
home.packages = with pkgs; [
termusic
@ -43,89 +44,97 @@ in
};
};
xdg.configFile."spotify-player/app.toml".text = /* toml */ ''
theme = "default"
client_id = "fc4c3656d7cc4a7ea70c6080965f8b1a"
client_port = 8080
tracks_playback_limit = 50
playback_format = "{track} {artists}\n{album}\n{metadata}"
notify_format = { summary = "{track} {artists}", body = "{album}" }
app_refresh_duration_in_ms = 32
playback_refresh_duration_in_ms = 0
page_size_in_rows = 20
enable_media_control = false
enable_streaming = "Always"
enable_notify = true
enable_cover_image_cache = false
notify_streaming_only = false
default_device = "${hostName}"
play_icon = ""
pause_icon = ""
liked_icon = ""
playback_window_position = "Top"
cover_img_length = 9
cover_img_width = 5
playback_window_width = 6
xdg.configFile."spotify-player/app.toml".text =
/*
toml
*/
''
theme = "default"
client_id = "fc4c3656d7cc4a7ea70c6080965f8b1a"
client_port = 8080
tracks_playback_limit = 50
playback_format = "{track} {artists}\n{album}\n{metadata}"
notify_format = { summary = "{track} {artists}", body = "{album}" }
app_refresh_duration_in_ms = 32
playback_refresh_duration_in_ms = 0
page_size_in_rows = 20
enable_media_control = false
enable_streaming = "Always"
enable_notify = true
enable_cover_image_cache = false
notify_streaming_only = false
default_device = "${hostName}"
play_icon = ""
pause_icon = ""
liked_icon = ""
playback_window_position = "Top"
cover_img_length = 9
cover_img_width = 5
playback_window_width = 6
[device]
name = "${hostName}"
device_type = "speaker"
volume = 100
bitrate = 320
audio_cache = false
normalization = false
'';
xdg.configFile."zellij/layouts/music.kdl".text = mkIf (zellij.enable || multiplexer == "zellij") /* kdl */ ''
layout {
default_tab_template {
pane size=2 borderless=true {
plugin location="file:${pkgs.zjstatus}/bin/zjstatus.wasm" {
format_left "{mode}"
format_right "{session} {datetime}"
format_center "#[fg=#89B4FA,bold] {tabs}"
format_space ""
[device]
name = "${hostName}"
device_type = "speaker"
volume = 100
bitrate = 320
audio_cache = false
normalization = false
'';
border_enabled "true"
border_char ""
border_format "#[fg=#${palette.base0D}]{char}"
border_position "bottom"
xdg.configFile."zellij/layouts/music.kdl".text =
mkIf (zellij.enable || multiplexer == "zellij")
/*
kdl
*/
''
layout {
default_tab_template {
pane size=2 borderless=true {
plugin location="file:${pkgs.zjstatus}/bin/zjstatus.wasm" {
format_left "{mode}"
format_right "{session} {datetime}"
format_center "#[fg=#89B4FA,bold] {tabs}"
format_space ""
hide_frame_for_single_pane "true"
border_enabled "true"
border_char ""
border_format "#[fg=#${palette.base0D}]{char}"
border_position "bottom"
mode_normal "#[fg=${palette.base0D}]󰝚"
tab_normal "#[bg=#${palette.base01}] {name} "
tab_active "#[bg=#${palette.base02}] {name} "
tab_separator " "
hide_frame_for_single_pane "true"
datetime "#[fg=#${palette.base05},bold] {format} "
datetime_format "%I:%M %p"
datetime_timezone "${config.home.sessionVariables.TZ}"
}
}
children
}
mode_normal "#[fg=${palette.base0D}]󰝚"
tab name="spotify" focus=true {
pane name="spotify" {
borderless true
command "${getExe pkgs.spotify-player}"
focus true
}
pane name="Visualizer" {
borderless false
split_direction "horizontal"
size "20%"
command "${getExe pkgs.cava}"
}
}
}
'';
tab_normal "#[bg=#${palette.base01}] {name} "
tab_active "#[bg=#${palette.base02}] {name} "
tab_separator " "
datetime "#[fg=#${palette.base05},bold] {format} "
datetime_format "%I:%M %p"
datetime_timezone "${config.home.sessionVariables.TZ}"
}
}
children
}
tab name="spotify" focus=true {
pane name="spotify" {
borderless true
command "${getExe pkgs.spotify-player}"
focus true
}
pane name="Visualizer" {
borderless false
split_direction "horizontal"
size "20%"
command "${getExe pkgs.cava}"
}
}
}
'';
home.shellAliases = mkIf (zellij.enable || multiplexer == "zellij") {
zjm = "zellij --layout music";
};
};
}

View file

@ -1,12 +1,13 @@
{ pkgs, lib, config, ... }:
let
{
pkgs,
lib,
config,
...
}: let
inherit (lib) mkIf;
cfg = config.ooknet.media.video.jellyfinPlayer;
in
{
in {
config = mkIf cfg.enable {
home.packages = [ pkgs.jellyfin-media-player ];
home.packages = [pkgs.jellyfin-media-player];
};
}

View file

@ -1,22 +1,22 @@
{ lib, config, ... }:
let
{
lib,
config,
...
}: let
inherit (lib) mkIf;
cfg = config.ooknet.media.video.mpv;
mpvMime = {
"audio/*" = ["mpv.desktop"];
"video/*" = ["mpv.desktop"];
};
in
{
in {
config = mkIf cfg.enable {
programs.mpv = {
enable = true;
};
xdg.mimeApps = {
associations.added = mpvMime;
defaultApplications = mpvMime;
defaultApplications = mpvMime;
};
};
}

View file

@ -1,13 +1,14 @@
{ lib, config, pkgs, ...}:
let
{
lib,
config,
pkgs,
...
}: let
inherit (lib) mkIf;
cfg = config.ooknet.media.video.youtube;
in
{
in {
config = mkIf cfg.enable {
home.packages = [ pkgs.youtube-tui ];
home.packages = [pkgs.youtube-tui];
programs.yt-dlp = {
enable = true;
};

View file

@ -1,6 +1,4 @@
{ ... }:
{
{...}: {
imports = [
./office
./notes

View file

@ -1,6 +1,9 @@
{ lib, config, pkgs, ... }:
let
{
lib,
config,
pkgs,
...
}: let
inherit (lib) mkIf mkMerge hm;
cfg = config.ooknet.productivity.notes.obsidian;
notes = config.ooknet.desktop.notes;
@ -8,17 +11,20 @@ let
# TODO: use admin.githubUsername
notesRepo = "git@github.com:ooks-io/notes.git";
notesPath = "${config.xdg.userDirs.documents}/notes";
in
{
config = mkMerge [
in {
config = mkMerge [
(mkIf (cfg.enable || notes == "obsidian") {
home.packages = [ pkgs.obsidian ];
home.activation.cloneObsidianVault = hm.dag.entryAfter ["installPackages"] /* shell */ ''
if ! [ -d "${notesPath}" ]; then
$DRY_RUN_CMD git clone ${notesRepo} ${notesPath}
fi
'';
home.packages = [pkgs.obsidian];
home.activation.cloneObsidianVault =
hm.dag.entryAfter ["installPackages"]
/*
shell
*/
''
if ! [ -d "${notesPath}" ]; then
$DRY_RUN_CMD git clone ${notesRepo} ${notesPath}
fi
'';
})
(mkIf (notes == "obsidian") {

View file

@ -1,13 +1,14 @@
{ lib, config, pkgs, ... }:
let
{
lib,
config,
pkgs,
...
}: let
inherit (lib) mkIf mkEnableOption;
cfg = config.ooknet.desktop.productivity.office;
in
{
in {
options.ooknet.desktop.productivity.office.enable = mkEnableOption "enable office home module";
config = mkIf cfg.enable {
home.packages = [ pkgs.libreoffice ];
home.packages = [pkgs.libreoffice];
};
}

View file

@ -1,16 +1,16 @@
{ lib, config, ... }:
let
{
lib,
config,
...
}: let
inherit (config.colorscheme) palette;
inherit (lib) mkIf;
zathura = { "application/pdf" = ["org.pwmt.zathura.desktop"]; };
zathura = {"application/pdf" = ["org.pwmt.zathura.desktop"];};
cfg = config.ooknet.productivity.pdf.zathura;
pdf = config.ooknet.desktop.pdf;
fonts = config.ooknet.fonts;
in
{
in {
config = mkIf (cfg.enable || pdf == "zathura") {
programs.zathura = {
enable = true;

View file

@ -1,20 +1,21 @@
{ lib, config, pkgs, ... }:
let
inherit (lib) mkIf;
polkit = config.ooknet.security.polkit;
in
{
lib,
config,
pkgs,
...
}: let
inherit (lib) mkIf;
polkit = config.ooknet.security.polkit;
in {
config = {
systemd.user.services = {
polkit-pantheon-authentication-agent-1 = mkIf (polkit == "pantheon") {
Unit.Description = "polkit-pantheon-authentication-agent-1";
Install = {
WantedBy = [ "graphical-session.target" ];
Wants = [ "graphical-session.target" ];
After = [ "graphical-session.target" ];
WantedBy = ["graphical-session.target"];
Wants = ["graphical-session.target"];
After = ["graphical-session.target"];
};
Service = {
@ -29,9 +30,9 @@ in
polkit-gnome-authentication-agent-1 = mkIf (polkit == "gnome") {
Unit.Description = "polkit-pantheon-authentication-agent-1";
Install = {
WantedBy = [ "graphical-session.target" ];
Wants = [ "graphical-session.target" ];
After = [ "graphical-session.target" ];
WantedBy = ["graphical-session.target"];
Wants = ["graphical-session.target"];
After = ["graphical-session.target"];
};
Service = {

View file

@ -1,82 +1,82 @@
{ config, lib, ... }:
let
{
config,
lib,
...
}: let
inherit (config.colorscheme) palette;
inherit (lib) mkMerge mkIf;
fonts = config.ooknet.fonts;
cfg = config.ooknet.terminal.foot;
desktop = config.ooknet.desktop;
in
in {
config = mkMerge [
(mkIf (cfg.enable || desktop.terminal == "foot") {
programs.foot = {
enable = true;
server.enable = true;
settings = {
main = {
term = "xterm-256color";
font = "${fonts.monospace.family}:pixelsize=18:antialias=true";
font-bold = "${fonts.monospace.family}:style=Bold:pixelsize=18:antialias=true";
font-italic = "${fonts.monospace.family}:style=Italic:pixelsize=18:antialias=true";
font-bold-italic = "${fonts.monospace.family}:style=Bold Italic:pixelsize=18:antialias=true";
dpi-aware = "yes";
letter-spacing = "-1px";
bold-text-in-bright = "palette-based";
resize-delay-ms = "80";
pad = "9x9 center";
selection-target = "clipboard";
};
{
config = mkMerge [
(mkIf (cfg.enable || desktop.terminal == "foot") {
programs.foot = {
enable = true;
server.enable = true;
settings = {
main = {
term = "xterm-256color";
font = "${fonts.monospace.family}:pixelsize=18:antialias=true";
font-bold = "${fonts.monospace.family}:style=Bold:pixelsize=18:antialias=true";
font-italic = "${fonts.monospace.family}:style=Italic:pixelsize=18:antialias=true";
font-bold-italic = "${fonts.monospace.family}:style=Bold Italic:pixelsize=18:antialias=true";
dpi-aware = "yes";
letter-spacing = "-1px";
bold-text-in-bright = "palette-based";
resize-delay-ms = "80";
pad = "9x9 center";
selection-target = "clipboard";
};
tweak = {
sixel = "yes";
font-monospace-warn = "no";
};
tweak = {
sixel = "yes";
font-monospace-warn = "no";
};
cursor = {
style = "beam";
blink = "yes";
};
cursor = {
style = "beam";
blink = "yes";
};
colors = {
alpha = 1.0;
foreground = "${palette.base05}";
background = "${palette.base00}";
regular0 = "${palette.base00}"; # black
regular1 = "${palette.base08}"; # red
regular2 = "${palette.base0B}"; # green
regular3 = "${palette.base0A}"; # yellow
regular4 = "${palette.base0D}"; # blue
regular5 = "${palette.base0E}"; # magenta
regular6 = "${palette.base0C}"; # cyan
regular7 = "${palette.base05}"; # white
bright0 = "${palette.base03}"; # bright black
bright1 = "${palette.base08}"; # bright red
bright2 = "${palette.base0B}"; # bright green
bright3 = "${palette.base0A}"; # bright yellow
bright4 = "${palette.base0D}"; # bright blue
bright5 = "${palette.base0E}"; # bright magenta
bright6 = "${palette.base0C}"; # bright cyan
bright7 = "${palette.base07}"; # bright white
"16" = "${palette.base09}";
"17" = "${palette.base0F}";
"18" = "${palette.base01}";
"19" = "${palette.base02}";
"20" = "${palette.base04}";
"21" = "${palette.base06}";
colors = {
alpha = 1.0;
foreground = "${palette.base05}";
background = "${palette.base00}";
regular0 = "${palette.base00}"; # black
regular1 = "${palette.base08}"; # red
regular2 = "${palette.base0B}"; # green
regular3 = "${palette.base0A}"; # yellow
regular4 = "${palette.base0D}"; # blue
regular5 = "${palette.base0E}"; # magenta
regular6 = "${palette.base0C}"; # cyan
regular7 = "${palette.base05}"; # white
bright0 = "${palette.base03}"; # bright black
bright1 = "${palette.base08}"; # bright red
bright2 = "${palette.base0B}"; # bright green
bright3 = "${palette.base0A}"; # bright yellow
bright4 = "${palette.base0D}"; # bright blue
bright5 = "${palette.base0E}"; # bright magenta
bright6 = "${palette.base0C}"; # bright cyan
bright7 = "${palette.base07}"; # bright white
"16" = "${palette.base09}";
"17" = "${palette.base0F}";
"18" = "${palette.base01}";
"19" = "${palette.base02}";
"20" = "${palette.base04}";
"21" = "${palette.base06}";
};
};
};
};
})
})
(mkIf (desktop.terminal == "foot") {
home.sessionVariables = {
TERMINAL = "foot";
TERM = "foot";
};
ooknet.binds.terminal = "foot";
ooknet.binds.terminalLaunch = "foot";
(mkIf (desktop.terminal == "foot") {
home.sessionVariables = {
TERMINAL = "foot";
TERM = "foot";
};
ooknet.binds.terminal = "foot";
ooknet.binds.terminalLaunch = "foot";
})
];
}

View file

@ -1,17 +1,17 @@
{ config, lib, osConfig, ... }:
let
{
config,
lib,
osConfig,
...
}: let
inherit (lib) mkIf;
inherit (config.colorscheme) palette;
fonts = config.ooknet.fonts;
cfg = config.ooknet.terminal.kitty;
terminal = config.ooknet.desktop.terminal;
shell = osConfig.ooknet.host.admin.shell;
in
{
in {
config = mkIf (cfg.enable || terminal == "kitty") {
home.sessionVariables = mkIf (terminal == "kitty") {
TERMINAL = "kitty -1";
TERM = "kitty -1";

View file

@ -1,11 +1,11 @@
{ osConfig, lib, ... }:
let
{
osConfig,
lib,
...
}: let
inherit (lib) mkIf;
cfg = osConfig.ooknet.programs._1password;
in
{
in {
config = mkIf cfg.enable {
ooknet.binds.password = "1password";
};

View file

@ -1,11 +1,11 @@
{ lib, osConfig, ... }:
let
{
lib,
osConfig,
...
}: let
inherit (lib) mkIf;
cfg = osConfig.ooknet.programs.kdeconnect;
in
{
in {
config = mkIf cfg.enable {
services.kdeconnect = {
enable = true;

View file

@ -1,42 +1,47 @@
{ lib, osConfig, pkgs, ... }:
let
{
lib,
osConfig,
pkgs,
...
}: let
inherit (lib) mkIf;
inherit (builtins) elem;
features = osConfig.ooknet.host.hardware.features;
ookbrightness = pkgs.writeShellApplication {
name = "ookbrightness";
runtimeInputs = with pkgs; [brillo libnotify];
text = /* bash */ ''
BRIGHTNESS=$(brillo -G | awk -F'.' '{print$1}')
notify() {
notify-send --app-name="system-notify" -h string:x-canonical-private-synchronous:sys-notify "󰃠 $BRIGHTNESS%"
}
option() {
case "$1" in
up)
brillo -q -u 30000 -A 5
;;
down)
brillo -q -u 30000 -U 5
;;
*)
echo "Invalid argument"
;;
esac
}
main() {
option "$@"
notify
}
main "$@"
'';
text =
/*
bash
*/
''
BRIGHTNESS=$(brillo -G | awk -F'.' '{print$1}')
notify() {
notify-send --app-name="system-notify" -h string:x-canonical-private-synchronous:sys-notify "󰃠 $BRIGHTNESS%"
}
option() {
case "$1" in
up)
brillo -q -u 30000 -A 5
;;
down)
brillo -q -u 30000 -U 5
;;
*)
echo "Invalid argument"
;;
esac
}
main() {
option "$@"
notify
}
main "$@"
'';
};
in
{
in {
config = mkIf (elem "backlight" features) {
home.packages = [ ookbrightness ];
home.packages = [ookbrightness];
ooknet.binds.brightness = {
up = "ookbrightness up";
down = "ookbrightness down";

View file

@ -1,14 +1,15 @@
{ lib, config, inputs, pkgs, ... }:
let
{
lib,
config,
inputs,
pkgs,
...
}: let
inherit (lib) mkIf;
launcher = config.ooknet.wayland.launcher;
in
{
in {
config = mkIf (launcher == "rofi") {
home.packages = [ inputs.ooks-scripts.packages.${pkgs.system}.powermenu ];
home.packages = [inputs.ooks-scripts.packages.${pkgs.system}.powermenu];
ooknet.binds.powerMenu = "powermenu -c dmenu";
};
}

View file

@ -1,6 +1,9 @@
{ lib, pkgs, osConfig, ... }:
let
{
lib,
pkgs,
osConfig,
...
}: let
inherit (lib) mkIf;
inherit (builtins) elem;
features = osConfig.ooknet.host.hardware.features;
@ -33,11 +36,9 @@ let
main "$@"
'';
};
in
{
in {
config = mkIf (elem "audio" features) {
home.packages = [ ookvolume ];
home.packages = [ookvolume];
ooknet.binds.volume = {
up = "ookvolume up";
down = "ookvolume down";

View file

@ -1,234 +1,239 @@
{ lib, config, pkgs, ... }:
let
{
lib,
config,
pkgs,
...
}: let
inherit (lib) mkIf;
multiplexer = config.ooknet.console.multiplexer;
launcher = config.ooknet.wayland.launcher;
binds = config.ooknet.binds;
zellijmenu = pkgs.writeShellApplication {
name = "zellijmenu";
runtimeInputs = with pkgs; [ coreutils rofi-wayland ];
text = /* bash */ ''
set -e
runtimeInputs = with pkgs; [coreutils rofi-wayland];
text =
/*
bash
*/
''
set -e
type=""
type_dir=""
project_name=""
project_dir=""
session_name=""
layout=""
spawn_terminal=0
type=""
type_dir=""
project_name=""
project_dir=""
session_name=""
layout=""
spawn_terminal=0
while [[ "$#" -gt 0 ]]; do
case $1 in
-n) spawn_terminal=1 ;;
*)
echo "Unknown parameter: $1" >&2
exit 1
;;
esac
shift
done
rofi_cmd() {
MSG=$1
rofi -dmenu -i -mesg "$MSG"
}
zellij_cmd() {
if [[ "$spawn_terminal" -eq 1 ]]; then
${binds.terminalLaunch} zellij "$@"
else
zellij "$@"
fi
}
session_manager() {
session_list() {
zellij ls -s | tr ' ' '\n'
}
layout_menu() {
layout_list=$(find ~/.config/zellij/layouts -name "*.kdl" | sed 's|.*/||; s/\.kdl$//' | tr ' ' '\n')
echo -e "$layout_list" | rofi_cmd "Select layout for $session_name:"
}
session_menu() {
echo -e "$(session_list)" | rofi_cmd "Session:"
}
session_select() {
session_name=$(session_menu)
if [[ -z "$session_name" ]]; then
echo "Nothing selected."
exit 0
fi
if session_list | grep -qx "$session_name"; then
session_action="select"
else
session_action="create"
fi
}
selection_menu() {
echo -e "Attach\nDelete\nBack" | rofi_cmd "$session_name action:"
}
while true; do
session_select
case $session_action in
"create")
layout="$(layout_menu)"
if [ -z "$layout" ]; then
echo "No layout given"
continue
fi
zellij_cmd -s "$session_name" --layout "$layout"
break
while [[ "$#" -gt 0 ]]; do
case $1 in
-n) spawn_terminal=1 ;;
*)
echo "Unknown parameter: $1" >&2
exit 1
;;
"select")
selection=$(selection_menu)
case $selection in
"Attach")
zellij_cmd attach "$session_name"
esac
shift
done
rofi_cmd() {
MSG=$1
rofi -dmenu -i -mesg "$MSG"
}
zellij_cmd() {
if [[ "$spawn_terminal" -eq 1 ]]; then
${binds.terminalLaunch} zellij "$@"
else
zellij "$@"
fi
}
session_manager() {
session_list() {
zellij ls -s | tr ' ' '\n'
}
layout_menu() {
layout_list=$(find ~/.config/zellij/layouts -name "*.kdl" | sed 's|.*/||; s/\.kdl$//' | tr ' ' '\n')
echo -e "$layout_list" | rofi_cmd "Select layout for $session_name:"
}
session_menu() {
echo -e "$(session_list)" | rofi_cmd "Session:"
}
session_select() {
session_name=$(session_menu)
if [[ -z "$session_name" ]]; then
echo "Nothing selected."
exit 0
fi
if session_list | grep -qx "$session_name"; then
session_action="select"
else
session_action="create"
fi
}
selection_menu() {
echo -e "Attach\nDelete\nBack" | rofi_cmd "$session_name action:"
}
while true; do
session_select
case $session_action in
"create")
layout="$(layout_menu)"
if [ -z "$layout" ]; then
echo "No layout given"
continue
fi
zellij_cmd -s "$session_name" --layout "$layout"
break
;;
"Delete") zellij delete-session --force "$session_name" ;;
"Back") echo "Going back." ;;
*) echo "Going Back." ;;
"select")
selection=$(selection_menu)
case $selection in
"Attach")
zellij_cmd attach "$session_name"
break
;;
"Delete") zellij delete-session --force "$session_name" ;;
"Back") echo "Going back." ;;
*) echo "Going Back." ;;
esac
;;
*) echo "Going Back" ;;
esac
;;
*) echo "Going Back" ;;
esac
done
}
done
}
project_manager() {
get_project_type() {
while true; do
type=$(echo -e "script\nnix" | rofi_cmd "Select project type:")
project_manager() {
get_project_type() {
while true; do
type=$(echo -e "script\nnix" | rofi_cmd "Select project type:")
case "$type" in
script)
type_dir="$SCRIPTS"
break
;;
nix)
type_dir="$NIX_DIR"
break
;;
*)
echo "Invalid selection, try again."
;;
esac
done
}
get_project_name() {
while true; do
project_name=$(rofi_cmd "Enter project name:")
if [ -z "$project_name" ]; then
echo "No name provided, try again."
elif [ -d "$type_dir/$project_name" ]; then
echo "Project already exists, try again."
else
project_dir="$type_dir/$project_name"
break
fi
done
}
get_session_name() {
session_name="$project_name"
if zellij ls | grep -q "^$session_name$"; then
session_name=$(rofi_cmd "Session name '$project_name' in use, enter a new session name:")
if [ -z "$session_name" ]; then
echo "No session name entered, exiting."
exit 1
fi
fi
}
get_layout() {
case "$type" in
script)
type_dir="$SCRIPTS"
break
layout="script"
;;
nix)
type_dir="$NIX_DIR"
break
layout="nix"
;;
*)
echo "Invalid selection, try again."
echo "Unknown project type, using default layout."
layout="base"
;;
esac
done
}
}
get_project_name() {
while true; do
project_name=$(rofi_cmd "Enter project name:")
if [ -z "$project_name" ]; then
echo "No name provided, try again."
elif [ -d "$type_dir/$project_name" ]; then
echo "Project already exists, try again."
else
project_dir="$type_dir/$project_name"
break
fi
done
}
select_project() {
project_name=$(find "$type_dir" -maxdepth 1 -mindepth 1 -type d ! -name .git -exec basename {} \; | rofi_cmd "Select project:")
project_dir="$type_dir/$project_name"
get_session_name() {
session_name="$project_name"
if zellij ls | grep -q "^$session_name$"; then
session_name=$(rofi_cmd "Session name '$project_name' in use, enter a new session name:")
if [ -z "$session_name" ]; then
echo "No session name entered, exiting."
exit 1
fi
fi
}
cd "$project_dir" || return 1
get_session_name
get_layout
zellij_cmd -s "$session_name" --layout "$layout"
}
get_layout() {
case "$type" in
script)
layout="script"
create_and_start_project() {
mkdir -p "$project_dir"
cd "$project_dir" || return 1
case "$type" in
script)
echo -e "#!/usr/bin/env bash\necho 'hello world'" >"$project_name.sh"
chmod +x "$project_name.sh"
;;
nix)
echo "Creating Nix project..."
# still need to implement
;;
*)
echo "Unknown project type."
return 1
;;
esac
get_session_name
get_layout
zellij_cmd -s "$session_name" --layout "$layout"
}
project_action=$(echo -e "Create Project\nSelect Project" | rofi_cmd "Project action:")
case "$project_action" in
"Create Project")
get_project_type
get_project_name
create_and_start_project
;;
nix)
layout="nix"
;;
*)
echo "Unknown project type, using default layout."
layout="base"
;;
esac
}
select_project() {
project_name=$(find "$type_dir" -maxdepth 1 -mindepth 1 -type d ! -name .git -exec basename {} \; | rofi_cmd "Select project:")
project_dir="$type_dir/$project_name"
cd "$project_dir" || return 1
get_session_name
get_layout
zellij_cmd -s "$session_name" --layout "$layout"
}
create_and_start_project() {
mkdir -p "$project_dir"
cd "$project_dir" || return 1
case "$type" in
script)
echo -e "#!/usr/bin/env bash\necho 'hello world'" >"$project_name.sh"
chmod +x "$project_name.sh"
;;
nix)
echo "Creating Nix project..."
# still need to implement
;;
*)
echo "Unknown project type."
return 1
"Select Project")
get_project_type
select_project
;;
esac
get_session_name
get_layout
zellij_cmd -s "$session_name" --layout "$layout"
}
project_action=$(echo -e "Create Project\nSelect Project" | rofi_cmd "Project action:")
case "$project_action" in
"Create Project")
get_project_type
get_project_name
create_and_start_project
;;
"Select Project")
get_project_type
select_project
;;
esac
}
main() {
main_action=$(echo -e "Projects\nSessions" | rofi_cmd "Choose action:")
case "$main_action" in
"Projects") project_manager ;;
"Sessions") session_manager ;;
*) echo "Invalid option, exiting." ;;
esac
}
main() {
main_action=$(echo -e "Projects\nSessions" | rofi_cmd "Choose action:")
case "$main_action" in
"Projects") project_manager ;;
"Sessions") session_manager ;;
*) echo "Invalid option, exiting." ;;
esac
}
main
'';
main
'';
};
in
{
in {
config = mkIf (multiplexer == "zellij" && launcher == "rofi") {
home.packages = [ zellijmenu ];
home.packages = [zellijmenu];
ooknet.binds.zellijMenu = "zellijmenu -n";
};
}

View file

@ -1,5 +1,4 @@
{ lib, ... }:
{
{lib, ...}: {
imports = [
#./eww
# ./ags
@ -17,5 +16,4 @@
enable = lib.mkEnableOption "Enable waybar bar";
};
};
}

View file

@ -1,15 +1,17 @@
{ config, lib, pkgs, osConfig, ... }:
let
{
config,
lib,
pkgs,
osConfig,
...
}: let
inherit (config.colorscheme) palette;
inherit (lib) mkIf head;
fonts = config.ooknet.fonts;
wayland = config.ooknet.wayland;
monitors = osConfig.ooknet.host.hardware.monitors;
monitorWidth = (head monitors).width - 20;
in
{
monitorWidth = (head monitors).width - 20;
in {
config = mkIf (wayland.bar == "waybar") {
programs.waybar = {
enable = true;
@ -25,9 +27,9 @@ in
margin-top = 10;
margin-bottom = -12;
modules-left = [ "clock" "battery" "hyprland/workspaces" ];
modules-left = ["clock" "battery" "hyprland/workspaces"];
modules-center = [];
modules-right = [ "custom/hyprrecord" "tray" ];
modules-right = ["custom/hyprrecord" "tray"];
"hyprland/workspaces" = let
hyprctl = config.wayland.windowManager.hyprland.package + "/bin/hyprctl";
@ -60,7 +62,7 @@ in
};
bat = "BAT0";
interval = 10;
format-icons = [ "󰁺" "󰁻" "󰁼" "󰁽" "󰁾" "󰁿" "󰂀" "󰂁" "󰂂" "󰁹" ];
format-icons = ["󰁺" "󰁻" "󰁼" "󰁽" "󰁾" "󰁿" "󰂀" "󰂁" "󰂂" "󰁹"];
format = "{icon} {capacity}%";
format-charging = "󱐋{icon} {capacity}%";
tooltip-format = "{timeTo} {power}W";
@ -79,77 +81,81 @@ in
signal = 12;
};
};
style = /* css */ ''
* {
font-family: "${fonts.monospace.family}";
font-size: 19px;
border: solid #${palette.base05};
}
style =
/*
css
*/
''
* {
font-family: "${fonts.monospace.family}";
font-size: 19px;
border: solid #${palette.base05};
}
window#waybar {
background-color: transparent;
margin: 10px;
}
window#waybar {
background-color: transparent;
margin: 10px;
}
#clock,
#battery,
#workspaces {
background-color: #${palette.base00};
padding-right: 10px;
}
#clock,
#battery,
#workspaces {
background-color: #${palette.base00};
padding-right: 10px;
}
#clock {
padding-left: 10px;
border: 2px solid #${palette.base05};
border-right: 0px;
border-top-left-radius: 10px;
}
#clock {
padding-left: 10px;
border: 2px solid #${palette.base05};
border-right: 0px;
border-top-left-radius: 10px;
}
#battery {
padding-left: 10px;
border-top: 2px solid #${palette.base05};
border-bottom: 2px solid #${palette.base05};
border-left: 0px;
}
#battery {
padding-left: 10px;
border-top: 2px solid #${palette.base05};
border-bottom: 2px solid #${palette.base05};
border-left: 0px;
}
#battery.good {
color: #${palette.base0B};
}
#battery.warning {
color: #${palette.base0A};
}
#battery.critical {
color: #${palette.base08};
}
#battery.good {
color: #${palette.base0B};
}
#battery.warning {
color: #${palette.base0A};
}
#battery.critical {
color: #${palette.base08};
}
#tray {
padding-right: 10px;
padding-left: 10px;
background-color: transparent;
border: 0;
}
#tray {
padding-right: 10px;
padding-left: 10px;
background-color: transparent;
border: 0;
}
#workspaces {
border: 2px solid #${palette.base05};
border-left: 0;
border-top-right-radius: 10px;
}
#workspaces {
border: 2px solid #${palette.base05};
border-left: 0;
border-top-right-radius: 10px;
}
#workspace button,
#workspaces button.active,
#workspaces button.visible {
color: #${palette.base0B};
}
#workspace button,
#workspaces button.active,
#workspaces button.visible {
color: #${palette.base0B};
}
#workspaces button.urgent {
color: #${palette.base08};
}
#workspaces button.urgent {
color: #${palette.base08};
}
#custom-hyprrecord {
color: #${palette.base08};
padding-right: 20px;
}
'';
#custom-hyprrecord {
color: #${palette.base08};
padding-right: 20px;
}
'';
};
};
}

View file

@ -1,9 +1,13 @@
{ inputs, lib, config, pkgs, ... }:
let
{
inputs,
lib,
config,
pkgs,
...
}: let
wayland = config.ooknet.wayland;
inherit (lib) mkIf;
in
{
in {
imports = [
inputs.hyprland.homeManagerModules.default
./settings
@ -13,8 +17,8 @@ in
config = mkIf (wayland.compositor == "hyprland") {
home.packages = [
pkgs.hyprpicker
];
];
wayland.windowManager.hyprland = {
enable = true;
package = inputs.hyprland.packages.${pkgs.system}.hyprland;

View file

@ -1,17 +1,18 @@
{ lib, config, pkgs, inputs, ... }:
let
{
lib,
config,
pkgs,
inputs,
...
}: let
inherit (lib) mkIf;
wayland = config.ooknet.wayland;
in
{
in {
config = mkIf (wayland.compositor == "hyprland") {
home.packages = with inputs; [
# Screenshot tool
# Screenshot tool
hyprland-contrib.packages.${pkgs.system}.grimblast
# Screen recording tool
# Screen recording tool
ooks-scripts.packages.${pkgs.system}.hyprrecord
];

View file

@ -1,13 +1,14 @@
{ lib, config, pkgs, ... }:
let
{
lib,
config,
pkgs,
...
}: let
inherit (lib) mkIf;
wayland = config.ooknet.wayland;
in
{
in {
config = mkIf (wayland.compositor == "hyprland") {
home.packages = [ pkgs.hyprshade ];
home.packages = [pkgs.hyprshade];
# TODO: implement hyprshade configuration
};
}

View file

@ -1,13 +1,13 @@
{ config, lib, ... }:
let
{
config,
lib,
...
}: let
wayland = config.ooknet.wayland;
pointer = config.home.pointerCursor;
inherit (config.colorscheme) palette;
inherit (lib) mkIf;
in
{
in {
config = mkIf (wayland.compositor == "hyprland") {
wayland.windowManager.hyprland = {
settings = {
@ -20,14 +20,13 @@ in
border_size = 2;
"col.active_border" = "0xff${palette.base05}";
"col.inactive_border" = "0xff${palette.base02}";
};
};
exec-once = [
"hyprctl setcursor ${pointer.name} ${toString pointer.size}"
];
decoration = {
active_opacity = 1.0;
inactive_opacity = 1.0;
fullscreen_opacity = 1.0;
@ -45,7 +44,7 @@ in
"col.shadow" = "0x44000000";
"col.shadow_inactive" = "0x66000000";
};
animations = {
enabled = false;
};

View file

@ -1,12 +1,12 @@
{ lib, config, ... }:
let
{
lib,
config,
...
}: let
inherit (lib) mkIf;
wayland = config.ooknet.wayland;
binds = config.ooknet.binds;
in
{
in {
config = mkIf (wayland.compositor == "hyprland") {
wayland.windowManager.hyprland.settings = {
bind = [
@ -38,7 +38,7 @@ in
",XF86AudioRaiseVolume, exec, ${binds.volume.up}"
",XF86AudioLowerVolume, exec, ${binds.volume.down}"
",XF86AudioMute, exec, ${binds.volume.mute}"
# Window Management
"SUPER, Q, killactive"
"SUPER CTRL, backspace, killactive"
@ -97,7 +97,7 @@ in
# Lock Screen
"SUPER, Backspace, exec, ${binds.lock}"
];
# Mouse
# Mouse
bindm = [
"SUPER, mouse:272, movewindow"
"SUPER, mouse:273, resizewindow"

View file

@ -1,17 +1,15 @@
{ lib, config, ... }:
let
{
lib,
config,
...
}: let
inherit (lib) mkIf;
wayland = config.ooknet.wayland;
in
{
in {
config = mkIf (wayland.compositor == "hyprland") {
wayland.windowManager.hyprland.settings.env = [
"XDG_SESSION_DESKTOP,hyprland"
"XDG_CURRENT_DESKTOP,hyprland"
];
];
};
}

View file

@ -1,11 +1,12 @@
{ config, lib, pkgs, ... }:
let
{
config,
lib,
pkgs,
...
}: let
inherit (lib) mkIf;
wayland = config.ooknet.wayland;
in
{
in {
config = mkIf (wayland.compositor == "hyprland") {
wayland.windowManager.hyprland.settings = {
exec = [

View file

@ -1,11 +1,11 @@
{ lib, config, ... }:
let
{
lib,
config,
...
}: let
inherit (lib) mkIf;
wayland = config.ooknet.wayland;
in
{
in {
config = mkIf (wayland.compositor == "hyprland") {
wayland.windowManager.hyprland.settings.gestures = {
workspace_swipe = true;

View file

@ -1,12 +1,12 @@
{ lib, config, ... }:
let
{
lib,
config,
...
}: let
inherit (lib) mkIf;
wayland = config.ooknet.wayland;
wallpaperPath = config.ooknet.wallpaper.path;
in
{
in {
config = mkIf (wayland.compositor == "hyprland") {
services.hyprpaper = {
enable = true;

View file

@ -1,11 +1,11 @@
{ lib, config, ... }:
let
{
lib,
config,
...
}: let
inherit (lib) mkIf;
wayland = config.ooknet.wayland;
in
{
in {
config = mkIf (wayland.compositor == "hyprland") {
wayland.windowManager.hyprland.settings.input = {
kb_layout = "us";
@ -14,5 +14,4 @@ in
mouse_refocus = false;
};
};
}

View file

@ -1,11 +1,11 @@
{ lib, config, ... }:
let
{
lib,
config,
...
}: let
inherit (lib) mkIf;
wayland = config.ooknet.wayland;
in
{
in {
config = mkIf (wayland.compositor == "hyprland") {
wayland.windowManager.hyprland.settings.misc = {
mouse_move_enables_dpms = true;
@ -19,4 +19,4 @@ in
focus_on_activate = true;
};
};
}
}

View file

@ -1,22 +1,34 @@
{ lib, config, osConfig, ... }:
let
{
lib,
config,
osConfig,
...
}: let
inherit (lib) mkIf concatMap;
wayland = config.ooknet.wayland;
monitors = osConfig.ooknet.host.hardware.monitors;
in
{
in {
config = mkIf (wayland.compositor == "hyprland") {
wayland.windowManager.hyprland.settings = {
monitor = concatMap (m: let
resolution = "${toString m.width}x${toString m.height}@${toString m.refreshRate}";
position = "${toString m.x}x${toString m.y}";
basicConfig = "${m.name},${if m.enabled then "${resolution},${position},1" else "disable"}";
in
[ basicConfig ] ++ (if m.transform != 0 then ["${m.name},transform,${toString m.transform}"] else [])
) (monitors);
monitor =
concatMap (
m: let
resolution = "${toString m.width}x${toString m.height}@${toString m.refreshRate}";
position = "${toString m.x}x${toString m.y}";
basicConfig = "${m.name},${
if m.enabled
then "${resolution},${position},1"
else "disable"
}";
in
[basicConfig]
++ (
if m.transform != 0
then ["${m.name},transform,${toString m.transform}"]
else []
)
)
monitors;
};
};
}

View file

@ -1,11 +1,11 @@
{ lib, config, ... }:
let
{
lib,
config,
...
}: let
inherit (lib) mkIf;
wayland = config.ooknet.wayland;
in
{
in {
config = mkIf (wayland.compositor == "hyprland") {
wayland.windowManager.hyprland.settings = {
windowrulev2 = [
@ -26,7 +26,7 @@ in
"stayfocused,title:^(BTOP)$"
# Tearing
"immediate, title:^(TEKKEN8)$"
"immediate, title:^(TEKKEN8)$"
];
};
};

View file

@ -1,12 +1,13 @@
{ lib, config, pkgs, ... }:
let
{
lib,
config,
pkgs,
...
}: let
inherit (lib) mkIf;
fonts = config.ooknet.fonts;
wayland = config.ooknet.wayland;
in
{
in {
config = mkIf (wayland.launcher == "rofi") {
programs.rofi = {
enable = true;
@ -14,7 +15,7 @@ in
package = pkgs.rofi-wayland;
terminal = "${config.home.sessionVariables.TERMINAL}";
theme = let
inherit (config.colorscheme ) palette;
inherit (config.colorscheme) palette;
inherit (config.lib.formats.rasi) mkLiteral;
in {
"*" = {

View file

@ -1,41 +1,45 @@
{ lib, config, pkgs, ... }:
let
{
lib,
config,
pkgs,
...
}: let
inherit (config.colorscheme) palette;
inherit (lib) mkIf;
wayland = config.ooknet.wayland;
fonts = config.ooknet.fonts;
in
{
in {
config = mkIf (wayland.launcher == "tofi") {
home.packages = [pkgs.tofi];
xdg.configFile."tofi/config".text = /* config */ ''
history = false
clip-to-padding = false
horizontal = true
width = 40%
height = 35
anchor = top-left
margin-top = 5
margin-left = 25%
num-results = 1
border-width = 0
outline-width = 0
result-spacing = 10
selection-background-padding = 30
prompt-padding = 10
font = "${fonts.monospace.family}"
font-size = 14
prompt-text = " "
background-color = #0000
prompt-background = #0000
prompt-color = ${palette.base0B}
input-color = ${palette.base05}
placeholder-color = ${palette.base03}
default-result-color = ${palette.base03}
selection-color = ${palette.base04}
'';
xdg.configFile."tofi/config".text =
/*
config
*/
''
history = false
clip-to-padding = false
horizontal = true
width = 40%
height = 35
anchor = top-left
margin-top = 5
margin-left = 25%
num-results = 1
border-width = 0
outline-width = 0
result-spacing = 10
selection-background-padding = 30
prompt-padding = 10
font = "${fonts.monospace.family}"
font-size = 14
prompt-text = " "
background-color = #0000
prompt-background = #0000
prompt-color = ${palette.base0B}
input-color = ${palette.base05}
placeholder-color = ${palette.base03}
default-result-color = ${palette.base03}
selection-color = ${palette.base04}
'';
};
}

View file

@ -4,4 +4,3 @@
./hyprlock.nix
];
}

View file

@ -1,13 +1,13 @@
{ lib, config, ... }:
let
{
lib,
config,
...
}: let
inherit (config.colorscheme) palette;
inherit (lib) mkIf;
wayland = config.ooknet.wayland;
fonts = config.ooknet.fonts;
in
{
in {
config = mkIf (wayland.locker == "hyprlock") {
ooknet.binds.lock = "hyprlock";
programs.hyprlock = {
@ -29,7 +29,7 @@ in
size = {
width = 300;
height = 40;
};
};
position = {
x = 0;
y = 0;
@ -49,7 +49,7 @@ in
text = " ";
position = {
x = 0;
y = 80;
y = 80;
};
color = "0xff${palette.base08}";
font_size = 30;
@ -60,7 +60,7 @@ in
text = "$TIME";
position = {
x = 0;
y = -80;
y = -80;
};
color = "0xff${palette.base0B}";
font_size = 20;

View file

@ -1,13 +1,14 @@
{ config, lib, ... }:
let
{
config,
lib,
...
}: let
inherit (config.colorscheme) palette;
inherit (lib) mkIf;
fonts = config.ooknet.fonts;
wallpaperPath = config.ooknet.wallpaper.path;
wayland = config.ooknet.wayland;
in
{
in {
config = mkIf (wayland.locker == "swaylock") {
ooknet.binds.lock = "swaylock";
programs.swaylock = {

View file

@ -1,21 +1,20 @@
{ config, lib, ... }:
let
{
config,
lib,
...
}: let
inherit (config.colorscheme) palette variant;
inherit (lib) mkIf;
fonts = config.ooknet.fonts;
wayland = config.ooknet.wayland;
in
{
in {
config = mkIf (wayland.notification == "mako") {
services.mako = {
services.mako = {
enable = true;
iconPath =
if variant == "dark" then
"${config.gtk.iconTheme.package}/share/icons/Papirus-Dark"
else
"${config.gtk.iconTheme.package}/share/icons/Papirus-Light";
if variant == "dark"
then "${config.gtk.iconTheme.package}/share/icons/Papirus-Dark"
else "${config.gtk.iconTheme.package}/share/icons/Papirus-Light";
font = "${fonts.regular.family} 12";
padding = "10,10";
anchor = "top-right";
@ -41,4 +40,3 @@ in
};
};
}

View file

@ -1,11 +1,11 @@
{ lib, config, ... }:
let
{
lib,
config,
...
}: let
inherit (lib) mkIf;
cfg = config.ooknet.wayland;
in
{
in {
config = mkIf cfg.enable {
services.gammastep = {
enable = true;

View file

@ -1,11 +1,12 @@
{ lib, config, pkgs, ... }:
let
{
lib,
config,
pkgs,
...
}: let
inherit (lib) mkIf;
cfg = config.ooknet.wayland;
in
{
in {
config = lib.mkIf cfg.enable {
home = {
packages = with pkgs; [
@ -17,7 +18,7 @@ in
wl-clipboard
];
};
systemd.user.targets.tray = {
Unit = {
Description = "Home Manager System Tray";

View file

@ -1,30 +1,33 @@
{ lib, config, osConfig, ... }:
let
{
lib,
config,
osConfig,
...
}: let
inherit (lib) mkIf;
cfg = config.ooknet.wayland;
gpu = osConfig.ooknet.host.hardware.gpu;
in
{
in {
config = mkIf cfg.enable {
home.sessionVariables = {
CLUTTER_BACKEND = "wayland";
NIXOS_OZONE_WL = "1";
GDK_BACKEND = "wayland";
QT_QPA_PLATFORM = "wayland";
QT_WAYLAND_DISABLE_WINDOWDECORATION = "1";
DISABLE_QT5_COMPAT = "0";
QT_AUTO_SCREEN_SCALE_FACTOR = "1";
MOZ_ENABLE_WAYLAND = "1";
MOZ_DBUS_REMOTE = "1";
XDG_SESSION_TYPE = "wayland";
SDL_VIDEODRIVER = "wayland";
} // mkIf (gpu == "nvidia") {
LIBVA_DRIVER_NAME = "nvidia";
GBM_BACKEND = "nvidia-drm";
__GLX_VENDOR_LIBRARY_NAME = "nvidia";
WLR_NO_HARDWARE_CURSORS = "1";
};
home.sessionVariables =
{
CLUTTER_BACKEND = "wayland";
NIXOS_OZONE_WL = "1";
GDK_BACKEND = "wayland";
QT_QPA_PLATFORM = "wayland";
QT_WAYLAND_DISABLE_WINDOWDECORATION = "1";
DISABLE_QT5_COMPAT = "0";
QT_AUTO_SCREEN_SCALE_FACTOR = "1";
MOZ_ENABLE_WAYLAND = "1";
MOZ_DBUS_REMOTE = "1";
XDG_SESSION_TYPE = "wayland";
SDL_VIDEODRIVER = "wayland";
}
// mkIf (gpu == "nvidia") {
LIBVA_DRIVER_NAME = "nvidia";
GBM_BACKEND = "nvidia-drm";
__GLX_VENDOR_LIBRARY_NAME = "nvidia";
WLR_NO_HARDWARE_CURSORS = "1";
};
};
}