aboutsummaryrefslogtreecommitdiffstats
path: root/modules/desktop/application-launcher
diff options
context:
space:
mode:
Diffstat (limited to 'modules/desktop/application-launcher')
-rw-r--r--modules/desktop/application-launcher/default.nix23
-rw-r--r--modules/desktop/application-launcher/fzf/default.nix22
-rw-r--r--modules/desktop/application-launcher/fzf/launch.sh28
-rw-r--r--modules/desktop/application-launcher/rofi/default.nix21
-rw-r--r--modules/desktop/application-launcher/rofi/theme.mustache.rasi82
5 files changed, 0 insertions, 176 deletions
diff --git a/modules/desktop/application-launcher/default.nix b/modules/desktop/application-launcher/default.nix
deleted file mode 100644
index 012deb5..0000000
--- a/modules/desktop/application-launcher/default.nix
+++ /dev/null
@@ -1,23 +0,0 @@
-{ lib, ... }:
-
-{
- imports = [
- ./fzf
- ./rofi
- ];
-
- options.desktop.application-launcher = {
- default = lib.mkOption {
- type = lib.types.enum [
- "fzf"
- "rofi"
- ];
- description = "Select the default application launcher.";
- };
-
- command = lib.mkOption {
- type = lib.types.str;
- description = "Command for default application launcher program.";
- };
- };
-}
diff --git a/modules/desktop/application-launcher/fzf/default.nix b/modules/desktop/application-launcher/fzf/default.nix
deleted file mode 100644
index a7d12d3..0000000
--- a/modules/desktop/application-launcher/fzf/default.nix
+++ /dev/null
@@ -1,22 +0,0 @@
-{ config, lib, pkgs, ... }:
-
-{
- options.desktop.application-launcher.fzf = {
- enable = lib.mkEnableOption "Enables fzf to be used as a application launcher.";
- };
-
- config = lib.mkIf config.desktop.application-launcher.fzf.enable {
- assertions = [
- {
- assertion = config.tools.utils.fzf.enable;
- message ="Module desktop.application-launcher.fzf requires tools.utils.fzf module to be enabled.";
- }
- ];
-
- desktop.application-launcher.default = lib.mkDefault "fzf";
- desktop.application-launcher.command =
- lib.mkIf
- (config.desktop.application-launcher.default == "fzf")
- "${config.tools.terminal.command} --title 'Application Launcher' --class floating-termial -e ${(pkgs.writeShellScript "fzf-launch.sh" (builtins.readFile ./launch.sh))}";
- };
-}
diff --git a/modules/desktop/application-launcher/fzf/launch.sh b/modules/desktop/application-launcher/fzf/launch.sh
deleted file mode 100644
index 53987f6..0000000
--- a/modules/desktop/application-launcher/fzf/launch.sh
+++ /dev/null
@@ -1,28 +0,0 @@
-#!/bin/sh
-
-# Function to get executables from PATH and display them with Nerd Font icons
-get_executables() {
- for dir in $(echo "$PATH" | tr ':' ' '); do
- [ -d "$dir" ] && ls "$dir" 2>/dev/null | awk -F/ '{print "\033[31m \033[0m " $NF}'
- done | sort -u
-}
-
-# Function to run fzf and select an executable
-select_executable() {
- fzf --ansi --height=100% --border=none --layout=reverse --no-multi --prompt " "
-}
-
-# Function to remove ANSI codes and icons from the selected executable
-clean_selection() {
- sed 's/\x1B\[[0-9;]*m//g' | awk '{$1=""; print $0}' | sed 's/^ //'
-}
-
-# Main script execution
-selected_executable=$(get_executables | select_executable | clean_selection)
-
-# If an executable is selected, run it
-if [ -n "$selected_executable" ]; then
- setsid "$selected_executable" >/dev/null 2>&1 &
- sleep 0.01
- kill -9 $PPID
-fi
diff --git a/modules/desktop/application-launcher/rofi/default.nix b/modules/desktop/application-launcher/rofi/default.nix
deleted file mode 100644
index bfdd617..0000000
--- a/modules/desktop/application-launcher/rofi/default.nix
+++ /dev/null
@@ -1,21 +0,0 @@
-{ config, lib, pkgs, ... }:
-
-{
- options.desktop.application-launcher.rofi = {
- enable = lib.mkEnableOption "Enables rofi.";
- };
-
- config = lib.mkIf config.desktop.application-launcher.rofi.enable {
- desktop.application-launcher.default = lib.mkDefault "rofi";
- desktop.application-launcher.command =
- lib.mkIf
- (config.desktop.application-launcher.default == "rofi")
- "${pkgs.rofi}/bin/rofi -show run";
-
- programs.rofi.enable = true;
- programs.rofi.font = "${config.fonts.normal} ${toString config.fonts.size}";
- programs.rofi.theme = config.scheme {
- template = builtins.readFile ./theme.mustache.rasi;
- };
- };
-}
diff --git a/modules/desktop/application-launcher/rofi/theme.mustache.rasi b/modules/desktop/application-launcher/rofi/theme.mustache.rasi
deleted file mode 100644
index 02cdaf3..0000000
--- a/modules/desktop/application-launcher/rofi/theme.mustache.rasi
+++ /dev/null
@@ -1,82 +0,0 @@
-configuration {
- drun {
- display-name: " ";
- }
-
- run {
- display-name: " ";
- }
-
- window {
- display-name: " ";
- }
-
- ssh {
- display-name: " ";
- }
-
- timeout {
- delay: 10;
- action: "kb-cancel";
- }
-}
-
-* {
- border: 1;
- margin: 0;
- padding: 0;
- spacing: 0;
-
- bg: #{{base00-hex}};
- bg-alt: #{{base01-hex}};
- fg: #{{base07-hex}};
- fg-alt: #{{base03-hex}};
-
- background-color: @bg;
- text-color: @fg;
-}
-
-window {
- transparency: "real";
- border-color: #{{base03-hex}};
-}
-
-mainbox {
- children: [inputbar, listview];
-}
-
-inputbar {
- background-color: @bg-alt;
- children: [prompt, entry];
-}
-
-entry {
- background-color: inherit;
- padding: 12px 3px;
-}
-
-prompt {
- background-color: inherit;
- padding: 12px;
-}
-
-listview {
- lines: 8;
-}
-
-element {
- children: [element-text];
-}
-
-element-icon {
- padding: 10px 10px;
-}
-
-element-text {
- padding: 10px 10px;
- text-color: @fg-alt;
-}
-
-element-text selected {
- text-color: @fg;
-}