What a clusterfuck
This commit is contained in:
parent
91f88b8bb2
commit
f29273be22
221 changed files with 779 additions and 956 deletions
11
modules/home/default.nix
Normal file
11
modules/home/default.nix
Normal file
|
@ -0,0 +1,11 @@
|
|||
{ ... }:
|
||||
{
|
||||
imports = [
|
||||
./users
|
||||
];
|
||||
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
# https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
|
||||
home.stateVersion = "24.05";
|
||||
}
|
BIN
modules/home/files/assets/user-icon.png
Normal file
BIN
modules/home/files/assets/user-icon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 86 KiB |
BIN
modules/home/files/assets/wallpapers/1.png
Normal file
BIN
modules/home/files/assets/wallpapers/1.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2 MiB |
BIN
modules/home/files/assets/wallpapers/2.png
Normal file
BIN
modules/home/files/assets/wallpapers/2.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.3 MiB |
BIN
modules/home/files/assets/wallpapers/3.png
Normal file
BIN
modules/home/files/assets/wallpapers/3.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.9 MiB |
BIN
modules/home/files/assets/wallpapers/lock.png
Normal file
BIN
modules/home/files/assets/wallpapers/lock.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 314 KiB |
17
modules/home/files/default.nix
Normal file
17
modules/home/files/default.nix
Normal file
|
@ -0,0 +1,17 @@
|
|||
{pkgs, ...}: {
|
||||
home.file = {
|
||||
".face" = {
|
||||
source = ./assets/user-icon.png;
|
||||
};
|
||||
".wallpapers" = {
|
||||
source = ./assets/wallpapers;
|
||||
recursive = true;
|
||||
};
|
||||
".icons/default" = {
|
||||
source = "${pkgs.simp1e-cursors}/share/icons/Simp1e-Dark";
|
||||
};
|
||||
".alsoftrc" = {
|
||||
text = ''drivers=pulse'';
|
||||
};
|
||||
};
|
||||
}
|
8
modules/home/programs/default.nix
Normal file
8
modules/home/programs/default.nix
Normal file
|
@ -0,0 +1,8 @@
|
|||
{ ... }:
|
||||
{
|
||||
imports = [
|
||||
./gui
|
||||
./terminal
|
||||
./misc
|
||||
];
|
||||
}
|
13
modules/home/programs/gui/default.nix
Normal file
13
modules/home/programs/gui/default.nix
Normal file
|
@ -0,0 +1,13 @@
|
|||
{ ... }:
|
||||
{
|
||||
imports = [
|
||||
./easyeffects
|
||||
./foot
|
||||
./librewolf
|
||||
./mako
|
||||
./mangohud
|
||||
./mpv
|
||||
./pcmanfm-qt
|
||||
./rofi
|
||||
];
|
||||
}
|
294
modules/home/programs/gui/easyeffects/JimHeadphones.json
Normal file
294
modules/home/programs/gui/easyeffects/JimHeadphones.json
Normal file
|
@ -0,0 +1,294 @@
|
|||
{
|
||||
"output": {
|
||||
"blocklist": [],
|
||||
"crystalizer#0": {
|
||||
"band0": {
|
||||
"bypass": false,
|
||||
"intensity": 0.0,
|
||||
"mute": false
|
||||
},
|
||||
"band1": {
|
||||
"bypass": false,
|
||||
"intensity": -1.0,
|
||||
"mute": false
|
||||
},
|
||||
"band2": {
|
||||
"bypass": false,
|
||||
"intensity": -2.0,
|
||||
"mute": false
|
||||
},
|
||||
"band3": {
|
||||
"bypass": false,
|
||||
"intensity": -3.0,
|
||||
"mute": false
|
||||
},
|
||||
"band4": {
|
||||
"bypass": false,
|
||||
"intensity": -4.0,
|
||||
"mute": false
|
||||
},
|
||||
"band5": {
|
||||
"bypass": false,
|
||||
"intensity": -5.0,
|
||||
"mute": false
|
||||
},
|
||||
"band6": {
|
||||
"bypass": false,
|
||||
"intensity": -6.0,
|
||||
"mute": false
|
||||
},
|
||||
"band7": {
|
||||
"bypass": false,
|
||||
"intensity": -7.0,
|
||||
"mute": false
|
||||
},
|
||||
"band8": {
|
||||
"bypass": false,
|
||||
"intensity": -8.0,
|
||||
"mute": false
|
||||
},
|
||||
"band9": {
|
||||
"bypass": false,
|
||||
"intensity": -9.0,
|
||||
"mute": false
|
||||
},
|
||||
"band10": {
|
||||
"bypass": false,
|
||||
"intensity": -10.0,
|
||||
"mute": false
|
||||
},
|
||||
"band11": {
|
||||
"bypass": false,
|
||||
"intensity": -11.0,
|
||||
"mute": false
|
||||
},
|
||||
"band12": {
|
||||
"bypass": false,
|
||||
"intensity": -12.0,
|
||||
"mute": false
|
||||
},
|
||||
"bypass": false,
|
||||
"input-gain": 0.0,
|
||||
"output-gain": 0.0
|
||||
},
|
||||
"equalizer#0": {
|
||||
"balance": 0.0,
|
||||
"bypass": false,
|
||||
"input-gain": 0.0,
|
||||
"left": {
|
||||
"band0": {
|
||||
"frequency": 32.0,
|
||||
"gain": 1.1,
|
||||
"mode": "RLC (BT)",
|
||||
"mute": false,
|
||||
"q": 4.36,
|
||||
"slope": "x1",
|
||||
"solo": false,
|
||||
"type": "Bell"
|
||||
},
|
||||
"band1": {
|
||||
"frequency": 64.0,
|
||||
"gain": 1.16,
|
||||
"mode": "RLC (BT)",
|
||||
"mute": false,
|
||||
"q": 4.36,
|
||||
"slope": "x1",
|
||||
"solo": false,
|
||||
"type": "Bell"
|
||||
},
|
||||
"band2": {
|
||||
"frequency": 125.0,
|
||||
"gain": 3.33,
|
||||
"mode": "RLC (BT)",
|
||||
"mute": false,
|
||||
"q": 4.36,
|
||||
"slope": "x1",
|
||||
"solo": false,
|
||||
"type": "Bell"
|
||||
},
|
||||
"band3": {
|
||||
"frequency": 250.0,
|
||||
"gain": 1.53,
|
||||
"mode": "RLC (BT)",
|
||||
"mute": false,
|
||||
"q": 4.36,
|
||||
"slope": "x1",
|
||||
"solo": false,
|
||||
"type": "Bell"
|
||||
},
|
||||
"band4": {
|
||||
"frequency": 500.0,
|
||||
"gain": -1.83,
|
||||
"mode": "RLC (BT)",
|
||||
"mute": false,
|
||||
"q": 4.36,
|
||||
"slope": "x1",
|
||||
"solo": false,
|
||||
"type": "Bell"
|
||||
},
|
||||
"band5": {
|
||||
"frequency": 1000.0,
|
||||
"gain": -0.58,
|
||||
"mode": "RLC (BT)",
|
||||
"mute": false,
|
||||
"q": 4.36,
|
||||
"slope": "x1",
|
||||
"solo": false,
|
||||
"type": "Bell"
|
||||
},
|
||||
"band6": {
|
||||
"frequency": 2000.0,
|
||||
"gain": 1.42,
|
||||
"mode": "RLC (BT)",
|
||||
"mute": false,
|
||||
"q": 4.36,
|
||||
"slope": "x1",
|
||||
"solo": false,
|
||||
"type": "Bell"
|
||||
},
|
||||
"band7": {
|
||||
"frequency": 4000.0,
|
||||
"gain": 4.73,
|
||||
"mode": "RLC (BT)",
|
||||
"mute": false,
|
||||
"q": 4.36,
|
||||
"slope": "x1",
|
||||
"solo": false,
|
||||
"type": "Bell"
|
||||
},
|
||||
"band8": {
|
||||
"frequency": 16000.0,
|
||||
"gain": 7.62,
|
||||
"mode": "RLC (BT)",
|
||||
"mute": false,
|
||||
"q": 4.36,
|
||||
"slope": "x1",
|
||||
"solo": false,
|
||||
"type": "Bell"
|
||||
},
|
||||
"band9": {
|
||||
"frequency": 156.38,
|
||||
"gain": 2.84,
|
||||
"mode": "RLC (BT)",
|
||||
"mute": false,
|
||||
"q": 4.36,
|
||||
"slope": "x1",
|
||||
"solo": false,
|
||||
"type": "Bell"
|
||||
}
|
||||
},
|
||||
"mode": "IIR",
|
||||
"num-bands": 10,
|
||||
"output-gain": 0.0,
|
||||
"pitch-left": 0.0,
|
||||
"pitch-right": 0.0,
|
||||
"right": {
|
||||
"band0": {
|
||||
"frequency": 32.0,
|
||||
"gain": 1.1,
|
||||
"mode": "RLC (BT)",
|
||||
"mute": false,
|
||||
"q": 4.36,
|
||||
"slope": "x1",
|
||||
"solo": false,
|
||||
"type": "Bell"
|
||||
},
|
||||
"band1": {
|
||||
"frequency": 64.0,
|
||||
"gain": 1.16,
|
||||
"mode": "RLC (BT)",
|
||||
"mute": false,
|
||||
"q": 4.36,
|
||||
"slope": "x1",
|
||||
"solo": false,
|
||||
"type": "Bell"
|
||||
},
|
||||
"band2": {
|
||||
"frequency": 125.0,
|
||||
"gain": 3.33,
|
||||
"mode": "RLC (BT)",
|
||||
"mute": false,
|
||||
"q": 4.36,
|
||||
"slope": "x1",
|
||||
"solo": false,
|
||||
"type": "Bell"
|
||||
},
|
||||
"band3": {
|
||||
"frequency": 250.0,
|
||||
"gain": 1.53,
|
||||
"mode": "RLC (BT)",
|
||||
"mute": false,
|
||||
"q": 4.36,
|
||||
"slope": "x1",
|
||||
"solo": false,
|
||||
"type": "Bell"
|
||||
},
|
||||
"band4": {
|
||||
"frequency": 500.0,
|
||||
"gain": -1.83,
|
||||
"mode": "RLC (BT)",
|
||||
"mute": false,
|
||||
"q": 4.36,
|
||||
"slope": "x1",
|
||||
"solo": false,
|
||||
"type": "Bell"
|
||||
},
|
||||
"band5": {
|
||||
"frequency": 1000.0,
|
||||
"gain": -0.58,
|
||||
"mode": "RLC (BT)",
|
||||
"mute": false,
|
||||
"q": 4.36,
|
||||
"slope": "x1",
|
||||
"solo": false,
|
||||
"type": "Bell"
|
||||
},
|
||||
"band6": {
|
||||
"frequency": 2000.0,
|
||||
"gain": 1.42,
|
||||
"mode": "RLC (BT)",
|
||||
"mute": false,
|
||||
"q": 4.36,
|
||||
"slope": "x1",
|
||||
"solo": false,
|
||||
"type": "Bell"
|
||||
},
|
||||
"band7": {
|
||||
"frequency": 4000.0,
|
||||
"gain": 4.73,
|
||||
"mode": "RLC (BT)",
|
||||
"mute": false,
|
||||
"q": 4.36,
|
||||
"slope": "x1",
|
||||
"solo": false,
|
||||
"type": "Bell"
|
||||
},
|
||||
"band8": {
|
||||
"frequency": 16000.0,
|
||||
"gain": 7.62,
|
||||
"mode": "RLC (BT)",
|
||||
"mute": false,
|
||||
"q": 4.36,
|
||||
"slope": "x1",
|
||||
"solo": false,
|
||||
"type": "Bell"
|
||||
},
|
||||
"band9": {
|
||||
"frequency": 156.38,
|
||||
"gain": 2.84,
|
||||
"mode": "RLC (BT)",
|
||||
"mute": false,
|
||||
"q": 4.36,
|
||||
"slope": "x1",
|
||||
"solo": false,
|
||||
"type": "Bell"
|
||||
}
|
||||
},
|
||||
"split-channels": false
|
||||
},
|
||||
"plugins_order": [
|
||||
"equalizer#0",
|
||||
"crystalizer#0"
|
||||
]
|
||||
}
|
||||
}
|
11
modules/home/programs/gui/easyeffects/default.nix
Normal file
11
modules/home/programs/gui/easyeffects/default.nix
Normal file
|
@ -0,0 +1,11 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
home = {
|
||||
packages = with pkgs; [
|
||||
easyeffects
|
||||
];
|
||||
file = {
|
||||
".config/easyeffects/output/JimHeadphones.json".source = ./JimHeadphones.json;
|
||||
};
|
||||
};
|
||||
}
|
39
modules/home/programs/gui/foot/default.nix
Normal file
39
modules/home/programs/gui/foot/default.nix
Normal file
|
@ -0,0 +1,39 @@
|
|||
{ outputs, ... }:
|
||||
{
|
||||
programs.foot = {
|
||||
enable = true;
|
||||
server.enable = false;
|
||||
settings = {
|
||||
main = {
|
||||
term = "xterm-256color";
|
||||
font = "${outputs.look.fonts.nerd}:size=14.7";
|
||||
};
|
||||
cursor = {
|
||||
style = "beam";
|
||||
};
|
||||
colors = {
|
||||
alpha = "0.65";
|
||||
background = "${outputs.look.colors.dark}";
|
||||
regular0 = "3f3f3f";
|
||||
regular1 = "cc0000";
|
||||
regular2 = "4e9a06";
|
||||
regular3 = "c4a000";
|
||||
regular4 = "94bff3";
|
||||
regular5 = "85678f";
|
||||
regular6 = "06989a";
|
||||
regular7 = "dcdccc";
|
||||
bright0 = "545454";
|
||||
bright1 = "fc5454";
|
||||
bright2 = "8ae234";
|
||||
bright3 = "fce94f";
|
||||
bright4 = "94bff3";
|
||||
bright5 = "b294bb";
|
||||
bright6 = "93e0e3";
|
||||
bright7 = "ffffff";
|
||||
};
|
||||
key-bindings = {
|
||||
search-start = "Control+f";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
424
modules/home/programs/gui/librewolf/default.nix
Normal file
424
modules/home/programs/gui/librewolf/default.nix
Normal file
|
@ -0,0 +1,424 @@
|
|||
{ pkgs, config, outputs, ... }:
|
||||
let
|
||||
# FireFox colors
|
||||
themeJim = ''
|
||||
:root {
|
||||
--tab-active-bg-color: #${outputs.look.colors.prime};
|
||||
--tab-hover-bg-color: #${outputs.look.colors.accent};
|
||||
--tab-inactive-bg-color: #${outputs.look.colors.dark};
|
||||
--tab-active-fg-fallback-color: #FFFFFF;
|
||||
--tab-inactive-fg-fallback-color: #${outputs.look.colors.text};
|
||||
--urlbar-focused-bg-color: #${outputs.look.colors.dark};
|
||||
--urlbar-not-focused-bg-color: #${outputs.look.colors.dark};
|
||||
--toolbar-bgcolor: #${outputs.look.colors.dark} !important;
|
||||
'';
|
||||
themeAlt = ''
|
||||
:root {
|
||||
--tab-active-bg-color: #${outputs.look.colors.dark};
|
||||
--tab-hover-bg-color: #${outputs.look.colors.accent};
|
||||
--tab-inactive-bg-color: #${outputs.look.colors.prime};
|
||||
--tab-active-fg-fallback-color: #${outputs.look.colors.text};
|
||||
--tab-inactive-fg-fallback-color: #FFFFFF;
|
||||
--urlbar-focused-bg-color: #${outputs.look.colors.prime};
|
||||
--urlbar-not-focused-bg-color: #${outputs.look.colors.prime};
|
||||
--toolbar-bgcolor: #${outputs.look.colors.prime} !important;
|
||||
'';
|
||||
quteFoxCSS = ''
|
||||
--tab-font: '${outputs.look.fonts.main}';
|
||||
--urlbar-font: '${outputs.look.fonts.main}';
|
||||
|
||||
/* try increasing if you encounter problems */
|
||||
--urlbar-height-setting: 24px;
|
||||
--tab-min-height: 20px !important;
|
||||
|
||||
/* I don't recommend you touch this */
|
||||
--arrowpanel-menuitem-padding: 2px !important;
|
||||
--arrowpanel-border-radius: 0px !important;
|
||||
--arrowpanel-menuitem-border-radius: 0px !important;
|
||||
--toolbarbutton-border-radius: 0px !important;
|
||||
--toolbarbutton-inner-padding: 0px 2px !important;
|
||||
--toolbar-field-focus-background-color: var(--urlbar-focused-bg-color) !important;
|
||||
--toolbar-field-background-color: var(--urlbar-not-focused-bg-color) !important;
|
||||
--toolbar-field-focus-border-color: transparent !important;
|
||||
}
|
||||
|
||||
/* --- General debloat ------------------------------ */
|
||||
|
||||
/* bottom left page loading status or url preview */
|
||||
#statuspanel { display: none !important; }
|
||||
|
||||
/* remove radius from right-click popup */
|
||||
menupopup, panel { --panel-border-radius: 0px !important; }
|
||||
menu, menuitem, menucaption { border-radius: 0px !important; }
|
||||
|
||||
/* no large buttons in right-click menu */
|
||||
menupopup > #context-navigation { display: none !important; }
|
||||
menupopup > #context-sep-navigation { display: none !important; }
|
||||
|
||||
/* --- Debloat navbar ------------------------------- */
|
||||
|
||||
#back-button { display: none; }
|
||||
#forward-button { display: none; }
|
||||
#reload-button { display: none; }
|
||||
#stop-button { display: none; }
|
||||
#home-button { display: none; }
|
||||
#library-button { display: none; }
|
||||
#fxa-toolbar-menu-button { display: none; }
|
||||
/* empty space before and after the url bar */
|
||||
#customizableui-special-spring1, #customizableui-special-spring2 { display: none; }
|
||||
|
||||
/* --- Style navbar -------------------------------- */
|
||||
|
||||
/* remove padding between toolbar buttons */
|
||||
toolbar .toolbarbutton-1 { padding: 0 0 !important; }
|
||||
|
||||
#urlbar-container {
|
||||
--urlbar-container-height: var(--urlbar-height-setting) !important;
|
||||
margin-left: 0 !important;
|
||||
margin-right: 0 !important;
|
||||
padding-top: 0 !important;
|
||||
padding-bottom: 0 !important;
|
||||
font-family: var(--urlbar-font, 'monospace');
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
#urlbar {
|
||||
--urlbar-height: var(--urlbar-height-setting) !important;
|
||||
--urlbar-toolbar-height: var(--urlbar-height-setting) !important;
|
||||
min-height: var(--urlbar-height-setting) !important;
|
||||
border-color: var(--lwt-toolbar-field-border-color, hsla(240,5%,5%,.25)) !important;
|
||||
}
|
||||
|
||||
#urlbar-input {
|
||||
margin-left: 0.8em !important;
|
||||
margin-right: 0.4em !important;
|
||||
}
|
||||
|
||||
#navigator-toolbox {
|
||||
border: none !important;
|
||||
}
|
||||
|
||||
/* keep pop-up menus from overlapping with navbar */
|
||||
#widget-overflow { margin: 0 !important; }
|
||||
#appmenu-popup { margin: 0 !important; }
|
||||
#customizationui-widget-panel { margin: 0 !important; }
|
||||
#unified-extensions-panel { margin: 0 !important; }
|
||||
|
||||
/* --- Unified extensions button -------------------- */
|
||||
|
||||
/* make extension icons smaller */
|
||||
#unified-extensions-view {
|
||||
--uei-icon-size: 18px;
|
||||
}
|
||||
|
||||
/* hide bloat */
|
||||
.unified-extensions-item-message-deck,
|
||||
#unified-extensions-view > .panel-header,
|
||||
#unified-extensions-view > toolbarseparator,
|
||||
#unified-extensions-manage-extensions {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
/* add 3px padding on the top and the bottom of the box */
|
||||
.panel-subview-body {
|
||||
padding: 3px 0px !important;
|
||||
}
|
||||
|
||||
#unified-extensions-view .unified-extensions-item-menu-button {
|
||||
margin-inline-end: 0 !important;
|
||||
}
|
||||
|
||||
#unified-extensions-view .toolbarbutton-icon {
|
||||
padding: 0 !important;
|
||||
}
|
||||
|
||||
.unified-extensions-item-contents {
|
||||
line-height: 1 !important;
|
||||
white-space: nowrap !important;
|
||||
}
|
||||
|
||||
/* --- Debloat URL bar ------------------------------- */
|
||||
|
||||
#identity-box { display: none; }
|
||||
#pageActionButton { display: none; }
|
||||
#pocket-button { display: none; }
|
||||
#urlbar-zoom-button { display: none; }
|
||||
#tracking-protection-icon-container { display: none !important; }
|
||||
#reader-mode-button{ display: none !important; }
|
||||
#star-button { display: none; }
|
||||
#star-button-box:hover { background: inherit !important; }
|
||||
|
||||
/* Go to arrow button at the end of the urlbar when searching */
|
||||
#urlbar-go-button { display: none; }
|
||||
|
||||
/* remove container indicator from urlbar */
|
||||
#userContext-label, #userContext-indicator { display: none !important;}
|
||||
|
||||
/* --- Style tab toolbar ---------------------------- */
|
||||
|
||||
#titlebar {
|
||||
--proton-tab-block-margin: 0px !important;
|
||||
--tab-block-margin: 0px !important;
|
||||
}
|
||||
|
||||
#TabsToolbar, .tabbrowser-tab {
|
||||
max-height: var(--tab-min-height) !important;
|
||||
font-size: 14px !important;
|
||||
outline: none !important;
|
||||
}
|
||||
|
||||
/* Change color of normal tabs */
|
||||
tab:not([selected="true"]) {
|
||||
background-color: var(--tab-inactive-bg-color) !important;
|
||||
color: var(--identity-icon-color, var(--tab-inactive-fg-fallback-color)) !important;
|
||||
}
|
||||
|
||||
tab {
|
||||
font-family: var(--tab-font, monospace);
|
||||
border: none !important;
|
||||
}
|
||||
|
||||
/* safari style tab width */
|
||||
.tabbrowser-tab[fadein] {
|
||||
max-width: 100vw !important;
|
||||
border: none
|
||||
}
|
||||
|
||||
/* Hide close button on tabs */
|
||||
#tabbrowser-tabs .tabbrowser-tab .tab-close-button { display: none !important; }
|
||||
|
||||
.tabbrowser-tab {
|
||||
/* remove border between tabs */
|
||||
padding-inline: 0px !important;
|
||||
/* reduce fade effect of tab text */
|
||||
--tab-label-mask-size: 1em !important;
|
||||
/* fix pinned tab behaviour on overflow */
|
||||
overflow-clip-margin: 0px !important;
|
||||
}
|
||||
|
||||
/* Tab: selected colors */
|
||||
#tabbrowser-tabs .tabbrowser-tab[selected] .tab-content {
|
||||
background: var(--tab-active-bg-color) !important;
|
||||
color: var(--identity-icon-color, var(--tab-active-fg-fallback-color)) !important;
|
||||
}
|
||||
|
||||
/* Tab: hovered colors */
|
||||
#tabbrowser-tabs .tabbrowser-tab:hover:not([selected]) .tab-content {
|
||||
background: var(--tab-hover-bg-color) !important;
|
||||
}
|
||||
|
||||
/* hide window controls */
|
||||
.titlebar-buttonbox-container { display: none; }
|
||||
|
||||
/* remove titlebar spacers */
|
||||
.titlebar-spacer { display: none !important; }
|
||||
|
||||
/* disable tab shadow */
|
||||
#tabbrowser-tabs:not([noshadowfortests]) .tab-background:is([selected], [multiselected]) {
|
||||
box-shadow: none !important;
|
||||
}
|
||||
|
||||
/* remove dark space between pinned tab and first non-pinned tab */
|
||||
#tabbrowser-tabs[haspinnedtabs]:not([positionpinnedtabs]) >
|
||||
#tabbrowser-arrowscrollbox >
|
||||
.tabbrowser-tab:nth-child(1 of :not([pinned], [hidden])) {
|
||||
margin-inline-start: 0px !important;
|
||||
}
|
||||
|
||||
/* remove dropdown menu button which displays all tabs on overflow */
|
||||
#alltabs-button { display: none !important }
|
||||
|
||||
/* fix displaying of pinned tabs on overflow */
|
||||
#tabbrowser-tabs:not([secondarytext-unsupported]) .tab-label-container {
|
||||
height: var(--tab-min-height) !important;
|
||||
}
|
||||
|
||||
/* remove overflow scroll buttons */
|
||||
#scrollbutton-up, #scrollbutton-down { display: none !important; }
|
||||
|
||||
/* remove new tab button */
|
||||
#tabs-newtab-button {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
/* --- Autohide Navbar ------------------------------ */
|
||||
|
||||
/* hide navbar unless focused */
|
||||
#nav-bar {
|
||||
min-height: 0 !important;
|
||||
max-height: 0 !important;
|
||||
height: 0 !important;
|
||||
--moz-transform: scaleY(0) !important;
|
||||
transform: scaleY(0) !important;
|
||||
}
|
||||
|
||||
/* show on focus */
|
||||
#nav-bar:focus-within {
|
||||
--moz-transform: scale(1) !important;
|
||||
transform: scale(1) !important;
|
||||
max-height: var(--urlbar-height-setting) !important;
|
||||
height: var(--urlbar-height-setting) !important;
|
||||
min-height: var(--urlbar-height-setting) !important;
|
||||
}
|
||||
|
||||
#navigator-toolbox:focus-within > .browser-toolbar {
|
||||
transform: translateY(0);
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
/* --- Hide tab bar on single tab ------------------- */
|
||||
|
||||
#tabbrowser-tabs .tabbrowser-tab:only-of-type,
|
||||
#tabbrowser-tabs .tabbrowser-tab:only-of-type + #tabbrowser-arrowscrollbox-periphery{
|
||||
display:none !important;
|
||||
}
|
||||
#tabbrowser-tabs, #tabbrowser-arrowscrollbox {min-height:0!important;}
|
||||
#alltabs-button {display:none !important;}
|
||||
|
||||
/* --- Prevent tab folding -------------------------- */
|
||||
|
||||
.tabbrowser-tab {
|
||||
min-width: initial !important;
|
||||
}
|
||||
.tab-content {
|
||||
overflow: hidden !important;
|
||||
}
|
||||
'';
|
||||
in {
|
||||
# Enable Librewolf and extensions
|
||||
programs.firefox = let
|
||||
commonExtensions = with config.nur.repos.rycee.firefox-addons; [
|
||||
ublock-origin
|
||||
bitwarden
|
||||
darkreader
|
||||
sponsorblock
|
||||
return-youtube-dislikes
|
||||
simple-tab-groups
|
||||
no-pdf-download
|
||||
];
|
||||
commonSearch = {
|
||||
force = true;
|
||||
default = "Google";
|
||||
engines = {
|
||||
"Google" = {
|
||||
urls = [
|
||||
{
|
||||
template = "https://www.google.com/search";
|
||||
params = [
|
||||
{
|
||||
name = "q";
|
||||
value = "{searchTerms}";
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
definedAliases = ["@g"];
|
||||
};
|
||||
"NixPKGs" = {
|
||||
urls = [
|
||||
{
|
||||
template = "https://search.nixos.org/packages";
|
||||
params = [
|
||||
{
|
||||
name = "type";
|
||||
value = "packages";
|
||||
}
|
||||
{
|
||||
name = "query";
|
||||
value = "{searchTerms}";
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
|
||||
definedAliases = ["@pkgs"];
|
||||
};
|
||||
};
|
||||
};
|
||||
commonSettings = {
|
||||
"font.name.serif.x-western" = "${outputs.look.fonts.main}";
|
||||
"font.name.sans-serif.x-western" = "${outputs.look.fonts.main}";
|
||||
"font.name.monospace.x-western" = "${outputs.look.fonts.nerd}";
|
||||
"general.autoScroll" = true;
|
||||
"browser.compactmode.show" = true;
|
||||
"browser.uidensity" = 1;
|
||||
"browser.startup.page" = 3;
|
||||
"extensions.pocket.enabled" = false;
|
||||
"toolkit.legacyUserProfileCustomizations.stylesheets" = true;
|
||||
"privacy.userContext.newTabContainerOnLeftClick.enabled" = true;
|
||||
"privacy.clearOnShutdown.history" = false;
|
||||
"privacy.clearOnShutdown.cookies" = false;
|
||||
"browser.toolbars.bookmarks.visibility" = "never";
|
||||
"media.hardware-video-decoding.force-enabled" = true;
|
||||
"svg.context-properties.content.enabled" = true;
|
||||
"toolkit.tabbox.switchByScrolling" = true;
|
||||
"device.sensors.motion.enabled" = false;
|
||||
"extensions.autoDisableScopes" = 0;
|
||||
"gnomeTheme.hideSingleTab" = true;
|
||||
"browser.contentblocking.category" = "strict";
|
||||
"urlclassifier.trackingSkipURLs" = "*.reddit.com, *.twitter.com, *.twimg.com, *.tiktok.com";
|
||||
"urlclassifier.features.socialtracking.skipURLs" = "*.instagram.com, *.twitter.com, *.twimg.com";
|
||||
"network.cookie.sameSite.noneRequiresSecure" = true;
|
||||
"browser.helperApps.deleteTempFileOnExit" = true;
|
||||
"privacy.globalprivacycontrol.enabled" = true;
|
||||
"privacy.globalprivacycontrol.functionality.enabled" = true;
|
||||
"webgl.disabled" = false;
|
||||
};
|
||||
in {
|
||||
enable = true;
|
||||
package = pkgs.librewolf;
|
||||
profiles = {
|
||||
Jimbo = {
|
||||
id = 0;
|
||||
extensions = commonExtensions;
|
||||
search = commonSearch;
|
||||
settings = commonSettings;
|
||||
userChrome = ''
|
||||
${themeJim}
|
||||
${quteFoxCSS}
|
||||
'';
|
||||
};
|
||||
Alt = {
|
||||
id = 1;
|
||||
extensions = commonExtensions;
|
||||
search = commonSearch;
|
||||
settings = commonSettings;
|
||||
userChrome = ''
|
||||
${themeAlt}
|
||||
${quteFoxCSS}
|
||||
'';
|
||||
};
|
||||
Misc = {
|
||||
id = 2;
|
||||
extensions = commonExtensions;
|
||||
search = commonSearch;
|
||||
settings = commonSettings;
|
||||
containersForce = true;
|
||||
containers = {
|
||||
Google = {
|
||||
color = "green";
|
||||
icon = "fingerprint";
|
||||
id = 200;
|
||||
};
|
||||
Seneca = {
|
||||
color = "red";
|
||||
icon = "briefcase";
|
||||
id = 201;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# Fixes
|
||||
home.file = {
|
||||
# Symlinks to Librewolf
|
||||
".librewolf".source = config.lib.file.mkOutOfStoreSymlink "/home/jimbo/.mozilla/firefox";
|
||||
|
||||
# Gnome theme
|
||||
".mozilla/firefox/Misc/chrome".source = "${fetchTarball {
|
||||
url = "https://github.com/rafaelmardojai/firefox-gnome-theme/archive/refs/tags/v129.zip";
|
||||
sha256 = "14x0vp66i8b14q6c9n75sa88fcwy9jd9lik8sjnab2rnwlskvq9h";
|
||||
}}";
|
||||
};
|
||||
}
|
42
modules/home/programs/gui/mako/default.nix
Normal file
42
modules/home/programs/gui/mako/default.nix
Normal file
|
@ -0,0 +1,42 @@
|
|||
{ pkgs, outputs, ... }:
|
||||
{
|
||||
services.mako = {
|
||||
enable = true;
|
||||
borderColor = "#${outputs.look.colors.accent}";
|
||||
backgroundColor = "#${outputs.look.colors.dark}CC";
|
||||
output = "${outputs.displays.d1}";
|
||||
sort = "+time";
|
||||
layer = "overlay";
|
||||
padding = "8";
|
||||
margin = "0";
|
||||
borderSize = outputs.look.border.int;
|
||||
maxIconSize = 40;
|
||||
defaultTimeout = 6000;
|
||||
font = "${outputs.look.fonts.main} 12";
|
||||
anchor = "bottom-right";
|
||||
extraConfig = "on-button-right=dismiss-all\nouter-margin=10\n[mode=do-not-disturb]\ninvisible=1";
|
||||
};
|
||||
|
||||
home.packages = let
|
||||
makoToggle = pkgs.writeScriptBin "makotoggle" ''
|
||||
# Run makoctl mode and store the output in a variable
|
||||
mode_output=$(makoctl mode)
|
||||
|
||||
# Extract the second line after "default"
|
||||
mode_line=$(echo "$mode_output" | sed -n '/default/{n;p}')
|
||||
|
||||
if [[ "$mode_line" == "do-not-disturb" ]]; then
|
||||
# Notifications are disabled, so we enable them
|
||||
makoctl mode -r do-not-disturb
|
||||
notify-send --expire-time=1500 'Notifications Enabled'
|
||||
else
|
||||
# Notifications are enabled, so we disable them
|
||||
notify-send --expire-time=1500 'Notifications Disabled'
|
||||
sleep 2
|
||||
makoctl mode -a do-not-disturb
|
||||
fi
|
||||
'';
|
||||
in with pkgs; [
|
||||
makoToggle
|
||||
];
|
||||
}
|
29
modules/home/programs/gui/mangohud/default.nix
Normal file
29
modules/home/programs/gui/mangohud/default.nix
Normal file
|
@ -0,0 +1,29 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
home = {
|
||||
packages = with pkgs; [
|
||||
mangohud
|
||||
];
|
||||
file = {
|
||||
".config/MangoHud/MangoHud.conf".text = ''
|
||||
table_columns=2
|
||||
frametime=0
|
||||
legacy_layout=0
|
||||
font_scale=0.80
|
||||
background_alpha=0.25
|
||||
|
||||
# Set the loads and such
|
||||
exec=echo $(echo $XDG_CURRENT_DESKTOP | sed 's/./\U&/') on $(cat /etc/os-release | grep PRETTY_NAME | cut -d '"' -f 2)
|
||||
fps
|
||||
fps_color_change
|
||||
ram
|
||||
vram
|
||||
cpu_stats
|
||||
cpu_load_change
|
||||
gpu_stats
|
||||
gpu_load_change
|
||||
frame_timing
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
11
modules/home/programs/gui/mpv/default.nix
Normal file
11
modules/home/programs/gui/mpv/default.nix
Normal file
|
@ -0,0 +1,11 @@
|
|||
{ ... }:
|
||||
{
|
||||
programs.mpv = {
|
||||
enable = true;
|
||||
config = {
|
||||
volume = 55;
|
||||
loop-playlist = "inf";
|
||||
osc = "no";
|
||||
};
|
||||
};
|
||||
}
|
58
modules/home/programs/gui/pcmanfm-qt/default.nix
Normal file
58
modules/home/programs/gui/pcmanfm-qt/default.nix
Normal file
|
@ -0,0 +1,58 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
home = {
|
||||
packages = with pkgs; [
|
||||
pcmanfm-qt
|
||||
gnome.file-roller
|
||||
];
|
||||
file = {
|
||||
".config/pcmanfm-qt/default/settings.conf".text = ''
|
||||
[Behavior]
|
||||
BookmarkOpenMethod=current_tab
|
||||
ConfirmDelete=true
|
||||
RecentFilesNumber=0
|
||||
|
||||
[Desktop]
|
||||
HideItems=false
|
||||
SortColumn=name
|
||||
SortFolderFirst=true
|
||||
SortHiddenLast=false
|
||||
SortOrder=ascending
|
||||
|
||||
[FolderView]
|
||||
Mode=icon
|
||||
ScrollPerPixel=true
|
||||
ShadowHidden=true
|
||||
ShowFilter=false
|
||||
ShowFullNames=true
|
||||
ShowHidden=true
|
||||
SortCaseSensitive=false
|
||||
SortColumn=mtime
|
||||
SortFolderFirst=true
|
||||
SortHiddenLast=false
|
||||
SortOrder=descending
|
||||
|
||||
[Places]
|
||||
HiddenPlaces=menu://applications/, network:///, computer:///, /home/jimbo/Desktop
|
||||
|
||||
[System]
|
||||
Archiver=file-roller
|
||||
Terminal=foot
|
||||
|
||||
[Thumbnail]
|
||||
MaxExternalThumbnailFileSize=-1
|
||||
MaxThumbnailFileSize=4096
|
||||
ShowThumbnails=true
|
||||
ThumbnailLocalFilesOnly=true
|
||||
|
||||
[Window]
|
||||
AlwaysShowTabs=false
|
||||
PathBarButtons=true
|
||||
ShowMenuBar=true
|
||||
ShowTabClose=true
|
||||
SwitchToNewTab=true
|
||||
TabPaths=@Invalid()
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
185
modules/home/programs/gui/rofi/default.nix
Normal file
185
modules/home/programs/gui/rofi/default.nix
Normal file
|
@ -0,0 +1,185 @@
|
|||
{ pkgs, config, outputs, ... }:
|
||||
{
|
||||
programs.rofi = {
|
||||
enable = true;
|
||||
package = pkgs.rofi-wayland;
|
||||
terminal = "foot";
|
||||
font = "${outputs.look.fonts.main} 14";
|
||||
theme = let
|
||||
inherit (config.lib.formats.rasi) mkLiteral;
|
||||
in {
|
||||
"*" = {
|
||||
lightbg = mkLiteral "#EEE8D5";
|
||||
lightfg = mkLiteral "#586875";
|
||||
blue = mkLiteral "#268BD2";
|
||||
red = mkLiteral "#DC322F";
|
||||
background-color = mkLiteral "#00000000";
|
||||
separatorcolor = mkLiteral "#00000000";
|
||||
normal-foreground = mkLiteral "#${outputs.look.colors.text}";
|
||||
normal-background = mkLiteral "#${outputs.look.colors.dark}1A";
|
||||
urgent-foreground = mkLiteral "#${outputs.look.colors.urgent}";
|
||||
active-foreground = mkLiteral "#${outputs.look.colors.split}";
|
||||
selected-active-foreground = mkLiteral "#${outputs.look.colors.prime}";
|
||||
background = mkLiteral "#${outputs.look.colors.dark}B3";
|
||||
bordercolor = mkLiteral "#${outputs.look.colors.prime}";
|
||||
selected-normal-foreground = mkLiteral "#FFFFFF";
|
||||
selected-normal-background = mkLiteral "#${outputs.look.colors.prime}80";
|
||||
border-color = mkLiteral "#${outputs.look.colors.prime}";
|
||||
urgent-background = mkLiteral "#${outputs.look.colors.accent}26";
|
||||
active-background = mkLiteral "#${outputs.look.colors.accent}26";
|
||||
selected-active-background = mkLiteral "#${outputs.look.colors.split}54";
|
||||
};
|
||||
"#window" = {
|
||||
background-color = mkLiteral "@background";
|
||||
width = 500;
|
||||
border = mkLiteral "${outputs.look.border.string}";
|
||||
padding = 5;
|
||||
};
|
||||
"#message" = {
|
||||
border = mkLiteral "1px dash 0px 0px";
|
||||
border-color = mkLiteral "@separatorcolor";
|
||||
padding = 1;
|
||||
};
|
||||
"#textbox" = {
|
||||
text-color = mkLiteral "@normal-foreground";
|
||||
};
|
||||
"#listview" = {
|
||||
fixed-height = 0;
|
||||
border-color = mkLiteral "@separatorcolor";
|
||||
scrollbar = mkLiteral "false";
|
||||
columns = 2;
|
||||
};
|
||||
"#element" = {
|
||||
border = 0;
|
||||
padding = 1;
|
||||
};
|
||||
"#element-text" = {
|
||||
background-color = mkLiteral "inherit";
|
||||
text-color = mkLiteral "inherit";
|
||||
};
|
||||
"#element.normal.normal" = {
|
||||
text-color = mkLiteral "@normal-foreground";
|
||||
};
|
||||
"#element.normal.urgent" = {
|
||||
text-color = mkLiteral "@urgent-foreground";
|
||||
};
|
||||
"#element.normal.active" = {
|
||||
background-color = mkLiteral "@active-background";
|
||||
text-color = mkLiteral "@active-foreground";
|
||||
};
|
||||
"#element.selected.normal" = {
|
||||
background-color = mkLiteral "@selected-normal-background";
|
||||
text-color = mkLiteral "@selected-normal-foreground";
|
||||
};
|
||||
"#element.selected.urgent" = {
|
||||
background-color = mkLiteral "@urgent-background";
|
||||
text-color = mkLiteral "@urgent-foreground";
|
||||
};
|
||||
"#element.selected.active" = {
|
||||
background-color = mkLiteral "@selected-active-background";
|
||||
text-color = mkLiteral "@selected-active-foreground";
|
||||
};
|
||||
"#element.alternate.normal" = {
|
||||
text-color = mkLiteral "@normal-foreground";
|
||||
};
|
||||
"#element.alternate.urgent" = {
|
||||
text-color = mkLiteral "@urgent-foreground";
|
||||
};
|
||||
"#element.alternate.active" = {
|
||||
background-color = mkLiteral "@active-background";
|
||||
text-color = mkLiteral "@active-foreground";
|
||||
};
|
||||
"#mode-switcher" = {
|
||||
border = mkLiteral "2px dash 0px 0px";
|
||||
border-color = mkLiteral "@separatorcolor";
|
||||
};
|
||||
"#button.selected" = {
|
||||
background-color = mkLiteral "@selected-normal-background";
|
||||
text-color = mkLiteral "@selected-normal-foreground";
|
||||
};
|
||||
"#case-indicator" = {
|
||||
spacing = mkLiteral "0";
|
||||
text-color = mkLiteral "@normal-foreground";
|
||||
};
|
||||
"#entry" = {
|
||||
spacing = 0;
|
||||
text-color = mkLiteral "@normal-foreground";
|
||||
};
|
||||
"#prompt" = {
|
||||
spacing = 0;
|
||||
text-color = mkLiteral "@normal-foreground";
|
||||
};
|
||||
"#inputbar" = {
|
||||
spacing = 0;
|
||||
text-color = mkLiteral "@normal-foreground";
|
||||
padding = 1;
|
||||
children = map mkLiteral ["prompt" "textbox-prompt-colon" "entry"];
|
||||
};
|
||||
"#textbox-prompt-colon" = {
|
||||
expand = false;
|
||||
str = ":";
|
||||
margin = mkLiteral "0px 0.3em 0em 0em";
|
||||
text-color = mkLiteral "@normal-foreground";
|
||||
};
|
||||
};
|
||||
};
|
||||
home.packages = let
|
||||
# A script to execute commands with Rofi
|
||||
rofiScripts = pkgs.writeScriptBin "rofiscripts" ''
|
||||
# Scratchpad function
|
||||
handle_scratchpads() {
|
||||
SCRATCHPADS=$(echo -e "Gotop\nMusic\nSound\nEasyEffects" | rofi -dmenu -i -p "Scratchpads")
|
||||
case $SCRATCHPADS in
|
||||
Gotop) foot -a gotop -T Gotop gotop;;
|
||||
Music) foot -a music -T Music ncmpcpp;;
|
||||
Sound) foot -a sound -T Sound pulsemixer;;
|
||||
EasyEffects) easyeffects;;
|
||||
esac
|
||||
}
|
||||
|
||||
# Lock menu
|
||||
handle_power() {
|
||||
POWER=$(echo -e "Shutdown\nReboot\nSleep\nLock\nKill" | rofi -dmenu -i -p "Power")
|
||||
case $POWER in
|
||||
Shutdown) poweroff;;
|
||||
Reboot) reboot;;
|
||||
Sleep) swaylock --sleep &;;
|
||||
Lock) swaylock &;;
|
||||
Kill) pkill -9 sway;;
|
||||
esac
|
||||
}
|
||||
|
||||
# Resolutions
|
||||
handle_resolutions() {
|
||||
RET=$(echo -e "Default\nWide\nGPU2" | rofi -dmenu -i -p "Resolutions")
|
||||
case $RET in
|
||||
Default) swaymsg reload ;;
|
||||
Wide) swaymsg "
|
||||
output ${outputs.displays.d1} enable pos 1680 0 mode 1680x1050@59.954Hz
|
||||
output ${outputs.displays.d2} enable pos 0 0 mode 1680x1050@59.954Hz
|
||||
output ${outputs.displays.d3} enable pos 3360 0 transform 0
|
||||
";;
|
||||
GPU2) swaymsg "
|
||||
output ${outputs.displays.d2} enable pos 1680 0 mode 1920x1080@60Hz
|
||||
output ${outputs.displays.d3} enable pos 0 0 transform 0
|
||||
";;
|
||||
esac
|
||||
}
|
||||
|
||||
# Check for command-line arguments
|
||||
if [ "$1" == "--scratchpads" ]; then
|
||||
handle_scratchpads
|
||||
elif [ "$1" == "--power" ]; then
|
||||
handle_power
|
||||
elif [ "$1" == "--resolutions" ]; then
|
||||
handle_resolutions
|
||||
else
|
||||
echo "Please use a valid argument."
|
||||
fi
|
||||
'';
|
||||
in with pkgs; [
|
||||
rofiScripts
|
||||
rofi-bluetooth
|
||||
bemoji
|
||||
];
|
||||
}
|
14
modules/home/programs/misc/avtools/default.nix
Normal file
14
modules/home/programs/misc/avtools/default.nix
Normal file
|
@ -0,0 +1,14 @@
|
|||
{ pkgs, lib, config, ... }:
|
||||
{
|
||||
imports = [
|
||||
./obs
|
||||
];
|
||||
|
||||
home.packages = with pkgs; [
|
||||
yt-dlp
|
||||
spotdl
|
||||
playerctl
|
||||
ffmpeg
|
||||
pulsemixer
|
||||
];
|
||||
}
|
14
modules/home/programs/misc/avtools/obs/obs.nix
Normal file
14
modules/home/programs/misc/avtools/obs/obs.nix
Normal file
|
@ -0,0 +1,14 @@
|
|||
{pkgs, lib, config, ...}:
|
||||
{
|
||||
programs.obs-studio = {
|
||||
enable = true;
|
||||
plugins = with pkgs.obs-studio-plugins; [
|
||||
obs-pipewire-audio-capture
|
||||
obs-webkitgtk
|
||||
obs-multi-rtmp
|
||||
obs-vkcapture
|
||||
obs-tuna
|
||||
looking-glass-obs
|
||||
];
|
||||
};
|
||||
}
|
7
modules/home/programs/misc/chat/default.nix
Normal file
7
modules/home/programs/misc/chat/default.nix
Normal file
|
@ -0,0 +1,7 @@
|
|||
{ pkgs, lib, config, ... }:
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
vesktop
|
||||
fractal
|
||||
];
|
||||
}
|
12
modules/home/programs/misc/default.nix
Normal file
12
modules/home/programs/misc/default.nix
Normal file
|
@ -0,0 +1,12 @@
|
|||
{ ... }:
|
||||
{
|
||||
imports = [
|
||||
./avtools
|
||||
./chat
|
||||
./gaming/launchers
|
||||
./general
|
||||
./headless
|
||||
./production
|
||||
./remote-desktop
|
||||
];
|
||||
}
|
8
modules/home/programs/misc/gaming/default.nix
Normal file
8
modules/home/programs/misc/gaming/default.nix
Normal file
|
@ -0,0 +1,8 @@
|
|||
{ ... }:
|
||||
{
|
||||
imports = [
|
||||
./launchers
|
||||
./emulators
|
||||
./xash3d
|
||||
];
|
||||
}
|
11
modules/home/programs/misc/gaming/emulators/default.nix
Normal file
11
modules/home/programs/misc/gaming/emulators/default.nix
Normal file
|
@ -0,0 +1,11 @@
|
|||
{ pkgs, lib, config, ... }:
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
dolphin-emu
|
||||
cemu
|
||||
ryujinx
|
||||
duckstation
|
||||
pcsx2
|
||||
unstable.lime3ds
|
||||
];
|
||||
}
|
9
modules/home/programs/misc/gaming/launchers/default.nix
Normal file
9
modules/home/programs/misc/gaming/launchers/default.nix
Normal file
|
@ -0,0 +1,9 @@
|
|||
{ pkgs, lib, config, ... }:
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
steam
|
||||
steam-run
|
||||
heroic
|
||||
prismlauncher
|
||||
];
|
||||
}
|
6
modules/home/programs/misc/gaming/xash3d/default.nix
Normal file
6
modules/home/programs/misc/gaming/xash3d/default.nix
Normal file
|
@ -0,0 +1,6 @@
|
|||
{ pkgs, lib, config, ... }:
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
xash3d
|
||||
];
|
||||
}
|
12
modules/home/programs/misc/general/default.nix
Normal file
12
modules/home/programs/misc/general/default.nix
Normal file
|
@ -0,0 +1,12 @@
|
|||
{ pkgs, lib, config, ... }:
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
imv
|
||||
qbittorrent
|
||||
libreoffice-fresh
|
||||
ffmpegthumbnailer
|
||||
thunderbird
|
||||
protonvpn-cli_2
|
||||
bc
|
||||
];
|
||||
}
|
14
modules/home/programs/misc/headless/default.nix
Normal file
14
modules/home/programs/misc/headless/default.nix
Normal file
|
@ -0,0 +1,14 @@
|
|||
{ pkgs, lib, config, ... }:
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
home-manager
|
||||
gotop
|
||||
tcptrack
|
||||
p7zip
|
||||
vimv
|
||||
dua
|
||||
pciutils
|
||||
usbutils
|
||||
protonvpn-cli_2
|
||||
];
|
||||
}
|
10
modules/home/programs/misc/production/default.nix
Normal file
10
modules/home/programs/misc/production/default.nix
Normal file
|
@ -0,0 +1,10 @@
|
|||
{ pkgs, lib, config, ... }:
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
krita
|
||||
inkscape
|
||||
audacity
|
||||
blender_4_2
|
||||
sunvox
|
||||
];
|
||||
}
|
7
modules/home/programs/misc/remote-desktop/default.nix
Normal file
7
modules/home/programs/misc/remote-desktop/default.nix
Normal file
|
@ -0,0 +1,7 @@
|
|||
{ pkgs, lib, config, ... }:
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
moonlight-qt
|
||||
rustdesk-flutter
|
||||
];
|
||||
}
|
9
modules/home/programs/misc/school/default.nix
Normal file
9
modules/home/programs/misc/school/default.nix
Normal file
|
@ -0,0 +1,9 @@
|
|||
{ pkgs, lib, config, ... }:
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
remmina
|
||||
freerdp
|
||||
zoom-us
|
||||
globalprotect-openconnect
|
||||
];
|
||||
}
|
11
modules/home/programs/terminal/default.nix
Normal file
11
modules/home/programs/terminal/default.nix
Normal file
|
@ -0,0 +1,11 @@
|
|||
{ ... }:
|
||||
{
|
||||
imports = [
|
||||
./fastfetch
|
||||
./git
|
||||
./ncmpcpp
|
||||
./neovim
|
||||
./ranger
|
||||
./tmux
|
||||
];
|
||||
}
|
154
modules/home/programs/terminal/fastfetch/default.nix
Normal file
154
modules/home/programs/terminal/fastfetch/default.nix
Normal file
|
@ -0,0 +1,154 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
home = {
|
||||
file = let
|
||||
fastConf = ''
|
||||
{
|
||||
"$schema": "https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json",
|
||||
"logo": {
|
||||
"source": "xenia",
|
||||
"color": {
|
||||
"1": "1;97",
|
||||
"2": "red",
|
||||
"3": "yellow"
|
||||
}
|
||||
},
|
||||
"display": {
|
||||
"separator": " \u001b[33m ",
|
||||
"color": "red"
|
||||
},
|
||||
"modules": [
|
||||
{
|
||||
"type": "custom",
|
||||
"format": "\u001b[1m—————————————————————————————————————"
|
||||
},
|
||||
{
|
||||
"type": "host",
|
||||
"key": " "
|
||||
},
|
||||
{
|
||||
"type": "cpu",
|
||||
"key": " "
|
||||
},
|
||||
{
|
||||
"type": "gpu",
|
||||
"key": " "
|
||||
},
|
||||
{
|
||||
"type": "disk",
|
||||
"folders": "/",
|
||||
"key": " "
|
||||
},
|
||||
{
|
||||
"type": "memory",
|
||||
"format": "{/1}{-}{/}{/2}{-}{/}{} / {}",
|
||||
"key": " "
|
||||
},
|
||||
{
|
||||
"type": "display",
|
||||
"compactType": "original",
|
||||
"key": " "
|
||||
},
|
||||
|
||||
{
|
||||
"type": "custom",
|
||||
"format": "\u001b[1m—————————————————————————————————————"
|
||||
},
|
||||
{
|
||||
"type": "os",
|
||||
"format": "{3} {12}",
|
||||
"key": " "
|
||||
},
|
||||
{
|
||||
"type": "kernel",
|
||||
"format": "{1} {2}",
|
||||
"key": " "
|
||||
},
|
||||
{
|
||||
"type": "wm",
|
||||
"key": " "
|
||||
},
|
||||
{
|
||||
"type": "shell",
|
||||
"key": " "
|
||||
},
|
||||
{
|
||||
"type": "terminal",
|
||||
"key": " "
|
||||
},
|
||||
{
|
||||
"type": "packages",
|
||||
"key": " "
|
||||
},
|
||||
{
|
||||
"type": "uptime",
|
||||
"key": " "
|
||||
},
|
||||
{
|
||||
"type": "command",
|
||||
"text": "date -d @$(stat -c %W /) '+%a %b %d %r %Z %Y'",
|
||||
"key": " "
|
||||
},
|
||||
|
||||
{
|
||||
"type": "custom",
|
||||
"format": "\u001b[1m—————————————————————————————————————"
|
||||
},
|
||||
{
|
||||
"type": "custom",
|
||||
"format": "\u001b[90m \u001b[31m \u001b[32m \u001b[33m \u001b[34m \u001b[35m \u001b[36m \u001b[37m"
|
||||
}
|
||||
]
|
||||
}
|
||||
'';
|
||||
in {
|
||||
# Fastfetch config
|
||||
".config/fastfetch/config.jsonc".text = fastConf;
|
||||
};
|
||||
packages = let
|
||||
# Small Neofetch config
|
||||
pFetch = let
|
||||
smallConf = pkgs.writeText "smallconf.jsonc" ''
|
||||
{
|
||||
"$schema": "https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json",
|
||||
"logo": {
|
||||
"type": "small"
|
||||
},
|
||||
"modules": [
|
||||
{
|
||||
"type": "os",
|
||||
"format": "{3} {12}",
|
||||
"key": " "
|
||||
},
|
||||
{
|
||||
"type": "host",
|
||||
"key": " "
|
||||
},
|
||||
{
|
||||
"type": "kernel",
|
||||
"format": "{1} {2}",
|
||||
"key": " "
|
||||
},
|
||||
{
|
||||
"type": "uptime",
|
||||
"key": " "
|
||||
},
|
||||
{
|
||||
"type": "packages",
|
||||
"key": " "
|
||||
},
|
||||
{
|
||||
"type": "memory",
|
||||
"format": "{/1}{-}{/}{/2}{-}{/}{} / {}",
|
||||
"key": " "
|
||||
}
|
||||
]
|
||||
}
|
||||
'';
|
||||
in pkgs.writeScriptBin "pfetch"
|
||||
''fastfetch --config ${smallConf}'';
|
||||
in with pkgs; [
|
||||
fastfetch pFetch
|
||||
];
|
||||
};
|
||||
}
|
9
modules/home/programs/terminal/git/git.nix
Normal file
9
modules/home/programs/terminal/git/git.nix
Normal file
|
@ -0,0 +1,9 @@
|
|||
{ pkgs, outputs, ... }:
|
||||
{
|
||||
programs.git = {
|
||||
enable = true;
|
||||
lfs.enable = true;
|
||||
userName = outputs.secrets.jimUsername;
|
||||
userEmail = outputs.secrets.jimEmail;
|
||||
};
|
||||
}
|
16
modules/home/programs/terminal/ncmpcpp/default.nix
Normal file
16
modules/home/programs/terminal/ncmpcpp/default.nix
Normal file
|
@ -0,0 +1,16 @@
|
|||
{pkgs, ...}:
|
||||
{
|
||||
programs.ncmpcpp = {
|
||||
enable = true;
|
||||
settings = {
|
||||
browser_sort_mode = "name";
|
||||
user_interface = "alternative";
|
||||
};
|
||||
};
|
||||
|
||||
services.mpd-discord-rpc.enable = true;
|
||||
|
||||
home.packages = with pkgs; [
|
||||
mpc-cli
|
||||
];
|
||||
}
|
109
modules/home/programs/terminal/neovim/neovim.nix
Normal file
109
modules/home/programs/terminal/neovim/neovim.nix
Normal file
|
@ -0,0 +1,109 @@
|
|||
{ pkgs, outputs, ... }:
|
||||
{
|
||||
programs.neovim = {
|
||||
enable = true;
|
||||
defaultEditor = true;
|
||||
viAlias = true;
|
||||
vimAlias = true;
|
||||
plugins = with pkgs.vimPlugins; [
|
||||
# Vim theme
|
||||
vim-airline
|
||||
vim-airline-themes
|
||||
|
||||
# Internal clipboard
|
||||
vim-vsnip
|
||||
cmp-vsnip
|
||||
|
||||
# Autocomplete manager
|
||||
lspkind-nvim
|
||||
|
||||
# Autocomplete plugins
|
||||
cmp-nvim-lsp
|
||||
cmp-buffer
|
||||
cmp-path
|
||||
cmp-cmdline
|
||||
nvim-cmp
|
||||
|
||||
# Hex color visualizer and color theme
|
||||
nvim-colorizer-lua
|
||||
vim-monokai-pro
|
||||
|
||||
# Discord RPC
|
||||
vimsence
|
||||
|
||||
# Nerdtree
|
||||
nerdtree
|
||||
vim-nerdtree-syntax-highlight
|
||||
];
|
||||
extraConfig = ''
|
||||
lua <<EOF
|
||||
-- Set up nvim-cmp
|
||||
local cmp = require'cmp'
|
||||
|
||||
cmp.setup({
|
||||
snippet = {
|
||||
-- REQUIRED - you must specify a snippet engine
|
||||
expand = function(args)
|
||||
vim.fn["vsnip#anonymous"](args.body)
|
||||
end,
|
||||
},
|
||||
mapping = cmp.mapping.preset.insert({
|
||||
['<C-b>'] = cmp.mapping.scroll_docs(-4),
|
||||
['<C-f>'] = cmp.mapping.scroll_docs(4),
|
||||
['<C-Space>'] = cmp.mapping.complete(),
|
||||
['<C-e>'] = cmp.mapping.abort(),
|
||||
['<CR>'] = cmp.mapping.confirm({ select = true }), -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items.
|
||||
}),
|
||||
sources = cmp.config.sources({
|
||||
{ name = 'nvim_lsp' },
|
||||
{ name = 'vsnip' }
|
||||
}, {
|
||||
{ name = 'buffer' },
|
||||
})
|
||||
})
|
||||
|
||||
-- Use buffer source for '/' and '?'
|
||||
cmp.setup.cmdline({ '/', '?' }, {
|
||||
mapping = cmp.mapping.preset.cmdline(),
|
||||
sources = {
|
||||
{ name = 'buffer' }
|
||||
}
|
||||
})
|
||||
|
||||
-- Use cmdline & path source for ':'
|
||||
cmp.setup.cmdline(':', {
|
||||
mapping = cmp.mapping.preset.cmdline(),
|
||||
sources = cmp.config.sources({
|
||||
{ name = 'path' }
|
||||
}, {
|
||||
{ name = 'cmdline' }
|
||||
})
|
||||
})
|
||||
EOF
|
||||
|
||||
colorscheme monokai_pro
|
||||
let g:airline_theme='onedark'
|
||||
let g:airline#extensions#tabline#enabled = 1
|
||||
hi Normal guibg=none ctermbg=235
|
||||
hi Visual guibg=#${outputs.look.colors.mid} ctermbg=238
|
||||
hi Pmenu guibg=#${outputs.look.colors.mid} ctermbg=238
|
||||
hi EndOfBuffer guibg=none ctermbg=235
|
||||
hi LineNr guibg=none ctermbg=none
|
||||
lua require'colorizer'.setup()
|
||||
|
||||
set nu rnu
|
||||
set termguicolors
|
||||
set mouse=a
|
||||
|
||||
set undofile
|
||||
set undodir=$HOME/.local/share/nvim/undo
|
||||
set undolevels=100
|
||||
set undoreload=10000
|
||||
|
||||
nmap <C-x> :bnext<CR>
|
||||
nmap <C-z> :bprev<CR>
|
||||
nmap <C-w> :bd<CR>
|
||||
nmap <C-a> :NERDTreeToggle
|
||||
'';
|
||||
};
|
||||
}
|
133
modules/home/programs/terminal/ranger/default.nix
Normal file
133
modules/home/programs/terminal/ranger/default.nix
Normal file
|
@ -0,0 +1,133 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
programs.ranger = {
|
||||
enable = true;
|
||||
settings = {
|
||||
preview_images = true;
|
||||
preview_images_method = "sixel";
|
||||
dirname_in_tabs = true;
|
||||
cd_tab_fuzzy = true;
|
||||
autosave_bookmarks = false;
|
||||
show_hidden = true;
|
||||
wrap_scroll = true;
|
||||
column_ratios = "2,2,4";
|
||||
hidden_filter = ''^\.|\.(?:pyc|pyo|bak|swp)$|^lost\+found$|^__(py)?cache__$'';
|
||||
};
|
||||
rifle = [
|
||||
# Text editing
|
||||
{
|
||||
condition = ''ext xml|json|jsonc|m3u|m3u8|csv|tex|py|pl|rb|js|sh|php|md|nix'';
|
||||
command = ''vim -- "$@"'';
|
||||
}
|
||||
|
||||
# Media
|
||||
{
|
||||
condition = ''mime ^image, has imv, X, flag f'';
|
||||
command = ''imv -- "$@"'';
|
||||
}
|
||||
{
|
||||
condition = ''mime ^video, terminal, has mpv'';
|
||||
command = ''mpv -- "$@"'';
|
||||
}
|
||||
{
|
||||
condition = ''mime ^video, terminal, has mpv'';
|
||||
command = ''mpv --video-rotate=270 -- "$@"'';
|
||||
}
|
||||
{
|
||||
condition = ''mime ^audio|ogg$, terminal, has mpv'';
|
||||
command = ''mpv --no-audio-display -- "$@"'';
|
||||
}
|
||||
{
|
||||
condition = ''mime ^audio|ogg$, terminal, has mpv'';
|
||||
command = ''mpv --shuffle --no-audio-display -- "$@"'';
|
||||
}
|
||||
{
|
||||
condition = ''ext x?html?|pdf, has librewolf, X, flag f'';
|
||||
command = ''librewolf -- "$@"'';
|
||||
}
|
||||
{
|
||||
condition = ''ext pptx?|od[dfgpst]|docx?|sxc|xlsx?|xlt|xlw|gnm|gnumeric, has libreoffice, X, flag f'';
|
||||
command = ''libreoffice "$@"'';
|
||||
}
|
||||
|
||||
# Scripts
|
||||
{
|
||||
condition = ''sh'';
|
||||
command = ''sh -- "$1"'';
|
||||
}
|
||||
{
|
||||
condition = ''py'';
|
||||
command = ''python -- "$1"'';
|
||||
}
|
||||
{
|
||||
condition = ''pl'';
|
||||
command = ''perl -- "$1"'';
|
||||
}
|
||||
{
|
||||
condition = ''js'';
|
||||
command = ''node -- "$1"'';
|
||||
}
|
||||
{
|
||||
condition = ''php'';
|
||||
command = ''php -- "$1"'';
|
||||
}
|
||||
|
||||
# Misc
|
||||
{
|
||||
condition = ''ext exe|msi'';
|
||||
command = ''wine "$1"'';
|
||||
}
|
||||
{
|
||||
condition = ''ext 7z|ace|ar|arc|bz2?|cab|cpio|cpt|deb|dgc|dmg|gz|iso|jar|pkg|rar|shar|tar|tgz|xar|xpi|xz|zip|zst, has 7z'';
|
||||
command = ''7z x -- "$@"'';
|
||||
}
|
||||
{
|
||||
condition = ''label open, has xdg-open'';
|
||||
command = ''xdg-open -- "$@"'';
|
||||
}
|
||||
];
|
||||
plugins = [
|
||||
{
|
||||
name = "devicons2";
|
||||
src = builtins.fetchGit {
|
||||
url = "https://github.com/cdump/ranger-devicons2";
|
||||
rev = "9606009aa01743768b0f27de0a841f7d8fe196c5";
|
||||
};
|
||||
}
|
||||
];
|
||||
extraConfig = ''
|
||||
default_linemode devicons2
|
||||
'';
|
||||
};
|
||||
|
||||
# Ranger's bookmarks and necessary tools
|
||||
home = {
|
||||
file = let
|
||||
rangerBookmarks = ''
|
||||
# Local files
|
||||
h:/home/jimbo/
|
||||
k:/home/jimbo/Downloads
|
||||
v:/home/jimbo/Videos
|
||||
c:/home/jimbo/.config
|
||||
L:/home/jimbo/.local
|
||||
D:/mnt
|
||||
n:/etc/nixos
|
||||
|
||||
# Remote files
|
||||
a:/home/jimbo/JimboNFS
|
||||
K:/home/jimbo/JimboNFS/Downloads
|
||||
p:/home/jimbo/JimboNFS/Photos
|
||||
P:/home/jimbo/JimboNFS/Projects
|
||||
V:/home/jimbo/JimboNFS/Videos/Random
|
||||
m:/home/jimbo/JimboNFS/Music
|
||||
s:/home/jimbo/JimboNFS/School
|
||||
'';
|
||||
in {
|
||||
".local/share/ranger/bookmarks".text = rangerBookmarks;
|
||||
};
|
||||
packages = with pkgs; [
|
||||
imagemagick
|
||||
poppler_utils
|
||||
];
|
||||
};
|
||||
}
|
22
modules/home/programs/terminal/tmux/default.nix
Normal file
22
modules/home/programs/terminal/tmux/default.nix
Normal file
|
@ -0,0 +1,22 @@
|
|||
{ ... }:
|
||||
{
|
||||
programs.tmux = {
|
||||
enable = true;
|
||||
extraConfig = ''
|
||||
set -g mouse on
|
||||
set -g base-index 1
|
||||
set -g default-terminal "st-256color"
|
||||
set -g history-limit 4096
|
||||
set -g set-titles on
|
||||
set -g set-titles-string "#T"
|
||||
set -g status on
|
||||
set -g status-left ""
|
||||
set -g status-position bottom
|
||||
set -g status-right "#[bg=brightblack]#[fg=dark_purple] #T "
|
||||
set -g status-style "bg=black"
|
||||
setw -g pane-base-index 1
|
||||
setw -g window-status-format "#[bg=brightmagenta]#[fg=black] #I #[bg=brightblack]#[fg=white] #W "
|
||||
setw -g window-status-current-format "#[bg=brightmagenta]#[fg=black] #I #[bg=white]#[fg=black] #W "
|
||||
'';
|
||||
};
|
||||
}
|
12
modules/home/settings/dconf/default.nix
Normal file
12
modules/home/settings/dconf/default.nix
Normal file
|
@ -0,0 +1,12 @@
|
|||
{ ... }:
|
||||
{
|
||||
dconf.settings = {
|
||||
"org/gnome/desktop/interface/color-scheme" = {
|
||||
color-scheme = "prefer-dark";
|
||||
};
|
||||
"org/virt-manager/virt-manager/connections" = {
|
||||
autoconnect = ["qemu:///system"];
|
||||
uris = ["qemu:///system"];
|
||||
};
|
||||
};
|
||||
}
|
8
modules/home/settings/default.nix
Normal file
8
modules/home/settings/default.nix
Normal file
|
@ -0,0 +1,8 @@
|
|||
{ ... }:
|
||||
{
|
||||
imports = [
|
||||
./dconf
|
||||
./gtk
|
||||
./xdg
|
||||
];
|
||||
}
|
66
modules/home/settings/gtk/default.nix
Normal file
66
modules/home/settings/gtk/default.nix
Normal file
|
@ -0,0 +1,66 @@
|
|||
{ pkgs, outputs, ... }:
|
||||
{
|
||||
gtk = {
|
||||
enable = true;
|
||||
font = {
|
||||
name = "${outputs.look.fonts.main}";
|
||||
size = 11;
|
||||
};
|
||||
theme = {
|
||||
name = "Colloid-Dark";
|
||||
package = pkgs.colloid-gtk-theme.override {
|
||||
themeVariants = ["default"];
|
||||
colorVariants = ["dark"];
|
||||
sizeVariants = ["standard"];
|
||||
tweaks = ["black" "rimless" "normal"];
|
||||
};
|
||||
};
|
||||
iconTheme = {
|
||||
package = pkgs.papirus-icon-theme.override {color = "indigo";};
|
||||
name = "Papirus-Dark";
|
||||
};
|
||||
cursorTheme = {
|
||||
package = pkgs.simp1e-cursors;
|
||||
name = "Simp1e-Dark";
|
||||
};
|
||||
|
||||
gtk3 = {
|
||||
bookmarks = [
|
||||
# Local
|
||||
"file:///home/jimbo/Downloads"
|
||||
"file:///home/jimbo/Documents"
|
||||
"file:///home/jimbo/Videos"
|
||||
"file:///home/jimbo/Pictures/Screenshots"
|
||||
"file:///home/jimbo/VMs"
|
||||
|
||||
# Remote
|
||||
"file:///home/jimbo/JimboNFS/Downloads"
|
||||
"file:///home/jimbo/JimboNFS/Documents"
|
||||
"file:///home/jimbo/JimboNFS/Music"
|
||||
"file:///home/jimbo/JimboNFS/Photos"
|
||||
"file:///home/jimbo/JimboNFS/Videos"
|
||||
"file:///home/jimbo/JimboNFS/Projects"
|
||||
|
||||
# More important stuff
|
||||
"file:///home/jimbo/JimboNFS/School"
|
||||
"file:///etc/nixos"
|
||||
];
|
||||
|
||||
# Disable shadows
|
||||
extraCss = ''
|
||||
* { outline-width: 0px; }
|
||||
decoration { box-shadow: none; }
|
||||
'';
|
||||
};
|
||||
|
||||
# Stop gtk4 from being rounded
|
||||
gtk4.extraCss = ''
|
||||
window {
|
||||
border-top-left-radius:0;
|
||||
border-top-right-radius:0;
|
||||
border-bottom-left-radius:0;
|
||||
border-bottom-right-radius:0;
|
||||
}
|
||||
'';
|
||||
};
|
||||
}
|
10
modules/home/settings/xdg/default.nix
Normal file
10
modules/home/settings/xdg/default.nix
Normal file
|
@ -0,0 +1,10 @@
|
|||
{ ... }:
|
||||
{
|
||||
xdg.mimeApps.defaultApplications = {
|
||||
"inode/directory" = ["pcmanfm-qt.desktop"];
|
||||
"text/plain" = ["nvim.desktop"];
|
||||
"image/png" = ["imv.desktop"];
|
||||
"image/jpeg" = ["imv.desktop"];
|
||||
"video/*" = ["mpv.desktop"];
|
||||
};
|
||||
}
|
32
modules/home/sway/autostart/default.nix
Normal file
32
modules/home/sway/autostart/default.nix
Normal file
|
@ -0,0 +1,32 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
wayland.windowManager.sway = {
|
||||
config = {
|
||||
bars = [{command = "waybar";}];
|
||||
|
||||
startup = [
|
||||
# Scratchpads
|
||||
{command = "foot -a gotop -T Gotop gotop";}
|
||||
{command = "foot -a music -T Music ncmpcpp";}
|
||||
{command = "foot -a sound -T Sound pulsemixer";}
|
||||
{command = "easyeffects";}
|
||||
|
||||
# Daemons and tray apps
|
||||
{command = "wl-paste -t text --watch clipman store -P";}
|
||||
{command = "wl-copy";}
|
||||
{command = "mako";}
|
||||
{command = "sunshine";}
|
||||
{command = "${pkgs.rot8}/bin/rot8";}
|
||||
|
||||
# Polkit agent
|
||||
{command = "${pkgs.mate.mate-polkit}/libexec/polkit-mate-authentication-agent-1";}
|
||||
|
||||
# Foreground apps
|
||||
{command = "librewolf -P Misc --name=MiscBrowser";}
|
||||
{command = "vesktop";}
|
||||
{command = "fractal";}
|
||||
{command = "thunderbird";}
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
39
modules/home/sway/default.nix
Normal file
39
modules/home/sway/default.nix
Normal file
|
@ -0,0 +1,39 @@
|
|||
{ config, pkgs, outputs, ... }:
|
||||
{
|
||||
imports = [
|
||||
./hardware
|
||||
./theme
|
||||
./hotkeys
|
||||
./rules
|
||||
./autostart
|
||||
./waybar
|
||||
./swayshot
|
||||
./swaylock
|
||||
./swayfx
|
||||
];
|
||||
|
||||
# Enable Sway and write some scripts
|
||||
wayland.windowManager.sway = {
|
||||
enable = true;
|
||||
package = null;
|
||||
wrapperFeatures.gtk = true;
|
||||
checkConfig = false;
|
||||
extraConfig = ''
|
||||
# Options I can't find in Nix yet
|
||||
default_floating_border pixel ${outputs.look.border.string}
|
||||
hide_edge_borders --i3 smart
|
||||
titlebar_padding 10 1
|
||||
primary_selection disabled
|
||||
|
||||
# Include extra window icons
|
||||
include ${pkgs.fetchurl {
|
||||
url = "https://raw.githubusercontent.com/iguanajuice/sway-font-awesome/6b7a9d08974eea1b9cddb8d444e1c89d6837083a/icons";
|
||||
sha256 = "09ki5qw1h91kd33k3fwzq7cb6ck8sq4haswgizrsy387sfr2a75x";
|
||||
}}
|
||||
|
||||
# Switch to workspace 1
|
||||
workspace ${outputs.ws.w7}
|
||||
workspace ${outputs.ws.w1}
|
||||
'';
|
||||
};
|
||||
}
|
52
modules/home/sway/hardware/default.nix
Normal file
52
modules/home/sway/hardware/default.nix
Normal file
|
@ -0,0 +1,52 @@
|
|||
{ pkgs, outputs, ... }:
|
||||
{
|
||||
wayland.windowManager.sway = {
|
||||
config = {
|
||||
# Define monitors
|
||||
output = {
|
||||
${outputs.displays.d1} = {
|
||||
pos = "1920 405";
|
||||
mode = "1920x1080@143.980Hz";
|
||||
max_render_time = "3";
|
||||
bg = "~/.wallpapers/1.png fill";
|
||||
adaptive_sync = "on";
|
||||
#tearing_allowed = "1";
|
||||
};
|
||||
${outputs.displays.d2} = {
|
||||
pos = "0 405";
|
||||
mode = "1920x1080@60Hz";
|
||||
max_render_time = "3";
|
||||
bg = "~/.wallpapers/2.png fill";
|
||||
};
|
||||
${outputs.displays.d3} = {
|
||||
pos = "3840 0";
|
||||
mode = "1680x1050@59.883Hz";
|
||||
transform = "270";
|
||||
max_render_time = "3";
|
||||
bg = "~/.wallpapers/3.png fill";
|
||||
};
|
||||
"*" = {
|
||||
bg = "~/.wallpapers/1.png fill";
|
||||
};
|
||||
};
|
||||
|
||||
# HID device config
|
||||
input = {
|
||||
"9610:4103:SINOWEALTH_Game_Mouse" = {
|
||||
pointer_accel = "-0.9";
|
||||
};
|
||||
"9639:64097:Compx_2.4G_Receiver_Mouse" = {
|
||||
pointer_accel = "-0.82";
|
||||
};
|
||||
"1452:627:bcm5974" = {
|
||||
scroll_factor = "0.3";
|
||||
};
|
||||
"*" = {
|
||||
accel_profile = "flat";
|
||||
dwt = "disabled";
|
||||
natural_scroll = "disabled";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
84
modules/home/sway/hotkeys/README.md
Normal file
84
modules/home/sway/hotkeys/README.md
Normal file
|
@ -0,0 +1,84 @@
|
|||
# Sway Window Manager Hotkeys
|
||||
|
||||
## Application Launchers
|
||||
| Key Combination | Action |
|
||||
|----------------------|-------------------------------------------|
|
||||
| Win + F1 | Launch **LibreWolf** (Jim profile) |
|
||||
| Win + F2 | Launch **LibreWolf** (Alt profile) |
|
||||
| Win + F3 | Launch **LibreWolf** (Misc profile) |
|
||||
| Win + F4 | Launch **Discord** |
|
||||
| Win + F5 | Launch **Steam** |
|
||||
| Win + F6 | Launch **Heroic Games** |
|
||||
| Win + F7 | Launch **Looking Glass** VM Client |
|
||||
| Win + F10 | Launch **Virt-Manager** |
|
||||
| Win + F11 | Open **Rofi Scratchpads** |
|
||||
| Win + F12 | Open **NixOS Configuration Files** |
|
||||
|
||||
## Window Management
|
||||
| Key Combination | Action |
|
||||
|----------------------|-------------------------------------------|
|
||||
| Win + Arrows | Focus in the specified direction |
|
||||
| Win + Shift + Arrows | Move window in the specified direction |
|
||||
| Win + Shift + Space | Toggle window floating |
|
||||
| Win + Space | Switch focus between floating/tiled |
|
||||
| Win + Shift + {1-9} | Move window to a workspace and focus |
|
||||
| Win + {1-9} | Switch to specified workspace |
|
||||
| Win + 0 | Pin window and toggle border |
|
||||
| Win + F | Toggle fullscreen |
|
||||
| Win + Shift + R | Reload configuration |
|
||||
| Win + Q | Close the current window |
|
||||
|
||||
## Layout Management
|
||||
| Key Combination | Action |
|
||||
|----------------------|-------------------------------------------|
|
||||
| Win + W | Toggle split layout |
|
||||
| Win + E | Toggle tabbed/stacking layout |
|
||||
| Win + H/V | Split window horizontally/vertically |
|
||||
| Win + A/D | Focus parent/child container |
|
||||
|
||||
## Volume and Media Controls
|
||||
| Key Combination | Action |
|
||||
|----------------------|-------------------------------------------|
|
||||
| XF86AudioRaiseVolume | Raise system volume |
|
||||
| XF86AudioLowerVolume | Lower system volume |
|
||||
| XF86AudioMute | Mute/unmute audio |
|
||||
| XF86AudioPlay | Toggle media playback |
|
||||
| XF86AudioNext | Skip to the next track |
|
||||
| XF86AudioPrev | Go to the previous track |
|
||||
|
||||
## Screenshot and Brightness Controls
|
||||
| Key Combination | Action |
|
||||
|----------------------|-------------------------------------------|
|
||||
| Print | Take a screenshot |
|
||||
| Shift + Print | Screenshot of the current window |
|
||||
| Brightness Up + Down | Change screen brightness |
|
||||
|
||||
## Scratchpads
|
||||
| Key Combination | Action |
|
||||
|----------------------|-------------------------------------------|
|
||||
| Ctrl + Shift + Escape | Open **Gotop** (monitoring) |
|
||||
| Win + Shift + M | Open **Music** scratchpad |
|
||||
| Win + Shift + V | Open **Sound Settings** scratchpad |
|
||||
| Win + Shift + Backslash | Open **EasyEffects** scratchpad |
|
||||
|
||||
## Special Sway Tools
|
||||
| Key Combination | Action |
|
||||
|----------------------|-------------------------------------------|
|
||||
| Win + Escape | **Kill** selected window |
|
||||
| Win + Ctrl + X | **Inspect** window properties |
|
||||
| Win + Ctrl + Prior/Next | Switch OBS scene to **Main**/**Guest** |
|
||||
|
||||
## Miscellaneous
|
||||
| Key Combination | Action |
|
||||
|----------------------|-------------------------------------------|
|
||||
| Win + Return | Open **Foot terminal** |
|
||||
| Win + S | Open **Rofi (run commands)** |
|
||||
| Win + C | Open **Clipman (clipboard manager)** |
|
||||
| Win + X | Open **Power Menu** |
|
||||
| Win + B | Show/Hide **Waybar** |
|
||||
|
||||
## Workspaces (Alternate)
|
||||
| Key Combination | Action |
|
||||
|----------------------|-------------------------------------------|
|
||||
| Alt + F1-F9 | Switch to alternate workspace |
|
||||
| Alt + Shift + F1-F9 | Move window to alt workspace and focus |
|
270
modules/home/sway/hotkeys/default.nix
Normal file
270
modules/home/sway/hotkeys/default.nix
Normal file
|
@ -0,0 +1,270 @@
|
|||
{ pkgs, outputs, ... }:
|
||||
{
|
||||
wayland.windowManager.sway = {
|
||||
config = let
|
||||
# Set default modifier and variables
|
||||
primeMod = "Mod4";
|
||||
secMod = "Mod1";
|
||||
resizeAmount = ''55'';
|
||||
sendNotif = ''notify-send --expire-time=1500'';
|
||||
in {
|
||||
# Hotkeys
|
||||
modifier = "${primeMod}";
|
||||
keybindings = let
|
||||
# Define scripts specific to Sway
|
||||
pinWindow = pkgs.writeScript "pin-window" ''
|
||||
# Get the current border style of the focused window
|
||||
current_style=$(swaymsg -t get_tree | jq -r '.. | select(.focused?).border')
|
||||
|
||||
# Toggle between "normal" (default) and "pixel ${outputs.look.border.string}" border styles
|
||||
if [ "$current_style" == "none" ]; then
|
||||
swaymsg "sticky disable, border pixel ${outputs.look.border.string}"
|
||||
else
|
||||
swaymsg "sticky enable, border none"
|
||||
fi
|
||||
'';
|
||||
|
||||
# Kill a window or probe it for info
|
||||
swayTools = pkgs.writeScript "swaytools" ''
|
||||
# List the app name and whether or not it uses wayland
|
||||
swayprop() {
|
||||
selected_window=$(swaymsg -t get_tree | jq -r '.. | select(.pid? and .visible?) | "\(.rect.x),\(.rect.y) \(.rect.width)x\(.rect.height)"' | slurp -r -c ${outputs.look.colors.prime} -B 00000066 -b 00000000)
|
||||
if [ -n "$selected_window" ]; then
|
||||
app_id=$(swaymsg -t get_tree | jq -r '.. | select(.pid? and .visible?) | select("\(.rect.x),\(.rect.y) \(.rect.width)x\(.rect.height)" == "'"$selected_window"'") | .app_id')
|
||||
system=$(sed 's/xdg_shell/Wayland/g; s/xwayland/Xorg/g' < <(swaymsg -t get_tree | jq -r '.. | select(.pid? and .visible?) | select("\(.rect.x),\(.rect.y) \(.rect.width)x\(.rect.height)" == "'"$selected_window"'") | .shell'))
|
||||
notify-send "$(echo -e "Window's app_id: $app_id\nWindow System: $system")"
|
||||
fi
|
||||
}
|
||||
|
||||
# Kill a selected window
|
||||
swaykill() {
|
||||
selected_window=$(swaymsg -t get_tree | jq -r '.. | select(.pid? and .visible?) | "\(.rect.x),\(.rect.y) \(.rect.width)x\(.rect.height)"' | slurp -r -c ${outputs.look.colors.prime} -B 00000066 -b 00000000)
|
||||
if [ -n "$selected_window" ]; then
|
||||
pid=$(swaymsg -t get_tree | jq -r '.. | select(.pid? and .visible?) | select("\(.rect.x),\(.rect.y) \(.rect.width)x\(.rect.height)" == "'"$selected_window"'") | .pid')
|
||||
kill -9 "$pid"
|
||||
fi
|
||||
}
|
||||
|
||||
# Handle which tool we use
|
||||
if [ "$1" == "--prop" ]; then
|
||||
swayprop
|
||||
elif [ "$1" == "--kill" ]; then
|
||||
swaykill
|
||||
fi
|
||||
'';
|
||||
in {
|
||||
## Launcher keys
|
||||
|
||||
# LibreWolf profiles
|
||||
"${primeMod}+F1" = ''exec librewolf -P Jimbo --name=JimBrowser | ${sendNotif} "Main Browser"'';
|
||||
"${primeMod}+F2" = ''exec librewolf -P Alt --name=AltBrowser | ${sendNotif} "Alternate Browser"'';
|
||||
"${primeMod}+F3" = ''exec librewolf -P Misc --name=MiscBrowser | ${sendNotif} "Miscellaneous Browser"'';
|
||||
|
||||
# Discord
|
||||
"${primeMod}+F4" = ''exec vesktop --ozone-platform-hint=auto | ${sendNotif} "Discord"'';
|
||||
|
||||
# Games
|
||||
"${primeMod}+F5" = ''exec steam | ${sendNotif} "Steam"'';
|
||||
"${primeMod}+F6" = ''exec heroic | ${sendNotif} "Heroic Games"'';
|
||||
|
||||
# Looking glass for VMs
|
||||
"${primeMod}+F7" = ''exec looking-glass-client input:rawMouse=yes | ${sendNotif} "Looking Glass"'';
|
||||
|
||||
# Virtual Machines
|
||||
"${primeMod}+F10" = ''exec virt-manager | ${sendNotif} "Virtual Machines"'';
|
||||
|
||||
# BeMenu scripts
|
||||
"${primeMod}+F11" = ''exec rofiscripts --scratchpads | ${sendNotif} "Scratchpads"'';
|
||||
"${primeMod}+${secMod}+Ctrl+r" = ''exec rofiscripts --resolutions'';
|
||||
|
||||
# Open NixOS configuration files
|
||||
"${primeMod}+F12" = ''exec foot ${outputs.cmd.nixcfg} | ${sendNotif} "Nix Config"'';
|
||||
|
||||
# Terminal, rofi, clipmenu, media script, power menu, show/hide waybar
|
||||
"${primeMod}+Return" = ''exec foot'';
|
||||
"${primeMod}+s" = ''exec rofi -show run -p Command'';
|
||||
"${primeMod}+c" = ''exec clipman pick -t rofi'';
|
||||
"${primeMod}+x" = ''exec rofiscripts --power'';
|
||||
"${primeMod}+b" = ''exec pkill -USR1 waybar'';
|
||||
"${primeMod}+Escape" = ''exec ${swayTools} --kill'';
|
||||
|
||||
# PCManFM, Emoji Picker, Rofi Launcher, Bluetooth, Ranger
|
||||
"${primeMod}+Shift+t" = ''exec pcmanfm-qt'';
|
||||
"${primeMod}+Shift+e" = ''exec BEMOJI_PICKER_CMD="rofi -dmenu -i -p Emoji" bemoji -n -P 0'';
|
||||
"${primeMod}+Shift+s" = ''exec rofi -show drun -modi drun -drun-display-format {name} -show-icons -disable-history'';
|
||||
"${primeMod}+Shift+b" = ''exec rofi-bluetooth'';
|
||||
"${primeMod}+Shift+Return" = ''exec foot ranger'';
|
||||
|
||||
# Swaytools prop, colorpicker, obs-cmd
|
||||
"${primeMod}+Ctrl+x" = ''exec ${swayTools} --prop'';
|
||||
"${primeMod}+Ctrl+c" = ''exec ${pkgs.hyprpicker}/bin/hyprpicker -an && ${sendNotif} "Color copied to clipboard"'';
|
||||
"${primeMod}+Ctrl+Prior" = ''exec ${pkgs.obs-cmd}/bin/obs-cmd scene switch "Main"'';
|
||||
"${primeMod}+Ctrl+Next" = ''exec ${pkgs.obs-cmd}/bin/obs-cmd scene switch "Guest"'';
|
||||
|
||||
## Media keys
|
||||
|
||||
# Volume control
|
||||
"XF86AudioRaiseVolume" = ''exec wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+'';
|
||||
"XF86AudioLowerVolume" = ''exec wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-'';
|
||||
|
||||
# MPV volume control
|
||||
"${secMod}+XF86AudioRaiseVolume" = ''exec mpc volume +3'';
|
||||
"${secMod}+XF86AudioLowerVolume" = ''exec mpc volume -3'';
|
||||
|
||||
# Mute, Stop
|
||||
"XF86AudioMute" = ''exec wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle'';
|
||||
"XF86AudioStop" = ''exec mpc stop'';
|
||||
|
||||
# Play MPD, Firefox, or MPV
|
||||
"XF86AudioPlay" = ''exec mpc toggle'';
|
||||
"${secMod}+XF86AudioPlay" = ''exec playerctl --player=librewolf play-pause'';
|
||||
"Ctrl+XF86AudioPlay" = ''exec playerctl --player=mpv play-pause'';
|
||||
|
||||
# Next/Previous
|
||||
"XF86AudioNext" = ''exec mpc next'';
|
||||
"XF86AudioPrev" = ''exec mpc prev'';
|
||||
|
||||
# Seek
|
||||
"${secMod}+Shift+XF86AudioNext" = ''exec mpc seek +5'';
|
||||
"${secMod}+Shift+XF86AudioPrev" = ''exec mpc seek -5'';
|
||||
|
||||
## Notification keys
|
||||
|
||||
# Toggle mako
|
||||
"${primeMod}+n" = ''exec makotoggle'';
|
||||
"${primeMod}+Shift+n" = ''exec makoctl restore'';
|
||||
"${primeMod}+Ctrl+n" = ''exec makoctl dismiss -a'';
|
||||
|
||||
## Miscellaneous keys
|
||||
|
||||
# Screenshots
|
||||
"Print" = ''exec swayshot --swappy'';
|
||||
"${primeMod}+Shift+f" = ''exec swayshot --swappy'';
|
||||
"Shift+Print" = ''exec swayshot --screen'';
|
||||
|
||||
# Server SSH
|
||||
"${primeMod}+Ctrl+Return" = ''exec foot ssh ${outputs.ips.server} -p 2222'';
|
||||
|
||||
# Display Brightness and Keyboard Brightness
|
||||
"XF86MonBrightnessUp" = ''exec light -A 5'';
|
||||
"XF86MonBrightnessDown" = ''exec light -U 5'';
|
||||
"Shift+XF86MonBrightnessUp" = ''exec light -A 1'';
|
||||
"Shift+XF86MonBrightnessDown" = ''exec light -U 1'';
|
||||
"XF86KbdBrightnessUp" = ''exec light -s sysfs/leds/smc::kbd_backlight -A 5'';
|
||||
"XF86KbdBrightnessDown" = ''exec light -s sysfs/leds/smc::kbd_backlight -U 5'';
|
||||
|
||||
## Window manager keys
|
||||
"${primeMod}+q" = ''kill'';
|
||||
"${primeMod}+Shift+r" = ''reload'';
|
||||
|
||||
# Switch to workspaces
|
||||
"${primeMod}+grave" = ''workspace ${outputs.ws.w0}'';
|
||||
"${primeMod}+1" = ''workspace ${outputs.ws.w1}'';
|
||||
"${primeMod}+2" = ''workspace ${outputs.ws.w2}'';
|
||||
"${primeMod}+3" = ''workspace ${outputs.ws.w3}'';
|
||||
"${primeMod}+4" = ''workspace ${outputs.ws.w4}'';
|
||||
"${primeMod}+5" = ''workspace ${outputs.ws.w5}'';
|
||||
"${primeMod}+6" = ''workspace ${outputs.ws.w6}'';
|
||||
"${primeMod}+7" = ''workspace ${outputs.ws.w7}'';
|
||||
"${primeMod}+8" = ''workspace ${outputs.ws.w8}'';
|
||||
"${primeMod}+9" = ''workspace ${outputs.ws.w9}'';
|
||||
|
||||
# Switch to alternate workspaces
|
||||
"${secMod}+F1" = ''workspace ${outputs.ws.w1a}'';
|
||||
"${secMod}+F2" = ''workspace ${outputs.ws.w2a}'';
|
||||
"${secMod}+F3" = ''workspace ${outputs.ws.w3a}'';
|
||||
"${secMod}+F4" = ''workspace ${outputs.ws.w4a}'';
|
||||
"${secMod}+F5" = ''workspace ${outputs.ws.w5a}'';
|
||||
"${secMod}+F6" = ''workspace ${outputs.ws.w6a}'';
|
||||
"${secMod}+F7" = ''workspace ${outputs.ws.w7a}'';
|
||||
"${secMod}+F8" = ''workspace ${outputs.ws.w8a}'';
|
||||
"${secMod}+F9" = ''workspace ${outputs.ws.w9a}'';
|
||||
|
||||
# Move window to and focus new workspace
|
||||
"${primeMod}+Shift+grave" = ''move container to workspace ${outputs.ws.w0}; workspace ${outputs.ws.w0}'';
|
||||
"${primeMod}+Shift+1" = ''move container to workspace ${outputs.ws.w1}; workspace ${outputs.ws.w1}'';
|
||||
"${primeMod}+Shift+2" = ''move container to workspace ${outputs.ws.w2}; workspace ${outputs.ws.w2}'';
|
||||
"${primeMod}+Shift+3" = ''move container to workspace ${outputs.ws.w3}; workspace ${outputs.ws.w3}'';
|
||||
"${primeMod}+Shift+4" = ''move container to workspace ${outputs.ws.w4}; workspace ${outputs.ws.w4}'';
|
||||
"${primeMod}+Shift+5" = ''move container to workspace ${outputs.ws.w5}; workspace ${outputs.ws.w5}'';
|
||||
"${primeMod}+Shift+6" = ''move container to workspace ${outputs.ws.w6}; workspace ${outputs.ws.w6}'';
|
||||
"${primeMod}+Shift+7" = ''move container to workspace ${outputs.ws.w7}; workspace ${outputs.ws.w7}'';
|
||||
"${primeMod}+Shift+8" = ''move container to workspace ${outputs.ws.w8}; workspace ${outputs.ws.w8}'';
|
||||
"${primeMod}+Shift+9" = ''move container to workspace ${outputs.ws.w9}; workspace ${outputs.ws.w9}'';
|
||||
|
||||
# Move window to and focus new alternate workspace
|
||||
"${secMod}+Shift+F1" = ''move container to workspace ${outputs.ws.w1a}; workspace ${outputs.ws.w1a}'';
|
||||
"${secMod}+Shift+F2" = ''move container to workspace ${outputs.ws.w2a}; workspace ${outputs.ws.w2a}'';
|
||||
"${secMod}+Shift+F3" = ''move container to workspace ${outputs.ws.w3a}; workspace ${outputs.ws.w3a}'';
|
||||
"${secMod}+Shift+F4" = ''move container to workspace ${outputs.ws.w4a}; workspace ${outputs.ws.w4a}'';
|
||||
"${secMod}+Shift+F5" = ''move container to workspace ${outputs.ws.w5a}; workspace ${outputs.ws.w5a}'';
|
||||
"${secMod}+Shift+F6" = ''move container to workspace ${outputs.ws.w6a}; workspace ${outputs.ws.w6a}'';
|
||||
"${secMod}+Shift+F7" = ''move container to workspace ${outputs.ws.w7a}; workspace ${outputs.ws.w7a}'';
|
||||
"${secMod}+Shift+F8" = ''move container to workspace ${outputs.ws.w8a}; workspace ${outputs.ws.w8a}'';
|
||||
"${secMod}+Shift+F9" = ''move container to workspace ${outputs.ws.w9a}; workspace ${outputs.ws.w9a}'';
|
||||
|
||||
# Change focus across windows
|
||||
"${primeMod}+Up" = ''focus up'';
|
||||
"${primeMod}+Down" = ''focus down'';
|
||||
"${primeMod}+Left" = ''focus left'';
|
||||
"${primeMod}+Right" = ''focus right'';
|
||||
|
||||
# Switch focus across outputs
|
||||
"${primeMod}+j" = ''focus output ${outputs.displays.d2}'';
|
||||
"${primeMod}+k" = ''focus output ${outputs.displays.d1}'';
|
||||
"${primeMod}+l" = ''focus output ${outputs.displays.d3}'';
|
||||
|
||||
# Move focused window
|
||||
"${primeMod}+Shift+Up" = ''move up ${resizeAmount} px'';
|
||||
"${primeMod}+Shift+Down" = ''move down ${resizeAmount} px'';
|
||||
"${primeMod}+Shift+Left" = ''move left ${resizeAmount} px'';
|
||||
"${primeMod}+Shift+Right" = ''move right ${resizeAmount} px'';
|
||||
|
||||
# Move window across outputs
|
||||
"${primeMod}+Shift+j" = ''move output ${outputs.displays.d2}; focus output ${outputs.displays.d2}'';
|
||||
"${primeMod}+Shift+k" = ''move output ${outputs.displays.d1}; focus output ${outputs.displays.d1}'';
|
||||
"${primeMod}+Shift+l" = ''move output ${outputs.displays.d3}; focus output ${outputs.displays.d3}'';
|
||||
|
||||
# Change focus between floating/tiled, toggle floating
|
||||
"${primeMod}+space" = ''focus mode_toggle'';
|
||||
"${primeMod}+Shift+space" = ''floating toggle'';
|
||||
|
||||
# Allow a window to be visible on all workspaces, toggle border
|
||||
"${primeMod}+0" = ''exec ${pinWindow}'';
|
||||
|
||||
# Toggle fullscreen
|
||||
"${primeMod}+f" = ''fullscreen toggle'';
|
||||
"${primeMod}+${secMod}+Ctrl+f" = ''fullscreen toggle global'';
|
||||
|
||||
# Change container layout
|
||||
"${primeMod}+w" = ''layout toggle split'';
|
||||
"${primeMod}+e" = ''layout toggle tabbed stacking'';
|
||||
|
||||
# Change split direction
|
||||
"${primeMod}+h" = ''split h'';
|
||||
"${primeMod}+v" = ''split v'';
|
||||
|
||||
# Focus parent / child
|
||||
"${primeMod}+a" = ''focus parent'';
|
||||
"${primeMod}+d" = ''focus child'';
|
||||
|
||||
# Resize windows
|
||||
"${primeMod}+${secMod}+Up" = ''resize grow height ${resizeAmount} px or 5 ppt'';
|
||||
"${primeMod}+${secMod}+Down" = ''resize shrink height ${resizeAmount} px or 5 ppt'';
|
||||
"${primeMod}+${secMod}+Left" = ''resize shrink width ${resizeAmount} px or 5 ppt'';
|
||||
"${primeMod}+${secMod}+Right" = ''resize grow width ${resizeAmount} px or 5 ppt'';
|
||||
|
||||
# Adjust gap size
|
||||
"${primeMod}+Shift+equal" = ''gaps inner current set 5'';
|
||||
"${primeMod}+equal" = ''gaps inner current plus 5'';
|
||||
"${primeMod}+minus" = ''gaps inner current minus 5'';
|
||||
|
||||
# Scratchpads
|
||||
"Ctrl+Shift+Escape" = ''[app_id="gotop"] scratchpad show, move position center, resize set 1216 888'';
|
||||
"${primeMod}+Shift+m" = ''[app_id="music"] scratchpad show, move position center, resize set 1006 657'';
|
||||
"${primeMod}+Shift+v" = ''[app_id="sound"] scratchpad show, move position center, resize set 1000 800'';
|
||||
"${primeMod}+Shift+Backslash" = ''[app_id="com.github.wwmm.easyeffects"] scratchpad show, move position center, resize set 1000 800'';
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
14
modules/home/sway/programs/default.nix
Normal file
14
modules/home/sway/programs/default.nix
Normal file
|
@ -0,0 +1,14 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
wl-clipboard
|
||||
wdisplays
|
||||
clipman
|
||||
libnotify
|
||||
grim
|
||||
slurp
|
||||
swappy
|
||||
jq
|
||||
lm_sensors
|
||||
];
|
||||
}
|
132
modules/home/sway/rules/default.nix
Normal file
132
modules/home/sway/rules/default.nix
Normal file
|
@ -0,0 +1,132 @@
|
|||
{ pkgs, outputs, ... }:
|
||||
{
|
||||
wayland.windowManager.sway = {
|
||||
config = {
|
||||
# Assign workspaces to outputs
|
||||
workspaceOutputAssign = let
|
||||
workspaces1 = [
|
||||
"${outputs.ws.w0}"
|
||||
"${outputs.ws.w1}"
|
||||
"${outputs.ws.w2}"
|
||||
"${outputs.ws.w3}"
|
||||
"${outputs.ws.w1a}"
|
||||
"${outputs.ws.w2a}"
|
||||
"${outputs.ws.w3a}"
|
||||
];
|
||||
workspaces2 = [
|
||||
"${outputs.ws.w4}"
|
||||
"${outputs.ws.w5}"
|
||||
"${outputs.ws.w6}"
|
||||
"${outputs.ws.w4a}"
|
||||
"${outputs.ws.w5a}"
|
||||
"${outputs.ws.w6a}"
|
||||
];
|
||||
workspaces3 = [
|
||||
"${outputs.ws.w7}"
|
||||
"${outputs.ws.w8}"
|
||||
"${outputs.ws.w9}"
|
||||
"${outputs.ws.w7a}"
|
||||
"${outputs.ws.w8a}"
|
||||
"${outputs.ws.w9a}"
|
||||
];
|
||||
assign = output: workspaces:
|
||||
map (workspace: {
|
||||
inherit workspace;
|
||||
inherit output;
|
||||
})
|
||||
workspaces;
|
||||
in
|
||||
(assign "${outputs.displays.d1}" workspaces1) ++
|
||||
(assign "${outputs.displays.d2}" workspaces2) ++
|
||||
(assign "${outputs.displays.d3}" workspaces3);
|
||||
|
||||
# Rules
|
||||
window = {
|
||||
border = outputs.look.border.int;
|
||||
titlebar = false;
|
||||
commands = [
|
||||
# Scratchpads
|
||||
{
|
||||
criteria = {con_mark = "scratchpad";};
|
||||
command = ''floating enable, sticky enable, move scratchpad, mark borderless'';
|
||||
}
|
||||
{
|
||||
criteria = {app_id = "gotop";};
|
||||
command = ''mark scratchpad'';
|
||||
}
|
||||
{
|
||||
criteria = {app_id = "music";};
|
||||
command = ''mark scratchpad'';
|
||||
}
|
||||
{
|
||||
criteria = {app_id = "sound";};
|
||||
command = ''mark scratchpad'';
|
||||
}
|
||||
{
|
||||
criteria = {app_id = "com.github.wwmm.easyeffects";};
|
||||
command = ''mark scratchpad, opacity 0.9'';
|
||||
}
|
||||
|
||||
# Create a "Scratchpad" for apps I don't want to be seen when launched
|
||||
{
|
||||
criteria = {con_mark = "hiddenaway";};
|
||||
command = ''move scratchpad'';
|
||||
}
|
||||
|
||||
# Give apps that don't have them borders
|
||||
{
|
||||
criteria = {con_mark = "borderless";};
|
||||
command = ''border pixel ${outputs.look.border.string}'';
|
||||
}
|
||||
{
|
||||
criteria = {app_id = "com.github.wwmm.easyeffects";};
|
||||
command = ''mark borderless'';
|
||||
}
|
||||
{
|
||||
criteria = {class = "steam";};
|
||||
command = ''mark borderless'';
|
||||
}
|
||||
{
|
||||
criteria = {app_id = "swappy";};
|
||||
command = ''mark borderless'';
|
||||
}
|
||||
{
|
||||
criteria = {app_id = "virt-manager";};
|
||||
command = ''mark borderless'';
|
||||
}
|
||||
{
|
||||
criteria = {window_role = "pop-up";};
|
||||
command = ''mark borderless'';
|
||||
}
|
||||
|
||||
# Floating or fullscreen rules
|
||||
{
|
||||
criteria = {app_id = "float";};
|
||||
command = ''floating enable'';
|
||||
}
|
||||
{
|
||||
criteria = {title = "^GlobalShot";};
|
||||
command = ''floating enable, fullscreen enable global'';
|
||||
}
|
||||
];
|
||||
};
|
||||
assigns = {
|
||||
# Brooutputs.wsers
|
||||
"${outputs.ws.w1}" = [{app_id = "JimBrowser";}];
|
||||
"${outputs.ws.w1a}" = [{app_id = "AltBrowser";}];
|
||||
|
||||
# Communication
|
||||
"${outputs.ws.w3a}" = [{class = "zoom";}];
|
||||
"${outputs.ws.w7}" = [{app_id = "MiscBrowser";} {app_id = "vesktop";} {class = "vesktop";}];
|
||||
"${outputs.ws.w8}" = [{app_id = "org.gnome.Fractal";}];
|
||||
"${outputs.ws.w9}" = [{app_id = "thunderbird";}];
|
||||
|
||||
# Else
|
||||
"${outputs.ws.w2}" = [{class = "steam";} {app_id = "heroic";}];
|
||||
"${outputs.ws.w2a}" = [{app_id = "looking-glass-client";}];
|
||||
"${outputs.ws.w4a}" = [{app_id = "com.obsproject.Studio";}];
|
||||
};
|
||||
focus.newWindow = "focus";
|
||||
};
|
||||
};
|
||||
}
|
13
modules/home/sway/swayfx/default.nix
Normal file
13
modules/home/sway/swayfx/default.nix
Normal file
|
@ -0,0 +1,13 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
wayland.windowManager.sway = {
|
||||
package = pkgs.unstable.sway;
|
||||
extraConfig = ''
|
||||
blur enable
|
||||
blur_passes 3
|
||||
blur_radius 5
|
||||
layer_effects 'rofi' blur enable
|
||||
layer_effects 'notifications' blur enable; blur_ignore_transparent enable
|
||||
'';
|
||||
};
|
||||
}
|
64
modules/home/sway/swaylock/default.nix
Normal file
64
modules/home/sway/swaylock/default.nix
Normal file
|
@ -0,0 +1,64 @@
|
|||
{ pkgs, outputs, ... }:
|
||||
let
|
||||
swayLock = pkgs.writeScriptBin "swaylock" ''
|
||||
# Set the lock script
|
||||
lockscript() {
|
||||
BLANK='#00000000'
|
||||
CLEAR='#FFFFFF22'
|
||||
DEFAULT='#${outputs.look.colors.prime}FF'
|
||||
TEXT='#FFFFFFFF'
|
||||
WRONG='#${outputs.look.colors.split}FF'
|
||||
VERIFYING='#${outputs.look.colors.accent}FF'
|
||||
|
||||
${pkgs.swaylock-effects}/bin/swaylock -f -e \
|
||||
--key-hl-color=$VERIFYING \
|
||||
--bs-hl-color=$WRONG \
|
||||
\
|
||||
--ring-clear-color=$CLEAR \
|
||||
--ring-ver-color=$VERIFYING \
|
||||
--ring-wrong-color=$WRONG \
|
||||
--ring-color=$DEFAULT \
|
||||
--ring-clear-color=$VERIFYING \
|
||||
\
|
||||
--inside-color=$CLEAR \
|
||||
--inside-ver-color=$CLEAR \
|
||||
--inside-wrong-color=$CLEAR \
|
||||
--inside-clear-color=$CLEAR \
|
||||
\
|
||||
--text-color=$TEXT \
|
||||
--text-clear-color=$TEXT \
|
||||
--text-ver-color=$TEXT \
|
||||
--text-caps-lock-color=$TEXT \
|
||||
--text-wrong-color=$TEXT \
|
||||
\
|
||||
--indicator \
|
||||
--indicator-radius=80 \
|
||||
--image=~/.wallpapers/lock.png \
|
||||
--clock \
|
||||
--font=${outputs.look.fonts.main} \
|
||||
--font-size=30 \
|
||||
--timestr="%I:%M%p" \
|
||||
--datestr="%a %b %d %Y"
|
||||
}
|
||||
|
||||
# Handle whether to lock or sleep
|
||||
if [ "$1" == "--sleep" ]; then
|
||||
lockscript &
|
||||
exec ${pkgs.swayidle}/bin/swayidle -w \
|
||||
timeout 1 'swaymsg "output * dpms off"' \
|
||||
resume 'swaymsg "output * dpms on"; pkill -9 swayidle'
|
||||
else
|
||||
lockscript
|
||||
fi
|
||||
'';
|
||||
in {
|
||||
# Enable Sway and write some scripts
|
||||
home.packages = with pkgs; [
|
||||
swayLock
|
||||
];
|
||||
|
||||
# Enable Sway lock on startup
|
||||
wayland.windowManager.sway.config.startup = [
|
||||
{command = "swaylock";}
|
||||
];
|
||||
}
|
64
modules/home/sway/swayshot/default.nix
Normal file
64
modules/home/sway/swayshot/default.nix
Normal file
|
@ -0,0 +1,64 @@
|
|||
{ pkgs, outputs, ... }:
|
||||
{
|
||||
imports = [
|
||||
./swappy
|
||||
];
|
||||
|
||||
home.packages = let
|
||||
swayShot = pkgs.writeScriptBin "swayshot" ''
|
||||
# Swappy
|
||||
handle_swappy() {
|
||||
# Create an imv window to act as a static screen
|
||||
grim -t jpeg -q 90 - | imv -w "GlobalShot" - & imv_pid=$!
|
||||
|
||||
# Capture the screenshot of the selected area and save to a temporary file
|
||||
selected_area=$(swaymsg -t get_tree | jq -r '.. | select(.pid? and .visible?) | .rect | "\(.x),\(.y) \(.width)x\(.height)"'\
|
||||
| XCURSOR_SIZE=40 slurp -w ${outputs.look.border.string} -c ${outputs.look.colors.prime} -B 00000066 -b 00000099)
|
||||
temp_file=$(mktemp -u).png
|
||||
grim -g "$selected_area" "$temp_file"
|
||||
|
||||
# Kill the imv window
|
||||
kill $imv_pid
|
||||
|
||||
# Copy the screenshot to the clipboard
|
||||
swappy -f - < "$temp_file"
|
||||
|
||||
# Clean up the temporary file
|
||||
rm "$temp_file"
|
||||
}
|
||||
|
||||
# Screen
|
||||
handle_screen() {
|
||||
# Take a screenshot and save it to the temporary file
|
||||
temp_file=$(mktemp -u).png
|
||||
grim -o $(swaymsg -t get_outputs | jq -r '.[] | select(.focused) | .name') "$temp_file"
|
||||
|
||||
# Check if the screenshot was successfully taken
|
||||
if [ $? -eq 0 ]; then
|
||||
# Copy the screenshot to the clipboard
|
||||
wl-copy < "$temp_file"
|
||||
|
||||
# Show a notification with the screenshot
|
||||
notify-send -i "$temp_file" "Current screen copied."
|
||||
|
||||
# Remove the temporary file
|
||||
rm "$temp_file"
|
||||
else
|
||||
# If the screenshot capture failed, show an error notification
|
||||
notify-send "Error: Unable to capture screenshot."
|
||||
fi
|
||||
}
|
||||
|
||||
# Check for command-line arguments
|
||||
if [ "$1" == "--swappy" ]; then
|
||||
handle_swappy
|
||||
elif [ "$1" == "--screen" ]; then
|
||||
handle_screen
|
||||
else
|
||||
echo "Please use the arguments --swappy or --screen."
|
||||
fi
|
||||
'';
|
||||
in with pkgs; [
|
||||
swayShot
|
||||
];
|
||||
}
|
15
modules/home/sway/swayshot/swappy/default.nix
Normal file
15
modules/home/sway/swayshot/swappy/default.nix
Normal file
|
@ -0,0 +1,15 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
home = {
|
||||
packages = with pkgs; [
|
||||
swappy
|
||||
];
|
||||
file = {
|
||||
".config/swappy/config".text = ''
|
||||
[Default]
|
||||
early_exit=true
|
||||
save_dir=$HOME/Pictures/Screenshots
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
48
modules/home/sway/theme/default.nix
Normal file
48
modules/home/sway/theme/default.nix
Normal file
|
@ -0,0 +1,48 @@
|
|||
{ config, pkgs, outputs, ... }:
|
||||
{
|
||||
wayland.windowManager.sway = {
|
||||
enable = true;
|
||||
wrapperFeatures.gtk = true;
|
||||
checkConfig = false;
|
||||
config = {
|
||||
colors = {
|
||||
focused = {
|
||||
border = "#${outputs.look.colors.prime}";
|
||||
background = "#${outputs.look.colors.prime}";
|
||||
text = "#FFFFFF";
|
||||
indicator = "#${outputs.look.colors.actSplit}";
|
||||
childBorder = "#${outputs.look.colors.prime}";
|
||||
};
|
||||
focusedInactive = {
|
||||
border = "#${outputs.look.colors.accent}";
|
||||
background = "#${outputs.look.colors.accent}";
|
||||
text = "#${outputs.look.colors.text}";
|
||||
indicator = "#${outputs.look.colors.split}";
|
||||
childBorder = "#${outputs.look.colors.accent}";
|
||||
};
|
||||
unfocused = {
|
||||
border = "#${outputs.look.colors.dark}";
|
||||
background = "#${outputs.look.colors.dark}";
|
||||
text = "#${outputs.look.colors.text}";
|
||||
indicator = "#${outputs.look.colors.split}";
|
||||
childBorder = "#${outputs.look.colors.split}";
|
||||
};
|
||||
urgent = {
|
||||
border = "#${outputs.look.colors.urgent}";
|
||||
background = "#${outputs.look.colors.urgent}";
|
||||
text = "#${outputs.look.colors.text}";
|
||||
indicator = "#${outputs.look.colors.urgent}";
|
||||
childBorder = "#${outputs.look.colors.urgent}";
|
||||
};
|
||||
};
|
||||
fonts = {
|
||||
names = ["${outputs.look.fonts.main}"];
|
||||
size = 10.5;
|
||||
};
|
||||
gaps = {
|
||||
inner = 5;
|
||||
smartGaps = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
479
modules/home/sway/waybar/default.nix
Normal file
479
modules/home/sway/waybar/default.nix
Normal file
|
@ -0,0 +1,479 @@
|
|||
{ pkgs, outputs, ... }:
|
||||
{
|
||||
programs.waybar = let
|
||||
swayWorkspacesModule = {
|
||||
format = "{name}";
|
||||
enable-bar-scroll = true;
|
||||
warp-on-scroll = false;
|
||||
disable-scroll-wraparound = true;
|
||||
};
|
||||
|
||||
swayWindowsModule = {
|
||||
icon = true;
|
||||
icon-size = 15;
|
||||
all-outputs = true;
|
||||
tooltip = false;
|
||||
rewrite = {
|
||||
"(.*) — LibreWolf" = " $1";
|
||||
"LibreWolf" = " Firefox";
|
||||
"(.*) - LibreWolf — Firefox" = " $1";
|
||||
};
|
||||
};
|
||||
|
||||
pulseModule = {
|
||||
format = "{icon} {volume}%";
|
||||
format-bluetooth = "{icon} {volume}%";
|
||||
format-muted = " muted";
|
||||
format-icons = {
|
||||
headphone = " ";
|
||||
headset = " ";
|
||||
default = [" " " "];
|
||||
};
|
||||
on-click = "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle";
|
||||
on-click-middle = "wpctl set-volume @DEFAULT_AUDIO_SINK@ 100%";
|
||||
on-click-right = "wpctl set-volume @DEFAULT_AUDIO_SINK@ 60%";
|
||||
ignored-sinks = ["Easy Effects Sink" "USB FS AUDIO Analog Stereo"];
|
||||
};
|
||||
|
||||
# CPU, Ram and Vram
|
||||
cpuModule = {
|
||||
format = " {usage}%";
|
||||
interval = 3;
|
||||
};
|
||||
ramModule = {
|
||||
format = " {used}G";
|
||||
tooltip = false;
|
||||
};
|
||||
vramModule = {
|
||||
exec = pkgs.writeScript "vramScript" ''
|
||||
# Don't run the script if running on integrated graphics
|
||||
if lspci -k | grep "Kernel driver in use: nvidia" &> /dev/null || lspci -k | grep "Kernel driver in use: amdgpu" &> /dev/null; then
|
||||
|
||||
# Run the nvidia-smi command and capture the VRAM usage and GPU utilization output
|
||||
if lspci -k | grep "Kernel driver in use: nvidia" &> /dev/null; then
|
||||
vram_usage_mb=$(nvidia-smi --query-gpu=memory.used --format=csv,noheader,nounits)
|
||||
temperature=$(nvidia-smi --query-gpu=temperature.gpu --format=csv,noheader,nounits)
|
||||
|
||||
# Check the drm memory if an AMD GPU is present
|
||||
elif lspci -k | grep "Kernel driver in use: amdgpu" &> /dev/null; then
|
||||
vram_usage_mb=$(echo "$(cat /sys/class/drm/card0/device/mem_info_vram_used || cat /sys/class/drm/card1/device/mem_info_vram_used) / 1024 / 1024" | bc)
|
||||
temperature=$(sensors | grep 'edge' | awk '{print $2}' | sed 's/[^0-9.-]//g')
|
||||
fi
|
||||
|
||||
# Check if VRAM usage is under 1GB
|
||||
if [ $vram_usage_mb -lt 1024 ]; then
|
||||
vram_usage_display="$(echo $vram_usage_mb)M"
|
||||
else
|
||||
# Convert MB to GiB
|
||||
vram_usage_gib=$(bc <<< "scale=2; $vram_usage_mb / 1024")
|
||||
vram_usage_display="$(echo $vram_usage_gib)G"
|
||||
fi
|
||||
|
||||
# Print the VRAM usage in MB or GiB, and include GPU utilization and temperature
|
||||
echo "{\"text\":\" $(echo $vram_usage_display)\",\"tooltip\":\"$(echo $temperature)°C\"}"
|
||||
else
|
||||
:
|
||||
fi
|
||||
'';
|
||||
format = "{}";
|
||||
return-type = "json";
|
||||
interval = 3;
|
||||
};
|
||||
|
||||
# Clocks
|
||||
longClockModule = {
|
||||
exec = pkgs.writeScript "longClock" ''
|
||||
# Long clock format, with a numeric date and military time tooltip
|
||||
time=$(date +'%a %b %d %l:%M:%S%p' | tr -s ' ')
|
||||
date=$(date "+%Y-%m-%d")
|
||||
echo "{\"text\":\" $time\",\"tooltip\":\"$date\"}"
|
||||
'';
|
||||
on-click = ''wl-copy $(date "+%Y-%m-%d-%H%M%S"); notify-send "Date copied."'';
|
||||
format = "{}";
|
||||
return-type = "json";
|
||||
interval = 1;
|
||||
tooltip = true;
|
||||
};
|
||||
shortClockModule = {
|
||||
exec = "echo ' '$(date +'%l:%M%p' | sed 's/^ //')";
|
||||
on-click = ''wl-copy $(date "+%Y-%m-%d-%H%M%S"); notify-send "Date copied."'';
|
||||
interval = 60;
|
||||
tooltip = false;
|
||||
};
|
||||
|
||||
# Tray, gamemode, bluetooth, and network tray modules
|
||||
trayModule = {
|
||||
spacing = 5;
|
||||
};
|
||||
networkModule = {
|
||||
format-ethernet = "";
|
||||
format-wifi = "";
|
||||
format-disconnected = "";
|
||||
format-linked = "";
|
||||
tooltip-format-ethernet = "{ipaddr}\n{ifname} ";
|
||||
tooltip-format-wifi = "{ipaddr}\n{essid} ({signalStrength}%)";
|
||||
tooltip-format-disconnected = "Disconnected";
|
||||
};
|
||||
bluetoothModule = {
|
||||
format = "";
|
||||
format-disabled = "";
|
||||
format-no-controller = "";
|
||||
tooltip-format-on = "No devices connected.";
|
||||
tooltip-format-connected = "{num_connections} connected\n{device_enumerate}";
|
||||
tooltip-format-enumerate-connected = "{device_alias}";
|
||||
tooltip-format-enumerate-connected-battery = "{device_alias} {device_battery_percentage}%";
|
||||
on-click = "rofi-bluetooth";
|
||||
};
|
||||
scratchpadModule = {
|
||||
format = " {count}";
|
||||
show-empty = false;
|
||||
tooltip = true;
|
||||
tooltip-format = "{title}";
|
||||
};
|
||||
gamemodeModule = {
|
||||
format = "{glyph}";
|
||||
glyph = "";
|
||||
hide-not-running = true;
|
||||
use-icon = true;
|
||||
icon-spacing = 3;
|
||||
icon-size = 19;
|
||||
tooltip = true;
|
||||
tooltip-format = "Gamemode On";
|
||||
};
|
||||
|
||||
# Special per-bar modules
|
||||
mediaModule = {
|
||||
exec-if = "mpc status | grep -q '^\\[playing\\] \\|^\\[paused\\]'";
|
||||
exec = pkgs.writeScript "mpvMetadata" ''
|
||||
get_metadata() {
|
||||
mpc --format "%file%" | head -n 1 | sed -E 's/\.(mp3|mp4|m4a|mov|flac|opus|oga)$//; s/&/&/g'
|
||||
}
|
||||
|
||||
truncate_string() {
|
||||
local str="$1"
|
||||
local max_length=30
|
||||
if [ $(expr length "$str") -gt $max_length ]; then
|
||||
str=$(expr substr "$str" 1 $max_length)...
|
||||
fi
|
||||
echo "$str"
|
||||
}
|
||||
|
||||
if mpc status 2>/dev/null | grep -q playing; then
|
||||
song_name=$(get_metadata | awk -F ' - ' '{print $2}')
|
||||
if [ -z "$song_name" ]; then
|
||||
song_name=$(get_metadata)
|
||||
fi
|
||||
echo "{\"text\":\"$(truncate_string " $song_name")\",\"tooltip\":\"$(get_metadata)\"}"
|
||||
elif mpc status 2>/dev/null | grep -q paused; then
|
||||
artist_name=$(get_metadata | awk -F ' - ' '{print $1}')
|
||||
if [ -z "$artist_name" ]; then
|
||||
artist_name=$(get_metadata)
|
||||
fi
|
||||
echo "{\"text\":\"$(truncate_string " $artist_name")\",\"tooltip\":\"$(get_metadata)\",\"class\":\"paused\"}"
|
||||
fi
|
||||
'';
|
||||
format = "{}";
|
||||
return-type = "json";
|
||||
interval = 2;
|
||||
max-length = 30;
|
||||
on-click = "mpc toggle";
|
||||
};
|
||||
notificationModule = {
|
||||
exec = pkgs.writeScript "notificationScript" ''
|
||||
# Run makoctl mode and store the output in a variable
|
||||
mode_output=$(makoctl mode)
|
||||
|
||||
# Extract the second line after "default"
|
||||
mode_line=$(echo "$mode_output" | sed -n '/default/{n;p}')
|
||||
|
||||
# Print the notification status with the tooltip
|
||||
if [[ "$mode_line" == "do-not-disturb" ]]; then
|
||||
printf '{"text":" Off","class":"disabled","tooltip":"Notifications Disabled."}'
|
||||
else
|
||||
printf '{"text":" On","tooltip":"Notifications Enabled."}';
|
||||
fi
|
||||
'';
|
||||
format = "{}";
|
||||
return-type = "json";
|
||||
interval = 2;
|
||||
on-click = "makotoggle";
|
||||
};
|
||||
weatherModule = {
|
||||
exec = let
|
||||
weatherConf = pkgs.writeText "weather.jsonc" ''
|
||||
{
|
||||
"logo": {
|
||||
"source": "none"
|
||||
},
|
||||
"modules": [
|
||||
{
|
||||
"type": "weather",
|
||||
"outputFormat": "%0A%t%0A%C%0A%l"
|
||||
}
|
||||
]
|
||||
}
|
||||
'';
|
||||
in pkgs.writeScript "weatherScript" ''
|
||||
# Fetch weather data
|
||||
fetch=$(fastfetch -c ${weatherConf} | sed 's/[[:space:]]*$//')
|
||||
temp=$(echo "$fetch" | sed -n '2s/^\+//p')
|
||||
condition=$(echo "$fetch" | sed -n '3p')
|
||||
location=$(echo "$fetch" | sed -n '4p')
|
||||
|
||||
# Map weather conditions to emojis
|
||||
case "$condition" in
|
||||
"Clear"|"Sunny") emoji="☀️";;
|
||||
"Cloudy"|"Partly cloudy"|"Overcast") emoji="☁️";;
|
||||
"Rain") emoji="🌧️";;
|
||||
"Drizzle") emoji="🌦️";;
|
||||
"Thunderstorm") emoji="⛈️";;
|
||||
"Snow") emoji="❄️";;
|
||||
"Mist"|"Fog"|"Haze") emoji="🌫️";;
|
||||
*) emoji="🌍";; # Default emoji for unknown
|
||||
esac
|
||||
|
||||
# Display weather emoji and temperature
|
||||
echo {\"text\":\"$emoji $temp\",\"tooltip\":\"$location: $condition\"}
|
||||
'';
|
||||
format = "<span font_size='11pt'>{}</span>";
|
||||
return-type = "json";
|
||||
interval = 150;
|
||||
};
|
||||
|
||||
# Laptop modules
|
||||
backlightModule = {
|
||||
format = "{icon} {percent}%";
|
||||
format-icons = ["" ""];
|
||||
tooltip = false;
|
||||
};
|
||||
batteryModule = {
|
||||
interval = 60;
|
||||
states = {
|
||||
warning = 30;
|
||||
critical = 15;
|
||||
};
|
||||
format = "{icon} {capacity}%";
|
||||
format-icons = ["" "" "" "" ""];
|
||||
};
|
||||
in {
|
||||
enable = true;
|
||||
settings = {
|
||||
display1 = {
|
||||
name = "bar1";
|
||||
position = "top";
|
||||
layer = "bottom";
|
||||
output = [outputs.displays.d1 "VGA-1"];
|
||||
modules-left = ["sway/workspaces" "sway/window"];
|
||||
modules-right = [
|
||||
"pulseaudio"
|
||||
"cpu"
|
||||
"memory"
|
||||
"custom/vram"
|
||||
"custom/clock-long"
|
||||
"gamemode"
|
||||
"sway/scratchpad"
|
||||
"tray"
|
||||
"bluetooth"
|
||||
"network"
|
||||
];
|
||||
"sway/workspaces" = swayWorkspacesModule;
|
||||
"sway/window" = swayWindowsModule;
|
||||
"pulseaudio" = pulseModule;
|
||||
"cpu" = cpuModule;
|
||||
"memory" = ramModule;
|
||||
"custom/vram" = vramModule;
|
||||
"custom/clock-long" = longClockModule;
|
||||
"gamemode" = gamemodeModule;
|
||||
"sway/scratchpad" = scratchpadModule;
|
||||
"tray" = trayModule;
|
||||
"bluetooth" = bluetoothModule;
|
||||
"network" = networkModule // {interface = "enp*";};
|
||||
};
|
||||
display2 = {
|
||||
name = "bar2";
|
||||
position = "top";
|
||||
layer = "bottom";
|
||||
output = [outputs.displays.d2];
|
||||
modules-left = ["sway/workspaces" "sway/window"];
|
||||
modules-right = [
|
||||
"pulseaudio"
|
||||
"custom/media"
|
||||
"custom/notifs"
|
||||
"cpu"
|
||||
"memory"
|
||||
"custom/vram"
|
||||
"custom/clock-long"
|
||||
];
|
||||
"sway/workspaces" = swayWorkspacesModule;
|
||||
"sway/window" = swayWindowsModule;
|
||||
"pulseaudio" = pulseModule;
|
||||
"custom/media" = mediaModule;
|
||||
"custom/notifs" = notificationModule;
|
||||
"cpu" = cpuModule;
|
||||
"memory" = ramModule;
|
||||
"custom/vram" = vramModule;
|
||||
"custom/clock-long" = longClockModule;
|
||||
};
|
||||
display3 = {
|
||||
name = "bar3";
|
||||
position = "top";
|
||||
layer = "bottom";
|
||||
output = [outputs.displays.d3];
|
||||
modules-left = ["sway/workspaces" "sway/window"];
|
||||
modules-right = [
|
||||
"pulseaudio"
|
||||
"custom/weather"
|
||||
"cpu"
|
||||
"memory"
|
||||
"custom/vram"
|
||||
"custom/clock-short"
|
||||
];
|
||||
"sway/workspaces" = swayWorkspacesModule;
|
||||
"sway/window" = swayWindowsModule;
|
||||
"pulseaudio" = pulseModule;
|
||||
"custom/weather" = weatherModule;
|
||||
"cpu" = cpuModule;
|
||||
"memory" = ramModule;
|
||||
"custom/vram" = vramModule;
|
||||
"custom/clock-short" = shortClockModule;
|
||||
};
|
||||
displayLap = {
|
||||
name = "laptop";
|
||||
position = "top";
|
||||
layer = "bottom";
|
||||
output = ["eDP-1" "LVDS-1" "DSI-1" "HDMI-A-1"];
|
||||
modules-left = ["sway/workspaces" "sway/window"];
|
||||
modules-right = [
|
||||
"pulseaudio"
|
||||
"custom/media"
|
||||
"custom/notifs"
|
||||
"custom/weather2"
|
||||
"cpu"
|
||||
"memory"
|
||||
"custom/vram"
|
||||
"backlight"
|
||||
"battery"
|
||||
"custom/clock-long"
|
||||
"gamemode"
|
||||
"sway/scratchpad"
|
||||
"tray"
|
||||
"bluetooth"
|
||||
"network"
|
||||
];
|
||||
"sway/workspaces" = swayWorkspacesModule;
|
||||
"sway/window" = swayWindowsModule;
|
||||
"pulseaudio" = pulseModule;
|
||||
"custom/media" = mediaModule;
|
||||
"custom/notifs" = notificationModule;
|
||||
"custom/weather2" = weatherModule;
|
||||
"cpu" = cpuModule;
|
||||
"memory" = ramModule;
|
||||
"custom/vram" = vramModule;
|
||||
"backlight" = backlightModule;
|
||||
"battery" = batteryModule;
|
||||
"custom/clock-long" = longClockModule;
|
||||
"sway/scratchpad" = scratchpadModule;
|
||||
"tray" = trayModule;
|
||||
"bluetooth" = bluetoothModule;
|
||||
"network" = networkModule;
|
||||
};
|
||||
};
|
||||
style = ''
|
||||
* {
|
||||
border: 0;
|
||||
border-radius: 0;
|
||||
min-height: 0;
|
||||
font-family: ${outputs.look.fonts.main}, ${outputs.look.fonts.nerd};
|
||||
font-size: 15.5px;
|
||||
color: #${outputs.look.colors.text};
|
||||
}
|
||||
#waybar {
|
||||
background: #${outputs.look.colors.dark};
|
||||
}
|
||||
#workspaces {
|
||||
padding: 0 6px 0 0;
|
||||
}
|
||||
#tray {
|
||||
padding: 0 2px 0 5px;
|
||||
}
|
||||
#network {
|
||||
padding: 0 10px 0 4px;
|
||||
}
|
||||
#network.disconnected,#bluetooth.off {
|
||||
color: #424242;
|
||||
}
|
||||
#bluetooth {
|
||||
margin: 0 6px 0 4px;
|
||||
font-size: 13.4px;
|
||||
}
|
||||
#workspaces button {
|
||||
padding: 0 3px;
|
||||
color: white;
|
||||
border-bottom: 3px solid transparent;
|
||||
min-width: 20px;
|
||||
}
|
||||
#workspaces button.visible {
|
||||
border-bottom: 3px solid #${outputs.look.colors.prime};
|
||||
background: #${outputs.look.colors.mid};
|
||||
}
|
||||
#workspaces button.urgent {
|
||||
border-bottom: 3px solid #${outputs.look.colors.urgent};
|
||||
}
|
||||
#workspaces button:hover {
|
||||
box-shadow: none;
|
||||
background: #${outputs.look.colors.light};
|
||||
}
|
||||
#scratchpad {
|
||||
margin-left: 2px;
|
||||
}
|
||||
#cpu, #memory, #custom-vram, #custom-media, #custom-clock-long, #custom-clock-short, #backlight, #battery, #custom-weather, #custom-weather2, #custom-notifs {
|
||||
margin: 0 5px 0 2px;
|
||||
}
|
||||
#cpu {
|
||||
border-bottom: 3px solid #f90000;
|
||||
}
|
||||
#memory {
|
||||
border-bottom: 3px solid #4bffdc;
|
||||
}
|
||||
#custom-vram {
|
||||
border-bottom: 3px solid #33FF00;
|
||||
}
|
||||
#custom-media {
|
||||
border-bottom: 3px solid #ffb066;
|
||||
}
|
||||
#custom-clock-long {
|
||||
border-bottom: 3px solid #0a6cf5;
|
||||
}
|
||||
#custom-clock-short {
|
||||
border-bottom: 3px solid #0a6cf5;
|
||||
}
|
||||
#backlight {
|
||||
border-bottom: 3px solid #5ffca3;
|
||||
}
|
||||
#battery {
|
||||
border-bottom: 3px solid #fcfc16;
|
||||
}
|
||||
#custom-media.paused {
|
||||
color: #888;
|
||||
}
|
||||
#custom-weather {
|
||||
border-bottom: 3px solid #${outputs.look.colors.prime};
|
||||
}
|
||||
#custom-weather2 {
|
||||
border-bottom: 3px solid #c75bd3;
|
||||
}
|
||||
#custom-notifs {
|
||||
border-bottom: 3px solid #${outputs.look.colors.prime};
|
||||
}
|
||||
#custom-notifs.disabled {
|
||||
color: #888;
|
||||
}
|
||||
#pulseaudio {
|
||||
margin-right: 5px;
|
||||
}
|
||||
#pulseaudio.muted {
|
||||
color: #424242;
|
||||
}
|
||||
'';
|
||||
};
|
||||
}
|
6
modules/home/users/default.nix
Normal file
6
modules/home/users/default.nix
Normal file
|
@ -0,0 +1,6 @@
|
|||
{ ... }:
|
||||
{
|
||||
imports = [
|
||||
./jimbo
|
||||
];
|
||||
}
|
13
modules/home/users/jimbo/default.nix
Normal file
13
modules/home/users/jimbo/default.nix
Normal file
|
@ -0,0 +1,13 @@
|
|||
{ ... }:
|
||||
{
|
||||
home = {
|
||||
username = "jimbo";
|
||||
homeDirectory = "/home/jimbo";
|
||||
sessionVariables = {
|
||||
EDITOR = "nvim";
|
||||
LIBVIRT_DEFAULT_URI = "qemu:///system";
|
||||
HISTCONTROL = "ignoreboth";
|
||||
NIXPKGS_ALLOW_UNFREE = "1";
|
||||
};
|
||||
};
|
||||
}
|
8
modules/home/utils/default.nix
Normal file
8
modules/home/utils/default.nix
Normal file
|
@ -0,0 +1,8 @@
|
|||
{ ... }:
|
||||
{
|
||||
imports = [
|
||||
./gnome-keyring
|
||||
./udiskie
|
||||
./zsh
|
||||
];
|
||||
}
|
4
modules/home/utils/gnome-keyring/default.nix
Normal file
4
modules/home/utils/gnome-keyring/default.nix
Normal file
|
@ -0,0 +1,4 @@
|
|||
{ ... }:
|
||||
{
|
||||
services.gnome-keyring.enable = true;
|
||||
}
|
7
modules/home/utils/udiskie/default.nix
Normal file
7
modules/home/utils/udiskie/default.nix
Normal file
|
@ -0,0 +1,7 @@
|
|||
{ ... }:
|
||||
{
|
||||
services.udiskie = {
|
||||
enable = true;
|
||||
automount = false;
|
||||
};
|
||||
}
|
54
modules/home/utils/zsh/default.nix
Normal file
54
modules/home/utils/zsh/default.nix
Normal file
|
@ -0,0 +1,54 @@
|
|||
{ pkgs, config, outputs, ... }:
|
||||
{
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
autosuggestion.enable = true;
|
||||
syntaxHighlighting.enable = true;
|
||||
oh-my-zsh = {
|
||||
enable = true;
|
||||
theme = "agnoster";
|
||||
plugins = ["git"];
|
||||
};
|
||||
shellAliases = {
|
||||
# NixOS aliases
|
||||
nixcfg = "${outputs.cmd.nixcfg}";
|
||||
nixclean = "${outputs.cmd.auth} nix-store --gc; nix-collect-garbage -d";
|
||||
nixpurge = "${outputs.cmd.auth} nix-collect-garbage --delete-old";
|
||||
nixoptimize = "${outputs.cmd.auth} nix store optimise";
|
||||
|
||||
# Flake commands
|
||||
flakedate = "${outputs.cmd.auth} nix flake update /etc/nixos";
|
||||
sysswitch = "${outputs.cmd.auth} nixos-rebuild switch --flake /etc/nixos";
|
||||
homeswitch = "home-manager switch --flake /etc/nixos";
|
||||
nixswitch = "sysswitch; homeswitch";
|
||||
nixdate = "flakedate && sysswitch; homeswitch";
|
||||
|
||||
# Shortcut aliases
|
||||
neo = "clear && fastfetch";
|
||||
ip = "ip -c";
|
||||
ls = "${pkgs.eza}/bin/eza -a --color=always --group-directories-first --icons";
|
||||
nls = "/usr/bin/env ls";
|
||||
cat = "${pkgs.bat}/bin/bat --paging never";
|
||||
ncat = "/usr/bin/env cat";
|
||||
copycat = "wl-copy <";
|
||||
sunshinehost = "WAYLAND_DISPLAY=wayland-1 DISPLAY=:1 sunshine -0";
|
||||
seneca = "ssh jhampton1@matrix.senecapolytechnic.ca";
|
||||
|
||||
# Curl tools
|
||||
myip = "curl ifconfig.co";
|
||||
|
||||
# Download from sources
|
||||
ytdl = "yt-dlp --embed-thumbnail --embed-metadata --output \"%(title)s.%(ext)s\"";
|
||||
ytmp4 = "ytdl --recode-video webm";
|
||||
ytm3u = "yt-dlp -gS proto:m3u8";
|
||||
opusdl = "ytdl --recode-video opus";
|
||||
ytopus = "opusdl --format 251";
|
||||
spotdl = "spotdl --m3u --format opus";
|
||||
};
|
||||
initExtra = ''
|
||||
${pkgs.any-nix-shell}/bin/any-nix-shell zsh --info-right | source /dev/stdin; pfetch
|
||||
setopt HIST_IGNORE_SPACE
|
||||
setopt RM_STAR_WAIT
|
||||
'';
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue