Skip to content

Commit

Permalink
no more xfconf
Browse files Browse the repository at this point in the history
  • Loading branch information
melody-rs committed Dec 15, 2024
1 parent 797b8e8 commit 1d40839
Show file tree
Hide file tree
Showing 4 changed files with 1,206 additions and 1,070 deletions.
30 changes: 28 additions & 2 deletions binding/oneshot-binding.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,34 @@ void oneshotBindingInit() {
rb_const_set(module, rb_intern("OS"),
rb_str_new2(shState->oneshot().os().c_str()));
#ifdef __linux__
rb_const_set(module, rb_intern("DE"),
rb_str_new2(shState->oneshot().desktopEnv.c_str()));
const char *text;
switch (shState->oneshot().desktop) {
case Oneshot::DE_GNOME:
text = "gnome";
break;
case Oneshot::DE_CINNAMON:
text = "cinnamon";
break;
case Oneshot::DE_MATE:
text = "mate";
break;
case Oneshot::DE_LXDE:
text = "lxde";
break;
case Oneshot::DE_XFCE:
text = "xfce";
break;
case Oneshot::DE_KDE:
text = "kde";
break;
case Oneshot::DE_DEEPIN:
text = "deepin";
break;
case Oneshot::DE_FALLBACK:
text = "fallback";
break;
}
rb_const_set(module, rb_intern("DE"), rb_str_new2(text));
#endif
rb_const_set(module, rb_intern("USER_NAME"),
rb_str_new2(shState->oneshot().userName().c_str()));
Expand Down
Loading

0 comments on commit 1d40839

Please sign in to comment.