Add rofi-filemenu & st-calc
These are dummy applications for rofi's dmenu launcher.
This commit is contained in:
parent
6820a8a51c
commit
33868cd3d3
|
@ -23,6 +23,7 @@ bspc rule -a feh state=fullscreen
|
|||
bspc rule -a 'Emacs:org*' state=floating
|
||||
bspc rule -a 'Emacs:scratch' state=floating
|
||||
bspc rule -a st-scratch state=floating sticky=on center=on
|
||||
bspc rule -a st-calc state=floating sticky=on center=on
|
||||
|
||||
|
||||
#
|
||||
|
|
10
config/rofi/bin/rofi-filemenu
Executable file
10
config/rofi/bin/rofi-filemenu
Executable file
|
@ -0,0 +1,10 @@
|
|||
#!/usr/bin/env sh
|
||||
DIR="$(fd -L --type d . $HOME | rofi -dmenu -i -columns 1 -theme theme/appmenu.rasi)"
|
||||
if [ -d "$DIR" ]; then
|
||||
cd "$DIR"
|
||||
if [[ $1 == "-x" ]]; then
|
||||
st-scratch
|
||||
else
|
||||
xst
|
||||
fi
|
||||
fi
|
|
@ -18,6 +18,15 @@
|
|||
})
|
||||
|
||||
xst # st + nice-to-have extensions
|
||||
(makeDesktopItem {
|
||||
name = "xst";
|
||||
desktopName = "Suckless Terminal";
|
||||
genericName = "Default terminal";
|
||||
icon = "xterm";
|
||||
exec = "${xst}/bin/xst";
|
||||
categories = "Development;System;Utility";
|
||||
})
|
||||
|
||||
(writeScriptBin "st-scratch" ''
|
||||
#!${stdenv.shell}
|
||||
SCRID=st-scratch
|
||||
|
@ -36,13 +45,22 @@
|
|||
-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 = "xst";
|
||||
desktopName = "Suckless Terminal";
|
||||
genericName = "Default terminal";
|
||||
icon = "xterm";
|
||||
exec = "${xst}/bin/xst";
|
||||
categories = "Development;System;Utility";
|
||||
name = "st-calc";
|
||||
desktopName = "Calculator";
|
||||
icon = "calc";
|
||||
exec = "st-calc";
|
||||
categories = "Development";
|
||||
})
|
||||
];
|
||||
};
|
||||
|
|
|
@ -9,20 +9,37 @@
|
|||
'')
|
||||
rofi
|
||||
|
||||
# Fake rofi dmenu entries
|
||||
(makeDesktopItem {
|
||||
name = "browsermenu";
|
||||
name = "rofi-browsermenu";
|
||||
desktopName = "Open Bookmark in Firefox";
|
||||
icon = "firefox";
|
||||
exec = "rofi-browsermenu";
|
||||
categories = "Network";
|
||||
exec = "${<config/rofi>}/bin/rofi-browsermenu";
|
||||
categories = "Network;Utility";
|
||||
})
|
||||
(makeDesktopItem {
|
||||
name = "rofi-filemenu";
|
||||
desktopName = "Open Directory in Terminal";
|
||||
icon = "folder";
|
||||
exec = "${<config/rofi>}/bin/rofi-filemenu";
|
||||
categories = "System;Utility";
|
||||
})
|
||||
(makeDesktopItem {
|
||||
name = "rofi-filemenu-scratch";
|
||||
desktopName = "Open Directory in Scratch Terminal";
|
||||
icon = "folder";
|
||||
exec = "${<config/rofi>}/bin/rofi-filemenu -x";
|
||||
categories = "System;Utility";
|
||||
})
|
||||
];
|
||||
|
||||
# shellAliases = {};
|
||||
];
|
||||
};
|
||||
|
||||
home-manager.users.hlissner.xdg.configFile = {
|
||||
# link recursively so other modules can link files in its folder
|
||||
"rofi" = { source = <config/rofi>; recursive = true; };
|
||||
"rofi" = {
|
||||
source = <config/rofi>;
|
||||
recursive = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue