mirror of
https://github.com/alrayyes/dotfiles/
synced 2023-11-14 15:56:30 +00:00
Compare commits
No commits in common. "7466eb916eb41c544febc875bc6d3367098a72a8" and "1f233149192eaddb6434e3b7093c2713d68d24d8" have entirely different histories.
7466eb916e
...
1f23314919
1
.husky/.gitignore
vendored
1
.husky/.gitignore
vendored
@ -1 +0,0 @@
|
|||||||
_
|
|
@ -2,7 +2,14 @@
|
|||||||
|
|
||||||
###---Start app if not running already---###
|
###---Start app if not running already---###
|
||||||
function start_if_not_running
|
function start_if_not_running
|
||||||
set PROCESS_NAME $argv[1]
|
###---iceweasel/firefox is weird---###
|
||||||
|
if [ $argv[1] = "iceweasel" ]
|
||||||
|
set PROCESS_NAME "iceweasel|MainThread"
|
||||||
|
else if [ $argv[1] = "element-desktop-nightly" ]
|
||||||
|
set PROCESS_NAME "element-desktop"
|
||||||
|
else
|
||||||
|
set PROCESS_NAME $argv[1]
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
if [ (pgrep -u (id -u) -x "$PROCESS_NAME" | wc -l) -lt 1 ]
|
if [ (pgrep -u (id -u) -x "$PROCESS_NAME" | wc -l) -lt 1 ]
|
||||||
@ -34,13 +41,17 @@ sxhkd &
|
|||||||
###---Keyboard---###
|
###---Keyboard---###
|
||||||
setxkbmap -option caps:escape
|
setxkbmap -option caps:escape
|
||||||
|
|
||||||
|
if [ -x /usr/bin/numlockx ]
|
||||||
|
/usr/bin/numlockx on
|
||||||
|
end
|
||||||
|
|
||||||
###---Get monitor count---###
|
###---Get monitor count---###
|
||||||
set SCREENCOUNT (xrandr | grep -c "\*")
|
set SCREENCOUNT (xrandr | grep -c "\*")
|
||||||
|
|
||||||
###---Monitors---###
|
###---Monitors---###
|
||||||
if [ "$SCREENCOUNT" -eq 2 ]
|
if [ "$SCREENCOUNT" -eq 2 ]
|
||||||
bspc monitor DP-3 -d 2 3 4 5 6 7 8 9 0
|
bspc monitor DP-1 -d 2 3 4 5 6 7 8 9 0
|
||||||
bspc monitor DP-2 -d 1
|
bspc monitor HDMI-2 -d 1
|
||||||
if [ -f "$HOME/.local/bin/screen_desktop" ]
|
if [ -f "$HOME/.local/bin/screen_desktop" ]
|
||||||
screen_desktop
|
screen_desktop
|
||||||
end
|
end
|
||||||
@ -86,11 +97,12 @@ bspc rule -a fullscreen state=fullscreen
|
|||||||
bspc rule -a Emacs state=tiled
|
bspc rule -a Emacs state=tiled
|
||||||
bspc rule -a Zathura state=tiled
|
bspc rule -a Zathura state=tiled
|
||||||
|
|
||||||
bspc rule -a firefox desktop='^1'
|
bspc rule -a iceweasel desktop='^1'
|
||||||
bspc rule -a Brave-browser desktop='^1'
|
bspc rule -a Brave-browser desktop='^1'
|
||||||
bspc rule -a bashtop desktop='^2'
|
bspc rule -a bashtop desktop='^2'
|
||||||
bspc rule -a Slack='^3'
|
bspc rule -a Slack='^3'
|
||||||
bspc rule -a Element desktop='^3'
|
bspc rule -a Element desktop='^3'
|
||||||
|
bspc rule -a Element-Nightly desktop='^3'
|
||||||
bspc rule -a weechat desktop='^3'
|
bspc rule -a weechat desktop='^3'
|
||||||
bspc rule -a castero desktop='^4'
|
bspc rule -a castero desktop='^4'
|
||||||
bspc rule -a Spt desktop='^4'
|
bspc rule -a Spt desktop='^4'
|
||||||
@ -111,7 +123,7 @@ start_if_not_running syncthing-gtk
|
|||||||
start_if_not_running caffeine
|
start_if_not_running caffeine
|
||||||
|
|
||||||
start_if_not_running brave
|
start_if_not_running brave
|
||||||
start_if_not_running firefox
|
start_if_not_running iceweasel
|
||||||
start_if_not_running emacs
|
start_if_not_running emacs
|
||||||
start_if_not_running element-desktop
|
start_if_not_running element-desktop
|
||||||
start_if_not_running element-desktop-nightly
|
start_if_not_running element-desktop-nightly
|
||||||
|
@ -1,3 +1,6 @@
|
|||||||
#!/usr/bin/env sh
|
#!/usr/bin/env sh
|
||||||
|
|
||||||
xrandr --output DP-3 --primary --mode 3840x2160 --rotate normal --output DP-2 --mode 2560x1440 --pos 0x0 --rotate left
|
xrandr --newmode "2560x1440_40" 201.00 2560 2720 2984 3408 1440 1443 1448 1476 -hsync +vsync
|
||||||
|
xrandr --addmode HDMI-2 2560x1440_40
|
||||||
|
|
||||||
|
xrandr --output VGA-1 --off --output DP-1 --primary --mode 3840x2160 --rotate normal --output HDMI-3 --off --output HDMI-2 --mode 2560x1440_40 --pos 0x0 --rotate left --output HDMI-1 --off
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#!/usr/bin/env sh
|
#!/usr/bin/env sh
|
||||||
|
|
||||||
if [ -e ~/.cache/wall1.png ] && [ -e ~/.cache/wall2.png ]; then
|
if [ -e ~/.cache/wall1.png ] && [ -e ~/.cache/wall2.png ]; then
|
||||||
xwallpaper --output DP-2 --zoom ~/.cache/wall2.png --output DP-3 --zoom ~/.cache/wall1.png &
|
xwallpaper --output HDMI-2 --zoom ~/.cache/wall2.png --output DP-1 --zoom ~/.cache/wall1.png &
|
||||||
elif [ -e ~/.cache/wall1.png ]; then
|
elif [ -e ~/.cache/wall1.png ]; then
|
||||||
xwallpaper --output eDP1 --zoom ~/.cache/wall1.png &
|
xwallpaper --output eDP1 --zoom ~/.cache/wall1.png &
|
||||||
fi
|
fi
|
||||||
|
@ -56,8 +56,8 @@
|
|||||||
vterm ; another terminals in Emacs
|
vterm ; another terminals in Emacs
|
||||||
|
|
||||||
:checkers
|
:checkers
|
||||||
;syntax
|
syntax
|
||||||
(spell +aspell +everywhere)
|
(spell +enchant +everywhere)
|
||||||
grammar
|
grammar
|
||||||
|
|
||||||
:tools
|
:tools
|
||||||
@ -82,14 +82,14 @@
|
|||||||
ledger
|
ledger
|
||||||
(markdown +grip)
|
(markdown +grip)
|
||||||
(org
|
(org
|
||||||
|
+noter
|
||||||
|
+journal
|
||||||
|
+roam
|
||||||
+dragndrop
|
+dragndrop
|
||||||
+hugo
|
+hugo
|
||||||
+journal
|
|
||||||
+noter
|
|
||||||
+pandoc
|
+pandoc
|
||||||
+pretty
|
+pretty
|
||||||
+present
|
+present)
|
||||||
+roam)
|
|
||||||
(json +lsp)
|
(json +lsp)
|
||||||
(php +lsp)
|
(php +lsp)
|
||||||
(python +lsp)
|
(python +lsp)
|
||||||
|
8
emacs/.local/share/applications/org-protocol.desktop
Normal file
8
emacs/.local/share/applications/org-protocol.desktop
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
[Desktop Entry]
|
||||||
|
Name=Org-protocol
|
||||||
|
Exec=emacsclient %u
|
||||||
|
Icon=emacs-icon
|
||||||
|
Type=Application
|
||||||
|
Terminal=false
|
||||||
|
Categories=System;
|
||||||
|
MimeType=x-scheme-handler/org-protocol;
|
@ -3,6 +3,11 @@ if status is-login
|
|||||||
if test -z "$DISPLAY" -a $XDG_VTNR = 1
|
if test -z "$DISPLAY" -a $XDG_VTNR = 1
|
||||||
set -xg -x SXHKD_SHELL '/usr/bin/sh'
|
set -xg -x SXHKD_SHELL '/usr/bin/sh'
|
||||||
|
|
||||||
|
# Enable numberlock
|
||||||
|
if [ -x "/usr/bin/numlockx" ]
|
||||||
|
/usr/bin/numlockx on
|
||||||
|
end
|
||||||
|
|
||||||
exec startx -- -keeptty
|
exec startx -- -keeptty
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -28,6 +33,7 @@ end
|
|||||||
path_if_exists ~/.local/share/yarn/global/node_modules/.bin
|
path_if_exists ~/.local/share/yarn/global/node_modules/.bin
|
||||||
path_if_exists ~/.local/bin
|
path_if_exists ~/.local/bin
|
||||||
path_if_exists ~/.emacs.d/bin
|
path_if_exists ~/.emacs.d/bin
|
||||||
|
path_if_exists ~/.local/share/go/bin
|
||||||
path_if_exists ~/.local/share/cargo/bin
|
path_if_exists ~/.local/share/cargo/bin
|
||||||
path_if_exists ~/.local/share/go/bin
|
path_if_exists ~/.local/share/go/bin
|
||||||
|
|
||||||
@ -35,10 +41,14 @@ path_if_exists ~/.local/share/go/bin
|
|||||||
set GPG_TTY (tty)
|
set GPG_TTY (tty)
|
||||||
|
|
||||||
# Set default browser
|
# Set default browser
|
||||||
if [ -e "/sbin/brave" ]
|
if [ -e "/usr/bin/brave" ]
|
||||||
set -xg BROWSER "brave"
|
set -xg BROWSER "brave"
|
||||||
else if [ -e "/sbin/firefox" ]
|
else
|
||||||
|
if [ -e "/usr/bin/firefox" ]
|
||||||
set -xg BROWSER "firefox"
|
set -xg BROWSER "firefox"
|
||||||
|
else if [ -e "/usr/bin/iceweasel" ]
|
||||||
|
set -xg BROWSER "iceweasel"
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
# Set default terminal
|
# Set default terminal
|
||||||
@ -93,9 +103,6 @@ set -xg XDG_VIDEOS_DIR $HOME/Videos
|
|||||||
# Npm
|
# Npm
|
||||||
set -xg NPM_CONFIG_USERCONFIG $XDG_CONFIG_HOME/npm/npmrc
|
set -xg NPM_CONFIG_USERCONFIG $XDG_CONFIG_HOME/npm/npmrc
|
||||||
|
|
||||||
# Set qt theme
|
|
||||||
set -xg QT_QPA_PLATFORMTHEME qt5ct
|
|
||||||
|
|
||||||
# nvim alias
|
# nvim alias
|
||||||
abbr --add v 'nvim'
|
abbr --add v 'nvim'
|
||||||
abbr --add sv 'sudo nvim'
|
abbr --add sv 'sudo nvim'
|
||||||
|
6
install
6
install
@ -4,6 +4,7 @@
|
|||||||
set prerequisiteApps bat bmon broot brave caffeine-ng exa fslint fzf graphviz isync imagemagick lightdm-gtk-greeter mailcap neofetch npm pandoc-bin pamixer playerctl pulseaudio pulsemixer python pywal ripgrep stow sxiv tldr trayer udisks2 unclutter xbanish xwallpaper yarn xprop zathura
|
set prerequisiteApps bat bmon broot brave caffeine-ng exa fslint fzf graphviz isync imagemagick lightdm-gtk-greeter mailcap neofetch npm pandoc-bin pamixer playerctl pulseaudio pulsemixer python pywal ripgrep stow sxiv tldr trayer udisks2 unclutter xbanish xwallpaper yarn xprop zathura
|
||||||
set prerequisiteFonts ttf-linux-libertine noto-fonts noto-fonts-emoji ttf-liberation nerd-fonts-hack
|
set prerequisiteFonts ttf-linux-libertine noto-fonts noto-fonts-emoji ttf-liberation nerd-fonts-hack
|
||||||
set prerequisiteLibraries libxft-bgra
|
set prerequisiteLibraries libxft-bgra
|
||||||
|
set prerequisiteLsp bash-language-server ccls php-language-server python-language-server typescript-language-server-bin vscode-css-languageserver-bin vscode-html-languageserver-bin nodejs-intelephense
|
||||||
set configuredApps alacritty bspwm castero emacs firejail git gnupg gtk lf dunst mpd mpv mpv-mpris ncmpcpp neomutt neovim picom redshift sxhkd tmux tuir weechat
|
set configuredApps alacritty bspwm castero emacs firejail git gnupg gtk lf dunst mpd mpv mpv-mpris ncmpcpp neomutt neovim picom redshift sxhkd tmux tuir weechat
|
||||||
set locales aspell-en hunspell-en_GB hunspell-en_US hunspell-nl
|
set locales aspell-en hunspell-en_GB hunspell-en_US hunspell-nl
|
||||||
set golang go golangci-lint-bin
|
set golang go golangci-lint-bin
|
||||||
@ -50,6 +51,10 @@ for library in $prerequisiteLibraries
|
|||||||
install_app_if_not_exist "$library"
|
install_app_if_not_exist "$library"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
for lsp in $prerequisiteLsp
|
||||||
|
install_app_if_not_exist "$lsp"
|
||||||
|
end
|
||||||
|
|
||||||
for app in $configuredApps
|
for app in $configuredApps
|
||||||
install_app_if_not_exist "$app"
|
install_app_if_not_exist "$app"
|
||||||
end
|
end
|
||||||
@ -90,7 +95,6 @@ mkdir_if_not_exist ~/.config/coc/extensions
|
|||||||
mkdir_if_not_exist ~/.config/dmenu-frecency
|
mkdir_if_not_exist ~/.config/dmenu-frecency
|
||||||
mkdir_if_not_exist ~/.config/doom
|
mkdir_if_not_exist ~/.config/doom
|
||||||
mkdir_if_not_exist ~/.config/sxhkd
|
mkdir_if_not_exist ~/.config/sxhkd
|
||||||
mkdir_if_not_exist ~/.local/share/applications
|
|
||||||
|
|
||||||
|
|
||||||
# Link mpv plugins if they don't exist
|
# Link mpv plugins if they don't exist
|
||||||
|
446
package-lock.json
generated
Normal file
446
package-lock.json
generated
Normal file
@ -0,0 +1,446 @@
|
|||||||
|
{
|
||||||
|
"name": "dotfiles",
|
||||||
|
"requires": true,
|
||||||
|
"lockfileVersion": 1,
|
||||||
|
"dependencies": {
|
||||||
|
"@babel/code-frame": {
|
||||||
|
"version": "7.10.4",
|
||||||
|
"resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.10.4.tgz",
|
||||||
|
"integrity": "sha512-vG6SvB6oYEhvgisZNFRmRCUkLz11c7rp+tbNTynGqc6mS1d5ATd/sGyV6W0KZZnXRKMTzZDRgQT3Ou9jhpAfUg==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"@babel/highlight": "^7.10.4"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"@babel/helper-validator-identifier": {
|
||||||
|
"version": "7.10.4",
|
||||||
|
"resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.10.4.tgz",
|
||||||
|
"integrity": "sha512-3U9y+43hz7ZM+rzG24Qe2mufW5KhvFg/NhnNph+i9mgCtdTCtMJuI1TMkrIUiK7Ix4PYlRF9I5dhqaLYA/ADXw==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"@babel/highlight": {
|
||||||
|
"version": "7.10.4",
|
||||||
|
"resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.10.4.tgz",
|
||||||
|
"integrity": "sha512-i6rgnR/YgPEQzZZnbTHHuZdlE8qyoBNalD6F+q4vAFlcMEcqmkoG+mPqJYJCo63qPf74+Y1UZsl3l6f7/RIkmA==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"@babel/helper-validator-identifier": "^7.10.4",
|
||||||
|
"chalk": "^2.0.0",
|
||||||
|
"js-tokens": "^4.0.0"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"ansi-styles": {
|
||||||
|
"version": "3.2.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
|
||||||
|
"integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"color-convert": "^1.9.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"chalk": {
|
||||||
|
"version": "2.4.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
|
||||||
|
"integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"ansi-styles": "^3.2.1",
|
||||||
|
"escape-string-regexp": "^1.0.5",
|
||||||
|
"supports-color": "^5.3.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"color-convert": {
|
||||||
|
"version": "1.9.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz",
|
||||||
|
"integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"color-name": "1.1.3"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"color-name": {
|
||||||
|
"version": "1.1.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz",
|
||||||
|
"integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"has-flag": {
|
||||||
|
"version": "3.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
|
||||||
|
"integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"supports-color": {
|
||||||
|
"version": "5.5.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
|
||||||
|
"integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"has-flag": "^3.0.0"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"@commitlint/config-conventional": {
|
||||||
|
"version": "11.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@commitlint/config-conventional/-/config-conventional-11.0.0.tgz",
|
||||||
|
"integrity": "sha512-SNDRsb5gLuDd2PL83yCOQX6pE7gevC79UPFx+GLbLfw6jGnnbO9/tlL76MLD8MOViqGbo7ZicjChO9Gn+7tHhA==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"conventional-changelog-conventionalcommits": "^4.3.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"@types/parse-json": {
|
||||||
|
"version": "4.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@types/parse-json/-/parse-json-4.0.0.tgz",
|
||||||
|
"integrity": "sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"ansi-styles": {
|
||||||
|
"version": "4.3.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
|
||||||
|
"integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"color-convert": "^2.0.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"array-ify": {
|
||||||
|
"version": "1.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/array-ify/-/array-ify-1.0.0.tgz",
|
||||||
|
"integrity": "sha1-nlKHYrSpBmrRY6aWKjZEGOlibs4=",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"callsites": {
|
||||||
|
"version": "3.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz",
|
||||||
|
"integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"chalk": {
|
||||||
|
"version": "4.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz",
|
||||||
|
"integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"ansi-styles": "^4.1.0",
|
||||||
|
"supports-color": "^7.1.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"ci-info": {
|
||||||
|
"version": "2.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/ci-info/-/ci-info-2.0.0.tgz",
|
||||||
|
"integrity": "sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"color-convert": {
|
||||||
|
"version": "2.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
|
||||||
|
"integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"color-name": "~1.1.4"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"color-name": {
|
||||||
|
"version": "1.1.4",
|
||||||
|
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
|
||||||
|
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"compare-func": {
|
||||||
|
"version": "2.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/compare-func/-/compare-func-2.0.0.tgz",
|
||||||
|
"integrity": "sha512-zHig5N+tPWARooBnb0Zx1MFcdfpyJrfTJ3Y5L+IFvUm8rM74hHz66z0gw0x4tijh5CorKkKUCnW82R2vmpeCRA==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"array-ify": "^1.0.0",
|
||||||
|
"dot-prop": "^5.1.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"compare-versions": {
|
||||||
|
"version": "3.6.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/compare-versions/-/compare-versions-3.6.0.tgz",
|
||||||
|
"integrity": "sha512-W6Af2Iw1z4CB7q4uU4hv646dW9GQuBM+YpC0UvUCWSD8w90SJjp+ujJuXaEMtAXBtSqGfMPuFOVn4/+FlaqfBA==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"conventional-changelog-conventionalcommits": {
|
||||||
|
"version": "4.5.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/conventional-changelog-conventionalcommits/-/conventional-changelog-conventionalcommits-4.5.0.tgz",
|
||||||
|
"integrity": "sha512-buge9xDvjjOxJlyxUnar/+6i/aVEVGA7EEh4OafBCXPlLUQPGbRUBhBUveWRxzvR8TEjhKEP4BdepnpG2FSZXw==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"compare-func": "^2.0.0",
|
||||||
|
"lodash": "^4.17.15",
|
||||||
|
"q": "^1.5.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"cosmiconfig": {
|
||||||
|
"version": "7.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-7.0.0.tgz",
|
||||||
|
"integrity": "sha512-pondGvTuVYDk++upghXJabWzL6Kxu6f26ljFw64Swq9v6sQPUL3EUlVDV56diOjpCayKihL6hVe8exIACU4XcA==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"@types/parse-json": "^4.0.0",
|
||||||
|
"import-fresh": "^3.2.1",
|
||||||
|
"parse-json": "^5.0.0",
|
||||||
|
"path-type": "^4.0.0",
|
||||||
|
"yaml": "^1.10.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"dot-prop": {
|
||||||
|
"version": "5.3.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-5.3.0.tgz",
|
||||||
|
"integrity": "sha512-QM8q3zDe58hqUqjraQOmzZ1LIH9SWQJTlEKCH4kJ2oQvLZk7RbQXvtDM2XEq3fwkV9CCvvH4LA0AV+ogFsBM2Q==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"is-obj": "^2.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"error-ex": {
|
||||||
|
"version": "1.3.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz",
|
||||||
|
"integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"is-arrayish": "^0.2.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"escape-string-regexp": {
|
||||||
|
"version": "1.0.5",
|
||||||
|
"resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
|
||||||
|
"integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"find-up": {
|
||||||
|
"version": "4.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz",
|
||||||
|
"integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"locate-path": "^5.0.0",
|
||||||
|
"path-exists": "^4.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"find-versions": {
|
||||||
|
"version": "3.2.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/find-versions/-/find-versions-3.2.0.tgz",
|
||||||
|
"integrity": "sha512-P8WRou2S+oe222TOCHitLy8zj+SIsVJh52VP4lvXkaFVnOFFdoWv1H1Jjvel1aI6NCFOAaeAVm8qrI0odiLcww==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"semver-regex": "^2.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"has-flag": {
|
||||||
|
"version": "4.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
|
||||||
|
"integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"husky": {
|
||||||
|
"version": "4.3.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/husky/-/husky-4.3.0.tgz",
|
||||||
|
"integrity": "sha512-tTMeLCLqSBqnflBZnlVDhpaIMucSGaYyX6855jM4AguGeWCeSzNdb1mfyWduTZ3pe3SJVvVWGL0jO1iKZVPfTA==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"chalk": "^4.0.0",
|
||||||
|
"ci-info": "^2.0.0",
|
||||||
|
"compare-versions": "^3.6.0",
|
||||||
|
"cosmiconfig": "^7.0.0",
|
||||||
|
"find-versions": "^3.2.0",
|
||||||
|
"opencollective-postinstall": "^2.0.2",
|
||||||
|
"pkg-dir": "^4.2.0",
|
||||||
|
"please-upgrade-node": "^3.2.0",
|
||||||
|
"slash": "^3.0.0",
|
||||||
|
"which-pm-runs": "^1.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"import-fresh": {
|
||||||
|
"version": "3.2.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.2.2.tgz",
|
||||||
|
"integrity": "sha512-cTPNrlvJT6twpYy+YmKUKrTSjWFs3bjYjAhCwm+z4EOCubZxAuO+hHpRN64TqjEaYSHs7tJAE0w1CKMGmsG/lw==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"parent-module": "^1.0.0",
|
||||||
|
"resolve-from": "^4.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"is-arrayish": {
|
||||||
|
"version": "0.2.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz",
|
||||||
|
"integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"is-obj": {
|
||||||
|
"version": "2.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/is-obj/-/is-obj-2.0.0.tgz",
|
||||||
|
"integrity": "sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"js-tokens": {
|
||||||
|
"version": "4.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz",
|
||||||
|
"integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"json-parse-even-better-errors": {
|
||||||
|
"version": "2.3.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz",
|
||||||
|
"integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"lines-and-columns": {
|
||||||
|
"version": "1.1.6",
|
||||||
|
"resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.1.6.tgz",
|
||||||
|
"integrity": "sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA=",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"locate-path": {
|
||||||
|
"version": "5.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz",
|
||||||
|
"integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"p-locate": "^4.1.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"lodash": {
|
||||||
|
"version": "4.17.20",
|
||||||
|
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz",
|
||||||
|
"integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"opencollective-postinstall": {
|
||||||
|
"version": "2.0.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/opencollective-postinstall/-/opencollective-postinstall-2.0.3.tgz",
|
||||||
|
"integrity": "sha512-8AV/sCtuzUeTo8gQK5qDZzARrulB3egtLzFgteqB2tcT4Mw7B8Kt7JcDHmltjz6FOAHsvTevk70gZEbhM4ZS9Q==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"p-limit": {
|
||||||
|
"version": "2.3.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz",
|
||||||
|
"integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"p-try": "^2.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"p-locate": {
|
||||||
|
"version": "4.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz",
|
||||||
|
"integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"p-limit": "^2.2.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"p-try": {
|
||||||
|
"version": "2.2.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz",
|
||||||
|
"integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"parent-module": {
|
||||||
|
"version": "1.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz",
|
||||||
|
"integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"callsites": "^3.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"parse-json": {
|
||||||
|
"version": "5.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.1.0.tgz",
|
||||||
|
"integrity": "sha512-+mi/lmVVNKFNVyLXV31ERiy2CY5E1/F6QtJFEzoChPRwwngMNXRDQ9GJ5WdE2Z2P4AujsOi0/+2qHID68KwfIQ==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"@babel/code-frame": "^7.0.0",
|
||||||
|
"error-ex": "^1.3.1",
|
||||||
|
"json-parse-even-better-errors": "^2.3.0",
|
||||||
|
"lines-and-columns": "^1.1.6"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"path-exists": {
|
||||||
|
"version": "4.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz",
|
||||||
|
"integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"path-type": {
|
||||||
|
"version": "4.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz",
|
||||||
|
"integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"pkg-dir": {
|
||||||
|
"version": "4.2.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz",
|
||||||
|
"integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"find-up": "^4.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"please-upgrade-node": {
|
||||||
|
"version": "3.2.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/please-upgrade-node/-/please-upgrade-node-3.2.0.tgz",
|
||||||
|
"integrity": "sha512-gQR3WpIgNIKwBMVLkpMUeR3e1/E1y42bqDQZfql+kDeXd8COYfM8PQA4X6y7a8u9Ua9FHmsrrmirW2vHs45hWg==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"semver-compare": "^1.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"q": {
|
||||||
|
"version": "1.5.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/q/-/q-1.5.1.tgz",
|
||||||
|
"integrity": "sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc=",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"resolve-from": {
|
||||||
|
"version": "4.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz",
|
||||||
|
"integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"semver-compare": {
|
||||||
|
"version": "1.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/semver-compare/-/semver-compare-1.0.0.tgz",
|
||||||
|
"integrity": "sha1-De4hahyUGrN+nvsXiPavxf9VN/w=",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"semver-regex": {
|
||||||
|
"version": "2.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/semver-regex/-/semver-regex-2.0.0.tgz",
|
||||||
|
"integrity": "sha512-mUdIBBvdn0PLOeP3TEkMH7HHeUP3GjsXCwKarjv/kGmUFOYg1VqEemKhoQpWMu6X2I8kHeuVdGibLGkVK+/5Qw==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"slash": {
|
||||||
|
"version": "3.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz",
|
||||||
|
"integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"supports-color": {
|
||||||
|
"version": "7.2.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
|
||||||
|
"integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"has-flag": "^4.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"which-pm-runs": {
|
||||||
|
"version": "1.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/which-pm-runs/-/which-pm-runs-1.0.0.tgz",
|
||||||
|
"integrity": "sha1-Zws6+8VS4LVd9rd4DKdGFfI60cs=",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"yaml": {
|
||||||
|
"version": "1.10.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.0.tgz",
|
||||||
|
"integrity": "sha512-yr2icI4glYaNG+KWONODapy2/jDdMSDnrONSjblABjD9B4Z5LgiircSt8m8sRZFNi08kG9Sm0uSHtEmP3zaEGg==",
|
||||||
|
"dev": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -1,9 +1,10 @@
|
|||||||
{
|
{
|
||||||
"name": "dotfiles",
|
"name": "dotfiles",
|
||||||
"description": "My dotfiles",
|
"description": "My dotfiles",
|
||||||
|
"dependencies": {},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@commitlint/config-conventional": "^12.0.1",
|
"@commitlint/config-conventional": "^11.0.0",
|
||||||
"husky": "^5.1.3"
|
"husky": "^4.3.0"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "echo \"Error: no test specified\" && exit 1"
|
"test": "echo \"Error: no test specified\" && exit 1"
|
||||||
|
@ -1,90 +1,90 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
usb_print() {
|
usb_print() {
|
||||||
devices=$(lsblk -Jplno NAME,TYPE,RM,SIZE,MOUNTPOINT,VENDOR)
|
devices=$(lsblk -Jplno NAME,TYPE,RM,SIZE,MOUNTPOINT,VENDOR)
|
||||||
output=""
|
output=""
|
||||||
counter=0
|
counter=0
|
||||||
|
|
||||||
for unmounted in $(echo "$devices" | jq -r '.blockdevices[] | select(.type == "part") | select(.rm == true) | select(.mountpoint == null) | .name'); do
|
for unmounted in $(echo "$devices" | jq -r '.blockdevices[] | select(.type == "part") | select(.rm == true) | select(.mountpoint == null) | .name'); do
|
||||||
unmounted=$(echo "$unmounted" | tr -d "[:digit:]")
|
unmounted=$(echo "$unmounted" | tr -d "[:digit:]")
|
||||||
unmounted=$(echo "$devices" | jq -r '.blockdevices[] | select(.name == "'"$unmounted"'") | .vendor')
|
unmounted=$(echo "$devices" | jq -r '.blockdevices[] | select(.name == "'"$unmounted"'") | .vendor')
|
||||||
unmounted=$(echo "$unmounted" | tr -d ' ')
|
unmounted=$(echo "$unmounted" | tr -d ' ')
|
||||||
|
|
||||||
if [ $counter -eq 0 ]; then
|
if [ $counter -eq 0 ]; then
|
||||||
space=""
|
space=""
|
||||||
else
|
else
|
||||||
space=" "
|
space=" "
|
||||||
fi
|
fi
|
||||||
counter=$((counter + 1))
|
counter=$((counter + 1))
|
||||||
|
|
||||||
output="$output$space $unmounted"
|
output="$output$space $unmounted"
|
||||||
done
|
done
|
||||||
|
|
||||||
for mounted in $(echo "$devices" | jq -r '.blockdevices[] | select(.type == "part") | select(.rm == true) | select(.mountpoint != null) | .size'); do
|
for mounted in $(echo "$devices" | jq -r '.blockdevices[] | select(.type == "part") | select(.rm == true) | select(.mountpoint != null) | .size'); do
|
||||||
if [ $counter -eq 0 ]; then
|
if [ $counter -eq 0 ]; then
|
||||||
space=""
|
space=""
|
||||||
else
|
else
|
||||||
space=" "
|
space=" "
|
||||||
fi
|
fi
|
||||||
counter=$((counter + 1))
|
counter=$((counter + 1))
|
||||||
|
|
||||||
output="$output$space $mounted"
|
output="$output$space $mounted"
|
||||||
done
|
done
|
||||||
|
|
||||||
if [ "$output" ]; then
|
if [ "$output" ]; then
|
||||||
notify-send.py "USB" "$output" \
|
notify-send.py "USB" "$output" \
|
||||||
-i drive-removable-media-usb \
|
-i drive-removable-media-usb \
|
||||||
--replaces-process "usb-mount" &
|
--replaces-process "usb-mount" &
|
||||||
fi
|
fi
|
||||||
echo "$output"
|
echo "$output"
|
||||||
}
|
}
|
||||||
|
|
||||||
usb_update() {
|
usb_update() {
|
||||||
pid=$(cat "$path_pid")
|
pid=$(cat "$path_pid")
|
||||||
|
|
||||||
if [ "$pid" != "" ]; then
|
if [ "$pid" != "" ]; then
|
||||||
kill -10 "$pid"
|
kill -10 "$pid"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
path_pid="/tmp/polybar-system-usb-udev.pid"
|
path_pid="/tmp/polybar-system-usb-udev.pid"
|
||||||
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
--update)
|
--update)
|
||||||
usb_update
|
usb_update
|
||||||
;;
|
;;
|
||||||
--mount)
|
--mount)
|
||||||
devices=$(lsblk -Jplno NAME,TYPE,RM,MOUNTPOINT)
|
devices=$(lsblk -Jplno NAME,TYPE,RM,MOUNTPOINT)
|
||||||
|
|
||||||
for mount in $(echo "$devices" | jq -r '.blockdevices[] | select(.type == "part") | select(.rm == true) | select(.mountpoint == null) | .name'); do
|
for mount in $(echo "$devices" | jq -r '.blockdevices[] | select(.type == "part") | select(.rm == true) | select(.mountpoint == null) | .name'); do
|
||||||
mountpoint=$(udisksctl mount --no-user-interaction -b "$mount")
|
mountpoint=$(udisksctl mount --no-user-interaction -b "$mount")
|
||||||
mountpoint=$(echo "$mountpoint" | cut -d " " -f 4 | tr -d ".")
|
mountpoint=$(echo "$mountpoint" | cut -d " " -f 4 | tr -d ".")
|
||||||
alacritty --class lf,lf -e lf "$mountpoint" &
|
alacritty --class lf,lf -e lf "$mountpoint" &
|
||||||
done
|
done
|
||||||
|
|
||||||
usb_update
|
usb_update
|
||||||
;;
|
;;
|
||||||
--unmount)
|
--unmount)
|
||||||
devices=$(lsblk -Jplno NAME,TYPE,RM,MOUNTPOINT)
|
devices=$(lsblk -Jplno NAME,TYPE,RM,MOUNTPOINT)
|
||||||
|
|
||||||
for unmount in $(echo "$devices" | jq -r '.blockdevices[] | select(.type == "part") | select(.rm == true) | select(.mountpoint != null) | .name'); do
|
for unmount in $(echo "$devices" | jq -r '.blockdevices[] | select(.type == "part") | select(.rm == true) | select(.mountpoint != null) | .name'); do
|
||||||
udisksctl unmount --no-user-interaction -b "$unmount"
|
udisksctl unmount --no-user-interaction -b "$unmount"
|
||||||
udisksctl power-off --no-user-interaction -b "$unmount"
|
udisksctl power-off --no-user-interaction -b "$unmount"
|
||||||
done
|
done
|
||||||
|
|
||||||
usb_update
|
usb_update
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo $$ >$path_pid
|
echo $$ >$path_pid
|
||||||
|
|
||||||
trap exit INT
|
trap exit INT
|
||||||
trap "echo" USR1
|
trap "echo" USR1
|
||||||
|
|
||||||
while true; do
|
while true; do
|
||||||
usb_print
|
usb_print
|
||||||
|
|
||||||
sleep 60 &
|
sleep 60 &
|
||||||
wait
|
wait
|
||||||
done
|
done
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
@ -57,7 +57,7 @@ inherit = bar/base-laptop
|
|||||||
bottom = true
|
bottom = true
|
||||||
monitor = ${env:MONITOR:eDP1}
|
monitor = ${env:MONITOR:eDP1}
|
||||||
|
|
||||||
#modules-right = system-usb-udev corona
|
modules-right = system-usb-udev corona
|
||||||
modules-left = mpd player-mpris-tail
|
modules-left = mpd player-mpris-tail
|
||||||
|
|
||||||
[bar/laptop-top]
|
[bar/laptop-top]
|
||||||
@ -72,18 +72,17 @@ tray-position = right
|
|||||||
|
|
||||||
[bar/monitor1]
|
[bar/monitor1]
|
||||||
inherit = bar/base-desktop
|
inherit = bar/base-desktop
|
||||||
monitor = ${env:MONITOR:DP-3}
|
monitor = ${env:MONITOR:DP-1}
|
||||||
|
|
||||||
modules-left = bspwm
|
modules-left = bspwm
|
||||||
modules-center = mpd player-mpris-tail
|
modules-center = mpd player-mpris-tail
|
||||||
#modules-right = seperator corona seperator eth bluetooth seperator volume seperator docker memory cpu temperature seperator system-usb-udev filesystem-root filesystem-home seperator updates-arch-combined mail reddit github rss seperator weather seperator date seperator
|
modules-right = seperator corona seperator eth bluetooth seperator volume seperator docker memory cpu temperature seperator system-usb-udev filesystem-root filesystem-home seperator updates-arch-combined mail reddit github rss seperator weather seperator date seperator
|
||||||
modules-right = seperator corona seperator eth bluetooth seperator volume seperator docker memory cpu temperature seperator filesystem-root seperator updates-arch-combined mail reddit github rss seperator weather seperator date seperator
|
|
||||||
|
|
||||||
tray-position = right
|
tray-position = right
|
||||||
|
|
||||||
[bar/monitor2]
|
[bar/monitor2]
|
||||||
inherit = bar/base-desktop
|
inherit = bar/base-desktop
|
||||||
monitor = ${env:MONITOR:DP-2}
|
monitor = ${env:MONITOR:HDMI-2}
|
||||||
modules-left = bspwm
|
modules-left = bspwm
|
||||||
|
|
||||||
;== Modules ========================================================
|
;== Modules ========================================================
|
||||||
@ -181,7 +180,6 @@ ramp-load-4 = ▅
|
|||||||
ramp-load-5 = ▆
|
ramp-load-5 = ▆
|
||||||
ramp-load-6 = ▇
|
ramp-load-6 = ▇
|
||||||
ramp-load-7 = █
|
ramp-load-7 = █
|
||||||
|
|
||||||
[module/cpu]
|
[module/cpu]
|
||||||
type = internal/cpu
|
type = internal/cpu
|
||||||
|
|
||||||
|
@ -1,7 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
if [ "$(systemctl is-active bluetooth.service)" = "active" ]; then
|
|
||||||
echo ""
|
|
||||||
else
|
|
||||||
echo ""
|
|
||||||
fi
|
|
@ -1,25 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
clock=$(date '+%I')
|
|
||||||
|
|
||||||
case "$clock" in
|
|
||||||
"00") icon="🕛" ;;
|
|
||||||
"01") icon="🕐" ;;
|
|
||||||
"02") icon="🕑" ;;
|
|
||||||
"03") icon="🕒" ;;
|
|
||||||
"04") icon="🕓" ;;
|
|
||||||
"05") icon="🕔" ;;
|
|
||||||
"06") icon="🕕" ;;
|
|
||||||
"07") icon="🕖" ;;
|
|
||||||
"08") icon="🕗" ;;
|
|
||||||
"09") icon="🕘" ;;
|
|
||||||
"10") icon="🕙" ;;
|
|
||||||
"11") icon="🕚" ;;
|
|
||||||
"12") icon="🕛" ;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
case $BLOCK_BUTTON in
|
|
||||||
1) notify-send "This Month" "$(cal --color=always | sed "s/..7m/<b><span color=\"red\">/;s/..27m/<\/span><\/b>/")" && notify-send "Appointments" "$(khal list -d prayer_calender_local)" ;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
date "+$icon%H:%M"
|
|
@ -1,7 +0,0 @@
|
|||||||
#!/usr/bin/env sh
|
|
||||||
|
|
||||||
case $BLOCK_BUTTON in
|
|
||||||
1) notify-send Covid "$(curl -4 https://corona-stats.online/Netherlands?emojis=true | sed 's/\x1b\[[0-9;]*m//g')" ;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
curl --silent "https://corona-stats.online/Netherlands" | sed -n '4p' | sed 's/\x1b\[[0-9;]*m//g' | sed 's/[\ \t]//g' | awk -F '│' '{ print "😷" $3, "💀" $5, "🛌" $4, "🏥" $9 }'
|
|
@ -1,8 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
case $BLOCK_BUTTON in
|
|
||||||
1) notify-send "🖥 CPU hogs" "$(ps axch -o cmd:15,%cpu --sort=-%cpu | head)\\n(100% per core)" ;;
|
|
||||||
3) setsid -f "$TERMINAL" -e htop ;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
sensors | awk '/Core 0/ {print "🌡" $3}'
|
|
@ -1,37 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
# Cache in tmpfs to improve speed and reduce SSD load
|
|
||||||
cache=/tmp/cpubarscache
|
|
||||||
|
|
||||||
case $BLOCK_BUTTON in
|
|
||||||
1) setsid -f "$TERMINAL" -e htop ;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
# id total idle
|
|
||||||
stats=$(awk '/cpu[0-9]+/ {printf "%d %d %d\n", substr($1,4), ($2 + $3 + $4 + $5), $5 }' /proc/stat)
|
|
||||||
[ ! -f $cache ] && echo "$stats" >"$cache"
|
|
||||||
old=$(cat "$cache")
|
|
||||||
printf "🪨"
|
|
||||||
echo "$stats" | while read -r row; do
|
|
||||||
id=${row%% *}
|
|
||||||
rest=${row#* }
|
|
||||||
total=${rest%% *}
|
|
||||||
idle=${rest##* }
|
|
||||||
|
|
||||||
case "$(echo "$old" | awk '{if ($1 == id)
|
|
||||||
printf "%d\n", (1 - (idle - $3) / (total - $2))*100 /12.5}' \
|
|
||||||
id="$id" total="$total" idle="$idle")" in
|
|
||||||
|
|
||||||
"0") printf "▁" ;;
|
|
||||||
"1") printf "▂" ;;
|
|
||||||
"2") printf "▃" ;;
|
|
||||||
"3") printf "▄" ;;
|
|
||||||
"4") printf "▅" ;;
|
|
||||||
"5") printf "▆" ;;
|
|
||||||
"6") printf "▇" ;;
|
|
||||||
"7") printf "█" ;;
|
|
||||||
"8") printf "█" ;;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
printf "\\n"
|
|
||||||
echo "$stats" >"$cache"
|
|
@ -1,15 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
# Status bar module for disk space
|
|
||||||
# $1 should be drive mountpoint, otherwise assumed /.
|
|
||||||
|
|
||||||
location=${1:-/}
|
|
||||||
|
|
||||||
[ -d "$location" ] || exit
|
|
||||||
|
|
||||||
case $BLOCK_BUTTON in
|
|
||||||
1) notify-send "💽 Disk space" "$(df -h --output=target,used,size)" ;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
printf "%s%s" "🏠" "$(df -h "/home" | awk ' /[0-9]/ {print $3 "/" $2}') "
|
|
||||||
printf "%s%s" "🖥" "$(df -h "/" | awk ' /[0-9]/ {print $3 "/" $2}')"
|
|
@ -1,13 +0,0 @@
|
|||||||
#!/usr/bin/env sh
|
|
||||||
|
|
||||||
case $BLOCK_BUTTON in
|
|
||||||
1) notify-send "Docker" "$(docker ps)" ;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
count=$(docker ps -q | wc -l)
|
|
||||||
|
|
||||||
if [ ! "$count" -eq 0 ]; then
|
|
||||||
echo "🐳$count"
|
|
||||||
else
|
|
||||||
echo ""
|
|
||||||
fi
|
|
@ -1,15 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
token=$(getpassword githubnotifications)
|
|
||||||
|
|
||||||
case $BLOCK_BUTTON in
|
|
||||||
1) "$BROWSER" --new-tab https://github.com/notifications ;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
count=$(curl -s -u alrayyes:"$token" https://api.github.com/notifications | jq 'length')
|
|
||||||
|
|
||||||
if [ ! "$count" -eq 0 ]; then
|
|
||||||
echo "🦊$count"
|
|
||||||
else
|
|
||||||
echo ""
|
|
||||||
fi
|
|
@ -1,19 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
# Show wifi 📶 and percent strength or 📡 if none.
|
|
||||||
# Show 🌐 if connected to ethernet or ❎ if none.
|
|
||||||
# Show 🔒 if a vpn connection is active
|
|
||||||
|
|
||||||
case $BLOCK_BUTTON in
|
|
||||||
1)
|
|
||||||
"$TERMINAL" -e nmtui
|
|
||||||
pkill -RTMIN+17 dwmblocks
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
case "$(cat /sys/class/net/w*/operstate 2>/dev/null)" in
|
|
||||||
down) wifiicon="📡 " ;;
|
|
||||||
up) wifiicon="$(awk '/^\s*w/ { print "📶", int($3 * 100 / 70) "% " }' /proc/net/wireless)" ;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
printf "%s%s%s\n" "$wifiicon" "$(sed "s/down/❎/;s/up/🌐/" /sys/class/net/e*/operstate 2>/dev/null)"
|
|
@ -1,16 +0,0 @@
|
|||||||
#!/usr/bin/env sh
|
|
||||||
|
|
||||||
case $BLOCK_BUTTON in
|
|
||||||
1) setsid -f "$TERMINAL" -e neomutt ;;
|
|
||||||
3) setsid -f mailsync >/dev/null ;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
unread="$(find ~/.local/share/mail/*/INBOX/new/* -type f 2>/dev/null | wc -l)"
|
|
||||||
|
|
||||||
if [ "$unread" -eq "0" ]; then
|
|
||||||
unread=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
pidof mbsync >/dev/null 2>&1 && icon="🔃"
|
|
||||||
|
|
||||||
[ "$unread" = "" ] && [ "$icon" = "" ] || echo "📬$unread$icon"
|
|
@ -1,8 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
case $BLOCK_BUTTON in
|
|
||||||
1) notify-send "🧠 Memory hogs" "$(ps axch -o cmd:15,%mem --sort=-%mem | head)" ;;
|
|
||||||
3) setsid -f "$TERMINAL" -e htop ;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
free --mebi | sed -n '2{p;q}' | awk '{printf ("🧠%2.2fGiB/%2.2fGiB\n", ( $3 / 1024), ($2 / 1024))}'
|
|
@ -1,24 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
# Prints the current volume or nothing if muted.
|
|
||||||
|
|
||||||
case $BLOCK_BUTTON in
|
|
||||||
1) setsid -f "$TERMINAL" -e pulsemixer ;;
|
|
||||||
2) pamixer -t ;;
|
|
||||||
9) pamixer --allow-boost -i 1 ;;
|
|
||||||
8) pamixer --allow-boost -d 1 ;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
source=$(pamixer --list-sources | grep Yeti | awk '{print $1}')
|
|
||||||
|
|
||||||
if [ -n "$source" ]; then
|
|
||||||
vol="$(pamixer --source "$source" --get-volume)"
|
|
||||||
|
|
||||||
if [ "$vol" -gt "0" ]; then
|
|
||||||
icon="🎤"
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "$icon"
|
|
||||||
else
|
|
||||||
echo ""
|
|
||||||
fi
|
|
@ -1,21 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
player_status=$(playerctl status 2>/dev/null)
|
|
||||||
|
|
||||||
if [ "$player_status" = "Playing" ]; then
|
|
||||||
echo "⏯$(playerctl metadata artist) - $(playerctl metadata title)"
|
|
||||||
elif [ "$player_status" = "Paused" ]; then
|
|
||||||
echo "⏸ $(playerctl metadata artist) - $(playerctl metadata title)"
|
|
||||||
fi
|
|
||||||
|
|
||||||
case $BLOCK_BUTTON in
|
|
||||||
1)
|
|
||||||
playerctl previous
|
|
||||||
;;
|
|
||||||
2)
|
|
||||||
playerctl play-pause
|
|
||||||
;;
|
|
||||||
3)
|
|
||||||
playerctl next
|
|
||||||
;;
|
|
||||||
esac
|
|
@ -1,26 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
# Module showing network traffic. Shows how much data has been received (RX) or
|
|
||||||
# transmitted (TX) since the previous time this script ran. So if run every
|
|
||||||
# second, gives network traffic per second.
|
|
||||||
|
|
||||||
case $BLOCK_BUTTON in
|
|
||||||
1) setsid -f "$TERMINAL" -e bmon ;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
update() {
|
|
||||||
sum=0
|
|
||||||
for arg; do
|
|
||||||
read -r i <"$arg"
|
|
||||||
sum=$((sum + i))
|
|
||||||
done
|
|
||||||
cache=${XDG_CACHE_HOME:-$HOME/.cache}/${1##*/}
|
|
||||||
[ -f "$cache" ] && read -r old <"$cache" || old=0
|
|
||||||
printf %d\\n "$sum" >"$cache"
|
|
||||||
printf %d\\n $((sum - old))
|
|
||||||
}
|
|
||||||
|
|
||||||
rx=$(update /sys/class/net/[ew]*/statistics/rx_bytes)
|
|
||||||
tx=$(update /sys/class/net/[ew]*/statistics/tx_bytes)
|
|
||||||
|
|
||||||
printf "🔻%4sB 🔺%4sB\\n" $(numfmt --to=iec $rx) $(numfmt --to=iec $tx)
|
|
@ -1,17 +0,0 @@
|
|||||||
#!/usr/bin/env sh
|
|
||||||
|
|
||||||
password=$(getpassword rss)
|
|
||||||
session_id=$(curl -s -d '{"op":"login","user":"alrayyes","password":"'"$password"'"}' "https://rss.higherlearning.eu/api/" | jq -r ".content.session_id")
|
|
||||||
count=$(curl -s -d '{"sid":"'$session_id'","op":"getUnread","feed_id":"0","is_cat":"1"}' "https://rss.higherlearning.eu/api/" | jq -r ".content.unread")
|
|
||||||
|
|
||||||
case $BLOCK_BUTTON in
|
|
||||||
1) setsid "$TERMINAL" -e newsboat ;;
|
|
||||||
2) setsid -f newsup exit >/dev/null ;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
output=""
|
|
||||||
if [ "$count" -gt 0 ]; then
|
|
||||||
output="📰$count"
|
|
||||||
fi
|
|
||||||
|
|
||||||
cat /tmp/newsupdate 2>/dev/null || echo "$output""$(cat "${XDG_CONFIG_HOME:-$HOME/.config}"/newsboat/.update 2>/dev/null)"
|
|
@ -1,17 +0,0 @@
|
|||||||
#!/usr/bin/env sh
|
|
||||||
|
|
||||||
password=$(getpassword rss)
|
|
||||||
session_id=$(curl -s -d '{"op":"login","user":"alrayyes","password":"'"$password"'"}' "https://rss.higherlearning.eu/api/" | jq -r ".content.session_id")
|
|
||||||
count=$(curl -s -d '{"sid":"'$session_id'","op":"getUnread","feed_id":"10","is_cat":"1"}' "https://rss.higherlearning.eu/api/" | jq -r ".content.unread")
|
|
||||||
|
|
||||||
case $BLOCK_BUTTON in
|
|
||||||
1) setsid "$TERMINAL" -e podboat ;;
|
|
||||||
2) setsid -f newsup exit >/dev/null ;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
output=""
|
|
||||||
if [ "$count" -gt 0 ]; then
|
|
||||||
output="📻$count"
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "$output""$(cat "${XDG_CONFIG_HOME:-$HOME/.config}"/newsboat/.update 2>/dev/null)"
|
|
@ -1,16 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
case $BLOCK_BUTTON in
|
|
||||||
1) "$BROWSER" --new-tab https://www.reddit.com ;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
URL="https://www.reddit.com/message/unread/.json?feed=bc32fdcb4a67282ee7cac839c0a52083aadc79f0&user=alrayyes"
|
|
||||||
USERAGENT="polybar-scripts/notification-reddit:v1.0 u/reddituser"
|
|
||||||
|
|
||||||
notifications=$(curl -sf --user-agent "$USERAGENT" "$URL" | jq '.["data"]["children"] | length')
|
|
||||||
|
|
||||||
if [ -n "$notifications" ] && [ "$notifications" -gt 0 ]; then
|
|
||||||
echo "👾$notifications"
|
|
||||||
else
|
|
||||||
echo ""
|
|
||||||
fi
|
|
@ -1,3 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
echo "║"
|
|
@ -1,14 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
case $BLOCK_BUTTON in
|
|
||||||
1) "$BROWSER" --new-tab https://track.toggl.com/timer ;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
token=$(getpassword toggl)
|
|
||||||
current="$(curl --silent -u "$token":api_token "https://api.track.toggl.com/api/v8/time_entries/current" | jq '.data.description' | sed 's/"//g')"
|
|
||||||
|
|
||||||
if [ "$current" != "null" ]; then
|
|
||||||
echo "⏲ $current"
|
|
||||||
else
|
|
||||||
echo ""
|
|
||||||
fi
|
|
@ -1,6 +0,0 @@
|
|||||||
#!/usr/bin/env sh
|
|
||||||
|
|
||||||
yay
|
|
||||||
sudo pacman -Rs $(pacman -Qtdq)
|
|
||||||
pacrmorphans
|
|
||||||
pkill -RTMIN+9 "${STATUSBAR:-dwmblocks}"
|
|
@ -1,25 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
case $BLOCK_BUTTON in
|
|
||||||
1) "$TERMINAL" -e ~/.local/bin/statusbar/update-arch ;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
if ! updates_arch=$(checkupdates 2>/dev/null | wc -l); then
|
|
||||||
updates_arch=0
|
|
||||||
fi
|
|
||||||
|
|
||||||
if ! updates_aur=$(yay -Qum 2>/dev/null | wc -l); then
|
|
||||||
# if ! updates_aur=$(cower -u 2> /dev/null | wc -l); then
|
|
||||||
# if ! updates_aur=$(trizen -Su --aur --quiet | wc -l); then
|
|
||||||
# if ! updates_aur=$(pikaur -Qua 2> /dev/null | wc -l); then
|
|
||||||
# if ! updates_aur=$(rua upgrade --printonly 2> /dev/null | wc -l); then
|
|
||||||
updates_aur=0
|
|
||||||
fi
|
|
||||||
|
|
||||||
updates=$(("$updates_arch" + "$updates_aur"))
|
|
||||||
|
|
||||||
if [ "$updates" -gt 0 ]; then
|
|
||||||
echo "📦$updates"
|
|
||||||
else
|
|
||||||
echo ""
|
|
||||||
fi
|
|
@ -1,90 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
usb_print() {
|
|
||||||
devices=$(lsblk -Jplno NAME,TYPE,RM,SIZE,MOUNTPOINT,VENDOR)
|
|
||||||
output=""
|
|
||||||
counter=0
|
|
||||||
|
|
||||||
for unmounted in $(echo "$devices" | jq -r '.blockdevices[] | select(.type == "part") | select(.rm == true) | select(.mountpoint == null) | .name'); do
|
|
||||||
unmounted=$(echo "$unmounted" | tr -d "[:digit:]")
|
|
||||||
unmounted=$(echo "$devices" | jq -r '.blockdevices[] | select(.name == "'"$unmounted"'") | .vendor')
|
|
||||||
unmounted=$(echo "$unmounted" | tr -d ' ')
|
|
||||||
|
|
||||||
if [ $counter -eq 0 ]; then
|
|
||||||
space=""
|
|
||||||
else
|
|
||||||
space=" "
|
|
||||||
fi
|
|
||||||
counter=$((counter + 1))
|
|
||||||
|
|
||||||
output="$output$space $unmounted"
|
|
||||||
done
|
|
||||||
|
|
||||||
for mounted in $(echo "$devices" | jq -r '.blockdevices[] | select(.type == "part") | select(.rm == true) | select(.mountpoint != null) | .size'); do
|
|
||||||
if [ $counter -eq 0 ]; then
|
|
||||||
space=""
|
|
||||||
else
|
|
||||||
space=" "
|
|
||||||
fi
|
|
||||||
counter=$((counter + 1))
|
|
||||||
|
|
||||||
output="$output$space $mounted"
|
|
||||||
done
|
|
||||||
|
|
||||||
if [ "$output" ]; then
|
|
||||||
notify-send.py "USB" "$output" \
|
|
||||||
-i drive-removable-media-usb \
|
|
||||||
--replaces-process "usb-mount" &
|
|
||||||
fi
|
|
||||||
echo "$output"
|
|
||||||
}
|
|
||||||
|
|
||||||
usb_update() {
|
|
||||||
pid=$(cat "$path_pid")
|
|
||||||
|
|
||||||
if [ "$pid" != "" ]; then
|
|
||||||
kill -10 "$pid"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
path_pid="/tmp/polybar-system-usb-udev.pid"
|
|
||||||
|
|
||||||
case "$1" in
|
|
||||||
--update)
|
|
||||||
usb_update
|
|
||||||
;;
|
|
||||||
--mount)
|
|
||||||
devices=$(lsblk -Jplno NAME,TYPE,RM,MOUNTPOINT)
|
|
||||||
|
|
||||||
for mount in $(echo "$devices" | jq -r '.blockdevices[] | select(.type == "part") | select(.rm == true) | select(.mountpoint == null) | .name'); do
|
|
||||||
mountpoint=$(udisksctl mount --no-user-interaction -b "$mount")
|
|
||||||
mountpoint=$(echo "$mountpoint" | cut -d " " -f 4 | tr -d ".")
|
|
||||||
alacritty --class lf,lf -e lf "$mountpoint" &
|
|
||||||
done
|
|
||||||
|
|
||||||
usb_update
|
|
||||||
;;
|
|
||||||
--unmount)
|
|
||||||
devices=$(lsblk -Jplno NAME,TYPE,RM,MOUNTPOINT)
|
|
||||||
|
|
||||||
for unmount in $(echo "$devices" | jq -r '.blockdevices[] | select(.type == "part") | select(.rm == true) | select(.mountpoint != null) | .name'); do
|
|
||||||
udisksctl unmount --no-user-interaction -b "$unmount"
|
|
||||||
udisksctl power-off --no-user-interaction -b "$unmount"
|
|
||||||
done
|
|
||||||
|
|
||||||
usb_update
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
echo $$ >$path_pid
|
|
||||||
|
|
||||||
trap exit INT
|
|
||||||
trap "echo" USR1
|
|
||||||
|
|
||||||
while true; do
|
|
||||||
usb_print
|
|
||||||
|
|
||||||
sleep 60 &
|
|
||||||
wait
|
|
||||||
done
|
|
||||||
;;
|
|
||||||
esac
|
|
@ -1,24 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
# Prints the current volume or 🔇 if muted.
|
|
||||||
|
|
||||||
case $BLOCK_BUTTON in
|
|
||||||
1) setsid -f "$TERMINAL" -e pulsemixer ;;
|
|
||||||
2) pamixer -t ;;
|
|
||||||
9) pamixer --allow-boost -i 1 ;;
|
|
||||||
8) pamixer --allow-boost -d 1 ;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
[ $(pamixer --get-mute) = true ] && echo 🔇 && exit
|
|
||||||
|
|
||||||
vol="$(pamixer --get-volume)"
|
|
||||||
|
|
||||||
if [ "$vol" -gt "70" ]; then
|
|
||||||
icon="🔊"
|
|
||||||
elif [ "$vol" -lt "30" ]; then
|
|
||||||
icon="🔈"
|
|
||||||
else
|
|
||||||
icon="🔉"
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "$icon$vol%"
|
|
@ -1,32 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
check_vpn() {
|
|
||||||
status="$(nmcli device status | grep -c "$1")"
|
|
||||||
|
|
||||||
if [ "$status" -gt "0" ]; then
|
|
||||||
icon=💂
|
|
||||||
if [ "$1" = "tun0" ]; then
|
|
||||||
icon=🔒
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "$icon$1"
|
|
||||||
fi
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
if [ -n "$1" ]; then
|
|
||||||
case $BLOCK_BUTTON in
|
|
||||||
1) case $1 in
|
|
||||||
"wg-0")
|
|
||||||
wg-quick down "$1"
|
|
||||||
notify-send -a wireguard --replaces-process wireguard-status-"$1" -i network-vpn-offline-symbolic "Wireguard $1" "Connection down" &
|
|
||||||
;;
|
|
||||||
"wg-1")
|
|
||||||
wg-quick down "$1"
|
|
||||||
notify-send -a wireguard --replaces-process wireguard-status-"$1" -i network-vpn-offline-symbolic "Wireguard $1" "Connection down" &
|
|
||||||
;;
|
|
||||||
esac ;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
check_vpn "$1"
|
|
||||||
fi
|
|
@ -1,7 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
case $BLOCK_BUTTON in
|
|
||||||
1) notify-send "Weather" "$(curl -4 https://wttr.in/Amsterdam?T)" ;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
curl --silent "https://wttr.in/Amsterdam?format=2" | sed 's/️//g'
|
|
@ -64,11 +64,11 @@ Print
|
|||||||
|
|
||||||
#-----------------------------------------------------------App shortcuts--------------------------------------------------------------
|
#-----------------------------------------------------------App shortcuts--------------------------------------------------------------
|
||||||
# terminal emulator
|
# terminal emulator
|
||||||
super + BackSpace
|
super + Return
|
||||||
st
|
st
|
||||||
|
|
||||||
# program launcher
|
# program launcher
|
||||||
super + Delete
|
super + @space
|
||||||
dmenu-frecency
|
dmenu-frecency
|
||||||
|
|
||||||
# make sxhkd reload its configuration files:
|
# make sxhkd reload its configuration files:
|
||||||
@ -86,98 +86,3 @@ super + ctrl + alt + {m}
|
|||||||
~/.local/bin/dmenuunicode
|
~/.local/bin/dmenuunicode
|
||||||
super + ctrl + alt + {w}
|
super + ctrl + alt + {w}
|
||||||
alacritty --class fullscreen,fullscreen -e ~/.config/polybar/bin/wttr-and-wait
|
alacritty --class fullscreen,fullscreen -e ~/.config/polybar/bin/wttr-and-wait
|
||||||
|
|
||||||
#-----------------------------------------------------------Bspwm--------------------------------------------------------------
|
|
||||||
# quit/restart bspwm
|
|
||||||
super + alt + {q,r}
|
|
||||||
bspc {quit,wm -r}
|
|
||||||
|
|
||||||
# close and kill
|
|
||||||
super + {_,shift + }w
|
|
||||||
bspc node -{c,k}
|
|
||||||
|
|
||||||
# alternate between the tiled and monocle layout
|
|
||||||
super + m
|
|
||||||
bspc desktop -l next
|
|
||||||
|
|
||||||
# send the newest marked node to the newest preselected node
|
|
||||||
super + y
|
|
||||||
bspc node newest.marked.local -n newest.!automatic.local
|
|
||||||
|
|
||||||
# swap the current node and the biggest node
|
|
||||||
super + g
|
|
||||||
bspc node -s biggest
|
|
||||||
|
|
||||||
# set the window state
|
|
||||||
super + {t,shift + t,s,f}
|
|
||||||
bspc node -t {tiled,pseudo_tiled,floating,fullscreen}
|
|
||||||
|
|
||||||
# set the node flags
|
|
||||||
super + ctrl + {m,x,y,z}
|
|
||||||
bspc node -g {marked,locked,sticky,private}
|
|
||||||
|
|
||||||
# focus the node in the given direction
|
|
||||||
super + {_,shift + }{h,j,k,l}
|
|
||||||
bspc node -{f,s} {west,south,north,east}
|
|
||||||
|
|
||||||
# focus the node for the given path jump
|
|
||||||
super + {p,b,comma,period}
|
|
||||||
bspc node -f @{parent,brother,first,second}
|
|
||||||
|
|
||||||
# focus the next/previous node in the current desktop
|
|
||||||
super + {_,shift + }c
|
|
||||||
bspc node -f {next,prev}.local
|
|
||||||
|
|
||||||
# focus the next/previous desktop in the current monitor
|
|
||||||
super + bracket{left,right}
|
|
||||||
bspc desktop -f {prev,next}.local
|
|
||||||
|
|
||||||
# focus the last node/desktop
|
|
||||||
super + {grave,Tab}
|
|
||||||
bspc {node,desktop} -f last
|
|
||||||
|
|
||||||
# focus the older or newer node in the focus history
|
|
||||||
super + {o,i}
|
|
||||||
bspc wm -h off; \
|
|
||||||
bspc node {older,newer} -f; \
|
|
||||||
bspc wm -h on
|
|
||||||
|
|
||||||
# focus or send to the given desktop
|
|
||||||
super + {_,shift + }{1-9,0}
|
|
||||||
bspc {desktop -f,node -d} '^{1-9,10}'
|
|
||||||
|
|
||||||
# preselect the direction
|
|
||||||
super + ctrl + {h,j,k,l}
|
|
||||||
bspc node -p {west,south,north,east}
|
|
||||||
|
|
||||||
# preselect the ratio
|
|
||||||
super + ctrl + {1-9}
|
|
||||||
bspc node -o 0.{1-9}
|
|
||||||
|
|
||||||
# cancel the preselection for the focused node
|
|
||||||
super + ctrl + space
|
|
||||||
bspc node -p cancel
|
|
||||||
|
|
||||||
# cancel the preselection for the focused desktop
|
|
||||||
super + ctrl + shift + space
|
|
||||||
bspc query -N -d | xargs -I id -n 1 bspc node id -p cancel
|
|
||||||
|
|
||||||
# expand a window by moving one of its side outward
|
|
||||||
super + alt + {h,j,k,l}
|
|
||||||
bspc node -z {left -20 0,bottom 0 20,top 0 -20,right 20 0}
|
|
||||||
|
|
||||||
# contract a window by moving one of its side inward
|
|
||||||
super + alt + shift + {h,j,k,l}
|
|
||||||
bspc node -z {right -20 0,top 0 20,bottom 0 -20,left 20 0}
|
|
||||||
|
|
||||||
# move a floating window
|
|
||||||
super + {Left,Down,Up,Right}
|
|
||||||
bspc node -v {-20 0,0 20,0 -20,20 0}
|
|
||||||
|
|
||||||
# Swap nodes the tree from the current nodes parent
|
|
||||||
super + control + {Up, Down}
|
|
||||||
bspc node @parent -C {forward, backward}
|
|
||||||
|
|
||||||
# Rotate the tree from the current nodes parent
|
|
||||||
super + control + {Right, Left}
|
|
||||||
bspc node @parent --rotate {90,270}
|
|
||||||
|
59
yarn.lock
59
yarn.lock
@ -1,59 +0,0 @@
|
|||||||
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
|
|
||||||
# yarn lockfile v1
|
|
||||||
|
|
||||||
|
|
||||||
"@commitlint/config-conventional@^12.0.1":
|
|
||||||
version "12.0.1"
|
|
||||||
resolved "https://registry.yarnpkg.com/@commitlint/config-conventional/-/config-conventional-12.0.1.tgz#7bf3bbf68bda967c5165135ebe8f2055decf1a83"
|
|
||||||
integrity sha512-1ZhB135lh47zVmf1orwcjxuKuam11fJIH/bdVxW9XiQv8XPwC6iIp19knfl8FcOT78AVBnes1z6EVxgUeP2/4Q==
|
|
||||||
dependencies:
|
|
||||||
conventional-changelog-conventionalcommits "^4.3.1"
|
|
||||||
|
|
||||||
array-ify@^1.0.0:
|
|
||||||
version "1.0.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/array-ify/-/array-ify-1.0.0.tgz#9e528762b4a9066ad163a6962a364418e9626ece"
|
|
||||||
integrity sha1-nlKHYrSpBmrRY6aWKjZEGOlibs4=
|
|
||||||
|
|
||||||
compare-func@^2.0.0:
|
|
||||||
version "2.0.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/compare-func/-/compare-func-2.0.0.tgz#fb65e75edbddfd2e568554e8b5b05fff7a51fcb3"
|
|
||||||
integrity sha512-zHig5N+tPWARooBnb0Zx1MFcdfpyJrfTJ3Y5L+IFvUm8rM74hHz66z0gw0x4tijh5CorKkKUCnW82R2vmpeCRA==
|
|
||||||
dependencies:
|
|
||||||
array-ify "^1.0.0"
|
|
||||||
dot-prop "^5.1.0"
|
|
||||||
|
|
||||||
conventional-changelog-conventionalcommits@^4.3.1:
|
|
||||||
version "4.5.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/conventional-changelog-conventionalcommits/-/conventional-changelog-conventionalcommits-4.5.0.tgz#a02e0b06d11d342fdc0f00c91d78265ed0bc0a62"
|
|
||||||
integrity sha512-buge9xDvjjOxJlyxUnar/+6i/aVEVGA7EEh4OafBCXPlLUQPGbRUBhBUveWRxzvR8TEjhKEP4BdepnpG2FSZXw==
|
|
||||||
dependencies:
|
|
||||||
compare-func "^2.0.0"
|
|
||||||
lodash "^4.17.15"
|
|
||||||
q "^1.5.1"
|
|
||||||
|
|
||||||
dot-prop@^5.1.0:
|
|
||||||
version "5.3.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/dot-prop/-/dot-prop-5.3.0.tgz#90ccce708cd9cd82cc4dc8c3ddd9abdd55b20e88"
|
|
||||||
integrity sha512-QM8q3zDe58hqUqjraQOmzZ1LIH9SWQJTlEKCH4kJ2oQvLZk7RbQXvtDM2XEq3fwkV9CCvvH4LA0AV+ogFsBM2Q==
|
|
||||||
dependencies:
|
|
||||||
is-obj "^2.0.0"
|
|
||||||
|
|
||||||
husky@^5.1.3:
|
|
||||||
version "5.1.3"
|
|
||||||
resolved "https://registry.yarnpkg.com/husky/-/husky-5.1.3.tgz#1a0645a4fe3ffc006c4d0d8bd0bcb4c98787cc9d"
|
|
||||||
integrity sha512-fbNJ+Gz5wx2LIBtMweJNY1D7Uc8p1XERi5KNRMccwfQA+rXlxWNSdUxswo0gT8XqxywTIw7Ywm/F4v/O35RdMg==
|
|
||||||
|
|
||||||
is-obj@^2.0.0:
|
|
||||||
version "2.0.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/is-obj/-/is-obj-2.0.0.tgz#473fb05d973705e3fd9620545018ca8e22ef4982"
|
|
||||||
integrity sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w==
|
|
||||||
|
|
||||||
lodash@^4.17.15:
|
|
||||||
version "4.17.21"
|
|
||||||
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c"
|
|
||||||
integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==
|
|
||||||
|
|
||||||
q@^1.5.1:
|
|
||||||
version "1.5.1"
|
|
||||||
resolved "https://registry.yarnpkg.com/q/-/q-1.5.1.tgz#7e32f75b41381291d04611f1bf14109ac00651d7"
|
|
||||||
integrity sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc=
|
|
12
zsh/.zshenv
12
zsh/.zshenv
@ -18,14 +18,18 @@ path_if_exists ~/.local/share/cargo/bin
|
|||||||
export GPG_TTY="$(tty)"
|
export GPG_TTY="$(tty)"
|
||||||
|
|
||||||
# Set default browser
|
# Set default browser
|
||||||
if [ -e "/sbin/brave" ]; then
|
if [ -e "/usr/bin/brave" ]; then
|
||||||
export BROWSER="brave"
|
export BROWSER="brave"
|
||||||
elif [ -e "/sbin/firefox" ]; then
|
else
|
||||||
export BROWSER="firefox"
|
if [ -e "/usr/bin/firefox" ]; then
|
||||||
|
export BROWSER="firefox"
|
||||||
|
elif [ -e "/usr/bin/iceweasel" ]; then
|
||||||
|
export BROWSER="iceweasel"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Set default terminal
|
# Set default terminal
|
||||||
export TERMINAL="st"
|
export TERMINAL="alacritty"
|
||||||
|
|
||||||
# pkg editor
|
# pkg editor
|
||||||
export VISUAL="nvim"
|
export VISUAL="nvim"
|
||||||
|
Loading…
Reference in New Issue
Block a user