sway: launch gui apps via sane-open-desktop instead of inline
this will allow for sandboxing, in the future
This commit is contained in:
@@ -5,6 +5,15 @@
|
||||
|
||||
{
|
||||
sane.programs.splatmoji = {
|
||||
packageUnwrapped = pkgs.splatmoji.overrideAttrs (upstream: {
|
||||
desktopItems = (upstream.desktopItems or []) ++ [
|
||||
(pkgs.makeDesktopItem {
|
||||
name = "splatmoji";
|
||||
exec = "splatmoji -s medium-light type";
|
||||
desktopName = "Splatmoji Emoji Picker";
|
||||
})
|
||||
];
|
||||
});
|
||||
sandbox.method = "bwrap";
|
||||
sandbox.whitelistWayland = true; # it calls into a dmenu helper
|
||||
sandbox.extraHomePaths = [
|
||||
|
@@ -116,6 +116,7 @@ in
|
||||
"pulsemixer" # for volume controls
|
||||
"rofi" # menu/launcher
|
||||
"rofi-snippets"
|
||||
"sane-open-desktop"
|
||||
"splatmoji" # used by sway config
|
||||
"sway-contrib.grimshot" # used by sway config
|
||||
# "swayidle" # enable if you need it
|
||||
|
@@ -68,11 +68,12 @@ bindsym --locked XF86MonBrightnessDown exec brightnessctl set 5%-
|
||||
|
||||
#### special functions
|
||||
bindsym $mod+Print exec @screenshot_cmd@
|
||||
bindsym $mod+l exec swaylock --indicator-idle-visible --indicator-radius 100 --indicator-thickness 30
|
||||
bindsym $mod+s exec rofi-snippets
|
||||
bindsym $mod+slash exec splatmoji -s medium-light type
|
||||
bindsym $mod+d exec rofi -show
|
||||
bindsym $mod+Return exec xdg-terminal-exec
|
||||
bindsym $mod+l exec sane-open-desktop swaylock.desktop
|
||||
bindsym $mod+s exec sane-open-desktop rofi-snippets.desktop
|
||||
bindsym $mod+slash exec sane-open-desktop splatmoji.desktop
|
||||
bindsym $mod+d exec sane-open-desktop rofi.desktop
|
||||
bindsym $mod+Return exec sane-open-desktop xdg-terminal-exec.desktop
|
||||
|
||||
bindsym $mod+Shift+q kill
|
||||
bindsym $mod+Shift+e exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -b 'Yes, exit sway' 'swaymsg exit'
|
||||
bindsym $mod+Shift+c reload
|
||||
|
@@ -1,9 +1,22 @@
|
||||
{ config, lib, ... }:
|
||||
{ config, lib, pkgs, ... }:
|
||||
let
|
||||
cfg = config.sane.programs.swaylock;
|
||||
in
|
||||
{
|
||||
sane.programs.swaylock = {
|
||||
packageUnwrapped = pkgs.swaylock.overrideAttrs (upstream: {
|
||||
nativeBuildInputs = (upstream.nativeBuildInputs or []) ++ [
|
||||
pkgs.copyDesktopItems
|
||||
];
|
||||
desktopItems = (upstream.desktopItems or []) ++ [
|
||||
(pkgs.makeDesktopItem {
|
||||
name = "swaylock";
|
||||
exec = "swaylock --indicator-idle-visible --indicator-radius 100 --indicator-thickness 30";
|
||||
desktopName = "Sway session locker";
|
||||
})
|
||||
];
|
||||
});
|
||||
|
||||
sandbox.method = "bwrap";
|
||||
sandbox.extraPaths = [
|
||||
# N.B.: we need to be able to follow /etc/shadow to wherever it's symlinked.
|
||||
|
Reference in New Issue
Block a user