From 4fa157a622038bf8b305cfb74b436a9509233c67 Mon Sep 17 00:00:00 2001 From: Soliprem Date: Thu, 23 Jun 2022 00:26:09 +0200 Subject: [PATCH 01/16] dm-dictionary --- man/dmscripts.1 | 144 ------------------------------------------------ 1 file changed, 144 deletions(-) delete mode 100644 man/dmscripts.1 diff --git a/man/dmscripts.1 b/man/dmscripts.1 deleted file mode 100644 index f1d92ef..0000000 --- a/man/dmscripts.1 +++ /dev/null @@ -1,144 +0,0 @@ -.TH "dmscripts" "1" - -.SH "NAME" -.PP -dmscripts - a collection of various dmenu scripts - -.SH "DESCRIPTION" -.PP -dmscripts are a collection of dmenu scripts written in bash. each script is written and contributed by DT or viewers. - -.SH "USAGE" -.SS "bash dm-hub" -.PP -Runs the dm-hub program which allows for easy access to the scripts. -.SS "bash path/to/script" -.PP -Runs the script specified without using dmhub. -.SS "./path/to/script" -.PP -Same as bash path/to/script. - -.SH "SCRIPTS" -.SS "dm-hub" -.PP -The hub script, allows easy access to other scripts. -.SS "dm-bookman" -.PP -A bookmark searching tool, search through all qutebrowser quickmarks and bookmarks. -.SS "dm-colpick" -.PP -Find the hex value of a color you are searching for. -.SS "dm-confedit" -.PP -A configuration manager, find and edit any config file you need. -.SS "dm-currencies" -.PP -Convert prices between currencies. -.SS "dm-ip" -.PP -Get IP of interface or external IP -.SS "dm-kill" -.PP -Simple process killer, find and kill misbehaving processes. -.SS "dm-logout" -.PP -Simple logout menu, choose to lock, shutdown, reboot or logout of your computer. -.SS "dm-maim" -.PP -A GUI to maim using dmenu. -.SS "dm-man" -.PP -A manual page searcher, search a man page or randomly view one. -.SS "dm-music" -.PP -Dmenu based music player. -.SS "dm-note" -.PP -Store multiple one-line texts or codes and copy one of them when needed. -.SS "dm-radio" -.PP -Listen to online radio stations. -.SS "dm-record" -.PP -Records audio, video and webcam. -.SS "dm-reddit" -.PP -A reddit viewer using dmenu, still a work in progress. -.SS "dm-setbg" -.PP -Using dmenu, setup a wallpaper. -.SS "dm-sounds" -.PP -Choose an ambient background sound to play. -.SS "dm-translate" -.PP -Translate using Google Translate (through Lingva Translate) -.SS "dm-usbmount" -.PP -USB mounting done suckless, no need for bloated daemons. -.SS "dm-websearch" -.PP -Web searching utility using dmenu. -.SS "dm-weather" -.PP -Simple graphical weather app -.SS "dm-wifi" -.PP -Connect to wifi using dmenu. -.SS "dm-youtube" -.PP -Youtube subscriptions without an account or the API tying you down. -.SS "_dm-helper.sh" -.PP -Helper scripts adding functionality to other scripts - -.SH "CONFIG FILES" -.SS "/etc/dmscripts/config" -.PP -This is considered the official global config file and we do not recommend you editing it. It will be overwritten if we change the configuration so you’ll need to back it up if you modify it -.SS "~/.config/dmscripts/config" -.PP -The first local config file is found here, this is free to modify and it is the recommended way to change the config file as it does not get overwritten. It is worth noting however that the config is still regularly modified so you will have to keep up to date on our gitlab page and read the diffs. -.SS "Using the repo configuration" -.PP -The repo can be used as is and provides a local config file. You can change it but it’s change at your own risk. If you want to update the repo, for example, there may be merge conflicts. And when commiting, we expect a default config unless you are intentionally making changes to fix a bug or make an update and not to simply change something in a way you prefer. -.SS "Using global variables" -.PP -While we don’t recommend it, you can choose to set some variables in other places such as the bashrc or the /etc/profile file. -.SS "Modifying the source" -.PP -Finally, you can modify the source code to add more files to modify or to customize dmscripts to your heart’s content, please report any bugs along the way however. Confirm it on an unmodified version first and read the issues. - -.SH "CONFIGURATION" -.SS "DMENU variable" -.PP -DMENU is the default variable used in dmscripts, we expect all scripts to use DMENU in substitution of the dmenu command as we want our scripts to be accessible without modifying the source code. Currently DMENU is defined in a case statement which is used to define DMENU differently depending on the script. -.SS "Other variables" -.PP -A lot of the other variables are simply program names or directories and are not worth going into further details. -.SS "Lists" -.PP -Some our config is done in a list like format. There are two syntaxes, -A and -a. - -.PP --A uses the format of: -.RS -.nf -variable[name-displayed-in-dmenu]=what-it-actually-means - -.fi -.RE - -.PP --a uses: -.RS -.nf -variable=( -"thing1" -"thing2" -... -) - -.fi -.RE -- GitLab From c760aaba3c6708f803211360e06889d09903d4bd Mon Sep 17 00:00:00 2001 From: Soliprem Date: Thu, 23 Jun 2022 00:49:50 +0200 Subject: [PATCH 02/16] dm-dictionary completed --- scripts/dm-dictionary | 50 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100755 scripts/dm-dictionary diff --git a/scripts/dm-dictionary b/scripts/dm-dictionary new file mode 100755 index 0000000..3e4432f --- /dev/null +++ b/scripts/dm-dictionary @@ -0,0 +1,50 @@ +#!/usr/bin/env bash +# +# Script name: dm-dictionary +# Description: uses the translate package as a dictionary +# Dependencies: translate-shell +# GitLab: https://www.gitlab.com/dwt1/dmscripts +# License: https://www.gitlab.com/dwt1/dmscripts/LICENSE +# Contributors: Francesco Prem Solidoro + +# Set with the flags "-e", "-u","-o pipefail" cause the script to fail +# if certain things happen, which is a good thing. Otherwise, we can +# get hidden bugs that are hard to discover. + +set -euo pipefail + +_path="$(cd "$(dirname "${BASH_SOURCE[0]}")" && cd "$(dirname "$(readlink "${BASH_SOURCE[0]}" || echo ".")")" && pwd)" +if [[ -f "${_path}/_dm-helper.sh" ]]; then + # shellcheck disable=SC1090,SC1091 + source "${_path}/_dm-helper.sh" +else + # shellcheck disable=SC1090 + echo "No helper-script found" +fi + +# script will not hit this if there is no config-file to load +# shellcheck disable=SC1090 +source "$(get_config)" + +main() { + +WORD="$(${DMENU} "Search:")" +TESTWORD="$(dym -c -n=1 "$WORD")" + +if [ "$WORD" != "$TESTWORD" ]; then + KEYWORD=$(dym -c "$WORD" | rofi -dmenu -p "was $WORD a misspelling?(select/no)") + if [ "$KEYWORD" = "no" ] || [ "$KEYWORD" = "n" ]; then + KEYWORD="$WORD" + fi +else + KEYWORD="$WORD" +fi + +if ! [ "${KEYWORD}" ]; then + printf 'No word inserted\n' >&2 + exit 0 +fi +$DMTERM trans -v -d "$WORD" +} + +[[ "${BASH_SOURCE[0]}" == "${0}" ]] && main "$@" -- GitLab From 68a53d783c31d0b67f29576d7117656bd74517eb Mon Sep 17 00:00:00 2001 From: Soliprem Date: Fri, 24 Jun 2022 00:59:08 +0200 Subject: [PATCH 03/16] dm-wiki updated --- scripts/dm-wiki | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/dm-wiki b/scripts/dm-wiki index cf9f80b..e40b098 100755 --- a/scripts/dm-wiki +++ b/scripts/dm-wiki @@ -35,8 +35,12 @@ languages() { ${DMENU} 'Language: ' "$@") || exit 1 if [ "$choice" ]; then + if [ "$choice" = "" ]; then + lang=$(printf 'en') + else lang=$(printf '%s\n' "${choice}/") wikipages "$@" + fi else echo "Program terminated." && exit 0 fi -- GitLab From 3a98d5df2e001cdc9a450ee76cbf1bf3e756e418 Mon Sep 17 00:00:00 2001 From: Soliprem Date: Fri, 24 Jun 2022 01:00:12 +0200 Subject: [PATCH 04/16] dm-wiki updated --- scripts/dm-wiki | 4 ---- 1 file changed, 4 deletions(-) diff --git a/scripts/dm-wiki b/scripts/dm-wiki index e40b098..cf9f80b 100755 --- a/scripts/dm-wiki +++ b/scripts/dm-wiki @@ -35,12 +35,8 @@ languages() { ${DMENU} 'Language: ' "$@") || exit 1 if [ "$choice" ]; then - if [ "$choice" = "" ]; then - lang=$(printf 'en') - else lang=$(printf '%s\n' "${choice}/") wikipages "$@" - fi else echo "Program terminated." && exit 0 fi -- GitLab From 25cae1afe40369d3dc23a54d8719188ec88c8c75 Mon Sep 17 00:00:00 2001 From: Soliprem Date: Fri, 24 Jun 2022 01:02:25 +0200 Subject: [PATCH 05/16] fixed dmenu variable --- scripts/dm-dictionary | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/dm-dictionary b/scripts/dm-dictionary index 3e4432f..11e6a3a 100755 --- a/scripts/dm-dictionary +++ b/scripts/dm-dictionary @@ -32,7 +32,7 @@ WORD="$(${DMENU} "Search:")" TESTWORD="$(dym -c -n=1 "$WORD")" if [ "$WORD" != "$TESTWORD" ]; then - KEYWORD=$(dym -c "$WORD" | rofi -dmenu -p "was $WORD a misspelling?(select/no)") + KEYWORD=$(dym -c "$WORD" | ${DMENU} "was $WORD a misspelling?(select/no)") if [ "$KEYWORD" = "no" ] || [ "$KEYWORD" = "n" ]; then KEYWORD="$WORD" fi -- GitLab From 52257451bac152b4b8f9f6ca154bcf118da59450 Mon Sep 17 00:00:00 2001 From: Soliprem Date: Fri, 24 Jun 2022 01:14:23 +0200 Subject: [PATCH 06/16] missing file from local repo --- man/dmscripts.1 | 145 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 145 insertions(+) create mode 100644 man/dmscripts.1 diff --git a/man/dmscripts.1 b/man/dmscripts.1 new file mode 100644 index 0000000..098541d --- /dev/null +++ b/man/dmscripts.1 @@ -0,0 +1,145 @@ + +.TH "dmscripts" "1" + +.SH "NAME" +.PP +dmscripts - a collection of various dmenu scripts + +.SH "DESCRIPTION" +.PP +dmscripts are a collection of dmenu scripts written in bash. each script is written and contributed by DT or viewers. + +.SH "USAGE" +.SS "bash dm-hub" +.PP +Runs the dm-hub program which allows for easy access to the scripts. +.SS "bash path/to/script" +.PP +Runs the script specified without using dmhub. +.SS "./path/to/script" +.PP +Same as bash path/to/script. + +.SH "SCRIPTS" +.SS "dm-hub" +.PP +The hub script, allows easy access to other scripts. +.SS "dm-bookman" +.PP +A bookmark searching tool, search through all qutebrowser quickmarks and bookmarks. +.SS "dm-colpick" +.PP +Find the hex value of a color you are searching for. +.SS "dm-confedit" +.PP +A configuration manager, find and edit any config file you need. +.SS "dm-currencies" +.PP +Convert prices between currencies. +.SS "dm-ip" +.PP +Get IP of interface or external IP +.SS "dm-kill" +.PP +Simple process killer, find and kill misbehaving processes. +.SS "dm-logout" +.PP +Simple logout menu, choose to lock, shutdown, reboot or logout of your computer. +.SS "dm-maim" +.PP +A GUI to maim using dmenu. +.SS "dm-man" +.PP +A manual page searcher, search a man page or randomly view one. +.SS "dm-music" +.PP +Dmenu based music player. +.SS "dm-note" +.PP +Store multiple one-line texts or codes and copy one of them when needed. +.SS "dm-radio" +.PP +Listen to online radio stations. +.SS "dm-record" +.PP +Records audio, video and webcam. +.SS "dm-reddit" +.PP +A reddit viewer using dmenu, still a work in progress. +.SS "dm-setbg" +.PP +Using dmenu, setup a wallpaper. +.SS "dm-sounds" +.PP +Choose an ambient background sound to play. +.SS "dm-translate" +.PP +Translate using Google Translate (through Lingva Translate) +.SS "dm-usbmount" +.PP +USB mounting done suckless, no need for bloated daemons. +.SS "dm-websearch" +.PP +Web searching utility using dmenu. +.SS "dm-weather" +.PP +Simple graphical weather app +.SS "dm-wifi" +.PP +Connect to wifi using dmenu. +.SS "dm-youtube" +.PP +Youtube subscriptions without an account or the API tying you down. +.SS "_dm-helper.sh" +.PP +Helper scripts adding functionality to other scripts + +.SH "CONFIG FILES" +.SS "/etc/dmscripts/config" +.PP +This is considered the official global config file and we do not recommend you editing it. It will be overwritten if we change the configuration so you’ll need to back it up if you modify it +.SS "~/.config/dmscripts/config" +.PP +The first local config file is found here, this is free to modify and it is the recommended way to change the config file as it does not get overwritten. It is worth noting however that the config is still regularly modified so you will have to keep up to date on our gitlab page and read the diffs. +.SS "Using the repo configuration" +.PP +The repo can be used as is and provides a local config file. You can change it but it’s change at your own risk. If you want to update the repo, for example, there may be merge conflicts. And when commiting, we expect a default config unless you are intentionally making changes to fix a bug or make an update and not to simply change something in a way you prefer. +.SS "Using global variables" +.PP +While we don’t recommend it, you can choose to set some variables in other places such as the bashrc or the /etc/profile file. +.SS "Modifying the source" +.PP +Finally, you can modify the source code to add more files to modify or to customize dmscripts to your heart’s content, please report any bugs along the way however. Confirm it on an unmodified version first and read the issues. + +.SH "CONFIGURATION" +.SS "DMENU variable" +.PP +DMENU is the default variable used in dmscripts, we expect all scripts to use DMENU in substitution of the dmenu command as we want our scripts to be accessible without modifying the source code. Currently DMENU is defined in a case statement which is used to define DMENU differently depending on the script. +.SS "Other variables" +.PP +A lot of the other variables are simply program names or directories and are not worth going into further details. +.SS "Lists" +.PP +Some our config is done in a list like format. There are two syntaxes, -A and -a. + +.PP +-A uses the format of: +.RS +.nf +variable[name-displayed-in-dmenu]=what-it-actually-means + +.fi +.RE + +.PP +-a uses: +.RS +.nf +variable=( +"thing1" +"thing2" +... +) + +.fi +.RE -- GitLab From 5113052629ca8c6f77339b75c42a0fa49b06e892 Mon Sep 17 00:00:00 2001 From: Soliprem Date: Thu, 23 Jun 2022 23:15:09 +0000 Subject: [PATCH 07/16] Update dmscripts.1 --- man/dmscripts.1 | 1 - 1 file changed, 1 deletion(-) diff --git a/man/dmscripts.1 b/man/dmscripts.1 index 098541d..f1d92ef 100644 --- a/man/dmscripts.1 +++ b/man/dmscripts.1 @@ -1,4 +1,3 @@ - .TH "dmscripts" "1" .SH "NAME" -- GitLab From 8592434c8c3d2b23800f331f01a74987dd26e527 Mon Sep 17 00:00:00 2001 From: Soliprem Date: Thu, 23 Jun 2022 23:27:19 +0000 Subject: [PATCH 08/16] fixed dependency typo --- scripts/dm-dictionary | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/dm-dictionary b/scripts/dm-dictionary index 11e6a3a..9457fdf 100755 --- a/scripts/dm-dictionary +++ b/scripts/dm-dictionary @@ -2,7 +2,7 @@ # # Script name: dm-dictionary # Description: uses the translate package as a dictionary -# Dependencies: translate-shell +# Dependencies: translate-shell, didyoumean # GitLab: https://www.gitlab.com/dwt1/dmscripts # License: https://www.gitlab.com/dwt1/dmscripts/LICENSE # Contributors: Francesco Prem Solidoro -- GitLab From c7f647182cc9607c9a1b98e704aa981864d1b694 Mon Sep 17 00:00:00 2001 From: Soliprem Date: Fri, 24 Jun 2022 01:31:18 +0200 Subject: [PATCH 09/16] dm-spellcheck --- scripts/dm-spellcheck | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100755 scripts/dm-spellcheck diff --git a/scripts/dm-spellcheck b/scripts/dm-spellcheck new file mode 100755 index 0000000..20d7293 --- /dev/null +++ b/scripts/dm-spellcheck @@ -0,0 +1,40 @@ +#!/usr/bin/env bash +# +# Script name: dm-dictionary +# Description: uses the translate package as a dictionary +# Dependencies: didyoumean +# GitLab: https://www.gitlab.com/dwt1/dmscripts +# License: https://www.gitlab.com/dwt1/dmscripts/LICENSE +# Contributors: Francesco Prem Solidoro + +# Set with the flags "-e", "-u","-o pipefail" cause the script to fail +# if certain things happen, which is a good thing. Otherwise, we can +# get hidden bugs that are hard to discover. + +set -euo pipefail + +_path="$(cd "$(dirname "${BASH_SOURCE[0]}")" && cd "$(dirname "$(readlink "${BASH_SOURCE[0]}" || echo ".")")" && pwd)" +if [[ -f "${_path}/_dm-helper.sh" ]]; then + # shellcheck disable=SC1090,SC1091 + source "${_path}/_dm-helper.sh" +else + # shellcheck disable=SC1090 + echo "No helper-script found" +fi + +# script will not hit this if there is no config-file to load +# shellcheck disable=SC1090 +source "$(get_config)" + +main() { +WORD="$(${DMENU} "Enter Word:")" + +if ! [ "${WORD}" ] || [ "${WORD}" = "quit" ]; then + printf 'No word inserted\n' >&2 + exit 0 +fi + +dym -c "$WORD" | ${DMENU} "Select Correct Spelling:" | xclip -selection clipboard +} + +[[ "${BASH_SOURCE[0]}" == "${0}" ]] && main "$@" -- GitLab From aeac4c4299c6f85a2579c6ff63e78665678420eb Mon Sep 17 00:00:00 2001 From: Soliprem Date: Thu, 23 Jun 2022 23:41:44 +0000 Subject: [PATCH 10/16] Update dmscripts.1 --- man/dmscripts.1 | 1 - 1 file changed, 1 deletion(-) diff --git a/man/dmscripts.1 b/man/dmscripts.1 index 098541d..f1d92ef 100644 --- a/man/dmscripts.1 +++ b/man/dmscripts.1 @@ -1,4 +1,3 @@ - .TH "dmscripts" "1" .SH "NAME" -- GitLab From 5fb65fac3f347a9f559b2c1ad9090db016ebd4ac Mon Sep 17 00:00:00 2001 From: Soliprem Date: Sun, 26 Jun 2022 03:08:16 +0200 Subject: [PATCH 11/16] README update --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index df99598..aa380a3 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,7 @@ The scripts included in this repo are: + dm-colpick - Copy a color's hex value to your clipboard + dm-confedit - Choose from a list of configuration files to edit. + dm-currencies - Convert prices between currencies. ++ dm-dictionary - Simple dictionary script + dm-hub - A hub from where you can run all the scripts from. + dm-ip - Get IP of interface or external IP + dm-kill - Search for a process to kill. @@ -19,6 +20,7 @@ The scripts included in this repo are: + dm-reddit - Dmenu as a reddit viewer using reddio. *STILL A WORK IN PROGRESS* + dm-setbg - A wallpaper setting utility using dmenu, xwallpaper and sxiv + dm-sounds - Choose an ambient background to play. ++ dm-spellcheck - Script to check spellings + dm-translate - Translate using Google Translate (through Lingva Translate) + dm-usbmount - mount/unmount usb drives using dmenu. No fancy daemon required + dm-weather - Simple graphical weather app -- GitLab From 0e6353401c112158c6d029f59d0e953f1d3ff4c2 Mon Sep 17 00:00:00 2001 From: soliprem Date: Fri, 5 Aug 2022 12:23:28 +0200 Subject: [PATCH 12/16] dm-documents --- scripts/dm-documents | 53 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100755 scripts/dm-documents diff --git a/scripts/dm-documents b/scripts/dm-documents new file mode 100755 index 0000000..710d94c --- /dev/null +++ b/scripts/dm-documents @@ -0,0 +1,53 @@ +#!/bin/bash +# +# Script name: dm-documents +# Description: Search for a process to kill. +# Dependencies: dmenu +# GitLab: https://www.gitlab.com/dwt1/dmscripts +# License: https://www.gitlab.com/dwt1/dmscripts/LICENSE +# Contributors: Derek Taylor, HostGrady + +# Set with the flags "-e", "-u","-o pipefail" cause the script to fail +# if certain things happen, which is a good thing. Otherwise, we can +# get hidden bugs that are hard to discover. + +set -euo pipefail +_path="$(cd "$(dirname "${BASH_SOURCE[0]}")" && cd "$(dirname "$(readlink "${BASH_SOURCE[0]}" || echo ".")")" && pwd)" +if [[ -f "${_path}/_dm-helper.sh" ]]; then + # shellcheck disable=SC1090,SC1091 + source "${_path}/_dm-helper.sh" +else + # shellcheck disable=SC1090 + echo "No helper-script found" +fi + +# script will not hit this if there is no config-file to load +# shellcheck disable=SC1090 +source "$(get_config)" + +main(){ + PDF_VIEWER=zathura + files="$(find "$HOME" -maxdepth 2 -iname "*.pdf")" + choice=$( printf '%s\n' "${files[@]}" | \ + cut -d '/' -f4- | \ + sed -e 's/Documents/Dcs/g' \ + -e 's/Downloads/Dwn/g' \ + -e 's/Pictures/Pic/g' \ + -e 's/Images/Img/g' \ + -e 's/.pdf//g' | \ + sort -g | \ + ${DMENU} "File: " "$@") || exit 1 + if [ "$choice" ]; then + file=$( printf '%s' "$choice" | \ + sed -e 's/Dcs/Documents/g' \ + -e 's/Dwn/Downloads/g' \ + -e 's/Pic/Pictures/g' \ + -e 's/Img/Images/g' \ + ) + "${PDF_VIEWER}" "$HOME/${file}.pdf" + else + echo "Program Terminated." && exit 0 + fi +} + +[[ "${BASH_SOURCE[0]}" == "${0}" ]] && main "$@" -- GitLab From a0bcff5589fa4cd87e3b13edb7bea09dc3523109 Mon Sep 17 00:00:00 2001 From: soliprem Date: Sat, 6 Aug 2022 01:03:31 +0200 Subject: [PATCH 13/16] new script fixed up --- man/dmscripts.1 | 144 ------------------------------------------- scripts/dm-documents | 2 +- 2 files changed, 1 insertion(+), 145 deletions(-) delete mode 100644 man/dmscripts.1 diff --git a/man/dmscripts.1 b/man/dmscripts.1 deleted file mode 100644 index f1d92ef..0000000 --- a/man/dmscripts.1 +++ /dev/null @@ -1,144 +0,0 @@ -.TH "dmscripts" "1" - -.SH "NAME" -.PP -dmscripts - a collection of various dmenu scripts - -.SH "DESCRIPTION" -.PP -dmscripts are a collection of dmenu scripts written in bash. each script is written and contributed by DT or viewers. - -.SH "USAGE" -.SS "bash dm-hub" -.PP -Runs the dm-hub program which allows for easy access to the scripts. -.SS "bash path/to/script" -.PP -Runs the script specified without using dmhub. -.SS "./path/to/script" -.PP -Same as bash path/to/script. - -.SH "SCRIPTS" -.SS "dm-hub" -.PP -The hub script, allows easy access to other scripts. -.SS "dm-bookman" -.PP -A bookmark searching tool, search through all qutebrowser quickmarks and bookmarks. -.SS "dm-colpick" -.PP -Find the hex value of a color you are searching for. -.SS "dm-confedit" -.PP -A configuration manager, find and edit any config file you need. -.SS "dm-currencies" -.PP -Convert prices between currencies. -.SS "dm-ip" -.PP -Get IP of interface or external IP -.SS "dm-kill" -.PP -Simple process killer, find and kill misbehaving processes. -.SS "dm-logout" -.PP -Simple logout menu, choose to lock, shutdown, reboot or logout of your computer. -.SS "dm-maim" -.PP -A GUI to maim using dmenu. -.SS "dm-man" -.PP -A manual page searcher, search a man page or randomly view one. -.SS "dm-music" -.PP -Dmenu based music player. -.SS "dm-note" -.PP -Store multiple one-line texts or codes and copy one of them when needed. -.SS "dm-radio" -.PP -Listen to online radio stations. -.SS "dm-record" -.PP -Records audio, video and webcam. -.SS "dm-reddit" -.PP -A reddit viewer using dmenu, still a work in progress. -.SS "dm-setbg" -.PP -Using dmenu, setup a wallpaper. -.SS "dm-sounds" -.PP -Choose an ambient background sound to play. -.SS "dm-translate" -.PP -Translate using Google Translate (through Lingva Translate) -.SS "dm-usbmount" -.PP -USB mounting done suckless, no need for bloated daemons. -.SS "dm-websearch" -.PP -Web searching utility using dmenu. -.SS "dm-weather" -.PP -Simple graphical weather app -.SS "dm-wifi" -.PP -Connect to wifi using dmenu. -.SS "dm-youtube" -.PP -Youtube subscriptions without an account or the API tying you down. -.SS "_dm-helper.sh" -.PP -Helper scripts adding functionality to other scripts - -.SH "CONFIG FILES" -.SS "/etc/dmscripts/config" -.PP -This is considered the official global config file and we do not recommend you editing it. It will be overwritten if we change the configuration so you’ll need to back it up if you modify it -.SS "~/.config/dmscripts/config" -.PP -The first local config file is found here, this is free to modify and it is the recommended way to change the config file as it does not get overwritten. It is worth noting however that the config is still regularly modified so you will have to keep up to date on our gitlab page and read the diffs. -.SS "Using the repo configuration" -.PP -The repo can be used as is and provides a local config file. You can change it but it’s change at your own risk. If you want to update the repo, for example, there may be merge conflicts. And when commiting, we expect a default config unless you are intentionally making changes to fix a bug or make an update and not to simply change something in a way you prefer. -.SS "Using global variables" -.PP -While we don’t recommend it, you can choose to set some variables in other places such as the bashrc or the /etc/profile file. -.SS "Modifying the source" -.PP -Finally, you can modify the source code to add more files to modify or to customize dmscripts to your heart’s content, please report any bugs along the way however. Confirm it on an unmodified version first and read the issues. - -.SH "CONFIGURATION" -.SS "DMENU variable" -.PP -DMENU is the default variable used in dmscripts, we expect all scripts to use DMENU in substitution of the dmenu command as we want our scripts to be accessible without modifying the source code. Currently DMENU is defined in a case statement which is used to define DMENU differently depending on the script. -.SS "Other variables" -.PP -A lot of the other variables are simply program names or directories and are not worth going into further details. -.SS "Lists" -.PP -Some our config is done in a list like format. There are two syntaxes, -A and -a. - -.PP --A uses the format of: -.RS -.nf -variable[name-displayed-in-dmenu]=what-it-actually-means - -.fi -.RE - -.PP --a uses: -.RS -.nf -variable=( -"thing1" -"thing2" -... -) - -.fi -.RE diff --git a/scripts/dm-documents b/scripts/dm-documents index 710d94c..6b3f056 100755 --- a/scripts/dm-documents +++ b/scripts/dm-documents @@ -27,7 +27,7 @@ source "$(get_config)" main(){ PDF_VIEWER=zathura - files="$(find "$HOME" -maxdepth 2 -iname "*.pdf")" + files="$(find "$HOME" -maxdepth 4 -iname "*.pdf")" choice=$( printf '%s\n' "${files[@]}" | \ cut -d '/' -f4- | \ sed -e 's/Documents/Dcs/g' \ -- GitLab From faf8d9cbd594ab5bfc455223134101e873133eba Mon Sep 17 00:00:00 2001 From: soliprem Date: Sat, 6 Aug 2022 01:06:03 +0200 Subject: [PATCH 14/16] README --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index aa380a3..e0557fe 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,7 @@ The scripts included in this repo are: + dm-confedit - Choose from a list of configuration files to edit. + dm-currencies - Convert prices between currencies. + dm-dictionary - Simple dictionary script ++ dm-documents - Searches for pdf files and opens them with the pdf viewer + dm-hub - A hub from where you can run all the scripts from. + dm-ip - Get IP of interface or external IP + dm-kill - Search for a process to kill. -- GitLab From 52b61f7a47fdf97754db12728d1304d6b87e0a44 Mon Sep 17 00:00:00 2001 From: soliprem Date: Sat, 6 Aug 2022 01:08:42 +0200 Subject: [PATCH 15/16] config --- config/config | 2 ++ scripts/dm-documents | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/config/config b/config/config index b15c51f..682c081 100755 --- a/config/config +++ b/config/config @@ -11,6 +11,8 @@ DMENU="dmenu -i -l 20 -p" +PDF_VIEWER="zathura" + DMBROWSER="brave" # DMBROWSER="qutebrowser" diff --git a/scripts/dm-documents b/scripts/dm-documents index 6b3f056..cafe9fe 100755 --- a/scripts/dm-documents +++ b/scripts/dm-documents @@ -26,7 +26,7 @@ fi source "$(get_config)" main(){ - PDF_VIEWER=zathura + # PDF_VIEWER=zathura files="$(find "$HOME" -maxdepth 4 -iname "*.pdf")" choice=$( printf '%s\n' "${files[@]}" | \ cut -d '/' -f4- | \ -- GitLab From 64e88d1fa751336199532d3d7a4dd1cf7940b0d4 Mon Sep 17 00:00:00 2001 From: soliprem Date: Sat, 6 Aug 2022 01:12:04 +0200 Subject: [PATCH 16/16] man --- man/dmscripts.1 | 144 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 144 insertions(+) create mode 100644 man/dmscripts.1 diff --git a/man/dmscripts.1 b/man/dmscripts.1 new file mode 100644 index 0000000..f1d92ef --- /dev/null +++ b/man/dmscripts.1 @@ -0,0 +1,144 @@ +.TH "dmscripts" "1" + +.SH "NAME" +.PP +dmscripts - a collection of various dmenu scripts + +.SH "DESCRIPTION" +.PP +dmscripts are a collection of dmenu scripts written in bash. each script is written and contributed by DT or viewers. + +.SH "USAGE" +.SS "bash dm-hub" +.PP +Runs the dm-hub program which allows for easy access to the scripts. +.SS "bash path/to/script" +.PP +Runs the script specified without using dmhub. +.SS "./path/to/script" +.PP +Same as bash path/to/script. + +.SH "SCRIPTS" +.SS "dm-hub" +.PP +The hub script, allows easy access to other scripts. +.SS "dm-bookman" +.PP +A bookmark searching tool, search through all qutebrowser quickmarks and bookmarks. +.SS "dm-colpick" +.PP +Find the hex value of a color you are searching for. +.SS "dm-confedit" +.PP +A configuration manager, find and edit any config file you need. +.SS "dm-currencies" +.PP +Convert prices between currencies. +.SS "dm-ip" +.PP +Get IP of interface or external IP +.SS "dm-kill" +.PP +Simple process killer, find and kill misbehaving processes. +.SS "dm-logout" +.PP +Simple logout menu, choose to lock, shutdown, reboot or logout of your computer. +.SS "dm-maim" +.PP +A GUI to maim using dmenu. +.SS "dm-man" +.PP +A manual page searcher, search a man page or randomly view one. +.SS "dm-music" +.PP +Dmenu based music player. +.SS "dm-note" +.PP +Store multiple one-line texts or codes and copy one of them when needed. +.SS "dm-radio" +.PP +Listen to online radio stations. +.SS "dm-record" +.PP +Records audio, video and webcam. +.SS "dm-reddit" +.PP +A reddit viewer using dmenu, still a work in progress. +.SS "dm-setbg" +.PP +Using dmenu, setup a wallpaper. +.SS "dm-sounds" +.PP +Choose an ambient background sound to play. +.SS "dm-translate" +.PP +Translate using Google Translate (through Lingva Translate) +.SS "dm-usbmount" +.PP +USB mounting done suckless, no need for bloated daemons. +.SS "dm-websearch" +.PP +Web searching utility using dmenu. +.SS "dm-weather" +.PP +Simple graphical weather app +.SS "dm-wifi" +.PP +Connect to wifi using dmenu. +.SS "dm-youtube" +.PP +Youtube subscriptions without an account or the API tying you down. +.SS "_dm-helper.sh" +.PP +Helper scripts adding functionality to other scripts + +.SH "CONFIG FILES" +.SS "/etc/dmscripts/config" +.PP +This is considered the official global config file and we do not recommend you editing it. It will be overwritten if we change the configuration so you’ll need to back it up if you modify it +.SS "~/.config/dmscripts/config" +.PP +The first local config file is found here, this is free to modify and it is the recommended way to change the config file as it does not get overwritten. It is worth noting however that the config is still regularly modified so you will have to keep up to date on our gitlab page and read the diffs. +.SS "Using the repo configuration" +.PP +The repo can be used as is and provides a local config file. You can change it but it’s change at your own risk. If you want to update the repo, for example, there may be merge conflicts. And when commiting, we expect a default config unless you are intentionally making changes to fix a bug or make an update and not to simply change something in a way you prefer. +.SS "Using global variables" +.PP +While we don’t recommend it, you can choose to set some variables in other places such as the bashrc or the /etc/profile file. +.SS "Modifying the source" +.PP +Finally, you can modify the source code to add more files to modify or to customize dmscripts to your heart’s content, please report any bugs along the way however. Confirm it on an unmodified version first and read the issues. + +.SH "CONFIGURATION" +.SS "DMENU variable" +.PP +DMENU is the default variable used in dmscripts, we expect all scripts to use DMENU in substitution of the dmenu command as we want our scripts to be accessible without modifying the source code. Currently DMENU is defined in a case statement which is used to define DMENU differently depending on the script. +.SS "Other variables" +.PP +A lot of the other variables are simply program names or directories and are not worth going into further details. +.SS "Lists" +.PP +Some our config is done in a list like format. There are two syntaxes, -A and -a. + +.PP +-A uses the format of: +.RS +.nf +variable[name-displayed-in-dmenu]=what-it-actually-means + +.fi +.RE + +.PP +-a uses: +.RS +.nf +variable=( +"thing1" +"thing2" +... +) + +.fi +.RE -- GitLab