Added AUR build, and added a few QoL type updates.
Browse files
+37 −0 PKGBUILD new file mode 100644
| @@ -0,0 +1,37 @@ | ||
| 1 | +# Maintainer: Tony, btw <tony@tonybtw.com> | |
| 2 | +pkgname='oxwm-git' | |
| 3 | +_pkgname='oxwm' | |
| 4 | +pkgver=0.3.0.25.g0b0d9e3 | |
| 5 | +pkgrel=1 | |
| 6 | +arch=('x86_64') | |
| 7 | +url="https://github.com/tonybanters/oxwm" | |
| 8 | +pkgdesc="DWM but better with sane defaults, and not suckless." | |
| 9 | +license=('GPL-3.0-or-later') | |
| 10 | +depends=('libx11' 'libxft' 'libxcb' 'fontconfig' 'freetype2' 'libxrender') | |
| 11 | +makedepends=('cargo' 'git') | |
| 12 | +provides=('oxwm') | |
| 13 | +conflicts=('oxwm') | |
| 14 | +source=("$_pkgname::git+https://github.com/tonybanters/oxwm.git") | |
| 15 | +sha256sums=('SKIP') | |
| 16 | + | |
| 17 | +pkgver() { | |
| 18 | + cd $_pkgname | |
| 19 | + echo "$(grep '^version =' Cargo.toml | head -n1 | cut -d\" -f2).$(git rev-list --count HEAD).g$(git rev-parse --short HEAD)" | |
| 20 | +} | |
| 21 | + | |
| 22 | +build() { | |
| 23 | + cd $_pkgname | |
| 24 | + cargo build --release --locked | |
| 25 | +} | |
| 26 | + | |
| 27 | +check() { | |
| 28 | + cd $_pkgname | |
| 29 | + cargo test --release | |
| 30 | +} | |
| 31 | + | |
| 32 | +package() { | |
| 33 | + cd $_pkgname | |
| 34 | + install -Dm755 "target/release/$_pkgname" "$pkgdir/usr/bin/$_pkgname" | |
| 35 | + install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE" | |
| 36 | + install -Dm644 oxwm.desktop "$pkgdir/usr/share/xsessions/oxwm.desktop" | |
| 37 | +} |
+6 −0 oxwm.desktop new file mode 100644
| @@ -0,0 +1,6 @@ | ||
| 1 | +[Desktop Entry] | |
| 2 | +Name=oxwm | |
| 3 | +Comment=DWM but better with sane defaults | |
| 4 | +Exec=oxwm | |
| 5 | +Type=Application | |
| 6 | +Keywords=wm;windowmanager;window;manager; |
+3 −1 src/layout/mod.rs
| @@ -3,6 +3,8 @@ pub mod tiling; | ||
| 3 | 3 | |
| 4 | 4 | use x11rb::protocol::xproto::Window; |
| 5 | 5 | |
| 6 | +pub type LayoutBox = Box<dyn Layout>; | |
| 7 | + | |
| 6 | 8 | pub struct GapConfig { |
| 7 | 9 | pub inner_horizontal: u32, |
| 8 | 10 | pub inner_vertical: u32, |
| @@ -14,7 +16,7 @@ pub const TILING: &str = "tiling"; | ||
| 14 | 16 | pub const NORMIE: &str = "normie"; |
| 15 | 17 | pub const FLOATING: &str = "floating"; |
| 16 | 18 | |
| 17 | -pub fn layout_from_str(s: &str) -> Result<Box<dyn Layout>, String> { | |
| 19 | +pub fn layout_from_str(s: &str) -> Result<LayoutBox, String> { | |
| 18 | 20 | match s.to_lowercase().as_str() { |
| 19 | 21 | TILING => Ok(Box::new(tiling::TilingLayout)), |
| 20 | 22 | NORMIE | FLOATING => Ok(Box::new(normie::NormieLayout)), |
+2 −2 src/window_manager.rs
| @@ -4,7 +4,7 @@ use crate::errors::WmError; | ||
| 4 | 4 | use crate::keyboard::{self, Arg, KeyAction, handlers}; |
| 5 | 5 | use crate::layout::GapConfig; |
| 6 | 6 | use crate::layout::tiling::TilingLayout; |
| 7 | -use crate::layout::{Layout, layout_from_str, next_layout}; | |
| 7 | +use crate::layout::{Layout, LayoutBox, layout_from_str, next_layout}; | |
| 8 | 8 | use crate::monitor::{Monitor, detect_monitors}; |
| 9 | 9 | use std::collections::HashSet; |
| 10 | 10 | use x11rb::cursor::Handle as CursorHandle; |
| @@ -54,7 +54,7 @@ pub struct WindowManager { | ||
| 54 | 54 | root: Window, |
| 55 | 55 | screen: Screen, |
| 56 | 56 | windows: Vec<Window>, |
| 57 | - layout: Box<dyn Layout>, | |
| 57 | + layout: LayoutBox, | |
| 58 | 58 | window_tags: std::collections::HashMap<Window, TagMask>, |
| 59 | 59 | window_monitor: std::collections::HashMap<Window, usize>, |
| 60 | 60 | window_geometries: std::collections::HashMap<Window, (i16, i16, u16, u16)>, |