Add default config with no snowcap

This commit is contained in:
Ottatop 2024-06-15 20:31:30 -05:00
parent 6be6c6d5f6
commit 23b1e9d62a
6 changed files with 55 additions and 21 deletions

View file

@ -1,5 +1,3 @@
- Re-add raising file descriptor limit
- Like an idiot I managed to remove that sometime and not add it back
- Provide scale and transform on new window/layer
Problems:
@ -8,4 +6,3 @@ Problems:
- Xwayland popups are screwed when the output is not at (0, 0)
- Dragging an xwayland window to another output and closing a nested right click menu closes the whole
right click menu because the keyboard focus is getting updated on the original output.
- Transactions don't render floating windows

View file

@ -4,4 +4,8 @@ version = "0.1.0"
edition = "2021"
[dependencies]
pinnacle-api = { git = "http://github.com/pinnacle-comp/pinnacle" }
pinnacle-api = { git = "http://github.com/pinnacle-comp/pinnacle", default-features = false }
[features]
default = ["snowcap"]
snowcap = ["pinnacle-api/snowcap"]

View file

@ -19,7 +19,6 @@ use pinnacle_api::{
#[pinnacle_api::config(modules)]
async fn main() {
// Deconstruct to get all the APIs.
#[cfg(feature = "snowcap")]
#[allow(unused_variables)]
let ApiModules {
pinnacle,
@ -30,24 +29,11 @@ async fn main() {
tag,
layout,
render,
#[cfg(feature = "snowcap")]
snowcap,
..
} = modules;
#[cfg(not(feature = "snowcap"))]
#[allow(unused_variables)]
let ApiModules {
pinnacle,
process,
window,
input,
output,
tag,
layout,
render,
..
} = modules;
let mod_key = Mod::Ctrl;
let terminal = "alacritty";
@ -71,11 +57,11 @@ async fn main() {
//------------------------
// `mod_key + s` shows the keybind overlay
#[cfg(feature = "snowcap")]
input.keybind(
[mod_key],
's',
|| {
#[cfg(feature = "snowcap")]
snowcap.integration.keybind_overlay().show();
},
KeybindInfo {
@ -91,7 +77,6 @@ async fn main() {
|| {
#[cfg(feature = "snowcap")]
snowcap.integration.quit_prompt().show();
#[cfg(not(feature = "snowcap"))]
pinnacle.quit();
},

View file

@ -0,0 +1 @@
../default_config/main.rs

View file

@ -0,0 +1,46 @@
# This metaconfig.toml file dictates what config Pinnacle will run.
#
# When running Pinnacle, the compositor will look in the following directories for a metaconfig.toml file,
# in order from top to bottom:
# $PINNACLE_CONFIG_DIR
# $XDG_CONFIG_HOME/pinnacle/
# ~/.config/pinnacle/
#
# When Pinnacle finds a metaconfig.toml file, it will execute the command provided to `command`.
# To use a Rust config, this should be changed to something like ["cargo", "run"].
#
# Because configuration is done using an external process, if it ever crashes, you lose all of your keybinds.
# The compositor will load the default config if that happens, but in the event that you don't have
# the necessary dependencies for it to run, you may get softlocked.
# In order prevent you from getting stuck in the compositor, you must define keybinds to reload your config
# and kill Pinnacle.
#
# More details on each setting can be found below.
# The command Pinnacle will run on startup and when you reload your config.
# Paths are relative to the directory the metaconfig.toml file is in.
# This must be an array.
command = ["cargo", "run", "--example", "default_config", "--no-default-features"]
### Keybinds ###
# Each keybind takes in a table with two fields: `modifiers` and `key`.
# - `modifiers` can be one of "Ctrl", "Alt", "Shift", or "Super".
# - `key` can be a string of any lowercase letter, number,
# "numN" where N is a number for numpad keys, or "esc"/"escape".
# Support for any xkbcommon key is planned for a future update.
# The keybind that will reload your config.
reload_keybind = { modifiers = ["Ctrl", "Alt"], key = "r" }
# The keybind that will kill Pinnacle.
kill_keybind = { modifiers = ["Ctrl", "Alt", "Shift"], key = "escape" }
### Socket directory ###
# Pinnacle will open a Unix socket at `$XDG_RUNTIME_DIR` by default, falling back to `/tmp` if it doesn't exist.
# If you want/need to change this, use the `socket_dir` setting set to the directory of your choosing.
#
# socket_dir = "/your/dir/here/"
### Environment Variables ###
# If you need to spawn your config with any environment variables, list them here.
[envs]
# key = "value"

View file

@ -85,6 +85,7 @@ use pinnacle::Pinnacle;
use process::Process;
use render::Render;
use signal::SignalState;
#[cfg(feature = "snowcap")]
use snowcap::Snowcap;
use tag::Tag;
use tokio::{