Updated
Signed-off-by: Marcin Woźniak <y0rune@aol.com>
This commit is contained in:
parent
64b1011bb7
commit
737bbbf5e9
68
.emacs.d/plugins/flymake-yaml.el
Normal file
68
.emacs.d/plugins/flymake-yaml.el
Normal file
@ -0,0 +1,68 @@
|
||||
;;; flymake-yaml.el --- A flymake handler for YAML
|
||||
|
||||
;; Copyright (C) 2013 Yasuyuki Oka
|
||||
|
||||
;; Author: Yasuyuki Oka <yasuyk@gmail.com>
|
||||
;; Version: 0.0.2
|
||||
;; URL: https://github.com/yasuyk/flymake-yaml
|
||||
;; Package-Requires: ((flymake-easy "0.1"))
|
||||
;; Keywords: yaml
|
||||
|
||||
;; This program is free software; you can redistribute it and/or modify
|
||||
;; it under the terms of the GNU General Public License as published by
|
||||
;; the Free Software Foundation, either version 3 of the License, or
|
||||
;; (at your option) any later version.
|
||||
|
||||
;; This program is distributed in the hope that it will be useful,
|
||||
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
;; GNU General Public License for more details.
|
||||
|
||||
;; You should have received a copy of the GNU General Public License
|
||||
;; along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
;;; Commentary:
|
||||
;;
|
||||
;; Based in part on http://d.hatena.ne.jp/kitokitoki/20120306/p1
|
||||
;;
|
||||
;; Usage:
|
||||
;;
|
||||
;; (require 'flymake-yaml) ;; Not necessary if using ELPA package
|
||||
;; (add-hook 'yaml-mode-hook 'flymake-yaml-load)
|
||||
;;
|
||||
;; Uses flymake-easy, from https://github.com/purcell/flymake-easy
|
||||
|
||||
;;; Code:
|
||||
|
||||
(require 'flymake-easy)
|
||||
|
||||
(defconst flymake-yaml-err-line-patterns
|
||||
;; Syck error message
|
||||
'(("syntax error on line \\([0-9]+\\), col \\([0-9]+\\): `\\(.*\\)'" nil 1 2 3)
|
||||
;; Psych error message
|
||||
(".*: \\(.*\\) at line \\([0-9]+\\) column \\([0-9]+\\)" nil 2 3 1)))
|
||||
|
||||
(defun flymake-yaml-command (filename)
|
||||
"Construct a command that flymake can use to check yaml source.
|
||||
Argument FILENAME
|
||||
YAML file name."
|
||||
(list "ruby" "-ryaml" "-e" "YAML.load(ARGF) rescue warn $!" filename))
|
||||
|
||||
;;;###autoload
|
||||
(defun flymake-yaml-load ()
|
||||
"Configure flymake mode to check the current buffer's YAML syntax."
|
||||
(interactive)
|
||||
(when (eq major-mode 'yaml-mode)
|
||||
(flymake-easy-load 'flymake-yaml-command
|
||||
flymake-yaml-err-line-patterns
|
||||
'tempdir
|
||||
"yml")))
|
||||
|
||||
(provide 'flymake-yaml)
|
||||
|
||||
;; Local Variables:
|
||||
;; coding: utf-8
|
||||
;; eval: (checkdoc-minor-mode 1)
|
||||
;; End:
|
||||
|
||||
;;; flymake-yaml.el ends here
|
142
.gitignore
vendored
142
.gitignore
vendored
@ -1,132 +1,150 @@
|
||||
.plannaplan
|
||||
.config/Microsoft/
|
||||
.config/autostart/
|
||||
.config/keepassxc/
|
||||
.config/mimeapps.list
|
||||
.config/teams/
|
||||
.local/bin/epylint
|
||||
.local/bin/haruhi-dl
|
||||
.local/bin/isort
|
||||
.local/bin/pylint
|
||||
.local/bin/pyreverse
|
||||
.local/bin/symilar
|
||||
.local/bin/wheel
|
||||
.logSynology
|
||||
.vscode/
|
||||
.yarnrc
|
||||
.emacs.d/elpa/
|
||||
.fltk/
|
||||
.local/bin/vpnst
|
||||
.npm/
|
||||
.Xauthority
|
||||
.anthy/
|
||||
.aspell.*
|
||||
.bash_history
|
||||
.bash_logout
|
||||
.bash_profile
|
||||
.bashrc
|
||||
.bitcoin
|
||||
.bundle/
|
||||
.cache/
|
||||
.cargo
|
||||
.cert/
|
||||
.config/*.conf
|
||||
.config/BraveSoftware
|
||||
.config/GIMP/
|
||||
.config/Microsoft/
|
||||
.config/Postman/
|
||||
.config/QtProject.conf
|
||||
.config/VSCodium
|
||||
.config/autostart/
|
||||
.config/cmus
|
||||
.config/configstore
|
||||
.config/dconf
|
||||
.config/discord
|
||||
.config/freerdp
|
||||
.config/fzf
|
||||
.config/gtk-3.0
|
||||
.config/htop
|
||||
.config/ibu
|
||||
.config/keepassxc/
|
||||
.config/mimeapps.list
|
||||
.config/mpv/watch_later/
|
||||
.config/msmtp
|
||||
.config/mutt
|
||||
.config/neofetch/
|
||||
.config/newsboat/urlswork
|
||||
.config/nvim/autoload
|
||||
.config/nvim/plugged
|
||||
.config/pulse
|
||||
.config/QtProject.conf
|
||||
.config/spicy
|
||||
.config/VSCodium
|
||||
.config/cmus
|
||||
.config/dconf
|
||||
.config/fzf
|
||||
.config/htop
|
||||
.config/mutt
|
||||
.config/procps
|
||||
.config/pulse
|
||||
.config/qalculate
|
||||
.config/spicy
|
||||
.config/teams/
|
||||
.config/vpn
|
||||
.config/weatherreport
|
||||
.config/newsboat/urlswork
|
||||
.dbus/
|
||||
.emacs.d/.lsp-session-v1
|
||||
.emacs.d/.mc-lists.el
|
||||
.emacs.d/ac-comphist.dat
|
||||
.emacs.d/auto-save-list/
|
||||
.emacs.d/eclipse.jdt.ls/
|
||||
.emacs.d/elpa/
|
||||
.emacs.d/workspace/
|
||||
.fehbg
|
||||
.fltk/
|
||||
.gem/
|
||||
.ghc/
|
||||
.gitconfig
|
||||
.gkrellm2/data/
|
||||
.gnome/
|
||||
.gnupg/
|
||||
.gtkrc-2.0
|
||||
.history_zsh
|
||||
.icons/
|
||||
.irb_history
|
||||
.irssi/
|
||||
.java/
|
||||
.jd2/
|
||||
.lesshst
|
||||
.local/bin/__pycache__/
|
||||
.local/bin/backupSynology
|
||||
.local/bin/chardetect
|
||||
.local/bin/epylint
|
||||
.local/bin/flask
|
||||
.local/bin/futurize
|
||||
.local/bin/haruhi-dl
|
||||
.local/bin/isort
|
||||
.local/bin/pasteurize
|
||||
.local/bin/pwiz.py
|
||||
.local/bin/pylint
|
||||
.local/bin/pyreverse
|
||||
.local/bin/symilar
|
||||
.local/bin/vpnst
|
||||
.local/bin/wheel
|
||||
.local/include/
|
||||
.local/lib/
|
||||
.local/lib64/
|
||||
.local/share/
|
||||
.logSynology
|
||||
.m2/
|
||||
.mbsyncrc
|
||||
.megaCmd/
|
||||
.minecraft/
|
||||
.mozc/
|
||||
.mozilla/
|
||||
.node_repl_history
|
||||
.notmuch-config
|
||||
.npm/
|
||||
.nv/
|
||||
.nvidia-settings-rc
|
||||
.openoffice/
|
||||
.oracle_jre_usage/
|
||||
.password-store/
|
||||
.pki/
|
||||
.plannaplan
|
||||
.pvpn-cli/
|
||||
.pylint.d/
|
||||
.screenlayout/
|
||||
.solargraph/
|
||||
.sqlite_history
|
||||
.ssh/
|
||||
.sshservers
|
||||
.steam/
|
||||
.steampath
|
||||
.steampid
|
||||
.sts4/
|
||||
.thunderbird/
|
||||
.tig_history
|
||||
.tlauncher/
|
||||
.tooling/
|
||||
.ts3client/
|
||||
.var/
|
||||
.vim/
|
||||
.viminfo
|
||||
.vimspector.log
|
||||
.vnc/
|
||||
.vscode-oss/
|
||||
.vscode-server/
|
||||
.vscode/
|
||||
.w3m/
|
||||
.weechat/
|
||||
.wget-hsts
|
||||
.wine/
|
||||
.zcompdump-Gentoo-5.8
|
||||
.bitcoin
|
||||
.gkrellm2/data/
|
||||
.wmWeatherReports/
|
||||
.local/lib/
|
||||
.mbsyncrc
|
||||
.notmuch-config
|
||||
.password-store/
|
||||
.vnc/
|
||||
go/
|
||||
.yarnrc
|
||||
.zcompdump-Gentoo-5.8
|
||||
Documents
|
||||
Downloads
|
||||
Linux
|
||||
mega
|
||||
MEGA
|
||||
Muzyka
|
||||
Screenshots
|
||||
Wallpapers
|
||||
developer-quiz.txt
|
||||
git/
|
||||
go/
|
||||
ittv-credentials
|
||||
mcserver/
|
||||
mega
|
||||
www
|
||||
.wget-hsts
|
||||
.icons/
|
||||
.gtkrc-2.0
|
||||
.mozc/
|
||||
.emacs.d/ac-comphist.dat
|
||||
.local/bin/chardetect
|
||||
.local/bin/flask
|
||||
.local/include/
|
||||
.config/neofetch/
|
||||
.vimspector.log
|
||||
.tig_history
|
||||
.tooling/
|
||||
.sts4/
|
||||
.solargraph/
|
||||
.screenlayout/
|
||||
.pylint.d/
|
||||
.nvidia-settings-rc
|
||||
.m2/
|
||||
.config/mpv/watch_later/
|
||||
.gem/
|
||||
.config/Postman/
|
||||
.config/GIMP/
|
||||
|
@ -13,14 +13,14 @@ printf "%s%%\\n" "🔊 $vol"
|
||||
}
|
||||
|
||||
print_wifi(){
|
||||
[ "$(stat -c %y "/home/yorune/.config/vpn" 3>/dev/null | egrep -o '[0-9]+\-[0-9]+\-[0-9]+ [0-9]+')" != "$(date '+%Y-%m-%d %H')" ] && sudo /root/.local/bin/protonvpn status | grep -i Status | awk {'print $2'} > "/home/yorune/.config/vpn"
|
||||
#[ "$(stat -c %y "/home/yorune/.config/vpn" 3>/dev/null | egrep -o '[0-9]+\-[0-9]+\-[0-9]+ [0-9]+')" != "$(date '+%Y-%m-%d %H')" ] && sudo /root/.local/bin/protonvpn status | grep -i Status | awk {'print $2'} > "/home/yorune/.config/vpn"
|
||||
|
||||
echo -e "$(cat /sys/class/net/w*/operstate | sed "s/down/❌/;s/up/📶/") $(cat /sys/class/net/e*/operstate | sed "s/down/❌/;s/up/🌐/")"
|
||||
#echo -e "$(cat /sys/class/net/w*/operstate | sed "s/down/❌/;s/up/📶/") $(cat /sys/class/net/e*/operstate | sed "s/down/❌/;s/up/🌐/") $(cat /home/yorune/.config/vpn | sed 's/Connected/🌐/g;s/Disconnected/❌/g')"
|
||||
}
|
||||
|
||||
print_temp(){
|
||||
echo -e "🔥 $(sensors | awk '/Core 0/ {print int($3)"°C"}') +$(sudo nvidia-smi -q -d temperature | grep --color=no -i "GPU Current" |egrep --color=no -o '[0-9]*')°C"
|
||||
echo -e "🔥 $(sensors | awk '/Core 0/ {print int($3)"°C"}') $(sudo nvidia-smi -q -d temperature | grep --color=no -i "GPU Current" |egrep --color=no -o '[0-9]*')°C"
|
||||
}
|
||||
|
||||
print_date(){
|
||||
@ -31,6 +31,35 @@ print_mem(){
|
||||
free --mebi | sed -n '2{p;q}' | awk '{printf ("🧠 %2.2fGiB", ( $3 / 1024) )}'
|
||||
}
|
||||
|
||||
print_music(){
|
||||
# Source: https://github.com/joestandring/dwm-bar
|
||||
# A dwm_bar function that shows the current artist, track, position, duration, and status from cmus
|
||||
# Joe Standring <git@joestandring.com>
|
||||
# GNU GPLv3
|
||||
# Dependencies: cmus
|
||||
|
||||
if ps -C cmus > /dev/null; then
|
||||
ARTIST=$(cmus-remote -Q | grep -a '^tag artist' | awk '{gsub("tag artist ", "");print}')
|
||||
TRACK=$(cmus-remote -Q | grep -a '^tag title' | awk '{gsub("tag title ", "");print}')
|
||||
POSITION=$(cmus-remote -Q | grep -a '^position' | awk '{gsub("position ", "");print}')
|
||||
DURATION=$(cmus-remote -Q | grep -a '^duration' | awk '{gsub("duration ", "");print}')
|
||||
STATUS=$(cmus-remote -Q | grep -a '^status' | awk '{gsub("status ", "");print}')
|
||||
SHUFFLE=$(cmus-remote -Q | grep -a '^set shuffle' | awk '{gsub("set shuffle ", "");print}')
|
||||
|
||||
if [ "$STATUS" = "playing" ]; then
|
||||
STATUS="▶"
|
||||
else
|
||||
STATUS="⏸"
|
||||
fi
|
||||
|
||||
#printf "%s%s %s - %s " "$STATUS" "$ARTIST" "$TRACK"
|
||||
printf "%s" "$STATUS"
|
||||
#printf "%0d:%02d/" $((POSITION%3600/60)) $((POSITION%60))
|
||||
#printf "%0d:%02d" $((DURATION%3600/60)) $((DURATION%60))
|
||||
#printf "%s\n"
|
||||
fi
|
||||
}
|
||||
|
||||
print_battery() {
|
||||
# Find the battery level
|
||||
hash acpi || return 0
|
||||
@ -68,6 +97,6 @@ print_cpu() {
|
||||
|
||||
while true
|
||||
do
|
||||
xsetroot -name "$(print_temp) $(print_mail) $(print_cpu) $(print_mem) $(print_wifi) $(print_battery) $(print_volume) $(print_date)"
|
||||
xsetroot -name "$(print_music) $(print_temp) $(print_mail) $(print_cpu) $(print_mem) $(print_wifi) $(print_battery) $(print_volume) $(print_date)"
|
||||
sleep 2
|
||||
done
|
||||
|
Loading…
Reference in New Issue
Block a user