2020-01-17 02:48:17 -08:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
|
|
|
|
{
|
|
|
|
services.xserver.desktopManager.xterm.enable = false;
|
|
|
|
|
2020-01-17 13:13:32 -08:00
|
|
|
# xst-256color isn't supported over ssh, so revert to a known one
|
|
|
|
my.zsh.rc = ''[ "$TERM" = xst-256color ] && export TERM=xterm-256color'';
|
|
|
|
|
2020-01-17 02:48:17 -08:00
|
|
|
my.packages = with pkgs; [
|
|
|
|
libqalculate # calculator cli w/ currency & unit conversion
|
|
|
|
|
|
|
|
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";
|
|
|
|
})
|
|
|
|
|
|
|
|
(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
|
|
|
|
else
|
|
|
|
xdotool windowactivate $scratch
|
|
|
|
fi
|
|
|
|
else
|
|
|
|
xst -t $SCRID -n $SCRID -c $SCRID \
|
|
|
|
-f "$(xrdb -query | grep 'st-scratch\.font' | cut -f2)" \
|
|
|
|
-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";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
}
|