Housekeeping

This commit is contained in:
LordMathis 2019-02-11 17:43:02 +01:00
parent 4fc2bcab0a
commit 3ee70aa4e7
14 changed files with 82 additions and 35 deletions

View File

@ -152,24 +152,32 @@ exec --no-startup-id compton
exec --no-startup-id nextcloud
# Conky
exec --no-startup-id $HOME/bin/startconky.sh
exec --no-startup-id $HOME/bin/startup/start_conky.sh
# Redshift
exec --no-startup-id redshift-gtk
# KeePassXC
exec --no-startup-id $HOME/bin/start_keepassxc.sh
exec --no-startup-id $HOME/bin/startup/start_keepassxc.sh
# Nemo
bindsym $mod+n exec nemo
# Turn on/off internal laptop monitor
bindsym $mod+Shift+s exec $HOME/bin/switch_monitors.sh
# Turn on/off monitors
bindsym $mod+m exec $HOME/bin/xrandr/switch_monitors.sh -i
bindsym $mod+Shift+m exec $HOME/bin/xrandr/switch_monitors.sh -e
# Monitor setup
exec --no-startup-id $HOME/bin/xrandr/monitor_setup.sh single
# Window titlebar
for_window [class="^.*"] border pixel 2
# reload the configuration file
bindsym $mod+Shift+c reload
# restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
bindsym $mod+Shift+r restart
# exit i3 (logs you out of your X session)
bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -b 'Yes, exit i3' 'i3-msg exit'"

View File

@ -45,13 +45,13 @@ padding-right = 2
module-margin-left = 2
module-margin-right = 2
font-0 = Icons:size=10;1
font-0 = FontAwesome:size=10;1
font-1 = siji:pixelsize=10;1
font-2 = Weather Icons:size=10;1
modules-left = i3
modules-left = powermenu i3
modules-center = datetime openweathermap
modules-right = system-usb-udev updates pulseaudio-tail wlan eth xkeyboard battery
modules-right = system-usb-udev updates pulseaudio-tail wlan eth vpn xkeyboard battery
tray-detached = false
tray-position = right
@ -75,7 +75,7 @@ label-indicator-underline = ${colors.secondary}
[module/openweathermap]
type = custom/script
exec = ~/bin/openweathermap-simple.sh
exec = ~/bin/polybar/openweathermap-simple.sh
interval = 600
label-font = 3
@ -148,7 +148,7 @@ interface = wlo1
interval = 3.0
format-connected =  <label-connected>
label-connected = ""
label-connected = " %essid%"
format-disconnected =
@ -175,6 +175,10 @@ label-close-foreground = ${colors.foreground}
label-separator = " / "
label-separator-foreground = ${colors.foreground}
;logout
menu-0-2 = ""
menu-0-2-exec = i3-msg exit
menu-0-2-foreground = ${colors.foreground}
; reboot
menu-0-1 = ""
menu-0-1-exec = systemctl reboot
@ -196,19 +200,25 @@ click-left = gsimplecal
[module/system-usb-udev]
type = custom/script
exec = ~/bin/system-usb-udev.sh
exec = ~/bin/polybar/system-usb-udev.sh
tail = true
click-left = ~/bin/system-usb-udev.sh --mount
click-right = ~/bin/system-usb-udev.sh --unmount
click-left = ~/bin/polybar/system-usb-udev.sh --mount
click-right = ~/bin/polybar/system-usb-udev.sh --unmount
[module/pulseaudio-tail]
type = custom/script
exec = ~/bin/pulseaudio-tail.sh 2> /dev/null
exec = ~/bin/polybar/pulseaudio-tail.sh 2> /dev/null
tail = true
click-right = ~/bin/pulseaudio-tail.sh --show 2> /dev/null
click-left = ~/bin/pulseaudio-tail.sh --mute 2> /dev/null
scroll-up = ~/bin/pulseaudio-tail.sh --up 2> /dev/null
scroll-down = ~/bin/pulseaudio-tail.sh --down 2> /dev/null
click-right = ~/bin/polybar/pulseaudio-tail.sh --show 2> /dev/null
click-left = ~/bin/polybar/pulseaudio-tail.sh --mute 2> /dev/null
scroll-up = ~/bin/polybar/pulseaudio-tail.sh --up 2> /dev/null
scroll-down = ~/bin/polybar/pulseaudio-tail.sh --down 2> /dev/null
[module/vpn]
type = custom/script
exec = ~/bin/polybar/vpn_running.sh
interval = 5
click-left = ~/bin/polybar/vpn_country.sh
[module/updates]
type = custom/script
@ -229,6 +239,11 @@ format-charging-underline = ${colors.secondary}
format-discharging = <label-discharging>
format-discharging-underline = ${colors.alert}
label-full = ""
label-discharging = " %percentage%"
label-charging = " %percentage%"
[global/wm]
margin-top = 5
margin-bottom = 5

1
.profile Normal file
View File

@ -0,0 +1 @@
export TERMINAL=tilix

5
.zshrc
View File

@ -23,3 +23,8 @@ antigen theme gentoo
# Tell Antigen that you're done.
antigen apply
# VTE
if [ $TILIX_ID ] || [ $VTE_VERSION ]; then
source /etc/profile.d/vte.sh
fi

View File

@ -25,7 +25,12 @@ get_icon() {
}
KEY=`secret-tool lookup openweathermap api_key`
CITY=""
BRNO_CZ="3078610"
ZVOLEN_SK="3056459"
CITY=$BRNO_CZ
UNITS="metric"
SYMBOL="°"

View File

@ -15,14 +15,8 @@ volume_mute() {
}
volume_print() {
if pacmd list-sinks | grep active | head -n 1 | grep -q speaker; then
icon=""
elif pacmd list-sinks | grep active | head -n 1 | grep headphones; then
icon=""
else
icon=""
fi
icon=""
muted=$(pamixer --sink $sink --get-mute)
if [ "$muted" = true ]; then

7
bin/polybar/vpn_running.sh Executable file
View File

@ -0,0 +1,7 @@
#!/bin/sh
if [ "$(pgrep openvpn)" ]; then
echo ""
else
echo
fi

View File

@ -1,9 +0,0 @@
#!/bin/bash
intern=eDP-1
extern=HDMI-1
if xrandr --listactivemonitors | grep "$intern"; then
xrandr --output "$intern" --off
else
xrandr --output "$intern" --auto
fi

21
bin/xrandr/switch_monitors.sh Executable file
View File

@ -0,0 +1,21 @@
#!/bin/bash
intern=eDP-1
extern=HDMI-1
case $1 in
"-i")
m=$intern
;;
"-e")
m=$extern
;;
*)
echo "Wrong option"
esac
if xrandr --listactivemonitors | grep "$m"; then
xrandr --output "$m" --off
else
xrandr --output "$m" --auto
fi