Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Lua for configuration #30

Merged
merged 136 commits into from
Jan 19, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
136 commits
Select commit Hold shift + click to select a range
b6c6b8c
replace topbar with bool
ntBre Aug 24, 2024
97088a9
showbar bool
ntBre Aug 24, 2024
a1c917b
add a toml config file for a few basic options
ntBre Aug 24, 2024
9ef87ff
more fields on config and make some bools
ntBre Aug 24, 2024
ade4086
move fonts into config, reset default to 10 like dwm
ntBre Aug 24, 2024
37f72ab
take fontcount from fonts.len() directly
ntBre Aug 24, 2024
be41105
loop over fonts directly
ntBre Aug 24, 2024
6110721
load tags from config
ntBre Aug 24, 2024
3f262eb
switch config from toml to fig
ntBre Aug 24, 2024
67f5129
working on colors
ntBre Aug 24, 2024
8fe13f8
finish colors
ntBre Aug 25, 2024
5d9e22f
update to fig with int and float
ntBre Aug 25, 2024
d973eb3
document get_colors
ntBre Aug 25, 2024
fb39009
experimenting with dmenucmd and key handling in fig
ntBre Aug 25, 2024
74bc1a9
convert Arg to an enum
ntBre Aug 25, 2024
7f93022
make key_handlers rust fns for unwinding
ntBre Aug 25, 2024
ada861e
log some args
ntBre Aug 25, 2024
e43a180
fix incorrect types for setlayout and view
ntBre Aug 25, 2024
9f68e9f
add layout index variant for Arg
ntBre Aug 25, 2024
26c73cb
replace MODKEY | ShiftMask with S_MOD
ntBre Aug 25, 2024
eb87a8e
reorder and replace Mod + Ctrl + Shift too
ntBre Aug 25, 2024
8171458
Arg::V doesn't need to be void anymore
ntBre Aug 25, 2024
aead579
don't make Arg Copy
ntBre Aug 25, 2024
701e112
use rust strings and Command::spawn for spawn
ntBre Aug 25, 2024
f6408e3
move KEYS to CONFIG
ntBre Aug 25, 2024
39976c0
make keys a vec
ntBre Aug 25, 2024
b97ca59
go through get_keys
ntBre Aug 25, 2024
9bd794e
work on loading keys from config
ntBre Aug 25, 2024
9e2914c
move key module to its own file
ntBre Aug 25, 2024
3e52810
successfully load keys from a Fig file
ntBre Aug 25, 2024
fd6f7a2
add systray config options
ntBre Aug 29, 2024
5148837
add xembed #defines
ntBre Aug 29, 2024
ca7062a
add atoms
ntBre Aug 29, 2024
cc65103
add Systray struct
ntBre Aug 29, 2024
2548f59
add most of the code, minus remaining systray functions
ntBre Aug 29, 2024
e6fba6a
impl updatesystrayicongeom
ntBre Aug 29, 2024
8ae68d5
impl updatesystrayiconstate
ntBre Aug 29, 2024
9075192
impl wintosystrayicon
ntBre Aug 29, 2024
4eb1b2c
impl systraytomon
ntBre Aug 29, 2024
c51047c
const -> static to prevent constant comparison error lint
ntBre Aug 29, 2024
3e87d8d
impl updatesystray
ntBre Aug 29, 2024
60f86e4
handle clippy
ntBre Aug 29, 2024
f76b8d7
Merge branch 'patch/systray' into fig
ntBre Aug 29, 2024
f1e6b0c
make SYSTRAYONLEFT a bool
ntBre Aug 29, 2024
f2f45ec
make SHOWSYSTRAY a bool
ntBre Aug 29, 2024
946fe93
make SYSTRAYPINNINGFAILFIRST a bool
ntBre Aug 30, 2024
1856f17
use new try_into impl
ntBre Aug 30, 2024
0756c95
tidy imports
ntBre Aug 30, 2024
bb99486
remove some pubs to see what needs to be loaded still
ntBre Aug 30, 2024
175770f
add Pertag and allocate one when creating a Monitor
ntBre Aug 30, 2024
b4dcf97
update focusstack and setlayout
ntBre Aug 30, 2024
09567ee
update togglebar, setmfact, and toggleview
ntBre Aug 30, 2024
1a35810
update view
ntBre Aug 31, 2024
778d47e
actually capture the chained assignment semantics
ntBre Aug 31, 2024
c2ddbcd
realize that I had two separate view functions, clippy for mem::swap
ntBre Aug 31, 2024
f2a5c43
Merge branch 'patch/pertag' into fig
ntBre Aug 31, 2024
95feefa
fix off-by-one for pertag
ntBre Aug 31, 2024
0673cb9
make isfullscreen bool
ntBre Aug 31, 2024
c69d97b
Implement window swallowing (#24)
ntBre Sep 1, 2024
c7b010f
add rule to example.fig
ntBre Sep 1, 2024
f594643
use rules from config
ntBre Sep 1, 2024
a96e370
move other config options to CONFIG
ntBre Sep 1, 2024
a325e6d
import CONFIG everywhere instead of config::CONFIG
ntBre Sep 1, 2024
547a356
break buttons and layouts, last two field for CONFIG
ntBre Sep 1, 2024
1414c3a
load buttons and layouts from config
ntBre Sep 1, 2024
e2203ea
rename fields for clippy
ntBre Sep 1, 2024
e8dd547
simplify float and bool
ntBre Sep 1, 2024
a905ef9
simplify str_list and make sure it works
ntBre Sep 1, 2024
8ffa27a
add fullscreen toggle from my dwm config
ntBre Sep 1, 2024
52a3fe1
Add scratchpad patch (#25)
ntBre Sep 1, 2024
711b659
take scratchpadname from config
ntBre Sep 1, 2024
b2b2438
allow binding togglescratch
ntBre Sep 1, 2024
260bd61
make sure cstring lives long enough
ntBre Sep 1, 2024
459e7fc
use normal string comparison
ntBre Sep 1, 2024
9a2586f
Revert "use normal string comparison"
ntBre Sep 1, 2024
0dc07be
Revert "make sure cstring lives long enough"
ntBre Sep 1, 2024
124d549
really fix scratchpad (I hope)
ntBre Sep 1, 2024
af31373
Merge master into `fig` and new lints (#32)
ntBre Nov 23, 2024
1298052
Merge branch 'master' into fig
ntBre Nov 23, 2024
ac82de7
Merge branch 'master' into fig
ntBre Nov 23, 2024
7d24e12
clean up some unused imports and initial value
ntBre Nov 23, 2024
b1c98cd
add xcb to fix sxiv window swallowing
ntBre Nov 23, 2024
744c214
add recipe for testing with xephyr, already catching an underflow
ntBre Nov 23, 2024
5770468
convert to i32 first to avoid underflow
ntBre Nov 23, 2024
5ca63da
fix imports for non-linux code
ntBre Nov 23, 2024
3cff408
try to get clippy to catch this
ntBre Nov 23, 2024
cc32dc8
Add part of the stacker patch (#33)
ntBre Nov 23, 2024
147d42b
Use Xvfb for automated tests (#37)
ntBre Dec 5, 2024
17bf190
move tests to their own file
ntBre Dec 5, 2024
5ad1456
clippy on tests too
ntBre Dec 5, 2024
17ed881
Start moving global state into a `State` struct, starting with `Curso…
ntBre Dec 5, 2024
cc3072e
plumb State with BH through everything
ntBre Dec 5, 2024
16081ec
move atoms into State
ntBre Dec 5, 2024
375276f
make sure rwm exits successfully in xephyr
ntBre Dec 5, 2024
0c0ffe7
move DPY into state
ntBre Dec 5, 2024
8f92234
move SW into state and finally have to pass &mut State everywhere
ntBre Dec 5, 2024
30de839
move all cleanup code into `cleanup`
ntBre Dec 5, 2024
73912d4
missing state for macos
ntBre Dec 5, 2024
d8d8810
move DRW into state
ntBre Dec 5, 2024
4730433
hold a Drw not *mut Drw
ntBre Dec 6, 2024
ef404e0
add notes on drw::free
ntBre Dec 6, 2024
deb0548
switch to Vec<Fnt>
ntBre Dec 6, 2024
43ec71c
state.SELMON
ntBre Dec 6, 2024
1b0a4db
lowercase selmon
ntBre Dec 6, 2024
db3646c
delete leftover drw comment
ntBre Dec 6, 2024
6bc3c25
state.MONS
ntBre Dec 6, 2024
8970aa6
lowercase mons
ntBre Dec 6, 2024
a0c2285
state.STEXT
ntBre Dec 6, 2024
4c9b950
lowercase stext
ntBre Dec 6, 2024
3ac23d1
use &raw instead of addr_of
ntBre Dec 6, 2024
70470a5
move state to its own module and file
ntBre Dec 6, 2024
b8ad873
state.scheme
ntBre Dec 6, 2024
686b5aa
use Vecs of colors
ntBre Dec 6, 2024
2de4a22
add newtype ClrScheme for nicer indexing
ntBre Dec 6, 2024
49534a9
make Monitor hold Pertag, not *mut Pertag
ntBre Dec 6, 2024
7d07df0
mac should also have Xvfb
ntBre Dec 6, 2024
fe35c67
make rect take &mut Drw
ntBre Dec 6, 2024
14c94ff
make invert bool
ntBre Dec 6, 2024
c772131
use refs
ntBre Dec 7, 2024
6f02687
allow clippy fix when dirty
ntBre Dec 7, 2024
af78fc2
more refs
ntBre Dec 7, 2024
7f06aef
font_getexts never used h
ntBre Dec 7, 2024
97c52cb
clean up some more unused unsafe
ntBre Dec 7, 2024
4316960
make charexists bool
ntBre Dec 7, 2024
dfec5e7
utf8decode was only called with clen = UTF_SIZ
ntBre Dec 7, 2024
c8a64ab
Delete UTF-8 decoding, switch to String (#40)
ntBre Dec 7, 2024
110175e
Merge branch 'fig' of github.com:ntBre/rwm into fig
ntBre Dec 7, 2024
4dc8fee
state.sh
ntBre Dec 7, 2024
375d57e
state.root and state.screen
ntBre Dec 7, 2024
52163de
state.lrpad
ntBre Dec 7, 2024
4bc8ddf
clean up some lrpad arithmetic
ntBre Dec 7, 2024
b472052
move almost all static mut into state
ntBre Dec 7, 2024
6f56804
move xerrorlib where it's used and document its necessity
ntBre Dec 7, 2024
4b69602
own systray
ntBre Dec 7, 2024
77af6a6
fix mac xcon issues
ntBre Dec 7, 2024
2d1682c
Use Lua for configuration (#42)
ntBre Jan 19, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
- name: Install X libraries
run: |
sudo apt-get update
sudo apt-get install libxft-dev libxinerama-dev
sudo apt-get install libxft-dev libxinerama-dev lua5.4 liblua5.4-dev
- name: Install ${{ matrix.toolchain }}
uses: dtolnay/rust-toolchain@master
with:
Expand All @@ -58,7 +58,7 @@ jobs:
- name: Install X libraries
run: |
sudo apt-get update
sudo apt-get install libxft-dev libxinerama-dev
sudo apt-get install libxft-dev libxinerama-dev lua5.4 liblua5.4-dev
- name: Install nightly
uses: dtolnay/rust-toolchain@nightly
- name: cargo doc
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,13 @@ jobs:
if: ${{ ! matrix.is_mac }}
run: |
sudo apt-get update
sudo apt-get install libxft-dev libxinerama-dev
sudo apt-get install libxft-dev libxinerama-dev xserver-xephyr libxcb1-dev lua5.4 liblua5.4-dev
- name: Install X libraries (mac)
if: ${{ matrix.is_mac }}
run: |
brew install libxft libxinerama
brew install libxft libxinerama lua
brew install --cask xquartz
echo "PATH=$PATH:/opt/X11/bin" >> $GITHUB_ENV
- name: Install ${{ matrix.toolchain }}
uses: dtolnay/rust-toolchain@master
with:
Expand All @@ -39,5 +41,3 @@ jobs:
# https://twitter.com/jonhoo/status/1571290371124260865
- name: cargo test --locked
run: cargo test --locked --all-features --lib --bins --tests --examples -- --test-threads=1
- name: cargo bench
run: cargo bench
Loading
Loading