continue refactor, home modules are actual modules and remove some useless files

This commit is contained in:
2025-02-10 05:28:31 +01:00
parent 5363e26357
commit acc21888b9
133 changed files with 1541 additions and 1563 deletions

View File

@ -0,0 +1,5 @@
bspc monitor "HDMI-1-1" -d 1
bspc monitor "HDMI-0" -d 2 3
bspc monitor "DP-1-1" -d 4
bspc monitor "DP-0" -d 5
bspc desktop -f 2

View File

@ -0,0 +1,3 @@
#!/bin/sh
echo "AAAAAAAAAAAAAAAAAAAAAAAA"
xrandr --output DP-0 --mode 1280x1024 --pos 5120x56 --rotate normal --output DP-1 --off --output DP-2 --off --output DP-3 --off --output HDMI-0 --primary --mode 1920x1080 --pos 1920x0 --rotate normal --output DP-1-1 --mode 1280x1024 --pos 3840x56 --rotate normal --output HDMI-1-1 --mode 1920x1080 --pos 0x0 --rotate normal --output DP-1-2 --off --output HDMI-1-2 --off

View File

@ -0,0 +1,28 @@
{ ... }:
{
imports = [
../modules/nitrogen.nix
./hyprland.nix
];
wayland.windowManager.hyprland.settings = {
monitor = [
"HDMI-A-1, 1920x1080@60, 0x0, auto"
"HDMI-A-3, 1920x1080@60, 1920x0, auto"
"DP-1, 1280x1024@60, 3840x0, auto"
"DP-3, 1280x1024@60, 5120x0, auto"
];
workspace = [
"1, monitor:HDMI-A-1"
"2, monitor:HDMI-A-3, default:true"
"3, monitor:DP-1"
"4, monitor:DP-3"
];
};
home.file = {
".config/bspwm/screenlayout.sh".source = ./bspwm/screenlayout.sh;
".config/bspwm/host.sh".source = ./bspwm/host.sh;
};
}

View File

@ -0,0 +1 @@
bspc monitor -d 1 2 3 4 5

View File

@ -0,0 +1,25 @@
#! /bin/sh
pgrep -x sxhkd > /dev/null || sxhkd &
bspc monitor -d 1 2 3 4 5
bspc desktop 1 -f
pgrep -x polybar || polybar -q main -c "$HOME/.config/polybar/config-small.ini"&
bspc config border_width 2
bspc config window_gap 10
bspc config split_ratio 0.52
bspc config borderless_monocle true
bspc config focus_follows_pointer true
bspc config gapless_monocle true
pgrep -x alacritty > /dev/null || alacritty &
#autostart appps
picom --experimental-backends &
nitrogen --restore &
dunst &
numlockx on &
setxkbmap fr us&
killall activate-linux
(sleep 1;activate-linux -c 1-1-1-0.7 -V 50 -H 70 -d)&

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 MiB

View File

@ -0,0 +1,4 @@
[xin_-1]
file=/nfs/homes/tomoron/.config/nitrogen/thumb-1920-814854.png
mode=0
bgcolor=#000000

View File

@ -0,0 +1,12 @@
[geometry]
posx=-1
posy=-1
sizex=450
sizey=500
[nitrogen]
view=icon
recurse=true
sort=alpha
icon_caps=false
dirs=/nfs/homes/tomoron/.config/nitrogen;

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 MiB

View File

@ -0,0 +1,170 @@
#
# wm independent hotkeys
#
# terminal emulator
super + Return
alacritty
# program launcher
super + d
dmenu_run
super + shift + d
dmenu_run
# make sxhkd reload its configuration files:
super + Escape
pkill -USR1 -x sxhkd
#
# bspwm hotkeys
#
# quit/restart bspwm
super + alt + {q,r}
bspc {quit,wm -r}
# close and kill
control + alt + {_,shift + }q
bspc node -{c,k}
# alternate between the tiled and monocle layout
super + m
bspc desktop -l next
# send the newest marked node to the newest preselected node
super + y
bspc node newest.marked.local -n newest.!automatic.local
# swap the current node and the biggest window
super + g
bspc node -s biggest.window
#
# state/flags
#
# set the window state
super + {t,shift + t,s,f}
bspc node -t {tiled,pseudo_tiled,floating,fullscreen}
# set the node flags
super + ctrl + {m,x,y,z}
bspc node -g {marked,locked,sticky,private}
#
# focus/swap
#
# focus the node in the given direction
super + {_,shift + }{h,j,k,l}
bspc node -{f,s} {west,south,north,east}
# focus the node for the given path jump
super + {p,b,comma,period}
bspc node -f @{parent,brother,first,second}
# focus the next/previous window in the current desktop
super + {_,shift + }c
bspc node -f {next,prev}.local.!hidden.window
# focus the next/previous desktop in the current monitor
super + bracket{left,right}
bspc desktop -f {prev,next}.local
# focus the last node/desktop
super + {grave,Tab}
bspc {node,desktop} -f last
# focus the older or newer node in the focus history
super + {o,i}
bspc wm -h off; \
bspc node {older,newer} -f; \
bspc wm -h on
# focus or send to the given desktop
super + {_,shift + }{1-9,0}
bspc {desktop -f,node -d} '^{1-9,10}'
#
# preselect
#
# preselect the direction
super + ctrl + {h,j,k,l}
bspc node -p {west,south,north,east}
# preselect the ratio
super + ctrl + {1-9}
bspc node -o 0.{1-9}
# cancel the preselection for the focused node
super + ctrl + space
bspc node -p cancel
# cancel the preselection for the focused desktop
super + ctrl + shift + space
bspc query -N -d | xargs -I id -n 1 bspc node id -p cancel
#
# move/resize
#
# expand a window by moving one of its side outward
super + alt + {h,j,k,l}
bspc node -z {left -20 0,bottom 0 20,top 0 -20,right 20 0}
# contract a window by moving one of its side inward
super + alt + shift + {h,j,k,l}
bspc node -z {right -20 0,top 0 20,bottom 0 -20,left 20 0}
# move a floating window
super + {Left,Down,Up,Right}
bspc node -v {-20 0,0 20,0 -20,20 0}
#Volume control
XF86AudioLowerVolume
pactl set-sink-volume @DEFAULT_SINK@ -5%
XF86AudioRaiseVolume
pactl set-sink-volume @DEFAULT_SINK@ +5%
XF86AudioMute
pactl set-sink-mute @DEFAULT_SINK@ toggle
XF86MonBrightnessUp
brightness up
XF86MonBrightnessDown
brightness down
XF86KbdBrightnessUp
kbd_brightness up
XF86KbdBrightnessDown
kbd_brightness down
alt + F7
brightnessctl s 10-
alt + F8
brightnessctl s 10+
#music control
super + shift + o
playerctl play-pause
super + shift + p
playerctl previous
super + shift + n
playerctl next
super + shift + alt + b
polybar-msg cmd hide
super + shift + b
polybar-msg cmd show

View File

@ -0,0 +1,18 @@
{ config, lib, pkgs, username,homeDir, ... }:
{
imports = [ ../modules/nitrogen.nix ];
home.packages = with pkgs;[
neovim
dmenu
brightnessctl
rofi
];
home.file = {
".config/sxhkd".source = dotfiles/config/sxhkd;
".config/bspwm/host.sh".source = ./bspwm/host.sh;
};
programs.firefox.enable = false;
}

View 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

View 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

View 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

View 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

View 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;
};
}

View 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"];
};
}

View 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;
};
};
}

View File

@ -0,0 +1,6 @@
{ config, lib, pkgs, ... }:
{
home.packages = with pkgs;[lutris mangohud];
}

View File

@ -0,0 +1,28 @@
{ config, lib, pkgs, homeDir, ... }:
let
background = "${homeDir}/.config/nitrogen/wallpaper.png";
in
{
home.file.".config/nitrogen/bg-saved.cfg".text = ''
[xin_0]
file=${background}
mode=5
bgcolor=#000000
[xin_1]
file=${background}
mode=5
bgcolor=#000000
[xin_2]
file=${background}
mode=5
bgcolor=#000000
[xin_3]
file=${background}
mode=5
bgcolor=#000000
'';
}

View File

@ -0,0 +1,12 @@
{ config, lib, pkgs, ... }:
{
wayland.windowManager.hyprland.settings = {
monitor= [
"virt-1, 1920x1080@60, 0x0, 1.0"
];
env = ["WLR_BACKENDS,headless"];
};
}

View File

@ -0,0 +1,14 @@
{ config, lib, pkgs, ... }:
{
services.picom = {
backend = "xrender";
settings = {
blur = {
method = "none";
size = 0;
deviation = 0.0;
};
};
};
}