Compare commits
4 commits
cdccfcbece
...
1109eac9fa
Author | SHA1 | Date | |
---|---|---|---|
1109eac9fa |
|||
8e956876fa |
|||
203a1ad0fb |
|||
980ccb3971 |
5 changed files with 64 additions and 0 deletions
|
@ -84,6 +84,7 @@ in {
|
||||||
enable = true;
|
enable = true;
|
||||||
musicDirectory = "/home/${config.modules.other.system.username}/cloud/media/Music";
|
musicDirectory = "/home/${config.modules.other.system.username}/cloud/media/Music";
|
||||||
};
|
};
|
||||||
|
uwsm.enable = true;
|
||||||
};
|
};
|
||||||
other = {
|
other = {
|
||||||
system = {
|
system = {
|
||||||
|
|
12
modules/programs/tui/zellij/module.nix
Normal file
12
modules/programs/tui/zellij/module.nix
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
{pkgs, ...}: let
|
||||||
|
# I am patching zellij because of this issue:
|
||||||
|
# https://github.com/zellij-org/zellij/pull/2548
|
||||||
|
patched-zellij = pkgs.zellij.overrideAttrs (old: {
|
||||||
|
patches = [./zellij-good-scrolling.patch];
|
||||||
|
doCheck = false;
|
||||||
|
});
|
||||||
|
in {
|
||||||
|
environment.systemPackages = builtins.attrValues {
|
||||||
|
inherit patched-zellij;
|
||||||
|
};
|
||||||
|
}
|
22
modules/programs/tui/zellij/zellij-good-scrolling.patch
Normal file
22
modules/programs/tui/zellij/zellij-good-scrolling.patch
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
--- a/zellij-server/src/panes/grid.rs
|
||||||
|
+++ b/zellij-server/src/panes/grid.rs
|
||||||
|
@@ -271,7 +271,7 @@ fn subtract_isize_from_usize(u: usize, i: isize) -> usize {
|
||||||
|
macro_rules! dump_screen {
|
||||||
|
($lines:expr) => {{
|
||||||
|
let mut is_first = true;
|
||||||
|
- let mut buf = "".to_owned();
|
||||||
|
+ let mut buf = String::with_capacity($lines.iter().map(|l| l.len()).sum());
|
||||||
|
|
||||||
|
for line in &$lines {
|
||||||
|
if line.is_canonical && !is_first {
|
||||||
|
@@ -280,8 +280,7 @@ macro_rules! dump_screen {
|
||||||
|
let s: String = (&line.columns).into_iter().map(|x| x.character).collect();
|
||||||
|
// Replace the spaces at the end of the line. Sometimes, the lines are
|
||||||
|
// collected with spaces until the end of the panel.
|
||||||
|
- let re = Regex::new("([^ ])[ ]*$").unwrap();
|
||||||
|
- buf.push_str(&(re.replace(&s, "${1}")));
|
||||||
|
+ buf.push_str(&s.trim_end_matches(' '));
|
||||||
|
is_first = false;
|
||||||
|
}
|
||||||
|
buf
|
||||||
|
|
25
modules/services/uwsm/module.nix
Normal file
25
modules/services/uwsm/module.nix
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
cfg = config.modules.services.uwsm;
|
||||||
|
inherit (lib.modules) mkIf;
|
||||||
|
inherit (lib.options) mkEnableOption;
|
||||||
|
in {
|
||||||
|
options.modules.services.uwsm.enable = mkEnableOption "uwsm";
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
programs.uwsm = {
|
||||||
|
enable = true;
|
||||||
|
package = pkgs.uwsm;
|
||||||
|
waylandCompositors = {
|
||||||
|
hyprland = {
|
||||||
|
prettyName = "Hyprland";
|
||||||
|
comment = "Hyprland managed with UWSM";
|
||||||
|
binPath = "/run/current-system/sw/bin/Hyprland";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
|
@ -25,6 +25,8 @@
|
||||||
solargraph,
|
solargraph,
|
||||||
tinymist,
|
tinymist,
|
||||||
typescript-language-server,
|
typescript-language-server,
|
||||||
|
rustfmt,
|
||||||
|
clippy,
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
inherit (lib) getExe;
|
inherit (lib) getExe;
|
||||||
|
@ -256,6 +258,8 @@
|
||||||
helix
|
helix
|
||||||
|
|
||||||
rust-analyzer
|
rust-analyzer
|
||||||
|
rustfmt
|
||||||
|
clippy
|
||||||
# typst lsp
|
# typst lsp
|
||||||
tinymist
|
tinymist
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue