Compare commits

...

7 Commits

14 changed files with 1387 additions and 302 deletions

1
.gitignore vendored
View File

@@ -4,6 +4,7 @@ shell/.config/zsh/plugins/zsh-syntax-highlighting
shell/.config/zsh/plugins/zsh-vi-mode shell/.config/zsh/plugins/zsh-vi-mode
qtile/.config/qtile/theme.txt qtile/.config/qtile/theme.txt
lupan-clock/lupan-clock lupan-clock/lupan-clock
lupan-clock/stdout-clock
lupan-wm/target lupan-wm/target
*~ *~
__pycache__ __pycache__

View File

@@ -18,6 +18,7 @@ declare-option str comment "70675c"
declare-option str red "ae4242" declare-option str red "ae4242"
declare-option str gray "8f92a3" declare-option str gray "8f92a3"
declare-option str green "667c50" declare-option str green "667c50"
declare-option str darkgreen "1c4a21"
declare-option str selectionalpha "80" declare-option str selectionalpha "80"
@@ -56,17 +57,17 @@ set-face global PrimaryCursor "rgb:%opt{bg},rgb:%opt{mint}"
set-face global SecondaryCursor "rgb:%opt{bg},rgb:%opt{blue}" set-face global SecondaryCursor "rgb:%opt{bg},rgb:%opt{blue}"
set-face global PrimaryCursorEol "rgb:%opt{bg},rgb:%opt{pink}" set-face global PrimaryCursorEol "rgb:%opt{bg},rgb:%opt{pink}"
set-face global SecondaryCursorEol "rgb:%opt{bg},rgb:%opt{purple}" set-face global SecondaryCursorEol "rgb:%opt{bg},rgb:%opt{purple}"
set-face global MenuForeground "rgb:%opt{bg},rgb:%opt{darkmint}" set-face global MenuForeground "rgb:%opt{fg},rgb:%opt{darkgreen}"
set-face global MenuBackground "rgb:%opt{darkmint},rgb:%opt{bgmenu}" set-face global MenuBackground "rgb:%opt{fg},rgb:%opt{bgmenu}"
set-face global MenuInfo "rgb:%opt{comment}" set-face global MenuInfo "rgb:%opt{comment}"
set-face global Information "rgb:%opt{yellow},rgb:%opt{bgmenu}" set-face global Information "rgb:%opt{fg},rgb:%opt{bgmenu}"
set-face global InlineInformation "rgb:%opt{brick}" set-face global InlineInformation "rgb:%opt{brick}"
set-face global Error "rgb:%opt{orange}" set-face global Error "rgb:%opt{orange}"
set-face global DiagnosticError "default,default,rgb:%opt{red}+c" set-face global DiagnosticError "default,default,rgb:%opt{red}+c"
set-face global DiagnosticWarning "default,default,rgb:%opt{yellow}+c" set-face global DiagnosticWarning "default,default,rgb:%opt{yellow}+c"
set-face global StatusLine "rgb:%opt{yellow2},rgb:%opt{bgmenu}" set-face global StatusLine "rgb:%opt{fg},rgb:%opt{bgmenu}"
set-face global StatusLineMode "rgb:%opt{mint}" set-face global StatusLineMode "rgb:%opt{mint}"
set-face global StatusLineInfo "rgb:%opt{brick}" set-face global StatusLineInfo "rgb:%opt{sand}"
set-face global StatusLineValue "rgb:%opt{mint}" set-face global StatusLineValue "rgb:%opt{mint}"
set-face global StatusCursor "rgb:%opt{bg},rgb:%opt{mint}" set-face global StatusCursor "rgb:%opt{bg},rgb:%opt{mint}"
set-face global Prompt "rgb:%opt{mint}" set-face global Prompt "rgb:%opt{mint}"

View File

@@ -0,0 +1,117 @@
# LP light
declare-option str bg "faf8f5"
declare-option str bgmenu "f1e7da"
declare-option str fg "482f0f"
declare-option str orange "c88c51"
declare-option str blue "5196c8"
declare-option str sand "c8a051"
declare-option str mint "51c896"
declare-option str brick "c87851"
declare-option str darkmint "51c8c8"
declare-option str pink "c851be"
declare-option str purple "6e51c8"
declare-option str yellow "c8be51"
declare-option str comment "a1b2ce"
declare-option str red "c85b51"
declare-option str gray "d5d6dd"
declare-option str magenta "c8518c"
declare-option str green "51c864"
declare-option str fgmenu "c6ae90"
declare-option str selectionalpha "80"
## CODE
set-face global value "rgb:%opt{mint}"
set-face global type "rgb:%opt{darkmint}"
set-face global variable "rgb:%opt{yellow}"
set-face global module "rgb:%opt{yellow}"
set-face global function "rgb:%opt{blue}"
set-face global string "rgb:%opt{brick}"
set-face global keyword "rgb:%opt{sand}"
set-face global operator "rgb:%opt{orange}"
set-face global attribute "rgb:%opt{magenta}"
set-face global comment "rgb:%opt{comment}"
set-face global documentation "rgb:%opt{comment}"
set-face global meta "rgb:%opt{pink}"
set-face global bultin "rgb:%opt{green}"
## MARKUP
set-face global title "rgb:%opt{brick}"
set-face global header "rgb:%opt{orange}"
set-face global mono "rgb:%opt{magenta}"
set-face global block "rgb:%opt{darkmint}"
set-face global link "rgb:%opt{blue}"
set-face global bullet "rgb:%opt{orange}"
set-face global list "rgb:%opt{orange}"
## BUILTIN
set-face global Default "rgb:%opt{fg},rgb:%opt{bg}"
set-face global PrimarySelection "rgb:%opt{bg},rgba:%opt{mint}%opt{selectionalpha}"
set-face global SecondarySelection "rgb:%opt{bg},rgba:%opt{blue}%opt{selectionalpha}"
set-face global PrimaryCursor "rgb:%opt{bg},rgb:%opt{mint}"
set-face global SecondaryCursor "rgb:%opt{bg},rgb:%opt{blue}"
set-face global PrimaryCursorEol "rgb:%opt{bg},rgb:%opt{pink}"
set-face global SecondaryCursorEol "rgb:%opt{bg},rgb:%opt{purple}"
set-face global MenuForeground "rgb:%opt{fg},rgb:%opt{fgmenu}"
set-face global MenuBackground "rgb:%opt{fg},rgb:%opt{bgmenu}"
set-face global MenuInfo "rgb:%opt{comment}"
set-face global Information "rgb:%opt{fg},rgb:%opt{bgmenu}"
set-face global InlineInformation "rgb:%opt{brick}"
set-face global Error "rgb:%opt{orange}"
set-face global DiagnosticError "default,default,rgb:%opt{red}+c"
set-face global DiagnosticWarning "default,default,rgb:%opt{yellow}+c"
set-face global StatusLine "rgb:%opt{fg},rgb:%opt{bgmenu}"
set-face global StatusLineMode "rgb:%opt{mint}"
set-face global StatusLineInfo "rgb:%opt{sand}"
set-face global StatusLineValue "rgb:%opt{mint}"
set-face global StatusCursor "rgb:%opt{bg},rgb:%opt{mint}"
set-face global Prompt "rgb:%opt{mint}"
set-face global BufferPadding "rgb:%opt{bg},rgb:%opt{bg}"
# Built-in highlighter faces
set-face global LineNumbers "rgb:%opt{comment}"
set-face global LineNumberCursor "rgb:%opt{comment}"
set-face global LineNumbersWrapped "rgb:%opt{bg},rgb:%opt{bg}"
set-face global MatchingChar "rgb:%opt{sand}"
set-face global Whitespace "rgb:%opt{gray}"
set-face global WhitespaceIndent "rgb:%opt{gray}"
set-face global WrapMarker "rgb:%opt{sand}"
# PLUGINS
# kak-lsp
set-face global InfoDefault "default"
set-face global InfoBlock "rgb:%opt{darkmint}"
set-face global InfoBlockQuote "rgb:%opt{orange}"
set-face global InfoBullet "rgb:%opt{orange}"
set-face global InfoHeader "rgb:%opt{orange}"
set-face global InfoLink "rgb:%opt{blue}"
set-face global InfoLinkMono "rgb:%opt{magenta}"
set-face global InfoMono "rgb:%opt{darkmint}"
set-face global InfoRule "rgb:%opt{orange}"
set-face global InfoDiagnosticError "rgb:%opt{red}"
set-face global InfoDiagnosticHint "rgb:%opt{blue}"
set-face global InfoDiagnosticInformation "rgb:%opt{sand}"
set-face global InfoDiagnosticWarning "rgb:%opt{yellow}"
set-face global LineFlagError "rgb:%opt{red}"
set-face global LineFlagHint "rgb:%opt{blue}"
set-face global LineFlagInfo "rgb:%opt{sand}"
set-face global LineFlagWarning "rgb:%opt{yellow}"
set-face global InlayDiagnosticError "rgb:%opt{red}"
set-face global InlayDiagnosticHint "rgb:%opt{blue}"
set-face global InlayDiagnosticInfo "rgb:%opt{sand}"
set-face global InlayDiagnosticWarning "rgb:%opt{yellow}"
set-face global LineFlagError "rgb:%opt{red}"
set-face global LineFlagHint "rgb:%opt{blue}"
set-face global LineFlagInfo "rgb:%opt{sand}"
set-face global LineFlagWarning "rgb:%opt{yellow}"

View File

@@ -12,6 +12,14 @@ nop %sh{
ln -s "$kak_runtime/autoload" "$kak_config/autoload/stdlib" ln -s "$kak_runtime/autoload" "$kak_config/autoload/stdlib"
} }
colorscheme %sh{
if [ -e ~/.lightmode ]; then
echo lp-light
else
echo lp-dark
fi
}
declare-user-mode file-mode declare-user-mode file-mode
declare-user-mode options-mode declare-user-mode options-mode
@@ -21,6 +29,7 @@ map global -docstring "Buffer" user ' ' ': b '
map global -docstring "Open (git)" file-mode 'a' ': file-open-git<ret>' map global -docstring "Open (git)" file-mode 'a' ': file-open-git<ret>'
map global -docstring "Git diff file" file-mode 'd' ': git diff %val{buffile}<ret>' map global -docstring "Git diff file" file-mode 'd' ': git diff %val{buffile}<ret>'
map global -docstring "Open (fd)" file-mode 'f' ': file-open<ret>' map global -docstring "Open (fd)" file-mode 'f' ': file-open<ret>'
map global -docstring "Open (recent)" file-mode 'r' ': file-open-recent<ret>'
map global -docstring "Git grep" file-mode 'g' ': git grep ' map global -docstring "Git grep" file-mode 'g' ': git grep '
map global -docstring "Open (nnn)" file-mode 'n' ': nnn-open %val{buffile}<ret>' map global -docstring "Open (nnn)" file-mode 'n' ': nnn-open %val{buffile}<ret>'
map global -docstring "Open (nnn)" file-mode 'N' ': nnn-open .<ret>' map global -docstring "Open (nnn)" file-mode 'N' ': nnn-open .<ret>'
@@ -28,9 +37,10 @@ map global -docstring "Open/create in dir" file-mode 'c' ': open-create-in-dir<r
map global -docstring "Options" user 'o' ': enter-user-mode options-mode<ret>' map global -docstring "Options" user 'o' ': enter-user-mode options-mode<ret>'
map global -docstring "Light mode" options-mode 'l' ': colorscheme one-light<ret>' map global -docstring "LP Dark mode" options-mode 'd' ': colorscheme lp-dark<ret>'
map global -docstring "Dark mode" options-mode 'd' ': colorscheme one-darker<ret>' map global -docstring "LP Light mode" options-mode 'l' ': colorscheme lp-light<ret>'
map global -docstring "LP Dark mode" options-mode 'D' ': colorscheme lp-dark<ret>' map global -docstring "Light mode" options-mode 'L' ': colorscheme one-light<ret>'
map global -docstring "Dark mode" options-mode 'D' ': colorscheme one-darker<ret>'
map global -docstring "Paste clipboard (append)" user 'p' '<a-!> xsel -bo<ret>' map global -docstring "Paste clipboard (append)" user 'p' '<a-!> xsel -bo<ret>'
map global -docstring "Paste clipboard (insert)" user 'P' '! xsel -bo<ret>' map global -docstring "Paste clipboard (insert)" user 'P' '! xsel -bo<ret>'
@@ -44,6 +54,10 @@ define-command -override file-open-git %{
prompt -menu -shell-script-candidates %{ git ls-files } 'File (git): ' %{ edit -- %val{text} } prompt -menu -shell-script-candidates %{ git ls-files } 'File (git): ' %{ edit -- %val{text} }
} }
define-command -override file-open-recent %{
prompt -menu -shell-script-candidates %{ cat ~/.cache/kak-mru } 'File (recent): ' %{ edit -- %val{text} }
}
define-command -override -params 1 nnn-open %{ define-command -override -params 1 nnn-open %{
terminal nnn-kak-edit %arg{1} %val{session} %val{client} terminal nnn-kak-edit %arg{1} %val{session} %val{client}
} }
@@ -52,6 +66,16 @@ define-command -override open-create-in-dir %{
execute-keys ': edit ' %sh{dirname "$kak_buffile"}/ execute-keys ': edit ' %sh{dirname "$kak_buffile"}/
} }
# CHANGE STATUS BAR COLOR IN INSERT MODE
hook global ModeChange push:.*:insert %{
set-face window StatusLine "default,rgb:1c4a21"
}
hook global ModeChange pop:insert:.* %{
unset-face window StatusLine
}
# ODIN # ODIN
hook global BufSetOption filetype=odin %{ hook global BufSetOption filetype=odin %{
@@ -90,7 +114,6 @@ bundle-noload kak-bundle https://codeberg.org/jdugan6240/kak-bundle
# COLORSCHEME # COLORSCHEME
bundle-theme kak-one "https://codeberg.org/raiguard/kak-one" bundle-theme kak-one "https://codeberg.org/raiguard/kak-one"
colorscheme 'one-darker'
bundle-theme kakoune-themes "https://codeberg.org/anhsirk0/kakoune-themes" bundle-theme kakoune-themes "https://codeberg.org/anhsirk0/kakoune-themes"
@@ -108,7 +131,7 @@ hook global BufCreate [^*].* %{
# SURROUND # SURROUND
bundle kakoune-surround "h-youhei/kakoune-surround" %{ bundle kakoune-surround "https://github.com/h-youhei/kakoune-surround" %{
declare-user-mode surround declare-user-mode surround
map global surround s ': surround<ret>' -docstring 'surround' map global surround s ': surround<ret>' -docstring 'surround'
map global surround c ': change-surround<ret>' -docstring 'change' map global surround c ': change-surround<ret>' -docstring 'change'

View File

@@ -1,5 +1,5 @@
font_family HurmitNerdFont font_family HurmitNerdFont
font_size 11 font_size 10
cursor_blink_interval 0 cursor_blink_interval 0
enable_audio_bell no enable_audio_bell no

1196
kwm/.config/kwm/config.zon Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -3,6 +3,9 @@ PREFIX = /usr/local
lupan-clock: lupan-clock.c lupan-clock: lupan-clock.c
${CC} -o $@ $< -lX11 -Wall ${CC} -o $@ $< -lX11 -Wall
stdout-clock: stdout-clock.c
${CC} -o $@ $< -Wall
install: install:
mkdir -p ${DESTDIR}${PREFIX}/bin mkdir -p ${DESTDIR}${PREFIX}/bin
cp -f lupan-clock ${DESTDIR}${PREFIX}/bin cp -f lupan-clock ${DESTDIR}${PREFIX}/bin

View File

@@ -0,0 +1,32 @@
#include <X11/Xlib.h>
#include <stdio.h>
#include <time.h>
#include <unistd.h>
#include <string.h>
void show(struct tm *tm)
{
char s[6];
strftime(s, sizeof(s), "%H:%M", tm);
printf("%s\n", s);
fflush(stdout);
}
int main() {
int h, m, init = 60;
time_t t;
struct tm *tm;
while (1) {
t = time(NULL);
tm = localtime(&t);
if (tm->tm_hour != h || tm->tm_min != m || init > 0) {
show(tm);
h = tm->tm_hour;
m = tm->tm_min;
init = (init > 0) ? init - 1 : 0;
}
sleep(1);
}
return 1;
}

View File

@@ -1,33 +0,0 @@
#!/usr/bin/env sh
FIFO="$XDG_RUNTIME_DIR/sandbar"
run() {
echo run
[ -e "$FIFO" ] && rm -f "$FIFO"
mkfifo "$FIFO"
"$HOME/.config/river/status" &
while cat "$FIFO"; do :; done | sandbar \
-font "FiraCode Nerd Font Ret:size=10" \
-active-fg-color "#000000" \
-active-bg-color "#e8c47d" \
-inactive-fg-color "#e8c47d" \
-inactive-bg-color "#000000" \
-urgent-fg-color "#000000" \
-urgent-bg-color "#cc241d" \
-title-fg-color "#000000" \
-title-bg-color "#e8c47d"
}
while true; do
run
CODE=$?
if [ $CODE -ne 139 && $CODE -ne 134 ]; then
echo exit because $CODE
exit
fi
echo sleep and continue
sleep 1
done

View File

@@ -1,20 +0,0 @@
#!/bin/sh
LOCK_COMMAND='swaylock -f -c 1f7693'
RANDR_COMMAND='${HOME}/.config/river/randr --on'
RANDR_OFF_COMMAND='${HOME}/.config/river/randr --off'
riverctl spawn "${RANDR_COMMAND}"
"${HOME}/.config/river/keymap"
# Set the default layout generator to be rivertile and start it.
# River will send the process group of the init executable SIGTERM on exit.
riverctl default-layout rivertile
rivertile -view-padding 1 -outer-padding 0 &
riverctl spawn "${HOME}/.config/river/bar"
riverctl spawn "swayidle -w timeout 300 '${LOCK_COMMAND}' \
timeout 330 '${RANDR_OFF_COMMAND}' resume '${RANDR_COMMAND}' \
before-sleep '${LOCK_COMMAND}' after-resume '${RANDR_COMMAND}'"

View File

@@ -1,164 +0,0 @@
#!/bin/sh
LOCK_COMMAND='swaylock -f -c 1f7693'
# Note: the "Super" modifier is also known as Logo, GUI, Windows, Mod4, etc.
# Super+Shift+Return to start an instance of foot (https://codeberg.org/dnkl/foot)
riverctl map normal Super+Shift Return spawn alacritty
riverctl map normal Super+Alt Return spawn alacritty
riverctl map normal Super P spawn "wofi -S run"
# Super+Q to close the focused view
riverctl map normal Super Q close
# Super+Shift+E to exit river
riverctl map normal Super+Shift E exit
# Super+J and Super+K to focus the next/previous view in the layout stack
riverctl map normal Super J focus-view next
riverctl map normal Super K focus-view previous
# Super+Shift+J and Super+Shift+K to swap the focused view with the next/previous
# view in the layout stack
riverctl map normal Super+Shift J swap next
riverctl map normal Super+Shift K swap previous
# Super+Period and Super+Comma to focus the next/previous output
riverctl map normal Super Period focus-output next
riverctl map normal Super Comma focus-output previous
# Super+Shift+{Period,Comma} to send the focused view to the next/previous output
riverctl map normal Super+Shift Period send-to-output next
riverctl map normal Super+Shift Comma send-to-output previous
# Super+Return to bump the focused view to the top of the layout stack
riverctl map normal Super Return zoom
# Super+H and Super+L to decrease/increase the main ratio of rivertile(1)
riverctl map normal Super H send-layout-cmd rivertile "main-ratio -0.05"
riverctl map normal Super L send-layout-cmd rivertile "main-ratio +0.05"
# Super+Shift+H and Super+Shift+L to increment/decrement the main count of rivertile(1)
riverctl map normal Super+Shift H send-layout-cmd rivertile "main-count +1"
riverctl map normal Super+Shift L send-layout-cmd rivertile "main-count -1"
# Super+Alt+{H,J,K,L} to move views
riverctl map normal Super+Alt H move left 100
riverctl map normal Super+Alt J move down 100
riverctl map normal Super+Alt K move up 100
riverctl map normal Super+Alt L move right 100
# Super+Alt+Control+{H,J,K,L} to snap views to screen edges
riverctl map normal Super+Alt+Control H snap left
riverctl map normal Super+Alt+Control J snap down
riverctl map normal Super+Alt+Control K snap up
riverctl map normal Super+Alt+Control L snap right
# Super+Alt+Shift+{H,J,K,L} to resize views
riverctl map normal Super+Alt+Shift H resize horizontal -100
riverctl map normal Super+Alt+Shift J resize vertical 100
riverctl map normal Super+Alt+Shift K resize vertical -100
riverctl map normal Super+Alt+Shift L resize horizontal 100
# Super + Left Mouse Button to move views
riverctl map-pointer normal Super BTN_LEFT move-view
# Super + Right Mouse Button to resize views
riverctl map-pointer normal Super BTN_RIGHT resize-view
# Super + Middle Mouse Button to toggle float
riverctl map-pointer normal Super BTN_MIDDLE toggle-float
for i in $(seq 1 9)
do
tags=$((1 << ($i - 1)))
# Super+[1-9] to focus tag [0-8]
riverctl map normal Super $i set-focused-tags $tags
# Super+Shift+[1-9] to tag focused view with tag [0-8]
riverctl map normal Super+Shift $i set-view-tags $tags
# Super+Control+[1-9] to toggle focus of tag [0-8]
riverctl map normal Super+Control $i toggle-focused-tags $tags
# Super+Shift+Control+[1-9] to toggle tag [0-8] of focused view
riverctl map normal Super+Shift+Control $i toggle-view-tags $tags
done
# Super+0 to focus all tags
# Super+Shift+0 to tag focused view with all tags
all_tags=$(((1 << 32) - 1))
riverctl map normal Super 0 set-focused-tags $all_tags
riverctl map normal Super+Shift 0 set-view-tags $all_tags
# Super+Space to toggle float
riverctl map normal Super Space toggle-float
# Super+F to toggle fullscreen
riverctl map normal Super F toggle-fullscreen
# Super+{Up,Right,Down,Left} to change layout orientation
riverctl map normal Super Up send-layout-cmd rivertile "main-location top"
riverctl map normal Super Right send-layout-cmd rivertile "main-location right"
riverctl map normal Super Down send-layout-cmd rivertile "main-location bottom"
riverctl map normal Super Left send-layout-cmd rivertile "main-location left"
# Declare a passthrough mode. This mode has only a single mapping to return to
# normal mode. This makes it useful for testing a nested wayland compositor
riverctl declare-mode passthrough
# Super+F11 to enter passthrough mode
riverctl map normal Super F11 enter-mode passthrough
# Super+F11 to return to normal mode
riverctl map passthrough Super F11 enter-mode normal
# Various media key mapping examples for both normal and locked mode which do
# not have a modifier
for mode in normal locked
do
# Eject the optical drive (well if you still have one that is)
riverctl map $mode None XF86Eject spawn 'eject -T'
# Control pulse audio volume with pamixer (https://github.com/cdemoulins/pamixer)
riverctl map $mode None XF86AudioRaiseVolume spawn 'pamixer -i 5'
riverctl map $mode None XF86AudioLowerVolume spawn 'pamixer -d 5'
riverctl map $mode None XF86AudioMute spawn 'pamixer --toggle-mute'
# Control MPRIS aware media players with playerctl (https://github.com/altdesktop/playerctl)
riverctl map $mode None XF86AudioMedia spawn 'playerctl play-pause'
riverctl map $mode None XF86AudioPlay spawn 'playerctl play-pause'
riverctl map $mode None XF86AudioPrev spawn 'playerctl previous'
riverctl map $mode None XF86AudioNext spawn 'playerctl next'
# Control screen backlight brightness with brightnessctl (https://github.com/Hummer12007/brightnessctl)
riverctl map $mode None XF86MonBrightnessUp spawn 'brightnessctl set +5%'
riverctl map $mode None XF86MonBrightnessDown spawn 'brightnessctl set 5%-'
done
riverctl map normal Super A focus-previous-tags
riverctl map normal Super+Control+Shift L spawn "${LOCK_COMMAND}"
riverctl map normal Super+Control+Shift S spawn "systemctl suspend"
riverctl map normal Super+Alt O spawn "${LOCK_COMMAND}"
riverctl map normal Super+Alt S spawn "systemctl suspend"
riverctl map normal Super+Alt T spawn "${HOME}/bin/lupan-set-theme toggle"
# Set background and border color
riverctl background-color 0x002b36
riverctl border-color-focused 0xac7853
riverctl border-color-unfocused 0x5387ac
riverctl keyboard-layout -options ctrl:nocaps pl
# Set keyboard repeat rate
riverctl set-repeat 50 300
# Make all views with an app-id that starts with "float" and title "foo" start floating.
riverctl rule-add -app-id 'float*' -title 'foo' float
# Make all views with app-id "bar" and any title use client-side decorations
riverctl rule-add -app-id "bar" csd

View File

@@ -1,21 +0,0 @@
#!/usr/bin/env sh
repeat() {
for x in {0..10}; do
echo "$@"
"$@"
sleep 1
done
}
case "$1" in
--on)
repeat wlr-randr --output DP-1 --on --scale 2 --pos 0,0 &
repeat wlr-randr --output DP-2 --on --scale 2 --pos 1920,0 &
sleep 10
;;
--off)
wlr-randr --output DP-1 --off
wlr-randr --output DP-2 --off
;;
esac

View File

@@ -1,52 +0,0 @@
#!/bin/env sh
cpu() {
cpu="$(grep -o "^[^ ]*" /proc/loadavg)"
}
memory() {
memory="$(free -h | sed -n "2s/\([^ ]* *\)\{2\}\([^ ]*\).*/\2/p")"
}
disk() {
disk="$(df -h | awk 'NR==2{print $4}')"
}
datetime() {
datetime="$(date "+%F %H:%M")"
}
bat() {
read -r bat_status </sys/class/power_supply/BAT0/status
read -r bat_capacity </sys/class/power_supply/BAT0/capacity
bat="$bat_status $bat_capacity%"
}
vol() {
vol="$([ "$(pamixer --get-mute)" = "false" ] && printf "%s%%" "$(pamixer --get-volume)" || printf '-')"
}
display() {
echo "all status [$memory $cpu $disk] [$bat] [$vol] [$datetime]" >"$FIFO"
}
printf "%s" "$$" > "$XDG_RUNTIME_DIR/status_pid"
FIFO="$XDG_RUNTIME_DIR/sandbar"
[ -e "$FIFO" ] || mkfifo "$FIFO"
sec=0
while true; do
sleep 1 &
wait && {
[ $((sec % 15)) -eq 0 ] && memory
[ $((sec % 15)) -eq 0 ] && cpu
[ $((sec % 15)) -eq 0 ] && disk
[ $((sec % 60)) -eq 0 ] && bat
[ $((sec % 5)) -eq 0 ] && vol
[ $((sec % 5)) -eq 0 ] && datetime
[ $((sec % 5)) -eq 0 ] && display
sec=$((sec + 1))
}
done

View File

@@ -38,7 +38,9 @@ export GOBIN=~/.local/bin
# start X or Hyprland at login # start X or Hyprland at login
if [ -z "$DISPLAY" -a -z "$WAYLAND_DISPLAY" -a "$(tty)" = /dev/tty1 ]; then if [ -z "$DISPLAY" -a -z "$WAYLAND_DISPLAY" -a "$(tty)" = /dev/tty1 ]; then
if which /usr/bin/sx > /dev/null; then if which river kwm stdout-clock > /dev/null; then
exec river -c 'stdout-clock | kwm'
elif which /usr/bin/sx > /dev/null; then
exec /usr/bin/sx ~/.xsession exec /usr/bin/sx ~/.xsession
elif which /usr/bin/startx > /dev/null; then elif which /usr/bin/startx > /dev/null; then
exec /usr/bin/startx ~/.xsession exec /usr/bin/startx ~/.xsession