lots of things (everything is a total mess)

This commit is contained in:
xunuwu 2025-01-05 02:12:52 +01:00
parent 480d649d62
commit 931efc7518
Signed by: xun
SSH key fingerprint: SHA256:Uot/1WoAjWAeqLOHA5vYy4phhVydsH7jCPmBjaPZfgI
22 changed files with 109 additions and 52 deletions

View file

@ -1,7 +1,7 @@
{pkgs, ...}: {
programs.chromium = {
enable = true;
package = pkgs.ungoogled-chromium;
# package = pkgs.ungoogled-chromium;
extensions = [
{id = "cjpalhdlnbpafiamejdnhcphjbkeiagm";} # ublock origin
];

View file

@ -17,8 +17,3 @@
#navigator-toolbox {
border-bottom: none !important;
}
/* Hide shield thing since i never ever change those settings */
#tracking-protection-icon-container {
visibility: collapse;
}

View file

@ -10,6 +10,7 @@
../common/wob.nix
../common/wl-clipboard.nix
./waybar.nix
./headless-remote.nix
];
services.cliphist = {
@ -53,6 +54,16 @@
'';
config = {
modifier = "Mod4";
output = {
"DP-3" = {
mode = "1920x1080@165Hz";
position = "1920 0";
allow_tearing = "yes";
};
"HDMI-A-1" = {
position = "0 0";
};
};
# output = {
# "*".bg = "${config.xdg.userDirs.pictures}/wallpaper fill";
# };
@ -88,6 +99,7 @@
in
lib.mkOptionDefault (
{
"${mod}+m" = "exec ${pkgs.nwg-launchers}/bin/nwggrid";
"${mod}+n" = "exec ${pkgs.swaynotificationcenter}/bin/swaync-client -t";
"${mod}+Shift+v" = "exec ${lib.getExe pkgs.cliphist} list | ${lib.getExe pkgs.wofi} --dmenu | ${lib.getExe pkgs.cliphist} decode | ${pkgs.wl-clipboard}/bin/wl-copy";
"${mod}+Ctrl+${dir.left}" = "focus output left";
@ -105,6 +117,7 @@
"${mod}+Shift+Backspace" = "exec systemctl suspend";
"${mod}+Shift+s" = "exec ${lib.getExe pkgs.wayfreeze} --after-freeze-cmd '${lib.getExe pkgs.sway-contrib.grimshot} copy anything && pkill wayfreeze'";
"${mod}+Ctrl+Shift+s" = "exec ${lib.getExe pkgs.wayfreeze} --after-freeze-cmd '${lib.getExe pkgs.sway-contrib.grimshot} savecopy anything && pkill wayfreeze'";
"${mod}+Alt+s" = "exec ${lib.getExe pkgs.wayfreeze} --after-freeze-cmd '${lib.getExe pkgs.sway-contrib.grimshot} save anything - | ${lib.getExe pkgs.tesseract} -l eng - - | wl-copy && pkill wayfreeze'";
"${mod}+Shift+p" = "exec ${pauseApp}";
"${mod}+period" = "exec ${lib.getExe pkgs.bemoji}";

View file

@ -0,0 +1,41 @@
{pkgs, ...}: {
## TODO MAKE THIS REMOVE ALL PREV HEADLESS MONITORS
home.packages = [
(pkgs.writeShellApplication {
name = "xun-start-headless";
runtimeInputs = [pkgs.sway pkgs.wayvnc pkgs.jq];
text = ''
headless_numbers() {
swaymsg -t get_outputs | jq -r '.[].name | select (. | startswith("HEADLESS-")) | ltrimstr("HEADLESS-")'
}
new_lines() {
diff <(echo "$1") <(echo "$2") | grep -E "^>" | cut -c3- || true
}
create_output() {
outputs1=$(headless_numbers)
swaymsg create_output >/dev/null
outputs2=$(headless_numbers)
new_lines "$outputs1" "$outputs2"
}
remove_outputs() {
for n in $(headless_numbers); do
swaymsg output "HEADLESS-$n" unplug
done
}
remove_outputs
outputid=$(create_output)
swaymsg output "HEADLESS-$outputid" scale 2
swaymsg output "HEADLESS-$outputid" mode "2400x1080@30Hz"
swaymsg output "HEADLESS-$outputid" position "0 1080" # below primary monitor
wayvnc --gpu -o "HEADLESS-$outputid" 0.0.0.0
'';
})
];
}

View file

@ -0,0 +1,3 @@
{pkgs, ...}: {
home.packages = with pkgs; [blender];
}

View file

@ -5,5 +5,5 @@
withOpenASAR = true;
})
];
# services.arrpc.enable = true; # RPC with vesktop (disabled since it uses way more cpu than is reasonable for such a program)
services.arrpc.enable = true; # RPC with vesktop (has issues with cpu usage sometimes ime)
}