add different screenlayout for bwpm on laptop
This commit is contained in:
@ -135,16 +135,16 @@ XF86AudioMute
|
|||||||
pactl set-sink-mute @DEFAULT_SINK@ toggle
|
pactl set-sink-mute @DEFAULT_SINK@ toggle
|
||||||
|
|
||||||
XF86MonBrightnessUp
|
XF86MonBrightnessUp
|
||||||
brightness up
|
~/.local/bin/brightness up
|
||||||
|
|
||||||
XF86MonBrightnessDown
|
XF86MonBrightnessDown
|
||||||
brightness down
|
~/.local/bin/brightness down
|
||||||
|
|
||||||
XF86KbdBrightnessUp
|
XF86KbdBrightnessUp
|
||||||
kbd_brightness up
|
~/.local/bin/kbd_brightness up
|
||||||
|
|
||||||
XF86KbdBrightnessDown
|
XF86KbdBrightnessDown
|
||||||
kbd_brightness down
|
~/.local/bin/kbd_brightness down
|
||||||
|
|
||||||
|
|
||||||
#music control
|
#music control
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#!/bin/bash
|
#!/bin/sh
|
||||||
FILE=/sys/class/backlight/amdgpu_bl1/brightness
|
FILE=/sys/class/backlight/amdgpu_bl1/brightness
|
||||||
if ! ( test -w "$FILE" ); then
|
if ! ( test -w "$FILE" ); then
|
||||||
xterm +cm -cr RED -bg BLACK -selbg WHITE -selfg BLACK -fg WHITE -fa Monospace -fs 14 -e "sudo chmod 777 $FILE"
|
xterm +cm -cr RED -bg BLACK -selbg WHITE -selfg BLACK -fg WHITE -fa Monospace -fs 14 -e "sudo chmod 777 $FILE"
|
||||||
|
4
home.nix
4
home.nix
@ -6,7 +6,7 @@
|
|||||||
# By: tomoron <tomoron@student.42angouleme.fr> +#+ +:+ +#+ #
|
# By: tomoron <tomoron@student.42angouleme.fr> +#+ +:+ +#+ #
|
||||||
# +#+#+#+#+#+ +#+ #
|
# +#+#+#+#+#+ +#+ #
|
||||||
# Created: 2024/10/17 18:15:38 by tomoron #+# #+# #
|
# Created: 2024/10/17 18:15:38 by tomoron #+# #+# #
|
||||||
# Updated: 2024/10/19 19:01:47 by tomoron ### ########.fr #
|
# Updated: 2024/10/19 19:05:10 by tomoron ### ########.fr #
|
||||||
# #
|
# #
|
||||||
# **************************************************************************** #
|
# **************************************************************************** #
|
||||||
|
|
||||||
@ -57,6 +57,8 @@
|
|||||||
}}/themes";
|
}}/themes";
|
||||||
|
|
||||||
".local/bin/desk_sync".source = dotfiles/local/bin/desk_sync;
|
".local/bin/desk_sync".source = dotfiles/local/bin/desk_sync;
|
||||||
|
|
||||||
|
".local/bin/brightness".source = dotfiles/local/bin/brightness;
|
||||||
};
|
};
|
||||||
|
|
||||||
programs.home-manager.enable = true;
|
programs.home-manager.enable = true;
|
||||||
|
@ -1,14 +1,15 @@
|
|||||||
INTEGRATED="eDP"
|
INTEGRATED="eDP"
|
||||||
HDMI="HDMI-A-0"
|
HDMI="HDMI-A-0"
|
||||||
if xrandr | grep "$HDMI connected" && cat /proc/acpi/button/lid/LID/state | grep "closed"; then
|
if xrandr | grep "$HDMI connected" && cat /proc/acpi/button/lid/LID/state | grep "closed"; then
|
||||||
bash ~/.screenlayout/b.sh
|
bash ~/.config/bspwm/screenLayoutDocked.sh
|
||||||
bspc monitor $HDMI -d 1 2 3 4 5
|
bspc monitor $HDMI -d 1 2 3 4 5
|
||||||
bspc monitor $INTEGRATED -r
|
bspc monitor $INTEGRATED -r
|
||||||
elif xrandr | grep "$HDMI connected";then
|
elif xrandr | grep "$HDMI connected";then
|
||||||
bash ~/.screenlayout/a.sh
|
bash ~/.config/bspwm/screenLayoutHDMI.sh
|
||||||
bspc monitor $INTEGRATED -d 1 2 3 4
|
bspc monitor $INTEGRATED -d 1 2 3 4
|
||||||
bspc monitor $HDMI -d A B
|
bspc monitor $HDMI -d A B
|
||||||
else
|
else
|
||||||
|
bash ~/.config/bspwm/screenLayoutSingle.sh
|
||||||
bspc monitor -d 1 2 3 4 5
|
bspc monitor -d 1 2 3 4 5
|
||||||
xrandr -r 60
|
xrandr -r 60
|
||||||
fi
|
fi
|
||||||
|
2
homes/laptop/bspwm/screenLayoutDocked.sh
Executable file
2
homes/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
homes/laptop/bspwm/screenLayoutHDMI.sh
Executable file
2
homes/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
homes/laptop/bspwm/screenLayoutSingle.sh
Executable file
2
homes/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
|
@ -10,6 +10,8 @@
|
|||||||
|
|
||||||
home.file = {
|
home.file = {
|
||||||
".config/bspwm/host.sh".source = ./bspwm/host.sh;
|
".config/bspwm/host.sh".source = ./bspwm/host.sh;
|
||||||
# ".config/bspwm/screenlayout.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;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -10,6 +10,9 @@
|
|||||||
networking.wireless.enable = true;
|
networking.wireless.enable = true;
|
||||||
networking.networkmanager.enable = false;
|
networking.networkmanager.enable = false;
|
||||||
|
|
||||||
|
networking.firewall.allowedTCPPorts = [ 5900 ];
|
||||||
|
networking.firewall.allowedUDPPorts = [ 5900 ];
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
acpi
|
acpi
|
||||||
tlp
|
tlp
|
||||||
|
Reference in New Issue
Block a user