1
0
Fork 0

Summarize to i3-session

This commit is contained in:
J. Elfring 2024-11-02 13:39:20 +01:00
parent acf0e6db09
commit 4cd8f5fa80
30 changed files with 4 additions and 142 deletions

View file

@ -44,12 +44,6 @@ C-u: Update (pull, push); C-r: Remove'
test "_$password" = "_" && exit
## Disable clipman
command -v clipctl >/dev/null && clipctl disable
## Copy pass and show otp, exit silently if anything fails
pass show -c "$password"
pass otp "$password" 2>/dev/null || exit 0
## Re-Enable clipman
command -v clipctl >/dev/null && clipctl enable

View file

@ -1,25 +0,0 @@
#!/bin/bash
# Reconnect a Fritz.Box with activated UPnP
oldIp=$(curl -s https://v4.ident.me)
curl "http://fritz.box:49000/igdupnp/control/WANIPConn1" \
-H 'Content-Type: text/xml; charset="utf-8"' \
-H 'SoapAction: urn:schemas-upnp-org:service:WANIPConnection:1#ForceTermination' \
-d '<?xml version="1.0" encoding="utf-8"?>
<s:Envelope
s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" >
<s:Body>
<u:ForceTermination xmlns:u="urn:schemas-upnp-org:service:WANIPConnection:1" />
</s:Body>
</s:Envelope>' \
-s
sleep 5
newIp=$(curl -s https://v4.ident.me)
notify-send "Renew IP" "Old IP: $oldIp\nNew IP: $newIp"

View file

@ -1,22 +0,0 @@
#!/usr/bin/env python3
import http.server as SimpleHTTPServer
import socketserver as SocketServer
import logging
PORT = 8000
class GetHandler(
SimpleHTTPServer.SimpleHTTPRequestHandler
):
def do_GET(self):
logging.error(self.headers)
SimpleHTTPServer.SimpleHTTPRequestHandler.do_GET(self)
Handler = GetHandler
httpd = SocketServer.TCPServer(("", PORT), Handler)
httpd.serve_forever()

View file

@ -0,0 +1,4 @@
#!/bin/bash
killall waybar
waybar &

View file

@ -1,17 +0,0 @@
#!/bin/bash
############################################################################
##
# wddavmaild
#
#
#
## Check for a tmux session with docker fo:wqr root is already running
if tmux has-session -t wdavmaild
then
echo "A wdavmaild session is already running. Attaching."
tmux attach -t wdavmaild
else
echo "Starting a new wdavmaild tmux-session."
tmux new-session -d -s wdavmaild davmail ~/.local/etc/davmail.conf
fi

View file

@ -1,26 +0,0 @@
#!/bin/bash
############################################################################
##
# wdockerd
# Start dockerd inside a tmux session for use in WSL
#
#
## Ask for sudo credentials
sudo --validate
if ! $(sudo --non-interactive /bin/true)
then
echo "We cannot become root with sudo. Exiting."
exit 1
fi
## Check for a tmux session with docker fo:wqr root is already running
if $(sudo --non-interactive bash -c 'tmux has-session -t wdockerd')
then
echo "A wdockerd session is already running. Attaching."
sudo --non-interactive tmux attach -t wdockerd
else
echo "Starting a new dockerd tmux-session."
sudo --non-interactive tmux new-session -d -s wdockerd dockerd
fi

View file

@ -1,46 +0,0 @@
## Start Keyring-Daemon
eval $(/usr/bin/gnome-keyring-daemon --start --components=pkcs11,secrets,ssh)
export SSH_AUTH_SOCK
## Import exports
source ~/.exports
## Setup Keyboard
xmodmap -e 'keycode 49 = Multi_key' # Kanji-key
xmodmap -e 'keycode 132 = grave asciitilde' # grave-key
xmodmap -e 'keycode 29 = z Z z Z' # y-z
xmodmap -e 'keycode 52 = y Y y Y' # z-y
## Setup resources
test -f ~/.local/Xresources && xrdb -merge ~/.local/Xresources
## Setup Screen
test -x ~/.screenlayout/.default && ~/.screenlayout/.default
test -x ~/.fehbg && ~/.fehbg
## Start Keyring-Daemon
eval $(/usr/bin/gnome-keyring-daemon --start --components=pkcs11,secrets,ssh)
export SSH_AUTH_SOCK
## Start Keyring-Daemon
#eval $(/usr/bin/gnome-keyring-daemon --start --components=pkcs11,secrets,ssh)
#export SSH_AUTH_SOCK
## Import exports
source ~/.exports
## Setup Keyboard
xmodmap -e 'keycode 135 = Multi_key' # remaps context-menu-key to Compose
## Setup resources
test -f ~/.local/Xresources && xrdb -merge ~/.local/Xresources
## Setup Screen
test -x ~/.screenlayout/.default && ~/.screenlayout/.default
test -x ~/.fehbg && ~/.fehbg
## Add fonts
xset fp+ /usr/share/fonts/3270