1 显示星期几
使用gsettings在ubuntu桌面上方的状态栏显示星期几。
1.1 打开终端,查询当前桌面设置
gsettings list-recursively org.gnome.desktop.interface
例如,
1.2 修改设置,显示星期几
gsettings set org.gnome.desktop.interface clock-show-weekday true
参考
修改设置的参考文章:https://askubuntu.com/questions/1261262/how-to-show-the-day-of-the-week-on-the-desktop-date-with-ubuntu-20-04-lts
更多关于gsettings的说明:https://blog.csdn.net/zhe_d/article/details/52011394
2 设置每周第一天
在周历中,系统默认是周日为每周的第一天,如想将周一改为第一天,需要修改locale设置。
2.1 查看当前语言环境
在终端中输入命令:
locale
例如,
确认参数值为en_US
,修改相应的参数文件/usr/share/i18n/locales/en_US
:
sudo vi /usr/share/i18n/locales/en_US
在END LC_TIME
前增加语句first_weekday 2
,然后保存,退出。
生效更改:
sudo locale-gen en_US.UTF-8
sudo update-locale LC_TIME=en_US.UTF-8
效果:
One more thing
基于同样的原理,可以设置锁屏和闲置时间等参数,参考https://blog.csdn.net/weixin_43279032/article/details/104021288
参考
https://askubuntu.com/questions/1456793/how-to-change-the-first-day-of-week-on-ubuntu-22-04
https://blog.csdn.net/ymz641/article/details/131607024