Skip to content

Commit

Permalink
add layout switcher
Browse files Browse the repository at this point in the history
  • Loading branch information
dvbondoy committed Apr 5, 2023
1 parent f7822dc commit bb1a0fb
Show file tree
Hide file tree
Showing 20 changed files with 926 additions and 0 deletions.
Empty file.
8 changes: 8 additions & 0 deletions layout-switcher/DEBIAN/control
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Package:fls
Version:1.0
Depends: plank
Section:utils
Priority:optional
Architecture:all
Maintainer: DioscoroIII <dvbondoy@gmail.com>
Description: Desktop layout switcher for LXDE desktop
17 changes: 17 additions & 0 deletions layout-switcher/changelog.Debian
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
test (1.0-2) stable; urgency=low

[ Baeldung ]
* Changes to installer

-- Baeldung <test@test.com> Thu, 23 Dec 2021 11:30:00 +0100

test (1.0-1) stable; urgency=low

[ Baeldung ]
* Wonderful program to print the name ;)

-- Baeldung <test@test.com> Thu, 23 Dec 2021 11:00:00 +0100
bluelake@pacific:~/Documents/deb/build$ gzip --best -n changelog.Debian
bluelake@pacific:~/Documents/deb/build$ mkdir -p test/usr/share/doc/test
bluelake@pacific:~/Documents/deb/build$ cp changelog.Debian.gz test/usr/share/doc/test/

1 change: 1 addition & 0 deletions layout-switcher/etc/flick-layout-switcher.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
NAME=Flick Layout Switcher
176 changes: 176 additions & 0 deletions layout-switcher/etc/flick-ls/panels/classic/panel
Original file line number Diff line number Diff line change
@@ -0,0 +1,176 @@
# lxpanel <profile> config file. Manually editing is not recommended.
# Use preference dialog in lxpanel to adjust config when you can.

Global {
edge=bottom
allign=left
margin=0
widthtype=percent
width=100
height=36
transparent=1
tintcolor=#242424
alpha=200
autohide=0
heightwhenhidden=2
setdocktype=1
setpartialstrut=1
usefontcolor=1
fontsize=10
fontcolor=#f3f3f3
usefontsize=0
background=0
backgroundfile=/usr/share/lxpanel/images/lubuntu-background.png
iconsize=24
loglevel=2
monitor=-1
align=left
}
Plugin {
type=space
Config {
Size=2
}
}
Plugin {
type=menu
Config {
image=/usr/share/icons/ubuntu.png
system {
}
separator {
}
item {
name=Run
image=system-run
action=gexec
}
item {
name=Search
image=search
action=mate-search-tool
}
item {
name=Shutdown
image=system-shutdown
action=/usr/bin/lxsession-logout --banner "/usr/share/lxde/images/logout.png" --side=left
}
}
}
Plugin {
type=space
expand=0
Config {
Size=6
}
}
Plugin {
type=separator
Config {
}
}
Plugin {
type=launchbar
Config {
Button {
id=firefox.desktop
}
Button {
id=pcmanfm.desktop
}
}
}
Plugin {
type=taskbar
Config {
ShowAllDesks=0
FlatButton=0
}
}
Plugin {
type=space
Config {
Size=6
}
}
Plugin {
type=dclock
Config {
ClockFmt=%l:%M:%S %p
TooltipFmt=%A %B %e, %Y
Action=time-admin
BoldFont=1
IconOnly=0
CenterText=1
}
}
Plugin {
type=space
Config {
Size=6
}
}
Plugin {
type=launchbar
Config {
Button {
id=weather.desktop
}
}
}
Plugin {
type=space
Config {
Size=6
}
}
Plugin {
type=separator
Config {
}
}
Plugin {
type=tray
Config {
}
}
Plugin {
type=space
Config {
Size=6
}
}
Plugin {
type=volumealsa
Config {
}
}
Plugin {
type=space
Config {
Size=6
}
}
Plugin {
type=batt
Config {
BackgroundColor=#212121
ChargingColor1=#f3f3f3
ChargingColor2=#f3f3f3
DischargingColor1=#bebebe
DischargingColor2=#bebebe
HideIfNoBattery=1
AlarmCommand=xmessage Battery low
AlarmTime=5
BorderWidth=2
Size=6
ShowExtendedInformation=0
BatteryNumber=0
}
}
Plugin {
type=space
Config {
Size=1
}
}
71 changes: 71 additions & 0 deletions layout-switcher/etc/flick-ls/panels/desk-layout
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
#!/bin/bash
#Purpose:Provide a list of desktop layout for LXDE
#Author:dvbondoy@gmail.com
#Tested on:Ubuntu 20.04

#restart panel and openbox
restart_wm(){ lxpanelctl restart && openbox --restart; }

#remove plank from autostart
no_autostart_plank(){ sed -i '/plank/d' ~/.config/lxsession/LXDE/autostart; }

#delete contents of panels folder
clear_panel(){ rm ~/.config/lxpanel/LXDE/panels/*; }

#apply classic layout
clas(){
clear_panel
pkill plank
no_autostart_plank

#copy panel
cp ~/.config/flick/panels/classic/panel ~/.config/lxpanel/LXDE/panels/

restart_wm
}

#apply elementary layout
elem(){
clear_panel
no_autostart_plank

#add plank to autostart
echo "plank" >> ~/.config/lxsession/LXDE/autostart

#run plank for this session
plank &

#copy panel
cp ~/.config/flick/panels/elementary/panel ~/.config/lxpanel/LXDE/panels/

restart_wm
}

#apply lxle layout
lxle(){
clear_panel
pkill plank
no_autostart_plank

cp ~/.config/flick/panels/lxle/* ~/.config/lxpanel/LXDE/panels/
restart_wm
#zenity --info --title="LXLE is no yet available" --text="LXLE layout not yet available."

}

#create dialog window and put to variable
choice=$(zenity --list --title="Layout Chooser" --hide-header --text="Select and press OK" --radiolist --column="list" --column="Layout" --column="Description" \
classic Classic "Windows like layout" \
elementary Elementary "Mac OS like layout" \
lxle LXLE "Linux layout")

echo "$choice"

if [ $choice == "Classic" ]; then
clas
elif [ $choice == "Elementary" ]; then
elem
elif [ $choice == "LXLE" ]; then
lxle
fi

Loading

0 comments on commit bb1a0fb

Please sign in to comment.