refinements and fixes, firefox clipboard rofi
This commit is contained in:
parent
5bef57fb16
commit
4f9eb34a55
@ -3,184 +3,313 @@
|
|||||||
config,
|
config,
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}:
|
}: {
|
||||||
{
|
|
||||||
options = {
|
options = {
|
||||||
desktop.hyprland.rofi.clipboard.enable = lib.mkEnableOption "rofi-clipboard";
|
desktop.hyprland.rofi.clipboard.enable = lib.mkEnableOption "rofi-clipboard";
|
||||||
};
|
};
|
||||||
|
|
||||||
config = lib.mkIf config.desktop.hyprland.rofi.clipboard.enable {
|
config = lib.mkIf config.desktop.hyprland.rofi.clipboard.enable {
|
||||||
home.file = {
|
home.file = {
|
||||||
".config/rofi/cliboard.rasi".source = ../../../../config/clipboard.rasi;
|
".config/rofi/cliboard.rasi".text = let
|
||||||
|
main-bg = config.lib.stylix.colors.base01;
|
||||||
|
main-fg = config.lib.stylix.colors.base02;
|
||||||
|
main-br = config.lib.stylix.colors.base05;
|
||||||
|
main-ex = config.lib.stylix.colors.base09;
|
||||||
|
select-bg = config.lib.stylix.colors.base05; # Selected background color
|
||||||
|
select-fg = config.lib.stylix.colors.base11; # Selected text color
|
||||||
|
separatorcolor = "transparent";
|
||||||
|
border-color = "transparent";
|
||||||
|
in ''
|
||||||
|
// Config //
|
||||||
|
configuration {
|
||||||
|
modi: "drun";
|
||||||
|
show-icons: false;
|
||||||
|
}
|
||||||
|
|
||||||
|
* {
|
||||||
|
main-bg : #${main-bg};
|
||||||
|
main-fg : #${main-fg};
|
||||||
|
main-br : #${main-br};
|
||||||
|
main-ex : #${main-ex};
|
||||||
|
select-bg : #${select-bg};
|
||||||
|
select-fg : #${select-fg};
|
||||||
|
separatorcolor : ${separatorcolor};
|
||||||
|
border-color : ${border-color};
|
||||||
|
}
|
||||||
|
|
||||||
|
// Main //
|
||||||
|
window {
|
||||||
|
width: 23em;
|
||||||
|
height: 30em;
|
||||||
|
transparency: "real";
|
||||||
|
fullscreen: false;
|
||||||
|
enabled: true;
|
||||||
|
cursor: "default";
|
||||||
|
spacing: 0em;
|
||||||
|
padding: 0em;
|
||||||
|
border-color: @main-br;
|
||||||
|
background-color: @main-bg;
|
||||||
|
}
|
||||||
|
mainbox {
|
||||||
|
enabled: true;
|
||||||
|
spacing: 0em;
|
||||||
|
padding: 0.5em;
|
||||||
|
orientation: vertical;
|
||||||
|
children: [ "wallbox" , "listbox" ];
|
||||||
|
background-color: transparent;
|
||||||
|
}
|
||||||
|
wallbox {
|
||||||
|
spacing: 0em;
|
||||||
|
padding: 0em;
|
||||||
|
expand: false;
|
||||||
|
orientation: horizontal;
|
||||||
|
background-color: transparent;
|
||||||
|
background-image: url("~/.dotfiles/config/backgrounds/aurora_borealis.png", width);
|
||||||
|
children: [ "wallframe" , "inputbar" ];
|
||||||
|
}
|
||||||
|
wallframe {
|
||||||
|
width: 5em;
|
||||||
|
spacing: 0em;
|
||||||
|
padding: 0em;
|
||||||
|
expand: false;
|
||||||
|
background-color: @main-bg;
|
||||||
|
background-image: url("~/.dotfiles/config/backgrounds/aurora_borealis.png", height);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Inputs //
|
||||||
|
inputbar {
|
||||||
|
enabled: true;
|
||||||
|
padding: 0em;
|
||||||
|
children: [ "entry" ];
|
||||||
|
background-color: @main-bg;
|
||||||
|
expand: true;
|
||||||
|
}
|
||||||
|
entry {
|
||||||
|
enabled: true;
|
||||||
|
padding: 1.8em;
|
||||||
|
text-color: @main-fg;
|
||||||
|
background-color: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Lists //
|
||||||
|
listbox {
|
||||||
|
spacing: 0em;
|
||||||
|
padding: 0em;
|
||||||
|
orientation: vertical;
|
||||||
|
children: [ "dummy" , "listview" , "dummy" ];
|
||||||
|
background-color: transparent;
|
||||||
|
}
|
||||||
|
listview {
|
||||||
|
enabled: true;
|
||||||
|
padding: 0.5em;
|
||||||
|
columns: 1;
|
||||||
|
lines: 11;
|
||||||
|
cycle: true;
|
||||||
|
fixed-height: true;
|
||||||
|
fixed-columns: false;
|
||||||
|
expand: false;
|
||||||
|
cursor: "default";
|
||||||
|
background-color: transparent;
|
||||||
|
text-color: @main-fg;
|
||||||
|
}
|
||||||
|
dummy {
|
||||||
|
spacing: 0em;
|
||||||
|
padding: 0em;
|
||||||
|
background-color: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Elements //
|
||||||
|
element {
|
||||||
|
enabled: true;
|
||||||
|
padding: 0.5em;
|
||||||
|
cursor: pointer;
|
||||||
|
background-color: transparent;
|
||||||
|
text-color: @main-fg;
|
||||||
|
}
|
||||||
|
element selected.normal {
|
||||||
|
background-color: @select-bg;
|
||||||
|
text-color: @select-fg;
|
||||||
|
}
|
||||||
|
element-text {
|
||||||
|
vertical-align: 0.0;
|
||||||
|
horizontal-align: 0.0;
|
||||||
|
cursor: inherit;
|
||||||
|
background-color: transparent;
|
||||||
|
text-color: inherit;
|
||||||
|
}
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
wl-clipboard
|
wl-clipboard
|
||||||
cliphist
|
cliphist
|
||||||
(writeShellScriptBin "clipboard" ''
|
(writeShellScriptBin "clipboard" ''
|
||||||
export confDir="''${XDG_CONFIG_HOME:-$HOME/.config}"
|
export confDir="''${XDG_CONFIG_HOME:-$HOME/.config}"
|
||||||
roconf="''${confDir}/rofi/cliboard.rasi"
|
roconf="''${confDir}/rofi/cliboard.rasi"
|
||||||
favoritesFile="''${HOME}/.cliphist_favorites"
|
favoritesFile="''${HOME}/.cliphist_favorites"
|
||||||
|
|
||||||
if printenv HYPRLAND_INSTANCE_SIGNATURE &> /dev/null; then
|
if printenv HYPRLAND_INSTANCE_SIGNATURE &> /dev/null; then
|
||||||
export hypr_border="$(hyprctl -j getoption decoration:rounding | jq '.int')"
|
export hypr_border="$(hyprctl -j getoption decoration:rounding | jq '.int')"
|
||||||
export hypr_width="$(hyprctl -j getoption general:border_size | jq '.int')"
|
export hypr_width="$(hyprctl -j getoption general:border_size | jq '.int')"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Set rofi scaling
|
# Set rofi scaling
|
||||||
[[ "''${rofiScale}" =~ ^[0-9]+$ ]] || rofiScale=10
|
[[ "''${rofiScale}" =~ ^[0-9]+$ ]] || rofiScale=10
|
||||||
r_scale="configuration {font: \"JetBrainsMono Nerd Font ''${rofiScale}\";}"
|
r_scale="configuration {font: \"JetBrainsMono Nerd Font ''${rofiScale}\";}"
|
||||||
wind_border=$((hypr_border * 3 / 2))
|
wind_border=$((hypr_border * 3 / 2))
|
||||||
elem_border=$([ $hypr_border -eq 0 ] && echo "5" || echo $hypr_border)
|
elem_border=$([ $hypr_border -eq 0 ] && echo "5" || echo $hypr_border)
|
||||||
|
|
||||||
# Evaluate spawn position
|
# Evaluate spawn position
|
||||||
readarray -t curPos < <(hyprctl cursorpos -j | jq -r '.x,.y')
|
readarray -t curPos < <(hyprctl cursorpos -j | jq -r '.x,.y')
|
||||||
readarray -t monRes < <(hyprctl -j monitors | jq '.[] | select(.focused==true) | .width,.height,.scale,.x,.y')
|
readarray -t monRes < <(hyprctl -j monitors | jq '.[] | select(.focused==true) | .width,.height,.scale,.x,.y')
|
||||||
readarray -t offRes < <(hyprctl -j monitors | jq -r '.[] | select(.focused==true).reserved | map(tostring) | join("\n")')
|
readarray -t offRes < <(hyprctl -j monitors | jq -r '.[] | select(.focused==true).reserved | map(tostring) | join("\n")')
|
||||||
monRes[2]="$(echo "''${monRes[2]}" | sed "s/\.//")"
|
monRes[2]="$(echo "''${monRes[2]}" | sed "s/\.//")"
|
||||||
monRes[0]="$(( ''${monRes[0]} * 100 / ''${monRes[2]} ))"
|
monRes[0]="$(( ''${monRes[0]} * 100 / ''${monRes[2]} ))"
|
||||||
monRes[1]="$(( ''${monRes[1]} * 100 / ''${monRes[2]} ))"
|
monRes[1]="$(( ''${monRes[1]} * 100 / ''${monRes[2]} ))"
|
||||||
curPos[0]="$(( ''${curPos[0]} - ''${monRes[3]} ))"
|
curPos[0]="$(( ''${curPos[0]} - ''${monRes[3]} ))"
|
||||||
curPos[1]="$(( ''${curPos[1]} - ''${monRes[4]} ))"
|
curPos[1]="$(( ''${curPos[1]} - ''${monRes[4]} ))"
|
||||||
|
|
||||||
if [ "''${curPos[0]}" -ge "$((monRes[0] / 2))" ] ; then
|
if [ "''${curPos[0]}" -ge "$((monRes[0] / 2))" ] ; then
|
||||||
x_pos="east"
|
x_pos="east"
|
||||||
x_off="-$((monRes[0] - curPos[0] - offRes[2]))"
|
x_off="-$((monRes[0] - curPos[0] - offRes[2]))"
|
||||||
else
|
else
|
||||||
x_pos="west"
|
x_pos="west"
|
||||||
x_off="$((curPos[0] - offRes[0]))"
|
x_off="$((curPos[0] - offRes[0]))"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "''${curPos[1]}" -ge "$((monRes[1] / 2))" ] ; then
|
if [ "''${curPos[1]}" -ge "$((monRes[1] / 2))" ] ; then
|
||||||
y_pos="south"
|
y_pos="south"
|
||||||
y_off="-$((monRes[1] - curPos[1] - offRes[3]))"
|
y_off="-$((monRes[1] - curPos[1] - offRes[3]))"
|
||||||
else
|
else
|
||||||
y_pos="north"
|
y_pos="north"
|
||||||
y_off="$((curPos[1] - offRes[1]))"
|
y_off="$((curPos[1] - offRes[1]))"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
r_override="window{location:''${x_pos} ''${y_pos};anchor:''${x_pos} ''${y_pos};x-offset:''${x_off}px;y-offset:''${y_off}px;border:''${hypr_width}px;border-radius:''${wind_border}px;} wallbox{border-radius:''${elem_border}px;} element{border-radius:''${elem_border}px;}"
|
r_override="window{location:''${x_pos} ''${y_pos};anchor:''${x_pos} ''${y_pos};x-offset:''${x_off}px;y-offset:''${y_off}px;border:''${hypr_width}px;border-radius:''${wind_border}px;} wallbox{border-radius:''${elem_border}px;} element{border-radius:''${elem_border}px;}"
|
||||||
|
|
||||||
# Show main menu if no arguments are passed
|
# Show main menu if no arguments are passed
|
||||||
if [ $# -eq 0 ]; then
|
if [ $# -eq 0 ]; then
|
||||||
main_action=$(echo -e "History\nDelete\nView Favorites\nManage Favorites\nClear History" | rofi -dmenu -theme-str "entry { placeholder: \"Choose action\";}" -theme-str "''${r_scale}" -theme-str "''${r_override}" -config "''${roconf}")
|
main_action=$(echo -e "History\nDelete\nView Favorites\nManage Favorites\nClear History" | rofi -dmenu -theme-str "entry { placeholder: \"Choose action\";}" -theme-str "''${r_scale}" -theme-str "''${r_override}" -config "''${roconf}")
|
||||||
else
|
else
|
||||||
main_action="History"
|
main_action="History"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
case "''${main_action}" in
|
case "''${main_action}" in
|
||||||
"History")
|
"History")
|
||||||
selected_item=$(cliphist list | rofi -dmenu -theme-str "entry { placeholder: \"History...\";}" -theme-str "''${r_scale}" -theme-str "''${r_override}" -config "''${roconf}")
|
selected_item=$(cliphist list | rofi -dmenu -theme-str "entry { placeholder: \"History...\";}" -theme-str "''${r_scale}" -theme-str "''${r_override}" -config "''${roconf}")
|
||||||
if [ -n "$selected_item" ]; then
|
if [ -n "$selected_item" ]; then
|
||||||
echo "$selected_item" | cliphist decode | wl-copy
|
echo "$selected_item" | cliphist decode | wl-copy
|
||||||
notify-send "Copied to clipboard."
|
notify-send "Copied to clipboard."
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
"Delete")
|
"Delete")
|
||||||
selected_item=$(cliphist list | rofi -dmenu -theme-str "entry { placeholder: \"Delete...\";}" -theme-str "''${r_scale}" -theme-str "''${r_override}" -config "''${roconf}")
|
selected_item=$(cliphist list | rofi -dmenu -theme-str "entry { placeholder: \"Delete...\";}" -theme-str "''${r_scale}" -theme-str "''${r_override}" -config "''${roconf}")
|
||||||
if [ -n "$selected_item" ]; then
|
if [ -n "$selected_item" ]; then
|
||||||
echo "$selected_item" | cliphist delete
|
echo "$selected_item" | cliphist delete
|
||||||
notify-send "Deleted."
|
notify-send "Deleted."
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
"View Favorites")
|
"View Favorites")
|
||||||
if [ -f "$favoritesFile" ] && [ -s "$favoritesFile" ]; then
|
if [ -f "$favoritesFile" ] && [ -s "$favoritesFile" ]; then
|
||||||
mapfile -t favorites < "$favoritesFile"
|
mapfile -t favorites < "$favoritesFile"
|
||||||
decoded_lines=()
|
decoded_lines=()
|
||||||
for favorite in "''${favorites[@]}"; do
|
for favorite in "''${favorites[@]}"; do
|
||||||
decoded_favorite=$(echo "$favorite" | base64 --decode)
|
decoded_favorite=$(echo "$favorite" | base64 --decode)
|
||||||
single_line_favorite=$(echo "$decoded_favorite" | tr '\n' ' ')
|
single_line_favorite=$(echo "$decoded_favorite" | tr '\n' ' ')
|
||||||
decoded_lines+=("$single_line_favorite")
|
decoded_lines+=("$single_line_favorite")
|
||||||
done
|
done
|
||||||
selected_favorite=$(printf "%s\n" "''${decoded_lines[@]}" | rofi -dmenu -theme-str "entry { placeholder: \"View Favorites\";}" -theme-str "''${r_scale}" -theme-str "''${r_override}" -config "''${roconf}")
|
selected_favorite=$(printf "%s\n" "''${decoded_lines[@]}" | rofi -dmenu -theme-str "entry { placeholder: \"View Favorites\";}" -theme-str "''${r_scale}" -theme-str "''${r_override}" -config "''${roconf}")
|
||||||
if [ -n "$selected_favorite" ]; then
|
if [ -n "$selected_favorite" ]; then
|
||||||
index=$(printf "%s\n" "''${decoded_lines[@]}" | grep -nxF "$selected_favorite" | cut -d: -f1)
|
index=$(printf "%s\n" "''${decoded_lines[@]}" | grep -nxF "$selected_favorite" | cut -d: -f1)
|
||||||
if [ -n "$index" ]; then
|
if [ -n "$index" ]; then
|
||||||
selected_encoded_favorite="''${favorites[$((index - 1))]}"
|
selected_encoded_favorite="''${favorites[$((index - 1))]}"
|
||||||
echo "$selected_encoded_favorite" | base64 --decode | wl-copy
|
echo "$selected_encoded_favorite" | base64 --decode | wl-copy
|
||||||
notify-send "Copied to clipboard."
|
notify-send "Copied to clipboard."
|
||||||
else
|
else
|
||||||
notify-send "Error: Selected favorite not found."
|
notify-send "Error: Selected favorite not found."
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
notify-send "No favorites."
|
notify-send "No favorites."
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
"Manage Favorites")
|
"Manage Favorites")
|
||||||
manage_action=$(echo -e "Add to Favorites\nDelete from Favorites\nClear All Favorites" | rofi -dmenu -theme-str "entry { placeholder: \"Manage Favorites\";}" -theme-str "''${r_scale}" -theme-str "''${r_override}" -config "''${roconf}")
|
manage_action=$(echo -e "Add to Favorites\nDelete from Favorites\nClear All Favorites" | rofi -dmenu -theme-str "entry { placeholder: \"Manage Favorites\";}" -theme-str "''${r_scale}" -theme-str "''${r_override}" -config "''${roconf}")
|
||||||
|
|
||||||
case "''${manage_action}" in
|
case "''${manage_action}" in
|
||||||
"Add to Favorites")
|
"Add to Favorites")
|
||||||
item=$(cliphist list | rofi -dmenu -theme-str "entry { placeholder: \"Add to Favorites...\";}" -theme-str "''${r_scale}" -theme-str "''${r_override}" -config "''${roconf}")
|
item=$(cliphist list | rofi -dmenu -theme-str "entry { placeholder: \"Add to Favorites...\";}" -theme-str "''${r_scale}" -theme-str "''${r_override}" -config "''${roconf}")
|
||||||
if [ -n "$item" ]; then
|
if [ -n "$item" ]; then
|
||||||
full_item=$(echo "$item" | cliphist decode)
|
full_item=$(echo "$item" | cliphist decode)
|
||||||
encoded_item=$(echo "$full_item" | base64 -w 0)
|
encoded_item=$(echo "$full_item" | base64 -w 0)
|
||||||
if grep -Fxq "$encoded_item" "$favoritesFile"; then
|
if grep -Fxq "$encoded_item" "$favoritesFile"; then
|
||||||
notify-send "Item is already in favorites."
|
notify-send "Item is already in favorites."
|
||||||
else
|
else
|
||||||
echo "$encoded_item" >> "$favoritesFile"
|
echo "$encoded_item" >> "$favoritesFile"
|
||||||
notify-send "Added in favorites."
|
notify-send "Added in favorites."
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
"Delete from Favorites")
|
"Delete from Favorites")
|
||||||
if [ -f "$favoritesFile" ] && [ -s "$favoritesFile" ]; then
|
if [ -f "$favoritesFile" ] && [ -s "$favoritesFile" ]; then
|
||||||
mapfile -t favorites < "$favoritesFile"
|
mapfile -t favorites < "$favoritesFile"
|
||||||
decoded_lines=()
|
decoded_lines=()
|
||||||
for favorite in "''${favorites[@]}"; do
|
for favorite in "''${favorites[@]}"; do
|
||||||
decoded_favorite=$(echo "$favorite" | base64 --decode)
|
decoded_favorite=$(echo "$favorite" | base64 --decode)
|
||||||
single_line_favorite=$(echo "$decoded_favorite" | tr '\n' ' ')
|
single_line_favorite=$(echo "$decoded_favorite" | tr '\n' ' ')
|
||||||
decoded_lines+=("$single_line_favorite")
|
decoded_lines+=("$single_line_favorite")
|
||||||
done
|
done
|
||||||
selected_favorite=$(printf "%s\n" "''${decoded_lines[@]}" | rofi -dmenu -theme-str "entry { placeholder: \"Remove from Favorites...\";}" -theme-str "''${r_scale}" -theme-str "''${r_override}" -config "''${roconf}")
|
selected_favorite=$(printf "%s\n" "''${decoded_lines[@]}" | rofi -dmenu -theme-str "entry { placeholder: \"Remove from Favorites...\";}" -theme-str "''${r_scale}" -theme-str "''${r_override}" -config "''${roconf}")
|
||||||
if [ -n "$selected_favorite" ]; then
|
if [ -n "$selected_favorite" ]; then
|
||||||
index=$(printf "%s\n" "''${decoded_lines[@]}" | grep -nxF "$selected_favorite" | cut -d: -f1)
|
index=$(printf "%s\n" "''${decoded_lines[@]}" | grep -nxF "$selected_favorite" | cut -d: -f1)
|
||||||
if [ -n "$index" ]; then
|
if [ -n "$index" ]; then
|
||||||
selected_encoded_favorite="''${favorites[$((index - 1))]}"
|
selected_encoded_favorite="''${favorites[$((index - 1))]}"
|
||||||
if [ "$(wc -l < "$favoritesFile")" -eq 1 ]; then
|
if [ "$(wc -l < "$favoritesFile")" -eq 1 ]; then
|
||||||
> "$favoritesFile"
|
> "$favoritesFile"
|
||||||
else
|
else
|
||||||
grep -vF -x "$selected_encoded_favorite" "$favoritesFile" > "''${favoritesFile}.tmp" && mv "''${favoritesFile}.tmp" "$favoritesFile"
|
grep -vF -x "$selected_encoded_favorite" "$favoritesFile" > "''${favoritesFile}.tmp" && mv "''${favoritesFile}.tmp" "$favoritesFile"
|
||||||
fi
|
fi
|
||||||
notify-send "Item removed from favorites."
|
notify-send "Item removed from favorites."
|
||||||
else
|
else
|
||||||
notify-send "Error: Selected favorite not found."
|
notify-send "Error: Selected favorite not found."
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
notify-send "No favorites to remove."
|
notify-send "No favorites to remove."
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
"Clear All Favorites")
|
"Clear All Favorites")
|
||||||
if [ -f "$favoritesFile" ] && [ -s "$favoritesFile" ]; then
|
if [ -f "$favoritesFile" ] && [ -s "$favoritesFile" ]; then
|
||||||
confirm=$(echo -e "Yes\nNo" | rofi -dmenu -theme-str "entry { placeholder: \"Clear All Favorites?\";}" -theme-str "''${r_scale}" -theme-str "''${r_override}" -config "''${roconf}")
|
confirm=$(echo -e "Yes\nNo" | rofi -dmenu -theme-str "entry { placeholder: \"Clear All Favorites?\";}" -theme-str "''${r_scale}" -theme-str "''${r_override}" -config "''${roconf}")
|
||||||
if [ "$confirm" = "Yes" ]; then
|
if [ "$confirm" = "Yes" ]; then
|
||||||
> "$favoritesFile"
|
> "$favoritesFile"
|
||||||
notify-send "All favorites have been deleted."
|
notify-send "All favorites have been deleted."
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
notify-send "No favorites to delete."
|
notify-send "No favorites to delete."
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo "Invalid action"
|
echo "Invalid action"
|
||||||
exit 1
|
exit 1
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
;;
|
;;
|
||||||
"Clear History")
|
"Clear History")
|
||||||
if [ "$(echo -e "Yes\nNo" | rofi -dmenu -theme-str "entry { placeholder: \"Clear Clipboard History?\";}" -theme-str "''${r_scale}" -theme-str "''${r_override}" -config "''${roconf}")" == "Yes" ] ; then
|
if [ "$(echo -e "Yes\nNo" | rofi -dmenu -theme-str "entry { placeholder: \"Clear Clipboard History?\";}" -theme-str "''${r_scale}" -theme-str "''${r_override}" -config "''${roconf}")" == "Yes" ] ; then
|
||||||
cliphist wipe
|
cliphist wipe
|
||||||
notify-send "Clipboard history cleared."
|
notify-send "Clipboard history cleared."
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo "Invalid action"
|
echo "Invalid action"
|
||||||
exit 1
|
exit 1
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
'')
|
'')
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@ -136,15 +136,18 @@
|
|||||||
extensions = with inputs.firefox-addons.packages."x86_64-linux";
|
extensions = with inputs.firefox-addons.packages."x86_64-linux";
|
||||||
[
|
[
|
||||||
ublock-origin
|
ublock-origin
|
||||||
|
# Lists all possible extensions $ nix-env -f '<nixpkgs>' -qaP -A nur.repos.rycee.firefox-addons
|
||||||
]
|
]
|
||||||
++ (
|
++ (
|
||||||
if (userSettings.username == "shinya")
|
if (userSettings.username == "shinya")
|
||||||
then [
|
then
|
||||||
inputs.firefox-addons.packages."x86_64-linux".simple-translate
|
with inputs.firefox-addons.packages."x86_64-linux"; [
|
||||||
inputs.firefox-addons.packages."x86_64-linux".duckduckgo-privacy-essentials
|
#enhancer-for-youtube
|
||||||
inputs.firefox-addons.packages."x86_64-linux".return-youtube-dislikes
|
simple-translate
|
||||||
inputs.firefox-addons.packages."x86_64-linux".user-agent-string-switcher
|
duckduckgo-privacy-essentials
|
||||||
]
|
return-youtube-dislikes
|
||||||
|
user-agent-string-switcher
|
||||||
|
]
|
||||||
else []
|
else []
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
@ -1,7 +1,6 @@
|
|||||||
{
|
{
|
||||||
pkgs,
|
pkgs,
|
||||||
lib,
|
lib,
|
||||||
config,
|
|
||||||
userSettings,
|
userSettings,
|
||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user