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
6 changes: 3 additions & 3 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/i3status-rs.nix
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ rustPlatform.buildRustPackage rec {
hash = "sha256-ZUgdHfXl3Y5XXkZFgTRb2cW9rdv/FpgLoDliSUIYXtI=";
};

cargoHash = "sha256-D47CnaPLNFI071uwR99K77xo5hn+xvPltYlUJGcW1DM=";
cargoHash = "sha256-1fpT5BPdmUE8saQED62NlPc6zOVNkaa1zaO7ZIuXnWc=";

nativeBuildInputs = [
pkg-config
Expand Down
2 changes: 1 addition & 1 deletion packages/regolith-displayd.nix
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ rustPlatform.buildRustPackage rec {
hash = "sha256-WUjUs9h+zzq9lFqnEHvsCJ322HVPZldUOt0LZdKbUFs=";
};

cargoHash = "sha256-SJ99TqEMMyDGqDwJ3x7EJ/jXe0iNvctTJcPnO5uVXW0=";
cargoHash = "sha256-uA7h4nMpYtqtZGm1ifTVRrEfkcKjysdqL25VXqhJekk=";

postInstall = ''
install -Dm644 data/regolith-init-kanshi.service $out/lib/systemd/user/regolith-init-kanshi.service
Expand Down
2 changes: 1 addition & 1 deletion packages/regolith-inputd.nix
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ rustPlatform.buildRustPackage rec {
hash = "sha256-PX9lWeAfJ79zEhXEKFTryf780JcoY7k6XRSxzHM1WWw=";
};

cargoHash = "sha256-6dlpuQSfxFnam4F5QSoqs1vi7EqY8MraRkTm4iQUSR4=";
cargoHash = "sha256-B/lAyjU1vMZKgg+fRvOm0QfVEKyaZHMexvxraI5f17I=";

nativeBuildInputs = [
pkg-config
Expand Down
2 changes: 1 addition & 1 deletion packages/regolith-powerd.nix
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ rustPlatform.buildRustPackage rec {
hash = "sha256-Hu6EhNBClHsh0mrOAfPw848q0czoivoYnpiE9/+drK4=";
};

cargoHash = "sha256-mVs3g7ccAGST53I4/7daOm8EJKdKh0mJGhCPFX6rfhs=";
cargoHash = "sha256-HHnilpOW1bnhxFqy5l5+FPO8Qp5zSAE/k14unK/gEig=";

nativeBuildInputs = [
pkg-config
Expand Down
2 changes: 1 addition & 1 deletion packages/trawl.nix
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ rustPlatform.buildRustPackage rec {
hash = "sha256-/nUvV0tgPzOJ5L+EXw6J/1lgRT+BPnlkv7yzko15o6A";
};

cargoHash = "sha256-5kDWFJ6kmzrs5U1uOfmGTLE+z8DGcS+BIv8ZIUU4StA=";
cargoHash = "sha256-TXdqphvt55PkTiXXjftSRkoMyEyBW0x0csjNPruYtoo=";

postInstall = ''
mkdir -p $out/lib/systemd/user
Expand Down
162 changes: 71 additions & 91 deletions sway-regolith/01-regolith-trawl.patch
Original file line number Diff line number Diff line change
@@ -1,15 +1,3 @@
Index: sway-regolith/include/sway/commands.h
===================================================================
--- sway-regolith.orig/include/sway/commands.h
+++ sway-regolith/include/sway/commands.h
@@ -172,6 +172,7 @@ sway_cmd cmd_resize;
sway_cmd cmd_scratchpad;
sway_cmd cmd_seamless_mouse;
sway_cmd cmd_set;
+sway_cmd cmd_set_from_resource;
sway_cmd cmd_shortcuts_inhibitor;
sway_cmd cmd_show_marks;
sway_cmd cmd_smart_borders;
Index: sway-regolith/meson.build
===================================================================
--- sway-regolith.orig/meson.build
Expand All @@ -19,85 +7,16 @@ Index: sway-regolith/meson.build
- 'sway',
+ 'sway-regolith',
'c',
version: '1.9',
version: '1.10.1',
license: 'MIT',
@@ -45,6 +45,27 @@ subproject(
version: wlroots_version,
)
wlroots = dependency('wlroots', version: wlroots_version)
+xkbcommon = dependency('xkbcommon')
+cairo = dependency('cairo')
+pango = dependency('pango')
+pangocairo = dependency('pangocairo')
+gdk_pixbuf = dependency('gdk-pixbuf-2.0', required: get_option('gdk-pixbuf'))
+pixman = dependency('pixman-1')
+glesv2 = dependency('glesv2')
+libevdev = dependency('libevdev')
+libinput = dependency('libinput', version: '>=1.6.0')
+xcb = dependency('xcb', required: get_option('xwayland'))
+drm_full = dependency('libdrm') # only needed for drm_fourcc.h
+drm = drm_full.partial_dependency(compile_args: true, includes: true)
+libudev = dependency('libudev')
+bash_comp = dependency('bash-completion', required: false)
+fish_comp = dependency('fish', required: false)
+math = cc.find_library('m')
+rt = cc.find_library('rt')
+xcb_icccm = dependency('xcb-icccm', required: get_option('xwayland'))
+threads = dependency('threads') # for pthread_setschedparam
@@ -80,6 +80,7 @@ math = cc.find_library('m')
rt = cc.find_library('rt')
xcb_icccm = wlroots_features['xwayland'] ? dependency('xcb-icccm') : null_dep
threads = dependency('threads') # for pthread_setschedparam
+trawldb = dependency('trawldb-0')
+
wlroots_features = {
'xwayland': false,
'libinput_backend': false,
Index: sway-regolith/sway/commands.c
===================================================================
--- sway-regolith.orig/sway/commands.c
+++ sway-regolith/sway/commands.c
@@ -84,6 +84,7 @@ static const struct cmd_handler handlers
{ "popup_during_fullscreen", cmd_popup_during_fullscreen },
{ "seat", cmd_seat },
{ "set", cmd_set },
+ { "set_from_resource", cmd_set_from_resource},
{ "show_marks", cmd_show_marks },
{ "smart_borders", cmd_smart_borders },
{ "smart_gaps", cmd_smart_gaps },
@@ -279,8 +280,8 @@ list_t *execute_command(char *_exec, str
goto cleanup;
}

- // Var replacement, for all but first argument of set
- for (int i = handler->handle == cmd_set ? 2 : 1; i < argc; ++i) {
+ // Var replacement, for all but first argument of set and xresource
+ for (int i = handler->handle == cmd_set || handler->handle == cmd_set_from_resource ? 2 : 1; i < argc; ++i) {
argv[i] = do_var_replacement(argv[i]);
}

@@ -392,7 +393,7 @@ struct cmd_results *config_command(char
}

// Do variable replacement
- if (handler->handle == cmd_set && argc > 1 && *argv[1] == '$') {
+ if ((handler->handle == cmd_set || handler->handle == cmd_set_from_resource )&& argc > 1 && *argv[1] == '$') {
// Escape the variable name so it does not get replaced by one shorter
char *temp = calloc(1, strlen(argv[1]) + 2);
temp[0] = '$';
@@ -407,7 +408,7 @@ struct cmd_results *config_command(char
free(command);

// Strip quotes and unescape the string
- for (int i = handler->handle == cmd_set ? 2 : 1; i < argc; ++i) {
+ for (int i = handler->handle == cmd_set || handler->handle == cmd_set_from_resource ? 2 : 1; i < argc; ++i) {
if (handler->handle != cmd_exec && handler->handle != cmd_exec_always
&& handler->handle != cmd_mode
&& handler->handle != cmd_bindsym
@@ -415,6 +416,7 @@ struct cmd_results *config_command(char
&& handler->handle != cmd_bindswitch
&& handler->handle != cmd_bindgesture
&& handler->handle != cmd_set
+ && handler->handle != cmd_set_from_resource
&& handler->handle != cmd_for_window
&& (*argv[i] == '\"' || *argv[i] == '\'')) {
strip_quotes(argv[i]);
if get_option('sd-bus-provider') == 'auto'
if not get_option('tray').disabled()
Index: sway-regolith/sway/commands/set_from_resource.c
===================================================================
--- /dev/null
Expand Down Expand Up @@ -150,23 +69,84 @@ Index: sway-regolith/sway/commands/set_from_resource.c
+ free(resource_value);
+ return cmd_set(2, argv_new);
+}
Index: sway-regolith/include/sway/commands.h
===================================================================
--- sway-regolith.orig/include/sway/commands.h
+++ sway-regolith/include/sway/commands.h
@@ -173,6 +173,7 @@ sway_cmd cmd_resize;
sway_cmd cmd_scratchpad;
sway_cmd cmd_seamless_mouse;
sway_cmd cmd_set;
+sway_cmd cmd_set_from_resource;
sway_cmd cmd_shortcuts_inhibitor;
sway_cmd cmd_show_marks;
sway_cmd cmd_smart_borders;
Index: sway-regolith/sway/commands.c
===================================================================
--- sway-regolith.orig/sway/commands.c
+++ sway-regolith/sway/commands.c
@@ -83,6 +83,7 @@ static const struct cmd_handler handlers
{ "popup_during_fullscreen", cmd_popup_during_fullscreen },
{ "seat", cmd_seat },
{ "set", cmd_set },
+ { "set_from_resource", cmd_set_from_resource },
{ "show_marks", cmd_show_marks },
{ "smart_borders", cmd_smart_borders },
{ "smart_gaps", cmd_smart_gaps },
@@ -279,8 +280,8 @@ list_t *execute_command(char *_exec, str
goto cleanup;
}

- // Var replacement, for all but first argument of set
- for (int i = handler->handle == cmd_set ? 2 : 1; i < argc; ++i) {
+ // Var replacement, for all but first argument of set and xresource
+ for (int i = handler->handle == cmd_set || handler->handle == cmd_set_from_resource ? 2 : 1; i < argc; ++i) {
argv[i] = do_var_replacement(argv[i]);
}

@@ -392,7 +393,7 @@ struct cmd_results *config_command(char
}

// Do variable replacement
- if (handler->handle == cmd_set && argc > 1 && *argv[1] == '$') {
+ if ((handler->handle == cmd_set || handler->handle == cmd_set_from_resource )&& argc > 1 && *argv[1] == '$') {
// Escape the variable name so it does not get replaced by one shorter
char *temp = calloc(1, strlen(argv[1]) + 2);
temp[0] = '$';
@@ -407,7 +408,7 @@ struct cmd_results *config_command(char
free(command);

// Strip quotes and unescape the string
- for (int i = handler->handle == cmd_set ? 2 : 1; i < argc; ++i) {
+ for (int i = handler->handle == cmd_set || handler->handle == cmd_set_from_resource ? 2 : 1; i < argc; ++i) {
if (handler->handle != cmd_exec && handler->handle != cmd_exec_always
&& handler->handle != cmd_mode
&& handler->handle != cmd_bindsym
@@ -415,6 +416,7 @@ struct cmd_results *config_command(char
&& handler->handle != cmd_bindswitch
&& handler->handle != cmd_bindgesture
&& handler->handle != cmd_set
+ && handler->handle != cmd_set_from_resource
&& handler->handle != cmd_for_window
&& (*argv[i] == '\"' || *argv[i] == '\'')) {
strip_quotes(argv[i]);
Index: sway-regolith/sway/meson.build
===================================================================
--- sway-regolith.orig/sway/meson.build
+++ sway-regolith/sway/meson.build
@@ -102,6 +102,7 @@ sway_sources = files(
@@ -103,6 +103,7 @@ sway_sources = files(
'commands/seat/shortcuts_inhibitor.c',
'commands/seat/xcursor_theme.c',
'commands/set.c',
+ 'commands/set_from_resource.c',
'commands/show_marks.c',
'commands/shortcuts_inhibitor.c',
'commands/smart_borders.c',
@@ -230,6 +231,7 @@ sway_deps = [
@@ -234,6 +235,7 @@ sway_deps = [
xkbcommon,
xcb,
xcb_icccm,
+ trawldb,
]

if have_xwayland
if wlroots_features['xwayland']
20 changes: 16 additions & 4 deletions sway-regolith/02-version-fix.patch
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ Index: sway-regolith/meson.build
===================================================================
--- sway-regolith.orig/meson.build
+++ sway-regolith/meson.build
@@ -186,18 +186,6 @@ endif
@@ -157,18 +156,18 @@ endif
add_project_arguments('-DSYSCONFDIR="/@0@"'.format(join_paths(prefix, sysconfdir)), language : 'c')

version = '"@0@"'.format(meson.project_version())
-git = find_program('git', native: true, required: false)
-if git.found()
- git_commit = run_command([git, 'rev-parse', '--short', 'HEAD'], check: false)
- git_branch = run_command([git, 'rev-parse', '--abbrev-ref', 'HEAD'], check: false)
- git_commit = run_command([git, '--git-dir=.git', 'rev-parse', '--short', 'HEAD'], check: false)
- git_branch = run_command([git, '--git-dir=.git', 'rev-parse', '--abbrev-ref', 'HEAD'], check: false)
- if git_commit.returncode() == 0 and git_branch.returncode() == 0
- version = '"@0@-@1@ (" __DATE__ ", branch \'@2@\')"'.format(
- meson.project_version(),
Expand All @@ -18,6 +18,18 @@ Index: sway-regolith/meson.build
- )
- endif
-endif
+# git = find_program('git', native: true, required: false)
+# if git.found()
+# git_commit = run_command([git, '--git-dir=.git', 'rev-parse', '--short', 'HEAD'], check: false)
+# git_branch = run_command([git, '--git-dir=.git', 'rev-parse', '--abbrev-ref', 'HEAD'], check: false)
+# if git_commit.returncode() == 0 and git_branch.returncode() == 0
+# version = '"@0@-@1@ (" __DATE__ ", branch \'@2@\')"'.format(
+# meson.project_version(),
+# git_commit.stdout().strip(),
+# git_branch.stdout().strip(),
+# )
+# endif
+# endif
add_project_arguments('-DSWAY_VERSION=@0@'.format(version), language: 'c')

# Compute the relative path used by compiler invocations.
# Compute the relative path used by compiler invocations.
Loading