mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-04-25 01:58:51 +02:00
3
.gitignore
vendored
3
.gitignore
vendored
@@ -3,4 +3,5 @@
|
|||||||
/target
|
/target
|
||||||
CHANGELOG.md
|
CHANGELOG.md
|
||||||
dummy.go
|
dummy.go
|
||||||
komorebi.ahk
|
komorebi.ahk
|
||||||
|
komorebic/applications.yaml
|
||||||
@@ -1,27 +0,0 @@
|
|||||||
{
|
|
||||||
"$schema": "https://raw.githubusercontent.com/LGUG2Z/komorebi/v0.1.22/schema.json",
|
|
||||||
"app_specific_configuration_path": "$Env:USERPROFILE/applications.yaml",
|
|
||||||
"window_hiding_behaviour": "Cloak",
|
|
||||||
"cross_monitor_move_behaviour": "Insert",
|
|
||||||
"default_workspace_padding": 20,
|
|
||||||
"default_container_padding": 20,
|
|
||||||
"border_padding": 8,
|
|
||||||
"border_offset": -1,
|
|
||||||
"active_window_border": false,
|
|
||||||
"active_window_border_colours": {
|
|
||||||
"single": "#42a5f5",
|
|
||||||
"stack": "#00a542",
|
|
||||||
"monocle": "#ff3399"
|
|
||||||
},
|
|
||||||
"monitors": [
|
|
||||||
{
|
|
||||||
"workspaces": [
|
|
||||||
{ "name": "I", "layout": "BSP" },
|
|
||||||
{ "name": "II", "layout": "VerticalStack" },
|
|
||||||
{ "name": "III", "layout": "HorizontalStack" },
|
|
||||||
{ "name": "IV", "layout": "UltrawideVerticalStack" },
|
|
||||||
{ "name": "V", "layout": "Rows" }
|
|
||||||
]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
@@ -32,4 +32,7 @@ sysinfo = "0.30"
|
|||||||
thiserror = "1"
|
thiserror = "1"
|
||||||
uds_windows = "1"
|
uds_windows = "1"
|
||||||
which = "6"
|
which = "6"
|
||||||
windows = { workspace = true }
|
windows = { workspace = true }
|
||||||
|
|
||||||
|
[build-dependencies]
|
||||||
|
reqwest = { version = "0.11", features = ["blocking"] }
|
||||||
|
|||||||
8
komorebic/build.rs
Normal file
8
komorebic/build.rs
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
fn main() {
|
||||||
|
if std::fs::metadata("applications.yaml").is_err() {
|
||||||
|
let applications_yaml = reqwest::blocking::get(
|
||||||
|
"https://raw.githubusercontent.com/LGUG2Z/komorebi-application-specific-configuration/master/applications.yaml"
|
||||||
|
).unwrap().text().unwrap();
|
||||||
|
std::fs::write("applications.yaml", applications_yaml).unwrap();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1256,8 +1256,6 @@ fn main() -> Result<()> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
SubCommand::Quickstart => {
|
SubCommand::Quickstart => {
|
||||||
let version = env!("CARGO_PKG_VERSION");
|
|
||||||
|
|
||||||
let home_dir = dirs::home_dir().expect("could not find home dir");
|
let home_dir = dirs::home_dir().expect("could not find home dir");
|
||||||
let config_dir = home_dir.join(".config");
|
let config_dir = home_dir.join(".config");
|
||||||
let local_appdata_dir = data_local_dir().expect("could not find localdata dir");
|
let local_appdata_dir = data_local_dir().expect("could not find localdata dir");
|
||||||
@@ -1265,21 +1263,13 @@ fn main() -> Result<()> {
|
|||||||
std::fs::create_dir_all(&config_dir)?;
|
std::fs::create_dir_all(&config_dir)?;
|
||||||
std::fs::create_dir_all(data_dir)?;
|
std::fs::create_dir_all(data_dir)?;
|
||||||
|
|
||||||
let komorebi_json = reqwest::blocking::get(
|
let komorebi_json = include_str!("../../docs/komorebi.example.json");
|
||||||
format!("https://raw.githubusercontent.com/LGUG2Z/komorebi/v{version}/komorebi.example.json")
|
|
||||||
)?.text()?;
|
|
||||||
std::fs::write(HOME_DIR.join("komorebi.json"), komorebi_json)?;
|
std::fs::write(HOME_DIR.join("komorebi.json"), komorebi_json)?;
|
||||||
|
|
||||||
let applications_yaml = reqwest::blocking::get(
|
let applications_yaml = include_str!("../applications.yaml");
|
||||||
"https://raw.githubusercontent.com/LGUG2Z/komorebi-application-specific-configuration/master/applications.yaml"
|
|
||||||
)?
|
|
||||||
.text()?;
|
|
||||||
std::fs::write(HOME_DIR.join("applications.yaml"), applications_yaml)?;
|
std::fs::write(HOME_DIR.join("applications.yaml"), applications_yaml)?;
|
||||||
|
|
||||||
let whkdrc = reqwest::blocking::get(format!(
|
let whkdrc = include_str!("../../docs/whkdrc.sample");
|
||||||
"https://raw.githubusercontent.com/LGUG2Z/komorebi/v{version}/whkdrc.sample"
|
|
||||||
))?
|
|
||||||
.text()?;
|
|
||||||
std::fs::write(config_dir.join("whkdrc"), whkdrc)?;
|
std::fs::write(config_dir.join("whkdrc"), whkdrc)?;
|
||||||
|
|
||||||
println!("Example ~/komorebi.json, ~/.config/whkdrc and latest ~/applications.yaml files downloaded");
|
println!("Example ~/komorebi.json, ~/.config/whkdrc and latest ~/applications.yaml files downloaded");
|
||||||
|
|||||||
@@ -1,63 +0,0 @@
|
|||||||
.shell powershell
|
|
||||||
|
|
||||||
# Reload whkd configuration
|
|
||||||
# alt + o : taskkill /f /im whkd.exe && start /b whkd # if shell is cmd
|
|
||||||
alt + o : taskkill /f /im whkd.exe; Start-Process whkd -WindowStyle hidden # if shell is pwsh / powershell
|
|
||||||
alt + shift + o : komorebic reload-configuration
|
|
||||||
|
|
||||||
# App shortcuts - these require shell to be pwsh / powershell
|
|
||||||
# The apps will be focused if open, or launched if not open
|
|
||||||
# alt + f : if ($wshell.AppActivate('Firefox') -eq $False) { start firefox }
|
|
||||||
# alt + b : if ($wshell.AppActivate('Chrome') -eq $False) { start chrome }
|
|
||||||
|
|
||||||
# Focus windows
|
|
||||||
alt + h : komorebic focus left
|
|
||||||
alt + j : komorebic focus down
|
|
||||||
alt + k : komorebic focus up
|
|
||||||
alt + l : komorebic focus right
|
|
||||||
alt + shift + oem_4 : komorebic cycle-focus previous # oem_4 is [
|
|
||||||
alt + shift + oem_6 : komorebic cycle-focus next # oem_6 is ]
|
|
||||||
|
|
||||||
# Move windows
|
|
||||||
alt + shift + h : komorebic move left
|
|
||||||
alt + shift + j : komorebic move down
|
|
||||||
alt + shift + k : komorebic move up
|
|
||||||
alt + shift + l : komorebic move right
|
|
||||||
alt + shift + return : komorebic promote
|
|
||||||
|
|
||||||
# Stack windows
|
|
||||||
alt + left : komorebic stack left
|
|
||||||
alt + down : komorebic stack down
|
|
||||||
alt + up : komorebic stack up
|
|
||||||
alt + right : komorebic stack right
|
|
||||||
alt + oem_1 : komorebic unstack # oem_1 is ;
|
|
||||||
alt + oem_4 : komorebic cycle-stack previous # oem_4 is [
|
|
||||||
alt + oem_6 : komorebic cycle-stack next # oem_6 is ]
|
|
||||||
|
|
||||||
# Resize
|
|
||||||
alt + oem_plus : komorebic resize-axis horizontal increase
|
|
||||||
alt + oem_minus : komorebic resize-axis horizontal decrease
|
|
||||||
alt + shift + oem_plus : komorebic resize-axis vertical increase
|
|
||||||
alt + shift + oem_minus : komorebic resize-axis vertical decrease
|
|
||||||
|
|
||||||
# Manipulate windows
|
|
||||||
alt + t : komorebic toggle-float
|
|
||||||
alt + shift + f : komorebic toggle-monocle
|
|
||||||
|
|
||||||
# Window manager options
|
|
||||||
alt + shift + r : komorebic retile
|
|
||||||
alt + p : komorebic toggle-pause
|
|
||||||
|
|
||||||
# Layouts
|
|
||||||
alt + x : komorebic flip-layout horizontal
|
|
||||||
alt + y : komorebic flip-layout vertical
|
|
||||||
|
|
||||||
# Workspaces
|
|
||||||
alt + 1 : komorebic focus-workspace 0
|
|
||||||
alt + 2 : komorebic focus-workspace 1
|
|
||||||
alt + 3 : komorebic focus-workspace 2
|
|
||||||
|
|
||||||
# Move windows across workspaces
|
|
||||||
alt + shift + 1 : komorebic move-to-workspace 0
|
|
||||||
alt + shift + 2 : komorebic move-to-workspace 1
|
|
||||||
alt + shift + 3 : komorebic move-to-workspace 2
|
|
||||||
Reference in New Issue
Block a user