Pekwm

Da Guide@Debianizzati.Org.
Vai alla navigazione Vai alla ricerca
La versione stampabile non è più supportata e potrebbe contenere errori di resa. Aggiorna i preferiti del tuo browser e usa semmai la funzione ordinaria di stampa del tuo browser.
Debian-swirl.png Versioni Compatibili

Debian 8 "jessie"
Debian 9 "stretch"
Debian 10 "buster"

Introduzione

In questa guida andremo ad installare e configurare "Il windows manager" pekwm, a mio avviso uno dei migliori in circolazione.
Pekwm[1] è leggero, e quando dico leggero significa "LEGGERO". Molto più leggero di LXDM ed XFCE, infinitamente più reattivo di Enlightment e (che lo dico a fare?) GNOME 3 e KDE.

Installazione

Pekwm è disponibile nei repository Debian. Andiamo ad installarlo con:

# apt-get install pekwm pekwm-themes

Configurazione

I file di configurazione di pekwm sono nella cartella .pekwm dell'utente.

  • autoproprerties
  • config
  • history
  • keys
  • menu
  • mouse
  • start
  • vars

La prima cosa da fare è di occuparci del file start al quale daremo i permessi di esecuzione:

$ chmod +x .pekwm/start

Da questo momento in poi, qualunque cosa andremo ad aggiungere al file verrà eseguita all'avvio del DM.

Cominciamo con l'aggiunta di uno sfondo al nostro desktop.
Per fare questo andremo ad utilizzare feh, un visualizzatore di immagini che possiede la caratteristica di gestire lo sfondo del desktop.

# apt-get install feh

ora che feh è installato, andremo a modificare il file start di pekwm:

$ nano .pekwm/start

Al quale aggiungeremo in fondo:

feh --bg-scale percorso/dellanostra/immagine.formato &

È molto importante l'aggiunta della "&" al termine della riga.

Per apprendere come aggiungere programmi al menù di Fluxbox vedere la sezione apposita più avanti.

Configurare il menu

Il menu di pekwm è facile ed intuitivo come l'approccio di decifrare i geroglifici nel buio della piramide di Cheope usando un orologio da polso come fonte di luce.

La struttura del file è la seguente:

# Menu config for pekwm

# Variables
INCLUDE = "vars"

RootMenu = "Pekwm" {
	Entry = "Terminal" { Actions = "Exec $TERM &" }
	Entry = "Run.." { Actions = "ShowCmdDialog" }

	Separator {}

	Entry = "Take screenshot" { Actions = "Exec $_PEKWM_SCRIPT_PATH/pekwm_screenshot.sh" }

	Separator {}
		

	Submenu = "Go to" {
		SubMenu = "Workspace" {
			# Create goto menu once per pekwm config reload. The fast way that
			# will work for most if not all users.
			COMMAND = "$_PEKWM_SCRIPT_PATH/pekwm_ws_menu.sh goto"
			# Create goto menu every time the menu is opened. The slow way.
			# This is what you want if you are using external tools to make
			# the amount of workspaces something else than what you define in
			# ~/.pekwm/config. You will know if you want this.
			# Entry = "" { Actions = "Dynamic $_PEKWM_SCRIPT_PATH/pekwm_ws_menu.sh goto dynamic" }
		}
		Entry = "Window.." { Actions = "ShowMenu GotoClient True" }
	}

	Submenu = "Pekwm" {
		Submenu = "Themes" {
			Entry { Actions = "Dynamic $_PEKWM_SCRIPT_PATH/pekwm_themeset.sh $_PEKWM_THEME_PATH" }
			Entry { Actions = "Dynamic $_PEKWM_SCRIPT_PATH/pekwm_themeset.sh ~/.pekwm/themes" }
		}
		Entry = "Reload" { Actions = "Reload" }
		Entry = "Restart" { Actions = "Restart" }
		Entry = "Exit" { Actions = "Exit" }
	}
	Separator {}
	#INCLUDE = "debian-menu"
	INCLUDE = "/etc/pekwm/debian-menu"
}

WindowMenu = "Window Menu" {
	Entry = "(Un)Stick" { Actions = "Toggle Sticky" }
	Entry = "(Un)Shade" { Actions = "Toggle Shaded" }
	Entry = "Iconify" { Actions = "Set Iconified" }
	Entry = "Command.." { Actions = "ShowCmdDialog" }

	Submenu = "Maximize" {
		Entry = "Toggle Full" { Actions = "Toggle Maximized True True" }
		Entry = "Toggle Horizontal" { Actions = "Toggle Maximized True False" }
		Entry = "Toggle Vertical" { Actions = "Toggle Maximized False True" }
	}
	Submenu = "Fill" {
		Entry = "Full" { Actions = "MaxFill True True" }
		Entry = "Horizontal" { Actions = "MaxFill True False" }
		Entry = "Vertical" { Actions = "MaxFill False True" }
	}
	Submenu = "Stacking" {
		Entry = "Raise" { Actions = "Raise" }
		Entry = "Lower" { Actions = "Lower" }
		Entry = "Toggle Always On Top" { Actions = "Toggle AlwaysOnTop" }
		Entry = "Toggle Always Below" { Actions = "Toggle AlwaysBelow" }
	}
	Submenu = "Decorations" {
		Entry = "Toggle Decorations" { Actions = "Toggle DecorBorder; Toggle DecorTitlebar" }
		Entry = "Toggle Borders" { Actions = "Toggle DecorBorder" }
		Entry = "Toggle Titlebar" { Actions = "Toggle DecorTitlebar" }
	}
	Submenu = "Skip" {
		Entry = "Toggle showing this frame in menus" { Actions = "Toggle Skip Menus" }
		Entry = "Toggle including this frame in focus toggle" { Actions = "Toggle Skip FocusToggle" }
		Entry = "Toggle if this frame snaps to other windows" { Actions = "Toggle Skip Snap" }
	}
	SubMenu = "Send To" {
		# Create sendto menu once per pekwm config reload. The fast way that
		# will work for most if not all users.
		COMMAND = "$_PEKWM_SCRIPT_PATH/pekwm_ws_menu.sh send"
		# Create sendto menu every time the menu is opened. The slow way.
		# This is what you want if you are using external tools to make
		# the amount of workspaces something else than what you define in
		# ~/.pekwm/config. You will know if you want this.
		# Entry = "" { Actions = "Dynamic $_PEKWM_SCRIPT_PATH/pekwm_ws_menu.sh send dynamic" }
	}
	Separator {}
	Entry = "Close" { Actions = "Close" }
	Submenu = "Kill" { Entry = "Kill application" { Actions = "Kill" } }
}

Notare che è possibile utilizzare categorie, sotto-categorie e comandi diretti all'interno del menu.
Se ad esempio volessimo inserire il nostro browser all'interno del menu dovremmo aggiungere:

	Separator {}
Entry = "Chrome" { Actions = "Exec /usr/bin/google-chrome" }
	Separator {}

Il mio consiglio è di fare delle prove in base ai gusti e alle necessità personali, ma ricordiamoci sempre di:

  • Chiudere sempre le righe con le }

altrimenti il menu non apparirà

  • Tenere sempre aperto un terminale

in modo da poter rimediare agli errori.

Pannello (tint2)

Andiamo ora ad installare il nostro pannello alternativo, utilizzeremo tint2:

# apt-get install tint2

Quando viene lanciato il pannello sarà possibile trovare all'estrema sinistra l'icona per la configurazione attraverso l'interfaccia grafica.
Se invece preferite utilizzare il buon vecchio editor di testo da terminale bisognerà editare il file di configurazione del pannello che risiede nella cartella:

  • ~/.config/tint2

Struttura del file tint2rc

Il file di configurazione é semplice ed intuitivo e si presenta con diverse sezioni:

# Background definitions
# ID 1
rounded = 0
border_width = 0
background_color = #000000 70
border_color = #000000 70

# Panel
panel_monitor = all
panel_position = bottom center horizontal
panel_size = 99% 20
panel_margin = 0 0
panel_padding = 0 0 0
panel_dock = 0
wm_menu = 0
panel_layer = bottom
panel_background_id = 1

# Panel Autohide
autohide = 0
autohide_show_timeout = 0.0
autohide_hide_timeout = 0.0
autohide_height = 0
strut_policy = follow_size

# Taskbar
taskbar_mode = single_desktop
taskbar_padding = 0 0 0
taskbar_background_id = 0
taskbar_active_background_id = 0

# Tasks
urgent_nb_of_blink = 7
task_icon = 0
task_text = 1
task_centered = 1
task_maximum_size = 200 32
task_padding = 0 0
task_background_id = 0
task_active_background_id = 0
task_urgent_background_id = 0
task_iconified_background_id = 0

# Task Icons
task_icon_asb = 100 0 0
task_active_icon_asb = 100 0 0
task_urgent_icon_asb = 100 0 0
task_iconified_icon_asb = 100 0 0

# Fonts
task_font = Droid Sans Bold 6
task_font_color = #A0A0A0 100
task_active_font_color = #A0A0A0 100
task_urgent_font_color = #A0A0A0 100
task_iconified_font_color = #A0A0A0 100
font_shadow = 0

# System Tray
systray = 1
systray_padding = 0 0 0
systray_sort = ascending
systray_background_id = 0
systray_icon_size = 0
systray_icon_asb = 100 0 0

# Clock
time1_format = %H:%M  %a%e %b
time1_font = Droid Sans Bold 6
clock_font_color = #A0A0A0 100
clock_tooltip = 
clock_padding = 5 0
clock_background_id = 0

# Tooltips
tooltip = 1
tooltip_padding = 0 0
tooltip_show_timeout = 1
tooltip_hide_timeout = 1
tooltip_background_id = 0
tooltip_font = Droid Sans Bold 6
tooltip_font_color = #A0A0A0 100

# Mouse
mouse_middle = none
mouse_right = none
mouse_scroll_up = toggle
mouse_scroll_down = iconify

# Battery
battery = 1
battery_low_status = 20
battery_low_cmd = notify-send "battery low"
battery_hide = 95
bat1_font = Sans 6
bat2_font = Sans 8
battery_font_color = #FFFFFF 100
battery_padding = 0 0
battery_background_id = 0

Fate attenzione all'opzione panel_size = . Di default il pannello non copre tutta la lunghezza dello schermo, settate l'impostazione al 100% .

Configurazione delle scorciatoie della tastiera

Se si vogliono personalizzare le scorciatoie da tastiera, si rimanda a questa sezione della guida ufficiale[3].

Riferimenti




Guida scritta da: Nydebianized 15:02, 14 set 2015 (CEST) Swirl-auth20.png Debianized 20%
Estesa da:
Verificata da:

Verificare ed estendere la guida | Cos'è una guida Debianized