update rofi-calc

This commit is contained in:
Ingolf Wagner 2024-04-21 14:00:51 +02:00
parent fdf68b1382
commit 6fe2d22fc8
No known key found for this signature in database
GPG key ID: 76BF5F1928B9618B

View file

@ -3,6 +3,8 @@ let
cfg = config.xsession.windowManager.i3; cfg = config.xsession.windowManager.i3;
rofi = pkgs.rofi.override { plugins = [ pkgs.rofi-emoji pkgs.rofi-calc pkgs.xdotool ]; };
backgroundCommand = pkgs.writers.writeDash "background" '' backgroundCommand = pkgs.writers.writeDash "background" ''
${pkgs.xorg.xrandr}/bin/xrandr | grep " connected" | grep "primary" | \ ${pkgs.xorg.xrandr}/bin/xrandr | grep " connected" | grep "primary" | \
${pkgs.gnused}/bin/sed -E "s/primary //" | \ ${pkgs.gnused}/bin/sed -E "s/primary //" | \
@ -37,6 +39,7 @@ in
fixXhost fixXhost
pkgs.autorandr pkgs.autorandr
pkgs.polygon-art.polygon-art pkgs.polygon-art.polygon-art
pkgs.xdotool # needed for rofi-emoji
]; ];
@ -258,7 +261,7 @@ in
set -o pipefail set -o pipefail
${pkgs.i3}/bin/i3-msg -t get_workspaces | \ ${pkgs.i3}/bin/i3-msg -t get_workspaces | \
${pkgs.jq}/bin/jq --raw-output '.[] | .name' | \ ${pkgs.jq}/bin/jq --raw-output '.[] | .name' | \
${pkgs.rofi}/bin/rofi -dmenu -p 'Select Workspace ' | \ ${rofi}/bin/rofi -dmenu -p 'Select Workspace ' | \
while read line while read line
do do
${pkgs.i3}/bin/i3-msg workspace "$line" ${pkgs.i3}/bin/i3-msg workspace "$line"
@ -274,7 +277,7 @@ in
set -o pipefail set -o pipefail
${pkgs.i3}/bin/i3-msg -t get_workspaces | \ ${pkgs.i3}/bin/i3-msg -t get_workspaces | \
${pkgs.jq}/bin/jq --raw-output '.[] | .name' | \ ${pkgs.jq}/bin/jq --raw-output '.[] | .name' | \
${pkgs.rofi}/bin/rofi -dmenu -p 'Move to Workspace ' | \ ${rofi}/bin/rofi -dmenu -p 'Move to Workspace ' | \
while read line while read line
do do
${pkgs.i3}/bin/i3-msg move container to workspace "$line" ${pkgs.i3}/bin/i3-msg move container to workspace "$line"
@ -283,7 +286,7 @@ in
in in
"exec ${script}"; "exec ${script}";
"${cfg.config.modifier}+space" = "exec ${pkgs.rofi}/bin/rofi -show drun -display-drun ''"; "${cfg.config.modifier}+space" = "exec ${rofi}/bin/rofi -show drun -display-drun ''";
"${cfg.config.modifier}+Shift+c" = "reload"; "${cfg.config.modifier}+Shift+c" = "reload";
"${cfg.config.modifier}+Shift+r" = "restart"; "${cfg.config.modifier}+Shift+r" = "restart";
"${cfg.config.modifier}+Shift+e" = "exec i3-nagbar -t warning -m 'Do you want to exit i3?' -b 'Yes' 'i3-msg exit'"; "${cfg.config.modifier}+Shift+e" = "exec i3-nagbar -t warning -m 'Do you want to exit i3?' -b 'Yes' 'i3-msg exit'";
@ -481,9 +484,10 @@ in
programs.rofi = { programs.rofi = {
enable = true; enable = true;
cycle = true; cycle = true;
package = rofi;
# pass.enable = true; # pass.enable = true;
extraConfig = { extraConfig = {
modi = "drun"; modi = "drun,calc,emoji,combi";
show-icons = true; show-icons = true;
terminal = "alacritty"; terminal = "alacritty";
}; };