This repository has been archived by the owner on Aug 30, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
228 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
package main | ||
|
||
import ( | ||
"testing" | ||
|
||
// io/ioutil is deprecated, use io and os packages instead | ||
"notashelf.dev/hyprkeys/flags" | ||
"notashelf.dev/hyprkeys/reader" | ||
) | ||
|
||
func TestMarkdown(t *testing.T) { | ||
flags := &flags.Flags{} | ||
flags.ConfigPath = "test/hyprland.conf" | ||
flags.Output = "test/markdown.md" | ||
flags.Markdown = true | ||
configValues, err := reader.ReadHyprlandConfig(flags.ConfigPath) | ||
if err != nil { | ||
t.Errorf(err.Error()) | ||
} | ||
err = markdownHandler(configValues, flags) | ||
if err != nil { | ||
t.Errorf(err.Error()) | ||
} | ||
} | ||
|
||
func TestJson(t *testing.T) { | ||
flags := &flags.Flags{} | ||
flags.ConfigPath = "test/hyprland.conf" | ||
flags.Output = "test/out.json" | ||
flags.Json = true | ||
configValues, err := reader.ReadHyprlandConfig(flags.ConfigPath) | ||
if err != nil { | ||
t.Errorf(err.Error()) | ||
} | ||
err = jsonHandler(configValues, flags) | ||
if err != nil { | ||
t.Errorf(err.Error()) | ||
} | ||
} | ||
|
||
func TestRaw(t *testing.T) { | ||
flags := &flags.Flags{} | ||
flags.ConfigPath = "test/hyprland.conf" | ||
flags.Output = "test/out" | ||
flags.Json = true | ||
configValues, err := reader.ReadHyprlandConfig(flags.ConfigPath) | ||
if err != nil { | ||
t.Errorf(err.Error()) | ||
} | ||
err = rawHandler(configValues, flags) | ||
if err != nil { | ||
t.Errorf(err.Error()) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,59 +1,10 @@ | ||
# Sample Markdown | ||
|
||
This is an example output for `hyprkeys --markdown`. Syntax is last updated on 4/1/2023. | ||
May be subjected to change. | ||
|
||
## Keys | ||
|
||
| Keybind | Dispatcher | Command | Comments | | ||
|---------|------------|---------|----------| | ||
| <kbd>SUPER D</kbd> | exec | rofi -modi combi -combi-modi drun,window,ssh -show combi | | | ||
| <kbd>SUPER Return</kbd> | exec | kitty | | | ||
| <kbd>SUPER BACKSPACE</kbd> | exec | firefox-nightly | | | ||
| <kbd>SUPER H</kbd> | exec | pcmanfm | | | ||
| <kbd>SUPER CONTROL ALT P</kbd> | exec | spt playback -t | | | ||
| <kbd>SUPER CONTROL ALT N</kbd> | exec | spt playback -n | | | ||
| <kbd>SUPER CONTROL ALT H</kbd> | exec | spt playback -p | | | ||
| <kbd>SUPER CONTROL ALT L</kbd> | exec | spt playback --like | | | ||
| <kbd>SUPER SHIFT S</kbd> | exec | slurp -d \| grim -g - - \| wl-copy | | | ||
| <kbd>SUPER CONTROL ALT S</kbd> | exec | grim -o DP-1 - \| wl-copy | | | ||
| <kbd>SUPER SHIFT CONTROL S</kbd> | exec | wf-recorder -g "$(slurp)" --audio -f ~/Videos/Screenrecord/record.mp4 | | | ||
| <kbd>SUPER SHIFT CONTROL A</kbd> | exec | killall -s SIGINT wf-recorder | | | ||
| <kbd>SUPER SHIFT W</kbd> | exec | ~/Scripts/set_wallpaper.sh | | | ||
| <kbd>SUPER SHIFT V</kbd> | exec | clipman pick -t rofi | | | ||
| <kbd>SUPER ALT L</kbd> | exec | ~/Scripts/lockscreen.sh | | | ||
| <kbd>SUPER V</kbd> | togglefloating | | | | ||
| <kbd>SUPER F</kbd> | fullscreen | | | | ||
| <kbd>SUPER SHIFT F</kbd> | fakefullscreen | | | | ||
| <kbd>SUPER P</kbd> | pseudo | | dwindle | | ||
| <kbd>SUPER J</kbd> | togglesplit | | dwindle | | ||
| <kbd>SUPER SHIFT Q</kbd> | killactive | | | | ||
| <kbd>SUPER left</kbd> | movefocus | l | | | ||
| <kbd>SUPER right</kbd> | movefocus | r | | | ||
| <kbd>SUPER up</kbd> | movefocus | u | | | ||
| <kbd>SUPER down</kbd> | movefocus | d | | | ||
| <kbd>SUPER 1</kbd> | workspace | 1 | | | ||
| <kbd>SUPER 2</kbd> | workspace | 2 | | | ||
| <kbd>SUPER 3</kbd> | workspace | 3 | | | ||
| <kbd>SUPER 4</kbd> | workspace | 4 | | | ||
| <kbd>SUPER 5</kbd> | workspace | 5 | | | ||
| <kbd>SUPER 6</kbd> | workspace | 6 | | | ||
| <kbd>SUPER 7</kbd> | workspace | 7 | | | ||
| <kbd>SUPER 8</kbd> | workspace | 8 | | | ||
| <kbd>SUPER 9</kbd> | workspace | 9 | | | ||
| <kbd>SUPER 0</kbd> | workspace | 10 | | | ||
| <kbd>SUPER SHIFT 1</kbd> | movetoworkspacesilent | 1 | | | ||
| <kbd>SUPER SHIFT 2</kbd> | movetoworkspacesilent | 2 | | | ||
| <kbd>SUPER SHIFT 3</kbd> | movetoworkspacesilent | 3 | | | ||
| <kbd>SUPER SHIFT 4</kbd> | movetoworkspacesilent | 4 | | | ||
| <kbd>SUPER SHIFT 5</kbd> | movetoworkspacesilent | 5 | | | ||
| <kbd>SUPER SHIFT 6</kbd> | movetoworkspacesilent | 6 | | | ||
| <kbd>SUPER SHIFT 7</kbd> | movetoworkspacesilent | 7 | | | ||
| <kbd>SUPER SHIFT 8</kbd> | movetoworkspacesilent | 8 | | | ||
| <kbd>SUPER SHIFT 9</kbd> | movetoworkspacesilent | 9 | | | ||
| <kbd>SUPER SHIFT 0</kbd> | movetoworkspacesilent | 10 | | | ||
| <kbd>SUPER mouse_down</kbd> | workspace | e+1 | | | ||
| <kbd>SUPER mouse_up</kbd> | workspace | e-1 | | | ||
| <kbd>SUPER SHIFT M</kbd> | exit | | | | ||
| <kbd>SUPER mouse:272</kbd> | movewindow | | | ||
| <kbd>SUPER mouse:273</kbd> | resizewindow | | | ||
| <kbd>$mainMod Q</kbd> | exec | kitty | | | ||
| <kbd>$mainMod C</kbd> | killactive | | | | ||
| <kbd>$mainMod M</kbd> | exit | | | | ||
| <kbd>$mainMod E</kbd> | exec | dolphin | | | ||
| <kbd>$mainMod V</kbd> | togglefloating | | | | ||
| <kbd>$mainMod R</kbd> | exec | wofi --show drun | | | ||
| <kbd>$mainMod P</kbd> | pseudo | | dwindle | | ||
| <kbd>$mainMod J</kbd> | togglesplit | | dwindle | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
bind = $mainMod Q exec kitty # | ||
bind = $mainMod C killactive # | ||
bind = $mainMod M exit # | ||
bind = $mainMod E exec dolphin # | ||
bind = $mainMod V togglefloating # | ||
bind = $mainMod R exec wofi --show drun # | ||
bind = $mainMod P pseudo #dwindle | ||
bind = $mainMod J togglesplit #dwindle | ||
input { | ||
kb_layout = us | ||
follow_mouse = 1 | ||
sensitivity = 0#-1.0-1.0,0meansnomodification. | ||
touchpad { | ||
natural_scroll = no | ||
} | ||
} | ||
general { | ||
layout = dwindle | ||
gaps_in = 5 | ||
gaps_out = 20 | ||
border_size = 2 | ||
col.active_border = rgba(1affffee) | ||
col.inactive_border = rgba(595959aa) | ||
} | ||
decoration { | ||
blur = yes | ||
shadow_render_power = 3 | ||
col.shadow = rgba(1a1a1aee) | ||
shadow_range = 4 | ||
rounding = 10 | ||
blur_size = 3 | ||
blur_passes = 1 | ||
blur_new_optimizations = on | ||
drop_shadow = yes | ||
} | ||
animation { | ||
enabled = yes | ||
bezier = myBezier,0.05,0.9,0.1,1.05 | ||
animation = workspaces,1,6,default | ||
} | ||
gestures { | ||
workspace_swipe = off | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,123 @@ | ||
{ | ||
"Settings": [ | ||
{ | ||
"Name": "input", | ||
"Settings": { | ||
"follow_mouse": "1", | ||
"kb_layout": "us", | ||
"sensitivity": "0#-1.0-1.0,0meansnomodification." | ||
}, | ||
"SubCategories": [ | ||
{ | ||
"Name": "touchpad", | ||
"Settings": { | ||
"natural_scroll": "no" | ||
}, | ||
"SubCategories": null | ||
} | ||
] | ||
}, | ||
{ | ||
"Name": "general", | ||
"Settings": { | ||
"border_size": "2", | ||
"col.active_border": "rgba(1affffee)", | ||
"col.inactive_border": "rgba(595959aa)", | ||
"gaps_in": "5", | ||
"gaps_out": "20", | ||
"layout": "dwindle" | ||
}, | ||
"SubCategories": null | ||
}, | ||
{ | ||
"Name": "decoration", | ||
"Settings": { | ||
"blur": "yes", | ||
"blur_new_optimizations": "on", | ||
"blur_passes": "1", | ||
"blur_size": "3", | ||
"col.shadow": "rgba(1a1a1aee)", | ||
"drop_shadow": "yes", | ||
"rounding": "10", | ||
"shadow_range": "4", | ||
"shadow_render_power": "3" | ||
}, | ||
"SubCategories": null | ||
}, | ||
{ | ||
"Name": "animation", | ||
"Settings": { | ||
"animation": "workspaces,1,6,default", | ||
"bezier": "myBezier,0.05,0.9,0.1,1.05", | ||
"enabled": "yes" | ||
}, | ||
"SubCategories": null | ||
}, | ||
{ | ||
"Name": "gestures", | ||
"Settings": { | ||
"workspace_swipe": "off" | ||
}, | ||
"SubCategories": null | ||
} | ||
], | ||
"KeyboardBinds": [ | ||
{ | ||
"BindType": "bind", | ||
"Bind": "$mainMod Q", | ||
"Dispatcher": "exec", | ||
"Command": "kitty", | ||
"Comments": "" | ||
}, | ||
{ | ||
"BindType": "bind", | ||
"Bind": "$mainMod C", | ||
"Dispatcher": "killactive", | ||
"Command": "", | ||
"Comments": "" | ||
}, | ||
{ | ||
"BindType": "bind", | ||
"Bind": "$mainMod M", | ||
"Dispatcher": "exit", | ||
"Command": "", | ||
"Comments": "" | ||
}, | ||
{ | ||
"BindType": "bind", | ||
"Bind": "$mainMod E", | ||
"Dispatcher": "exec", | ||
"Command": "dolphin", | ||
"Comments": "" | ||
}, | ||
{ | ||
"BindType": "bind", | ||
"Bind": "$mainMod V", | ||
"Dispatcher": "togglefloating", | ||
"Command": "", | ||
"Comments": "" | ||
}, | ||
{ | ||
"BindType": "bind", | ||
"Bind": "$mainMod R", | ||
"Dispatcher": "exec", | ||
"Command": "wofi --show drun", | ||
"Comments": "" | ||
}, | ||
{ | ||
"BindType": "bind", | ||
"Bind": "$mainMod P", | ||
"Dispatcher": "pseudo", | ||
"Command": "", | ||
"Comments": "dwindle" | ||
}, | ||
{ | ||
"BindType": "bind", | ||
"Bind": "$mainMod J", | ||
"Dispatcher": "togglesplit", | ||
"Command": "", | ||
"Comments": "dwindle" | ||
} | ||
], | ||
"MouseBinds": null | ||
} |