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
|
xst
|
||||||
|
|
||||||
super + grave
|
super + grave
|
||||||
emacsclient -a "" -e "(open-scratch-frame)"
|
st-scratch
|
||||||
|
|
||||||
|
super + shift + grave
|
||||||
|
emacsclient -e '(open-scratch-frame)'
|
||||||
|
|
||||||
super + space
|
super + space
|
||||||
rofi -monitor -4 -show drun -show-icons
|
rofi -monitor -4 -show drun -show-icons
|
||||||
|
|
|
@ -8,17 +8,34 @@
|
||||||
|
|
||||||
environment = {
|
environment = {
|
||||||
systemPackages = with pkgs; [
|
systemPackages = with pkgs; [
|
||||||
xst # st + nice-to-have extensions
|
|
||||||
|
|
||||||
lightdm
|
lightdm
|
||||||
bspwm
|
bspwm
|
||||||
dunst
|
dunst
|
||||||
libnotify
|
libnotify
|
||||||
|
|
||||||
(polybar.override {
|
(polybar.override {
|
||||||
pulseSupport = true;
|
pulseSupport = true;
|
||||||
nlSupport = 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