2019-08-06 10:56:54 -07:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
|
|
|
|
{
|
2019-11-26 14:04:14 -08:00
|
|
|
imports = [
|
|
|
|
./.
|
2019-12-12 00:10:31 -08:00
|
|
|
|
|
|
|
# My launcher
|
2019-11-26 14:04:14 -08:00
|
|
|
./rofi.nix
|
2019-12-12 00:10:31 -08:00
|
|
|
|
|
|
|
# I often need a thumbnail browser to show off, peruse or organize photos,
|
|
|
|
# design work, or digital art.
|
|
|
|
./thunar.nix
|
2019-11-26 14:04:14 -08:00
|
|
|
];
|
2019-08-06 10:56:54 -07:00
|
|
|
|
2020-01-12 15:17:17 -08:00
|
|
|
environment.systemPackages = with pkgs; [
|
|
|
|
lightdm
|
|
|
|
bspwm
|
|
|
|
dunst
|
|
|
|
libnotify
|
|
|
|
(polybar.override {
|
|
|
|
pulseSupport = true;
|
|
|
|
nlSupport = true;
|
|
|
|
})
|
2019-12-03 17:33:31 -08:00
|
|
|
|
2020-01-12 15:17:17 -08:00
|
|
|
xst # st + nice-to-have extensions
|
|
|
|
(makeDesktopItem {
|
|
|
|
name = "xst";
|
|
|
|
desktopName = "Suckless Terminal";
|
|
|
|
genericName = "Default terminal";
|
|
|
|
icon = "utilities-terminal";
|
|
|
|
exec = "${xst}/bin/xst";
|
|
|
|
categories = "Development;System;Utility";
|
|
|
|
})
|
2019-12-08 23:54:42 -08:00
|
|
|
|
2020-01-12 15:17:17 -08:00
|
|
|
(writeScriptBin "st-scratch" ''
|
|
|
|
#!${stdenv.shell}
|
|
|
|
SCRID=st-scratch
|
|
|
|
focused=$(xdotool getactivewindow)
|
|
|
|
scratch=$(xdotool search --onlyvisible --classname $SCRID)
|
|
|
|
if [[ -n $scratch ]]; then
|
|
|
|
if [[ $focused == $scratch ]]; then
|
|
|
|
xdotool windowkill $scratch
|
2019-12-03 17:33:31 -08:00
|
|
|
else
|
2020-01-12 15:17:17 -08:00
|
|
|
xdotool windowactivate $scratch
|
2019-12-03 17:33:31 -08:00
|
|
|
fi
|
2020-01-12 15:17:17 -08:00
|
|
|
else
|
2019-12-08 23:54:42 -08:00
|
|
|
xst -t $SCRID -n $SCRID -c $SCRID \
|
|
|
|
-f "$(xrdb -query | grep 'st-scratch\.font' | cut -f2)" \
|
2020-01-12 15:17:17 -08:00
|
|
|
-g 100x26 \
|
|
|
|
-e $SHELL
|
|
|
|
fi
|
|
|
|
'')
|
|
|
|
(writeScriptBin "st-calc" ''
|
|
|
|
#!${stdenv.shell}
|
|
|
|
SCRID=st-calc
|
|
|
|
scratch=$(xdotool search --onlyvisible --classname $SCRID)
|
|
|
|
[ -n "$scratch" ] && xdotool windowkill $scratch
|
|
|
|
xst -t $SCRID -n $SCRID -c $SCRID \
|
|
|
|
-f "$(xrdb -query | grep 'st-scratch\.font' | cut -f2)" \
|
|
|
|
-g 80x12 \
|
|
|
|
-e $SHELL -c qalc
|
|
|
|
'')
|
|
|
|
(makeDesktopItem {
|
|
|
|
name = "st-calc";
|
|
|
|
desktopName = "Calculator";
|
|
|
|
icon = "calc";
|
|
|
|
exec = "st-calc";
|
|
|
|
categories = "Development";
|
|
|
|
})
|
|
|
|
];
|
2019-11-26 14:04:14 -08:00
|
|
|
|
2019-08-06 10:56:54 -07:00
|
|
|
services = {
|
|
|
|
xserver = {
|
|
|
|
desktopManager.xterm.enable = false;
|
|
|
|
windowManager.bspwm.enable = true;
|
2019-12-03 21:00:32 -08:00
|
|
|
displayManager.lightdm = {
|
|
|
|
enable = true;
|
|
|
|
greeters.mini = {
|
|
|
|
enable = true;
|
2020-01-12 15:17:17 -08:00
|
|
|
user = config.my.username;
|
2019-12-03 21:00:32 -08:00
|
|
|
};
|
|
|
|
};
|
2019-08-06 10:56:54 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
compton = {
|
|
|
|
enable = true;
|
|
|
|
backend = "glx";
|
2019-10-17 16:57:00 -07:00
|
|
|
vSync = true;
|
2020-01-12 15:17:17 -08:00
|
|
|
opacityRules = [
|
|
|
|
"100:class_g = 'Firefox'"
|
|
|
|
"100:class_g = 'VirtualBox Machine'"
|
|
|
|
# Art/image programs where we need fidelity
|
|
|
|
"100:class_g = 'Gimp'"
|
|
|
|
"100:class_g = 'Inkscape'"
|
|
|
|
"100:class_g = 'aseprite'"
|
|
|
|
"100:class_g = 'krita'"
|
|
|
|
"100:class_g = 'feh'"
|
|
|
|
"100:class_g = 'mpv'"
|
|
|
|
];
|
|
|
|
settings.blur-background-exclude = [
|
|
|
|
"window_type = 'dock'"
|
|
|
|
"window_type = 'desktop'"
|
|
|
|
"_GTK_FRAME_EXTENTS@:c"
|
|
|
|
];
|
2019-08-06 10:56:54 -07:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2020-01-12 15:17:17 -08:00
|
|
|
# For polybar
|
|
|
|
fonts.fonts = [ pkgs.siji ];
|
2019-08-06 10:56:54 -07:00
|
|
|
|
2020-01-12 15:17:17 -08:00
|
|
|
my = {
|
|
|
|
env.PATH = [ <my/config/bspwm/bin> ];
|
|
|
|
home.xdg.configFile = {
|
|
|
|
"sxhkd".source = <my/config/sxhkd>;
|
|
|
|
# link recursively so other modules can link files in their folders
|
|
|
|
"bspwm" = { source = <my/config/bspwm>; recursive = true; };
|
|
|
|
};
|
2019-08-06 10:56:54 -07:00
|
|
|
};
|
|
|
|
}
|