This is for Mint Xfce 20.x, add the basic datetime plugin without week numbers.
default 'clock' plugin vs 'datetime' plugin
https://forum.xfce.org/viewtopic.php?id=12710
clock is 102KiB
datetime is 32KiB
I believe with 'clock' it will automatically integrate theme related changes with font, whereas 'datetime' does not, but it does provide the font setting directly in the plugin settings option.
We can just overwrite the 'datetime' plugin easily to eliminate the hardcoded week number display.
-The overall idea
1. Get the source code
2. Make the edit to 1 file
3. Compile
4. Install
1a. Download a tar package, extract it, and you can view the files there with Thunar, also be prepared to visit that extracted path location in terminal.
2a. You can just do a simple edit using Xed, comment out 1 line.
3a. You'll need to install some tools and dependencies to be able to compile.
4a. Just copy/paste commands on terminal, shown below.
This is the quick instruction, if you understand it, otherwise you can walkthrough each step below:
1. https://gitlab.xfce.org/panel-plugins/x ... gin/-/tags (get 0.8.1)
2. comment out the line with GTK_CALENDAR_SHOW_WEEK_NUMBERS in /panel-plugin/datetime.c
( the comment beginning marking is
/*
and the ending marker is */
)3.
Code: Select all
apt install xfce4-dev-tools libglib2.0-dev libxfce4ui-2-dev libxfce4panel-2.0-dev
./autogen.sh
make
Code: Select all
cd panel-plugin/.libs
sudo cp libdatetime.so /usr/lib/x86_64-linux-gnu/xfce4/panel/plugins/
If you want more of the step-by-step instruction:
go here: https://gitlab.xfce.org/panel-plugins/x ... gin/-/tags
download this package:
xfce4-datetime-plugin-0.8.1
on the right is the download option, pick one of the tar options, tar.bz2 is the latest-greatest(highest compression I guess, but the file is very small and any .tar option is fine for this case).
Now, go find that file in Thunar probably in the Downloads folder, double-click it,
at the top left, use extract, and change the destination directory, or not, to something like ~/source/ or just extract it to your user home there, -just put it somewhere convenient for you to use with terminal, so the idea is that terminal starts at home(~) so just make it easy so you don't have to type a lot of path commands later. Or just keep the path where it is and it will decompress into ~/Downloads.
now open terminal, and change to that location.
cd source
you can use autocomplete on paths(and commands) with the TAB keyboard key, so you type: cd sou(press TAB)xfc(press TAB)
cd Downloads
(if you didn't change to a specific path to extract the files)Now, you are in that plugin package directory: ~/source/xfce4-datetime-plugin-xfce4-datetime-plugin-0.8.1 (or ~/Downloads/xfce4-datetime-plugin-xfce4-datetime-plugin-0.8.1)
If you read the README you can follow along to build the package.
Before you do that you need to install some necessary tools and dependencies.
copy/paste this command to terminal:
Code: Select all
apt install xfce4-dev-tools libglib2.0-dev libxfce4ui-2-dev libxfce4panel-2.0-dev
Now it's time to edit the source code file and remove the hard-coded "show-week-numbers" line.
Use Thunar, open the file under that location under
/panel-plugin/datetime.c
line 292:
GTK_CALENDAR_SHOW_WEEK_NUMBERS |
(you could just use Find with CTRL+F and paste SHOW_WEEK_NUMBERS
The whole block looks like this:
Code: Select all
display_options = GTK_CALENDAR_SHOW_HEADING |
GTK_CALENDAR_SHOW_WEEK_NUMBERS |
GTK_CALENDAR_SHOW_DAY_NAMES;
/* GTK_CALENDAR_SHOW_WEEK_NUMBERS | */
so, now the block should look like this:
Code: Select all
display_options = GTK_CALENDAR_SHOW_HEADING |
/* GTK_CALENDAR_SHOW_WEEK_NUMBERS | */
GTK_CALENDAR_SHOW_DAY_NAMES;
That is done, this will enable the plugin to start without showing the week numbers now, after compile and install.
next, start the config operation and then make it. Use these 2 terminal commands:
Code: Select all
./autogen.sh
make
Next, get it installed. Do it this manual way instead of the default, because the paths are not set correctly and it's not going to work without comprehensive knowledge of the ./configure system, variables and paths:
Change to the sub folder where the plugin file is now located with this terminal command:
Code: Select all
cd panel-plugin/.libs
You can also use copy/paste from here to there.
put the .so here:
/usr/lib/x86_64-linux-gnu/xfce4/panel/plugins/ <- libdatetime.so
use(copy/paste) for the terminal command:
Code: Select all
sudo cp libdatetime.so /usr/lib/x86_64-linux-gnu/xfce4/panel/plugins/
now restart the panel with command:
Code: Select all
xfce4-panel -r
-right click the panel on an empty area -> click panel -> click add new items -> add 'datetime', close the window
-right click the original clock -> click remove