Skip to content

Commit

Permalink
Add file manager default shortcut.
Browse files Browse the repository at this point in the history
  • Loading branch information
wnayes committed Jan 14, 2024
1 parent 7791afc commit 2958d53
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
1 change: 1 addition & 0 deletions docs/docs/usage/keyboard-shortcuts.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ that can be edited or extended as desired.
| ----------------------------------------- | --------------------------------------------------------- |
| `Mod4 + Enter` | Opens a new instance of your configured default terminal. |
| `Mod4 + Space` | Swaps between available layouts on the current screen. |
| `Mod4 + E` | Opens a file manager of your choice. |
| `Mod4 + R` | Opens a launcher program of your choice. |
| `Mod4 + O` | Sends the active window to the next screen. |
| `Mod4 + 1` ... `Mod4 + 9` | Switches to a different tag by index. |
Expand Down
9 changes: 5 additions & 4 deletions packages/react-config/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import LayoutTiling from "@bond-wm/layout-tiling";

const DefaultTerminal = "xterm";
const DefaultLauncher = "dmenu_run";
const DefaultFileManager = "pcmanfm";

const config: IConfig = {
/** Layout to use initially. */
Expand All @@ -22,19 +23,19 @@ const config: IConfig = {
onWindowManagerReady: ({ wm }) => {
// Establish keyboard shortcuts.
wm.registerShortcuts({
"Mod4 + o": () => wm.sendActiveWindowToNextScreen(),
"Mod4 + e": () => wm.launchProcess(DefaultFileManager),
"Mod4 + r": () => wm.launchProcess(DefaultLauncher),

"Mod4 + Return": () => wm.launchProcess(DefaultTerminal),

"Mod4 + space": () => wm.switchToNextLayout(),

"Mod4 + o": () => wm.sendActiveWindowToNextScreen(),
"Mod4 + Shift + C": () => wm.closeFocusedWindow(),
"Mod4 + Shift + M": () => wm.startDragFocusedWindow(),
"Mod4 + Shift + Q": () => wm.quit(),

"Mod4 + Shift + F12": () => wm.showDevtoolsForFocusedWindowFrame(),

"Mod4 + Ctrl + r": () => wm.restart(),
"Mod4 + Shift + Q": () => wm.quit(),
});
for (let i = 1; i <= 9; i++) {
wm.registerShortcuts({
Expand Down

0 comments on commit 2958d53

Please sign in to comment.