BIG reorganisation.

This commit is contained in:
Bartek Stalewski 2023-07-13 17:01:13 +02:00
parent 3be3ccbbea
commit e20e00ef8a
122 changed files with 36 additions and 109 deletions

2
_gui/_scripts/firefox Executable file
View file

@ -0,0 +1,2 @@
#!/bin/sh
[ -n "$1" ] && flatpak run org.mozilla.firefox -P priv "$*" || flatpak run org.mozilla.firefox -P priv

17
_gui/_scripts/sb-battery Executable file
View file

@ -0,0 +1,17 @@
#!/bin/bash
for battery in /sys/class/power_supply/BAT?*; do
# If non-first battery, print a space separator.
[ -n "${capacity+x}" ] && printf " "
# Sets up the status and capacity
case "$(cat "$battery/status")" in
"Full") status="\uf102" ;;
"Discharging") status="\uf078" ;;
"Charging") status="\uf077" ;;
"Not charging") status="\uf444"; exit 0 ;;
"Unknown") status="\uf128" ;;
esac
capacity=$(cat "$battery/capacity")
# Will make a warn variable if discharging and low
[ "$capacity" -le 20 ] && printf "<span size='140%%' background='#770000' foreground='#ffffff'>${status} ${capacity}%%</span>" || printf "${status} ${capacity}%%"
done && exit 0

8
_gui/_scripts/sb-network Executable file
View file

@ -0,0 +1,8 @@
#!/bin/bash
ip a | grep -q wg0 && wg_status="wireguard running " || wg_status=""
case "$(cat /sys/class/net/wlan0/operstate 2>/dev/null)" in
down) printf "${wg_status} no wifi" ;;
up)
[ -n "$(ip address show dev wlan0 | grep 'inet ')" ] && printf "${wg_status}"|| printf "${wg_status}no ip" ;;
esac

38
_gui/_scripts/sb-volume Executable file
View file

@ -0,0 +1,38 @@
#!/bin/bash
key_micmute() {
state=$(pactl get-source-mute @DEFAULT_SOURCE@ | awk -F': ' '{print $2}')
case ${state} in
yes)
echo 0 | doas tee /sys/devices/platform/thinkpad_acpi/leds/platform::micmute/brightness
pactl set-source-mute @DEFAULT_SOURCE@ 0 ;;
no)
echo 1 | doas tee /sys/devices/platform/thinkpad_acpi/leds/platform::micmute/brightness
pactl set-source-mute @DEFAULT_SOURCE@ 1 ;;
esac
}
vol_decrease() {
pactl set-sink-volume @DEFAULT_SINK@ -5%
volume=$(pactl get-sink-volume @DEFAULT_SINK@ | head -n 1 | awk -F' / *' '{print $2}')
notify-send -t 2000 -u low "volume: $volume"
}
vol_increase() {
pactl set-sink-volume @DEFAULT_SINK@ +5%
volume=$(pactl get-sink-volume @DEFAULT_SINK@ | head -n 1 | awk -F' / *' '{print $2}')
notify-send -t 2000 -u low "volume: $volume"
}
if [ $1 ]; then
case $1 in
dec) vol_decrease ;;
inc) vol_increase ;;
key) key_micmute ;;
esac
else
mic=$(pactl get-source-volume @DEFAULT_SOURCE@ | awk -F' / ' '{print $2}' | tr -d '%')
[ $(pactl get-source-mute @DEFAULT_SOURCE@ | awk -F': ' '{print $2}') = yes ] || [ "$mic" -eq 0 ] && micmute="mic muted" || micmute=""
vol=$(pactl get-sink-volume @DEFAULT_SINK@ | awk -F' / ' '{print $2}' | tr -d '%')
[ $(pactl get-sink-mute @DEFAULT_SINK@ | awk -F': ' '{print $2}') = yes ] || [ "$vol" -eq 0 ] && printf "${micmute} audio muted" || printf "$micmute"
fi

65
_gui/_scripts/selector-audio Executable file
View file

@ -0,0 +1,65 @@
#!/bin/sh
div="---"
set_output() {
sel_sink=$(printf "$sinks\\n$div\\nback\\n$div\\nexit" | dmenu -l 20 -c -i -p "select output device")
case "$sel_sink" in
back) show_current ;;
exit) exit ;;
*) pactl set-default-sink $(pactl list sinks | grep -B 1 "$sel_sink" | awk -F': ' '/Name:/ {print $2}') ;;
esac
#kill -46 $(pidof dwmblocks)
show_current
}
set_input() {
sel_source=$(printf "$sources\\n$div\\nbluetooth profile\\n$div\\nback\\n$div\\nexit" | dmenu -l 20 -c -i -p "select input device")
case "$sel_source" in
back) show_current ;;
exit) exit ;;
bluetooth*) set_bt_profile ;;
*) pactl set-default-source "$(pactl list sources | grep -B 1 "$sel_source" | awk -F': ' '/Name:/ {print $2}')" ;;
esac
#kill -46 $(pidof dwmblocks)
show_current
}
set_bt_profile() {
bt_sink=$(pactl list cards | awk -F'"' '/device.name.*bluez/ {print $2}')
[ -z "${bt_sink}" ] &&
{ notify-send -t 2000 -u critical "ﳌ no headphones connected"; exit; }
profile_chosen=$(printf "profile mSBC\\nprofile LDAC\\n$div\\nback\\nexit" | dmenu -l 20 -c -i -p "select bluettoth profile")
case "$profile_chosen" in
back) show_current ;;
exit) exit ;;
profile*mSBC) pactl set-card-profile $bt_sink headset-head-unit-msbc
pactl set-default-source $(pactl list sources short | awk '/bluez_input/ {print $2}') ;;
profile*LDAC) pactl set-card-profile $bt_sink a2dp-sink-ldac ;;
*) show_current ;;
esac
pactl set-default
}
show_current() {
def_snk=$(pactl list | grep -A 1 "Name: $(pactl get-default-sink)\$" | awk -F': ' '/Description: / {print $2}')
def_src=$(pactl list | grep -A 1 "Name: $(pactl get-default-source)\$" | awk -F': ' '/Description: / {print $2}')
chosen=$(printf "output: $def_snk\\ninput: $def_src" | dmenu -l 20 -c -i -p "current audio devices")
if [ "$1" = "no_switch" ]; then
case "$chosen" in
*) notify-send -t 2000 -u critical "婢 no device to switch" ;;
esac
else
case "$chosen" in
output*) set_output ;;
input*) set_input ;;
esac
fi
}
sinks=$(pactl list sinks | awk -F': ' '/Description:/ {print $2}')
sources=$(pactl list sources | grep -v 'Monitor of ' | awk -F': ' '/Description:/ {print $2}')
[ "$(echo "$sinks" | wc -l)" -lt 2 ] &&
{ show_current no_switch; exit; }
show_current

299
_gui/_scripts/selector-bluetooth Executable file
View file

@ -0,0 +1,299 @@
#!/usr/bin/env bash
# __ _ _ _ _ _ _
# _ __ ___ / _(_) | |__ | |_ _ ___| |_ ___ ___ | |_| |__
# | '__/ _ \| |_| |_____| '_ \| | | | |/ _ \ __/ _ \ / _ \| __| '_ \
# | | | (_) | _| |_____| |_) | | |_| | __/ || (_) | (_) | |_| | | |
# |_| \___/|_| |_| |_.__/|_|\__,_|\___|\__\___/ \___/ \__|_| |_|
#
# Author: Nick Clyde (clydedroid)
#
# Constants
div="---"
goback="back"
# Checks if bluetooth controller is powered on
power_on() {
if bluetoothctl show | grep -q "Powered: yes"; then
return 0
else
return 1
fi
}
# Toggles power state
toggle_power() {
if power_on; then
bluetoothctl power off
show_menu
else
if rfkill list bluetooth | grep -q 'blocked: yes'; then
rfkill unblock bluetooth && sleep 3
fi
bluetoothctl power on
show_menu
fi
}
# Checks if controller is scanning for new devices
scan_on() {
if bluetoothctl show | grep -q "Discovering: yes"; then
echo "scan: on"
return 0
else
echo "scan: off"
return 1
fi
}
# Toggles scanning state
toggle_scan() {
if scan_on; then
kill $(pgrep -f "bluetoothctl scan on")
bluetoothctl scan off
show_menu
else
bluetoothctl scan on &
echo "scanning..."
sleep 5
show_menu
fi
}
# Checks if controller is able to pair to devices
pairable_on() {
if bluetoothctl show | grep -q "Pairable: yes"; then
echo "pairable: on"
return 0
else
echo "pairable: off"
return 1
fi
}
# Toggles pairable state
toggle_pairable() {
if pairable_on; then
bluetoothctl pairable off
show_menu
else
bluetoothctl pairable on
show_menu
fi
}
# Checks if controller is discoverable by other devices
discoverable_on() {
if bluetoothctl show | grep -q "Discoverable: yes"; then
echo "discoverable: on"
return 0
else
echo "discoverable: off"
return 1
fi
}
# Toggles discoverable state
toggle_discoverable() {
if discoverable_on; then
bluetoothctl discoverable off
show_menu
else
bluetoothctl discoverable on
show_menu
fi
}
# Checks if a device is connected
device_connected() {
device_info=$(bluetoothctl info "$1")
if echo "$device_info" | grep -q "Connected: yes"; then
return 0
else
return 1
fi
}
# Toggles device connection
toggle_connection() {
if device_connected $1; then
bluetoothctl disconnect $1
device_menu "$device"
else
bluetoothctl connect $1
device_menu "$device"
fi
}
# Checks if a device is paired
device_paired() {
device_info=$(bluetoothctl info "$1")
if echo "$device_info" | grep -q "Paired: yes"; then
echo "paired: yes"
return 0
else
echo "paired: no"
return 1
fi
}
# Toggles device paired state
toggle_paired() {
if device_paired $1; then
bluetoothctl remove $1
device_menu "$device"
else
bluetoothctl pair $1
device_menu "$device"
fi
}
# Checks if a device is trusted
device_trusted() {
device_info=$(bluetoothctl info "$1")
if echo "$device_info" | grep -q "Trusted: yes"; then
echo "trusted: yes"
return 0
else
echo "trusted: no"
return 1
fi
}
# Toggles device connection
toggle_trust() {
if device_trusted $1; then
bluetoothctl untrust $1
device_menu "$device"
else
bluetoothctl trust $1
device_menu "$device"
fi
}
# Prints a short string with the current bluetooth status
# Useful for status bars like polybar, etc.
print_status() {
if power_on; then
printf ''
mapfile -t paired_devices < <(bluetoothctl devices Paired | grep Device | cut -d ' ' -f 2)
counter=0
for device in "${paired_devices[@]}"; do
if device_connected $device; then
device_alias=$(bluetoothctl info $device | grep "Alias" | cut -d ' ' -f 2-)
if [ $counter -gt 0 ]; then
printf ", %s" "$device_alias"
else
printf " %s" "$device_alias"
fi
((counter++))
fi
done
printf "\n"
else
echo ""
fi
}
# A submenu for a specific device that allows connecting, pairing, and trusting
device_menu() {
device=$1
# Get device name and mac address
device_name=$(echo $device | cut -d ' ' -f 3-)
mac=$(echo $device | cut -d ' ' -f 2)
# Build options
if device_connected $mac; then
connected="connected: yes"
else
connected="connected: no"
fi
paired=$(device_paired $mac)
trusted=$(device_trusted $mac)
options="$connected\n$paired\n$trusted\n$div\n$goback\n$div\nexit"
chosen="$(echo -e "$options" | $rofi_command "$device_name")"
# Match chosen option to command
case $chosen in
"" | $div)
echo "no option chosen."
;;
$connected)
toggle_connection $mac
;;
$paired)
toggle_paired $mac
;;
$trusted)
toggle_trust $mac
;;
$goback)
show_menu
;;
esac
}
show_menu() {
# Get menu options
if power_on; then
power="power: on"
# Human-readable names of devices, one per line
# If scan is off, will only list paired devices
devices=$(bluetoothctl devices | grep Device | cut -d ' ' -f 3-)
# Get controller flags
scan=$(scan_on)
pairable=$(pairable_on)
discoverable=$(discoverable_on)
options="$devices\n$div\n$power\n$scan\n$pairable\n$discoverable\nexit"
else
power="power: off"
options="$power\nexit"
fi
chosen="$(echo -e "$options" | $rofi_command "bluetooth")"
# Match chosen option to command
case $chosen in
"" | $div)
echo "No option chosen."
;;
$power)
toggle_power
;;
$scan)
toggle_scan
;;
$discoverable)
toggle_discoverable
;;
$pairable)
toggle_pairable
;;
*)
device=$(bluetoothctl devices | grep "$chosen")
# Open a submenu if a device is selected
if [[ $device ]]; then device_menu "$device"; fi
;;
esac
}
# command to pipe into, can add any options here
rofi_command="dmenu -l 10 -c -i -p"
case "$1" in
--status)
print_status
;;
*)
show_menu
;;
esac

11
_gui/_scripts/selector-chars Executable file
View file

@ -0,0 +1,11 @@
#!/bin/sh
chosen=$(cut -d ';' -f1 $XDG_CONFIG_HOME/qtile/chars/* | dmenu -l 20 -i -p "select character to copy" | sed "s/ .*//")
[ -z "$chosen" ] && exit
if [ -n "$1" ]; then
xdotool type "$chosen"
else
printf "$chosen" | xclip -rmlastnl
notify-send -t 2000 "'$chosen' copied to clipboard" &
fi

View file

@ -0,0 +1,20 @@
output HDMI-A-0
off
output DisplayPort-1
off
output eDP
off
output DisplayPort-0
crtc 1
filter bilinear
mode 3840x2160
pos 0x0
rate 60.00
transform 0.699997,0.000000,0.000000,0.000000,0.699997,0.000000,0.000000,0.000000,1.000000
x-prop-max_bpc 8
x-prop-non_desktop 0
x-prop-scaling_mode None
x-prop-tearfree on
x-prop-underscan off
x-prop-underscan_hborder 0
x-prop-underscan_vborder 0

View file

@ -0,0 +1,2 @@
DisplayPort-0 00ffffffffffff001e6d0777dadb04000c1d0104b53c22789e3e31ae5047ac270c50542108007140818081c0a9c0d1c08100010101014dd000a0f0703e803020650c58542100001a286800a0f0703e800890650c58542100001a000000fd00383d1e8738000a202020202020000000fc004c472048445220344b0a20202001aa0203197144900403012309070783010000e305c000e3060501023a801871382d40582c450058542100001e565e00a0a0a029503020350058542100001a00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000029
eDP 00ffffffffffff0006af3d5700000000001c0104a51f1178022285a5544d9a270e505400000001010101010101010101010101010101b43780a070383e401010350035ae100000180000000f0000000000000000000000000020000000fe0041554f0a202020202020202020000000fe004231343048414e30352e37200a0070

View file

@ -0,0 +1,20 @@
output HDMI-A-0
off
output DisplayPort-0
off
output eDP
off
output DisplayPort-1
crtc 1
filter bilinear
mode 3840x2160
pos 0x0
rate 60.00
transform 0.699997,0.000000,0.000000,0.000000,0.699997,0.000000,0.000000,0.000000,1.000000
x-prop-max_bpc 8
x-prop-non_desktop 0
x-prop-scaling_mode None
x-prop-tearfree on
x-prop-underscan off
x-prop-underscan_hborder 0
x-prop-underscan_vborder 0

View file

@ -0,0 +1,2 @@
DisplayPort-1 00ffffffffffff001e6d0777dadb04000c1d0104b53c22789e3e31ae5047ac270c50542108007140818081c0a9c0d1c08100010101014dd000a0f0703e803020650c58542100001a286800a0f0703e800890650c58542100001a000000fd00383d1e8738000a202020202020000000fc004c472048445220344b0a20202001aa0203197144900403012309070783010000e305c000e3060501023a801871382d40582c450058542100001e565e00a0a0a029503020350058542100001a00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000029
eDP 00ffffffffffff0006af3d5700000000001c0104a51f1178022285a5544d9a270e505400000001010101010101010101010101010101b43780a070383e401010350035ae100000180000000f0000000000000000000000000020000000fe0041554f0a202020202020202020000000fe004231343048414e30352e37200a0070

View file

@ -0,0 +1,20 @@
output HDMI-A-0
off
output DisplayPort-0
off
output DisplayPort-1
off
output eDP
crtc 0
gamma 1.0:0.833:0.714
mode 1920x1080
pos 0x0
primary
rate 60.03
x-prop-max_bpc 8
x-prop-non_desktop 0
x-prop-scaling_mode None
x-prop-tearfree on
x-prop-underscan off
x-prop-underscan_hborder 0
x-prop-underscan_vborder 0

View file

@ -0,0 +1 @@
eDP 00ffffffffffff0006af3d5700000000001c0104a51f1178022285a5544d9a270e505400000001010101010101010101010101010101b43780a070383e401010350035ae100000180000000f0000000000000000000000000020000000fe0041554f0a202020202020202020000000fe004231343048414e30352e37200a0070

28
_gui/clipit/clipitrc Normal file
View file

@ -0,0 +1,28 @@
[rc]
use_copy=true
use_primary=true
synchronize=true
automatic_paste=false
show_indexes=false
save_uris=true
use_rmb_menu=false
save_history=false
history_limit=50
history_timeout_seconds=30
history_timeout=false
items_menu=20
statics_show=true
statics_items=10
hyperlinks_only=false
confirm_clear=false
single_line=true
reverse_history=false
item_length=50
ellipsize=2
history_key=<Ctrl><Alt>H
actions_key=<Ctrl><Alt>A
menu_key=<Ctrl><Alt>P
search_key=<Ctrl><Alt>F
offline_key=<Ctrl><Alt>O
offline_mode=false
exclude_windows=

View file

@ -0,0 +1,3 @@
[manual]
lat=52.39
lon=16.99

View file

@ -0,0 +1,3 @@
[Settings]
gtk-recent-files-max-age=0
gtk-recent-files-limit=0

21
_gui/install.sh Normal file
View file

@ -0,0 +1,21 @@
#!/bin/sh
# prepare local dirs
mkdir -p ~/.config ~/.local/bin
# link config
for i in autorandr clipit gammastep gtk-3.0 neofetch qtile xinitrc; do
rm -rf ~/.config/${i}
ln -sf $(pwd)/${i} ~/.config
done
# delete not needed items in ~/.config
for i in dconf; do
rm -rf ~/.config/${i}
ln -sf /dev/null ~/.config/${i}
done
# install scripts
for i in _scripts/*; do
ln -sf $(pwd)/$i ~/.local/bin
done

35
_gui/neofetch/config.conf Normal file
View file

@ -0,0 +1,35 @@
# See this wiki page for more info:
# https://github.com/dylanaraps/neofetch/wiki/Customizing-Info
print_info() {
info title
info underline
info "OS " distro
info "Host " model
info "Shell " shell
info "Kernel " kernel
info "Uptime " uptime
info "Packages " packages
prin
info "WM " wm
info "Terminal " term
info "Resolution" resolution
info cols
}
kernel_shorthand="off"
distro_shorthand="on"
os_arch="off"
uptime_shorthand="tiny"
memory_percent="on"
package_managers="on"
shell_version="off"
cpu_brand="off"
refresh_rate="on"
bold="off"
block_width=4
image_backend="iterm2"
image_source="/f/.config/neofetch/gentoo.png"
image_loop="off"
image_size="310px"
gap=2

BIN
_gui/neofetch/gentoo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 229 KiB

1630
_gui/qtile/chars/emoji Normal file

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

192
_gui/qtile/config.py Normal file
View file

@ -0,0 +1,192 @@
import os
import subprocess
from libqtile import bar, extension, hook, layout, widget
from libqtile.lazy import lazy
from libqtile.config import Click, Drag, DropDown, Group, Key, Match, ScratchPad, Screen
@hook.subscribe.startup_once
def autostart():
home = os.path.expanduser('~/.config/qtile/autostart.sh')
subprocess.Popen([home])
mod = "mod4"
groups = [
Group("1", label="\uf292"),
Group("2", label="\uf738", matches=[Match(wm_class=["firefox"])]),
Group("3", label="\uf70d", matches=[Match(wm_class=["Ferdium", "discord", "Signal"])]),
Group("4", label="\uf7aa", matches=[Match(wm_class=["mutt"])]),
Group("5", label="\uf120"),
Group("6", label="\uf120"),
Group("7", label="\uf09c", matches=[Match(wm_class=["1Password"])]),
Group("8", label="\uf198", matches=[Match(wm_class=["Slack"])]),
Group("9", label="\uf296"),
Group("0", label="\uf2bb", matches=[Match(wm_class=["workfx"])]),
]
keys = [
# switch between windows
Key([mod], "h", lazy.layout.left()),
Key([mod], "l", lazy.layout.right()),
Key([mod], "j", lazy.layout.down()),
Key([mod], "k", lazy.layout.up()),
Key([mod], "Left", lazy.layout.left()),
Key([mod], "Right", lazy.layout.right()),
Key([mod], "Down", lazy.layout.down()),
Key([mod], "Up", lazy.layout.up()),
# move windows
Key([mod, "control"], "h", lazy.layout.shuffle_left()),
Key([mod, "control"], "l", lazy.layout.shuffle_right()),
Key([mod, "control"], "j", lazy.layout.shuffle_down()),
Key([mod, "control"], "k", lazy.layout.shuffle_up()),
# resize windows
Key([mod, "shift"], "h", lazy.layout.grow_left()),
Key([mod, "shift"], "l", lazy.layout.grow_right()),
Key([mod, "shift"], "j", lazy.layout.grow_down()),
Key([mod, "shift"], "k", lazy.layout.grow_up()),
Key([mod, "shift", "control"], "0", lazy.layout.normalize()),
# app binds
Key([mod], "Return", lazy.spawn("sh -c 'BROWSER=firefox st'")),
Key([mod], "space", lazy.spawncmd()),
Key([mod], "a", lazy.spawn("authenticator")),
Key([mod], "e", lazy.spawn("selector-chars")),
Key([mod], "i", lazy.spawn("scrot -f -s 'scrot_%Y-%m-%d_%H-%M-%S_%s.png'")),
Key([mod], "m", lazy.spawn("sh -c 'pgrep -x neomutt > /dev/null || BROWSER=firefox st -n mutt -e neomutt'")),
Key([mod, "shift"], "i", lazy.spawn("scrot -f 'scrot_%Y-%m-%d_%H-%M-%S_%s.png'")),
Key([mod, "shift"], "Return", lazy.spawn("sh -c 'terminal_profile=work BROWSER=workfx st'")),
Key([mod, "control"], "a", lazy.spawn("selector-audio")),
Key([mod, "control"], "b", lazy.spawn("selector-bluetooth")),
# WM control
Key([mod], "f", lazy.window.toggle_floating()),
Key([mod], "q", lazy.window.kill()),
Key([mod, "control", "shift"], "l", lazy.spawn("physlock")),
Key([mod, "control", "shift"], "q", lazy.shutdown()),
Key([mod, "control", "shift"], "r", lazy.reload_config()),
Key([mod], "r", lazy.reload_config()),
# media keys
Key([], "XF86AudioMute", lazy.spawn("pactl set-sink-mute @DEFAULT_SINK@ toggle")),
Key([], "XF86AudioMicMute", lazy.spawn("sb-volume key")),
Key([], "XF86AudioRaiseVolume", lazy.spawn("sb-volume inc")),
Key([], "XF86AudioLowerVolume", lazy.spawn("sb-volume dec")),
Key([], "XF86MonBrightnessUp", lazy.spawn("xbacklight -inc 10")),
Key([], "XF86MonBrightnessDown", lazy.spawn("xbacklight -dec 10")),
]
for i in groups[:10]:
keys.extend(
[
# mod1 + letter of group = switch to group
Key(
[mod], i.name, lazy.group[i.name].toscreen(),
desc="Switch to group {}".format(i.name),
),
# Key( [mod, "shift"], i.name, lazy.window.togroup(i.name, switch_group=True),
# desc="Switch to & move focused window to group {}".format(i.name),
# ),
Key([mod, "shift"], i.name, lazy.window.togroup(i.name),
desc="move focused window to group {}".format(i.name)
),
]
)
layouts = [
layout.Columns(
border_focus='#0094d8',
border_normal="#272822",
border_on_single = False,
border_width=5,
insert_position=1,
margin=[5, 5, 5, 5]
),
]
widget_defaults = dict(
background='#272822',
font="RobotoMono Nerd Font Medium",
fontsize=14,
foreground='#feffff',
)
extension_defaults = widget_defaults.copy()
def yubikey_replace(text):
return text.replace('YubiKey is waiting for a touch', 'Touch the Yubikey')
screens = [
Screen(
top=bar.Bar(
[
widget.GroupBox(
active='#feffff',
disable_drag=True,
fontsize=18,
highlight_method='block',
rounded=False,
this_current_screen_border='#005577',
urgent_alert_method='block',
urgent_border='#770000',
),
widget.Prompt(
bell_style=None,
prompt='open: ',
record_history=False,
),
widget.Spacer(),
widget.Notify(
background='#e8b923',
background_low='#272822',
background_urgent='#770000',
foreground='#000000',
foreground_low='#c7c7c7',
foreground_urgent='#feffff',
font='RobotoMono Nerd Font Bold',
parse_text=yubikey_replace,
),
widget.GenPollCommand(
background='#005577',
foreground='#feffff',
update_interval=1,
cmd="sb-mail",
),
widget.GenPollCommand(
background='#770000',
foreground='#feffff',
update_interval=1,
cmd="sb-volume",
),
widget.GenPollCommand(
background='#770000',
foreground='#feffff',
update_interval=1,
cmd="sb-network",
),
widget.GenPollCommand(
update_interval=1,
cmd="sb-battery",
),
widget.Clock(
format='[%d] %H:%M:%S',
),
widget.Systray(),
],
24,
margin=[5, 5, 0, 5]
),
wallpaper=os.environ['XDG_CONFIG_HOME'] + '/qtile/wallpaper.img',
wallpaper_mode='fill',
),
]
mouse = [
Drag([mod], "Button1", lazy.window.set_position_floating(), start=lazy.window.get_position()),
Drag([mod], "Button3", lazy.window.set_size_floating(), start=lazy.window.get_size()),
Click([mod], "Button2", lazy.window.bring_to_front()),
]
floating_layout = layout.Floating(
float_rules=[
*layout.Floating.default_float_rules,
],
border_focus='#005577',
border_normal="#272822",
border_width=5,
)
wmname = "qtile"

BIN
_gui/qtile/wallpaper.img Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1 MiB

1
_gui/xinitrc Normal file
View file

@ -0,0 +1 @@
exec dbus-launch --sh-syntax --exit-with-session qtile start