feat: restore rofi instead of wofi
This commit is contained in:
parent
969c59279d
commit
1d5f428cb1
@ -1,3 +1,3 @@
|
|||||||
{pkgs, ...}:
|
{pkgs, ...}:
|
||||||
pkgs.writeShellScriptBin "askpass" ''
|
pkgs.writeShellScriptBin "askpass" ''
|
||||||
${pkgs.wofi}/bin/wofi -d -P -L 1 -p "$(printf $1 | sed s/://)"''
|
${pkgs.rofi}/bin/rofi -dmenu -password -no-fixed-num-lines -p $(printf \"$*\" | sed 's/://')''
|
||||||
|
|||||||
@ -1,18 +0,0 @@
|
|||||||
{pkgs, ...}:
|
|
||||||
pkgs.writeShellScriptBin "rofi-emoji" ''
|
|
||||||
SELECTED_EMOJI=$(grep -v "#" ~/.config/emoji | ${pkgs.wofi}/bin/wofi --dmenu -p "Select emoji" -i | awk '{print $1}' | tr -d '\n')
|
|
||||||
if [ "$XDG_SESSION_TYPE" = "wayland" ]; then
|
|
||||||
printf "%s" "$SELECTED_EMOJI" | ${pkgs.wl-clipboard-rs}/bin/wl-copy
|
|
||||||
else
|
|
||||||
printf "%s" "$SELECTED_EMOJI" | ${pkgs.xclip}/bin/xclip -sel clip
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$XDG_SESSION_TYPE" = "wayland" ]
|
|
||||||
then EMOJI=$(${pkgs.wl-clipboard-rs}/bin/wl-paste)
|
|
||||||
else EMOJI=$(${pkgs.xclip}/bin/xclip -o)
|
|
||||||
fi
|
|
||||||
|
|
||||||
test -z "$EMOJI" && notify-send "No emoji copied" -u low && exit
|
|
||||||
EMOJI="$EMOJI copied to clipboard"
|
|
||||||
${pkgs.libnotify}/bin/notify-send -u low "$EMOJI"
|
|
||||||
''
|
|
||||||
@ -1,6 +1,6 @@
|
|||||||
{pkgs, ...}:
|
{pkgs, ...}:
|
||||||
pkgs.writeShellScriptBin "ytplay" ''
|
pkgs.writeShellScriptBin "ytplay" ''
|
||||||
URL=$(${pkgs.wofi}/bin/wofi --dmenu -i -p "Video URL")
|
URL=$(rofi -dmenu -i -p "Video URL")
|
||||||
if [ -z "$URL" ]; then
|
if [ -z "$URL" ]; then
|
||||||
echo "You need to provide a URL"
|
echo "You need to provide a URL"
|
||||||
exit 1
|
exit 1
|
||||||
@ -9,7 +9,7 @@ pkgs.writeShellScriptBin "ytplay" ''
|
|||||||
grep -E "webm.*[0-9]+x[0-9]" | \
|
grep -E "webm.*[0-9]+x[0-9]" | \
|
||||||
awk '{print $3 " " $1}' | \
|
awk '{print $3 " " $1}' | \
|
||||||
sort -gu | \
|
sort -gu | \
|
||||||
${pkgs.wofi}/bin/wofi --dmenu -i -p "Resolution")
|
rofi -dmenu -i -p "Resolution")
|
||||||
mapfile -t RESOLUTION <<< "$RESOLUTION_CHOICE"
|
mapfile -t RESOLUTION <<< "$RESOLUTION_CHOICE"
|
||||||
RESOLUTION_CODE=''${RESOLUTION[0]}
|
RESOLUTION_CODE=''${RESOLUTION[0]}
|
||||||
${pkgs.mpv}/bin/mpv --ytdl-format="''${RESOLUTION_CODE}+bestaudio/best" "$URL"
|
${pkgs.mpv}/bin/mpv --ytdl-format="''${RESOLUTION_CODE}+bestaudio/best" "$URL"
|
||||||
|
|||||||
@ -7,17 +7,16 @@ with lib; let
|
|||||||
cfg = config.home.desktop;
|
cfg = config.home.desktop;
|
||||||
in {
|
in {
|
||||||
imports = [
|
imports = [
|
||||||
./emoji.nix
|
|
||||||
./eww.nix
|
./eww.nix
|
||||||
./hyprland.nix
|
./hyprland.nix
|
||||||
./kdeconnect.nix
|
./kdeconnect.nix
|
||||||
./kitty.nix
|
./kitty.nix
|
||||||
./obs.nix
|
./obs.nix
|
||||||
./qt.nix
|
./qt.nix
|
||||||
|
./rofi
|
||||||
./swaync.nix
|
./swaync.nix
|
||||||
./waybar.nix
|
./waybar.nix
|
||||||
./wlsunset.nix
|
./wlsunset.nix
|
||||||
./wofi.nix
|
|
||||||
];
|
];
|
||||||
|
|
||||||
options.home.desktop.fullDesktop = mkEnableOption "Enable options for graphical environments";
|
options.home.desktop.fullDesktop = mkEnableOption "Enable options for graphical environments";
|
||||||
@ -28,5 +27,6 @@ in {
|
|||||||
kitty.enable = mkDefault cfg.fullDesktop;
|
kitty.enable = mkDefault cfg.fullDesktop;
|
||||||
obs.enable = mkDefault cfg.fullDesktop;
|
obs.enable = mkDefault cfg.fullDesktop;
|
||||||
qt.enable = mkDefault cfg.fullDesktop;
|
qt.enable = mkDefault cfg.fullDesktop;
|
||||||
|
rofi.enable = mkDefault cfg.fullDesktop;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@ -6,7 +6,6 @@
|
|||||||
}:
|
}:
|
||||||
with lib; let
|
with lib; let
|
||||||
cfg = config.home.desktop.hyprland;
|
cfg = config.home.desktop.hyprland;
|
||||||
rofi-emoji = import ../cli/scripts/rofi-emoji.nix {inherit pkgs;};
|
|
||||||
laptops = ["gampo"];
|
laptops = ["gampo"];
|
||||||
in {
|
in {
|
||||||
imports = [
|
imports = [
|
||||||
@ -34,13 +33,13 @@ in {
|
|||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
home.desktop = {
|
home.desktop = {
|
||||||
|
rofi.enable = mkDefault true;
|
||||||
swaync.enable = mkDefault true;
|
swaync.enable = mkDefault true;
|
||||||
waybar = {
|
waybar = {
|
||||||
enable = mkDefault true;
|
enable = mkDefault true;
|
||||||
battery = mkDefault (builtins.elem cfg.host laptops);
|
battery = mkDefault (builtins.elem cfg.host laptops);
|
||||||
};
|
};
|
||||||
wlsunset.enable = mkDefault true;
|
wlsunset.enable = mkDefault true;
|
||||||
wofi.enable = mkDefault true;
|
|
||||||
};
|
};
|
||||||
wayland.windowManager.hyprland = {
|
wayland.windowManager.hyprland = {
|
||||||
enable = true;
|
enable = true;
|
||||||
@ -112,7 +111,7 @@ in {
|
|||||||
$right = r
|
$right = r
|
||||||
$up = s
|
$up = s
|
||||||
$down = t
|
$down = t
|
||||||
$menu = ${pkgs.wofi}/bin/wofi --show drun
|
$menu = rofi -combi-modi drun,calc -show combi
|
||||||
|
|
||||||
bind = SUPER, Return, exec, ${pkgs.kitty}/bin/kitty ${pkgs.tmux}/bin/tmux
|
bind = SUPER, Return, exec, ${pkgs.kitty}/bin/kitty ${pkgs.tmux}/bin/tmux
|
||||||
bind = SUPER, Space, submap, leader
|
bind = SUPER, Space, submap, leader
|
||||||
@ -159,10 +158,14 @@ in {
|
|||||||
bind = , escape, submap, reset
|
bind = , escape, submap, reset
|
||||||
bind = CTRL, g, submap, reset
|
bind = CTRL, g, submap, reset
|
||||||
submap = rofi
|
submap = rofi
|
||||||
bind = , e, exec, ${rofi-emoji}/bin/rofi-emoji
|
bind = , b, exec, rofi-bluetooth
|
||||||
|
bind = , b, submap, reset
|
||||||
|
bind = , e, exec, rofi -show emoji
|
||||||
bind = , e, submap, reset
|
bind = , e, submap, reset
|
||||||
bind = , r, exec, $menu
|
bind = , r, exec, $menu
|
||||||
bind = , r, submap, reset
|
bind = , r, submap, reset
|
||||||
|
bind = , s, exec, rofi -show ssh
|
||||||
|
bind = , r, submap, reset
|
||||||
bind = , y, exec, ytplay
|
bind = , y, exec, ytplay
|
||||||
bind = , y, submap, reset
|
bind = , y, submap, reset
|
||||||
bind = , escape, submap, reset
|
bind = , escape, submap, reset
|
||||||
@ -273,13 +276,15 @@ in {
|
|||||||
};
|
};
|
||||||
services = {
|
services = {
|
||||||
blueman-applet.enable = true;
|
blueman-applet.enable = true;
|
||||||
hyprpaper = {
|
hyprpaper = let
|
||||||
|
img = "/home/phundrak/Pictures/Wallpapers/nord/Nordic6.jpg";
|
||||||
|
in {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings = {
|
settings = {
|
||||||
ipc = "on";
|
ipc = "on";
|
||||||
splash = false;
|
splash = false;
|
||||||
preload = "/home/phundrak/Pictures/Wallpapers/nord/Nordic6.jpg";
|
preload = img;
|
||||||
wallpaper = ", /home/phundrak/Pictures/Wallpapers/nord/Nordic6.jpg";
|
wallpaper = ", ${img}";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
107
users/modules/desktop/rofi/default.nix
Normal file
107
users/modules/desktop/rofi/default.nix
Normal file
@ -0,0 +1,107 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
with lib; let
|
||||||
|
cfg = config.home.desktop.rofi;
|
||||||
|
inherit (config.lib.formats.rasi) mkLiteral;
|
||||||
|
in {
|
||||||
|
options.home.desktop.rofi = {
|
||||||
|
enable = mkEnableOption "Enable Rofi";
|
||||||
|
};
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
home.packages = with pkgs; [rofi-bluetooth];
|
||||||
|
programs.rofi = {
|
||||||
|
enable = true;
|
||||||
|
plugins = with pkgs; [
|
||||||
|
rofi-calc
|
||||||
|
rofi-emoji
|
||||||
|
];
|
||||||
|
terminal = "${pkgs.kitty}/bin/kitty";
|
||||||
|
location = "center";
|
||||||
|
modes = ["drun" "emoji" "calc" "combi"];
|
||||||
|
extraConfig.show-icons = true;
|
||||||
|
theme = {
|
||||||
|
"*" = {
|
||||||
|
font = "Cascadia Code 14";
|
||||||
|
blur = true;
|
||||||
|
padding = mkLiteral "10px";
|
||||||
|
background-color = mkLiteral "transparent";
|
||||||
|
border-radius = mkLiteral "0px";
|
||||||
|
};
|
||||||
|
window = {
|
||||||
|
width = mkLiteral "1050px";
|
||||||
|
height = mkLiteral "625px";
|
||||||
|
location = mkLiteral "center";
|
||||||
|
blur = true;
|
||||||
|
border = mkLiteral "2px";
|
||||||
|
border-radius = mkLiteral "3px";
|
||||||
|
border-color = mkLiteral "#61afef";
|
||||||
|
background-color = mkLiteral "transparent";
|
||||||
|
padding = mkLiteral "0px";
|
||||||
|
margin = mkLiteral "30px 50px";
|
||||||
|
};
|
||||||
|
mainbox = {
|
||||||
|
orientation = mkLiteral "horizontal";
|
||||||
|
children = map mkLiteral ["borderbox"];
|
||||||
|
spacing = mkLiteral "0px";
|
||||||
|
padding = mkLiteral "0px";
|
||||||
|
};
|
||||||
|
borderbox = {
|
||||||
|
orientation = mkLiteral "horizontal";
|
||||||
|
children = map mkLiteral ["imagebox" "contentbox"];
|
||||||
|
padding = mkLiteral "0px";
|
||||||
|
spacing = mkLiteral "0px";
|
||||||
|
border-radius = mkLiteral "3px";
|
||||||
|
};
|
||||||
|
contentbox = {
|
||||||
|
orientation = mkLiteral "vertical";
|
||||||
|
children = map mkLiteral ["entry" "listview"];
|
||||||
|
spacing = mkLiteral "0px";
|
||||||
|
padding = mkLiteral "0px";
|
||||||
|
expand = true;
|
||||||
|
};
|
||||||
|
imagebox = {
|
||||||
|
background-image = mkLiteral "url(\"${./image.jpg}\")";
|
||||||
|
background-repeat = false;
|
||||||
|
size = mkLiteral "200px 625px";
|
||||||
|
};
|
||||||
|
element = {
|
||||||
|
border-radius = mkLiteral "0px";
|
||||||
|
};
|
||||||
|
"element-text, element-icon" = {
|
||||||
|
padding = mkLiteral "6px 8px";
|
||||||
|
spacing = mkLiteral "2px";
|
||||||
|
text-color = mkLiteral "#fab387";
|
||||||
|
};
|
||||||
|
"element selected" = {
|
||||||
|
background-color = mkLiteral "#191919";
|
||||||
|
text-color = mkLiteral "#e5c07b";
|
||||||
|
border-radius = mkLiteral "3px";
|
||||||
|
};
|
||||||
|
prompt = {
|
||||||
|
enabled = false;
|
||||||
|
background-color = mkLiteral "transparent";
|
||||||
|
text-color = mkLiteral "#61afef";
|
||||||
|
padding = mkLiteral "5px 10px";
|
||||||
|
};
|
||||||
|
entry = {
|
||||||
|
padding = mkLiteral "8px";
|
||||||
|
expand = false;
|
||||||
|
font = "Cascadia Code 14";
|
||||||
|
text-color = mkLiteral "#fab387";
|
||||||
|
border-radius = mkLiteral "0px 3px 0px 0px";
|
||||||
|
background-color = mkLiteral "#292e36";
|
||||||
|
};
|
||||||
|
listview = {
|
||||||
|
lines = mkLiteral "1";
|
||||||
|
background-color = mkLiteral "rgba(46, 52, 64, 0.8)";
|
||||||
|
border-radius = mkLiteral "0px 0px 3px 0px";
|
||||||
|
padding = mkLiteral "5px";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
BIN
users/modules/desktop/rofi/image.jpg
Normal file
BIN
users/modules/desktop/rofi/image.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 228 KiB |
@ -1,76 +0,0 @@
|
|||||||
{
|
|
||||||
lib,
|
|
||||||
config,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
with lib; let
|
|
||||||
cfg = config.home.desktop.wofi;
|
|
||||||
in {
|
|
||||||
options.home.desktop.wofi.enable = mkEnableOption "Enable wofi support";
|
|
||||||
config.programs.wofi = mkIf cfg.enable {
|
|
||||||
inherit (cfg) enable;
|
|
||||||
settings = {
|
|
||||||
modi = "ssh,drun,combi";
|
|
||||||
sidebar-mode = false;
|
|
||||||
width = 50;
|
|
||||||
line-margin = 10;
|
|
||||||
lines = 6;
|
|
||||||
columns = 2;
|
|
||||||
display-ssh = "";
|
|
||||||
display-run = "";
|
|
||||||
display-drun = "";
|
|
||||||
display-window = "";
|
|
||||||
display-combi = "";
|
|
||||||
show-icons = true;
|
|
||||||
};
|
|
||||||
# from https://github.com/alxndr13/wofi-nord-theme
|
|
||||||
style = ''
|
|
||||||
* {
|
|
||||||
font-family: "Hack", monospace;
|
|
||||||
}
|
|
||||||
|
|
||||||
window {
|
|
||||||
background-color: #3B4252;
|
|
||||||
}
|
|
||||||
|
|
||||||
#input {
|
|
||||||
margin: 5px;
|
|
||||||
border-radius: 0px;
|
|
||||||
border: none;
|
|
||||||
background-color: #3B4252;
|
|
||||||
color: white;
|
|
||||||
}
|
|
||||||
|
|
||||||
#inner-box {
|
|
||||||
background-color: #383C4A;
|
|
||||||
}
|
|
||||||
|
|
||||||
#outer-box {
|
|
||||||
margin: 2px;
|
|
||||||
padding: 10px;
|
|
||||||
background-color: #383C4A;
|
|
||||||
}
|
|
||||||
|
|
||||||
#scroll {
|
|
||||||
margin: 5px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#text {
|
|
||||||
padding: 4px;
|
|
||||||
color: white;
|
|
||||||
}
|
|
||||||
|
|
||||||
#entry:nth-child(even){
|
|
||||||
background-color: #404552;
|
|
||||||
}
|
|
||||||
|
|
||||||
#entry:selected {
|
|
||||||
background-color: #4C566A;
|
|
||||||
}
|
|
||||||
|
|
||||||
#text:selected {
|
|
||||||
background: transparent;
|
|
||||||
}
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
}
|
|
||||||
Loading…
x
Reference in New Issue
Block a user