Update css/js + few configs
This commit is contained in:
97
polybar.org
97
polybar.org
@@ -1,25 +1,8 @@
|
||||
#+TITLE: Polybar Configuration
|
||||
:DRAWER:
|
||||
#+STARTUP: overview
|
||||
|
||||
#+LANGUAGE: en
|
||||
#+EMAIL: dehaeze.thomas@gmail.com
|
||||
#+AUTHOR: Dehaeze Thomas
|
||||
|
||||
#+HTML_LINK_HOME: ./index.html
|
||||
#+HTML_LINK_UP: ./index.html
|
||||
|
||||
#+HTML_HEAD: <link rel="stylesheet" type="text/css" href="./css/htmlize.css"/>
|
||||
#+HTML_HEAD: <link rel="stylesheet" type="text/css" href="./css/readtheorg.css"/>
|
||||
#+HTML_HEAD: <script type="text/javascript" src="./js/jquery.min.js"></script>
|
||||
#+HTML_HEAD: <script type="text/javascript" src="./js/bootstrap.min.js"></script>
|
||||
#+HTML_HEAD: <script type="text/javascript" src="./js/jquery.stickytableheaders.min.js"></script>
|
||||
#+HTML_HEAD: <script type="text/javascript" src="./js/readtheorg.js"></script>
|
||||
|
||||
#+SETUPFILE: ./setup/org-setup-file.org
|
||||
#+PROPERTY: header-args :comments no
|
||||
#+PROPERTY: header-args+ :mkdirp yes
|
||||
#+PROPERTY: header-args+ :tangle ~/.config/polybar/config
|
||||
:END:
|
||||
|
||||
* Colors
|
||||
#+begin_src conf
|
||||
@@ -80,7 +63,7 @@
|
||||
|
||||
modules-left = i3 bspwm xwindow
|
||||
modules-center =
|
||||
modules-right = pulseaudio wired-network wireless-network wireguard nordvpn bluetooth redshift lockscreen dunst packages unread_news unread_mail calendar temperature battery date
|
||||
modules-right = pulseaudio wired-network wireless-network nordvpn bluetooth redshift lockscreen dunst packages unread_news unread_mail calendar temperature battery date
|
||||
|
||||
wm-restack = i3
|
||||
|
||||
@@ -564,7 +547,7 @@
|
||||
type = custom/script
|
||||
|
||||
format-underline = ${colors.bg}
|
||||
click-left = ~/.config/polybar/scripts/nordvpn-toggle.sh >/dev/null 2>%1 &
|
||||
click-left = ~/.local/bin/nordvpn-toggle >/dev/null 2>%1 &
|
||||
format = <label>
|
||||
exec = ~/.config/polybar/scripts/nordvpn-status.sh
|
||||
interval = 2
|
||||
@@ -588,26 +571,8 @@
|
||||
#+END_SRC
|
||||
|
||||
** Nordvpn Toggle
|
||||
:PROPERTIES:
|
||||
:header-args: :tangle ~/.config/polybar/scripts/nordvpn-toggle.sh
|
||||
:header-args+: :comments both :mkdirp yes
|
||||
:header-args+: :shebang "#!/usr/bin/env bash"
|
||||
:END:
|
||||
#+BEGIN_SRC bash
|
||||
tmpfile="/tmp/vpnstatus";
|
||||
|
||||
if [ -f $tmpfile ] && grep -q "on" $tmpfile; then
|
||||
nordvpn disconnect && \
|
||||
dunstify --replace=23198 "VPN" "Disconnected" && \
|
||||
echo "off" > $tmpfile;
|
||||
else
|
||||
country=`cat ~/.local/data/nordvpn_countries.txt | sed 's/\s*\t\s*/ /g ; s/\s/\n/g ; s/_/ /g ; /^[a-zA-Z]/!d ; s/\(.*\)/\L\1/' | rofi -i -dmenu | sed 's/\s/_/g'`;
|
||||
dunstify --replace=23198 "VPN" "Connecting to $country...";
|
||||
nordvpn connect $country && \
|
||||
dunstify --replace=23198 "VPN" "Connected to $country" && \
|
||||
echo "on" > $tmpfile;
|
||||
fi
|
||||
#+END_SRC
|
||||
The script is accessible [[file:binaries.org::#nordvpn-toggle][here]].
|
||||
|
||||
* Packages
|
||||
#+BEGIN_SRC conf
|
||||
@@ -773,12 +738,12 @@
|
||||
#+begin_src conf
|
||||
[module/wired-network]
|
||||
type = internal/network
|
||||
interface = ens12u2u4u4
|
||||
interface = enp57s0u2u4u4
|
||||
|
||||
label-connected = %{A3:bash ~/.config/polybar/scripts/connection-manager.sh wlp2s0 >/dev/null 2>%1 &:}%{A1:bash ~/.config/polybar/scripts/connection-toggle.sh ens12u2u4u4 >/dev/null 2>%1 &:} %local_ip%%{A}%{A}
|
||||
label-connected = %{A3:bash ~/.config/polybar/scripts/connection-manager.sh >/dev/null 2>%1 &:}%{A1:bash ~/.config/polybar/scripts/connection-toggle.sh enp57s0u2u4u4 >/dev/null 2>%1 &:} %local_ip%%{A}%{A}
|
||||
label-connected-foreground = ${colors.fg}
|
||||
|
||||
label-disconnected = %{A3:bash ~/.config/polybar/scripts/connection-manager.sh wlp2s0 >/dev/null 2>%1 &:}%{A1:bash ~/.config/polybar/scripts/connection-toggle.sh ens12u2u4u4 >/dev/null 2>%1 &:}%{A}%{A}
|
||||
label-disconnected = %{A3:bash ~/.config/polybar/scripts/connection-manager.sh >/dev/null 2>%1 &:}%{A1:bash ~/.config/polybar/scripts/connection-toggle.sh enp57s0u2u4u4 >/dev/null 2>%1 &:}%{A}%{A}
|
||||
label-disconnected-foreground = #777
|
||||
#+end_src
|
||||
|
||||
@@ -790,10 +755,10 @@
|
||||
format-connected = <label-connected>
|
||||
format-disconnected = <label-disconnected>
|
||||
|
||||
label-connected = %{A3:bash ~/.config/polybar/scripts/connection-manager.sh wlp2s0 >/dev/null 2>%1 &:}%{A1:bash ~/.config/polybar/scripts/connection-toggle.sh wlp2s0 >/dev/null 2>%1 &:}直 %essid%%{A}%{A}
|
||||
label-connected = %{A3:bash ~/.config/polybar/scripts/connection-manager.sh >/dev/null 2>%1 &:}%{A1:bash ~/.config/polybar/scripts/connection-toggle.sh wlp2s0 >/dev/null 2>%1 &:}直 %essid%%{A}%{A}
|
||||
label-connected-foreground = ${colors.fg}
|
||||
|
||||
label-disconnected = %{A3:bash ~/.config/polybar/scripts/connection-manager.sh wlp2s0 >/dev/null 2>%1 &:}%{A1:bash ~/.config/polybar/scripts/connection-toggle.sh wlp2s0 >/dev/null 2>%1 &:}直%{A}%{A}
|
||||
label-disconnected = %{A3:bash ~/.config/polybar/scripts/connection-manager.sh >/dev/null 2>%1 &:}%{A1:bash ~/.config/polybar/scripts/connection-toggle.sh wlp2s0 >/dev/null 2>%1 &:}直%{A}%{A}
|
||||
label-disconnected-foreground = #777
|
||||
#+end_src
|
||||
|
||||
@@ -850,7 +815,7 @@
|
||||
interval = 2
|
||||
#+END_SRC
|
||||
|
||||
** Bluetooth Run Manager
|
||||
** =bluetooth-run.sh= - Bluetooth Run Manager
|
||||
:PROPERTIES:
|
||||
:header-args: :tangle ~/.config/polybar/scripts/bluetooth-run.sh
|
||||
:header-args+: :comments both :mkdirp yes
|
||||
@@ -861,7 +826,7 @@
|
||||
blueman-manager && pkill blueman-applet
|
||||
#+end_src
|
||||
|
||||
** Bluetooth Connection Status
|
||||
** =bluetooth-status.sh= - Bluetooth Connection Status
|
||||
:PROPERTIES:
|
||||
:header-args: :tangle ~/.config/polybar/scripts/bluetooth-status.sh
|
||||
:header-args+: :comments both :mkdirp yes
|
||||
@@ -881,7 +846,7 @@
|
||||
fi
|
||||
#+end_src
|
||||
|
||||
** Toggle Bluetooth Connection
|
||||
** =bluetooth-toggle.sh= - Toggle Bluetooth Connection
|
||||
:PROPERTIES:
|
||||
:header-args: :tangle ~/.config/polybar/scripts/bluetooth-toggle.sh
|
||||
:header-args+: :comments both :mkdirp yes
|
||||
@@ -1015,41 +980,3 @@
|
||||
click-left = ~/.local/bin/screenshot >/dev/null 2>%1 &
|
||||
#+END_SRC
|
||||
|
||||
* Scripts
|
||||
** Launch
|
||||
:PROPERTIES:
|
||||
:header-args: :tangle ~/.config/polybar/scripts/launch.sh
|
||||
:header-args+: :comments both :mkdirp yes
|
||||
:header-args+: :shebang "#!/usr/bin/env bash"
|
||||
:END:
|
||||
|
||||
#+begin_src bash
|
||||
# Terminate already running bar instances
|
||||
killall -q polybar
|
||||
|
||||
# Wait until the processes have been shut down
|
||||
while pgrep -u $UID -x polybar >/dev/null; do sleep 1; done
|
||||
|
||||
# Launch Polybar, using default config location ~/.config/polybar/config
|
||||
polybar top >>/tmp/polybar.log 2>&1 &
|
||||
# polybar bottom &
|
||||
|
||||
echo "Polybar launched..."
|
||||
#+end_src
|
||||
|
||||
** Toggle
|
||||
:PROPERTIES:
|
||||
:header-args: :tangle ~/.config/polybar/scripts/toggle.sh
|
||||
:header-args+: :comments both :mkdirp yes
|
||||
:header-args+: :shebang "#!/usr/bin/env bash"
|
||||
:END:
|
||||
|
||||
#+begin_src bash
|
||||
# Usage : toggle.sh top
|
||||
|
||||
pid=$(pgrep -f "polybar $1")
|
||||
|
||||
if [ ! -z "$pid" ]; then
|
||||
polybar-msg -p $pid cmd toggle >/dev/null 2>&1
|
||||
fi
|
||||
#+end_src
|
||||
|
||||
Reference in New Issue
Block a user