CDE: Difference between revisions

From NixOS Wiki
imported>User
No edit summary
imported>User
No edit summary
Line 91: Line 91:


{{file|~/.Xdefaults|bash|<nowiki>
{{file|~/.Xdefaults|bash|<nowiki>
Dtwm*chrome*iconImage:  chrome
Dtwm*qutebrowser*iconImage:  qutebrowser
</nowiki>}}
</nowiki>}}



Revision as of 08:47, 17 May 2020

Aka cdesktopenv or Common Desktop Environment is a vintage desktop environment.

Enabling

/etc/nixos/configuration.nix
  services.xserver.desktopManager.cde.enable = true;

Changing fonts

 sudo mkdir -p /etc/dt/config/xfonts
 sudo cp -r ${pkgs.cdesktopenv}/opt/dt/appconfig/types/C /etc/dt/config/xfonts
 sudo cp -r ${pkgs.cdesktopenv}/opt/dt/appconfig/types/en_US.UTF-8 /etc/dt/config/xfonts

Now edit /etc/dt/config/xfonts/*/fonts.alias and remove all -dt-interface references. Add these instead. In this example Helvetica and Courier are used instead of fixed fonts.

 "-dt-interface system-medium-r-normal-xxs sans-10-100-72-72-p-61-iso8859-1"  "-adobe-helvetica-medium-r-normal--10-*-75-75-p-56-iso8859-1"
 "-dt-interface system-medium-r-normal-xs sans-11-110-72-72-p-64-iso8859-1"   "-adobe-helvetica-medium-r-normal--11-80-100-100-p-56-iso8859-1"
 "-dt-interface system-medium-r-normal-s sans-12-120-72-72-p-73-iso8859-1"    "-adobe-helvetica-medium-r-normal--12-120-75-75-p-67-iso8859-1"
 "-dt-interface system-medium-r-normal-m sans-13-130-72-72-p-87-iso8859-1"    "-adobe-helvetica-medium-r-normal--14-140-75-75-p-77-iso8859-1"
 "-dt-interface system-medium-r-normal-l sans-15-150-72-72-p-100-iso8859-1"   "-adobe-helvetica-medium-r-normal--14-140-75-75-p-77-iso8859-1"
 "-dt-interface system-medium-r-normal-xl sans-18-180-72-72-p-114-iso8859-1"  "-adobe-helvetica-medium-r-normal--18-180-75-75-p-98-iso8859-1"
 "-dt-interface system-medium-r-normal-xxl sans-21-210-72-72-p-123-iso8859-1" "-adobe-helvetica-medium-r-normal--20-140-100-100-p-100-iso8859-1"
 "-dt-interface user-medium-r-normal-xxs serif-10-100-72-72-m-60-iso8859-1"   "-adobe-courier-medium-r-normal--10-100-75-75-m-60-iso8859-1"
 "-dt-interface user-medium-r-normal-xs serif-11-110-72-72-m-60-iso8859-1"    "-adobe-courier-medium-r-normal--11-80-100-100-m-60-iso8859-1"
 "-dt-interface user-medium-r-normal-s serif-12-120-72-72-m-80-iso8859-1"     "-adobe-courier-medium-r-normal--12-120-75-75-m-70-iso8859-1"
 "-dt-interface user-medium-r-normal-m serif-13-130-72-72-m-90-iso8859-1"     "-adobe-courier-medium-r-normal--14-140-75-75-m-90-iso8859-1"
 "-dt-interface user-medium-r-normal-l serif-15-150-72-72-m-110-iso8859-1"    "-adobe-courier-medium-r-normal--14-140-75-75-m-90-iso8859-1"
 "-dt-interface user-medium-r-normal-xl serif-18-180-72-72-m-120-iso8859-1"   "-adobe-courier-medium-r-normal--18-180-75-75-m-110-iso8859-1"
 "-dt-interface user-medium-r-normal-xxl serif-21-210-72-72-m-140-iso8859-1"  "-adobe-courier-medium-r-normal-*-20-140-100-100-m-110-iso8859-1"
 "-dt-interface user-bold-r-normal-xxs serif-10-100-72-72-m-60-iso8859-1"     "-adobe-courier-bold-r-normal--10-100-75-75-m-60-iso8859-1"
 "-dt-interface user-bold-r-normal-xs serif-11-110-72-72-m-60-iso8859-1"      "-adobe-courier-bold-r-normal--11-80-100-100-m-60-iso8859-1"
 "-dt-interface user-bold-r-normal-s serif-12-120-72-72-m-80-iso8859-1"       "-adobe-courier-bold-r-normal--12-120-75-75-m-70-iso8859-1"
 "-dt-interface user-bold-r-normal-m serif-13-130-72-72-m-90-iso8859-1"       "-adobe-courier-bold-r-normal--14-140-75-75-m-90-iso8859-1"
 "-dt-interface user-bold-r-normal-l serif-15-150-72-72-m-110-iso8859-1"      "-adobe-courier-bold-r-normal--14-140-75-75-m-90-iso8859-1"
 "-dt-interface user-bold-r-normal-xl serif-18-180-72-72-m-120-iso8859-1"     "-adobe-courier-bold-r-normal--18-180-75-75-m-110-iso8859-1"
 "-dt-interface user-bold-r-normal-xxl serif-21-210-72-72-m-140-iso8859-1"    "-adobe-courier-bold-r-normal--20-140-100-100-m-110-iso8859-1"

Adding programs to autolaunch

~/.dt/sessions/sessionetc
#!/usr/bin/env nix-shell
#!nix-shell -i sh -p xcompmgr xosview2

xcompmgr -c &
xosview2 &
 chmod +x ~/.dt/sessions/sessionetc

Editing panel

 cp ${pkgs.cdesktopenv}/opt/dt/appconfig/types/C/dtwm.fp ~/.dt/types
 chmod +w ~/.dt/types/dtwm.fp

Now edit ~/.dt/types/dtwm.fp

To disable system control, add a delete property like this

 CONTROL Trash
{
 CONTAINER_NAME  Top
 CONTAINER_TYPE  BOX
 DELETE          True
}

Creating an own program icon

Use Desktop_Apps/Create Action tool. Save actions under ~/.dt/appmanager

Icons should be in XPM or XBM format. Use the following script to convert from png icons

~/.dt/convert.sh
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p imagemagick

file=`basename ${1%.*}`

convert $1 -resize 48x48 ~/.dt/icons/$file.l.pm
convert $1 -resize 32x32 ~/.dt/icons/$file.m.pm
convert $1 -resize 24x24 ~/.dt/icons/$file.s.pm
convert $1 -resize 16x16 ~/.dt/icons/$file.t.pm
 chmod +x ~/.dt/convert.sh

For example

 ~/.dt/convert.sh /run/current-system/sw/share/icons/hicolor/512x512/apps/qutebrowser.png

Setting icons on minimized programs

~/.Xdefaults
Dtwm*qutebrowser*iconImage:   qutebrowser

Own wallpapers

Put .jpg or .png under ~/.dt/backdrops then select it in Style Manager / Backdrop

Useful sources