| 1 | #![enable(implicit_some)] |
| 2 | // OXWM Configuration File |
| 3 | // Edit this file and reload with Mod+Shift+R (no compilation needed!) |
| 4 | |
| 5 | #DEFINE $terminal = "st" |
| 6 | #DEFINE $color_blue = 0x6dade3 |
| 7 | #DEFINE $color_grey = 0xbbbbbb |
| 8 | #DEFINE $color_green = 0x9ece6a |
| 9 | #DEFINE $color_red = 0xf7768e |
| 10 | #DEFINE $color_cyan = 0x0db9d7 |
| 11 | #DEFINE $color_purple = 0xad8ee6 |
| 12 | #DEFINE $color_lavender = 0xa9b1d6 |
| 13 | #DEFINE $color_bg = 0x1a1b26 |
| 14 | #DEFINE $color_fg = 0xbbbbbb |
| 15 | #DEFINE $color_light_blue = 0x7aa2f7 |
| 16 | #DEFINE $modkey = Mod4 |
| 17 | #DEFINE $secondary_modkey = Mod1 |
| 18 | |
| 19 | ( |
| 20 | border_width: 2, |
| 21 | border_focused: $color_blue, |
| 22 | border_unfocused: $color_grey, |
| 23 | font: "monospace:style=Bold:size=10", |
| 24 | |
| 25 | gaps_enabled: true, |
| 26 | gap_inner_horizontal: 5, |
| 27 | gap_inner_vertical: 5, |
| 28 | gap_outer_horizontal: 5, |
| 29 | gap_outer_vertical: 5, |
| 30 | |
| 31 | modkey: $modkey, |
| 32 | |
| 33 | terminal: $terminal, |
| 34 | |
| 35 | tags: ["1", "2", "3", "4", "5", "6", "7", "8", "9"], |
| 36 | layout_symbols: [ |
| 37 | (name: "tiling", symbol: "[T]"), |
| 38 | (name: "normie", symbol: "[F]"), |
| 39 | ], |
| 40 | |
| 41 | // Keybinding Format: |
| 42 | // |
| 43 | // New format (supports keychords - multi-key sequences): |
| 44 | // (keys: [(modifiers: [...], key: X), (modifiers: [...], key: Y)], action: ..., arg: ...) |
| 45 | // |
| 46 | // Old format (single key, backwards compatible): |
| 47 | // (modifiers: [...], key: X, action: ..., arg: ...) |
| 48 | // |
| 49 | // Examples: |
| 50 | // Single key: (keys: [(modifiers: [Mod4], key: Return)], action: Spawn, arg: "st") |
| 51 | // Keychord: (keys: [(modifiers: [Mod4], key: Space), (modifiers: [], key: F)], action: Spawn, arg: "firefox") |
| 52 | // |
| 53 | // You can cancel any in-progress keychord by pressing Escape. |
| 54 | |
| 55 | keybindings: [ |
| 56 | // Basic keybindings (old format for backwards compatibility) |
| 57 | (modifiers: [$modkey], key: Return, action: Spawn, arg: $terminal), |
| 58 | (modifiers: [$modkey], key: D, action: Spawn, arg: ["sh", "-c", "dmenu_run -l 10"]), |
| 59 | (modifiers: [$modkey], key: S, action: Spawn, arg: ["sh", "-c", "maim -s | xclip -selection clipboard -t image/png"]), |
| 60 | (modifiers: [$modkey], key: Q, action: KillClient), |
| 61 | (modifiers: [$modkey, Shift], key: F, action: ToggleFullScreen), |
| 62 | (modifiers: [$modkey, Shift], key: Space, action: ToggleFloating), |
| 63 | (modifiers: [$modkey], key: F, action: ChangeLayout, arg: "normie"), |
| 64 | (modifiers: [$modkey], key: C, action: ChangeLayout, arg: "tiling"), |
| 65 | (modifiers: [$secondary_modkey], key: N, action: CycleLayout), |
| 66 | (modifiers: [$modkey], key: A, action: ToggleGaps), |
| 67 | (modifiers: [$modkey, Shift], key: Q, action: Quit), |
| 68 | (modifiers: [$modkey, Shift], key: R, action: Restart), |
| 69 | (modifiers: [$modkey], key: J, action: FocusStack, arg: -1), |
| 70 | (modifiers: [$modkey], key: K, action: FocusStack, arg: 1), |
| 71 | (modifiers: [$modkey], key: Comma, action: FocusMonitor, arg: -1), |
| 72 | (modifiers: [$modkey], key: Period, action: FocusMonitor, arg: 1), |
| 73 | (modifiers: [$modkey], key: Key1, action: ViewTag, arg: 0), |
| 74 | (modifiers: [$modkey], key: Key2, action: ViewTag, arg: 1), |
| 75 | (modifiers: [$modkey], key: Key3, action: ViewTag, arg: 2), |
| 76 | (modifiers: [$modkey], key: Key4, action: ViewTag, arg: 3), |
| 77 | (modifiers: [$modkey], key: Key5, action: ViewTag, arg: 4), |
| 78 | (modifiers: [$modkey], key: Key6, action: ViewTag, arg: 5), |
| 79 | (modifiers: [$modkey], key: Key7, action: ViewTag, arg: 6), |
| 80 | (modifiers: [$modkey], key: Key8, action: ViewTag, arg: 7), |
| 81 | (modifiers: [$modkey], key: Key9, action: ViewTag, arg: 8), |
| 82 | (modifiers: [$modkey, Shift], key: Key1, action: MoveToTag, arg: 0), |
| 83 | (modifiers: [$modkey, Shift], key: Key2, action: MoveToTag, arg: 1), |
| 84 | (modifiers: [$modkey, Shift], key: Key3, action: MoveToTag, arg: 2), |
| 85 | (modifiers: [$modkey, Shift], key: Key4, action: MoveToTag, arg: 3), |
| 86 | (modifiers: [$modkey, Shift], key: Key5, action: MoveToTag, arg: 4), |
| 87 | (modifiers: [$modkey, Shift], key: Key6, action: MoveToTag, arg: 5), |
| 88 | (modifiers: [$modkey, Shift], key: Key7, action: MoveToTag, arg: 6), |
| 89 | (modifiers: [$modkey, Shift], key: Key8, action: MoveToTag, arg: 7), |
| 90 | (modifiers: [$modkey, Shift], key: Key9, action: MoveToTag, arg: 8), |
| 91 | |
| 92 | // Moving Windows |
| 93 | (modifiers: [$modkey, Control], key: K, action: SmartMoveWin, arg: 0), // UP |
| 94 | (modifiers: [$modkey, Control], key: J, action: SmartMoveWin, arg: 1), // DOWN |
| 95 | (modifiers: [$modkey, Control], key: H, action: SmartMoveWin, arg: 2), // LEFT |
| 96 | (modifiers: [$modkey, Control], key: L, action: SmartMoveWin, arg: 3), // RIGHT |
| 97 | |
| 98 | // Exchanging Clients |
| 99 | (modifiers: [$modkey, Shift], key: K, action: ExchangeClient, arg: 0), // UP |
| 100 | (modifiers: [$modkey, Shift], key: J, action: ExchangeClient, arg: 1), // DOWN |
| 101 | (modifiers: [$modkey, Shift], key: H, action: ExchangeClient, arg: 2), // LEFT |
| 102 | (modifiers: [$modkey, Shift], key: L, action: ExchangeClient, arg: 3), // RIGHT |
| 103 | |
| 104 | // Example keychord bindings (uncomment to use): |
| 105 | // KEYCHORDS |
| 106 | // Press Mod4+Space, then t to spawn terminal |
| 107 | (keys: [(modifiers: [Mod4], key: Space), (modifiers: [], key: T)], action: Spawn, arg: $terminal), |
| 108 | ], |
| 109 | |
| 110 | status_blocks: [ |
| 111 | (format: "Ram: {used}/{total} GB", command: "Ram", interval_secs: 5, color: $color_light_blue, underline: true), |
| 112 | (format: " │ ", command: "Static", interval_secs: 18446744073709551615, color: $color_lavender, underline: false), |
| 113 | (format: "Kernel: {}", command: "Shell", command_arg: "uname -r", interval_secs: 18446744073709551615, color: $color_red, underline: true), |
| 114 | (format: " │ ", command: "Static", interval_secs: 18446744073709551615, color: $color_lavender, underline: false), |
| 115 | (format: "{}", command: "DateTime", command_arg: "%a, %b %d - %-I:%M %P", interval_secs: 1, color: $color_cyan, underline: true), |
| 116 | ], |
| 117 | |
| 118 | scheme_normal: (foreground: $color_fg, background: $color_bg, underline: 0x444444), |
| 119 | scheme_occupied: (foreground: $color_cyan, background: $color_bg, underline: $color_cyan), |
| 120 | scheme_selected: (foreground: $color_cyan, background: $color_bg, underline: $color_purple), |
| 121 | ) |