2019-11-26 14:04:14 -08:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
|
|
|
|
{
|
2020-01-12 15:17:17 -08:00
|
|
|
my = {
|
2020-01-17 01:22:50 -08:00
|
|
|
env.PATH = [ <config/rofi/bin> ];
|
2020-01-12 15:17:17 -08:00
|
|
|
# link recursively so other modules can link files in its folder
|
|
|
|
home.xdg.configFile."rofi" = {
|
2020-01-17 01:22:50 -08:00
|
|
|
source = <config/rofi>;
|
2020-01-12 15:17:17 -08:00
|
|
|
recursive = true;
|
|
|
|
};
|
|
|
|
|
|
|
|
packages = with pkgs; [
|
2019-11-26 14:04:14 -08:00
|
|
|
(writeScriptBin "rofi" ''
|
|
|
|
#!${stdenv.shell}
|
2019-12-08 13:44:35 -08:00
|
|
|
exec ${rofi}/bin/rofi -terminal xst -m -1 "$@"
|
2019-11-26 14:04:14 -08:00
|
|
|
'')
|
2019-12-08 13:44:35 -08:00
|
|
|
|
2019-12-08 23:54:42 -08:00
|
|
|
# Fake rofi dmenu entries
|
2019-12-08 13:44:35 -08:00
|
|
|
(makeDesktopItem {
|
2019-12-08 23:54:42 -08:00
|
|
|
name = "rofi-browsermenu";
|
2020-01-17 01:22:50 -08:00
|
|
|
desktopName = "Open Bookmark in Browser";
|
2019-12-09 00:50:45 -08:00
|
|
|
icon = "bookmark-new-symbolic";
|
2020-01-17 01:22:50 -08:00
|
|
|
exec = "${<config/rofi>}/bin/rofi-browsermenu";
|
2019-12-08 23:54:42 -08:00
|
|
|
})
|
|
|
|
(makeDesktopItem {
|
|
|
|
name = "rofi-filemenu";
|
|
|
|
desktopName = "Open Directory in Terminal";
|
|
|
|
icon = "folder";
|
2020-01-17 01:22:50 -08:00
|
|
|
exec = "${<config/rofi>}/bin/rofi-filemenu";
|
2019-12-08 23:54:42 -08:00
|
|
|
})
|
|
|
|
(makeDesktopItem {
|
|
|
|
name = "rofi-filemenu-scratch";
|
|
|
|
desktopName = "Open Directory in Scratch Terminal";
|
|
|
|
icon = "folder";
|
2020-01-17 01:22:50 -08:00
|
|
|
exec = "${<config/rofi>}/bin/rofi-filemenu -x";
|
2019-12-08 13:44:35 -08:00
|
|
|
})
|
2019-12-09 00:50:27 -08:00
|
|
|
|
|
|
|
(makeDesktopItem {
|
|
|
|
name = "reboot";
|
|
|
|
desktopName = "System: Reboot";
|
|
|
|
icon = "system-reboot";
|
|
|
|
exec = "systemctl reboot";
|
|
|
|
})
|
|
|
|
(makeDesktopItem {
|
|
|
|
name = "shutdown";
|
|
|
|
desktopName = "System: Shut Down";
|
|
|
|
icon = "system-shutdown";
|
|
|
|
exec = "systemctl shutdown";
|
|
|
|
})
|
|
|
|
(makeDesktopItem {
|
|
|
|
name = "sleep";
|
|
|
|
desktopName = "System: Sleep";
|
|
|
|
icon = "system-suspend";
|
|
|
|
exec = "systemctl suspend";
|
|
|
|
})
|
2019-12-08 23:54:42 -08:00
|
|
|
];
|
2019-11-26 14:04:14 -08:00
|
|
|
};
|
|
|
|
}
|