2020-03-28 22:48:43 -07:00
|
|
|
{ config, options, lib, pkgs, ... }:
|
2019-11-26 14:04:14 -08:00
|
|
|
|
2020-03-28 22:48:43 -07:00
|
|
|
with lib;
|
2020-10-01 15:46:04 -07:00
|
|
|
with lib.my;
|
|
|
|
let cfg = config.modules.desktop.apps.rofi;
|
|
|
|
in {
|
2020-03-28 22:48:43 -07:00
|
|
|
options.modules.desktop.apps.rofi = {
|
2020-10-01 15:46:04 -07:00
|
|
|
enable = mkBoolOpt false;
|
2020-03-28 22:48:43 -07:00
|
|
|
};
|
|
|
|
|
2020-10-01 15:46:04 -07:00
|
|
|
config = mkIf cfg.enable {
|
|
|
|
# link recursively so other modules can link files in its folder
|
|
|
|
# home.xdg.configFile."rofi" = {
|
|
|
|
# source = <config/rofi>;
|
|
|
|
# recursive = true;
|
|
|
|
# };
|
2020-01-12 15:17:17 -08:00
|
|
|
|
2020-10-01 15:46:04 -07:00
|
|
|
user.packages = with pkgs; [
|
|
|
|
(writeScriptBin "rofi" ''
|
|
|
|
#!${stdenv.shell}
|
|
|
|
exec ${pkgs.rofi}/bin/rofi -terminal xst -m -1 "$@"
|
|
|
|
'')
|
2019-12-08 13:44:35 -08:00
|
|
|
|
2020-10-01 15:46:04 -07:00
|
|
|
# For rapidly test changes to rofi's stylesheets
|
|
|
|
# (writeScriptBin "rofi-test" ''
|
|
|
|
# #!${stdenv.shell}
|
|
|
|
# themefile=$1
|
|
|
|
# themename=${my.theme.name}
|
|
|
|
# shift
|
|
|
|
# exec rofi \
|
2020-10-23 17:54:25 -07:00
|
|
|
# -theme ${themesDir}/$themename/rofi/$themefile \
|
2020-10-01 15:46:04 -07:00
|
|
|
# "$@"
|
|
|
|
# '')
|
2019-12-09 00:50:27 -08:00
|
|
|
|
2020-10-01 15:46:04 -07:00
|
|
|
# Fake rofi dmenu entries
|
|
|
|
(makeDesktopItem {
|
|
|
|
name = "rofi-bookmarkmenu";
|
|
|
|
desktopName = "Open Bookmark in Browser";
|
|
|
|
icon = "bookmark-new-symbolic";
|
|
|
|
exec = "${binDir}/rofi/bookmarkmenu";
|
|
|
|
})
|
|
|
|
(makeDesktopItem {
|
|
|
|
name = "rofi-filemenu";
|
|
|
|
desktopName = "Open Directory in Terminal";
|
|
|
|
icon = "folder";
|
|
|
|
exec = "${binDir}/rofi/filemenu";
|
|
|
|
})
|
|
|
|
(makeDesktopItem {
|
|
|
|
name = "rofi-filemenu-scratch";
|
|
|
|
desktopName = "Open Directory in Scratch Terminal";
|
|
|
|
icon = "folder";
|
|
|
|
exec = "${binDir}/rofi/filemenu -x";
|
|
|
|
})
|
2020-03-28 22:48:43 -07:00
|
|
|
|
2020-10-01 15:46:04 -07:00
|
|
|
(makeDesktopItem {
|
|
|
|
name = "lock-display";
|
|
|
|
desktopName = "Lock screen";
|
|
|
|
icon = "system-lock-screen";
|
|
|
|
exec = "${binDir}/zzz";
|
|
|
|
})
|
|
|
|
];
|
2019-11-26 14:04:14 -08:00
|
|
|
};
|
|
|
|
}
|