River, Fuzzel, Foo Term, and Yambar

This commit is contained in:
Out Of Ideas 2024-03-10 18:46:52 -05:00
parent 96e1e87508
commit b88e1254da
6 changed files with 574 additions and 0 deletions

40
foot/foot.ini Normal file
View File

@ -0,0 +1,40 @@
[cursor]
color=625c87 575279
[colors]
foreground=575279
background=faf4ed
regular0=575279
regular1=b4637a
regular2=618774
regular3=ea9d34
regular4=286983
regular5=907aa9
regular6=56949f
regular7=e5e9f0
bright0=5f5695
bright1=c26d85
bright2=629f81
bright3=eea846
bright4=2d81a3
bright5=9a80b9
bright6=5ca7b4
bright7=e6ebf3
dim0=504c6b
dim1=a5576d
dim2=597668
dim3=dd9024
dim4=295e73
dim5=816b9a
dim6=50848c
dim7=c8cfde
[main]
pad=10x10
font=Mononoki Nerd Font Mono:size=11
font-bold=Mononoki Nerd Font Mono:size=11:weight=bold
font-italic=Mononoki Nerd Font Mono:size=11:stant=italic
font-bold-italic=Mononoki Nerd Font Mono:size=11:weight=bold:slant=italic

90
fuzzel/fuzzel.ini Normal file
View File

@ -0,0 +1,90 @@
# output=<not set>
font=Mononoki Nerd Font Mono
# dpi-aware=auto
# prompt=>
# icon-theme=hicolor
icons-enabled=no
# fields=filename,name,generic
# password-character=*
# filter-desktop=no
# fuzzy=yes
# show-actions=no
# terminal=$TERMINAL -e # Note: you cannot actually use environment variables here
# launch-prefix=<not set>
# lines=15
width=25
# tabs=8
# horizontal-pad=40
# vertical-pad=8
# inner-pad=0
# image-size-ratio=0.5
# line-height=<use font metrics>
# letter-spacing=0
# layer = top
# exit-on-keyboard-focus-loss = yes
[colors]
background=faf4edee
text=575279ff
match=dd9024ff
selection=56949fee
selection-text=e5e9f0ff
border=56949fff
[border]
width=2
radius=0
[dmenu]
# mode=text # text|index
# exit-immediately-if-empty=no
[key-bindings]
# cancel=Escape Control+g
# execute=Return KP_Enter Control+y
# execute-or-next=Tab
# cursor-left=Left Control+b
# cursor-left-word=Control+Left Mod1+b
# cursor-right=Right Control+f
# cursor-right-word=Control+Right Mod1+f
# cursor-home=Home Control+a
# cursor-end=End Control+e
# delete-prev=BackSpace
# delete-prev-word=Mod1+BackSpace Control+BackSpace
# delete-next=Delete KP_Delete Control+d
# delete-next-word=Mod1+d Control+Delete Control+KP_Delete
# delete-line=Control+k
# prev=Up Control+p
# prev-with-wrap=ISO_Left_Tab
# prev-page=Page_Up KP_Page_Up
# next=Down Control+n
# next-with-wrap=none
# next-page=Page_Down KP_Page_Down
# custom-N: *dmenu mode only*. Like execute, but with a non-zero
# exit-code; custom-1 exits with code 10, custom-2 with 11, custom-3
# with 12, and so on.
# custom-1=Mod1+1
# custom-2=Mod1+2
# custom-3=Mod1+3
# custom-4=Mod1+4
# custom-5=Mod1+5
# custom-6=Mod1+6
# custom-7=Mod1+7
# custom-8=Mod1+8
# custom-9=Mod1+9
# custom-10=Mod1+0
# custom-11=Mod1+exclam
# custom-12=Mod1+at
# custom-13=Mod1+numbersign
# custom-14=Mod1+dollar
# custom-15=Mod1+percent
# custom-16=Mod1+dead_circumflex
# custom-17=Mod1+ampersand
# custom-18=Mod1+asterix
# custom-19=Mod1+parentleft

217
river/init Executable file
View File

@ -0,0 +1,217 @@
#!/bin/sh
# See the river(1), riverctl(1), and rivertile(1) man pages for complete
# documentation.
# Note: the "Super" modifier is also known as Logo, GUI, Windows, Mod4, etc.
#################
# Key variables #
#################
# Main mod key
MOD=Alt
#MOD=Super
# Seconary mod key
SMOD=Super
#SMOD=Alt
#####################
# Program variables #
#####################
# Terminal emulator
TERMINAL=foot
# Menu
MENU=fuzzel
# Web client
WWW="foot -e ~/.local/bin/lynx"
################
# Key mappings #
################
# Mod+Shift+Return to start an instance of foot (https://codeberg.org/dnkl/foot)
riverctl map normal $MOD+Shift Return spawn $TERMINAL
# Mod+P to start an instance of fuzzel (https://codeberg.org/dnkl/fuzzel)
riverctl map normal $MOD P spawn $MENU
# Mod+B to start an instance of foot running the lynx browser
riverctl map normal $MOD B spawn "$WWW"
# Mod+Q to close the focused view
riverctl map normal $MOD Q close
# Mod+Shift+E to exit river
riverctl map normal $MOD+Shift E exit
# Mod+H and Mod+T to focus the next/previous view in the layout stack
riverctl map normal $MOD H focus-view next
riverctl map normal $MOD T focus-view previous
# Mod+SMod+H and Mod+SMod+T to swap the focused view with the next/previous
# view in the layout stack
riverctl map normal $MOD+Shift H swap next
riverctl map normal $MOD+Shift T swap previous
# Mod+Period and Mod+Comma to focus the next/previous output
riverctl map normal $MOD Period focus-output next
riverctl map normal $MOD Comma focus-output previous
# Mod+Shift+{Period,Comma} to send the focused view to the next/previous output
riverctl map normal $MOD+Shift Period send-to-output next
riverctl map normal $MOD+Shift Comma send-to-output previous
# Mod+Return to bump the focused view to the top of the layout stack
riverctl map normal $MOD Return zoom
# Mod+D and Mod+N to decrease/increase the main ratio of rivertile(1)
riverctl map normal $MOD D send-layout-cmd rivertile "main-ratio -0.05"
riverctl map normal $MOD N send-layout-cmd rivertile "main-ratio +0.05"
# Mod+Shift+D and Mod+Shift+N to increment/decrement the main count of rivertile(1)
riverctl map normal $MOD+Shift D send-layout-cmd rivertile "main-count +1"
riverctl map normal $MOD+Shift N send-layout-cmd rivertile "main-count -1"
# Mod+SMod+{D,H,T,N} to move views
riverctl map normal $MOD+$SMOD D move left 100
riverctl map normal $MOD+$SMOD H move down 100
riverctl map normal $MOD+$SMOD T move up 100
riverctl map normal $MOD+$SMOD N move right 100
# Mod+SMod+Control+{D,H,T,N} to snap views to screen edges
riverctl map normal $MOD+$SMOD+Control D snap left
riverctl map normal $MOD+$SMOD+Control H snap down
riverctl map normal $MOD+$SMOD+Control T snap up
riverctl map normal $MOD+$SMOD+Control N snap right
# Mod+SMod+Shift+{D,H,T,N} to resize views
riverctl map normal $MOD+$SMOD+Shift D resize horizontal -100
riverctl map normal $MOD+$SMOD+Shift H resize vertical 100
riverctl map normal $MOD+$SMOD+Shift T resize vertical -100
riverctl map normal $MOD+$SMOD+Shift N resize horizontal 100
# Mod + Left Mouse Button to move views
riverctl map-pointer normal $MOD BTN_LEFT move-view
# Mod + Right Mouse Button to resize views
riverctl map-pointer normal $MOD BTN_RIGHT resize-view
# Mod + Middle Mouse Button to toggle float
riverctl map-pointer normal $MOD BTN_MIDDLE toggle-float
for i in $(seq 1 9)
do
tags=$((1 << ($i - 1)))
# Mod+[1-9] to focus tag [0-8]
riverctl map normal $MOD $i set-focused-tags $tags
# Mod+Shift+[1-9] to tag focused view with tag [0-8]
riverctl map normal $MOD+Shift $i set-view-tags $tags
# Mod+Ctrl+[1-9] to toggle focus of tag [0-8]
riverctl map normal $MOD+Control $i toggle-focused-tags $tags
# Alt+Shift+Ctrl+[1-9] to toggle tag [0-8] of focused view
riverctl map normal $MOD+Shift+Control $i toggle-view-tags $tags
done
# Mod+0 to focus all tags
# Mod+Shift+0 to tag focused view with all tags
all_tags=$(((1 << 32) - 1))
riverctl map normal $MOD 0 set-focused-tags $all_tags
riverctl map normal $MOD+Shift 0 set-view-tags $all_tags
# Mod+Space to toggle float
riverctl map normal $MOD Space toggle-float
# Mod+F to toggle fullscreen
riverctl map normal $MOD F toggle-fullscreen
# Mod+{Up,Right,Down,Left} to change layout orientation
riverctl map normal $MOD Up send-layout-cmd rivertile "main-location top"
riverctl map normal $MOD Right send-layout-cmd rivertile "main-location right"
riverctl map normal $MOD Down send-layout-cmd rivertile "main-location bottom"
riverctl map normal $MOD 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
# Mod+F11 to enter passthrough mode
riverctl map normal $MOD F11 enter-mode passthrough
# Mod+F11 to return to normal mode
riverctl map passthrough $MOD 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 light (https://github.com/haikarainen/light)
riverctl map $mode None XF86MonBrightnessUp spawn 'light -A 5'
riverctl map $mode None XF86MonBrightnessDown spawn 'light -U 5'
done
############
# Settings #
############
# Set background and border color
riverctl background-color 0xFAF4ED
riverctl border-color-focused 0x56949F
riverctl border-color-unfocused 0xD0D8D8
# Set keyboard repeat rate
riverctl set-repeat 50 300
# Make certain views start floating
riverctl float-filter-add app-id float
riverctl float-filter-add title "popup title with spaces"
# Set app-ids and titles of views which should use client side decorations
riverctl csd-filter-add app-id "gedit"
# 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 6 -outer-padding 6 &
# Set the focus model
riverctl focus-follows-cursor normal
#############
# Autostart #
#############
# Resolution
wlr-randr --output Virtual-1 --mode 1920x1080
# Wallpaper
wbg ~/.local/share/wallpapers/wallpaper.png &
# Bar
yambar &
# Pipewire
#pipewire &
#pipewire-pulse &
#wireplumber &

65
vis/themes/dawnfox.lua Normal file
View File

@ -0,0 +1,65 @@
local lexers = vis.lexers
-- regular bright dim
black = {"#575279", "#5f5695", "#504c6b"}
red = {"#b4637a", "#c26d85", "#a5576d"}
green = {"#618774", "#629f81", "#597668"}
yellow = {"#ea9d34", "#eea846", "#dd9024"}
blue = {"#286983", "#2d81a3", "#295e73"}
magenta = {"#907aa9", "#9a80b9", "#816b9a"}
cyan = {"#56949f", "#5ca7b4", "#50848c"}
white = {"#e5e9f0", "#e6ebf3", "#c8cfde"}
orange = {"#d7827e", "#de8c88", "#ca6e69"}
pink = {"#d685af", "#de8db7", "#c9709e"}
comment = "#9893a5"
bg0 = "#ebe5df" -- Dark bg (status line and float)
bg1 = "#faf4ed" -- Default bg
bg2 = "#ebe0df" -- Lighter bg (colorcolm folds)
bg3 = "#ebdfe4" -- Lighter bg (cursor line)
bg4 = "#bdbfc9" -- Conceal, border fg
fg0 = "#4c4769" -- Lighter fg
fg1 = "#575279" -- Default fg
fg2 = "#625c87" -- Darker fg (status line)
fg3 = "#a8a3b3" -- Darker fg (line numbers, fold colums)
sel0 = "#d0d8d8" -- Popup bg, visual selection bg
sel1 = "#b8cece" -- Popup sel bg, search bg
local fg = ',fore:'..fg1..','
local bg = ',back:'..bg1..','
lexers.STYLE_DEFAULT = fg..bg
lexers.STYLE_NOTHING = ''
lexers.STYLE_CLASS = 'fore:'..yellow[1]
lexers.STYLE_COMMENT = 'fore:'..comment..',italics'
lexers.STYLE_CONSTANT = 'fore:'..orange[3]
lexers.STYLE_DEFINITON = 'fore:'..yellow[1]
lexers.STYLE_ERROR = 'fore:'..red[1]..',italics'
lexers.STYLE_FUNCTION = 'fore:'..cyan[3]
lexers.STYLE_KEYWORD = 'fore:'..magenta[1]
lexers.STYLE_LABEL = 'fore:'..magenta[1]
lexers.STYLE_NUMBER = 'fore:'..orange[1]
lexers.STYLE_OPERATOR = 'fore:'..fg2
lexers.STYLE_REGEX = 'fore:'..yellow[3]
lexers.STYLE_STRING = 'fore:'..green[1]
lexers.STYLE_PREPROCESSOR = 'fore:'..pink[3]
lexers.STYLE_TAG = 'fore:'..'fore:'..black[1]
lexers.STYLE_TYPE = 'fore:'..yellow[1]
lexers.STYLE_VARIABLE = 'fore:'..black[1]
lexers.STYLE_WHITESPACE = bg
lexers.STYLE_IDENTIFIER = 'fore:'..black[1]
lexers.STYLE_LINENUMBER = 'fore:'..fg3
lexers.STYLE_CURSOR = 'fore:'..fg2..',back:'..fg
lexers.STYLE_CURSOR_PRIMARY = 'fore:'..fg2..',back:'..fg1
lexers.STYLE_CURSOR_LINE = 'back:'..bg3
lexers.STYLE_COLOR_COLUMN = 'back:'..bg3
lexers.STYLE_SELECTION = 'back:'..sel0
lexers.STYLE_STATUS = fg..',back:'..bg0
lexers.STYLE_STATUS_FOCUSED = fg..',back:'..bg0
lexers.STYLE_SEPARATOR = lexers.STYLE_DEFAULT
lexers.STYLE_INFO = 'fore:default,back:default,bold'
lexers.STYLE_EOF = ''

13
vis/visrc.lua Normal file
View File

@ -0,0 +1,13 @@
-- load standard vis module, providing parts of the Lua API
require('vis')
vis.events.subscribe(vis.events.INIT, function()
-- Your global configuration options
end)
vis.events.subscribe(vis.events.WIN_OPEN, function(win) -- luacheck: no unused args
-- Your per window configuration options e.g.
vis:command('set theme dawnfox')
vis:command('set number')
vis:command('set cursorline')
end)

149
yambar/config.yml Normal file
View File

@ -0,0 +1,149 @@
mononki: &mononoki Mononoki Nerd Font Mono:pixelsize=16
color_fg: &color_fg e6ebf3ff
color_bg: &color_bg faf4ed00
tag_urgent: &tag_urgent {stack: [{background: {color: *color_bg}}, {underline: {size: 4, color: b4637aff}}]}
tag_focused: &tag_focused {stack: [{background: {color: *color_bg}}, {underline: {size: 4, color: 56949fff}}]}
tag_unfocused: &tag_unfocused {stack: [{background: {color: *color_bg}}, {underline: {size: 4, color: d8d8d8ff}}]}
bar:
height: 30
location: top
font: Mononoki Nerd Font Mono:pixelsize=18
spacing: 6
margin: 12
layer: top
foreground: *color_fg
background: *color_bg
left:
- river:
anchors:
- base: &river_base
left-margin: 10
right-margin: 13
default: {string: {text: , font: *mononoki}}
conditions:
id == 1: {string: {text: 1, font: *mononoki}}
id == 2: {string: {text: 2, font: *mononoki}}
id == 3: {string: {text: 3, font: *mononoki}}
id == 4: {string: {text: 4, font: *mononoki}}
id == 5: {string: {text: 5, font: *mononoki}}
id == 6: {string: {text: 6, font: *mononoki}}
id == 7: {string: {text: 7, font: *mononoki}}
id == 8: {string: {text: 8, font: *mononoki}}
id == 9: {string: {text: 9, font: *mononoki}}
id == 10: {string: {text: "scratchpad", font: *mononoki}}
id == 11: {string: {text: "work", font: *mononoki}}
content:
map:
on-click:
left: sh -c "riverctl set-focused-tags $((1 << ({id} - 1)))"
right: sh -c "riverctl toggle-focused-tags $((1 << ({id} -1)))"
middle: sh -c "riverctl toggle-view-tags $((1 << ({id} -1)))"
conditions:
state == urgent:
map:
<<: *river_base
deco: *tag_urgent
state == focused:
map:
<<: *river_base
deco: *tag_focused
state == visible && ~occupied:
map:
<<: *river_base
state == visible && occupied:
map:
<<: *river_base
deco: *tag_unfocused
state == unfocused:
map:
<<: *river_base
state == invisible && ~occupied: {empty: {}}
state == invisible && occupied:
map:
<<: *river_base
deco: *tag_unfocused
center:
#- river:
# title: {string: { text: "{title}" }}
# content:
# map:
# conditions:
# ~occupied: {empty: {}}
- clock:
date-format: "%a %b %d"
time-format: "%I:%M"
content:
string: {text: "{date} {time}"}
right:
#- removables:
# content:
# map:
# conditions:
# ~mounted:
# string:
# on-click: udisksctl mount -b {device}
# text: "{label}"
# font: *mononoki
# deco: {underline: {size: 4, color: d8d8d8ff}}
# mounted:
# string:
# on-click: udisksctl unmount -b {device}
# text: "{label} "
# font: *mononoki
# deco: {underline: {size: 4, color: 56949fff}}
#- cpu:
# poll-interval: 2500
# content:
# map:
# conditions:
# id >= 0:
# - ramp:
# tag: cpu
# items:
# - string: {text: ▁}
# - string: {text: ▂}
# - string: {text: ▃}
# - string: {text: ▄}
# - string: {text: ▅}
# - string: {text: ▆}
# - string: {text: ▇}
# - string: {text: █}
- network:
name: wlp3s0
content:
map:
conditions:
state == "down":
string:
text: "Network: {state}"
font: *mononoki
deco: {underline: {size: 4, color: b4637aff}}
state != "down":
string:
text: "Network: {state}"
font: *mononoki
deco: {underline: {size: 4, color: d8d8d8ff}}
- mem:
poll-interval: 2500
content:
map:
conditions:
used >= 8589934592:
string:
text: "RAM: {used:mb}MB"
font: *mononoki
deco: {underline: {size: 4, color: b4637aff}}
used < 8589934592:
string:
text: "RAM: {used:mb}MB"
font: *mononoki
deco: {underline: {size: 4, color: d8d8d8ff}}