consolidate and templeate my to files

in order to stop maintainung different files for each operationg system
This commit is contained in:
Philip Henning 2021-09-11 23:45:56 +02:00
parent 7a1e8fda4b
commit c377eb276a
40 changed files with 246 additions and 454 deletions

View file

@ -1,13 +1,14 @@
#! /bin/sh
#
# {{@@ env['dotdrop_warning'] @@}}
# {{@@ header() @@}}
#
# https://wiki.archlinux.org/index.php/GNOME/Keyring
# Launch sxhkd
sxhkd &
# Launch polybar(s)
$HOME/.config/polybar/launch.sh &
{{@@ env['HOME'] @@}}/.config/polybar/launch.sh &
# Set windomanager name to LG3D to get JAVA programs back to work
wmname LG3D

View file

@ -1,11 +1,11 @@
#
# {{@@ env['dotdrop_warning'] @@}}
#
#!/bin/bash
#
# {{@@ header() @@}}
#
# Set lock screen background
lockscreen="$HOME/.config/bspwm/lock.png"
lockscreen="{{@@ env['HOME'] @@}}/.config/bspwm/lock.png"
# Lock all KeePass databases
keepass --lock-all

View file

@ -1,5 +1,5 @@
#
# {{@@ env['dotdrop_warning'] @@}}
# {{@@ header() @@}}
#
# Thank you code_nomad: http://9m.no/ꪯ鵞

View file

@ -1,6 +1,6 @@
;=======================================
;
; {{@@ env['dotdrop_warning'] @@}}
; {{@@ header() @@}}
;
; Polybar configuration for
; Dell XPS 15 9560

View file

@ -1,6 +1,7 @@
#!/usr/bin/env bash
#
# {{@@ env['dotdrop_warning'] @@}}
# {{@@ header() @@}}
#
load=$(uptime | grep -ohe 'load average[s:][: ].*' | sed 's/,//g' | awk '{print $3" "$4" "$5}')

View file

@ -1,6 +1,7 @@
#!/usr/bin/env sh
#
# {{@@ env['dotdrop_warning'] @@}}
# {{@@ header() @@}}
#
# Terminate already running bar instances
@ -13,4 +14,4 @@ while pgrep -u $UID -x polybar >/dev/null; do sleep 1; done
# Launch bar1 and bar2
polybar -r -q 9560-top &
polybar -r -q 9560-bottom &
$HOME/.config/polybar/refresh_bar_usb_nic.sh &
{{@@ env['HOME'] @@}}/.config/polybar/refresh_bar_usb_nic.sh &

View file

@ -1,5 +1,5 @@
;
; {{@@ env['dotdrop_warning'] @@}}
; {{@@ header() @@}}
;
;

View file

@ -1,8 +1,7 @@
#!/bin/bash
#!/usr/bin/env bash
######################
#
# {{@@ env['dotdrop_warning'] @@}}
# {{@@ header() @@}}
#
# This script detects if an USB NIC was connected and reloads the bar
#
@ -11,30 +10,30 @@ while true; do
# Get PID of the bottom bar
pid_bottom_bar=$(ps -x | awk '!/awk/ && /9560-bottom/ {print $1}')
# 1st USB port (right)
if [[ -z $USB_NIC1 ]]; then
if [[ -z ${USB_NIC1} ]]; then
USB_NIC1=$(ip link | awk '!/awk/ && /enp0s20f0u1/ {print $2}' | cut -d":" -f1)
if [[ -n $USB_NIC1 ]]; then
polybar-msg -p $pid_bottom_bar cmd restart
if [[ -n ${USB_NIC1} ]]; then
polybar-msg -p ${pid_bottom_bar} cmd restart
fi
elif [[ -n $USB_NIC1 ]]; then
elif [[ -n ${USB_NIC1} ]]; then
USB_NIC1_CHECK=$(ip link | awk '!/awk/ && /enp0s20f0u1/ {print $2}' | cut -d":" -f1)
if [[ -z $USB_NIC1_CHECK ]]; then
if [[ -z ${USB_NIC1_CHECK} ]]; then
unset USB_NIC1
polybar-msg -p $pid_bottom_bar cmd restart
polybar-msg -p ${pid_bottom_bar} cmd restart
fi
fi
# 2nd USB port (left)
if [[ -z $USB_NIC2 ]]; then
if [[ -z ${USB_NIC2} ]]; then
USB_NIC2=$(ip link | awk '!/awk/ && /enp0s20f0u2/ {print $2}' | cut -d":" -f1)
if [[ -n $USB_NIC2 ]]; then
polybar-msg -p $pid_bottom_bar cmd restart
if [[ -n ${USB_NIC2} ]]; then
polybar-msg -p ${pid_bottom_bar} cmd restart
fi
elif [[ -n $USB_NIC2 ]]; then
elif [[ -n ${USB_NIC2} ]]; then
USB_NIC2_CHECK=$(ip link | awk '!/awk/ && /enp0s20f0u2/ {print $2}' | cut -d":" -f1)
if [[ -z $USB_NIC2_CHECK ]]; then
if [[ -z ${USB_NIC2_CHECK} ]]; then
unset USB_NIC2
polybar-msg -p $pid_bottom_bar cmd restart
polybar-msg -p ${pid_bottom_bar} cmd restart
fi
fi

View file

@ -1,5 +1,5 @@
!
! {{@@ env['dotdrop_warning'] @@}}
! {{@@ header() @@}}
!
! ------------------------------------------------------------------------------

View file

@ -1,5 +1,5 @@
#
# {{@@ env['dotdrop_warning'] @@}}
# {{@@ header() @@}}
#
##

View file

@ -1,5 +1,5 @@
#
# {{@@ env['dotdrop_warning'] @@}}
# {{@@ header() @@}}
#
[Unit]