From f9eb221ee0831672c562eeea004c0523556c4086 Mon Sep 17 00:00:00 2001 From: Katie Date: Mon, 20 Jun 2022 03:41:07 -0500 Subject: [PATCH] Fix mistake with file links --- .config/bspwm | 1 - .config/bspwm/bspwmrc | 20 + .config/bspwm/sxmo-bspwm-xinit.sh | 85 +++ .config/copyconfigs.sh | 6 + .config/polybar | 1 - .config/polybar/batt/ip5xxx_battery.sh | 4 + .../batt/ip5xxx_charge_now_compat.service | 11 + .config/polybar/batt/rk818_battery.sh | 4 + .../batt/rk818_charge_now_compat.service | 11 + .config/polybar/config.ini | 656 ++++++++++++++++++ .config/polybar/launch.sh | 14 + .../polybar/scripts/battery-combined-shell.sh | 111 +++ .config/polybar/scripts/sxmo.sh | 4 + .config/sxhkd | 1 - .config/sxhkd/sxhkdrc | 140 ++++ 15 files changed, 1066 insertions(+), 3 deletions(-) delete mode 120000 .config/bspwm create mode 100755 .config/bspwm/bspwmrc create mode 100755 .config/bspwm/sxmo-bspwm-xinit.sh create mode 100755 .config/copyconfigs.sh delete mode 120000 .config/polybar create mode 100755 .config/polybar/batt/ip5xxx_battery.sh create mode 100644 .config/polybar/batt/ip5xxx_charge_now_compat.service create mode 100755 .config/polybar/batt/rk818_battery.sh create mode 100644 .config/polybar/batt/rk818_charge_now_compat.service create mode 100644 .config/polybar/config.ini create mode 100755 .config/polybar/launch.sh create mode 100755 .config/polybar/scripts/battery-combined-shell.sh create mode 100755 .config/polybar/scripts/sxmo.sh delete mode 120000 .config/sxhkd create mode 100644 .config/sxhkd/sxhkdrc diff --git a/.config/bspwm b/.config/bspwm deleted file mode 120000 index 351f56a..0000000 --- a/.config/bspwm +++ /dev/null @@ -1 +0,0 @@ -/home/katie/.config/bspwm/ \ No newline at end of file diff --git a/.config/bspwm/bspwmrc b/.config/bspwm/bspwmrc new file mode 100755 index 0000000..1aed34d --- /dev/null +++ b/.config/bspwm/bspwmrc @@ -0,0 +1,20 @@ +#! /bin/sh + +pgrep -x sxhkd > /dev/null || sxhkd & + +$HOME/.config/polybar/launch.sh + +bspc monitor -d I II III IV V VI VII VIII IX X + +bspc config border_width 2 +bspc config window_gap 12 + +bspc config split_ratio 0.52 +bspc config borderless_monocle true +bspc config gapless_monocle true + +bspc rule -a Gimp desktop='^8' state=floating follow=on +bspc rule -a Chromium desktop='^2' +bspc rule -a mplayer2 state=floating +bspc rule -a Kupfer.py focus=on +bspc rule -a Screenkey manage=off diff --git a/.config/bspwm/sxmo-bspwm-xinit.sh b/.config/bspwm/sxmo-bspwm-xinit.sh new file mode 100755 index 0000000..ce27757 --- /dev/null +++ b/.config/bspwm/sxmo-bspwm-xinit.sh @@ -0,0 +1,85 @@ +#!/bin/sh +# SPDX-License-Identifier: AGPL-3.0-only +# Copyright 2022 Sxmo Contributors + +envvars() { + export SXMO_WM=dwm + # shellcheck disable=SC2086 + command -v $TERMCMD "" >/dev/null || export TERMCMD="st" + command -v "$KEYBOARD" >/dev/null || defaultkeyboard + [ -z "$MOZ_USE_XINPUT2" ] && export MOZ_USE_XINPUT2=1 +} + +defaults() { + xmodmap /usr/share/sxmo/appcfg/xmodmap_caps_esc + xsetroot -mod 29 29 -fg '#0b3a4c' -bg '#082430' + xset s off -dpms + for xr in /usr/share/sxmo/appcfg/*.xr; do + xrdb -merge "$xr" + done + [ -e "$HOME"/.Xresources ] && xrdb -merge "$HOME"/.Xresources + SCREENWIDTH=$(xrandr | grep "Screen 0" | cut -d" " -f 8) + SCREENHEIGHT=$(xrandr | grep "Screen 0" | cut -d" " -f 10 | tr -d ",") + if [ "$SCREENWIDTH" -lt 1024 ] || [ "$SCREENHEIGHT" -lt 768 ]; then + gsettings set org.gtk.Settings.FileChooser window-size "($SCREENWIDTH,$((SCREENHEIGHT / 2)))" + fi +} + +defaultkeyboard() { + if command -v svkbd-mobile-intl >/dev/null; then + export KEYBOARD=svkbd-mobile-intl + elif command -v svkbd-mobile-plain >/dev/null; then + export KEYBOARD=svkbd-mobile-plain + else + #legacy + export KEYBOARD=svkbd-sxmo + fi +} + +with_dbus() { + echo "$DBUS_SESSION_BUS_ADDRESS" > "$XDG_RUNTIME_DIR"/dbus.bus + # shellcheck source=configs/appcfg/xinit_template + . "$XDG_CONFIG_HOME"/sxmo/xinit + exec /usr/bin/bspwm-session.sh +} + +start() { + if [ -z "$DBUS_SESSION_BUS_ADDRESS" ]; then + dbus-run-session -- "$0" "with_dbus" + else + # with_dbus calls exec because dbus-run-session starts it in a + # new shell, but we need to keep this shell; start in a subshell + ( with_dbus ) + fi +} + +cleanup() { + sxmo_daemons.sh stop all + pkill svkbd + pkill dmenu +} + +init() { + # shellcheck source=scripts/core/sxmo_common.sh + . /etc/profile.d/sxmo_init.sh + + _sxmo_load_environments + _sxmo_prepare_dirs + envvars + sxmo_migrate.sh sync + + defaults + + # shellcheck disable=SC1090,SC1091 + . "$XDG_CONFIG_HOME/sxmo/profile" + + start + cleanup + sxmo_hook_stop.sh +} + +if [ -z "$1" ]; then + init +else + "$1" +fi diff --git a/.config/copyconfigs.sh b/.config/copyconfigs.sh new file mode 100755 index 0000000..c497f28 --- /dev/null +++ b/.config/copyconfigs.sh @@ -0,0 +1,6 @@ +#!/bin/bash +# This file copies all the folders from ~/.config that I want to share. + +cp -r ~/.config/bspwm/ . +cp -r ~/.config/sxhkd/ . +cp -r ~/.config/polybar/ . diff --git a/.config/polybar b/.config/polybar deleted file mode 120000 index ffc526c..0000000 --- a/.config/polybar +++ /dev/null @@ -1 +0,0 @@ -/home/katie/.config/polybar/ \ No newline at end of file diff --git a/.config/polybar/batt/ip5xxx_battery.sh b/.config/polybar/batt/ip5xxx_battery.sh new file mode 100755 index 0000000..62db9bf --- /dev/null +++ b/.config/polybar/batt/ip5xxx_battery.sh @@ -0,0 +1,4 @@ +#!/bin/bash + +PERCENTAGESTR=$(upower -i /org/freedesktop/UPower/devices/battery_ip5xxx_battery | grep percentage) +echo "${PERCENTAGESTR//[!0-9]/}" > /home/katie/.config/polybar/batt/ip5xxx-battery/ diff --git a/.config/polybar/batt/ip5xxx_charge_now_compat.service b/.config/polybar/batt/ip5xxx_charge_now_compat.service new file mode 100644 index 0000000..b47cdca --- /dev/null +++ b/.config/polybar/batt/ip5xxx_charge_now_compat.service @@ -0,0 +1,11 @@ +[Unit] +Description=ip5xxx Battery charge_now Compatability Service + +[Service] +User=root +ExecStart=ip5xxx_battery.sh +Restart=always +StartLimitBurst=1000000 + +[Install] +WantedBy=multi-user.target diff --git a/.config/polybar/batt/rk818_battery.sh b/.config/polybar/batt/rk818_battery.sh new file mode 100755 index 0000000..b20e397 --- /dev/null +++ b/.config/polybar/batt/rk818_battery.sh @@ -0,0 +1,4 @@ +#!/bin/bash + +PERCENTAGESTR=$(upower -i /org/freedesktop/UPower/devices/battery_rk818_battery | grep percentage) +echo "${PERCENTAGESTR//[!0-9]/}" > /home/katie/.config/polybar/batt/rk818-battery/ diff --git a/.config/polybar/batt/rk818_charge_now_compat.service b/.config/polybar/batt/rk818_charge_now_compat.service new file mode 100644 index 0000000..36f064b --- /dev/null +++ b/.config/polybar/batt/rk818_charge_now_compat.service @@ -0,0 +1,11 @@ +[Unit] +Description=RK818 Battery charge_now Compatability Service + +[Service] +User=root +ExecStart=rk818_battery.sh +Restart=always +StartLimitBurst=1000000 + +[Install] +WantedBy=multi-user.target diff --git a/.config/polybar/config.ini b/.config/polybar/config.ini new file mode 100644 index 0000000..b664571 --- /dev/null +++ b/.config/polybar/config.ini @@ -0,0 +1,656 @@ +;========================================================== +; +; +; ██████╗ ██████╗ ██╗ ██╗ ██╗██████╗ █████╗ ██████╗ +; ██╔══██╗██╔═══██╗██║ ╚██╗ ██╔╝██╔══██╗██╔══██╗██╔══██╗ +; ██████╔╝██║ ██║██║ ╚████╔╝ ██████╔╝███████║██████╔╝ +; ██╔═══╝ ██║ ██║██║ ╚██╔╝ ██╔══██╗██╔══██║██╔══██╗ +; ██║ ╚██████╔╝███████╗██║ ██████╔╝██║ ██║██║ ██║ +; ╚═╝ ╚═════╝ ╚══════╝╚═╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝ +; +; +; To learn more about how to configure Polybar +; go to https://github.com/jaagr/polybar +; +; The README contains alot of information +; +;========================================================== + +[colors] +;background = ${xrdb:color0:#222} +background = #222 +background-alt = #444 +;foreground = ${xrdb:color7:#EEE} +foreground = #dfdfdf +foreground-alt = #555 +;primary = ${xrdb:color1:#777} +primary = #ff00ff +secondary = #e60053 +alert = #bd2c40 +;underline = ${xrdb:color8} +underline = #ffffff +;cpu = ${xrdb:color11} +cpu = #ffffff +;memory = ${xrdb:color14} +memory = #ffffff +;redshift = ${xrdb:color13} +redshift = #ff0000 +;bluetooth = ${xrdb:color15} +bluetooth = #0000ff +;alter1 = ${xrdb:color4} +alter1 = #ffffff +;alter2 = ${xrdb:color3} +alter2 = #ffffff + +[bar/bar1] +monitor = ${env:MONITOR:DSI-1} +width = 99% +height = 27 +offset-x = 0.5% +;offset-y = 0.5% +radius = 0 +fixed-center = true + +background = ${colors.background} +foreground = ${colors.foreground} + +line-size = 3 +line-color = #f00 + +border-size = 0 +border-color = #00000000 + +padding-left = 2 +padding-right = 0 + +module-margin-left = 1 +module-margin-right = 1 + +font-0 = cherry-11-r;2 +font-1 = Wuncon Siji:pixelsize=12;2 +font-2 = Weather Icons:size=12;4 +font-3 = Monoid Nerd Font Mono:size=12;2 +font-4 = SauceCodePro Nerd Font:size=18:antialias=false;4 +font-5 = Material Icons:size=10;2 +font-6 = unifont:fontformat=truetype:size=8:antialias=false;0 + + +modules-left = bspwm +;modules-center = player-mpris-simple +;modules-right = left-bluetooth bluetooth right-bluetooth left-redshift info-redshift-temp right-redshift left-memory memory right-memory left-cpu cpu right-cpu left-temp temperature right-temp left-date date2 right-date +modules-center = xwindow +modules-right = filesystem pulseaudio memory cpu wlan combobatt temperature date sxmo powermenu +;modules-right = pulseaudio + +tray-position = right +tray-padding = 2 +;tray-background = #0063ff + +wm-restack = bspwm +;wm-restack = i3 + +;override-redirect = true + +;scroll-up = bspwm-desknext +;scroll-down = bspwm-deskprev + +cursor-click = pointer +cursor-scroll = ns-resize + +[module/bspwm] + type = internal/bspwm + +label-focused = %name% +label-focused-background = ${colors.background} +label-focused-padding = 2 +label-focused-underline = ${colors.alter2} + +label-occupied = %name% +label-occupied-padding = 2 + +label-urgent = %name%! +label-urgent-background = ${colors.alert} +label-urgent-padding = 2 + +label-empty = %name% +label-empty-foreground = ${colors.foreground-alt} +label-empty-padding = 2 + +; Separator in between workspaces +label-separator = | + +[module/cpu] +type = internal/cpu +interval = 2 + +;format-prefix = " " +format-prefix = "⏳ " +format-prefix-background = ${colors.background} +format-prefix-foreground = ${colors.alter1} +;format-underline = ${colors.underline} +label = %percentage:2%% +label-foreground = ${colors.alter1} +label-background = ${colors.background} + +[module/memory] +type = internal/memory +interval = 2 +format-prefix = " " +format-prefix-background = ${colors.background} +format-prefix-foreground = ${colors.alter2} +;format-underline = ${colors.underline} +label = %percentage_used%% +label-foreground = ${colors.alter2} +label-background = ${colors.background} + +[module/date] +type = internal/date +interval = 5 + +date = +date-alt = " %Y-%m-%d" + +time = %H:%M +time-alt = %H:%M:%S + +format-prefix =  +format-prefix-foreground = ${colors.alter1} +format-prefix-background = ${colors.background} +;format-underline = ${colors.underline} + +label = %date% %time% +label-foreground = ${colors.alter1} +label-background = ${colors.background} + +[module/date2] +type = custom/script +interval = 5 + +exec = date +%R" "%a" "%d" "%b" "%Y + +click-left = calendar.sh + +format-prefix = " " +format-prefix-foreground = ${colors.alter1} +format-prefix-background = ${colors.background} +;format-underline = ${colors.underline} + +label-foreground = ${colors.alter1} +label-background = ${colors.background} + +[module/pulseaudio] +type = internal/pulseaudio + +format-volume = +format-volume-padding = 2 +label-volume = VOL %percentage%% +label-volume-foreground = ${root.foreground} + +label-muted =  muted +label-muted-foreground = #666 + +bar-volume-width = 10 +bar-volume-foreground-0 = #55aa55 +bar-volume-foreground-1 = #55aa55 +bar-volume-foreground-2 = #55aa55 +bar-volume-foreground-3 = #55aa55 +bar-volume-foreground-4 = #55aa55 +bar-volume-foreground-5 = #f5a70a +bar-volume-foreground-6 = #ff5555 +bar-volume-gradient = false +bar-volume-indicator = | +bar-volume-indicator-font = 7 +bar-volume-fill = ─ +bar-volume-fill-font = 7 +bar-volume-empty = ─ +bar-volume-empty-font = 7 +bar-volume-empty-foreground = ${colors.foreground-alt} + +[module/temperature] +type = internal/temperature +thermal-zone = 0 +warn-temperature = 60 + +padding-left = 2 + +format =