continue refactor, home modules are actual modules and remove some useless files
This commit is contained in:
15
homeConfigs/hosts/laptop/bspwm/host.sh
Normal file
15
homeConfigs/hosts/laptop/bspwm/host.sh
Normal file
@ -0,0 +1,15 @@
|
||||
INTEGRATED="eDP"
|
||||
HDMI="HDMI-A-0"
|
||||
if xrandr | grep "$HDMI connected" && cat /proc/acpi/button/lid/LID/state | grep "closed"; then
|
||||
bash ~/.config/bspwm/screenLayoutDocked.sh
|
||||
bspc monitor $HDMI -d 1 2 3 4 5
|
||||
bspc monitor $INTEGRATED -r
|
||||
elif xrandr | grep "$HDMI connected";then
|
||||
bash ~/.config/bspwm/screenLayoutHDMI.sh
|
||||
bspc monitor $INTEGRATED -d 1 2 3 4
|
||||
bspc monitor $HDMI -d A B
|
||||
else
|
||||
bash ~/.config/bspwm/screenLayoutSingle.sh
|
||||
bspc monitor -d 1 2 3 4 5
|
||||
xrandr -r 60
|
||||
fi
|
2
homeConfigs/hosts/laptop/bspwm/screenLayoutDocked.sh
Executable file
2
homeConfigs/hosts/laptop/bspwm/screenLayoutDocked.sh
Executable file
@ -0,0 +1,2 @@
|
||||
#!/bin/sh
|
||||
xrandr --output eDP --off --output HDMI-A-0 --primary --mode 1920x1080 --pos 0x0 --rotate normal --output DP-1-0 --off --output DP-1-1 --off
|
2
homeConfigs/hosts/laptop/bspwm/screenLayoutHDMI.sh
Executable file
2
homeConfigs/hosts/laptop/bspwm/screenLayoutHDMI.sh
Executable file
@ -0,0 +1,2 @@
|
||||
#!/bin/sh
|
||||
xrandr --output eDP --primary --mode 2560x1440 --pos 0x0 --rotate normal --output HDMI-A-0 --mode 1920x1080 --pos 2560x0 --rotate normal --output DP-1-0 --off --output DP-1-1 --off
|
2
homeConfigs/hosts/laptop/bspwm/screenLayoutSingle.sh
Executable file
2
homeConfigs/hosts/laptop/bspwm/screenLayoutSingle.sh
Executable file
@ -0,0 +1,2 @@
|
||||
#!/bin/sh
|
||||
xrandr --output eDP --primary --mode 2560x1440 --pos 0x0 --rotate normal --output HDMI-A-0 --off --output DP-1-0 --off --output DP-1-1 --off
|
20
homeConfigs/hosts/laptop/home.nix
Normal file
20
homeConfigs/hosts/laptop/home.nix
Normal file
@ -0,0 +1,20 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./hyprland.nix
|
||||
./waybar.nix
|
||||
];
|
||||
|
||||
# programs.alacritty.settings.font.size = 8;
|
||||
home.packages = with pkgs; [
|
||||
stremio
|
||||
];
|
||||
|
||||
home.file = {
|
||||
".config/bspwm/host.sh".source = ./bspwm/host.sh;
|
||||
".config/bspwm/screenLayoutSingle.sh".source = ./bspwm/screenLayoutSingle.sh;
|
||||
".config/bspwm/screenLayoutDocked.sh".source = ./bspwm/screenLayoutDocked.sh;
|
||||
".config/bspwm/screenLayoutHDMI.sh".source = ./bspwm/screenLayoutHDMI.sh;
|
||||
};
|
||||
}
|
16
homeConfigs/hosts/laptop/hyprland.nix
Normal file
16
homeConfigs/hosts/laptop/hyprland.nix
Normal file
@ -0,0 +1,16 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
wayland.windowManager.hyprland.settings = {
|
||||
bind = [
|
||||
#lock
|
||||
", XF86Launch1, exec, hyprlock"
|
||||
", XF86Launch4, exec, pkill activate-linux"
|
||||
];
|
||||
monitor= [
|
||||
"eDP-1, 1920x1080@120, 0x0, 1"
|
||||
"HDMI-A-1, 1920x1080@60, auto, auto"
|
||||
];
|
||||
env = [ "AQ_DRM_DEVICES,/dev/dri/card1"];
|
||||
};
|
||||
}
|
20
homeConfigs/hosts/laptop/waybar.nix
Normal file
20
homeConfigs/hosts/laptop/waybar.nix
Normal file
@ -0,0 +1,20 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
programs.waybar.settings.mainBar = {
|
||||
modules-right = lib.mkBefore ["custom/fans" "custom/dgpu"];
|
||||
"custom/dgpu" = {
|
||||
exec-if = "test \"$(supergfxctl -g)\" = \"Hybrid\" || test \"$(supergfxctl -g)\" = \"Vfio\"";
|
||||
exec = "echo \" on |\"";
|
||||
interval-if = 10;
|
||||
interval =100;
|
||||
};
|
||||
|
||||
"custom/fans" = {
|
||||
exec-if = "test \"$(cat /sys/class/hwmon/hwmon6/fan1_input)\" -gt 0 -o \"$(cat /sys/class/hwmon/hwmon6/fan2_input)\" -gt 0";
|
||||
exec = "echo \" \" \"$(cat /sys/class/hwmon/hwmon6/fan1_input).$(cat /sys/class/hwmon/hwmon6/fan2_input) |\"";
|
||||
interval = 1;
|
||||
interval-if = 1;
|
||||
};
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user