aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRatakor <ratakor@disroot.org>2023-05-23 15:09:02 +0200
committerRatakor <ratakor@disroot.org>2023-05-23 15:09:02 +0200
commitd825cc17dfca37ad67a9c7d3e5c41b940aa03c1c (patch)
treef88433a0d10db57a5448f06f7c48485809ce42ed
parentd023f7845029b71d2ea4fba3f067ade3bace1745 (diff)
Various fixes and small changes
Remove useless Xressources themes (everforest and catppuccin). Use Xressources for dmenuoff. Fix ytdl for aliases.
-rwxr-xr-x.local/bin/dmenuoff8
-rwxr-xr-x.local/bin/dmenusearch5
-rwxr-xr-x.local/bin/plumber8
-rwxr-xr-x.local/bin/themeswap19
-rwxr-xr-x.local/bin/ytdl41
-rw-r--r--.local/etc/dwmblocks/config11
-rw-r--r--.local/etc/lf/lfrc2
-rw-r--r--.local/etc/nvim/basics.vim2
-rw-r--r--.local/etc/nvim/header.vim4
-rw-r--r--.local/etc/nvim/init.vim2
-rw-r--r--.local/etc/sx/catppuccin63
-rw-r--r--.local/etc/sx/dracula5
-rw-r--r--.local/etc/sx/everforest63
-rw-r--r--.local/etc/sx/gruvbox-dark5
-rw-r--r--.local/etc/sx/gruvbox-light5
-rw-r--r--.local/etc/sxhkd/sxhkdrc2
-rw-r--r--.local/etc/yt-dlp/config1
-rw-r--r--.local/share/packages10
18 files changed, 83 insertions, 173 deletions
diff --git a/.local/bin/dmenuoff b/.local/bin/dmenuoff
index b239b64..ffd2dc6 100755
--- a/.local/bin/dmenuoff
+++ b/.local/bin/dmenuoff
@@ -2,7 +2,13 @@
# menu for shutdown or lock
# require nopass for poweroff and reboot and my build of dmenu for -hf
-QUERY=$(printf 'no\nlock\npoweroff\nreboot' | dmenu -i -sb '#ff5555' -hf '#8be9fd' -p 'Shutdown?')
+red=$(xrdb -query | awk '/color1:/ { print $2 }')
+cyan=$(xrdb -query | awk '/color6:/ { print $2 }')
+
+[ -z "$red" ] && red='#ff5555'
+[ -z "$cyan" ] && cyan='#8be9fd'
+
+QUERY=$(printf 'no\nlock\npoweroff\nreboot' | dmenu -i -sb "$red" -hf "$cyan" -p 'Shutdown?')
ROOTCMD="${ROOTCMD:-$(command -v doas || command -v sudo)}"
case "$QUERY" in
diff --git a/.local/bin/dmenusearch b/.local/bin/dmenusearch
index a6a2ce3..abdb6cf 100755
--- a/.local/bin/dmenusearch
+++ b/.local/bin/dmenusearch
@@ -3,7 +3,7 @@
# author: ratakor <ratakor@disroot.org> :*==*%%%#%+=---:
# :#%%%*+%#=+%*:.
# created: Fri, 12 May 2023 07:58:58 +0200 :%%%. . -*%-
-# updated: Sat, 13 May 2023 15:14:37 +0200 =## . :#%*=:.
+# updated: Fri, 19 May 2023 17:06:26 +0200 =## . :#%*=:.
# -#*#%:=#%%%#-
# description: *:*%%%%%%%#-
# search web, parabola/arch wiki, aur youtube, .-#%%%%%%+
@@ -22,8 +22,9 @@ set -e
web() {
NETWORK=clearnet # clearnet, tor or i2p
+ SOURCE=https://raw.githubusercontent.com/Ratakor/librex/main/instances.json
if [ ! -f "/tmp/instances" ]; then
- curl -s "https://librex.ratakor.com/instances.json" > /tmp/instances.json ||
+ curl -s "$SOURCE" > /tmp/instances.json ||
(notify-send "No internet connection"; exit 1)
strip() {
diff --git a/.local/bin/plumber b/.local/bin/plumber
index ab171ae..905e287 100755
--- a/.local/bin/plumber
+++ b/.local/bin/plumber
@@ -3,7 +3,7 @@
# author: ratakor <ratakor@disroot.org> :*==*%%%#%+=---:
# :#%%%*+%#=+%*:.
# created: Sat, 13 May 2023 13:06:54 +0200 :%%%. . -*%-
-# updated: Sat, 13 May 2023 15:17:34 +0200 =## . :#%*=:.
+# updated: Fri, 19 May 2023 00:54:45 +0200 =## . :#%*=:.
# -#*#%:=#%%%#-
# description: plumber 🪠 *:*%%%%%%%#-
# .-#%%%%%%+
@@ -164,14 +164,18 @@ main() {
fi
openfile "$2" ;;
-s|--sel|'')
- sel=$(xclip -o -sel 2>/dev/null || xsel -o -p -n 2>/dev/null)
+ sel=$(xclip -o -sel 2>/dev/null || xsel -opn 2>/dev/null)
sel=${sel#"${sel%%[![:space:]]*}"}
+ # clear clipboard
+ true | xclip 2>/dev/null || true | xsel 2>/dev/null
+
if [ -z "$sel" ]; then
printf '\033[31mError:\033[m selection buffer is empty\n' >&2
usage
return 1
fi
+
checksel "$sel" ;;
-h|--help)
usage
diff --git a/.local/bin/themeswap b/.local/bin/themeswap
index 5f14268..e8342c9 100755
--- a/.local/bin/themeswap
+++ b/.local/bin/themeswap
@@ -17,19 +17,13 @@ case $THEME in
dracula)
bg=dark
theme=dracula
- bat=Dracula
- red="#ff5555"
- cyan="#8be9fd" ;;
-gruvbox-dark)
+ bat=Dracula ;;
+dark|gruvbox-dark)
bg=dark
- theme=gruvbox-$bg
- red="#cc241d"
- cyan="#689d6a" ;;
-gruvbox-light)
+ theme=gruvbox-$bg ;;
+light|gruvbox-light)
bg=light
- theme=gruvbox-$bg
- red="#cc241d"
- cyan="#689d6a" ;;
+ theme=gruvbox-$bg ;;
*)
exit 1 ;;
esac
@@ -42,9 +36,6 @@ sed -i -e "s/^colorscheme.*/colorscheme ${theme%"-$bg"}/"\
-e "s/lualine.themes.*/lualine.themes.${theme%"-$bg"}'/"\
-e "s/^set background=.*/set background=$bg/"\
"$CONF/nvim/appearance.vim"
-sed -i -e "s/-sb '#.*-hf/-sb '$red' -hf/"\
- -e "s/-hf '#.*-/-hf '$cyan' -/"\
- "$HOME/.local/bin/dmenuoff"
sed -i -e "s/--theme.*/--theme=${bat:-$theme}/" "$CONF/bat/config"
sed -i -e "s/^THEME=.*/THEME=${bat:-$theme}/" "$CONF/lf/scope"
sed -i -e "s/^gtk-theme-name.*/gtk-theme-name=$theme/" "$CONF/gtk-3.0/settings.ini"
diff --git a/.local/bin/ytdl b/.local/bin/ytdl
index 7407f93..3e22447 100755
--- a/.local/bin/ytdl
+++ b/.local/bin/ytdl
@@ -1,33 +1,54 @@
#!/bin/sh
-# wrapper for yt-dlp
+# . :-. .
+# author: ratakor <ratakor@disroot.org> :*==*%%%#%+=---:
+# :#%%%*+%#=+%*:.
+# created: Mon, 15 May 2023 21:13:44 +0200 :%%%. . -*%-
+# updated: Tue, 16 May 2023 23:55:02 +0200 =## . :#%*=:.
+# -#*#%:=#%%%#-
+# description: *:*%%%%%%%#-
+# wrapper for yt-dlp with notification support .-#%%%%%%+
+# %%%--%%%%*-
+# ##%= +%%=:..
+# #* #%#
+# :# -==*
+# shellcheck disable=SC2015 # :: .:
-MUSICDIR=${3:-${XDG_MUSIC_DIR:-$HOME/Music}}
-VIDEODIR=${3:-${XDG_VIDEOS_DIR:-$HOME/Videos}}
+TYPE=$1
+if [ -d "$2" ]; then
+ MUSICDIR=$2
+ VIDEODIR=$2
+ URL=$3
+else
+ MUSICDIR=${3:-${XDG_MUSIC_DIR:-$HOME/Music}}
+ VIDEODIR=${3:-${XDG_VIDEOS_DIR:-$HOME/Videos}}
+ URL=$2
+fi
-case $1 in
+case $TYPE in
v)
mkdir -p "$VIDEODIR"
notify-send "Video download started"
yt-dlp -f '22' -o '%(title)s [%(id)s].%(ext)s'\
- -P "$VIDEODIR" "$2" &&
+ --embed-metadata -P "$VIDEODIR" "$URL" &&
notify-send "Video downloaded" ||
- (notify-send "Error: No internet connection" && exit 1) ;;
+ (notify-send "Error: Download failed"; exit 1) ;;
m)
mkdir -p "$MUSICDIR/download"
notify-send "Music download started"
yt-dlp -f 'ba' -x --embed-thumbnail --audio-format mp3\
- -o '%(title)s [%(id)s].%(ext)s' -P "$MUSICDIR/download" "$2" &&
+ -o '%(title)s [%(id)s].%(ext)s' --embed-metadata\
+ -P "$MUSICDIR/download" "$URL" &&
notify-send "Music downloaded" ||
- (notify-send "Error: No internet connection" && exit 1) ;;
+ (notify-send "Error: Download failed"; exit 1) ;;
p)
NAME=$(printf '' | dmenu -p 'Name ')
mkdir -p "$MUSICDIR/$NAME"
notify-send "Playlist download started"
yt-dlp -f 'ba' -x --embed-thumbnail --audio-format mp3\
-o '%(playlist_index)s - %(title)s [%(id)s].%(ext)s'\
- -P "$MUSICDIR/$NAME" "$2" &&
+ --embed-metadata -P "$MUSICDIR/$NAME" "$URL" &&
notify-send "Playlist downloaded" ||
- (notify-send "Error: No internet connection" && exit 1) ;;
+ (notify-send "Error: Download failed"; exit 1) ;;
*)
exit 1 ;;
esac
diff --git a/.local/etc/dwmblocks/config b/.local/etc/dwmblocks/config
index f53c3fc..78cadc1 100644
--- a/.local/etc/dwmblocks/config
+++ b/.local/etc/dwmblocks/config
@@ -5,14 +5,13 @@ fanspeed = false // 37
memory = false // 38
battery = true // 39
wifi = true // 40
-ethernet = false // 41
+ethernet = true // 41
localip = false // 42
publicip = false // 43
volume = true // 44
mic = true // 45
news = false // 46
-mail = false // 47
-weather = true // 48
-daypercent = false // 49
-date = true // 50
-time = true // 51
+weather = true // 47
+daypercent = false // 48
+date = true // 49
+time = true // 50
diff --git a/.local/etc/lf/lfrc b/.local/etc/lf/lfrc
index 869775f..0cc85f2 100644
--- a/.local/etc/lf/lfrc
+++ b/.local/etc/lf/lfrc
@@ -22,7 +22,7 @@ set period 1
set hiddenfiles ".*:*.aux:*.log:*.bbl:*.bcf:*.blg:*.run.xml"
set cleaner '~/.local/etc/lf/cleaner'
set previewer '~/.local/etc/lf/scope'
-set autoquit on
+set autoquit true
# cmds/functions
cmd open ${{
diff --git a/.local/etc/nvim/basics.vim b/.local/etc/nvim/basics.vim
index c4c605e..0cf5aa9 100644
--- a/.local/etc/nvim/basics.vim
+++ b/.local/etc/nvim/basics.vim
@@ -20,7 +20,7 @@ nnoremap <c-u> <c-u>zz
set number
set relativenumber
set colorcolumn=80
-set textwidth=79
+"set textwidth=79
set title
set nohlsearch
set termguicolors
diff --git a/.local/etc/nvim/header.vim b/.local/etc/nvim/header.vim
index 940bc27..4998198 100644
--- a/.local/etc/nvim/header.vim
+++ b/.local/etc/nvim/header.vim
@@ -2,7 +2,7 @@
" author: ratakor <ratakor@disroot.org> :*==*%%%#%+=---:
" :#%%%*+%#=+%*:.
" created: Sat, 06 May 2023 18:54:06 +0200 :%%%. . -*%-
-" updated: Sat, 13 May 2023 13:16:03 +0200 =## . :#%*=:.
+" updated: Tue, 23 May 2023 15:03:56 +0200 =## . :#%*=:.
" -#*#%:=#%%%#-
" description: *:*%%%%%%%#-
" script to produce an header like this one .-#%%%%%%+
@@ -40,7 +40,7 @@ let s:margin = 5
let s:types = {
\'\.c$\|\.h$\|\.cc$\|\.hh$\|\.cpp$\|\.hpp$\|\.cs$\|\.php$':
\['/*', ' *', ' */'],
- \'\.htm$\|\.html$\|\.xml$':
+ \'\.htm$\|\.html$\|\.xml$\|\.md$':
\['<!--', ' ', '-->'],
\'\.js$':
\['//', '//', ''],
diff --git a/.local/etc/nvim/init.vim b/.local/etc/nvim/init.vim
index 5af0adc..181b9ed 100644
--- a/.local/etc/nvim/init.vim
+++ b/.local/etc/nvim/init.vim
@@ -50,7 +50,7 @@ Plug 'andrewferrier/debugprint.nvim'
call plug#end()
source $XDG_CONFIG_HOME/nvim/basics.vim
-source $XDG_CONFIG_HOME/nvim/header.vim
+"source $XDG_CONFIG_HOME/nvim/header.vim
source $XDG_CONFIG_HOME/nvim/appearance.vim
source $XDG_CONFIG_HOME/nvim/lsp.vim
diff --git a/.local/etc/sx/catppuccin b/.local/etc/sx/catppuccin
deleted file mode 100644
index 291c7c7..0000000
--- a/.local/etc/sx/catppuccin
+++ /dev/null
@@ -1,63 +0,0 @@
-! vim:ft=xdefaults
-
-!! Transparency
-!*.alpha: 0.85
-!#define TRANSPARENT #77e9e7e5
-
-!! Font
-!*.font: monospace:size=10
-!herbe.font_pattern: monospace:size=12
-
-!! Colors
-/* name normal brigth */
-/* black 0 8 */
-/* red 1 9 */
-/* green 2 10 */
-/* yellow 3 11 */
-/* blue 4 12 */
-/* purple 5 13 */
-/* cyan 6 14 */
-/* white 7 15 */
-
-!st.bellvolume: +100
-
-!! Catppuccin Macchiato
-*foreground: #CAD3F5
-*background: #24273A
-*color0: #494D64
-*color1: #ED8796
-*color2: #A6DA95
-*color3: #EED49F
-*color4: #8AADF4
-*color5: #F5BDE6
-*color6: #8BD5CA
-*color7: #B8C0E0
-*color8: #5B6078
-*color9: #ED8796
-*color10: #A6DA95
-*color11: #EED49F
-*color12: #8AADF4
-*color13: #F5BDE6
-*color14: #8BD5CA
-*color15: #A5ADCB
-*.normfgcolor: #CAD3F5
-*.normbgcolor: #24273A
-!dwm.normbordercolor: #44475A
-!dwm.selfgcolor: #BD93F9
-!dwm.selbgcolor: #44475A
-!dwm.selbordercolor: #BD93F9
-dwm.orange: #f5a97f
-dwm.last: #f0c6c6
-dmenu.selfgcolor: #181926
-dmenu.selbgcolor: #91d7e3
-dmenu.highlight: #f5a97f
-!herbe.border: #BD93F9
-herbe.line_spacing: +10
-herbe.padding: +15
-herbe.width: +400
-herbe.border_size: +2
-herbe.pos_x: +15
-herbe.pos_y: +30
-herbe.corner: +1
-herbe.duration: +5
-
diff --git a/.local/etc/sx/dracula b/.local/etc/sx/dracula
index e14b6cd..c6eb505 100644
--- a/.local/etc/sx/dracula
+++ b/.local/etc/sx/dracula
@@ -21,6 +21,11 @@
!st.bellvolume: +100
+!! Gaps
+!dwm.enablegaps: +1
+dwm.gaps: +10
+!herbe.pos_y: +40
+
!! Dracula
*.foreground: #F8F8F2
*.background: #282A36
diff --git a/.local/etc/sx/everforest b/.local/etc/sx/everforest
deleted file mode 100644
index 20f9702..0000000
--- a/.local/etc/sx/everforest
+++ /dev/null
@@ -1,63 +0,0 @@
-! vim:ft=xdefaults
-
-!! Transparency
-!*.alpha: 0.85
-!#define TRANSPARENT #77e9e7e5
-
-!! Font
-!*.font: monospace:size=10
-!herbe.font_pattern: monospace:size=12
-
-!! Colors
-/* name normal brigth */
-/* black 0 8 */
-/* red 1 9 */
-/* green 2 10 */
-/* yellow 3 11 */
-/* blue 4 12 */
-/* purple 5 13 */
-/* cyan 6 14 */
-/* white 7 15 */
-
-!st.bellvolume: +100
-
-!! Everforest
-*.foreground: #d3c6aa
-*.background: #232a2e
-*.cursorColor: #d3c6aa
-*.color0: #7a8478
-*.color1: #e67e80
-*.color2: #a7c080
-*.color3: #dbbc7f
-*.color4: #7fbbb3
-*.color5: #d699b6
-*.color6: #83c092
-*.color7: #d3c6aa
-*.color8: #7a8478
-*.color9: #e67e80
-*.color10: #a7c080
-*.color11: #dbbc7f
-*.color12: #7fbbb3
-*.color13: #d699b6
-*.color14: #83c092
-*.color15: #d3c6aa
-*.normfgcolor: #d3c6aa
-*.normbgcolor: #232a2e
-dwm.normbordercolor: #343F44
-dwm.selfgcolor: #a7c080
-dwm.selbgcolor: #343F44
-dwm.selbordercolor: #a7c080
-dwm.orange: #e69875
-dwm.last: #859289
-dmenu.selfgcolor: #d3c6aa
-dmenu.selbgcolor: #425047
-dmenu.highlight: #e69875
-herbe.border: #83C092
-herbe.line_spacing: +10
-herbe.padding: +15
-herbe.width: +400
-herbe.border_size: +2
-herbe.pos_x: +15
-herbe.pos_y: +30
-herbe.corner: +1
-herbe.duration: +5
diff --git a/.local/etc/sx/gruvbox-dark b/.local/etc/sx/gruvbox-dark
index 21c7022..67536cf 100644
--- a/.local/etc/sx/gruvbox-dark
+++ b/.local/etc/sx/gruvbox-dark
@@ -21,6 +21,11 @@
!st.bellvolume: +100
+!! Gaps
+!dwm.enablegaps: +1
+dwm.gaps: +10
+!herbe.pos_y: +40
+
!! Gruvbox Dark
*.foreground: #ebdbb2
*.background: #1d2021
diff --git a/.local/etc/sx/gruvbox-light b/.local/etc/sx/gruvbox-light
index b431165..6489765 100644
--- a/.local/etc/sx/gruvbox-light
+++ b/.local/etc/sx/gruvbox-light
@@ -21,6 +21,11 @@
!st.bellvolume: +100
+!! Gaps
+!dwm.enablegaps: +1
+dwm.gaps: +10
+!herbe.pos_y: +40
+
!! Gruvbox Light
*.foreground: #3c3836
*.background: #fbf1c7
diff --git a/.local/etc/sxhkd/sxhkdrc b/.local/etc/sxhkd/sxhkdrc
index a52cd31..9739250 100644
--- a/.local/etc/sxhkd/sxhkdrc
+++ b/.local/etc/sxhkd/sxhkdrc
@@ -10,6 +10,8 @@ XF86Battery
battery
Scroll_Lock
themeswap
+super + shift + r
+ randwp
Print
screenshot
{super + equal,XF86AudioRaiseVolume}
diff --git a/.local/etc/yt-dlp/config b/.local/etc/yt-dlp/config
deleted file mode 100644
index 457cd5e..0000000
--- a/.local/etc/yt-dlp/config
+++ /dev/null
@@ -1 +0,0 @@
---embed-metadata
diff --git a/.local/share/packages b/.local/share/packages
index 9d84acb..6796d44 100644
--- a/.local/share/packages
+++ b/.local/share/packages
@@ -27,18 +27,16 @@ st-ratakor # terminal emulator
slock-ratakor # screen locker
randhost # set a random hostname (OpenRC service)
blocktooth # block bluetooth with rfkill (OpenRC service)
-networkmanager-hardened # set a randomized MAC address
+networkmanager-hardened # set a randomized MAC address + disable co test
quand # a calendar app like when
clangbincc # a pacman hook to symlink clang to cc when there is a gcc update
pinentry-dmenu # use dmenu for gpg
ratakor-repo/dragon # a simple drag-and-drop replacement for graphical stuff
-ratakor-repo/your-privacy # better your-privacy
-ratakor-repo/your-freedom # parabola's your-freedom but with chromium allowed
+ratakor-repo/your-privacy # your-privacy but without NM as it's in another pkg
cli-visualizer # audio visualizer
dashbinsh # a pacman hook to symlink dash to sh when there is a bash update
dracula-gtk-theme # /usr/share/themes/dracula
gruvbox-gtk-theme # /usr/share/themes/gruvbox-[dark|light]
-#catppuccin-macchiato-gtk-theme # /usr/share/themes/catppuccin
xbanish # hide mouse when typing
simple-mtpfs # mount phone easily
dbus-xdg # dbus but without ~/.dbus
@@ -48,6 +46,7 @@ scron # simple cron daemon
htop-vim # process viewer (htop) with vim keybinds
openssh-dotlocal # openssh but ~/.ssh to ~/.local/etc/ssh
herbe # notifications
+gomuks # matrix client
## terminal
zsh # user shell
@@ -89,6 +88,7 @@ lua-language-server
vscode-css-languageserver
vscode-html-languageserver
astyle # C formatter
+shellcheck
## sound
rtkit
@@ -138,7 +138,6 @@ iftop # display bandwidth usage
checkbashisms
dash # sh replacement
python-pynvim # neovim dependency
-shellcheck
#nyxt # browser for lisp people
openbsd-netcat
noto-fonts-cjk
@@ -150,4 +149,3 @@ python-gnupg # gajim dependency
git-lfs
xorg-xsetroot # to restart dwm with command line
xdo # window manipulation
-#vhs