diff options
| author | Marcelo Lira <mlira@acumera.com> | 2025-03-07 00:41:38 -0300 |
|---|---|---|
| committer | Marcelo Lira <mlira@acumera.com> | 2025-03-19 20:35:19 -0300 |
| commit | 7343a15f123c78d7c29ff7a189798de689869026 (patch) | |
| tree | 462f4fbe3f17ee36c3adad2bc57531e2f8f371a7 /desktop-common | |
Diffstat (limited to 'desktop-common')
16 files changed, 982 insertions, 0 deletions
diff --git a/desktop-common/.config/dunst/dunstrc b/desktop-common/.config/dunst/dunstrc new file mode 100644 index 0000000..9afb74d --- /dev/null +++ b/desktop-common/.config/dunst/dunstrc @@ -0,0 +1,315 @@ +[global] + monitor = 2 + follow = none + geometry = "320x320-10+30" + indicate_hidden = yes + shrink = no + transparency = 15 + notification_height = 0 + separator_height = 2 + padding = 8 + horizontal_padding = 8 + frame_width = 1 + frame_color = "#D9D9D9" + separator_color = frame + sort = yes + idle_threshold = 120 + vertical_alignment = top + + ### Text ### + + font = VictorMono Nerd Font Mono 12 + # font = BlexMono Nerd Font 11 + # font = Bitstream Vera Sans 12 + # font = Source Code Pro Medium 9 + + line_height = 0 + markup = full + + # The format of the message. Possible variables are: + # %a appname + # %s summary + # %b body + # %i iconname (including its path) + # %I iconname (without its path) + # %p progress value if set ([ 0%] to [100%]) or nothing + # %n progress value if set without any extra characters + # %% Literal % + # Markup is allowed + # format = "<b>%s</b>\n%b\n%p\n%n" + format = "<b>%s</b>\n%b" + + alignment = left + + show_age_threshold = 60 + word_wrap = yes + ellipsize = middle + ignore_newline = no + stack_duplicates = true + hide_duplicate_count = false + show_indicators = yes + + ### Icons ### + + # Align icons left/right/off + icon_position = left + + # Scale larger icons down to this size, set to 0 to disable + min_icon_size = 32 + max_icon_size = 96 + icon_corner_radius = 5 + icon_path = /usr/share/icons/gnome/32x32/status/:/usr/share/icons/gnome/32x32/devices/:/usr/share/icons/gnome/16x16/status/:/usr/share/icons/gnome/16x16/devices/ + + ### Progress Bar ### + + progress_bar = true + progress_bar_height = 10 + progress_bar_frame_width = 1 + progress_bar_min_width = 160 + progress_bar_max_width = 300 + progress_bar_corner_radius = 4 + + ### History ### + + # Should a notification popped up from history be sticky or timeout + # as if it would normally do. + sticky_history = yes + + # Maximum amount of notifications kept in history + history_length = 20 + + ### Misc/Advanced ### + + # dmenu path. + dmenu = /usr/bin/rofi -dmenu -p dunst: + + # Browser for opening urls in context menu. + # browser = /usr/bin/surf + browser = /usr/bin/xdg-open + + # Always run rule-defined scripts, even if the notification is suppressed + always_run_script = true + + # Define the title of the windows spawned by dunst + title = Dunst + + # Define the class of the windows spawned by dunst + class = Dunst + + # Print a notification on startup. + # This is mainly for error detection, since dbus (re-)starts dunst + # automatically after a crash. + startup_notification = false + + # Manage dunst's desire for talking + # Can be one of the following values: + # crit: Critical features. Dunst aborts + # warn: Only non-fatal warnings + # mesg: Important Messages + # info: all unimportant stuff + # debug: all less than unimportant stuff + verbosity = mesg + + # Define the corner radius of the notification window + # in pixel size. If the radius is 0, you have no rounded + # corners. + # The radius will be automatically lowered if it exceeds half of the + # notification height to avoid clipping text and/or icons. + corner_radius = 6 + + ### Legacy + + # Use the Xinerama extension instead of RandR for multi-monitor support. + # This setting is provided for compatibility with older nVidia drivers that + # do not support RandR and using it on systems that support RandR is highly + # discouraged. + # + # By enabling this setting dunst will not be able to detect when a monitor + # is connected or disconnected which might break follow mode if the screen + # layout changes. + force_xinerama = false + + ### mouse + + # Defines action of mouse event + # Possible values are: + # * none: Don't do anything. + # * do_action: If the notification has exactly one action, or one is marked as default, + # invoke it. If there are multiple and no default, open the context menu. + # * close_current: Close current notification. + # * close_all: Close all notifications. + mouse_left_click = close_current + mouse_middle_click = do_action + mouse_right_click = close_all + +# Experimental features that may or may not work correctly. Do not expect them +# to have a consistent behaviour across releases. +[experimental] + # Calculate the dpi to use on a per-monitor basis. + # If this setting is enabled the Xft.dpi value will be ignored and instead + # dunst will attempt to calculate an appropriate dpi value for each monitor + # using the resolution and physical size. This might be useful in setups + # where there are multiple screens with very different dpi values. + per_monitor_dpi = false + +[shortcuts] + + # Shortcuts are specified as [modifier+][modifier+]...key + # Available modifiers are "ctrl", "mod1" (the alt-key), "mod2", + # "mod3" and "mod4" (windows-key). + # Xev might be helpful to find names for keys. + + # Close notification. + close = ctrl+shift+grave + + # Close all notifications. + close_all = ctrl+shift+alt+grave + + # Redisplay last message(s). + # On the US keyboard layout "grave" is normally above TAB and left + # of "1". Make sure this key actually exists on your keyboard layout, + # e.g. check output of 'xmodmap -pke' + history = ctrl+grave + + # Context menu. + context = ctrl+shift+period + +[urgency_low] + background = "#F9E8A3" + foreground = "#427EB4" + highlight = "#427EB4" + timeout = 10 + icon = ~/.config/dunst/vaultboy-low.png + +[urgency_normal] + background = "#32598C" + foreground = "#E9C651" + highlight = "#E9C651" + timeout = 10 + icon = ~/.config/dunst/vaultboy-normal.png + override_pause_level = 49 + +[urgency_critical] + background = "#A63C45" + foreground = "#FBFBFB" + frame_color = "#F25252" + timeout = 0 + icon = ~/.config/dunst/vaultboy-critical.png + override_pause_level = 89 + +# Every section that isn't one of the above is interpreted as a rules to +# override settings for certain messages. +# +# Messages can be matched by +# appname (discouraged, see desktop_entry) +# body +# category +# desktop_entry +# icon +# match_transient +# msg_urgency +# stack_tag +# summary +# +# and you can override the +# background +# foreground +# format +# frame_color +# fullscreen +# new_icon +# set_stack_tag +# set_transient +# timeout +# urgency +# +# Shell-like globbing will get expanded. +# +# Instead of the appname filter, it's recommended to use the desktop_entry filter. +# GLib based applications export their desktop-entry name. In comparison to the appname, +# the desktop-entry won't get localized. +# +# SCRIPTING +# You can specify a script that gets run when the rule matches by +# setting the "script" option. +# The script will be called as follows: +# script appname summary body icon urgency +# where urgency can be "LOW", "NORMAL" or "CRITICAL". +# +# NOTE: if you don't want a notification to be displayed, set the format +# to "". +# NOTE: It might be helpful to run dunst -print in a terminal in order +# to find fitting options for rules. + +# Disable the transient hint so that idle_threshold cannot be bypassed from the +# client +#[transient_disable] +# match_transient = yes +# set_transient = no +# +# Make the handling of transient notifications more strict by making them not +# be placed in history. +#[transient_history_ignore] +# match_transient = yes +# history_ignore = yes + +# fullscreen values +# show: show the notifications, regardless if there is a fullscreen window opened +# delay: displays the new notification, if there is no fullscreen window active +# If the notification is already drawn, it won't get undrawn. +# pushback: same as delay, but when switching into fullscreen, the notification will get +# withdrawn from screen again and will get delayed like a new notification +#[fullscreen_delay_everything] +# fullscreen = delay +#[fullscreen_show_critical] +# msg_urgency = critical +# fullscreen = show + +#[espeak] +# summary = "*" +# script = dunst_espeak.sh + +#[script-test] +# summary = "*script*" +# script = dunst_test.sh + +#[ignore] +# # This notification will not be displayed +# summary = "foobar" +# format = "" + +#[history-ignore] +# # This notification will not be saved in history +# summary = "foobar" +# history_ignore = yes + +#[skip-display] +# # This notification will not be displayed, but will be included in the history +# summary = "foobar" +# skip_display = yes + +#[signed_on] +# appname = Pidgin +# summary = "*signed on*" +# urgency = low +# +#[signed_off] +# appname = Pidgin +# summary = *signed off* +# urgency = low +# +#[says] +# appname = Pidgin +# summary = *says* +# urgency = critical +# +#[twitter] +# appname = Pidgin +# summary = *twitter.com* +# urgency = normal +# +#[stack-volumes] +# appname = "some_volume_notifiers" +# set_stack_tag = "volume" +# +# vim: ft=cfg diff --git a/desktop-common/.config/dunst/vaultboy-critical.png b/desktop-common/.config/dunst/vaultboy-critical.png Binary files differnew file mode 100644 index 0000000..f7862a6 --- /dev/null +++ b/desktop-common/.config/dunst/vaultboy-critical.png diff --git a/desktop-common/.config/dunst/vaultboy-low.png b/desktop-common/.config/dunst/vaultboy-low.png Binary files differnew file mode 100644 index 0000000..a97f5ff --- /dev/null +++ b/desktop-common/.config/dunst/vaultboy-low.png diff --git a/desktop-common/.config/dunst/vaultboy-normal.png b/desktop-common/.config/dunst/vaultboy-normal.png Binary files differnew file mode 100644 index 0000000..a294c3c --- /dev/null +++ b/desktop-common/.config/dunst/vaultboy-normal.png diff --git a/desktop-common/.config/rofi-pass/config b/desktop-common/.config/rofi-pass/config new file mode 100644 index 0000000..7bcea7a --- /dev/null +++ b/desktop-common/.config/rofi-pass/config @@ -0,0 +1,99 @@ +# permanently set alternative root dir. Use ":" to separate multiple roots +# which can be switched at runtime with shift+left/right +# root=/path/to/root + +# rofi command. Make sure to have "$@" as last argument +_rofi () { + rofi -i -no-auto-select "$@" +} + +# default command to generate passwords +_pwgen () { + pwgen -y "$@" +} + +# image viewer to display qrcode of selected entry +# qrencode is needed to generate the image and a viewer +# that can read from pipes. Known viewers to work are feh and display +_image_viewer () { + sxiv - +# display +} + +# xdotool needs the keyboard layout to be set using setxkbmap +# You can do this in your autostart scripts (e.g. xinitrc) + +# If for some reason, you cannot do this, you can set the command here. +# and set fix_layout to true +fix_layout=false + +layout_cmd () { + setxkbmap us +} + +# fields to be used +URL_field='url' +USERNAME_field='user' +AUTOTYPE_field='autotype' + +# delay to be used for :delay keyword +delay=2 + +# rofi-pass needs to close itself before it can type passwords. Set delay here. +wait=0.2 + +# delay between keypresses when typing (in ms) +xdotool_delay=12 + +## Programs to be used +# Editor +EDITOR='nvim -f' + +# Browser +BROWSER='xdg-open' + +## Misc settings + +default_do='menu' # menu, autotype, copyPass, typeUser, typePass, copyUser, copyUrl, viewEntry, typeMenu, actionMenu, copyMenu, openUrl +auto_enter='false' +notify='false' +default_autotype='pass' + +# color of the help messages +# leave empty for autodetection +help_color="#4872FF" + +# Clipboard settings +# Possible options: primary, clipboard, both +clip=primary + +# Seconds before clearing pass from clipboard +clip_clear=45 + +## Options for generating new password entries + +# open new password entries in editor +edit_new_pass="true" + +# default_user is also used for password files that have no user field. +#default_user="${ROFI_PASS_DEFAULT_USER-$(whoami)}" +#default_user2=mary_ann +#password_length=12 + +# Custom Keybindings +autotype="Alt+1" +type_user="Alt+2" +type_pass="Alt+3" +open_url="Alt+4" +copy_name="Alt+u" +copy_url="Alt+l" +copy_pass="Alt+p" +show="Alt+o" +copy_entry="Alt+2" +type_entry="Alt+1" +copy_menu="Alt+c" +action_menu="Alt+a" +type_menu="Alt+t" +help="Alt+h" +switch="Alt+x" +insert_pass="Alt+n" diff --git a/desktop-common/.config/rofi/config.rasi b/desktop-common/.config/rofi/config.rasi new file mode 100644 index 0000000..474a160 --- /dev/null +++ b/desktop-common/.config/rofi/config.rasi @@ -0,0 +1,28 @@ +configuration { + modi: "drun,window,run"; + + /*display-drun: "➤";*/ + display-drun: ""; + display-window: ""; + display-run: ""; + display-filebrowser: ""; + + show-icons: true; + + window { + hide-active-window: true; + } + + filebrowser { + directory: "/home/setanta/storage/Downloads/images/"; + directories-first: false; + sorting-method: "atime"; + command: "show_image_and_copy_to_clipboard"; + } +} + +@theme "/home/setanta/.config/rofi/themes/dark.rasi" + +/* +* vim:ft=css +**/ diff --git a/desktop-common/.config/rofi/themes/dark-grid.rasi b/desktop-common/.config/rofi/themes/dark-grid.rasi new file mode 100644 index 0000000..35a4d49 --- /dev/null +++ b/desktop-common/.config/rofi/themes/dark-grid.rasi @@ -0,0 +1,113 @@ +* { + font: "VictorMono Nerd Font Mono Bold 14"; + + bg0: #1D1D1F; + bg1: #2D2D2D; + bg2: #333333; + + fg0: #EEEEEE; + fg1: #CECECE; + + /*prompt-color: #E9C651;*/ + prompt-color: #FEFAD4; + active-color: #629c81; + urgent-color: #C43513; + + background-color: transparent; + text-color: @fg1; + + margin: 0; + padding: 0; + spacing: 0; +} + +window { + location: center; + width: 1000; + background-color: @bg1; + padding: 8px; + border-radius: 10px; + border: 1px; + border-color: @prompt-color; +} + +inputbar { + spacing: 10px; + padding: 10px; + background-color: @bg0; + border: 0 0 1px 0; + border-radius: 6px 6px 0 0; + border-color: @prompt-color; + margin: 0 0 8px 0; +} + +prompt { + padding: 2px; +} + +prompt, entry, element-icon, element-text { + vertical-align: 0.5; +} + +prompt, entry { + text-color: @prompt-color; +} + +textbox { + padding: 8px; + background-color: @bg2; +} + +listview { + padding: 12px 0; + lines: 3; + columns: 4; + fixed-height: false; +} + +element { + orientation: vertical; + border: 2px; + border-radius: 8px; + padding: 6px; + spacing: 6px; +} + +element normal normal { + background-color: @bg2; + text-color: @fg1; +} + +element normal urgent { + text-color: @urgent-color; +} + +element normal active { + text-color: @active-color; +} + +element selected { + text-color: @bg0; + border-radius: 4px; +} + +element selected normal, element selected active { + background-color: @active-color; +} + +element selected urgent { + background-color: @urgent-color; +} + +element-icon { + size: 150px; + cursor: inherit; +} + +element-icon, element-text { + horizontal-align: 0.5; +} + +/* +* vim:ft=css +**/ diff --git a/desktop-common/.config/rofi/themes/dark.rasi b/desktop-common/.config/rofi/themes/dark.rasi new file mode 100644 index 0000000..bd7f862 --- /dev/null +++ b/desktop-common/.config/rofi/themes/dark.rasi @@ -0,0 +1,108 @@ +* { + font: "VictorMono Nerd Font Mono Bold 14"; + + bg0: #1D1D1F; + bg1: #2D2D2D; + bg2: #333333; + + fg0: #EEEEEE; + fg1: #CECECE; + + /*prompt-color: #E9C651;*/ + prompt-color: #FEFAD4; + active-color: #629c81; + urgent-color: #C43513; + + background-color: transparent; + text-color: @fg1; + + margin: 0; + padding: 0; + spacing: 0; +} + +window { + location: center; + width: 700; + background-color: @bg1; + padding: 8px; + border-radius: 10px; + border: 1px; + border-color: @prompt-color; +} + +inputbar { + spacing: 10px; + padding: 10px; + background-color: @bg0; + border: 0 0 1px 0; + border-radius: 6px 6px 0 0; + border-color: @prompt-color; + margin: 0 0 8px 0; +} + +prompt { + padding: 2px; +} + +prompt, entry, element-icon, element-text { + vertical-align: 0.5; +} + +prompt, entry { + text-color: @prompt-color; +} + +textbox { + padding: 8px; + background-color: @bg2; +} + +listview { + padding: 2px 0; + lines: 5; + columns: 1; + fixed-height: false; +} + +element { + padding: 6px; + spacing: 6px; +} + +element normal normal { + background-color: @bg2; + text-color: @fg1; +} + +element normal urgent { + text-color: @urgent-color; +} + +element normal active { + text-color: @active-color; +} + +element selected { + text-color: @bg0; + border-radius: 4px; +} + +element selected normal, element selected active { + background-color: @active-color; +} + +element selected urgent { + background-color: @urgent-color; +} + +element-icon { + size: 1.6em; +} +element-text { + text-color: inherit; +} + +/* +* vim:ft=css +**/ diff --git a/desktop-common/.local/bin/rofi-power-menu b/desktop-common/.local/bin/rofi-power-menu new file mode 100755 index 0000000..5f11b2f --- /dev/null +++ b/desktop-common/.local/bin/rofi-power-menu @@ -0,0 +1,289 @@ +#!/usr/bin/env bash + +# This script defines just a mode for rofi instead of being a self-contained +# executable that launches rofi by itself. This makes it more flexible than +# running rofi inside this script as now the user can call rofi as one pleases. +# For instance: +# +# rofi -show powermenu -modi powermenu:./rofi-power-menu +# +# See README.md for more information. + +set -e +set -u + +# All supported choices +all=(shutdown reboot suspend hibernate logout lockscreen) + +# By default, show all (i.e., just copy the array) +show=("${all[@]}") + +declare -A texts +texts[lockscreen]="lock screen" +texts[switchuser]="switch user" +texts[logout]="log out" +texts[suspend]="suspend" +texts[hibernate]="hibernate" +texts[reboot]="reboot" +texts[shutdown]="shut down" + +declare -A icons +# icons[lockscreen]="\Uf033e" # +# icons[switchuser]="\Uf0019" # +# icons[logout]="\Uf0343" # +# icons[suspend]="\Uf04b2" # +# icons[hibernate]="\Uf02ca" # +# icons[reboot]="\Uf0709" # +# icons[shutdown]="\Uf0425" # +# icons[cancel]="\Uf0156" # +icons[lockscreen]="" +icons[switchuser]="" +icons[logout]="" +icons[suspend]="💤" +icons[hibernate]="" +icons[reboot]="↺" +icons[shutdown]="" +icons[cancel]="🗙" + +declare -A actions +# actions[lockscreen]="loginctl lock-session ${XDG_SESSION_ID-}" +actions[lockscreen]="i3lock -ti $HOME/Dropbox/Images/wallpapers/jeff-dragon.png" +#actions[switchuser]="???" +actions[logout]="loginctl terminate-session ${XDG_SESSION_ID-}" +actions[suspend]="systemctl suspend" +actions[hibernate]="systemctl hibernate" +actions[reboot]="systemctl reboot" +actions[shutdown]="systemctl poweroff" + +# By default, ask for confirmation for actions that are irreversible +confirmations=(reboot shutdown logout) + +# By default, no dry run +dryrun=false +showsymbols=true +showtext=true + +function check_valid { + option="$1" + shift 1 + for entry in "${@}" + do + if [ -z "${actions[$entry]+x}" ] + then + echo "Invalid choice in $1: $entry" >&2 + exit 1 + fi + done +} + +# Parse command-line options +parsed=$(getopt --options=h --longoptions=help,dry-run,confirm:,choices:,choose:,symbols,no-symbols,text,no-text,symbols-font: --name "$0" -- "$@") +if [ $? -ne 0 ]; then + echo 'Terminating...' >&2 + exit 1 +fi +eval set -- "$parsed" +unset parsed +while true; do + case "$1" in + "-h"|"--help") + echo "rofi-power-menu - a power menu mode for Rofi" + echo + echo "Usage: rofi-power-menu [--choices CHOICES] [--confirm CHOICES]" + echo " [--choose CHOICE] [--dry-run] [--symbols|--no-symbols]" + echo + echo "Use with Rofi in script mode. For instance, to ask for shutdown or reboot:" + echo + echo " rofi -show menu -modi \"menu:rofi-power-menu --choices=shutdown/reboot\"" + echo + echo "Available options:" + echo " --dry-run Don't perform the selected action but print it to stderr." + echo " --choices CHOICES Show only the selected choices in the given order. Use /" + echo " as the separator. Available choices are lockscreen," + echo " logout,suspend, hibernate, reboot and shutdown. By" + echo " default, all available choices are shown." + echo " --confirm CHOICES Require confirmation for the gives choices only. Use / as" + echo " the separator. Available choices are lockscreen, logout," + echo " suspend, hibernate, reboot and shutdown. By default, only" + echo " irreversible actions logout, reboot and shutdown require" + echo " confirmation." + echo " --choose CHOICE Preselect the given choice and only ask for a" + echo " confirmation (if confirmation is set to be requested). It" + echo " is strongly recommended to combine this option with" + echo " --confirm=CHOICE if the choice wouldn't require" + echo " confirmation by default. Available choices are" + echo " lockscreen, logout, suspend, hibernate, reboot and" + echo " shutdown." + echo " --[no-]symbols Show Unicode symbols or not. Requires a font with support" + echo " for the symbols. Use, for instance, fonts from the" + echo " Nerdfonts collection. By default, they are shown" + echo " --[no-]text Show text description or not." + echo " --symbols-font FONT Use the given font for symbols. By default, the symbols" + echo " use the same font as the text. That font is configured" + echo " with rofi." + echo " -h,--help Show this help text." + exit 0 + ;; + "--dry-run") + dryrun=true + shift 1 + ;; + "--confirm") + IFS='/' read -ra confirmations <<< "$2" + check_valid "$1" "${confirmations[@]}" + shift 2 + ;; + "--choices") + IFS='/' read -ra show <<< "$2" + check_valid "$1" "${show[@]}" + shift 2 + ;; + "--choose") + # Check that the choice is valid + check_valid "$1" "$2" + selectionID="$2" + shift 2 + ;; + "--symbols") + showsymbols=true + shift 1 + ;; + "--no-symbols") + showsymbols=false + shift 1 + ;; + "--text") + showtext=true + shift 1 + ;; + "--no-text") + showtext=false + shift 1 + ;; + "--symbols-font") + symbols_font="$2" + shift 2 + ;; + "--") + shift + break + ;; + *) + echo "Internal error" >&2 + exit 1 + ;; + esac +done + +if [ "$showsymbols" = "false" -a "$showtext" = "false" ] +then + echo "Invalid options: cannot have --no-symbols and --no-text enabled at the same time." >&2 + exit 1 +fi + +# Define the messages after parsing the CLI options so that it is possible to +# configure them in the future. + +function write_message { + if [ -z ${symbols_font+x} ]; + then + icon="<span font_size=\"medium\">$1</span>" + else + icon="<span font=\"${symbols_font}\" font_size=\"medium\">$1</span>" + fi + text="<span font_size=\"medium\">$2</span>" + if [ "$showsymbols" = "true" ] + then + if [ "$showtext" = "true" ] + then + echo -n "\u200e$icon \u2068$text\u2069" + else + echo -n "\u200e$icon" + fi + else + echo -n "$text" + fi +} + +function print_selection { + echo -e "$1" | $(read -r -d '' entry; echo "echo $entry") +} + +declare -A messages +declare -A confirmationMessages +for entry in "${all[@]}" +do + messages[$entry]=$(write_message "${icons[$entry]}" "${texts[$entry]^}") +done +for entry in "${all[@]}" +do + confirmationMessages[$entry]=$(write_message "${icons[$entry]}" "Yes, ${texts[$entry]}") +done +confirmationMessages[cancel]=$(write_message "${icons[cancel]}" "No, cancel") + +if [ $# -gt 0 ] +then + # If arguments given, use those as the selection + selection="${@}" +else + # Otherwise, use the CLI passed choice if given + if [ -n "${selectionID+x}" ] + then + selection="${messages[$selectionID]}" + fi +fi + +# Don't allow custom entries +echo -e "\0no-custom\x1ftrue" +# Use markup +echo -e "\0markup-rows\x1ftrue" + +if [ -z "${selection+x}" ] +then + echo -e "\0prompt\x1fPower menu" + for entry in "${show[@]}" + do + echo -e "${messages[$entry]}\0icon\x1f${icons[$entry]}" + done +else + for entry in "${show[@]}" + do + if [ "$selection" = "$(print_selection "${messages[$entry]}")" ] + then + # Check if the selected entry is listed in confirmation requirements + for confirmation in "${confirmations[@]}" + do + if [ "$entry" = "$confirmation" ] + then + # Ask for confirmation + echo -e "\0prompt\x1fAre you sure" + echo -e "${confirmationMessages[$entry]}\0icon\x1f${icons[$entry]}" + echo -e "${confirmationMessages[cancel]}\0icon\x1f${icons[cancel]}" + exit 0 + fi + done + # If not, then no confirmation is required, so mark confirmed + selection=$(print_selection "${confirmationMessages[$entry]}") + fi + if [ "$selection" = "$(print_selection "${confirmationMessages[$entry]}")" ] + then + if [ $dryrun = true ] + then + # Tell what would have been done + echo "Selected: $entry" >&2 + else + # Perform the action + ${actions[$entry]} + fi + exit 0 + fi + if [ "$selection" = "$(print_selection "${confirmationMessages[cancel]}")" ] + then + # Do nothing + exit 0 + fi + done + # The selection didn't match anything, so raise an error + echo "Invalid selection: $selection" >&2 + exit 1 +fi diff --git a/desktop-common/.local/share/applications/auxilium.desktop b/desktop-common/.local/share/applications/auxilium.desktop new file mode 100644 index 0000000..ffe7553 --- /dev/null +++ b/desktop-common/.local/share/applications/auxilium.desktop @@ -0,0 +1,9 @@ +#!/usr/bin/env xdg-open +[Desktop Entry] +Type=Application +Name=Auxilium Christianorum +GenericName=Auxilium Christianorum +Exec=surf http://www.hitektek.com/auxilium +Icon=st-benedict-cross +Terminal=false +Categories=Network;WebBrowser; diff --git a/desktop-common/.local/share/applications/fast.desktop b/desktop-common/.local/share/applications/fast.desktop new file mode 100644 index 0000000..011b9a6 --- /dev/null +++ b/desktop-common/.local/share/applications/fast.desktop @@ -0,0 +1,9 @@ +#!/usr/bin/env xdg-open +[Desktop Entry] +Type=Application +Name=FAST +GenericName=Internet Speed Measurement +Exec=surf https://fast.com/ +Icon=applications-internet +Terminal=false +Categories=Network;WebBrowser; diff --git a/desktop-common/.local/share/applications/kindle.desktop b/desktop-common/.local/share/applications/kindle.desktop new file mode 100644 index 0000000..2c72c09 --- /dev/null +++ b/desktop-common/.local/share/applications/kindle.desktop @@ -0,0 +1,9 @@ +#!/usr/bin/env xdg-open +[Desktop Entry] +Type=Application +Name=Kindle Reader +GenericName=Kindle Reader +Exec=/usr/bin/surf https://ler.amazon.com.br/kindle-library +Icon=kindle +Terminal=false +Categories=Books; Reading; diff --git a/desktop-common/.local/share/icons/cross.png b/desktop-common/.local/share/icons/cross.png Binary files differnew file mode 100644 index 0000000..7cea122 --- /dev/null +++ b/desktop-common/.local/share/icons/cross.png diff --git a/desktop-common/.local/share/icons/kindle.png b/desktop-common/.local/share/icons/kindle.png Binary files differnew file mode 100644 index 0000000..344f89a --- /dev/null +++ b/desktop-common/.local/share/icons/kindle.png diff --git a/desktop-common/.local/share/icons/st-benedict-cross.png b/desktop-common/.local/share/icons/st-benedict-cross.png Binary files differnew file mode 100644 index 0000000..0fc01ba --- /dev/null +++ b/desktop-common/.local/share/icons/st-benedict-cross.png diff --git a/desktop-common/dot-Xresources b/desktop-common/dot-Xresources new file mode 100644 index 0000000..d667ad7 --- /dev/null +++ b/desktop-common/dot-Xresources @@ -0,0 +1,3 @@ +Sxiv.background: #080F05 +Sxiv.foreground: #8AEABC +*TkTheme: clam |
