CDE: Difference between revisions
imported>User No edit summary |
|||
(18 intermediate revisions by 5 users not shown) | |||
Line 1: | Line 1: | ||
[[File:CDE.png]] | {{low quality|This page contains pseudo-code which will not work out of the box.}} | ||
{{warning|This article makes use of precarious stateful system manipulations (imperatively writing to <code>/etc</code>).}} | |||
[[File:CDE.png|frameless|right]] | |||
Aka '''cdesktopenv''' or '''Common Desktop Environment''' is a vintage desktop environment. | Aka '''cdesktopenv''' or '''Common Desktop Environment''' is a vintage desktop environment. | ||
== Changing fonts == | == Changing fonts == | ||
sudo mkdir -p /etc/dt/config/xfonts | sudo mkdir -p /etc/dt/config/xfonts | ||
Line 60: | Line 63: | ||
== Creating an own program icon == | == Creating an own program icon == | ||
Icons should be in XPM or XBM format. Use the following configuration to convert from png icons | Icons should be in XPM or XBM format. Use the following configuration to convert from png icons | ||
Line 84: | Line 85: | ||
cde-icons /run/current-system/sw/share/icons/hicolor/512x512/apps/qutebrowser.png | cde-icons /run/current-system/sw/share/icons/hicolor/512x512/apps/qutebrowser.png | ||
Then select it in Desktop_Apps/Create Action tool. Save actions under ~/.dt/appmanager | |||
== Setting icons on minimized programs == | == Setting icons on minimized programs == | ||
Please note that not all programs support this | |||
{{file|~/.Xdefaults|bash|<nowiki> | {{file|~/.Xdefaults|bash|<nowiki> | ||
Dtwm*qutebrowser*iconImage: qutebrowser | Dtwm*qutebrowser*iconImage: qutebrowser | ||
</nowiki>}} | </nowiki>}} | ||
== | == Setting wallpaper == | ||
Put .jpg or .png under ~/.dt/backdrops then select it in Style Manager / Backdrop | Put .jpg or .png under ~/.dt/backdrops then select it in Style Manager / Backdrop | ||
Line 115: | Line 118: | ||
}; | }; | ||
</nowiki>}} | </nowiki>}} | ||
Now copy the theme to home directory | Now copy the theme to home directory. Instead of Arizona.dp pick the palette you currently use in CDE for the match | ||
mkdir -p ~/.themes | mkdir -p ~/.themes | ||
cp -Lr --no-preserve=mode /run/current-system/sw/share/themes/cdetheme ~/.themes/ | cp -Lr --no-preserve=mode /run/current-system/sw/share/themes/cdetheme ~/.themes/ | ||
Line 122: | Line 125: | ||
./switchtheme ../palettes/Arizona.dp 8 3 22 false true false | ./switchtheme ../palettes/Arizona.dp 8 3 22 false true false | ||
== Changing volume and brightness with media keys == | |||
Add the following to ~/.dt/dtwmrc | |||
Keys DtKeyBindings | |||
{ | |||
<Key>XF86AudioLowerVolume root|icon|window|ifkey f.exec "amixer set Master -q 5%-" | |||
<Key>XF86AudioRaiseVolume root|icon|window|ifkey f.exec "amixer set Master -q 5%+" | |||
<Key>XF86AudioMute root|icon|window|ifkey f.exec "amixer set Master -q toggle" | |||
<Key>XF86MonBrightnessUp root|icon|window|ifkey f.exec "xbacklight -inc 1" | |||
<Key>XF86MonBrightnessDown root|icon|window|ifkey f.exec "xbacklight -dec 1" | |||
} | |||
== Battery widget == | |||
{{file|/etc/nixos/configuration.nix|nix|<nowiki> | |||
let | |||
cde-battery = pkgs.writeScriptBin "cde-battery" '' | |||
#!${pkgs.cdesktopenv}/opt/dt/bin/dtksh | |||
${pkgs.lib.readFile (pkgs.fetchurl { | |||
url = "https://raw.githubusercontent.com/edorig/dtksh/5f49e402b391c81ebea9609bdec9c7716e70a8c0/battery"; | |||
sha256 = "0zjn9zl1as9xbk2845bbdy2xfj29b4hvvalcz8kf2llkndbfswvl"; | |||
})} | |||
''; | |||
in { | |||
services.xserver.desktopManager.cde.extraPackages = with pkgs; | |||
options.services.xserver.desktopManager.cde.extraPackages.default ++ [ | |||
cde-battery | |||
]; | |||
} | |||
</nowiki>}} | |||
Please read [[#Adding programs to autolaunch|Adding programs to autolaunch section]] | |||
{{file|~/.dt/sessions/sessionetc|bash|<nowiki> | |||
#!/bin/sh | |||
cde-battery & | |||
</nowiki>}} | |||
Please read [[#Editing panel|Editing panel section]] | |||
{{file|~/.dt/types/dtwm.fp||<nowiki> | |||
CONTROL Battery | |||
{ | |||
POSITION_HINTS 14 | |||
TYPE client | |||
CONTAINER_NAME Top | |||
CONTAINER_TYPE BOX | |||
CLIENT_NAME cde-battery | |||
CLIENT_GEOMETRY 97x58 | |||
HELP_STRING "Battery indicator" | |||
} | |||
</nowiki>}} | |||
== Example configuration == | == Example configuration == | ||
Line 135: | Line 183: | ||
${pkgs.imagemagick}/bin/convert $1 -resize 24x24 ~/.dt/icons/$file.s.pm | ${pkgs.imagemagick}/bin/convert $1 -resize 24x24 ~/.dt/icons/$file.s.pm | ||
${pkgs.imagemagick}/bin/convert $1 -resize 16x16 ~/.dt/icons/$file.t.pm | ${pkgs.imagemagick}/bin/convert $1 -resize 16x16 ~/.dt/icons/$file.t.pm | ||
''; | |||
cde-battery = pkgs.writeScriptBin "cde-battery" '' | |||
#!${pkgs.cdesktopenv}/opt/dt/bin/dtksh | |||
${pkgs.lib.readFile (pkgs.fetchurl { | |||
url = "https://raw.githubusercontent.com/edorig/dtksh/5f49e402b391c81ebea9609bdec9c7716e70a8c0/battery"; | |||
sha256 = "0zjn9zl1as9xbk2845bbdy2xfj29b4hvvalcz8kf2llkndbfswvl"; | |||
})} | |||
''; | ''; | ||
in { | in { | ||
Line 145: | Line 200: | ||
services.xserver.desktopManager.cde.extraPackages = with pkgs; | services.xserver.desktopManager.cde.extraPackages = with pkgs; | ||
options.services.xserver.desktopManager.cde.extraPackages.default ++ [ | options.services.xserver.desktopManager.cde.extraPackages.default ++ [ | ||
fsv cde-icons cde-gtk-theme | fsv cde-icons cde-gtk-theme cde-battery | ||
]; | ]; | ||
environment.etc."xdg/gtk-2.0/gtkrc".text = '' | environment.etc."xdg/gtk-2.0/gtkrc".text = '' | ||
Line 162: | Line 217: | ||
</nowiki>}} | </nowiki>}} | ||
== Useful | == Useful links == | ||
* https://sourceforge.net/p/cdesktopenv/wiki/CustomisingCDE/ | * https://sourceforge.net/p/cdesktopenv/wiki/CustomisingCDE/ | ||
[[Category: | [[Category:Cookbook]] | ||
[[Category:Desktop environment]] | |||
[[Category:Desktop]] |