test
This commit is contained in:
parent
eedd491e51
commit
2be82f6706
10 changed files with 38 additions and 341 deletions
|
@ -667,8 +667,6 @@ awful.keyboard.append_global_keybindings(
|
||||||
awful.spawn.with_shell("$HOME/.config/rofi/scripts/rofi_power")
|
awful.spawn.with_shell("$HOME/.config/rofi/scripts/rofi_power")
|
||||||
elseif key == "i" then
|
elseif key == "i" then
|
||||||
awful.spawn.with_shell("$HOME/.config/rofi/scripts/rofi_wifi")
|
awful.spawn.with_shell("$HOME/.config/rofi/scripts/rofi_wifi")
|
||||||
elseif key == "b" then
|
|
||||||
awful.spawn.with_shell("$HOME/.config/rofi/scripts/rofi_blue")
|
|
||||||
elseif key == "s" then
|
elseif key == "s" then
|
||||||
awful.spawn.with_shell("$HOME/.config/rofi/scripts/rofi_scrot")
|
awful.spawn.with_shell("$HOME/.config/rofi/scripts/rofi_scrot")
|
||||||
elseif key == "z" then
|
elseif key == "z" then
|
||||||
|
@ -705,6 +703,8 @@ awful.keyboard.append_global_keybindings(
|
||||||
awful.spawn.with_shell("alacritty --title ani-cli --class ani-cli,ani-cli -e ani-cli -f")
|
awful.spawn.with_shell("alacritty --title ani-cli --class ani-cli,ani-cli -e ani-cli -f")
|
||||||
elseif key == "f" then
|
elseif key == "f" then
|
||||||
awful.spawn.with_shell("alacritty --title flix-cli --class flix-cli,flix-cli -e flix-cli")
|
awful.spawn.with_shell("alacritty --title flix-cli --class flix-cli,flix-cli -e flix-cli")
|
||||||
|
elseif key == "t" then
|
||||||
|
awful.spawn.with_shell("alacritty --title toot --class toot,toot -e toot tui")
|
||||||
end
|
end
|
||||||
awful.keygrabber.stop(grabber)
|
awful.keygrabber.stop(grabber)
|
||||||
end
|
end
|
||||||
|
|
|
@ -79,7 +79,8 @@ ruled.client.connect_signal(
|
||||||
"firefox",
|
"firefox",
|
||||||
"Chromium",
|
"Chromium",
|
||||||
"Bitwarden",
|
"Bitwarden",
|
||||||
"qutebrowser"
|
"qutebrowser",
|
||||||
|
"toot"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
properties = { tag = "" }
|
properties = { tag = "" }
|
||||||
|
|
|
@ -176,7 +176,7 @@ List of keybindings (SPC h b b)")
|
||||||
(setq delete-by-moving-to-trash t
|
(setq delete-by-moving-to-trash t
|
||||||
trash-directory "~/.local/share/Trash/files/")
|
trash-directory "~/.local/share/Trash/files/")
|
||||||
|
|
||||||
(setq doom-theme 'doom-gruvbox)
|
(setq doom-theme 'doom-tokyo-night)
|
||||||
(map! :leader
|
(map! :leader
|
||||||
:desc "Load new theme" "h t" #'counsel-load-theme)
|
:desc "Load new theme" "h t" #'counsel-load-theme)
|
||||||
|
|
||||||
|
@ -636,3 +636,6 @@ List of keybindings (SPC h b b)")
|
||||||
(map! :leader
|
(map! :leader
|
||||||
:desc "Zap to char" "z" #'zap-to-char
|
:desc "Zap to char" "z" #'zap-to-char
|
||||||
:desc "Zap up to char" "Z" #'zap-up-to-char)
|
:desc "Zap up to char" "Z" #'zap-up-to-char)
|
||||||
|
|
||||||
|
(setq mastodon-instance-url "https://fosstodon.org"
|
||||||
|
mastodon-active-user "d4r1us-drk")
|
||||||
|
|
|
@ -56,6 +56,7 @@
|
||||||
- [[#splits][SPLITS]]
|
- [[#splits][SPLITS]]
|
||||||
- [[#winner-mode][WINNER MODE]]
|
- [[#winner-mode][WINNER MODE]]
|
||||||
- [[#zap-to-char][ZAP TO CHAR]]
|
- [[#zap-to-char][ZAP TO CHAR]]
|
||||||
|
- [[#mastodon][MASTODON]]
|
||||||
|
|
||||||
* ABOUT THIS CONFIG
|
* ABOUT THIS CONFIG
|
||||||
This is my personal Doom Emacs config. Doom Emacs is a distribution of Emacs that uses the "evil" keybindings (Vim keybindings) and includes a number of nice extensions and a bit of configuration out of the box. I am maintaining this config not just for myself, but also for those that want to explore some of what is possible with Emacs. I will add a lot of examples of plugins and settings, some of them I may not even use personally. I do this because many people following me on YouTube look at my configs as "documentation". This config is a fork of DistroTube's config.
|
This is my personal Doom Emacs config. Doom Emacs is a distribution of Emacs that uses the "evil" keybindings (Vim keybindings) and includes a number of nice extensions and a bit of configuration out of the box. I am maintaining this config not just for myself, but also for those that want to explore some of what is possible with Emacs. I will add a lot of examples of plugins and settings, some of them I may not even use personally. I do this because many people following me on YouTube look at my configs as "documentation". This config is a fork of DistroTube's config.
|
||||||
|
@ -397,7 +398,7 @@ If peep-dired is enabled, you will get image previews as you go up/down with 'j'
|
||||||
Setting the theme to doom-one. To try out new themes, I set a keybinding for counsel-load-theme with 'SPC h t'.
|
Setting the theme to doom-one. To try out new themes, I set a keybinding for counsel-load-theme with 'SPC h t'.
|
||||||
|
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(setq doom-theme 'doom-gruvbox)
|
(setq doom-theme 'doom-tokyo-night)
|
||||||
(map! :leader
|
(map! :leader
|
||||||
:desc "Load new theme" "h t" #'counsel-load-theme)
|
:desc "Load new theme" "h t" #'counsel-load-theme)
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
@ -1128,3 +1129,9 @@ Emacs provides a 'zap-to-char' command that kills from the current point to a ch
|
||||||
:desc "Zap to char" "z" #'zap-to-char
|
:desc "Zap to char" "z" #'zap-to-char
|
||||||
:desc "Zap up to char" "Z" #'zap-up-to-char)
|
:desc "Zap up to char" "Z" #'zap-up-to-char)
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
|
* MASTODON
|
||||||
|
#+BEGIN_SRC emacs-lisp
|
||||||
|
(setq mastodon-instance-url "https://fosstodon.org"
|
||||||
|
mastodon-active-user "d4r1us-drk")
|
||||||
|
#+END_SRC
|
||||||
|
|
|
@ -44,7 +44,7 @@
|
||||||
(popup +defaults) ; tame sudden yet inevitable temporary windows
|
(popup +defaults) ; tame sudden yet inevitable temporary windows
|
||||||
tabs ; a tab bar for Emacs
|
tabs ; a tab bar for Emacs
|
||||||
;;treemacs ; a project drawer, like neotree but cooler
|
;;treemacs ; a project drawer, like neotree but cooler
|
||||||
unicode ; extended unicode support for various languages
|
;;unicode ; extended unicode support for various languages
|
||||||
vc-gutter ; vcs diff in the fringe
|
vc-gutter ; vcs diff in the fringe
|
||||||
vi-tilde-fringe ; fringe tildes to mark beyond EOB
|
vi-tilde-fringe ; fringe tildes to mark beyond EOB
|
||||||
window-select ; visually switch windows
|
window-select ; visually switch windows
|
||||||
|
@ -116,7 +116,7 @@
|
||||||
common-lisp ; if you've seen one lisp, you've seen them all
|
common-lisp ; if you've seen one lisp, you've seen them all
|
||||||
;;coq ; proofs-as-programs
|
;;coq ; proofs-as-programs
|
||||||
;;crystal ; ruby at the speed of c
|
;;crystal ; ruby at the speed of c
|
||||||
;;csharp ; unity, .NET, and mono shenanigans
|
csharp ; unity, .NET, and mono shenanigans
|
||||||
;;data ; config/data formats
|
;;data ; config/data formats
|
||||||
;;(dart +flutter) ; paint ui and not much else
|
;;(dart +flutter) ; paint ui and not much else
|
||||||
;;elixir ; erlang done right
|
;;elixir ; erlang done right
|
||||||
|
@ -128,8 +128,8 @@
|
||||||
;;fsharp ; ML stands for Microsoft's Language
|
;;fsharp ; ML stands for Microsoft's Language
|
||||||
;;fstar ; (dependent) types and (monadic) effects and Z3
|
;;fstar ; (dependent) types and (monadic) effects and Z3
|
||||||
;;gdscript ; the language you waited for
|
;;gdscript ; the language you waited for
|
||||||
;;(go +lsp) ; the hipster dialect
|
(go +lsp) ; the hipster dialect
|
||||||
;;(haskell +dante) ; a language that's lazier than I am
|
(haskell +dante) ; a language that's lazier than I am
|
||||||
;;hy ; readability of scheme w/ speed of python
|
;;hy ; readability of scheme w/ speed of python
|
||||||
;;idris ; a language you can depend on
|
;;idris ; a language you can depend on
|
||||||
json ; At least it ain't XML
|
json ; At least it ain't XML
|
||||||
|
|
|
@ -87,3 +87,4 @@
|
||||||
(package! clippy)
|
(package! clippy)
|
||||||
(package! minimap)
|
(package! minimap)
|
||||||
(package! olivetti)
|
(package! olivetti)
|
||||||
|
(package! mastodon)
|
||||||
|
|
|
@ -73,7 +73,7 @@ listview {
|
||||||
element {
|
element {
|
||||||
padding: 5px;
|
padding: 5px;
|
||||||
background-color: @bg-col;
|
background-color: @bg-col;
|
||||||
text-color: @fg-col ;
|
text-color: @blue;
|
||||||
}
|
}
|
||||||
|
|
||||||
element-icon {
|
element-icon {
|
||||||
|
@ -81,8 +81,8 @@ element-icon {
|
||||||
}
|
}
|
||||||
|
|
||||||
element selected {
|
element selected {
|
||||||
background-color: @selected-col ;
|
background-color: @selected-col;
|
||||||
text-color: @fg-col2 ;
|
text-color: @fg-col2;
|
||||||
}
|
}
|
||||||
|
|
||||||
mode-switcher {
|
mode-switcher {
|
||||||
|
@ -91,13 +91,13 @@ mode-switcher {
|
||||||
|
|
||||||
button {
|
button {
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
background-color: @bg-col-light;
|
background-color: @bg-col;
|
||||||
text-color: @grey;
|
text-color: @inactive;
|
||||||
vertical-align: 0.5;
|
vertical-align: 0.5;
|
||||||
horizontal-align: 0.5;
|
horizontal-align: 0.5;
|
||||||
}
|
}
|
||||||
|
|
||||||
button selected {
|
button selected {
|
||||||
background-color: @bg-col;
|
background-color: @selected-col;
|
||||||
text-color: @blue;
|
text-color: @red;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,315 +0,0 @@
|
||||||
#!/usr/bin/env bash
|
|
||||||
#
|
|
||||||
# __ _ _ _ _ _ _
|
|
||||||
# _ __ ___ / _(_) | |__ | |_ _ ___| |_ ___ ___ | |_| |__
|
|
||||||
# | '__/ _ \| |_| |_____| '_ \| | | | |/ _ \ __/ _ \ / _ \| __| '_ \
|
|
||||||
# | | | (_) | _| |_____| |_) | | |_| | __/ || (_) | (_) | |_| | | |
|
|
||||||
# |_| \___/|_| |_| |_.__/|_|\__,_|\___|\__\___/ \___/ \__|_| |_|
|
|
||||||
#
|
|
||||||
# Author: Nick Clyde (clydedroid)
|
|
||||||
# rofi support by: Layerex
|
|
||||||
#
|
|
||||||
# A script that generates a rofi menu that uses bluetoothctl to
|
|
||||||
# connect to bluetooth devices and display status info.
|
|
||||||
#
|
|
||||||
# Depends on:
|
|
||||||
# Arch repositories: rofi, bluez-utils (contains bluetoothctl)
|
|
||||||
|
|
||||||
# Constants
|
|
||||||
divider="---------"
|
|
||||||
goback="Back"
|
|
||||||
|
|
||||||
# Checks if bluetooth controller is powered on
|
|
||||||
power_on() {
|
|
||||||
if bluetoothctl show | grep -F -q "Powered: yes"; then
|
|
||||||
return 0
|
|
||||||
else
|
|
||||||
return 1
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
# Toggles power state
|
|
||||||
toggle_power() {
|
|
||||||
if power_on; then
|
|
||||||
bluetoothctl power off
|
|
||||||
show_menu
|
|
||||||
else
|
|
||||||
if rfkill list bluetooth | grep -F -q 'blocked: yes'; then
|
|
||||||
rfkill unblock bluetooth && sleep 3
|
|
||||||
fi
|
|
||||||
bluetoothctl power on
|
|
||||||
show_menu
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
# Checks if controller is scanning for new devices
|
|
||||||
scan_on() {
|
|
||||||
if bluetoothctl show | grep -F -q "Discovering: yes"; then
|
|
||||||
echo "Scan: on"
|
|
||||||
return 0
|
|
||||||
else
|
|
||||||
echo "Scan: off"
|
|
||||||
return 1
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
# Toggles scanning state
|
|
||||||
toggle_scan() {
|
|
||||||
if scan_on; then
|
|
||||||
kill "$(pgrep -F -f "bluetoothctl scan on")"
|
|
||||||
bluetoothctl scan off
|
|
||||||
show_menu
|
|
||||||
else
|
|
||||||
bluetoothctl scan on &
|
|
||||||
echo "Scanning..."
|
|
||||||
sleep 5
|
|
||||||
show_menu
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
# Checks if controller is able to pair to devices
|
|
||||||
pairable_on() {
|
|
||||||
if bluetoothctl show | grep -F -q "Pairable: yes"; then
|
|
||||||
echo "Pairable: on"
|
|
||||||
return 0
|
|
||||||
else
|
|
||||||
echo "Pairable: off"
|
|
||||||
return 1
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
# Toggles pairable state
|
|
||||||
toggle_pairable() {
|
|
||||||
if pairable_on; then
|
|
||||||
bluetoothctl pairable off
|
|
||||||
show_menu
|
|
||||||
else
|
|
||||||
bluetoothctl pairable on
|
|
||||||
show_menu
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
# Checks if controller is discoverable by other devices
|
|
||||||
discoverable_on() {
|
|
||||||
if bluetoothctl show | grep -F -q "Discoverable: yes"; then
|
|
||||||
echo "Discoverable: on"
|
|
||||||
return 0
|
|
||||||
else
|
|
||||||
echo "Discoverable: off"
|
|
||||||
return 1
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
# Toggles discoverable state
|
|
||||||
toggle_discoverable() {
|
|
||||||
if discoverable_on; then
|
|
||||||
bluetoothctl discoverable off
|
|
||||||
show_menu
|
|
||||||
else
|
|
||||||
bluetoothctl discoverable on
|
|
||||||
show_menu
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
# Checks if a device is connected
|
|
||||||
device_connected() {
|
|
||||||
device_info=$(bluetoothctl info "$1")
|
|
||||||
if echo "$device_info" | grep -F -q "Connected: yes"; then
|
|
||||||
return 0
|
|
||||||
else
|
|
||||||
return 1
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
# Toggles device connection
|
|
||||||
toggle_connection() {
|
|
||||||
if device_connected "$1"; then
|
|
||||||
bluetoothctl disconnect "$1"
|
|
||||||
# device_menu "$device"
|
|
||||||
else
|
|
||||||
bluetoothctl connect "$1"
|
|
||||||
# device_menu "$device"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
# Checks if a device is paired
|
|
||||||
device_paired() {
|
|
||||||
device_info=$(bluetoothctl info "$1")
|
|
||||||
if echo "$device_info" | grep -F -q "Paired: yes"; then
|
|
||||||
echo "Paired: yes"
|
|
||||||
return 0
|
|
||||||
else
|
|
||||||
echo "Paired: no"
|
|
||||||
return 1
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
# Toggles device paired state
|
|
||||||
toggle_paired() {
|
|
||||||
if device_paired "$1"; then
|
|
||||||
bluetoothctl remove "$1"
|
|
||||||
device_menu "$device"
|
|
||||||
else
|
|
||||||
bluetoothctl pair "$1"
|
|
||||||
device_menu "$device"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
# Checks if a device is trusted
|
|
||||||
device_trusted() {
|
|
||||||
device_info=$(bluetoothctl info "$1")
|
|
||||||
if echo "$device_info" | grep -F -q "Trusted: yes"; then
|
|
||||||
echo "Trusted: yes"
|
|
||||||
return 0
|
|
||||||
else
|
|
||||||
echo "Trusted: no"
|
|
||||||
return 1
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
# Toggles device connection
|
|
||||||
toggle_trust() {
|
|
||||||
if device_trusted "$1"; then
|
|
||||||
bluetoothctl untrust "$1"
|
|
||||||
device_menu "$device"
|
|
||||||
else
|
|
||||||
bluetoothctl trust "$1"
|
|
||||||
device_menu "$device"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
# Prints a short string with the current bluetooth status
|
|
||||||
# Useful for status bars like polybar, etc.
|
|
||||||
print_status() {
|
|
||||||
if power_on; then
|
|
||||||
printf ''
|
|
||||||
|
|
||||||
mapfile -t paired_devices < <(bluetoothctl paired-devices | grep -F Device | cut -d ' ' -f 2)
|
|
||||||
counter=0
|
|
||||||
|
|
||||||
for device in "${paired_devices[@]}"; do
|
|
||||||
if device_connected "$device"; then
|
|
||||||
device_alias="$(bluetoothctl info "$device" | grep -F "Alias" | cut -d ' ' -f 2-)"
|
|
||||||
|
|
||||||
if [ $counter -gt 0 ]; then
|
|
||||||
printf ", %s" "$device_alias"
|
|
||||||
else
|
|
||||||
printf " %s" "$device_alias"
|
|
||||||
fi
|
|
||||||
|
|
||||||
((counter++))
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
printf "\n"
|
|
||||||
else
|
|
||||||
echo ""
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
# A submenu for a specific device that allows connecting, pairing, and trusting
|
|
||||||
device_menu() {
|
|
||||||
device=$1
|
|
||||||
|
|
||||||
# Get device name and mac address
|
|
||||||
device_name="$(echo "$device" | cut -d ' ' -f 3-)"
|
|
||||||
mac="$(echo "$device" | cut -d ' ' -f 2)"
|
|
||||||
|
|
||||||
# Build options
|
|
||||||
if device_connected "$mac"; then
|
|
||||||
connected="Connected: yes"
|
|
||||||
else
|
|
||||||
connected="Connected: no"
|
|
||||||
fi
|
|
||||||
paired=$(device_paired "$mac")
|
|
||||||
trusted=$(device_trusted "$mac")
|
|
||||||
options="$connected\n$paired\n$trusted\n$divider\n$goback\nExit"
|
|
||||||
|
|
||||||
# Open rofi menu, read chosen option
|
|
||||||
chosen="$(echo -e "$options" | run_rofi "$device_name")"
|
|
||||||
|
|
||||||
# Match chosen option to command
|
|
||||||
case $chosen in
|
|
||||||
"" | "$divider")
|
|
||||||
echo "No option chosen."
|
|
||||||
;;
|
|
||||||
"$connected")
|
|
||||||
toggle_connection "$mac"
|
|
||||||
;;
|
|
||||||
"$paired")
|
|
||||||
toggle_paired "$mac"
|
|
||||||
;;
|
|
||||||
"$trusted")
|
|
||||||
toggle_trust "$mac"
|
|
||||||
;;
|
|
||||||
"$goback")
|
|
||||||
show_menu
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
}
|
|
||||||
|
|
||||||
# Opens a rofi menu with current bluetooth status and options to connect
|
|
||||||
show_menu() {
|
|
||||||
# Get menu options
|
|
||||||
if power_on; then
|
|
||||||
power="Power: on"
|
|
||||||
|
|
||||||
# Human-readable names of devices, one per line
|
|
||||||
# If scan is off, will only list paired devices
|
|
||||||
devices=$(bluetoothctl devices | grep -F Device | cut -d ' ' -f 3-)
|
|
||||||
|
|
||||||
# Get controller flags
|
|
||||||
scan=$(scan_on)
|
|
||||||
pairable=$(pairable_on)
|
|
||||||
discoverable=$(discoverable_on)
|
|
||||||
|
|
||||||
# Options passed to rofi
|
|
||||||
options="$devices\n$divider\n$power\n$scan\n$pairable\n$discoverable\nExit"
|
|
||||||
else
|
|
||||||
power="Power: off"
|
|
||||||
options="$power\nExit"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Open rofi menu, read chosen option
|
|
||||||
chosen="$(echo -e "$options" | run_rofi "Bluetooth")"
|
|
||||||
|
|
||||||
# Match chosen option to command
|
|
||||||
case $chosen in
|
|
||||||
"" | "$divider")
|
|
||||||
echo "No option chosen."
|
|
||||||
;;
|
|
||||||
"$power")
|
|
||||||
toggle_power
|
|
||||||
;;
|
|
||||||
"$scan")
|
|
||||||
toggle_scan
|
|
||||||
;;
|
|
||||||
"$discoverable")
|
|
||||||
toggle_discoverable
|
|
||||||
;;
|
|
||||||
"$pairable")
|
|
||||||
toggle_pairable
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
device=$(bluetoothctl devices | grep -F "$chosen")
|
|
||||||
# Open a submenu if a device is selected
|
|
||||||
if [[ $device ]]; then device_menu "$device"; fi
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
}
|
|
||||||
|
|
||||||
original_args=("$@")
|
|
||||||
|
|
||||||
# rofi command to pipe into. Extra arguments to rofi_blue are passed through to rofi. This
|
|
||||||
# allows the user to set fonts, sizes, colours, etc.
|
|
||||||
run_rofi() {
|
|
||||||
rofi -dmenu "${original_args[@]}" -p "$1"
|
|
||||||
}
|
|
||||||
|
|
||||||
case "$1" in
|
|
||||||
--status)
|
|
||||||
print_status
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
show_menu
|
|
||||||
;;
|
|
||||||
esac
|
|
|
@ -5,8 +5,8 @@
|
||||||
# - Dependencies: scrot, dmenu, notify-send
|
# - Dependencies: scrot, dmenu, notify-send
|
||||||
|
|
||||||
## CREATING SCREENSHOT FOLDER ##
|
## CREATING SCREENSHOT FOLDER ##
|
||||||
mkdir -p "$HOME/Pictures/Screenshots"
|
mkdir -p "$HOME/pictures/screenshots"
|
||||||
cd "$HOME/Pictures/Screenshots" || exit 0
|
cd "$HOME/pictures/screenshots" || exit 0
|
||||||
|
|
||||||
## CHOICES ##
|
## CHOICES ##
|
||||||
cho1=" Entire screen"
|
cho1=" Entire screen"
|
||||||
|
@ -25,11 +25,11 @@ dels="$del1\n$del2\n$del3"
|
||||||
delays() {
|
delays() {
|
||||||
del=$(echo -e "$dels" | rofi -dmenu -p "Select: ");
|
del=$(echo -e "$dels" | rofi -dmenu -p "Select: ");
|
||||||
case $del in
|
case $del in
|
||||||
$del1)
|
"$del1")
|
||||||
scrot -d 3 && notify-send "Screenshot saved";;
|
scrot -d 3 && notify-send "Screenshot saved";;
|
||||||
$del2)
|
"$del2")
|
||||||
scrot -d 5 && notify-send "Screenshot saved";;
|
scrot -d 5 && notify-send "Screenshot saved";;
|
||||||
$del3)
|
"$del3")
|
||||||
scrot -d 10 && notify-send "Screenshot saved"
|
scrot -d 10 && notify-send "Screenshot saved"
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
@ -52,12 +52,12 @@ area() {
|
||||||
## MAIN ACTION ##
|
## MAIN ACTION ##
|
||||||
choice=$(echo -e "$chos" | rofi -dmenu -p "Select: ")
|
choice=$(echo -e "$chos" | rofi -dmenu -p "Select: ")
|
||||||
case $choice in
|
case $choice in
|
||||||
$cho1)
|
"$cho1")
|
||||||
screen;;
|
screen;;
|
||||||
$cho2)
|
"$cho2")
|
||||||
delays;;
|
delays;;
|
||||||
$cho3)
|
"$cho3")
|
||||||
window;;
|
window;;
|
||||||
$cho4)
|
"$cho4")
|
||||||
area
|
area
|
||||||
esac
|
esac
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
# - Dependencies: rofi, fd, feh
|
# - Dependencies: rofi, fd, feh
|
||||||
|
|
||||||
## MAIN VARIABLES AND COMMANDS ##
|
## MAIN VARIABLES AND COMMANDS ##
|
||||||
walldir="Pictures/Wallpapers/Main/" # wallpapers folder, change it to yours, make sure that it ends with a /
|
walldir="pictures/wallpapers/main/" # wallpapers folder, change it to yours, make sure that it ends with a /
|
||||||
cd "$walldir" || exit
|
cd "$walldir" || exit
|
||||||
|
|
||||||
## SELECT PICTURE FUNCTION ##
|
## SELECT PICTURE FUNCTION ##
|
||||||
|
|
Loading…
Reference in a new issue