add bspwm and sxhkd
This commit is contained in:
parent
cb7bedb398
commit
2919727b02
7 changed files with 176 additions and 6 deletions
15
users/rin/bspwm.nix
Normal file
15
users/rin/bspwm.nix
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
{ config, ... }: {
|
||||
xsession.windowManager.bspwm = {
|
||||
enable = true;
|
||||
monitors = { eDP-1 = [ "I" "II" "III" "IV" "V" "VI" "VII" "VIII" "XI" "X" ]; };
|
||||
settings = {
|
||||
window_gap = 10;
|
||||
border_width = 0;
|
||||
split_ratio = 0.5;
|
||||
};
|
||||
extraConfig = ''
|
||||
feh --no-fehbg --bg-fill ${config.xdg.configHome}/xorg/wallpaper.png
|
||||
systemctl --user restart polybar # home-manager loads this too early
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
|
@ -36,9 +36,13 @@
|
|||
|
||||
./dunst.nix
|
||||
./picom.nix
|
||||
./polybar.nix
|
||||
./polybar.bspwm.nix
|
||||
# ./polybar.i3.nix
|
||||
|
||||
./i3.nix
|
||||
./xorg.nix
|
||||
./sxhkd.nix
|
||||
./bspwm.nix
|
||||
# ./i3.nix
|
||||
];
|
||||
|
||||
programs = {
|
||||
|
|
|
|||
|
|
@ -29,9 +29,6 @@ let
|
|||
}) states);
|
||||
|
||||
in rec {
|
||||
home.file.".xinitrc".source = ./scripts/xinitrc;
|
||||
xdg.configFile."i3/wallpaper.png".source = ../../res/wallpaper.png;
|
||||
xsession.enable = true;
|
||||
xsession.windowManager.i3 = {
|
||||
enable = true;
|
||||
package = pkgs.i3-gaps;
|
||||
|
|
@ -45,7 +42,7 @@ in rec {
|
|||
notification = false;
|
||||
}
|
||||
{
|
||||
command = "feh --no-fehbg --bg-fill ${config.xdg.configHome}/i3/wallpaper.png";
|
||||
command = "feh --no-fehbg --bg-fill ${config.xdg.configHome}/xorg/wallpaper.png";
|
||||
always = true;
|
||||
notification = false;
|
||||
}
|
||||
|
|
|
|||
95
users/rin/polybar.bspwm.nix
Normal file
95
users/rin/polybar.bspwm.nix
Normal file
|
|
@ -0,0 +1,95 @@
|
|||
{ config, ... }: {
|
||||
services.polybar = {
|
||||
enable = true;
|
||||
script = builtins.readFile ./scripts/polybar.sh;
|
||||
settings = {
|
||||
"bar/top" = {
|
||||
monitor = "eDP-1";
|
||||
width = "100%";
|
||||
height = 35;
|
||||
#background = "#64506c";
|
||||
background = "#10000000";
|
||||
foreground = "#fff";
|
||||
|
||||
spacing = 2;
|
||||
padding = {
|
||||
left = 5;
|
||||
right = 5;
|
||||
bottom = 5;
|
||||
};
|
||||
|
||||
font = [
|
||||
"NotoSans:style=Regular:size=11:antialias=true;2"
|
||||
"NotoSans:size=11:antialias=true;2"
|
||||
"MaterialIcons:size=17:antialias=true;6"
|
||||
|
||||
"HanaMinA:size=9.8;1"
|
||||
"HanaMinB:size=9.8;1"
|
||||
];
|
||||
|
||||
modules = {
|
||||
left = "workspaces";
|
||||
center = "title";
|
||||
right = "datetime";
|
||||
};
|
||||
|
||||
enable-ipc = true;
|
||||
scroll = {
|
||||
up = "#workspaces.prev";
|
||||
down = "#workspaces.next";
|
||||
};
|
||||
};
|
||||
|
||||
"module/workspaces" = {
|
||||
type = "internal/bspwm";
|
||||
|
||||
pin-workspaces = true;
|
||||
enable-click = false;
|
||||
enable-scroll = false;
|
||||
reverse-scroll = false;
|
||||
|
||||
#ws-icon.default = "%{T3}"; # ef4a
|
||||
label = {
|
||||
monitor = "";
|
||||
focused = "%{T3}"; # ef4a
|
||||
occupied = {
|
||||
text = "%{T3}"; # e837
|
||||
foreground = "#B0FFFFFF";
|
||||
};
|
||||
empty = {
|
||||
text = "%{T3}"; # ef4a
|
||||
foreground = "#B0FFFFFF";
|
||||
};
|
||||
urgent = {
|
||||
text = "%{T3}"; # e837
|
||||
foreground = "#EE1012";
|
||||
};
|
||||
|
||||
separator = {
|
||||
text = " ";
|
||||
padding = "0";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
"module/title" = {
|
||||
type = "internal/xwindow";
|
||||
format = {
|
||||
text = "%{T1}<label>";
|
||||
padding = 4;
|
||||
};
|
||||
};
|
||||
|
||||
"module/datetime" = {
|
||||
type = "internal/date";
|
||||
date = {
|
||||
text = "%{T2}%%{F#fff}%H:%M%%{F-}";
|
||||
alt = "%{T2}%%{F#ccc}%A, %d %B %Y %%{F#fff}%H:%M%%{F#666}:%%{F#ccc}%S%%{F-}";
|
||||
};
|
||||
format = {
|
||||
padding = 4;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
54
users/rin/sxhkd.nix
Normal file
54
users/rin/sxhkd.nix
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
{ config, pkgs, ... }:
|
||||
let
|
||||
super = "Mod4";
|
||||
alt = "Mod1";
|
||||
|
||||
in rec {
|
||||
services.sxhkd = {
|
||||
enable = true;
|
||||
keybindings = {
|
||||
# Rofi (App launcher)
|
||||
"super + Return" = "rofi -lines 12 -padding 18 -width 60 -location 0 -show drun -sidebar-mode -columns 3 -font 'Noto Sans 8'";
|
||||
|
||||
# Printscreen
|
||||
"Print" = "maim -us | tee ~/Pictures/Screenshots/$(date + %s)c.png | xclip -selection clipboard -t image/png";
|
||||
"shift + Print" = "maim -u | tee ~/Pictures/Screenshots/$(date + %s).png | xclip -selection clipboard -t image/png";
|
||||
|
||||
# Quick-kill picom
|
||||
"super + p" = "systemctl --user stop picom";
|
||||
"super + shift + p" = "systemctl --user restart picom";
|
||||
|
||||
# Volume
|
||||
"XF86Audio{RaiseVolume,LowerVolume,Mute}" = "pactl set-sink-volume 0 {+5%,-5%,toggle}";
|
||||
|
||||
# Brightness
|
||||
"XF86MonBrightness{Up,Down}" = "light -{A,U} 10";
|
||||
"shift + XF86MonBrightness{Up,Down}" = "light -{A,U} 1";
|
||||
|
||||
# Gamma
|
||||
"ctrl + XF86MonBrightness{Up,Down}" = "xgamma -gamma {1.3,1}";
|
||||
|
||||
# Kill focused window
|
||||
"super + {_,shift + }c" = "bspc node -{c,k}";
|
||||
|
||||
# Change focus
|
||||
"super + {h,j,k,l}" = "bspc node -f {west,south,north,east}";
|
||||
"super + {Left,Down,Up,Right}" = "bspc node -f {west,south,north,east}";
|
||||
|
||||
# Move focused window
|
||||
"super + shift + {1-9,0}" = "bspc node -d ^{1-9,10}";
|
||||
|
||||
# Toggle tiled/fullscreen/floating
|
||||
"super + {t,f,space}" = "bspc node -t '~{tiled,fullscreen,floating}'";
|
||||
|
||||
# Exit / Restart bspwm
|
||||
"super + shift + {q,r}" = "bspc {quit,wm -r}";
|
||||
|
||||
# Restart sxhkd
|
||||
"super + shift + s" = "pkill -USR1 -x sxhkd";
|
||||
|
||||
# Workspace switching
|
||||
"super + {1-9,0}" = "bspc desktop -f ^{1-9,10}";
|
||||
};
|
||||
};
|
||||
}
|
||||
5
users/rin/xorg.nix
Normal file
5
users/rin/xorg.nix
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
{ config, ... }: {
|
||||
xsession.enable = true;
|
||||
home.file.".xinitrc".source = ./scripts/xinitrc;
|
||||
xdg.configFile."xorg/wallpaper.png".source = ../../res/wallpaper.png;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue