From 25b1d0fd0c995bb123ea4e5f53c53f2378b16e08 Mon Sep 17 00:00:00 2001 From: dogeystamp Date: Mon, 29 May 2023 21:21:01 -0400 Subject: [PATCH] mon-on: split off keyboard configs to another script also added xcompose configs --- src/.config/xcompose/emoji | 16 ++++++++++++++++ src/.config/xcompose/emoji.py | 28 ++++++++++++++++++++++++++++ src/.config/xcompose/main | 5 +++++ src/.local/bin/keyboard.sh | 4 ++++ src/.local/bin/mon-on.example | 4 ---- src/.xinitrc | 8 +++++++- 6 files changed, 60 insertions(+), 5 deletions(-) create mode 100644 src/.config/xcompose/emoji create mode 100755 src/.config/xcompose/emoji.py create mode 100644 src/.config/xcompose/main create mode 100755 src/.local/bin/keyboard.sh diff --git a/src/.config/xcompose/emoji b/src/.config/xcompose/emoji new file mode 100644 index 0000000..5c775ec --- /dev/null +++ b/src/.config/xcompose/emoji @@ -0,0 +1,16 @@ +# This file is autogenerated by emoji.py. + +

: "😔" + : "🤡" + : "😎" + : "👍" + : "😭" + : "🐸" + : "😇" + : "✌️" + : "😌" + : "💀" + : "👀" + : "👁️" + : "🤔" + : "👋" diff --git a/src/.config/xcompose/emoji.py b/src/.config/xcompose/emoji.py new file mode 100755 index 0000000..6b5c886 --- /dev/null +++ b/src/.config/xcompose/emoji.py @@ -0,0 +1,28 @@ +#!/usr/bin/env python +# compiles list of emoji into valid xcompose file +# ./emoji.py > emoji + +emoji = """ +😔 pens +🤡 clow +😎 sung +👍 thu +😭 sob +🐸 frog +😇 innoc +✌️ v +😌 reliev +💀 skul +👀 eyes +👁️ eye +🤔 think +👋 wave +""".strip() + +prefix = " " + +print("# This file is autogenerated by emoji.py.\n") +for line in emoji.split("\n"): + sym, name = line.split() + codes = " ".join([f"<{char}>" for char in name]) + print(f"{prefix} {codes} : \"{sym}\"") diff --git a/src/.config/xcompose/main b/src/.config/xcompose/main new file mode 100644 index 0000000..4ef0237 --- /dev/null +++ b/src/.config/xcompose/main @@ -0,0 +1,5 @@ +# include default settings +include "%L" + +# emoji +include "%H/.config/xcompose/emoji" diff --git a/src/.local/bin/keyboard.sh b/src/.local/bin/keyboard.sh new file mode 100755 index 0000000..18373b0 --- /dev/null +++ b/src/.local/bin/keyboard.sh @@ -0,0 +1,4 @@ +#!/bin/sh +# Set keyboard settings +setxkbmap -layout us,ca -variant basic,fr -option 'grp:alts_toggle, caps:swapescape, compose:rctrl' +xset r rate 300 50 diff --git a/src/.local/bin/mon-on.example b/src/.local/bin/mon-on.example index 9661ccd..00ae354 100755 --- a/src/.local/bin/mon-on.example +++ b/src/.local/bin/mon-on.example @@ -10,10 +10,6 @@ xsetwacom set 17 MapToOutput eDP1 xsetwacom set 18 MapToOutput eDP1 xsetwacom set 23 MapToOutput eDP1 -# Set keyboard settings -setxkbmap -layout au,us,ca -variant basic,haw,multi -option 'grp:win_space_toggle, caps:swapescape' -xset r rate 300 50 - # Configure touchpad sensitivity # To change this: diff --git a/src/.xinitrc b/src/.xinitrc index 37120c4..c22f8db 100755 --- a/src/.xinitrc +++ b/src/.xinitrc @@ -10,6 +10,7 @@ fi if [ $SYSTEM_PROFILE = "DEFAULT" ]; then picom & fi +battwatch.sh & xwallpaper --center .config/wall.png # Host specific wallpapers wallpaper @@ -30,7 +31,12 @@ export DBUS_SESSION_BUS_WINDOWID # IME export GTK_IM_MODULE=fcitx export QT_IM_MODULE=fcitx -export XMODIFIERS=@im=fcitx +# for some reason this breaks deadkeys +#export XMODIFIERS=@im=fcitx + +# set up keyboard +keyboard.sh +export XCOMPOSEFILE="$XDG_CONFIG_HOME"/xcompose/main while true; do DATE=$(date +'%H:%M:%S %a %b %d')