diff --git a/dotfiles/config/sxhkd/sxhkdrc b/dotfiles/config/sxhkd/sxhkdrc index d145183..ad83a11 100755 --- a/dotfiles/config/sxhkd/sxhkdrc +++ b/dotfiles/config/sxhkd/sxhkdrc @@ -135,16 +135,16 @@ XF86AudioMute pactl set-sink-mute @DEFAULT_SINK@ toggle XF86MonBrightnessUp - brightness up + ~/.local/bin/brightness up XF86MonBrightnessDown - brightness down + ~/.local/bin/brightness down XF86KbdBrightnessUp - kbd_brightness up + ~/.local/bin/kbd_brightness up XF86KbdBrightnessDown - kbd_brightness down + ~/.local/bin/kbd_brightness down #music control diff --git a/dotfiles/local/bin/brightness b/dotfiles/local/bin/brightness index 187d486..3b2e732 100755 --- a/dotfiles/local/bin/brightness +++ b/dotfiles/local/bin/brightness @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh FILE=/sys/class/backlight/amdgpu_bl1/brightness 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" diff --git a/home.nix b/home.nix index 6d5eee7..92eae13 100644 --- a/home.nix +++ b/home.nix @@ -6,7 +6,7 @@ # 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"; ".local/bin/desk_sync".source = dotfiles/local/bin/desk_sync; + + ".local/bin/brightness".source = dotfiles/local/bin/brightness; }; programs.home-manager.enable = true; diff --git a/homes/laptop/bspwm/host.sh b/homes/laptop/bspwm/host.sh index d940f37..1153668 100644 --- a/homes/laptop/bspwm/host.sh +++ b/homes/laptop/bspwm/host.sh @@ -1,14 +1,15 @@ INTEGRATED="eDP" HDMI="HDMI-A-0" 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 $INTEGRATED -r 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 $HDMI -d A B else + bash ~/.config/bspwm/screenLayoutSingle.sh bspc monitor -d 1 2 3 4 5 xrandr -r 60 fi diff --git a/homes/laptop/bspwm/screenLayoutDocked.sh b/homes/laptop/bspwm/screenLayoutDocked.sh new file mode 100755 index 0000000..f4ed698 --- /dev/null +++ b/homes/laptop/bspwm/screenLayoutDocked.sh @@ -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 diff --git a/homes/laptop/bspwm/screenLayoutHDMI.sh b/homes/laptop/bspwm/screenLayoutHDMI.sh new file mode 100755 index 0000000..289af20 --- /dev/null +++ b/homes/laptop/bspwm/screenLayoutHDMI.sh @@ -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 diff --git a/homes/laptop/bspwm/screenLayoutSingle.sh b/homes/laptop/bspwm/screenLayoutSingle.sh new file mode 100755 index 0000000..0468a88 --- /dev/null +++ b/homes/laptop/bspwm/screenLayoutSingle.sh @@ -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 diff --git a/homes/laptop/home.nix b/homes/laptop/home.nix index 11b6098..76aa027 100644 --- a/homes/laptop/home.nix +++ b/homes/laptop/home.nix @@ -10,6 +10,8 @@ home.file = { ".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; }; } diff --git a/hosts/laptop.nix b/hosts/laptop.nix index a35c0a8..0101ef4 100644 --- a/hosts/laptop.nix +++ b/hosts/laptop.nix @@ -10,6 +10,9 @@ networking.wireless.enable = true; networking.networkmanager.enable = false; + networking.firewall.allowedTCPPorts = [ 5900 ]; + networking.firewall.allowedUDPPorts = [ 5900 ]; + environment.systemPackages = with pkgs; [ acpi tlp