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 = {
|
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.method = "bwrap";
|
||||||
sandbox.whitelistWayland = true; # it calls into a dmenu helper
|
sandbox.whitelistWayland = true; # it calls into a dmenu helper
|
||||||
sandbox.extraHomePaths = [
|
sandbox.extraHomePaths = [
|
||||||
|
@@ -116,6 +116,7 @@ in
|
|||||||
"pulsemixer" # for volume controls
|
"pulsemixer" # for volume controls
|
||||||
"rofi" # menu/launcher
|
"rofi" # menu/launcher
|
||||||
"rofi-snippets"
|
"rofi-snippets"
|
||||||
|
"sane-open-desktop"
|
||||||
"splatmoji" # used by sway config
|
"splatmoji" # used by sway config
|
||||||
"sway-contrib.grimshot" # used by sway config
|
"sway-contrib.grimshot" # used by sway config
|
||||||
# "swayidle" # enable if you need it
|
# "swayidle" # enable if you need it
|
||||||
|
@@ -68,11 +68,12 @@ bindsym --locked XF86MonBrightnessDown exec brightnessctl set 5%-
|
|||||||
|
|
||||||
#### special functions
|
#### special functions
|
||||||
bindsym $mod+Print exec @screenshot_cmd@
|
bindsym $mod+Print exec @screenshot_cmd@
|
||||||
bindsym $mod+l exec swaylock --indicator-idle-visible --indicator-radius 100 --indicator-thickness 30
|
bindsym $mod+l exec sane-open-desktop swaylock.desktop
|
||||||
bindsym $mod+s exec rofi-snippets
|
bindsym $mod+s exec sane-open-desktop rofi-snippets.desktop
|
||||||
bindsym $mod+slash exec splatmoji -s medium-light type
|
bindsym $mod+slash exec sane-open-desktop splatmoji.desktop
|
||||||
bindsym $mod+d exec rofi -show
|
bindsym $mod+d exec sane-open-desktop rofi.desktop
|
||||||
bindsym $mod+Return exec xdg-terminal-exec
|
bindsym $mod+Return exec sane-open-desktop xdg-terminal-exec.desktop
|
||||||
|
|
||||||
bindsym $mod+Shift+q kill
|
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+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
|
bindsym $mod+Shift+c reload
|
||||||
|
@@ -1,9 +1,22 @@
|
|||||||
{ config, lib, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
let
|
let
|
||||||
cfg = config.sane.programs.swaylock;
|
cfg = config.sane.programs.swaylock;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
sane.programs.swaylock = {
|
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.method = "bwrap";
|
||||||
sandbox.extraPaths = [
|
sandbox.extraPaths = [
|
||||||
# N.B.: we need to be able to follow /etc/shadow to wherever it's symlinked.
|
# N.B.: we need to be able to follow /etc/shadow to wherever it's symlinked.
|
||||||
|
Reference in New Issue
Block a user