Compare commits
5 Commits
9bb090bb35
...
colonelpan
| Author | SHA1 | Date | |
|---|---|---|---|
| 77bae03b14 | |||
| 686023e006 | |||
| f12285b7f7 | |||
| 0efb55f23f | |||
| 30fb74b13b |
@@ -258,9 +258,10 @@ Required behavior:
|
|||||||
- A named scratchpad exists for spotify.
|
- A named scratchpad exists for spotify.
|
||||||
- A named scratchpad exists for transmission.
|
- A named scratchpad exists for transmission.
|
||||||
- A named scratchpad exists for volume.
|
- A named scratchpad exists for volume.
|
||||||
|
- A named scratchpad exists for x.com.
|
||||||
- Scratchpads appear near-fullscreen and centered by default.
|
- Scratchpads appear near-fullscreen and centered by default.
|
||||||
- The codex scratchpad can be tiled into the normal workspace when desired,
|
- The codex, claude, and x.com scratchpads can be tiled into the normal
|
||||||
while retaining its summon/dismiss toggle.
|
workspace when desired, while retaining their summon/dismiss toggles.
|
||||||
- Toggling a scratchpad deactivates fullscreen/tabbed state first.
|
- Toggling a scratchpad deactivates fullscreen/tabbed state first.
|
||||||
- Floating scratchpads are hidden from normal workspace and window listings.
|
- Floating scratchpads are hidden from normal workspace and window listings.
|
||||||
|
|
||||||
@@ -447,6 +448,7 @@ Required behavior:
|
|||||||
- `Super+Alt+s` toggles the spotify scratchpad.
|
- `Super+Alt+s` toggles the spotify scratchpad.
|
||||||
- `Super+Alt+t` toggles the transmission scratchpad.
|
- `Super+Alt+t` toggles the transmission scratchpad.
|
||||||
- `Super+Alt+v` toggles the volume scratchpad.
|
- `Super+Alt+v` toggles the volume scratchpad.
|
||||||
|
- `Super+Alt+x` toggles the x.com scratchpad.
|
||||||
|
|
||||||
Important behavior:
|
Important behavior:
|
||||||
|
|
||||||
|
|||||||
@@ -88,17 +88,7 @@ function M.setup(ctx)
|
|||||||
end
|
end
|
||||||
|
|
||||||
local function setup_window_overview_bindings()
|
local function setup_window_overview_bindings()
|
||||||
bind(main_mod .. " + SHIFT + C", hl.dsp.window.close(), desc("Close active window"))
|
local function toggle_hyprtasking()
|
||||||
bind(main_mod .. " + SHIFT + Q", hl.dsp.exit(), desc("Exit Hyprland"))
|
|
||||||
bind(main_mod .. " + Tab", hyprexpo("toggle"), desc("Toggle hyprexpo workspace overview", overview_bind_opts))
|
|
||||||
bind(main_mod .. " + SHIFT + Tab", hyprwinview({
|
|
||||||
action = "show",
|
|
||||||
include_current_workspace = false,
|
|
||||||
start_in_filter_mode = true,
|
|
||||||
default_action = "bring",
|
|
||||||
}), desc("Show all-workspace window overview", overview_bind_opts))
|
|
||||||
bind(main_mod .. " + SHIFT + slash", hyprwinview({ action = "toggle-filter" }), desc("Toggle window overview filter", overview_bind_opts))
|
|
||||||
bind("ALT + Tab", function()
|
|
||||||
if hl.plugin and hl.plugin.hyprtasking and hl.plugin.hyprtasking.toggle then
|
if hl.plugin and hl.plugin.hyprtasking and hl.plugin.hyprtasking.toggle then
|
||||||
hl.plugin.hyprtasking.toggle("cursor")
|
hl.plugin.hyprtasking.toggle("cursor")
|
||||||
else
|
else
|
||||||
@@ -110,8 +100,19 @@ function M.setup(ctx)
|
|||||||
font_size = 13,
|
font_size = 13,
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
end, desc("Toggle hyprtasking workspace overview", overview_bind_opts))
|
end
|
||||||
bind("ALT + SHIFT + Tab", hyprexpo("on"), desc("Open hyprexpo workspace overview", overview_bind_opts))
|
|
||||||
|
bind(main_mod .. " + SHIFT + C", hl.dsp.window.close(), desc("Close active window"))
|
||||||
|
bind(main_mod .. " + SHIFT + Q", hl.dsp.exit(), desc("Exit Hyprland"))
|
||||||
|
bind(main_mod .. " + Tab", toggle_hyprtasking, desc("Toggle hyprtasking workspace overview", overview_bind_opts))
|
||||||
|
bind(main_mod .. " + SHIFT + Tab", hyprwinview({
|
||||||
|
action = "show",
|
||||||
|
include_current_workspace = false,
|
||||||
|
start_in_filter_mode = true,
|
||||||
|
default_action = "bring",
|
||||||
|
}), desc("Show all-workspace window overview", overview_bind_opts))
|
||||||
|
bind(main_mod .. " + SHIFT + slash", hyprwinview({ action = "toggle-filter" }), desc("Toggle window overview filter", overview_bind_opts))
|
||||||
|
bind("ALT + Tab", toggle_hyprtasking, desc("Toggle hyprtasking workspace overview", overview_bind_opts))
|
||||||
bind(main_mod .. " + G", hyprwinview({
|
bind(main_mod .. " + G", hyprwinview({
|
||||||
action = "show",
|
action = "show",
|
||||||
start_in_filter_mode = true,
|
start_in_filter_mode = true,
|
||||||
@@ -290,6 +291,9 @@ function M.setup(ctx)
|
|||||||
bind(mod_alt .. " + V", function()
|
bind(mod_alt .. " + V", function()
|
||||||
toggle_scratchpad("volume")
|
toggle_scratchpad("volume")
|
||||||
end, desc("Toggle volume scratchpad"))
|
end, desc("Toggle volume scratchpad"))
|
||||||
|
bind(mod_alt .. " + X", function()
|
||||||
|
toggle_scratchpad("x_com")
|
||||||
|
end, desc("Toggle X scratchpad"))
|
||||||
bind(mod_alt .. " + grave", function()
|
bind(mod_alt .. " + grave", function()
|
||||||
toggle_scratchpad("dropdown")
|
toggle_scratchpad("dropdown")
|
||||||
end, desc("Toggle dropdown scratchpad"))
|
end, desc("Toggle dropdown scratchpad"))
|
||||||
|
|||||||
@@ -51,6 +51,12 @@ function M.setup(ctx)
|
|||||||
command = "google-chrome-stable --profile-directory=Default --app=https://messages.google.com/web/conversations",
|
command = "google-chrome-stable --profile-directory=Default --app=https://messages.google.com/web/conversations",
|
||||||
class = "chrome-messages.google.com",
|
class = "chrome-messages.google.com",
|
||||||
},
|
},
|
||||||
|
x_com = {
|
||||||
|
command = "x-com-pwa",
|
||||||
|
classes = { "x-com-pwa", "chrome-x.com" },
|
||||||
|
title = "X",
|
||||||
|
allow_tiling = true,
|
||||||
|
},
|
||||||
transmission = {
|
transmission = {
|
||||||
command = "transmission-gtk",
|
command = "transmission-gtk",
|
||||||
class = "transmission-gtk",
|
class = "transmission-gtk",
|
||||||
|
|||||||
@@ -89,6 +89,7 @@ function M.setup(ctx)
|
|||||||
end
|
end
|
||||||
if enable_hyprtasking and not verify_config then
|
if enable_hyprtasking and not verify_config then
|
||||||
hl.plugin.load("/run/current-system/sw/lib/libhyprtasking.so")
|
hl.plugin.load("/run/current-system/sw/lib/libhyprtasking.so")
|
||||||
|
os.execute("hyprctl eval 'hl.config({plugin={hyprtasking={full_render=true}}})' >/dev/null 2>&1 || true")
|
||||||
end
|
end
|
||||||
if enable_hyprexpo and not enable_hyprtasking and not verify_config then
|
if enable_hyprexpo and not enable_hyprtasking and not verify_config then
|
||||||
hl.plugin.load("/run/current-system/sw/lib/libhyprexpo.so")
|
hl.plugin.load("/run/current-system/sw/lib/libhyprexpo.so")
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ return {
|
|||||||
-- hook fires on every popup commit). Re-enable once fixed upstream.
|
-- hook fires on every popup commit). Re-enable once fixed upstream.
|
||||||
enable_hyprexpo = false,
|
enable_hyprexpo = false,
|
||||||
enable_hyprwinview = true,
|
enable_hyprwinview = true,
|
||||||
enable_hyprtasking = false,
|
enable_hyprtasking = true,
|
||||||
enable_workspace_history = true,
|
enable_workspace_history = true,
|
||||||
enable_hyprwobbly = true,
|
enable_hyprwobbly = true,
|
||||||
enable_dynamic_cursors = true,
|
enable_dynamic_cursors = true,
|
||||||
|
|||||||
@@ -147,6 +147,7 @@ spawnBindings =
|
|||||||
, key (super .|. alt) xK_s (toggleScratchpad "spotify")
|
, key (super .|. alt) xK_s (toggleScratchpad "spotify")
|
||||||
, key (super .|. alt) xK_t (toggleScratchpad "transmission")
|
, key (super .|. alt) xK_t (toggleScratchpad "transmission")
|
||||||
, key (super .|. alt) xK_v (toggleScratchpad "volume")
|
, key (super .|. alt) xK_v (toggleScratchpad "volume")
|
||||||
|
, key (super .|. alt) xK_x (toggleScratchpad "x-com")
|
||||||
, key (super .|. alt) xK_c (spawnAction "google-chrome-stable")
|
, key (super .|. alt) xK_c (spawnAction "google-chrome-stable")
|
||||||
, key super xK_e (spawnAction "emacsclient --eval '(emacs-everywhere)'")
|
, key super xK_e (spawnAction "emacsclient --eval '(emacs-everywhere)'")
|
||||||
, key (super .|. ctrl) xK_e (shiftFocusedToNextEmptyWorkspace False)
|
, key (super .|. ctrl) xK_e (shiftFocusedToNextEmptyWorkspace False)
|
||||||
@@ -297,6 +298,8 @@ scratchpadDefinitions =
|
|||||||
anyMatcher [titleContains "Transmission", appIdContains "transmission"]
|
anyMatcher [titleContains "Transmission", appIdContains "transmission"]
|
||||||
, ScratchpadDefinition "volume" "pavucontrol" $
|
, ScratchpadDefinition "volume" "pavucontrol" $
|
||||||
anyMatcher [appIdMatches "Pavucontrol", appIdContains "pavucontrol"]
|
anyMatcher [appIdMatches "Pavucontrol", appIdContains "pavucontrol"]
|
||||||
|
, ScratchpadDefinition "x-com" "x-com-pwa" $
|
||||||
|
anyMatcher [appIdMatches "x-com-pwa", appIdContains "chrome-x.com"]
|
||||||
]
|
]
|
||||||
|
|
||||||
anyMatcher :: [RiverWMWindowState -> Bool] -> RiverWMWindowState -> Bool
|
anyMatcher :: [RiverWMWindowState -> Bool] -> RiverWMWindowState -> Bool
|
||||||
|
|||||||
@@ -244,6 +244,11 @@ slackSelector = className =? "Slack"
|
|||||||
spotifySelector = className =? "Spotify"
|
spotifySelector = className =? "Spotify"
|
||||||
transmissionSelector = fmap (isPrefixOf "Transmission") title
|
transmissionSelector = fmap (isPrefixOf "Transmission") title
|
||||||
volumeSelector = className =? "Pavucontrol"
|
volumeSelector = className =? "Pavucontrol"
|
||||||
|
xComSelector =
|
||||||
|
className =? "x-com-pwa"
|
||||||
|
<||> fmap ("chrome-x.com" `isInfixOf`) className
|
||||||
|
<||> (chromeSelectorBase <&&> title =? "X")
|
||||||
|
<||> fmap ("x.com" `isInfixOf`) title
|
||||||
|
|
||||||
virtualClasses =
|
virtualClasses =
|
||||||
[ (chromeSelector, "Chrome")
|
[ (chromeSelector, "Chrome")
|
||||||
@@ -261,6 +266,7 @@ slackCommand = "slack"
|
|||||||
spotifyCommand = "spotify"
|
spotifyCommand = "spotify"
|
||||||
transmissionCommand = "transmission-gtk"
|
transmissionCommand = "transmission-gtk"
|
||||||
volumeCommand = "pavucontrol"
|
volumeCommand = "pavucontrol"
|
||||||
|
xComCommand = "x-com-pwa"
|
||||||
|
|
||||||
-- Startup hook
|
-- Startup hook
|
||||||
|
|
||||||
@@ -811,6 +817,7 @@ scratchpads =
|
|||||||
, NS "spotify" spotifyCommand spotifySelector nearFullFloat
|
, NS "spotify" spotifyCommand spotifySelector nearFullFloat
|
||||||
, NS "transmission" transmissionCommand transmissionSelector nearFullFloat
|
, NS "transmission" transmissionCommand transmissionSelector nearFullFloat
|
||||||
, NS "volume" volumeCommand volumeSelector nearFullFloat
|
, NS "volume" volumeCommand volumeSelector nearFullFloat
|
||||||
|
, NS "x-com" xComCommand xComSelector nearFullFloat
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
@@ -1018,6 +1025,7 @@ addKeys conf@XConfig { modMask = modm } =
|
|||||||
, ((modalt, xK_s), doScratchpad "spotify")
|
, ((modalt, xK_s), doScratchpad "spotify")
|
||||||
, ((modalt, xK_t), doScratchpad "transmission")
|
, ((modalt, xK_t), doScratchpad "transmission")
|
||||||
, ((modalt, xK_v), doScratchpad "volume")
|
, ((modalt, xK_v), doScratchpad "volume")
|
||||||
|
, ((modalt, xK_x), doScratchpad "x-com")
|
||||||
|
|
||||||
-- Specific program spawning
|
-- Specific program spawning
|
||||||
|
|
||||||
|
|||||||
@@ -86,6 +86,34 @@
|
|||||||
exec google-chrome-stable --profile-directory="$profile_dir" --new-window
|
exec google-chrome-stable --profile-directory="$profile_dir" --new-window
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
xComPwa = pkgs.writeShellApplication {
|
||||||
|
name = "x-com-pwa";
|
||||||
|
runtimeInputs = [
|
||||||
|
googleChromeCommandWrappers
|
||||||
|
pkgs.jq
|
||||||
|
];
|
||||||
|
text = ''
|
||||||
|
profile_args=()
|
||||||
|
local_state="''${CHROME_USER_DATA_DIR:-$HOME/.config/google-chrome}/Local State"
|
||||||
|
|
||||||
|
if [ -r "$local_state" ]; then
|
||||||
|
profile_dir="$(
|
||||||
|
jq -r '
|
||||||
|
(.profile.info_cache // {})
|
||||||
|
| to_entries
|
||||||
|
| sort_by(if .key == "Default" then 0 else 1 end, -(.value.active_time // 0))
|
||||||
|
| .[0].key // empty
|
||||||
|
' "$local_state" 2>/dev/null || true
|
||||||
|
)"
|
||||||
|
|
||||||
|
if [ -n "$profile_dir" ]; then
|
||||||
|
profile_args+=(--profile-directory="$profile_dir")
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
exec google-chrome-stable "''${profile_args[@]}" --class=x-com-pwa --app=https://x.com/
|
||||||
|
'';
|
||||||
|
};
|
||||||
googleChromeDesktopEntries = pkgs.runCommand "google-chrome-desktop-entries" {nativeBuildInputs = [pkgs.gnused];} ''
|
googleChromeDesktopEntries = pkgs.runCommand "google-chrome-desktop-entries" {nativeBuildInputs = [pkgs.gnused];} ''
|
||||||
mkdir -p "$out/share/applications"
|
mkdir -p "$out/share/applications"
|
||||||
|
|
||||||
@@ -242,6 +270,21 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
xdg.desktopEntries.x-com-pwa = {
|
||||||
|
name = "X";
|
||||||
|
genericName = "Social Network";
|
||||||
|
comment = "Open x.com in a dedicated Chrome app window";
|
||||||
|
icon = "google-chrome";
|
||||||
|
terminal = false;
|
||||||
|
type = "Application";
|
||||||
|
categories = ["Network"];
|
||||||
|
startupNotify = true;
|
||||||
|
exec = "${xComPwa}/bin/x-com-pwa";
|
||||||
|
settings = {
|
||||||
|
StartupWMClass = "x-com-pwa";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
xdg.configFile."ghostty/config" = {
|
xdg.configFile."ghostty/config" = {
|
||||||
force = true;
|
force = true;
|
||||||
text = ''
|
text = ''
|
||||||
@@ -354,6 +397,7 @@
|
|||||||
spotify
|
spotify
|
||||||
spotifyWaylandPatch
|
spotifyWaylandPatch
|
||||||
tor-browser
|
tor-browser
|
||||||
|
xComPwa
|
||||||
# vscode
|
# vscode
|
||||||
zulip
|
zulip
|
||||||
]
|
]
|
||||||
|
|||||||
12
nixos/flake.lock
generated
12
nixos/flake.lock
generated
@@ -1149,11 +1149,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1781106993,
|
"lastModified": 1781534922,
|
||||||
"narHash": "sha256-BddvyVeSgLZU34hzI4yaXYILmfQN9n7oQJk4RbSaZM4=",
|
"narHash": "sha256-jmzKIyRmpZLpxnR7DsWZ42bMzt+WeYDk+/x3FKSkovM=",
|
||||||
"owner": "yerlotic",
|
"owner": "yerlotic",
|
||||||
"repo": "hyprtasking",
|
"repo": "hyprtasking",
|
||||||
"rev": "3b3cb9d0b2fd4f6f4227b5b9539e849a37a17ddd",
|
"rev": "1a82ca1ac79602e3bfd5ecb0a52c40c2bf818586",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -1964,11 +1964,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1781817218,
|
"lastModified": 1781930687,
|
||||||
"narHash": "sha256-McPiyjrbjctccv9weXYSwBxdP4cRF7heNBgFQ8VYP4c=",
|
"narHash": "sha256-DT8yGwCsJuKedNRXceXx681x8Y1Wz+41/n7zP8HlURA=",
|
||||||
"owner": "rlrml",
|
"owner": "rlrml",
|
||||||
"repo": "rlru",
|
"repo": "rlru",
|
||||||
"rev": "01956ebab8adcd895c2dc72b7d1ea18139d5ab60",
|
"rev": "577eb6379e3adc0fd5e7bd9fb80556dc931c3e18",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|||||||
@@ -198,6 +198,10 @@
|
|||||||
src = inputs.hyprtasking;
|
src = inputs.hyprtasking;
|
||||||
|
|
||||||
strictDeps = true;
|
strictDeps = true;
|
||||||
|
postPatch = ''
|
||||||
|
substituteInPlace src/layout/layout_base.cpp \
|
||||||
|
--replace-fail 'e.element->passName()' 'e->element->passName()'
|
||||||
|
'';
|
||||||
nativeBuildInputs =
|
nativeBuildInputs =
|
||||||
[
|
[
|
||||||
pkgs.pkg-config
|
pkgs.pkg-config
|
||||||
@@ -287,10 +291,9 @@
|
|||||||
hyprlandPluginPackages =
|
hyprlandPluginPackages =
|
||||||
[
|
[
|
||||||
hyprNStack
|
hyprNStack
|
||||||
hyprexpo
|
|
||||||
hyprwinview
|
hyprwinview
|
||||||
hyprWorkspaceHistory
|
hyprWorkspaceHistory
|
||||||
# hyprtasking # disabled: build failure against current Hyprland API
|
hyprtasking
|
||||||
hyprDynamicCursors
|
hyprDynamicCursors
|
||||||
hyprwobbly
|
hyprwobbly
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -204,6 +204,10 @@
|
|||||||
src = inputs.hyprtasking;
|
src = inputs.hyprtasking;
|
||||||
|
|
||||||
strictDeps = true;
|
strictDeps = true;
|
||||||
|
postPatch = ''
|
||||||
|
substituteInPlace src/layout/layout_base.cpp \
|
||||||
|
--replace-fail 'e.element->passName()' 'e->element->passName()'
|
||||||
|
'';
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
pkgs.pkg-config
|
pkgs.pkg-config
|
||||||
pkgs.meson
|
pkgs.meson
|
||||||
@@ -291,10 +295,9 @@
|
|||||||
hyprlandPluginPackages =
|
hyprlandPluginPackages =
|
||||||
[
|
[
|
||||||
hyprNStack
|
hyprNStack
|
||||||
hyprexpo
|
|
||||||
hyprwinview
|
hyprwinview
|
||||||
hyprWorkspaceHistory
|
hyprWorkspaceHistory
|
||||||
# hyprtasking # disabled: build failure against current Hyprland API
|
hyprtasking
|
||||||
hyprDynamicCursors
|
hyprDynamicCursors
|
||||||
hyprwobbly
|
hyprwobbly
|
||||||
]
|
]
|
||||||
|
|||||||
Reference in New Issue
Block a user