Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions .github/workflows/sync-gitlab.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,11 @@ on:

jobs:
sync:
if: false
runs-on: ubuntu-latest
steps:
- uses: keninkujovic/[email protected]
with:
gitlab_url: ${{ secrets.GITLAB_URL }}
username: ${{ secrets.USERNAME }}
gitlab_pat: ${{ secrets.GITLAB_PAT }}
- uses: keninkujovic/[email protected]
with:
gitlab_url: ${{ secrets.GITLAB_URL }}
username: ${{ secrets.USERNAME }}
gitlab_pat: ${{ secrets.GITLAB_PAT }}
19 changes: 12 additions & 7 deletions conf/ghostty/config
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,27 @@


theme = dark:Kanagawa Dragon,light:Builtin Solarized Light
font-family = Berkeley Mono Nerd Font
font-family = Berkeley Mono Nerd Font
# font-family = Iosevka Nerd Font Mono
font-size = 14
font-thicken = false
shell-integration-features = no-cursor,sudo,title
font-thicken = true
font-codepoint-map = U+4E00-U+9FFF,U+3400-U+4DBF=LXGW WenKai Mono
shell-integration-features = cursor,sudo,title
cursor-style = block
cursor-invert-fg-bg = true
macos-option-as-alt = true
macos-titlebar-style = tabs
macos-window-shadow = false
macos-window-shadow = true
adjust-underline-position = 45%
adjust-underline-thickness = -60%
adjust-underline-thickness = -65%
mouse-hide-while-typing = true
focus-follows-mouse = false
unfocused-split-opacity = 1
window-padding-balance = true
window-padding-x = 6

background-opacity = 0.98
background-blur-radius = 18
background-opacity = 1
background-blur-radius = 0

# Quick terminal

Expand Down Expand Up @@ -48,6 +52,7 @@ keybind = super+backslash=toggle_quick_terminal

# ====
keybind = super+v=paste_from_clipboard
keybind = super+c=copy_to_clipboard
keybind = super+n=new_window
keybind = super+t=new_tab
keybind = super+w=close_surface
Expand Down
12 changes: 6 additions & 6 deletions conf/karabiner/karabiner.json
Original file line number Diff line number Diff line change
Expand Up @@ -115,15 +115,15 @@
]
},
{
"description": "Change left_command+hjkl to arrow keys",
"disable": true,
"description": "Change right_option+hjkl to arrow keys",
"disable": false,
"manipulators": [
{
"from": {
"key_code": "h",
"modifiers": {
"mandatory": [
"right_command"
"right_option"
],
"optional": [
"any"
Expand All @@ -142,7 +142,7 @@
"key_code": "j",
"modifiers": {
"mandatory": [
"right_command"
"right_option"
],
"optional": [
"any"
Expand All @@ -161,7 +161,7 @@
"key_code": "k",
"modifiers": {
"mandatory": [
"right_command"
"right_option"
],
"optional": [
"any"
Expand All @@ -180,7 +180,7 @@
"key_code": "l",
"modifiers": {
"mandatory": [
"right_command"
"right_option"
],
"optional": [
"any"
Expand Down
20 changes: 11 additions & 9 deletions conf/yabai/yabairc
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/usr/bin/env sh
#!/usr/bin/env bash

# the scripting-addition must be loaded manually if
# you are running yabai on macOS Big Sur. Uncomment
# the following line to have the injection performed
Expand Down Expand Up @@ -42,15 +43,11 @@ yabai -m config insert_feedback_color 0xaad75f5f
yabai -m config split_ratio 0.50
yabai -m config auto_balance on
yabai -m config window_opacity off
# yabai -m config window_opacity_duration 0.0
# yabai -m config active_window_opacity 1.0
# yabai -m config normal_window_opacity 1.0

# -- space --

yabai -m config layout stack
# yabai -m config --space 1 layout stack
# yabai -m config --space 2 layout bsp
yabai -m config --space 1 layout stack
yabai -m config --space 2 layout bsp
# yabai -m config --space 3 layout bsp
yabai -m config top_padding 4
yabai -m config bottom_padding 4
Expand All @@ -65,8 +62,8 @@ yabai -m space 2 --label code
#-- rules --
## see: https://github.com/koekeishiya/yabai/issues/1929
yabai -m rule --add app=".*" sub-layer=normal
yabai -m rule --add app="^(Safari|Firefox)$" space=web role=AXWindow subrole=AXStandardWindow
yabai -m rule --add app="(System Preferences|系统偏好设置|系统设置|微信|wechat|\.dmg)$" manage=off sub-layer=normal
yabai -m rule --add app="^(Safari|Firefox|Google Chrome)$" space=web role=AXWindow subrole=AXStandardWindow
yabai -m rule --add app="^(Ghostty|Cursor)$" space=code role=AXWindow subrole=AXStandardWindow
yabai -m rule --add app="(微信|钉钉|Wechat|企业微信|Telegram|Numi|MenubarX|备忘录|Notes)" manage=off sub-layer=normal
yabai -m rule --add app="(腾讯会议|快速会议|会议|Capacities|数码测色计|富途牛牛)" manage=off sub-layer=normal
yabai -m rule --add app="^\s*$" manage=off sub-layer=normal
Expand All @@ -75,6 +72,11 @@ yabai -m rule --add app="QQ音乐" manage=off sub-layer=normal
yabai -m rule --add app="(Finder|访达|DevTools|模拟器|Kap|Bartender|TradingView)" manage=off sub-layer=normal
yabai -m rule --apply

yabai -m signal --add event=window_destroyed active=yes action="yabai -m query --windows --window &> /dev/null || yabai -m window --focus mouse &> /dev/null || yabai -m window --focus \$(yabai -m query --windows --space | jq .[0].id) &> /dev/null"
yabai -m signal --add event=window_minimized active=yes action="if \$(yabai -m query --windows --window \$YABAI_WINDOW_ID | jq -r '.\"is-floating\"'); then yabai -m query --windows --window &> /dev/null || yabai -m window --focus mouse &> /dev/null || yabai -m window --focus \$(yabai -m query --windows --space | jq .[0].id) &> /dev/null; fi"



# stackline specific tweaks
# yabai -m signal --add event=window_created action="~/.config/yabai/adjust-padding-for-stacked-windows.sh"
# yabai -m signal --add event=window_destroyed action="~/.config/yabai/adjust-padding-for-stacked-windows.sh"
Expand Down
4 changes: 2 additions & 2 deletions nix/darwin/apple.nix
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,14 @@
# "com.apple.keyboard.fnState" = true;
};
dock = {
autohide = true;
autohide = false;
magnification = true;
mineffect = "scale";
# minimize-to-application = true;
orientation = "bottom";
showhidden = true;
show-recents = true;
tilesize = 40;
tilesize = 36;
largesize = 42;
};
finder = {
Expand Down
2 changes: 1 addition & 1 deletion nix/darwin/configuration.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
./vars.nix
./apps.nix
./yabai.nix
./jankyborders.nix
# ./jankyborders.nix
];

users.users.${username} = {
Expand Down
4 changes: 2 additions & 2 deletions nix/darwin/jankyborders.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ let
"style=round"
"active_color=0xffbd93f9"
"inactive_color=0xffabb2bf"
"width=7.0"
"width=4.0"
"hidpi=on"
"ax_focus=on"
"blacklist='Dropover,LaunchBar'"
"blacklist='LaunchBar'"
];
in
{
Expand Down
10 changes: 7 additions & 3 deletions nix/darwin/yabai.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,13 @@
pkgs,
...
}: {
environment.etc."sudoers.d/yabai".source = pkgs.runCommand "sudoers-yabai" {} ''
YABAI_BIN="/etc/profiles/per-user/${username}/bin/yabai"
SHASUM=$(sha256sum "$YABAI_BIN" | cut -d' ' -f1)
cat <<EOF >"$out"
${username} ALL=(root) NOPASSWD: sha256:$SHASUM $YABAI_BIN --load-sa
EOF
'';
# csrutil enable --without fs --without debug --without nvram
# nvram boot-args=-arm64e_preview_abi
environment.etc."sudoers.d/yabai".text = ''
${username} ALL = (root) NOPASSWD: ${pkgs.yabai}/bin/yabai --load-sa
'';
}
Loading
Loading