C++ in ubuntu pop up message via notify-send command . zenity command

复制代码
void Util::threadLambda170(int x, int y)
{
    thread t1([](int x, int y)
              {
        auto result=pow(x,y);
        cout<<fixed<<"Pow="<<result<<endl; },
              x, y);
    t1.join();
   
    string str("/usr/bin/notify-send \"Finished in void Util::threadLambda170(int x,int y) \" ");
    str.append(getTimeNow35());
    system(str.c_str());
}
复制代码

 

复制代码
void Util::threadLambda170(int x, int y)
{
    thread t1([](int x, int y)
              {
        auto result=pow(x,y);
        cout<<fixed<<"Pow="<<result<<endl; },
              x, y);
    t1.join();
     
    string str;
    str.append("zenity --info --text=");
    str.append("\"Finished in void Util::threadLambda170(int x,int y)\n\"");
    str.append(getTimeNow35());
    int cmdResult = system(str.c_str());
    cout<<"cmdResult="<<cmdResult<<",in "<<__LINE__<<endl;    
}
复制代码

 

 

 

 

 

 

 

 

 

 

复制代码
void Util::notifysend172()
{
    string str;
    str.append("notify-send ");
    str.append("\"In void Util::notifysend172() \"");
    str.append(" \"Now is \"");
    str.append(getTimeNow35());
    system(str.c_str());
}
复制代码

 

posted @   FredGrit  阅读(45)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 分享一个免费、快速、无限量使用的满血 DeepSeek R1 模型,支持深度思考和联网搜索!
· 基于 Docker 搭建 FRP 内网穿透开源项目(很简单哒)
· ollama系列01:轻松3步本地部署deepseek,普通电脑可用
· 25岁的心里话
· 按钮权限的设计及实现
点击右上角即可分享
微信分享提示