Skip to content

Commit

Permalink
Fix: use system shell everywhere
Browse files Browse the repository at this point in the history
  • Loading branch information
Stunkymonkey committed Jul 23, 2024
1 parent 9bc4297 commit 0c92d6a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/ui/key_menu.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ use crate::config::{
pub struct KeyMenuWidget {
power_config: PowerControlConfig,
switcher_config: SwitcherConfig,
system_shell: String,
}

impl PowerControl {
Expand All @@ -31,10 +32,11 @@ impl PowerControl {
}

impl KeyMenuWidget {
pub fn new(power_config: PowerControlConfig, switcher_config: SwitcherConfig) -> Self {
pub fn new(power_config: PowerControlConfig, switcher_config: SwitcherConfig, system_shell: String) -> Self {
Self {
power_config,
switcher_config,
system_shell,
}
}

Expand Down Expand Up @@ -100,7 +102,7 @@ impl KeyMenuWidget {
.chain(self.power_config.entries.0.iter())
{
if key_code == get_key(&power_control.key) {
let cmd_status = Command::new("bash")
let cmd_status = Command::new(&self.system_shell)
.arg("-c")
.arg(power_control.cmd.clone())
.output();
Expand Down
1 change: 1 addition & 0 deletions src/ui/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,7 @@ impl LoginForm {
key_menu: KeyMenuWidget::new(
config.power_controls.clone(),
config.environment_switcher.clone(),
config.system_shell.clone(),
),
environment: Arc::new(Mutex::new(SwitcherWidget::new(
crate::post_login::get_envs(&config)
Expand Down

0 comments on commit 0c92d6a

Please sign in to comment.