adding desktop config
This commit is contained in:
commit
3a345929b9
21 files changed
+1131
No files matched your search
@@ -0,0 +1,9 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
programs.chromium = {
|
||||
enable = true;
|
||||
package = pkgs.ungoogled-chromium;
|
||||
# extensions = [ { id = "..."; } ];
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{ pkgs, inputs, ... }:
|
||||
|
||||
{
|
||||
home.packages = [
|
||||
inputs.zen-browser.packages.${pkgs.stdenv.hostPlatform.system}.default
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
{ lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
xdg.configFile."bspwm/bspwmrc" = {
|
||||
executable = true;
|
||||
text = ''
|
||||
#!/bin/sh
|
||||
|
||||
bspc monitor -d 1 2 3 4 5 6 7 8 9
|
||||
|
||||
# Gaps and borders
|
||||
bspc config window_gap 10
|
||||
bspc config border_width 2
|
||||
bspc config focused_border_color "#7aa2f7"
|
||||
bspc config normal_border_color "#292e42"
|
||||
|
||||
# Layout behaviour
|
||||
bspc config split_ratio 0.50
|
||||
bspc config borderless_monocle true
|
||||
bspc config gapless_monocle true
|
||||
|
||||
# Launch polybar
|
||||
~/.config/polybar/launch.sh
|
||||
'';
|
||||
};
|
||||
|
||||
home.activation.reloadBspwm = lib.hm.dag.entryAfter [ "linkGeneration" ] ''
|
||||
if ${pkgs.procps}/bin/pgrep -x bspwm >/dev/null; then
|
||||
PATH=${pkgs.bspwm}/bin:$PATH DISPLAY=:0 $HOME/.config/bspwm/bspwmrc \
|
||||
|| echo "bspwmrc reload failed" >&2
|
||||
fi
|
||||
'';
|
||||
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
{ config, lib, ... }:
|
||||
|
||||
let
|
||||
cfg = config.my.defaults;
|
||||
mkCmdOption = description: lib.mkOption {
|
||||
type = lib.types.nullOr lib.types.str;
|
||||
default = null;
|
||||
inherit description;
|
||||
};
|
||||
in
|
||||
{
|
||||
options.my.defaults = {
|
||||
terminal = mkCmdOption "Command for the default terminal ($TERMINAL).";
|
||||
browser = mkCmdOption "Command for the default browser ($BROWSER).";
|
||||
editor = mkCmdOption "Command for the default editor ($EDITOR and $VISUAL).";
|
||||
};
|
||||
|
||||
config.home.sessionVariables = lib.mkMerge [
|
||||
(lib.mkIf (cfg.terminal != null) { TERMINAL = cfg.terminal; })
|
||||
(lib.mkIf (cfg.browser != null) { BROWSER = cfg.browser; })
|
||||
(lib.mkIf (cfg.editor != null) { EDITOR = cfg.editor; VISUAL = cfg.editor; })
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
|
||||
{ ... }:
|
||||
|
||||
{
|
||||
programs.helix.enable = true;
|
||||
}
|
||||
@@ -0,0 +1,91 @@
|
||||
{ lib, pkgs, ... }:
|
||||
|
||||
let
|
||||
polybar = pkgs.polybar.override { pulseSupport = true; };
|
||||
in
|
||||
{
|
||||
home.packages = [
|
||||
polybar
|
||||
pkgs.nerd-fonts.jetbrains-mono
|
||||
];
|
||||
fonts.fontconfig.enable = true;
|
||||
|
||||
xdg.configFile."polybar/config.ini".text = ''
|
||||
[colors]
|
||||
background = #1a1b26
|
||||
foreground = #c0caf5
|
||||
primary = #7aa2f7
|
||||
dim = #565f89
|
||||
|
||||
[bar/main]
|
||||
width = 100%
|
||||
height = 22pt
|
||||
background = ''${colors.background}
|
||||
foreground = ''${colors.foreground}
|
||||
font-0 = JetBrainsMono Nerd Font:size=10;2
|
||||
padding = 1
|
||||
module-margin = 1
|
||||
separator = |
|
||||
separator-foreground = ''${colors.dim}
|
||||
wm-restack = bspwm
|
||||
enable-ipc = true
|
||||
|
||||
modules-left = bspwm
|
||||
modules-center = date
|
||||
modules-right = pulseaudio cpu memory
|
||||
|
||||
tray-position = right
|
||||
|
||||
[module/bspwm]
|
||||
type = internal/bspwm
|
||||
label-focused = %name%
|
||||
label-focused-background = ''${colors.primary}
|
||||
label-focused-foreground = ''${colors.background}
|
||||
label-focused-padding = 1
|
||||
label-occupied = %name%
|
||||
label-occupied-padding = 1
|
||||
label-empty = %name%
|
||||
label-empty-foreground = ''${colors.dim}
|
||||
label-empty-padding = 1
|
||||
label-urgent = %name%
|
||||
label-urgent-background = #f7768e
|
||||
label-urgent-padding = 1
|
||||
|
||||
[module/date]
|
||||
type = internal/date
|
||||
interval = 5
|
||||
date = %a %b %d %H:%M
|
||||
|
||||
[module/cpu]
|
||||
type = internal/cpu
|
||||
interval = 2
|
||||
label = CPU %percentage%%
|
||||
|
||||
[module/memory]
|
||||
type = internal/memory
|
||||
interval = 5
|
||||
label = RAM %percentage_used%%
|
||||
|
||||
[module/pulseaudio]
|
||||
type = internal/pulseaudio
|
||||
label-volume = VOL %percentage%%
|
||||
label-muted = muted
|
||||
label-muted-foreground = ''${colors.dim}
|
||||
'';
|
||||
|
||||
xdg.configFile."polybar/launch.sh" = {
|
||||
executable = true;
|
||||
text = ''
|
||||
#!/bin/sh
|
||||
${pkgs.procps}/bin/pkill -x polybar
|
||||
while ${pkgs.procps}/bin/pgrep -x polybar >/dev/null; do sleep 0.2; done
|
||||
${pkgs.util-linux}/bin/setsid -f ${polybar}/bin/polybar main
|
||||
'';
|
||||
};
|
||||
|
||||
# home.activation.reloadPolybar = lib.hm.dag.entryAfter [ "writeBoundary" ] ''
|
||||
# if ${pkgs.procps}/bin/pgrep -x bspwm >/dev/null; then
|
||||
# DISPLAY=:0 $HOME/.config/polybar/launch.sh || true
|
||||
# fi
|
||||
# '';
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
xdg.configFile."sxhkd/sxhkdrc".text = ''
|
||||
# terminal / launcher
|
||||
super + Return
|
||||
${config.my.defaults.terminal}
|
||||
super + space
|
||||
dmenu_run
|
||||
|
||||
# close window / quit bspwm
|
||||
super + q
|
||||
bspc node -c
|
||||
super + alt + Escape
|
||||
bspc quit
|
||||
|
||||
# focus window
|
||||
super + {Left,Down,Up,Right}
|
||||
bspc node -f {west,south,north,east}
|
||||
|
||||
# move (swap) window
|
||||
super + shift + {Left,Down,Up,Right}
|
||||
bspc node -s {west,south,north,east}
|
||||
|
||||
# resize window
|
||||
super + alt + {Left,Down,Up,Right}
|
||||
bspc node -z {left -20 0,bottom 0 20,top 0 -20,right 20 0}
|
||||
|
||||
# go to workspace / send window to workspace
|
||||
super + {_,shift + }{1-9}
|
||||
bspc {desktop -f,node -d} '^{1-9}'
|
||||
|
||||
# workspace next/previous
|
||||
super + ctrl + {Left,Right}
|
||||
bspc desktop -f {prev,next}.local
|
||||
|
||||
# fullscreen / floating
|
||||
super + f
|
||||
bspc node -t "~fullscreen"
|
||||
super + shift + f
|
||||
bspc node -t "~floating"
|
||||
'';
|
||||
|
||||
home.activation.reloadSxhkd = lib.hm.dag.entryAfter [ "linkGeneration" ] ''
|
||||
${pkgs.procps}/bin/pkill -USR1 -x sxhkd || true
|
||||
'';
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
{ ... }:
|
||||
|
||||
{
|
||||
programs.alacritty = {
|
||||
enable = true;
|
||||
settings = {
|
||||
font.size = 11;
|
||||
window.opacity = 0.95;
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in new issue
Block a user