Refactor xst; bring back scratch term; add emacs scratch frame
This commit is contained in:
parent
712c886b09
commit
85c78ca316
|
@ -24,7 +24,10 @@ super + Return
|
|||
xst
|
||||
|
||||
super + grave
|
||||
emacsclient -a "" -e "(open-scratch-frame)"
|
||||
st-scratch
|
||||
|
||||
super + shift + grave
|
||||
emacsclient -e '(open-scratch-frame)'
|
||||
|
||||
super + space
|
||||
rofi -monitor -4 -show drun -show-icons
|
||||
|
|
|
@ -8,17 +8,34 @@
|
|||
|
||||
environment = {
|
||||
systemPackages = with pkgs; [
|
||||
xst # st + nice-to-have extensions
|
||||
|
||||
lightdm
|
||||
bspwm
|
||||
dunst
|
||||
libnotify
|
||||
|
||||
(polybar.override {
|
||||
pulseSupport = true;
|
||||
nlSupport = true;
|
||||
})
|
||||
|
||||
xst # st + nice-to-have extensions
|
||||
(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
|
||||
'')
|
||||
];
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue