Install python-nautilus and wl-clipboard
sudo pacman -S python-nautilus wl-clipbard
This script is tested on wayland session.
hidutil property --set ' | |
{ | |
"UserKeyMapping": [{ | |
"HIDKeyboardModifierMappingSrc":0x700000035, | |
"HIDKeyboardModifierMappingDst":0x700000064}, | |
{"HIDKeyboardModifierMappingSrc":0x700000064, | |
"HIDKeyboardModifierMappingDst":0x700000035 | |
}] | |
} | |
' |
import smtplib | |
from email.mime.multipart import MIMEMultipart | |
from email.mime.text import MIMEText | |
gmail = { "host": "smtp.gmail.com", "port": 587 } | |
office365 = { "host": "smtp.office365.com", "port": 587 } | |
outlook = {"host": "smtp-mail.outlook.com", "port": 587 } | |
yahoo = { "host": "smtp.mail.yahoo.com", "port": 587 } | |
# Reset | |
Color_Off='\033[0m' # Text Reset | |
# Regular Colors | |
Black='\033[0;30m' # Black | |
Red='\033[0;31m' # Red | |
Green='\033[0;32m' # Green | |
Yellow='\033[0;33m' # Yellow | |
Blue='\033[0;34m' # Blue | |
Purple='\033[0;35m' # Purple |
#! /bin/bash | |
fstr=$(tput bold) | |
fend=$(tput sgr0) | |
# Check OS version | |
echo "${fstr}System version:${fend}" $(lsb_release -ds) | |
# Check kernel release | |
echo "${fstr}Kernel release:${fend}" $(uname -sr) |
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE fontconfig SYSTEM "fonts.dtd"> | |
<fontconfig> | |
<match> | |
<test name="family"><string>monospace</string></test> | |
<edit name="family" mode="append_last" binding="strong"> | |
<string>Noto Color Emoji</string> | |
</edit> | |
</match> | |
</fontconfig> |
import asyncio | |
loop = asyncio.get_event_loop() | |
async def hello(): | |
await asyncio.sleep(3) | |
print('Hello!') | |
if __name__ == '__main__': | |
loop.run_until_complete(hello()) | |
# save this script in /lib/wan_check.sh | |
# and add | |
# /lib/wan_check.sh & | |
# in /etc/rc.local | |
while true ; do | |
Status=$(ping -q -c 2 -W 1 1.1.1.1 > /dev/null 2>&1 && echo "ok" || echo "FAIL") | |
if [ "$Status" = "ok" ]; then | |
on="green"; off="orange" | |
else |
INSTALL_DIR="/usr/bin/" | |
REPO_NAME="derailed/k9s" | |
VERSION=$(curl -s https://api.github.com/repos/${REPO_NAME}/releases/latest | grep -oP '"tag_name": "\K(.*)(?=")') | |
LINK="https://github.com/${REPO_NAME}/releases/download/${VERSION}/k9s_Linux_x86_64.tar.gz" | |
wget -qO- ${LINK} | sudo tar xvzf - -C ${INSTALL_DIR} k9s |
#!/usr/bin/env bash | |
download_go() { | |
wget "https://dl.google.com/go/${1}.linux-amd64.tar.gz" -P /tmp/go/ | |
sudo tar xf "/tmp/go/${1}.linux-amd64.tar.gz" -C /usr/local/ | |
echo 'export PATH="$PATH:/usr/local/go/bin"' | sudo tee /etc/profile.d/go.sh | |
source /etc/profile.d/go.sh | |
} | |
# main starts here |