533 Commits

Author SHA1 Message Date
cuu e15f6155cd update gsnotify bin file 2023-01-03 13:04:31 +00:00
cuu 6e005cf435 update .xinitrc 2023-01-02 20:20:13 +08:00
cuu 13ed96d83c replace a new aria2c ,for bug tls handshake failed with github 2021-10-22 15:57:49 +08:00
GNU 83de5fc575 Merge pull request #330 from prashantkamdar/master
updating the pic8 to latest version
2021-03-05 19:17:55 +08:00
Prashant Kamdar 95a14f6dfc formatting the file for better visualisation
updating the pic8 to latest version along with the md5
2021-02-15 15:27:16 +05:30
Prashant Kamdar 8aee33e672 typo correction
updating the pico8 zip to latest along with the md5
2021-02-15 15:25:58 +05:30
Prashant Kamdar f030dc52ff adding the latest pico8 zip and md5 2021-02-15 15:25:12 +05:30
cuu e701756207 update pico8 version infos 2020-05-03 10:07:50 +08:00
cuu 2f263ff707 bux fix,list index out of range 2020-04-29 19:55:29 +08:00
GNU 2b136fae3c Merge pull request #328 from cuu/master
readme beeprint
2020-04-15 11:19:10 +08:00
cuu 8dcdc977a8 readme beeprint 2020-04-15 01:19:38 +08:00
GNU 76e61b521c Merge pull request #324 from krushinru/master
Add Russian language support
2020-01-15 22:52:56 +08:00
Alexander Krushin 15424129f0 Update 09_Russian.ini 2020-01-15 00:55:34 +03:00
Alexander Krushin e6fefe5779 Update 09_Russian.ini 2020-01-14 22:08:58 +03:00
Alexander Krushin de9248f87e Update 09_Russian.ini 2020-01-14 22:07:56 +03:00
Alexander Krushin d55fed3a78 Adding Russian language 2020-01-14 20:41:09 +03:00
cpi 75b74e4c6a add mad address in wifi info page 2020-01-14 10:38:40 +00:00
GNU 661250f7b1 Merge pull request #323 from cuu/master
add GlobalScale
2020-01-14 18:24:10 +08:00
cuu e15cf60412 pygame.DOUBLEBUF | pygame.HWSURFACE 2020-01-13 15:26:24 +08:00
cuu 712ce14fc5 add dest surface in GlobalScale 2020-01-13 14:49:02 +08:00
cuu 6e9d146e80 set default GlobalScale to 1 2020-01-12 01:37:50 +08:00
Parallels 5180b74a91 add GlobalScale 2020-01-12 01:33:33 +08:00
GNU 18c1b186af Merge pull request #311 from O4k/patch-1
Allows for new skin config.ini format(s)
2020-01-07 17:08:01 +08:00
GNU 879a734666 Merge pull request #321 from Taffer/codestyle-cleanup
shellcheck cleanup
2020-01-07 17:07:06 +08:00
GNU c4a12ce2d2 Merge pull request #322 from cuu/master
for skin OP1
2020-01-02 10:49:38 +08:00
cuu 8d662e0f19 for skin OP1 2020-01-02 10:46:44 +08:00
Taffer 9b5e3b411b Merge branch 'master' of github.com:Taffer/launcher into codestyle-cleanup 2019-12-30 15:35:54 -05:00
GNU df170b71ab Merge pull request #320 from cuu/master
add RestoreScrolled in Warehouse
2019-12-29 21:23:02 +08:00
cuu 987587c5af add RestoreScrolled in Warehouse 2019-12-29 20:31:22 +08:00
Taffer b0d5517b5e Fix shellcheck warnings. 2019-12-28 11:55:06 -05:00
Taffer ac61a305ba Add SublimeText 3 project file. 2019-12-28 11:54:26 -05:00
GNU 7ea30feba7 Merge pull request #319 from cuu/master
warehouse
2019-12-29 00:47:17 +08:00
cuu e9db2ac4d1 warehouse 2019-12-29 00:46:19 +08:00
GNU d7b75ddec5 Merge pull request #318 from cuu/master
Warehouse
2019-12-29 00:31:15 +08:00
cuu 557cd04b64 Warehouse 2019-12-29 00:30:03 +08:00
GNU 6ba59fc9c0 Merge pull request #317 from cuu/master
warehouse tic80 icon bug
2019-12-29 00:12:54 +08:00
cuu 9062cc8e9b warehouse tic80 icon bug 2019-12-29 00:11:14 +08:00
GNU edbcd7d47a Merge pull request #316 from cuu/master
try to add a simple way to re-install the CommercialSoftwarePackage
2019-12-25 21:32:44 +08:00
cuu 5be4bc20ff try to add a simple way to re-install the CommercialSoftwarePackage 2019-12-25 21:31:54 +08:00
GNU 1219a615fa Merge pull request #315 from cuu/master
bug fix
2019-12-25 21:06:51 +08:00
cuu 3febbf7425 GCommercialSoftwarePackage 2019-12-25 21:04:47 +08:00
cuu c9d9ad64fe warehouse pico8 purchase tips take longer 2019-12-25 16:46:22 +08:00
GNU 708c863a33 Merge pull request #314 from cuu/master
warehouse bug fix of adding URL repeatedly
2019-12-25 14:16:48 +08:00
cuu f9a62573de warehouse bug fix of adding URL repeatedly 2019-12-25 05:59:06 +00:00
GNU 743c82fc26 Merge pull request #313 from cuu/master
warehouse
2019-12-24 20:52:58 +08:00
cuu 58877ba643 Merge branch 'master' of https://github.com/clockworkpi/launcher 2019-12-24 20:49:38 +08:00
O4k 639f4c1700 Allows for new skin config.ini format(s)
The new code checks for a config.ini file in the Skin's folder. Then it checks for a "Font_Paths" section where it replaces the default fonts with the names of the new fonts listed in the Config. You will have to add the desired fonts to the truetype folder within the skin folder and update the config to match the fonts you have added. If you remove the existing fonts in that folder, the launcher will not load if there is a problem with the config file.

Note that the system-wide font name variables do not change, but their referenced file does.

The new Config file would look something like this:
    
    [Font_Paths]
    varela = Roboto-Black
    veramono = Roboto-Regular
    noto = Roboto-Bold
    notocjk = Roboto-Light

    [Colors]
    High = #f0ffff
    Text = #ffffff
    ReadOnlyText = #ffffff
    Front = #614f7d
    URL = #f0ffff
    Line = #614f7d
    TitleBg = #111013
    Active = #ff70ba
    Disabled = #e6e6ff
    White = #111013
    Black = #614f7d
2019-12-21 10:32:14 -08:00
cuu ad4a82bad5 run.py add CurrentPage.OnAria2CompleteCb
21_Warehouse/__init__.py text correspondence[_FootMsg]
Warehouse beta now
2019-12-19 05:13:07 +00:00
cuu 9b1c89af4c title_bar hide the dlstatus icon 2019-12-19 04:58:13 +00:00
cuu 46b67bc12f warehouse alpha 2019-12-18 13:07:47 +00:00
cuu 31f117d65f add aria2 websocket in run.py
improve the way to open a warehouse
slow down the reflash freq of download progress in download_process_page.py
2019-12-17 13:40:16 +00:00
cuu 42fd86bce6 run.py RestoreLastBackLightBrightness bug fix 2019-12-16 14:26:11 +00:00
cuu 5db3db2ee3 preview game alpha 2019-12-16 07:41:33 +00:00
cuu 128e37e06a preview game screenshot 2019-12-15 16:03:25 +00:00
cuu 7e6d172512 warehouse bug fix 2019-12-15 07:38:15 +00:00
cuu 0af791192f prepare to multi warehouses 2019-12-14 14:03:44 +00:00
cuu ccb11daa44 GameStore to Warehouse 2019-12-14 06:34:58 +00:00
cuu 579164ce19 add icons 2019-12-13 21:42:06 +08:00
cuu 66d0558dfa Add open pico8 and tic80 in gamestore 2019-12-09 06:19:23 +00:00
cuu 9c69b6a637 gamestore alpha 2019-12-08 14:37:14 +00:00
cuu 103838c531 daily update for gamestore 2019-12-07 22:48:09 +08:00
cuu b725a86b9e add yes_cancel_confirm_page.py
update aria2.conf,keep and auto continue the donwloading tasks
try to show downloading status in the title_bar
2019-12-07 00:58:40 +08:00
cuu 3371393733 gamestore bug fix 2019-12-05 22:00:22 +08:00
cuu 85d67dc218 ```
def Click(self):
        if self._PsIndex > len(self._MyList) -1:
```
* use this to avoid PsIndex out of the range of self._MyList

* download games and showed up
2019-12-05 17:20:38 +08:00
GNU ebe816ba5f Merge pull request #310 from KortanZ/master
fix typo
2019-12-04 23:55:39 +08:00
cuu 2bb22f3914 submodule sys.py/pyaria2_rpc update 2019-12-04 21:38:13 +08:00
cuu 764aa61b7f rename submodule 2019-12-04 21:36:04 +08:00
cuu e9ed6d7cf1 add appinstaller 2019-12-04 01:01:13 +08:00
cuu 1aac399de6 ... 2019-12-02 01:36:13 +08:00
cuu ac0df61352 add aria2c pyaria2-rpc 2019-12-01 15:40:15 +00:00
Kortan f605b4bf91 fix typo 2019-12-01 01:56:04 +08:00
cuu 0b42901e26 add gamestore 2019-11-30 17:39:14 +08:00
GNU 105a5fa596 Merge pull request #299 from arthurlutz/requirements-txt
[requirements] initial version
2019-10-18 18:13:22 +08:00
Arthur Lutz 888fdbbd18 [requirements] initial version 2019-10-15 18:13:33 +02:00
cuu c54191505d capitalized sound volume in 00_English.ini 2019-10-06 21:51:24 +08:00
cuu f55cb1aa8d https://forum.clockworkpi.com/t/launcher-adding-bulgarian-language-suport/4666 Adding Bulgarian language suport 2019-10-06 13:30:43 +08:00
GNU 972219570c Merge pull request #293 from cuu/master
fix bug in title_bar auto redraw when in Low backlight
2019-09-03 13:21:33 +08:00
cpi e0dfe211a9 fix bug in title_bar auto redraw when in Low backlight 2019-09-03 05:19:40 +00:00
GNU 4e7bebbdb2 Merge pull request #292 from cuu/master
info_page_selector bug fix
2019-08-26 16:06:23 +08:00
cpi afe616de9e info_page_selector bug fix 2019-08-26 08:05:34 +00:00
GNU c9f06d2a55 Merge pull request #291 from cuu/master
Cores manager bug fix
2019-08-26 16:03:45 +08:00
cpi 3829a2a7f9 Cores manager bug fix 2019-08-26 08:02:51 +00:00
GNU 1c6bd61575 Merge pull request #290 from cuu/master
update pico8 hash
2019-08-24 13:59:02 +08:00
cpi 784edd007a update pico8 hash 2019-08-24 05:54:06 +00:00
GNU 870e71b85b Merge pull request #288 from cuu/master
unzip with override
2019-08-22 21:17:15 +08:00
cpi 852610914d unzip with override 2019-08-22 13:15:13 +00:00
GNU 98e39edcdf Merge pull request #286 from cuu/master
alias list_item encode utf8
2019-08-22 16:30:47 +08:00
cpi 818916e0fb alias list_item encode utf8 2019-08-22 08:30:07 +00:00
GNU 087a10da31 Merge pull request #246 from Cecilectomy/fix-footbar-button-layout
fix foot bar button layouts being swapped
2019-08-20 17:44:58 +08:00
GNU 03302a3f70 Merge pull request #284 from cuu/master
Correction of translations
2019-08-19 17:47:01 +08:00
cuu b26b9f7fbd correction of translations 2019-08-19 17:45:19 +08:00
cuu 7fcdf54385 Correction of translations 2019-08-19 17:43:07 +08:00
GNU ab07fadf71 Merge pull request #281 from undancer/master
翻译改进
2019-08-15 22:53:27 +08:00
undancer 9597203d8f 添加更新启动器的翻译 2019-08-15 02:08:49 +08:00
undancer a6accdad18 添加主题管理的翻译 2019-08-15 02:05:41 +08:00
undancer 4245bb3085 添加GPU翻译 2019-08-15 02:02:31 +08:00
undancer a6b2c1cdb8 更新音量的拼写 2019-08-15 01:56:18 +08:00
GNU f4d0766edb Merge pull request #276 from cuu/master
...
2019-08-07 21:45:41 +08:00
cuu 2e472ae11c ... 2019-08-07 21:44:53 +08:00
GNU 2a6899cb52 Merge pull request #274 from cuu/master
rename Cores page title
2019-08-07 17:12:54 +08:00
cuu 78c5bb3d76 rename Cores page title 2019-08-07 17:12:12 +08:00
GNU 0730d86fa4 Merge pull request #273 from cuu/master
add HiddenSos in Cores Manager
2019-08-07 17:01:15 +08:00
cuu 0f1b4bd57f add HiddenSos in Cores Manager 2019-08-07 17:00:29 +08:00
GNU 58e9d1430a Merge pull request #272 from cuu/master
add update for ~/apps/Menu
2019-08-07 16:06:54 +08:00
cuu 07805d7fd5 add update ~/apps/Menu 2019-08-07 16:05:36 +08:00
cuu 07fc53c11d add update ~/apps/Menu 2019-08-07 16:04:27 +08:00
GNU f08d0faebf Merge pull request #271 from cuu/master
add patches in download_process_page
2019-08-07 16:00:12 +08:00
cuu 3dd659860e ... 2019-08-07 15:29:39 +08:00
cuu a8b3a7084c add patches in download_process_page 2019-08-07 15:27:45 +08:00
GNU 29ca4c4ac6 Merge pull request #267 from cuu/master
add German Translation
2019-07-20 20:55:44 +08:00
cuu 1e1c8f7f4c add German Translation 2019-07-20 20:54:52 +08:00
GNU e09d197be0 Merge pull request #265 from cuu/master
lima text revision
2019-07-18 10:39:01 +08:00
cuu 9de0f722c8 lima text revision 2019-07-18 10:38:23 +08:00
GNU e22a3286f3 Merge pull request #264 from cuu/master
TinyCloud use hostname as ariplay_name
2019-07-18 06:55:44 +08:00
cuu c4411fc1aa TinyCloud use hostname as ariplay_name 2019-07-18 06:55:06 +08:00
GNU a89304b250 Merge pull request #261 from cuu/master
revert about page
2019-07-17 17:08:58 +08:00
cuu 3557feb44c revert about page 2019-07-17 17:08:25 +08:00
GNU ad94fbebfd Merge pull request #260 from cuu/master
fix about page
2019-07-17 15:50:28 +08:00
cuu 2ca466257b fix about page 2019-07-17 15:49:52 +08:00
GNU 86fa05e619 Merge pull request #254 from cuu/master
theme background.png
2019-07-14 10:53:19 +08:00
cuu 3826d3cfe2 theme background.png 2019-07-14 10:52:32 +08:00
GNU 63a30be0f6 Merge pull request #250 from losernator/master
Korean translation
2019-07-11 11:06:04 +08:00
Joohan Lee 8113002aa7 Korean translation
Korean translation for cpi launcher
2019-07-10 02:07:41 +09:00
Joohan Lee 8f2fe08400 Merge pull request #1 from clockworkpi/master
Update from master
2019-07-10 02:05:23 +09:00
Daniel Cecil 48bb893a5c Revert SetLabelTexts
This causes SNES button actions to be backwards.
Please merge this pull request to revert back, or properly fix whatever the update was supposed to change in the first place.
2019-07-07 18:28:48 -07:00
Daniel Cecil 41729a4b2a fix foot bar button layouts being swapped
When using SNES it shows the button actions for XBOX
When using XBOX it shows the button actions for SNES
2019-07-06 12:14:47 -07:00
GNU 954f158f73 Merge pull request #245 from cuu/master
make a confirmation when switch to launchergo
2019-07-04 09:21:14 +08:00
cuu be3f53850b make a confirmation when switch to launchergo 2019-07-04 09:20:35 +08:00
GNU 04120e0841 Merge pull request #243 from cuu/master
add bluetooth_firmware.sh
2019-07-03 15:22:56 +08:00
cuu 467a5623f6 add bluetooth_firmware.sh 2019-07-03 15:22:20 +08:00
GNU 546523359b Merge pull request #241 from cuu/master
main_screen ReadTheDirIntoPages ,ignore hidden files/folders
2019-07-02 15:13:04 +08:00
cuu 9b63fc4c8f main_screen ReadTheDirIntoPages ,ignore hidden files/folders 2019-07-02 15:09:57 +08:00
GNU b6fb439ae1 Merge pull request #240 from cuu/master
add No.909.png
2019-07-01 23:53:00 +08:00
cuu e94897c5ec add No.909.png 2019-07-01 23:46:53 +08:00
GNU 9c9896b06e Merge pull request #239 from cuu/master
Update icons,fix border width
2019-07-01 22:31:25 +08:00
cuu d4a6c417bb Update icons,fix border width 2019-07-01 22:30:33 +08:00
GNU 75300a6e7b Merge pull request #238 from cuu/master
add GiveWallpaper to allow the custom wallpaper from any Theme/skin
2019-07-01 20:36:22 +08:00
cuu 4f354f28c2 add GiveWallpaper to allow the custom wallpaper from any Theme/skin 2019-07-01 20:30:07 +08:00
GNU 80c732b261 Merge pull request #235 from cuu/master
update icons
2019-06-28 21:00:22 +08:00
cuu 528e79648b update icons 2019-06-28 20:59:40 +08:00
GNU eb0f43fd07 Merge pull request #234 from cuu/master
update icons
2019-06-28 20:40:47 +08:00
cuu 7d9146c6cf update icons 2019-06-28 20:40:11 +08:00
GNU 2c75adb1ae Merge pull request #233 from cuu/master
update icons
2019-06-28 20:36:43 +08:00
cuu 4e9d7a42f0 update icons 2019-06-28 20:36:06 +08:00
GNU b520e83dd6 Merge pull request #231 from cuu/master
text revision
2019-06-27 19:50:52 +08:00
cuu 273db99c78 text revision 2019-06-27 19:41:44 +08:00
GNU 638f23a8b8 Merge pull request #229 from cuu/master
wifi list, FootMsg changes for the buttons layout,bug fix
2019-06-26 22:21:54 +08:00
cuu 3673da1bf4 bug fix 2019-06-26 22:15:41 +08:00
cuu badeb13268 FootMsg changes for the buttons layout 2019-06-26 21:12:20 +08:00
cuu 0f2cf846eb wifilist 2019-06-26 17:29:25 +08:00
cuu 8c0c6ac86a ... 2019-06-26 17:23:18 +08:00
cuu 0b733435f6 10 times to force wifi disconnect when try to connect a new one 2019-06-26 17:18:53 +08:00
cuu 24abd55f86 wifilist 2019-06-26 17:11:06 +08:00
GNU 03e0385cda Merge pull request #228 from cuu/master
update .gitignore
2019-06-26 11:31:25 +08:00
cuu d17a89e80c update .gitignore 2019-06-26 11:30:31 +08:00
cuu fb0c45229c update icons 2019-06-25 17:30:15 +08:00
GNU 457adc1b21 Merge pull request #227 from cuu/master
RUNEVT RUNSYS dirname strip and split space
2019-06-24 19:47:46 +08:00
cuu 8e943d2751 RUNEVT,RUNSYS bug fix 2019-06-24 19:46:14 +08:00
cuu dd6aa87ee6 RUNEVT RUNSYS dirname split space 2019-06-24 17:49:43 +08:00
GNU 1c7ca69a8f Merge pull request #226 from cuu/master
launcher forks now 1.25
2019-06-24 16:50:19 +08:00
cuu 70a4c48c67 launcher forks now 2019-06-24 16:48:37 +08:00
cuu aad54336e8 Remove all emulators to ~/apps/Menu/20_Retro\ Games 2019-06-24 16:47:44 +08:00
GNU fb8937fe0f Merge pull request #225 from cuu/master
update icons for mame,mgba,nestopia,pcsx
2019-06-24 13:19:17 +08:00
cuu ef0d5a6b52 update icons for mame,mgba,nestopia,pcsx 2019-06-24 13:18:48 +08:00
GNU 5ef12f8081 Merge pull request #223 from cuu/master
In special cases, allow ROM_SO to become LAUNCHER-like functionality …
2019-06-21 18:54:21 +08:00
cuu a9a179fe47 In special cases, allow ROM_SO to become LAUNCHER-like functionality in Emulator 2019-06-21 18:49:59 +08:00
GNU 2b1952c59d Merge pull request #222 from cuu/master
...
2019-06-21 18:36:14 +08:00
cuu 68d3ec052c ... 2019-06-21 18:35:40 +08:00
GNU 9a3161eb05 Merge pull request #221 from cuu/master
pcsx
2019-06-21 18:33:26 +08:00
cuu 380c972b13 ignore pcsx addtional files ,folders,log 2019-06-21 18:32:43 +08:00
cuu 77707a8118 pcsx action.config bug fix 2019-06-21 18:30:13 +08:00
cuu 16f521b8da pcsx extensions 2019-06-21 17:47:23 +08:00
cuu b435507935 add pcsx action.config 2019-06-21 17:44:19 +08:00
cuu 8468102ee5 remove Pcsx submodule 2019-06-21 17:38:47 +08:00
GNU 7da6542a1e Merge pull request #220 from cuu/master
add DrawRect in multi_icon_item
2019-06-21 13:20:12 +08:00
cuu 3ad1c48fce stretch canvas of about 2019-06-21 13:18:31 +08:00
cuu dd92daa60f add DrawRect in multi_icon_item 2019-06-21 12:44:34 +08:00
GNU 7a592353b0 Merge pull request #219 from cuu/master
minor update
2019-06-21 12:18:05 +08:00
cuu 055ee12867 add launcher and os version in About 2019-06-21 12:16:44 +08:00
cuu 4d67c053ff ChocoDM 2019-06-20 14:23:01 +08:00
cuu 29cbe9297a switch lima improvements 2019-06-17 18:18:18 +08:00
cuu c559728454 replace all MyIconPool._Icons to be MyIconPool.GiveIconSurface 2019-06-13 21:24:56 +08:00
GNU acb6774495 Merge pull request #218 from cuu/master
minor update
2019-06-13 16:21:48 +08:00
cuu baae2545f1 IconPool 2019-06-13 16:17:51 +08:00
cuu 5aa744cb6b PreparationInAdv fix 2019-06-13 15:59:24 +08:00
cuu d75fcc6f1c PreparationInAdv to config.py 2019-06-13 15:58:08 +08:00
cuu 58fd2e6a1a add skin rescan 2019-06-13 15:13:26 +08:00
cuu bac3f7899d add skins selection 2019-06-13 14:55:15 +08:00
cuu 0302741ac2 MySkinManager.GiveColor instead of RGB 2019-06-12 23:10:36 +08:00
GNU 16b226dbc3 Merge pull request #217 from cuu/master
...
2019-06-12 20:16:27 +08:00
cuu 8c77f3ffc5 ... 2019-06-12 20:15:52 +08:00
GNU da29679180 Merge pull request #216 from cuu/master
rename modesetting_drv.so to toggle lima driver
2019-06-12 20:11:18 +08:00
cuu e73c9138ea rename modesetting_drv.so to toggle lima driver 2019-06-12 20:10:00 +08:00
GNU 9ce60ff62f Merge pull request #215 from cuu/master
Because the high version of xorg prohibits the use of absolute paths …
2019-06-11 19:48:49 +08:00
cuu fe44274594 Because the high version of xorg prohibits the use of absolute paths for xf86config parameters, changes to relative paths in dotcpirc 2019-06-11 19:48:06 +08:00
GNU 1b1cbbca28 Merge pull request #214 from cuu/master
CommercialSoftwarePackage buttons  swap
2019-06-10 13:57:51 +08:00
cuu 858540bb7d CommercialSoftwarePackage keys 2019-06-10 13:52:35 +08:00
GNU 8018bbfe1f Merge pull request #212 from noahbechtel/master
Allows for the rendering and rescaling of images to be used as a back…
2019-06-02 09:20:10 +08:00
Noah 24d711e538 Allows for the rendering and rescaling of images to be used as a background to the launcher 2019-06-01 16:56:02 -05:00
GNU a9220fc66e Merge pull request #210 from cuu/master
except the python UnicodeDecodeError in Emulator
2019-05-13 19:48:13 +08:00
cuu ed8699d6d4 except the python UnicodeDecodeError in Emulator 2019-05-13 19:43:43 +08:00
GNU e3624948d0 Merge pull request #207 from cuu/master
TrFont bug fix
2019-05-11 17:53:48 +08:00
cuu ce72585632 TrFont bug fix 2019-05-11 17:53:17 +08:00
GNU 75975dea37 Update LICENSE 2019-05-10 19:03:04 +08:00
GNU 1b48ca875b Merge pull request #205 from cuu/master
wifi_list bug fix
2019-05-09 20:32:04 +08:00
cuu 1590ea44b8 wifi_list bug fix 2019-05-09 20:31:12 +08:00
GNU d360b72007 Merge pull request #204 from cuu/master
off to OFF
2019-05-09 17:00:49 +08:00
cuu 67148d102b off to OFF 2019-05-09 17:00:14 +08:00
GNU c9221e5a2a Merge pull request #202 from cuu/master
bug fix
2019-05-07 13:32:41 +08:00
cuu d6a5294afb bug fix 2019-05-07 13:30:31 +08:00
GNU 1753a687e4 Merge pull request #201 from cuu/master
bug fix download_process_page.py
2019-05-07 13:04:47 +08:00
cuu 8ee95d9648 bug fix download_process_page.py 2019-05-07 13:04:12 +08:00
GNU 29e52bbaea Merge pull request #197 from cuu/master
add absolute path in .cpirc
2019-05-05 18:33:28 +08:00
cuu 0dc85f2407 add absolute path in .cpirc 2019-05-05 18:32:55 +08:00
GNU fb156214f9 Merge pull request #192 from cuu/master
add pico-8.zip
2019-05-05 15:58:45 +08:00
cuu 1b783d3ce2 ... 2019-05-05 15:56:56 +08:00
cuu 201f2fb89c add pico-8.zip 2019-05-05 15:54:02 +08:00
GNU cb9562ebbd Merge pull request #184 from mguilherme/pico-8_0.1.12c
Add support for pico-8 latest version pico-8_0.1.12c
2019-04-28 15:02:46 +08:00
Miguel Guilherme bd88c1730e Add support for pico-8 latest version pico-8_0.1.12c 2019-04-27 23:13:27 +01:00
GNU a5b10b16be Merge pull request #183 from cuu/master
fix fds leak and remove SkinMap,fonts.py
2019-04-27 09:56:44 +08:00
cuu 0981ac4c59 delete sys.py/UI/fonts.py 2019-04-26 17:34:23 +08:00
cuu 25a191a4d0 empty fonts.py 2019-04-26 17:33:44 +08:00
cuu d3b508c3a1 fix fds leak and remove SkinMap 2019-04-26 14:01:36 +08:00
cuu 6f855dc36f update pico8 zip md5sum 2019-04-17 14:52:43 +08:00
GNU 583d888aba Merge pull request #176 from aifreedom/songx--add-chinese-translation
Chinese translations for menu items in Settings
2019-03-28 19:37:38 +08:00
Song Xie 5d1dba3479 Chinese translation for menu items in Settings 2019-03-23 01:52:17 -07:00
GNU 823cb756eb Merge pull request #174 from Cecilectomy/master
Adding icon boundary wrapping to page
2019-03-14 13:48:15 +08:00
Daniel Cecil e3747493ad Adding icon boundary wrapping to page
Wrapping back to beggining or end of icon list provides better usability
2019-02-26 10:57:31 -08:00
GNU 8cd87b5276 Merge pull request #172 from ruverav/master
Missing translations and minor fixes
2019-02-14 18:30:11 +08:00
Rubén Verdute Ávila 219e880f18 Missing translations and minor fixes
Translate missing texts, remove duplicated disconnect button in wifi info page and add translations for spanish language.
2019-02-13 22:24:59 +01:00
GNU c1b06db2dc Merge pull request #171 from infernalmaster/master
add select button to footer
2019-02-13 15:38:38 +08:00
cpi a2d8de4535 add select button to footer 2019-02-12 23:01:51 +02:00
GNU b7cd5aaf90 Merge pull request #170 from infernalmaster/master
Fix UX for XBOX layout
2019-02-12 17:19:56 +08:00
Rostyslav Diachok df05604013 fix xbox layout 2019-02-12 01:41:42 +02:00
Rostyslav Diachok 5b0db0a461 remove never used buttons from config 2019-02-12 01:36:24 +02:00
cpi b47b020339 fix xbox layout UX 2019-02-12 01:09:48 +02:00
GNU c4587c12bf Merge pull request #169 from cuu/master
update spanish translation
2019-02-10 13:56:18 +08:00
cuu 1fa3c80229 update spanish translation 2019-02-10 13:54:43 +08:00
GNU 3196496018 Merge pull request #166 from cuu/master
french translation
2019-02-08 17:34:54 +08:00
cuu 17265eab55 Merge branch 'master' of https://github.com/clockworkpi/launcher 2019-02-08 17:33:14 +08:00
cuu fd879c607a french translation 2019-02-08 17:29:56 +08:00
GNU ae8b4b775a Merge pull request #165 from cuu/master
bug fix ,add spanish translation
2019-02-07 21:26:09 +08:00
cuu 827b7f06fa bug fix ,add spanish translation 2019-02-07 17:44:21 +08:00
GNU 83e2cc8fe6 Merge pull request #163 from cuu/master
update 10_Settings/Update
2019-01-28 23:44:14 +08:00
cuu 02b399dd01 pygame limits 9 userevent 2019-01-28 23:40:35 +08:00
cuu 10305da9e8 allow RUNSH in pygame.event queue 2019-01-28 23:29:40 +08:00
cuu dc33952c58 update bug 2019-01-28 23:26:30 +08:00
cuu 8b5b93f721 Merge branch 'master' of https://github.com/clockworkpi/launcher 2019-01-28 23:14:37 +08:00
cuu 2e5ea437cd add SpeedScroll 2019-01-28 23:13:05 +08:00
cuu f9a74d6579 submodule init and update 2019-01-26 20:57:52 +08:00
cuu fc099786fe update 10_Settings/Update 2019-01-26 17:34:39 +08:00
GNU 008f701029 Merge pull request #162 from cuu/master
fix translations
2019-01-26 00:17:45 +08:00
cuu f7976d4406 Merge branch 'master' of https://github.com/clockworkpi/launcher 2019-01-26 00:16:03 +08:00
cuu 9d1aa75619 fix translation 2019-01-26 00:14:57 +08:00
GNU 689a573d6e Merge pull request #161 from cuu/master
change .cpirc to fit with ubuntu
2019-01-25 12:52:54 +08:00
cuu fe8f451392 change .cpirc to fit with ubuntu 2019-01-25 12:51:05 +08:00
GNU 7ae4303d58 Merge pull request #160 from cuu/master
bluetooth on gs dev_connect bug fix
2019-01-22 10:37:52 +08:00
cuu 2beaa2e862 Merge branch 'master' of https://github.com/clockworkpi/launcher 2019-01-22 10:37:02 +08:00
cuu 9e75bc56e0 bug 2019-01-22 10:34:15 +08:00
GNU 07070fc41e Merge pull request #159 from cuu/master
add bluetooth agent,now device can paired,remembered after disconnect
2019-01-22 10:21:30 +08:00
cuu c225aa7dde add bluetooth agent,now device can paired,remembered after disconnect 2019-01-22 09:21:08 +08:00
GNU d93e514e78 Merge pull request #158 from cuu/master
auto create GameDir in CommercialSoftwarePackage
2019-01-19 19:25:33 +08:00
cuu a502612c7d Merge branch 'master' of https://github.com/clockworkpi/launcher 2019-01-19 19:24:59 +08:00
cuu ff374a7667 auto create GameDir in CommercialSoftwarePackage 2019-01-19 19:24:38 +08:00
GNU 83b56b57c3 Merge pull request #157 from cuu/master
fix bug in CommercialSoftwarePackage
2019-01-19 19:22:22 +08:00
cuu df90a133f9 Merge branch 'master' of https://github.com/clockworkpi/launcher 2019-01-19 19:21:39 +08:00
cuu dd490ec3e9 fix bug in CommercialSoftwarePackage 2019-01-19 19:20:14 +08:00
GNU 2dd7143c14 Merge pull request #156 from cuu/master
v1.24
2019-01-18 00:46:37 +08:00
cuu f999a22520 v1.24 2019-01-18 00:41:55 +08:00
GNU 7079d778aa Merge pull request #155 from cuu/master
update PICO-8.sh
2019-01-18 00:33:25 +08:00
cuu b639e81b27 update PICO-8.sh 2019-01-18 00:32:55 +08:00
GNU d13e410aa7 Merge pull request #154 from cuu/master
bug fix
2019-01-18 00:20:18 +08:00
cuu 793db0c984 bug fix 2019-01-18 00:19:50 +08:00
GNU d062c4920c Merge pull request #153 from cuu/master
bug fix
2019-01-17 22:20:11 +08:00
cuu 12c923df8a bug fix 2019-01-17 22:18:33 +08:00
GNU f33e6080b9 Merge pull request #152 from cuu/master
commercialsoftwarepackage alpha, ReunionPagesIcons combines 20_Retro Games now
2019-01-17 15:10:51 +08:00
cuu 530c08dc34 small fix in CommercialSoftwarePackage 2019-01-17 14:20:57 +08:00
cuu be872d0536 Comm software package alpha 2019-01-17 00:56:40 +08:00
cuu 565605cfef add text_bulletinboard.py 2019-01-16 12:03:40 +08:00
cuu e6c22c90e0 PICO-8 alpha 2019-01-16 01:17:02 +08:00
cuu 7e75d4856b add widget.py 2019-01-15 16:37:15 +08:00
cuu c641c8d84a ReunionPagesIcons combines 20_Retro Games now 2019-01-15 01:15:43 +08:00
cuu 0b8331d3d0 ReunionPagesIcons combines 20_Retro Games now 2019-01-15 01:05:59 +08:00
GNU f2bd7423e4 Merge pull request #151 from cuu/master
update dwm-mod and .xinitrc
2019-01-12 21:33:00 +08:00
cuu d83d9e9360 Merge branch 'master' of https://github.com/clockworkpi/launcher 2019-01-12 21:30:26 +08:00
cuu ea0eb4fb39 update dwm-mod and .xinitrc 2019-01-12 21:23:58 +08:00
GNU 765f73d51f Merge pull request #150 from cuu/master
update dwm-mod
2019-01-11 23:06:18 +08:00
cuu 7905077d13 update dwm-mod 2019-01-11 23:03:20 +08:00
GNU 8cf3486f11 Merge pull request #149 from cuu/master
update dwm-mod
2019-01-11 22:19:38 +08:00
cuu 18516efdb5 update dwm-mod 2019-01-11 22:19:00 +08:00
GNU 670cfc24d0 Merge pull request #148 from cuu/master
update dwm-mod
2019-01-11 21:20:00 +08:00
cuu 034e4e91c9 update dwm-mod 2019-01-11 21:19:29 +08:00
GNU 1b01e25ce1 Merge pull request #147 from cuu/master
gateway bug fix
2019-01-09 19:01:18 +08:00
cuu 9920166630 gateway bug fix 2019-01-09 18:59:20 +08:00
GNU b15faabefa Merge pull request #146 from cuu/master
change gateway ip address last digit calculation
2019-01-09 18:53:13 +08:00
cuu 4ad682572c Merge branch 'master' of https://github.com/clockworkpi/launcher 2019-01-08 22:29:35 +08:00
cuu 807fdfa428 change gateway ip address last digit calculation 2019-01-08 22:29:04 +08:00
GNU 4074f4bfc7 Merge pull request #145 from cuu/master
add network gateway switch
2019-01-08 16:10:24 +08:00
cuu e8dc44fb3e update gsnotify-arm 2019-01-07 22:24:31 +08:00
cuu ee3ddb54a7 update gsnotify-arm,bug fix,ShutDownWhenLowPower ignores when GS is Charging 2019-01-07 21:55:07 +08:00
cuu 4837bfcf60 gateway switch bug fix,Click() 2019-01-07 20:37:26 +08:00
cuu f3776f1c51 gateway switch bug fix 2019-01-06 22:02:08 +08:00
cuu c1228d321b add clear all gateways 2019-01-06 21:59:10 +08:00
cuu 9bd4a6e965 gateway switch bug fix 2019-01-06 21:52:35 +08:00
cuu df03f2889a gateway switch bug fix 2019-01-06 21:42:16 +08:00
cuu 06b8db3edb gateway switch bug fix 2019-01-06 21:40:54 +08:00
cuu c523b4ef3c add network gateway switch 2019-01-06 21:06:28 +08:00
GNU f84c14aecd Merge pull request #144 from cuu/master
...
2019-01-04 19:18:53 +08:00
cuu b9f8133e75 ... 2019-01-04 19:18:26 +08:00
GNU ac2221fc84 Merge pull request #143 from cuu/master
gpu driver switch bug fix
2019-01-04 19:14:55 +08:00
cuu 321c4e9643 Merge branch 'master' of https://github.com/clockworkpi/launcher 2019-01-04 19:14:21 +08:00
cuu 47f0fdab97 gpu driver switch bug fix 2019-01-04 19:13:44 +08:00
GNU 09b3c64160 Merge pull request #142 from cuu/master
fix bug in gpu driver switch
2019-01-04 19:05:24 +08:00
cuu 8b9dba21e5 fix bug in gpu driver switch 2019-01-04 19:04:55 +08:00
GNU f036a2f264 Merge pull request #141 from cuu/master
add gpu driver switch,dwm,bug fix
2019-01-04 19:00:47 +08:00
cuu f99f993b1f Merge branch 'master' of https://github.com/clockworkpi/launcher 2019-01-04 18:58:44 +08:00
cuu c88e3146ec add dwm 2019-01-04 18:57:51 +08:00
cuu 66f61e3465 add xorg,xorg_lima 2019-01-04 18:47:27 +08:00
cuu 3d60124d84 add GPU driver switch 2019-01-04 18:44:52 +08:00
cuu 70e72e7172 00_lowpower.sh 2018-12-29 11:18:26 +00:00
GNU ba76103819 Merge pull request #140 from cuu/master
combine .xinitrcs to be one
2018-12-25 23:03:43 +08:00
cuu c0aab424a6 Merge branch 'master' of https://github.com/clockworkpi/launcher 2018-12-25 14:59:03 +00:00
cuu 6b866f940e combine xinitrc to be one 2018-12-25 14:58:32 +00:00
GNU 301bb3b74c Merge pull request #139 from cuu/master
update desktopbg.jpg , cut smalltext in bluetooth infopage
2018-12-21 21:40:30 +08:00
cuu 95387464bd cut smalltext in bluetooth infopage 2018-12-21 21:37:03 +08:00
cuu fb0e6c00e7 cut smalltext in bluetooth infopage 2018-12-21 21:36:32 +08:00
cuu 1d9f2fa1b6 update desktopbg.jpg 2018-12-21 14:08:45 +08:00
GNU 4b0093e02d Merge pull request #138 from cuu/master
bug fix
2018-12-20 16:25:30 +08:00
cuu 157c5554d5 Merge branch 'master' of https://github.com/clockworkpi/launcher 2018-12-20 16:24:33 +08:00
cuu 2a4e951123 bluetooth bug 2018-12-20 16:19:03 +08:00
cuu d9a884520c bluetooth bug 2018-12-20 16:17:57 +08:00
cuu 36ebf2f7fc bug fix 2018-12-20 16:02:07 +08:00
GNU 3c17813469 Merge pull request #137 from cuu/master
update .xinitrc
2018-12-19 18:55:08 +08:00
cuu df344ed12b Merge branch 'master' of https://github.com/clockworkpi/launcher 2018-12-19 18:52:52 +08:00
cuu bb8d251556 update .xinitrc 2018-12-19 18:49:11 +08:00
GNU de577fd528 Merge pull request #136 from cuu/master
update gsnotify-arm
2018-12-19 18:48:16 +08:00
cuu 2bd0611b28 Merge branch 'master' of https://github.com/clockworkpi/launcher 2018-12-19 18:47:45 +08:00
cuu 6472377a61 update gsnotify-arm 2018-12-19 18:47:23 +08:00
GNU 8a875ee847 Merge pull request #135 from cuu/master
translations fix
2018-12-19 14:31:29 +08:00
cuu 171d4e38ef translations 2018-12-19 14:28:48 +08:00
cuu 5395f3dad7 english fix 2018-12-19 14:22:15 +08:00
GNU 98bf5df99c Merge pull request #134 from cuu/master
update twm bg and fix counter screen under hdmi bug
2018-12-18 20:04:16 +08:00
cuu 7afb6634de Merge branch 'master' of https://github.com/clockworkpi/launcher 2018-12-18 20:03:47 +08:00
cuu 07060948e4 update twm bg and fix counter screen under hdmi bug 2018-12-18 20:03:15 +08:00
GNU 3f1a24fea0 Merge pull request #133 from cuu/master
soundpage bug fix
2018-12-18 19:40:09 +08:00
cuu a7ce02be8a Merge branch 'master' of https://github.com/clockworkpi/launcher 2018-12-18 19:39:38 +08:00
cuu 5b7a162f18 soundpage bug fix 2018-12-18 19:39:11 +08:00
GNU accbd7524e Merge pull request #132 from cuu/master
update soundpage
2018-12-18 19:26:19 +08:00
cuu f0df9b4214 Merge branch 'master' of https://github.com/clockworkpi/launcher 2018-12-18 19:25:39 +08:00
cuu 517ac01bc7 update soundpage 2018-12-18 19:25:00 +08:00
cpi 7285f38b39 rm twm.mod 2018-12-18 17:17:29 +08:00
cpi 234d59eec1 rm xbms 2018-12-18 17:01:53 +08:00
cpi 26e78d93aa update gitmodules for Pcsx 2018-12-18 08:55:57 +00:00
cpi 539468f467 twm 2018-12-18 16:47:13 +08:00
cuu b81416a93c PreparationInAdv 2018-12-18 12:12:09 +08:00
GNU a2d8555092 Merge pull request #131 from cuu/master
...
2018-12-17 18:51:16 +08:00
cuu 57bc0aba20 ... 2018-12-17 18:48:47 +08:00
GNU 03d0e7cbe2 Merge pull request #130 from cuu/master
bluetooth GenNetworkList skip mac address
2018-12-17 16:32:43 +08:00
cuu f10768f8b0 bluetooth GenNetworkList skip mac address 2018-12-17 16:32:10 +08:00
GNU 31de17e669 Merge pull request #129 from cuu/master
tiny cloud and bluetooth
2018-12-17 16:07:22 +08:00
cuu e1771e8c02 Merge branch 'master' of https://github.com/clockworkpi/launcher 2018-12-17 16:05:44 +08:00
cuu c5fd06c049 tiny cloud and bluetooth 2018-12-17 16:04:23 +08:00
GNU e3ffcf3908 Merge pull request #128 from cuu/master
update awesome config ,set new background wallpaper in hdmi
2018-12-14 18:48:56 +08:00
cuu 1ebfd1cd5e Merge branch 'master' of https://github.com/clockworkpi/launcher 2018-12-14 18:48:19 +08:00
cuu 329444332d update awesome config ,set new background wallpaper in hdmi 2018-12-14 18:47:44 +08:00
cuu 7b59674ed3 add desktop bg 2018-12-14 18:41:35 +08:00
GNU 13623f5c9c Merge pull request #127 from cuu/master
bug fix
2018-12-14 18:40:17 +08:00
cuu b02abf964a Merge branch 'master' of https://github.com/clockworkpi/launcher 2018-12-14 18:39:37 +08:00
cuu 4d5f8d9ea3 bug fix 2018-12-14 18:39:23 +08:00
GNU 36c9ab6b15 Merge pull request #126 from cuu/master
notifications bug fix
2018-12-14 18:36:38 +08:00
cuu 8c54c38a9f Merge branch 'master' of https://github.com/clockworkpi/launcher 2018-12-14 18:35:54 +08:00
cuu 6cb35eb09c notifications bug fix 2018-12-14 18:35:30 +08:00
GNU 18b566cc3d Merge pull request #125 from cuu/master
update gsnotify
2018-12-14 18:23:46 +08:00
cuu 880121cd21 update gsnotify 2018-12-14 18:21:13 +08:00
cuu 52bc2bed04 add lowpower.sh 2018-12-14 18:20:09 +08:00
cuu 425cb66d6f Notification changed 2018-12-14 17:00:40 +08:00
cuu a54465776a awesome update 2018-12-13 20:09:09 +08:00
GNU e9e59624fd Merge pull request #124 from cuu/master
1.23
2018-12-13 19:08:18 +08:00
cuu 655216e235 1.23 2018-12-13 19:03:20 +08:00
cuu d14276e31a tinycloud add usb-eth 2018-12-11 18:11:21 +08:00
GNU 65138e7586 Merge pull request #123 from cuu/master
add OnKbdReturnBackCb on wifi_list
2018-12-09 23:15:59 +08:00
cuu 5ef299dfce add OnKbdReturnBackCb on wifi_list 2018-12-09 19:09:35 +08:00
GNU 4c6b50897b Merge pull request #122 from cuu/master
disable power_save by default
2018-12-07 22:22:15 +08:00
cuu 3cd83855c6 Merge branch 'master' of https://github.com/clockworkpi/launcher 2018-12-07 22:21:25 +08:00
cuu 35b1e505ee ... 2018-12-07 22:20:55 +08:00
GNU 43d57620cb Merge pull request #121 from cuu/master
translations and add launchergo switch
2018-12-07 19:48:24 +08:00
cuu e54509335a Merge branch 'master' of https://github.com/clockworkpi/launcher 2018-12-07 19:47:01 +08:00
cuu ff4f2e8460 wifilist bug fix 2018-12-07 19:46:10 +08:00
cuu 2ceba9d8cf ... 2018-12-06 23:00:04 +08:00
cuu 114b7ab8c4 ja translations 2018-12-06 12:13:54 +08:00
cuu dd3b95b3f5 switch to launchego 2018-12-05 20:17:22 +08:00
cuu 40cafe09c5 MultiLabel add iscjk 2018-12-05 16:17:15 +08:00
cuu 493a920500 airpalne mode remove InfoPageListItem 2018-12-05 15:54:33 +08:00
cuu 88ef0f5df5 update ja lang 2018-12-05 15:38:57 +08:00
cuu ef4f6869c9 Update add LauncherLoc 2018-12-03 23:10:39 +08:00
cuu 16da52093a update Update to 2.0 2018-12-03 21:05:42 +08:00
cuu db9eeaa957 translations 2018-12-03 12:52:14 +08:00
GNU d3c04d5771 Merge pull request #120 from cuu/master
TrFont in wifilist,msgbox
2018-12-02 18:29:49 +08:00
cuu 3541c101f8 TrFont in wifilist,msgbox 2018-12-02 18:29:15 +08:00
GNU 7d3bb93eb2 Merge pull request #119 from cuu/master
Add multi languages
2018-12-02 18:09:07 +08:00
cuu 578305dfb1 ... 2018-12-02 18:04:18 +08:00
cuu 572984f294 ... 2018-12-02 18:03:20 +08:00
cuu c61f818772 ... 2018-12-02 18:03:02 +08:00
cuu eeb0a616c3 bluetooth OnloadCb,RefreshDevices will block n secs if there is no bluez daemon 2018-12-02 18:00:07 +08:00
cuu 793e0cae3a translation fixs 2018-12-02 17:42:25 +08:00
cuu a4ad0de109 translate fix 2018-12-02 17:30:48 +08:00
cuu 13dfa44c2c translate alpha now 2018-12-02 17:26:52 +08:00
cuu 7d692ef113 langs ini update 2018-12-02 14:30:29 +08:00
cuu aac0bf1944 music play list ,translate bgpng 2018-12-02 14:26:23 +08:00
cuu ea673759d9 auto create dotlang 2018-12-02 14:19:21 +08:00
cuu 746fdb8412 auto create dotlang 2018-12-02 14:18:36 +08:00
cuu 73bcdb6d44 continue translate 2018-12-02 14:12:13 +08:00
cuu 0d7a527e97 more translate 2018-12-01 20:04:36 +08:00
cuu 152b2a8ac7 add languages into settings menu 2018-12-01 14:11:27 +08:00
cuu b3aea583a5 continue translate 2018-11-30 19:08:35 +08:00
cuu 44ce359f0e .gitignore fix 2018-11-30 13:26:46 +08:00
cuu 6f45052d4c add multi languages 2018-11-30 13:26:30 +08:00
cuu c8d6e85c5b Merge branch 'master' of https://github.com/clockworkpi/launcher 2018-11-30 13:18:39 +08:00
cuu 3c6416f85b replace SkinManager() to MySkinManager 2018-11-30 13:18:21 +08:00
GNU e314631a5a Merge pull request #117 from cuu/master
Emulator skip ROM_SO checks if no needs for rom so
2018-11-19 15:50:04 +08:00
cuu 60a85739fa add return in Emulator ,Click 2018-11-17 16:40:41 +08:00
cuu 83a7547a0a Emulator skip ROM_SO checks if no needs for rom so 2018-11-17 16:30:47 +08:00
cuu be6f539f8e uuddllrrab 2018-11-10 18:48:41 +08:00
GNU bb58718df4 Merge pull request #116 from cuu/master
awesome config,missing class in table
2018-10-21 12:09:03 +08:00
cuu d175b5a1ba awesome config,missing class in table 2018-10-21 12:07:32 +08:00
cuu 8869cd570c awesome config 2018-10-21 11:57:27 +08:00
GNU 5452b6fe9c Merge pull request #115 from cuu/master
try exception on bluez dbus init
2018-10-20 15:22:18 +08:00
cuu 5e29592572 try exception on bluez dbus init 2018-10-20 15:21:47 +08:00
GNU efd9459ab3 Merge pull request #114 from cuu/master
awesome config
2018-10-17 21:43:59 +08:00
cuu 571468bb8f awesome config 2018-10-17 21:37:58 +08:00
cuu 3770686ce1 awesome theme bg path 2018-10-17 21:22:03 +08:00
cuu e9ab068799 awesome config 2018-10-17 21:18:27 +08:00
cuu e77178ea3b awesome config 2018-10-17 20:15:13 +08:00
cuu 1142728615 awesome config 2018-10-17 20:07:44 +08:00
GNU 55f7820e08 Merge pull request #113 from cuu/master
awesome configs
2018-10-17 19:54:49 +08:00
cuu 6f451bfb14 awesome config 2018-10-17 19:47:27 +08:00
cuu 0d52efc96d awesome config 2018-10-17 19:00:19 +08:00
cuu 694383765d awesome config 2018-10-17 18:53:04 +08:00
cuu 7788d7541b awesome config 2018-10-17 17:28:02 +08:00
GNU f586418ecd Merge pull request #112 from cuu/master
bug fix,keyboard
2018-10-11 03:16:01 +08:00
cuu c30aee6b3c bug fix,keyboard 2018-10-11 03:12:02 +08:00
GNU d665d739e7 Merge pull request #110 from cuu/master
add reload ui to Menu
2018-10-08 13:30:34 +08:00
cuu 7787b3e6f4 add reload ui to Menu 2018-10-08 13:28:27 +08:00
GNU f48c749368 Merge pull request #109 from cuu/master
update gsnotify-arm
2018-10-07 22:59:02 +08:00
cuu e7793f25ed update gsnotify-arm 2018-10-07 22:58:34 +08:00
GNU 69c2e8be6f Merge pull request #108 from cuu/master
update gsnotify-arm
2018-10-07 22:41:12 +08:00
cuu 8b70ef15df update gsnotify-arm 2018-10-07 22:40:12 +08:00
GNU a700ed7236 Merge pull request #107 from cuu/master
add control of gsnotify
2018-10-07 22:15:26 +08:00
cuu bacd0b8e72 add control of gsnotify 2018-10-07 22:13:12 +08:00
GNU 86694a9d06 Merge pull request #105 from cuu/master
update gsnotify
2018-09-27 21:56:42 +08:00
cuu 55f4f9df27 update gsnotify 2018-09-27 21:54:20 +08:00
GNU 1b042adb54 Merge pull request #104 from cuu/master
awesome naughty timeout
2018-09-22 18:40:42 +08:00
cuu 5cf8bb1917 awesome naughty timeout 2018-09-22 18:37:22 +08:00
GNU 723644579e Merge pull request #103 from cuu/master
prepare 2.0
2018-09-12 17:47:49 +08:00
cuu 28334adc6b ... 2018-08-30 21:15:47 +08:00
cuu 2877a138e0 awesome config bug fix 2018-08-30 21:01:04 +08:00
cuu d3148d1379 ReunionPagesIcons 2018-08-28 20:30:31 +08:00
cuu 77215d4172 add new configs 2018-08-27 16:09:03 +08:00
GNU 8186028711 Merge pull request #102 from cuu/master
remove gsnotify in run.py
2018-08-26 12:25:46 +08:00
cuu 9e787469ea remove gsnotify in run.py 2018-08-26 12:25:05 +08:00
GNU 02a90d52ce Merge pull request #101 from cuu/master
bug fix in airplane mode
2018-08-22 14:58:15 +08:00
cuu 9dbe1ca630 bug fix in airplane mode 2018-08-22 14:57:49 +08:00
GNU 0d03a717dc Merge pull request #100 from cuu/master
add Rescue in airplane mode
2018-08-22 14:47:21 +08:00
cuu 33aa7f6154 add Rescue in airplane mode 2018-08-22 14:46:49 +08:00
GNU 029e89737c Merge pull request #99 from cuu/master
cleanup re-order mess
2018-08-22 14:20:17 +08:00
cuu 478746e19d cleanup re-order mess 2018-08-22 14:19:15 +08:00
GNU 4d5a19d5bc Merge pull request #97 from ZiTAL/master
folder order
2018-08-22 14:16:57 +08:00
GNU 46eb56cb57 Merge pull request #98 from cuu/master
bluetooth
2018-08-22 14:16:40 +08:00
cuu a1bbeafd8b add bluetooth titlebar icon 2018-08-22 14:05:07 +08:00
cuu 10a91108dd delay on disconnecting 2018-08-22 11:46:43 +08:00
cuu e0e6a6e3e7 after forget,return to uplevel 2018-08-21 22:10:07 +08:00
cuu 47d08a5451 add delay after forget 2018-08-21 22:08:38 +08:00
cuu a7227fbadf add RemoveDevice bluetooth 2018-08-21 22:05:49 +08:00
cuu efb6cb8164 ... 2018-08-21 21:26:26 +08:00
cuu 500185fd9d ... 2018-08-21 21:21:09 +08:00
cuu 5eaa259ba3 add connect and disconnect 2018-08-21 21:17:34 +08:00
cuu eef5112f3e bluetooth 2018-08-21 15:06:09 +08:00
cuu cef6e9622e bluetooth 2018-08-21 15:03:17 +08:00
cuu a3b07ecadd bluetooth 2018-08-21 14:56:29 +08:00
cuu ac5cf8bb67 bluetooth 2018-08-21 14:53:05 +08:00
cuu b464c84277 bluetooth scan foot nav 2018-08-21 14:43:05 +08:00
cuu c7b1fbb30d add twm.mod 2018-08-21 14:29:29 +08:00
cuu ed1a6f3416 bluetooth scan box 2018-08-21 14:28:36 +08:00
cuu da2d61366f add bluetooth info page 2018-08-20 22:10:50 +08:00
cuu 586a76d37b fix rom alias name utf8,decode 2018-08-17 12:32:02 +08:00
cuu 315a9a12b1 bluetooth 2018-08-17 11:26:33 +08:00
zital 185330f4f2 folder order 2018-08-16 19:27:12 +02:00
cuu d245239e5d move keyboard out of wifi to be global UI parts 2018-08-16 21:23:16 +08:00
cuu 2a9bb59a35 start bluetooth 2018-08-16 21:20:00 +08:00
GNU 37e4d655b1 Merge pull request #96 from cuu/master
update gsnotify-arm
2018-08-12 22:02:31 +08:00
cuu e7dc439869 update gsnotify 2018-08-12 22:01:53 +08:00
cuu d3777d460d update gsnotify 2018-08-12 20:54:51 +08:00
cuu 81119eba34 update gsnotify-arm 2018-08-12 20:28:45 +08:00
GNU 514b08e1d6 Merge pull request #95 from cuu/master
update gsnotify
2018-08-12 19:33:37 +08:00
cuu 7b5eba3ed7 update gsnotify 2018-08-12 19:33:07 +08:00
GNU 97e9aa76d5 Merge pull request #86 from follower46/skin-cleanup
modify skin manager to allow instanced requests
2018-08-12 18:43:04 +08:00
GNU c317ba5d35 Merge pull request #94 from cuu/master
1.22
2018-08-12 16:00:43 +08:00
cuu 555cfd0c6d 1.22 2018-08-12 15:53:34 +08:00
cuu 0d0964eefe update gsnotify-arm 2018-08-12 15:52:03 +08:00
cuu bd6a30d35f update gsnotify-arm 2018-08-12 15:02:54 +08:00
cuu 7f5b30d5b3 update gsnotify 2018-08-12 14:29:23 +08:00
cuu 175ce6744a update gsnotify 2018-08-12 14:24:50 +08:00
cuu dce2cfa43f add gsnotify 2018-08-12 13:57:38 +08:00
GNU 2f92f62dae Merge pull request #92 from cuu/master
also add LK1 LK5 in PC object
2018-08-07 23:23:00 +08:00
cuu ca72939743 also add LK1 LK5 in PC object 2018-08-07 23:22:28 +08:00
GNU 33de507580 Merge pull request #91 from stephensaw/feature/keyboard-shift-key
Allow LK1 and LK5 to switch keyboard layout
2018-08-07 22:01:00 +08:00
Adam Shaw 544aafa959 Added remaining UI color changes 2018-08-06 23:35:52 -05:00
Stephen Saw 039e362b6d Allow LK1 and LK5 to switch keyboard layout 2018-08-07 01:43:23 +08:00
GNU 07e707a983 Merge pull request #90 from cuu/master
rom list decode utf8 to display cjk
2018-08-06 19:08:37 +08:00
cuu 9039646303 rom list decode utf8 to display cjk 2018-08-06 19:08:14 +08:00
GNU 84e21b9f38 Merge pull request #89 from cuu/master
missing :
2018-08-06 18:51:31 +08:00
cuu f9a6a74359 missing : 2018-08-06 18:51:05 +08:00
GNU f2e5858bd0 Merge pull request #87 from mfpierre/fix-typo
Remove typo and commented code
2018-08-06 10:08:02 +08:00
Pierre 07e7e2a5dc Remove typo and commented code 2018-08-05 21:53:06 +02:00
GNU 0b7f83dc62 Merge pull request #85 from neolao/master
Add EXCLUDE parameter for emulator config
2018-08-05 16:31:12 +08:00
Adam Shaw 47570323d8 Added simple global skin manager 2018-08-04 17:34:24 -05:00
neolao e6d2b43c25 Add EXCLUDE parameter for emulator config 2018-08-04 09:06:14 +00:00
GNU 6966fba1b4 Merge pull request #83 from follower46/wifi-extended-passwords
Added extended wifi passwords
2018-08-04 08:21:29 +08:00
GNU cdd7caebff Merge pull request #81 from neolao/master
Check item alias
2018-08-04 08:21:17 +08:00
Adam Shaw d09af8a674 Added extended wifi passwords 2018-08-03 15:47:11 -05:00
GNU 9c3286ad03 Merge pull request #82 from cuu/master
add connecting in wifi_list
2018-08-03 13:27:05 +08:00
cuu c0d314f9ef add connecting in wifi_list 2018-08-03 13:25:29 +08:00
neolao dac49f9df9 Check item alias 2018-08-02 12:36:53 +02:00
GNU d528510bca Merge pull request #79 from cuu/master
add escape
2018-07-31 11:18:39 +08:00
cuu d8be9845e4 add escape 2018-07-31 11:16:29 +08:00
GNU b0c11b5cc7 Merge pull request #78 from cuu/master
by auto detecting, ignore all *.cfg files now
2018-07-31 11:06:29 +08:00
cuu 90d7a545d6 by auto detecting, ignore all *.cfg files now 2018-07-31 11:04:16 +08:00
GNU 2276f9c1b2 Merge pull request #77 from cuu/master
mpd title list bug,auto detect retroarch-local.cfg as RETRO_CONFIG
2018-07-31 10:54:58 +08:00
cuu 5cd64c1b83 mpd title list bug,auto detect retroarch-local.cfg as RETRO_CONFIG 2018-07-31 10:54:21 +08:00
GNU fa5e474d3b Merge pull request #73 from tanrax/patch-1
Add gameboy and gameboy color support
2018-07-30 17:24:40 +08:00
Andros Fenollosa 1c3d598ffa Update action.config 2018-07-30 08:19:48 +02:00
GNU d1238a3176 Merge pull request #72 from cuu/master
add set power_save off
2018-07-30 13:50:04 +08:00
cuu c19e8bee59 add set power_save off 2018-07-29 16:04:19 +08:00
261 changed files with 12516 additions and 1525 deletions
+27
View File
@@ -0,0 +1,27 @@
SCREEN=`cat /sys/class/graphics/fb0/modes`
XORG_CONF="~/launcher/.xorg.conf"
if [ -f /home/cpi/.lima ]
then
XORG_CONF="~/launcher/.xorg_lima.conf"
fi
if [ -f /tmp/autologin ]
then
rm -f /tmp/autologin
mpd ~/.mpd.conf
if [[ $SCREEN =~ .*320.* ]]
then
while :
do
startx /home/cpi/launcher/.xinitrc -- -xf86config $XORG_CONF -nocursor > /tmp/x.log 2>&1
sleep 1
done
else
while :
do
startx /home/cpi/launcher/.xinitrc hdmi -- -xf86config $XORG_CONF > /tmp/x.log 2>&1
sleep 1
done
fi
fi
+18
View File
@@ -5,3 +5,21 @@ retroarch-core-options.cfg
*.pyc
sys.py/.powerlevel
sys.py/.buttonslayout
sys.py/.lang
*.cfg
**/Jobs/*
!**/Jobs/.gitkeep
!**/Jobs/00_lowpower.sh
!**/Jobs/00_lowpower.alias
.done
bios
bios/*
screenshots
screenshots/*
.pcsx
.pcsx/*
*.log
.DS_Store
sys.py/.*
sys.py/*.db
launcher.sublime-workspace
+3
View File
@@ -0,0 +1,3 @@
[submodule "sys.py/pyaria2_rpc"]
path = sys.py/pyaria2_rpc
url = https://github.com/cuu/pyaria2_rpc.git
+38
View File
@@ -0,0 +1,38 @@
#define Bach_width 51
#define Bach_height 60
static unsigned char Bach_bits[] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x00, 0x00, 0xfe,
0xf3, 0x07, 0x00, 0xf8, 0x00, 0x80, 0xff, 0xff, 0x1f, 0x00, 0xf8, 0x00,
0xe0, 0xff, 0xff, 0x3f, 0x00, 0xf8, 0x00, 0xf0, 0xff, 0xff, 0x7f, 0x00,
0xf8, 0x00, 0xf8, 0xff, 0xff, 0xff, 0x00, 0xf8, 0x00, 0xf8, 0xff, 0xff,
0xff, 0x01, 0xf8, 0x00, 0xfc, 0xff, 0xff, 0xff, 0x01, 0xf8, 0x00, 0xfe,
0xff, 0xff, 0xff, 0x03, 0xf8, 0x00, 0xfe, 0xff, 0xff, 0xff, 0x07, 0xf8,
0x00, 0xff, 0xff, 0xff, 0xff, 0x07, 0xf8, 0x80, 0xff, 0xff, 0xff, 0xbf,
0x07, 0xf8, 0x80, 0xff, 0xff, 0xff, 0x7f, 0x0f, 0xf8, 0x80, 0xff, 0xff,
0xff, 0x3f, 0x0f, 0xf8, 0xc0, 0xff, 0xff, 0xff, 0x3f, 0x06, 0xf8, 0xc0,
0xff, 0xff, 0xff, 0x3f, 0x0e, 0xf8, 0xc0, 0xff, 0xff, 0xff, 0x7f, 0x1e,
0xf8, 0xc0, 0xff, 0xff, 0xff, 0x7f, 0x1c, 0xf8, 0xc0, 0xff, 0xff, 0xff,
0x7f, 0x3c, 0xf8, 0xc0, 0xff, 0xff, 0xff, 0x1f, 0x3c, 0xf8, 0xc0, 0xff,
0xff, 0xf8, 0x0f, 0x38, 0xf8, 0xc0, 0xff, 0xff, 0xc7, 0x23, 0x38, 0xf8,
0xe0, 0xff, 0xff, 0xc3, 0x01, 0x38, 0xf8, 0xe0, 0xff, 0xff, 0xf9, 0x03,
0x38, 0xf8, 0xe0, 0xff, 0xff, 0xff, 0x3b, 0x18, 0xf8, 0xc0, 0xff, 0xfb,
0xff, 0x33, 0x00, 0xf8, 0xc0, 0xff, 0xff, 0xff, 0xf7, 0x30, 0xf8, 0xe0,
0xff, 0xfd, 0xff, 0xe7, 0x00, 0xf8, 0xe0, 0xff, 0xfd, 0xff, 0x6f, 0x30,
0xf8, 0xc0, 0xff, 0xfc, 0xff, 0x67, 0x00, 0xf8, 0x80, 0xff, 0xfc, 0x7f,
0xc0, 0x00, 0xf8, 0xc0, 0xff, 0xf8, 0xff, 0x41, 0x00, 0xf8, 0xc0, 0xff,
0xf8, 0xff, 0x03, 0x00, 0xf8, 0x80, 0x7c, 0xf8, 0xff, 0x07, 0x00, 0xf8,
0x00, 0x7e, 0xf8, 0xff, 0x43, 0x00, 0xf8, 0x00, 0x7e, 0xf8, 0x0f, 0x00,
0x00, 0xf8, 0x00, 0x37, 0xf0, 0xff, 0x07, 0x00, 0xf8, 0x00, 0x63, 0xf0,
0xff, 0x01, 0x00, 0xf8, 0x00, 0x27, 0xf0, 0xff, 0x07, 0x00, 0xf8, 0x00,
0x06, 0xe0, 0xff, 0x0f, 0x00, 0xf8, 0x00, 0x02, 0x40, 0xff, 0x0f, 0x00,
0xf8, 0x00, 0x00, 0x90, 0xf1, 0x07, 0x00, 0xf8, 0x00, 0x00, 0x30, 0xff,
0x01, 0x00, 0xf8, 0x00, 0x00, 0xf0, 0x7e, 0x00, 0x00, 0xf8, 0x00, 0x00,
0xf0, 0x7b, 0x00, 0x00, 0xf8, 0x00, 0x00, 0xf0, 0x0f, 0x00, 0x00, 0xf8,
0x00, 0x00, 0xf0, 0x3f, 0x00, 0x00, 0xf8, 0x00, 0x00, 0xe0, 0xff, 0x01,
0x00, 0xf8, 0x00, 0x00, 0xe0, 0xff, 0x0f, 0x00, 0xf8, 0x00, 0x00, 0xc0,
0xff, 0x0f, 0x00, 0xf8, 0x00, 0x00, 0xc0, 0xff, 0x07, 0x00, 0xf8, 0x00,
0x00, 0x80, 0xff, 0x03, 0x00, 0xf8, 0x00, 0x00, 0x80, 0xff, 0x00, 0x00,
0xf8, 0x00, 0x00, 0x80, 0xff, 0x00, 0x00, 0xf8, 0x00, 0x00, 0x00, 0x7f,
0x00, 0x00, 0xf8, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00, 0xf8, 0x00, 0x00,
0x00, 0x1f, 0x00, 0x00, 0xf8, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0xf8};
+62
View File
@@ -0,0 +1,62 @@
#define Escher_width 101
#define Escher_height 54
static unsigned char Escher_bits[] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80,
0x01, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xc0, 0x01, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xe0, 0x03, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0xf8, 0x03, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x7e, 0x07, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x80, 0x7f, 0x06, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0xc0, 0x0f, 0x06, 0x00, 0x00, 0x00, 0xe0, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x1f, 0x02, 0x00, 0x00, 0x00, 0xe0,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x03, 0x00, 0x00, 0x00, 0x00,
0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xbf, 0x80, 0x7f, 0x00, 0x00,
0x00, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x03, 0xfe, 0xff, 0x0f,
0x00, 0x00, 0xe0, 0xf0, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xe0, 0xff, 0xff,
0x7f, 0x00, 0x00, 0xe0, 0xf8, 0x03, 0x00, 0x00, 0x00, 0x3f, 0xfc, 0x7f,
0x7f, 0xfc, 0x03, 0x00, 0xe0, 0xf8, 0x07, 0x00, 0x00, 0xc0, 0x87, 0xff,
0x6f, 0x5f, 0xee, 0x0f, 0x00, 0xe0, 0xf8, 0x1f, 0x00, 0x00, 0xf0, 0xf1,
0xff, 0xf9, 0xe9, 0xfc, 0x3e, 0x00, 0xe0, 0xf8, 0x3f, 0x00, 0x00, 0x3c,
0xf8, 0xaf, 0xe8, 0x1d, 0xe0, 0x70, 0x00, 0xe0, 0xf8, 0x7f, 0x00, 0x00,
0x3e, 0xbf, 0xac, 0x88, 0x1f, 0x00, 0x3e, 0x00, 0xe0, 0xf0, 0x0f, 0x00,
0x00, 0x97, 0x3f, 0xac, 0xc2, 0x81, 0x01, 0xbf, 0x03, 0xe0, 0xf0, 0x1f,
0x00, 0xc0, 0xe7, 0xa3, 0x00, 0xca, 0x15, 0x80, 0xc7, 0x07, 0xe0, 0xe0,
0x1f, 0x00, 0x80, 0xf1, 0x02, 0x4a, 0x88, 0x50, 0x80, 0xe3, 0x0c, 0xe0,
0xc0, 0x1f, 0x1c, 0x00, 0x3c, 0x08, 0x28, 0x55, 0x20, 0xc0, 0xf1, 0x3f,
0xe0, 0xc0, 0x1f, 0xf0, 0x80, 0x0f, 0x68, 0x51, 0x50, 0xb4, 0xe0, 0xb1,
0x7e, 0xe0, 0x80, 0x1f, 0xc0, 0xff, 0x03, 0x80, 0x54, 0x29, 0x00, 0xe8,
0xb9, 0xfc, 0xe0, 0x00, 0x3f, 0x82, 0x3f, 0x28, 0x15, 0x00, 0x20, 0x2a,
0xe0, 0xb9, 0xe7, 0xe1, 0x00, 0x3e, 0x0a, 0x20, 0x00, 0x00, 0x00, 0x00,
0xe0, 0xe2, 0x79, 0xb3, 0xe3, 0x00, 0x3e, 0x80, 0x00, 0x40, 0x08, 0x80,
0x40, 0x01, 0xe0, 0xf9, 0xb8, 0xe3, 0x00, 0x3e, 0x01, 0x00, 0x50, 0x08,
0x00, 0x08, 0x40, 0xe0, 0xf9, 0xff, 0xe1, 0x00, 0x3e, 0x01, 0x00, 0x00,
0x00, 0x50, 0x81, 0xf0, 0xc3, 0xf9, 0xee, 0xe0, 0x00, 0x1e, 0x02, 0x08,
0x0a, 0x01, 0x00, 0x20, 0xf0, 0xc7, 0xfb, 0x7f, 0xe2, 0x00, 0x0f, 0x02,
0xbc, 0x03, 0x00, 0x0a, 0x00, 0xf0, 0xc1, 0xfb, 0xbf, 0xe3, 0x80, 0x07,
0xf0, 0xff, 0xc3, 0x02, 0x80, 0x41, 0xf1, 0x81, 0xf7, 0xf7, 0xe1, 0x80,
0x07, 0x3c, 0xc0, 0xbf, 0x5c, 0x09, 0x40, 0xf0, 0x83, 0xff, 0x7f, 0xe0,
0xc0, 0x13, 0x00, 0x00, 0xf8, 0x0f, 0x80, 0x92, 0xf0, 0x0f, 0x0f, 0x3e,
0xe0, 0xe0, 0x1f, 0x00, 0x00, 0xe3, 0x5f, 0x21, 0x16, 0xe0, 0x2f, 0xfe,
0x17, 0xe0, 0xf0, 0x1f, 0x00, 0x80, 0x01, 0xfe, 0x27, 0x0e, 0xe0, 0x27,
0xf8, 0x10, 0xe0, 0xf0, 0x07, 0x00, 0x80, 0x1b, 0xf0, 0x07, 0xe8, 0x8a,
0x15, 0x02, 0x00, 0xe0, 0xf8, 0x03, 0x00, 0x80, 0x1f, 0x80, 0xff, 0x6a,
0x00, 0xc0, 0x01, 0x00, 0xe0, 0xf8, 0x0f, 0x00, 0x80, 0x0f, 0x00, 0xf8,
0x3f, 0xfe, 0x7f, 0x00, 0x00, 0xe0, 0xf8, 0x07, 0x00, 0x00, 0x47, 0x00,
0x00, 0x1c, 0xfc, 0x0f, 0x00, 0x00, 0xe0, 0xf8, 0x01, 0x00, 0x00, 0x3f,
0x00, 0x00, 0x47, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xf8, 0x00, 0x00, 0x00,
0x3e, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00,
0x00, 0x1c, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x08, 0x00, 0x00, 0x00, 0xe0, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x07, 0x00, 0x00, 0x00, 0xe0,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x07, 0x00, 0x00, 0x00,
0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x03, 0x00, 0x00,
0x00, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x01, 0x00,
0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x00,
0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60,
0x00, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xe0};
+46
View File
@@ -0,0 +1,46 @@
#define Linux64_width 64
#define Linux64_height 64
static unsigned char Linux64_bits[] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0xf0, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff,
0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xff, 0xff, 0x0f, 0x00, 0x00,
0x00, 0x00, 0xf8, 0x1f, 0xfc, 0x3f, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x01,
0xc0, 0xff, 0x00, 0x00, 0x00, 0x80, 0x7f, 0x00, 0x00, 0xfe, 0x01, 0x00,
0x00, 0xc0, 0x1f, 0x00, 0x00, 0xfc, 0x07, 0x00, 0x00, 0xe0, 0x07, 0x00,
0x00, 0xf0, 0x0f, 0x00, 0x00, 0xf0, 0x03, 0x00, 0x00, 0xc0, 0x1f, 0x00,
0x00, 0xf8, 0x01, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0xfc, 0x01, 0x00,
0x00, 0x80, 0x7f, 0x00, 0x00, 0xfe, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00,
0x00, 0xfe, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x7f, 0x00, 0x00,
0x00, 0x00, 0xfe, 0x01, 0x80, 0x7f, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x03,
0x80, 0x7f, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x03, 0xc0, 0x7f, 0x00, 0x00,
0x00, 0x00, 0xfc, 0x07, 0xc0, 0x7f, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x07,
0xe0, 0x3f, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x0f, 0xe0, 0x3f, 0x00, 0x00,
0x00, 0x00, 0xf8, 0x0f, 0xe0, 0x3f, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x0f,
0xf0, 0x3f, 0x00, 0x00, 0xe0, 0x01, 0xf0, 0x1f, 0xf0, 0x3f, 0xe0, 0x00,
0xf8, 0x01, 0xf0, 0x1f, 0xf0, 0x3f, 0xf0, 0x01, 0xfc, 0x03, 0xf0, 0x1f,
0xf0, 0x3f, 0xf8, 0x03, 0xfe, 0x03, 0xf0, 0x1f, 0xf8, 0x7f, 0x18, 0x07,
0x0f, 0x07, 0xf0, 0x3f, 0xf8, 0x7f, 0x08, 0x07, 0x47, 0x0e, 0xf0, 0x3f,
0xf8, 0x7f, 0x08, 0x06, 0x07, 0x0e, 0xf0, 0x3f, 0xf8, 0x7f, 0x88, 0x06,
0x07, 0x0e, 0xf0, 0x3f, 0xf8, 0x7f, 0x08, 0x06, 0x06, 0x0e, 0xf0, 0x3f,
0xf8, 0x7f, 0x08, 0xfe, 0x04, 0x0e, 0xf0, 0x3f, 0xf8, 0x7f, 0x18, 0x7c,
0x06, 0x0e, 0xf0, 0x3f, 0xf8, 0xff, 0x30, 0xff, 0x9f, 0x07, 0xf0, 0x3f,
0xf8, 0xff, 0x90, 0xff, 0x7f, 0x03, 0xf0, 0x3f, 0xf0, 0xff, 0xc0, 0xff,
0xff, 0x03, 0xe0, 0x1f, 0xf0, 0xff, 0xc0, 0xff, 0xff, 0x07, 0xe0, 0x1f,
0xf0, 0xff, 0xe0, 0xff, 0xff, 0x07, 0xe0, 0x1f, 0xf0, 0xff, 0xe0, 0xff,
0x7f, 0x06, 0xe0, 0x1f, 0xe0, 0xff, 0xe0, 0xff, 0x9f, 0x07, 0xe0, 0x0f,
0xe0, 0xff, 0xe0, 0xff, 0xcf, 0x07, 0xc0, 0x0f, 0xe0, 0xff, 0xc1, 0xff,
0xf3, 0x01, 0xc0, 0x0f, 0xc0, 0xff, 0x01, 0x7f, 0x7c, 0x0c, 0xc0, 0x07,
0xc0, 0xff, 0x19, 0x80, 0x9f, 0x0f, 0x80, 0x07, 0x80, 0xff, 0x39, 0xfc,
0xc7, 0x0f, 0x00, 0x03, 0x80, 0xff, 0x78, 0x78, 0xf0, 0x1f, 0x00, 0x03,
0x00, 0x7f, 0xf8, 0x00, 0xf8, 0x1f, 0x80, 0x01, 0x00, 0x3e, 0xf8, 0x03,
0xfe, 0x3f, 0x80, 0x01, 0x00, 0x3e, 0xf8, 0xff, 0xff, 0x3f, 0xc0, 0x00,
0x00, 0x1c, 0xf8, 0xff, 0xff, 0x7f, 0x60, 0x00, 0x00, 0x18, 0xfc, 0xff,
0xff, 0x7f, 0x30, 0x00, 0x00, 0x30, 0xfc, 0xff, 0xff, 0xff, 0x18, 0x00,
0x00, 0x60, 0xff, 0xff, 0xff, 0xff, 0x0c, 0x00, 0x00, 0xc0, 0xff, 0xff,
0xff, 0xff, 0x06, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x01, 0x00,
0x00, 0x00, 0xfe, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xff,
0xff, 0x3f, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xff, 0xff, 0x0f, 0x00, 0x00,
0x00, 0x00, 0x00, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0,
0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
+14
View File
@@ -0,0 +1,14 @@
#define am_width 32
#define am_height 32
static unsigned char am_bits[] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x00,
0x63, 0x00, 0x00, 0x00, 0x63, 0x00, 0x00, 0x00, 0x7f, 0x1f, 0x00, 0x7c,
0x63, 0x3f, 0x00, 0x7e, 0x63, 0x7f, 0x00, 0x7f, 0x63, 0xff, 0x80, 0x7f,
0x63, 0xff, 0xc1, 0x7f, 0x00, 0xff, 0xe3, 0x7f, 0x00, 0xff, 0xf7, 0x7f,
0x00, 0xef, 0xff, 0x7b, 0x00, 0xcf, 0xff, 0x79, 0x00, 0x8f, 0xff, 0x78,
0x00, 0x0f, 0x7f, 0x78, 0x00, 0x0f, 0x3e, 0x78, 0x00, 0x0f, 0x1c, 0x78,
0x00, 0x0f, 0x08, 0x78, 0x00, 0x0f, 0x00, 0x78, 0x00, 0x0f, 0x00, 0x78,
0x00, 0x0f, 0x00, 0x78, 0x00, 0x0f, 0x00, 0x78, 0x00, 0x0f, 0x00, 0x78,
0x00, 0x0e, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
+52
View File
@@ -0,0 +1,52 @@
#define Untitled_width 57
#define Untitled_height 73
static unsigned char Untitled_bits[] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x07, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x80, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0,
0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x07, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0xe0, 0x07, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0xf0,
0x07, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0xf0, 0x07, 0x00, 0x00, 0x00,
0x00, 0x1f, 0x00, 0xf8, 0x07, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x00, 0xf8,
0x03, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x00, 0xfc, 0x03, 0x00, 0x00, 0x00,
0x00, 0xfc, 0x01, 0xfc, 0x03, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x07, 0xfc,
0x03, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x4f, 0xfe, 0x03, 0x00, 0x00, 0x00,
0x00, 0xf8, 0xdf, 0xfe, 0x01, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x9f, 0xff,
0x01, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00,
0x00, 0xe0, 0xff, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xff, 0xff,
0x03, 0x00, 0x00, 0x00, 0x00, 0x80, 0xff, 0xff, 0x03, 0x00, 0x00, 0x00,
0x00, 0x00, 0xff, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff,
0x03, 0x00, 0x00, 0x00, 0x00, 0x80, 0xff, 0xff, 0x03, 0x00, 0x00, 0x00,
0x00, 0x00, 0xff, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x9f,
0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0xde, 0x1f, 0x03, 0x00, 0x00, 0x00,
0x00, 0x00, 0x8e, 0x0f, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x0f,
0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x3f, 0x06, 0x00, 0x00, 0x00,
0x00, 0x00, 0xc6, 0x7e, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc6, 0x3e,
0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0xce, 0x1f, 0x0e, 0x00, 0x00, 0x00,
0x00, 0x00, 0x0e, 0xff, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xce, 0xff,
0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, 0x3f, 0x00, 0x00, 0x00,
0x00, 0x00, 0xfe, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xff,
0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00,
0x00, 0x00, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff,
0xff, 0x00, 0x00, 0x00, 0x00, 0x80, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00,
0x00, 0x80, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x80, 0xff, 0xff,
0xff, 0xff, 0x01, 0x00, 0x80, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0x00,
0x80, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0x00, 0xc0, 0xff, 0xff, 0xff,
0xff, 0xff, 0x03, 0x00, 0xc0, 0xff, 0xff, 0xff, 0xff, 0xff, 0x03, 0x00,
0xc0, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0x00, 0x80, 0xff, 0xff, 0xff,
0xff, 0xff, 0x01, 0x00, 0x80, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0x00,
0x80, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0x00, 0x80, 0xff, 0xff, 0xff,
0xff, 0xff, 0x01, 0x00, 0x80, 0xff, 0xff, 0xff, 0xff, 0xfc, 0x01, 0x00,
0x00, 0x1f, 0xfe, 0xff, 0xff, 0x40, 0x00, 0x00, 0xf8, 0xff, 0xff, 0xff,
0xff, 0xff, 0x3f, 0x00, 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0x00,
0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0x00, 0xfc, 0xff, 0xff, 0xff,
0xff, 0xff, 0x7f, 0x00, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0x00,
0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0x00, 0xf8, 0xff, 0xff, 0xff,
0xff, 0xff, 0x7f, 0x00, 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0x00,
0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0x00, 0xf8, 0xff, 0x07, 0xff,
0xfb, 0xff, 0x7f, 0x00, 0xf8, 0x3f, 0x00, 0x00, 0x00, 0xfe, 0x3f, 0x00,
0xf0, 0x01, 0x00, 0x00, 0x00, 0xc0, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
+5
View File
@@ -0,0 +1,5 @@
#define close_width 11
#define close_height 11
static unsigned char close_bits[] = {
0x00, 0x00, 0x06, 0x03, 0x8e, 0x03, 0xdc, 0x01, 0xf8, 0x00, 0x70, 0x00,
0xf8, 0x00, 0xdc, 0x01, 0x8e, 0x03, 0x06, 0x03, 0x00, 0x00};
+14
View File
@@ -0,0 +1,14 @@
#define ff_width 32
#define ff_height 32
static unsigned char ff_bits[] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f,
0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x1f,
0xe0, 0xff, 0x3f, 0x1f, 0xf0, 0xff, 0x3f, 0x03, 0xf0, 0xff, 0x3f, 0x1f,
0xf0, 0x00, 0x00, 0x1f, 0xf0, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00,
0xf0, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00,
0xf0, 0xff, 0x0f, 0x00, 0xf0, 0xff, 0x0f, 0x00, 0xf0, 0xff, 0x0f, 0x00,
0xf0, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00,
0xf0, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00,
0xf0, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00,
0xf0, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
+5
View File
@@ -0,0 +1,5 @@
#define fullsize_width 11
#define fullsize_height 11
static unsigned char fullsize_bits[] = {
0x00, 0x00, 0xfc, 0x01, 0xfe, 0x03, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,
0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0xfc, 0x01, 0x00, 0x00};
+5
View File
@@ -0,0 +1,5 @@
#define icon_width 11
#define icon_height 11
static unsigned char icon_bits[] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x01, 0x02, 0x02, 0x02, 0x02,
0xfe, 0x03, 0xfc, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
+28
View File
@@ -0,0 +1,28 @@
#define moose_width 45
#define moose_height 49
static unsigned char moose_bits[] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00,
0x00, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x00, 0x00, 0x00, 0x00,
0x00, 0xf8, 0x01, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x01, 0x00, 0x00, 0x00,
0x00, 0xf0, 0x0f, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x1f, 0x00, 0x00, 0x00,
0x00, 0xfc, 0xff, 0x07, 0x00, 0x00, 0x00, 0xfe, 0xff, 0x0f, 0x00, 0x00,
0x00, 0x1f, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x0f, 0xff, 0x0f, 0x00, 0x00,
0x00, 0x07, 0xf1, 0x03, 0x00, 0x00, 0x00, 0x87, 0x71, 0x00, 0x00, 0x00,
0x00, 0xb7, 0x70, 0x00, 0x00, 0x00, 0x00, 0x57, 0x70, 0x00, 0x00, 0x00,
0x00, 0xe7, 0x71, 0x00, 0x00, 0x00, 0x00, 0xaf, 0x71, 0x00, 0x00, 0x00,
0x00, 0x3f, 0x78, 0x00, 0x00, 0x00, 0x80, 0xff, 0x7f, 0x00, 0x00, 0x00,
0xc0, 0xff, 0x7f, 0x00, 0x00, 0x00, 0xe0, 0xff, 0x7f, 0x00, 0x00, 0x00,
0xf8, 0xff, 0xf1, 0x00, 0x00, 0x00, 0xfc, 0x7f, 0xf0, 0x51, 0x00, 0x00,
0xbe, 0x3f, 0xe0, 0xff, 0x03, 0x00, 0x3e, 0x3f, 0xc0, 0xff, 0x07, 0x00,
0x1e, 0x3d, 0xc0, 0xff, 0x0f, 0x00, 0x9e, 0x3c, 0xc0, 0xff, 0x1f, 0x08,
0x5e, 0x3e, 0xc0, 0xff, 0xff, 0x07, 0x7c, 0x3e, 0xe0, 0xff, 0xff, 0x01,
0xf8, 0x3f, 0xf0, 0xff, 0x7f, 0x00, 0xf0, 0x1f, 0xf8, 0xff, 0x3f, 0x00,
0xe0, 0x0f, 0xff, 0xff, 0x3f, 0x00, 0x80, 0x87, 0xff, 0xff, 0x1f, 0x00,
0x00, 0xc0, 0xe3, 0xff, 0x1f, 0x00, 0x00, 0xc0, 0xfb, 0xff, 0x1f, 0x00,
0x00, 0xc0, 0x7d, 0xf8, 0x0f, 0x00, 0x00, 0xe0, 0x3c, 0xf8, 0x07, 0x00,
0x00, 0xf8, 0x0c, 0xf8, 0x07, 0x00, 0x00, 0xfc, 0x1c, 0x98, 0x03, 0x00,
0x00, 0xdc, 0x1c, 0x98, 0x03, 0x00, 0x00, 0xf8, 0x3c, 0x38, 0x07, 0x00,
0x00, 0x70, 0x3c, 0x78, 0x1f, 0x00, 0x00, 0x00, 0x6c, 0xf8, 0xfe, 0x00,
0x00, 0x00, 0x6e, 0xf0, 0xfd, 0x00, 0x00, 0x00, 0x3e, 0xb0, 0xfb, 0x00,
0x00, 0x00, 0x0c, 0xe0, 0x79, 0x00, 0x00, 0x00, 0x00, 0x60, 0x10, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
+14
View File
@@ -0,0 +1,14 @@
#define mozilla_width 32
#define mozilla_height 32
static unsigned char mozilla_bits[] = {
0x00, 0x00, 0x00, 0x00, 0xfc, 0xff, 0xff, 0x3f, 0x02, 0xf0, 0xff, 0x7f,
0x01, 0xe2, 0xff, 0xff, 0xd9, 0xc4, 0xff, 0xff, 0xd9, 0x88, 0xff, 0xff,
0x5b, 0x16, 0xff, 0xff, 0x2f, 0x76, 0xfc, 0xff, 0x4f, 0xe4, 0xe0, 0xff,
0x19, 0xff, 0x87, 0xff, 0x31, 0xf8, 0x1f, 0xfe, 0xe3, 0xff, 0x7f, 0xf8,
0x83, 0xff, 0xff, 0xe1, 0x07, 0xff, 0xff, 0xc7, 0x0d, 0xfe, 0xff, 0x87,
0x0d, 0xfc, 0xff, 0x83, 0x09, 0xf0, 0xff, 0x81, 0x01, 0xe0, 0xff, 0x81,
0x01, 0xc0, 0xff, 0x93, 0x01, 0x00, 0xff, 0xb3, 0x01, 0x00, 0xfc, 0xbf,
0x01, 0x20, 0xe0, 0xbf, 0x03, 0x00, 0x00, 0x9c, 0x07, 0x00, 0x04, 0x80,
0x1f, 0x00, 0x18, 0x80, 0xff, 0x03, 0x40, 0xc1, 0xff, 0x3b, 0x00, 0xc0,
0x3f, 0xe0, 0x03, 0xe0, 0x01, 0x00, 0x00, 0xe0, 0x01, 0x00, 0x1c, 0xf8,
0x02, 0x80, 0xff, 0x7f, 0xfc, 0xff, 0xff, 0x3f};
+5
View File
@@ -0,0 +1,5 @@
#define resize_width 11
#define resize_height 11
static unsigned char resize_bits[] = {
0x00, 0x00, 0xfc, 0x00, 0x02, 0x01, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03,
0x02, 0x03, 0x02, 0x03, 0xfc, 0x03, 0xf8, 0x01, 0x00, 0x00};
+27
View File
@@ -0,0 +1,27 @@
#define torrent_width 48
#define torrent_height 48
static unsigned char torrent_bits[] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00,
0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00,
0x00, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0x00, 0x00, 0x00, 0x00,
0x00, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0x00, 0x00, 0x00, 0x00,
0x80, 0x7f, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xff, 0xff, 0xff, 0xff, 0x0f,
0xe0, 0xff, 0xff, 0xff, 0xff, 0x0f, 0xc0, 0xff, 0xff, 0xff, 0xff, 0x0f,
0x80, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x7f, 0x00, 0x00, 0x00, 0x00,
0x00, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0x00, 0x00, 0x00, 0x00,
0x00, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00,
0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00,
0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x00,
0x00, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0x00,
0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x01,
0xe0, 0xff, 0xff, 0xff, 0xff, 0x03, 0xe0, 0xff, 0xff, 0xff, 0xff, 0x07,
0xe0, 0xff, 0xff, 0xff, 0xff, 0x0f, 0xe0, 0xff, 0xff, 0xff, 0xff, 0x07,
0x00, 0x00, 0x00, 0x00, 0xfc, 0x03, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x01,
0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0x00,
0x00, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x00,
0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
+14
View File
@@ -0,0 +1,14 @@
#define Untitled_width 32
#define Untitled_height 32
static unsigned char Untitled_bits[] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x1c, 0x00,
0x00, 0x36, 0x3e, 0x00, 0x00, 0x32, 0x33, 0x00, 0x00, 0x26, 0x1b, 0x00,
0x00, 0x6c, 0x19, 0x00, 0x00, 0xfc, 0x0f, 0x00, 0x00, 0xf0, 0x07, 0x00,
0x80, 0xff, 0xff, 0x00, 0xc0, 0xff, 0xff, 0x03, 0xe0, 0x01, 0xe0, 0x07,
0xe0, 0x00, 0xc0, 0x07, 0xe0, 0x0c, 0xc6, 0x07, 0xe0, 0x0c, 0xc6, 0x07,
0xe0, 0x00, 0xc0, 0x07, 0xe0, 0x00, 0xc0, 0x07, 0xe0, 0x00, 0xc0, 0x07,
0xe0, 0xf0, 0xc3, 0x07, 0xe0, 0xe0, 0xc1, 0x07, 0xe0, 0x00, 0x20, 0x06,
0xe0, 0x01, 0x20, 0x06, 0xe0, 0xff, 0x3f, 0x06, 0xe0, 0xff, 0xff, 0x07,
0xc0, 0xff, 0xff, 0x03, 0x80, 0xff, 0xff, 0x00, 0x00, 0x03, 0x20, 0x00,
0x00, 0x03, 0x60, 0x00, 0x80, 0x03, 0x60, 0x00, 0x00, 0x01, 0xc0, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
+14
View File
@@ -0,0 +1,14 @@
#define xlogo32_width 32
#define xlogo32_height 32
static unsigned char xlogo32_bits[] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xfc, 0x03, 0x00, 0x20, 0xf8, 0x07, 0x00, 0x30, 0xf8, 0x07, 0x00, 0x18,
0xf0, 0x0f, 0x00, 0x0c, 0xe0, 0x1f, 0x00, 0x06, 0xc0, 0x3f, 0x00, 0x06,
0xc0, 0x3f, 0x00, 0x03, 0x80, 0x7f, 0x80, 0x01, 0x00, 0xff, 0xc0, 0x00,
0x00, 0xfe, 0x61, 0x00, 0x00, 0xfe, 0x31, 0x00, 0x00, 0xfc, 0x33, 0x00,
0x00, 0xf8, 0x1b, 0x00, 0x00, 0xf0, 0x0d, 0x00, 0x00, 0xf0, 0x0e, 0x00,
0x00, 0x60, 0x1f, 0x00, 0x00, 0xb0, 0x3f, 0x00, 0x00, 0x98, 0x7f, 0x00,
0x00, 0x98, 0x7f, 0x00, 0x00, 0x0c, 0xff, 0x00, 0x00, 0x06, 0xfe, 0x01,
0x00, 0x03, 0xfc, 0x03, 0x80, 0x01, 0xfc, 0x03, 0xc0, 0x00, 0xf8, 0x07,
0xc0, 0x00, 0xf0, 0x0f, 0x60, 0x00, 0xe0, 0x1f, 0x30, 0x00, 0xe0, 0x1f,
0x18, 0x00, 0xc0, 0x3f, 0x00, 0x00, 0x00, 0x00};
+140
View File
@@ -0,0 +1,140 @@
#---------------------------------
# CPI # PROJ. : twmrc
# # FILE : .twmrc
# + # VER. : 20170828.0718UTC
# + # EMAIL : hal@clockworkpi.com
# +++ # HOST : clockworkpi.com
#---------------------------------
NoGrabServer
RestartPreviousState
DecorateTransients
RandomPlacement
BorderWidth 1
NoHighlight
OpaqueMove
MenuBorderWidth 1
NoMenuShadows
NoDefaults
LeftTitleButton "~/launcher/.twm/close" = f.delete
RightTitleButton "~/launcher/.twm/iconify" = f.iconify
RightTitleButton "~/launcher/.twm/resize" = f.resize
RightTitleButton "~/launcher/.twm/fullsize" = f.fullzoom
TitleFont "-adobe-helvetica-bold-r-normal--*-100-*-*-*-*-*-*"
ResizeFont "-adobe-helvetica-bold-r-normal--*-100-*-*-*-*-*-*"
MenuFont "-misc-fixed-medium-r-semicondensed-*-*-120-*-*-c-*-iso8859-8"
IconFont "-adobe-helvetica-bold-r-normal--*-100-*-*-*-*-*-*"
IconManagerFont "-adobe-helvetica-bold-r-normal--*-100-*-*-*"
Color
{
BorderColor "grey30"
DefaultBackground "rgb:5/5/5"
DefaultForeground "gray80"
TitleBackground "rgb:5/5/5"
TitleForeground "gray80"
MenuBackground "rgb:5/5/5"
MenuForeground "gray80"
MenuTitleBackground "gray80"
MenuTitleForeground "rgb:5/5/5"
MenuBorderColor "gray60"
IconBackground "rgb:4/4/4"
IconForeground "gray80"
IconBorderColor "gray70"
IconManagerBackground "rgb:5/5/5"
IconManagerForeground "gray80"
}
Cursors
{
Menu "hand2"
}
ForceIcons
Icons
{
"Chrome" "~/launcher/.twm/chrome.xbm"
"xterm" "~/launcher/.twm/xlogo32"
}
MoveDelta 3
Function "move-or-lower" { f.move f.deltastop f.lower }
Function "move-or-raise" { f.move f.deltastop f.raise }
Function "move-or-iconify" { f.move f.deltastop f.iconify }
Button1 = : root : f.menu "main"
Button3 = : root : f.menu "exec"
Button1 = m : window|icon : f.function "move-or-raise"
Button2 = m : window|icon : f.iconify
Button3 = m : window|icon : f.resize
Button1 = : title : f.function "move-or-raise"
Button2 = : title : f.raiselower
Button1 = : icon : f.function "move-or-iconify"
Button2 = : icon : f.iconify
Button1 = : iconmgr : f.iconify
Button2 = : iconmgr : f.iconify
NoTitle
{
"gkrellm"
}
menu "main"
{
"CLOCKWORKPI" f.title
"Raise" f.raise
"Lower" f.lower
"Focus" f.focus
"Unfocus" f.unfocus
"-------------" f.nop
"Show Iconmgr" f.showiconmgr
"Hide Iconmgr" f.hideiconmgr
"Kill" f.destroy
"-------------" f.nop
"Restart" f.restart
"Exit" ("gray80":"#773333") f.menu "exit"
}
menu "exit"
{
"Are you sure ?" ("gray80":"#773333") f.title
"No" f.nop
"Yes" f.quit
}
menu "exec"
{
":: Applications ::" f.title
"Xterm" ("gray80":"#334455") f.exec "exec /usr/bin/xterm &"
"Xterm Orange" ("gray80":"#aa5522") f.exec "exec /usr/bin/xterm -fg '#dc8700' &"
"Xmag" f.exec "exec /usr/bin/xmag &"
"Gkrellm" f.exec "/usr/bin/gkrellm &"
"XClock" f.exec "exec /usr/bin/xclock &"
"XFig" f.exec "exec /usr/bin/xfig -nosplash &"
"Wicd client" f.exec "exec /usr/bin/wicd-client -n &"
"xpdf" f.exec "exec /usr/bin/xpdf &"
}
WindowRing
{
"xterm"
"xpdf"
}
"r" = m | c: all : f.exec "exec /usr/bin/xterm -fg '#dc8700' &"
"s" = m | c: all : f.exec "exec /usr/bin/alsamixergui &"
"t" = m | c: all : f.exec "exec /usr/bin/xterm +sb &"
"w" = m | c: all : f.exec "exec /usr/bin/wicd-client -n &"
"i" = m | s: all : f.iconify
"x" = m | s: all : f.delete
"F12" = m : all : f.fullzoom
"Tab" = m : all : f.warpring "next"
+25
View File
@@ -0,0 +1,25 @@
session=${1:-gameshell}
case $session in
hdmi )
exec aria2c --conf-path=/home/cpi/launcher/aria2.conf &
feh --bg-center ~/launcher/sys.py/gameshell/wallpaper/desktopbg.jpg
cd ~/launcher/sys.py/ ; python appinstaller.py > /tmp/appinstaller.log & cd ~/
exec ~/launcher/load.sh &
exec ~/launcher/sys.py/gsnotify/gsnotify-arm daemon &
#exec /usr/bin/twm -f ~/launcher/.twmrc
exec ~/launcher/dwm-mod
;;
gameshell )
exec aria2c --conf-path=/home/cpi/launcher/aria2.conf &
feh --bg-center ~/launcher/sys.py/gameshell/wallpaper/loading.png
cd ~/launcher/sys.py/ ; python appinstaller.py > /tmp/appinstaller.log & cd ~/
exec ~/launcher/load.sh &
exec ~/launcher/sys.py/gsnotify/gsnotify-arm &
#exec awesome -c ~/launcher/awesome/rc.lua
exec ~/launcher/dwm-mod -w
;;
*)
exec $1;;
esac
+7
View File
@@ -0,0 +1,7 @@
Section "Device"
Identifier "Allwinner A10/A13 FBDEV"
Driver "fbturbo"
Option "fbdev" "/dev/fb0"
Option "SwapbuffersWait" "true"
EndSection
+7
View File
@@ -0,0 +1,7 @@
Section "Device"
Identifier "Allwinner A10/A13 FBDEV"
Driver "modesetting"
Option "fbdev" "/dev/fb0"
Option "SwapbuffersWait" "true"
EndSection
+4 -4
View File
@@ -1,7 +1,7 @@
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
@@ -645,7 +645,7 @@ the "copyright" line and a pointer to where the full notice is found.
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
along with this program. If not, see <https://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
@@ -664,11 +664,11 @@ might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<http://www.gnu.org/licenses/>.
<https://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
<https://www.gnu.org/licenses/why-not-lgpl.html>.
+50 -18
View File
@@ -12,15 +12,16 @@ from libs.roundrects import aa_round_rect
from UI.constants import Width,Height,ICON_TYPES
from UI.page import Page,PageSelector
from UI.label import Label
from UI.fonts import fonts
from UI.util_funcs import midRect
from UI.keys_def import CurKeys
from UI.util_funcs import midRect,FileExists
from UI.keys_def import CurKeys, IsKeyMenuOrB
from UI.scroller import ListScroller
from UI.icon_pool import MyIconPool
from UI.icon_item import IconItem
from UI.multi_icon_item import MultiIconItem
from UI.multilabel import MultiLabel
from UI.lang_manager import MyLangManager
from UI.skin_manager import MySkinManager
from config import VERSION
class InfoPageListItem(object):
_PosX = 0
@@ -79,7 +80,7 @@ class InfoPageListItem(object):
class AboutPage(Page):
_FootMsg = ["Nav.","","","Back",""]
_MyList = []
_ListFontObj = fonts["varela13"]
_ListFontObj = MyLangManager.TrFont("varela13")
_AList = {}
@@ -207,7 +208,32 @@ class AboutPage(Page):
memory["value"] = str( int(parts[1].strip())/1000.0) +" MB"
self._AList["memory"] = memory
break
def LauncherVersion(self):
launcher_version = {}
launcher_version["key"] = "launcher_ver"
launcher_version["label"] = "Launcher:"
launcher_version["value"] = VERSION
self._AList["launcher_ver"] = launcher_version
def OsImageVersion(self):
if FileExists("/etc/clockworkpi_os_image_version"):
try:
with open("/etc/clockworkpi_os_image_version") as f:
content = f.readlines()
content = [x.strip() for x in content]
except:
print("open %s failed" % "/etc/clockworkpi_os_image_version")
content = None
if content != None and len(content) > 0:
os_image_ver = {}
os_image_ver["key"] = "os_image_ver"
os_image_ver["label"] = "OS Image:"
os_image_ver["value"] = content[0][:12]
self._AList["os_image_ver"] = os_image_ver
def GenList(self):
self._MyList = []
@@ -216,7 +242,7 @@ class AboutPage(Page):
start_y = 10
last_height = 0
for i,u in enumerate( ["processor","armcores","cpuscalemhz","features","memory","uname"] ):
for i,u in enumerate( ["processor","armcores","cpuscalemhz","features","memory","uname","launcher_ver","os_image_ver"] ):
#for i,u in enumerate( ["processor","cpucores","cpumhz","flags","memory","uname"] ):
if u not in self._AList:
continue
@@ -229,7 +255,7 @@ class AboutPage(Page):
li._PosY = start_y + last_height
li._Width = Width
li._Fonts["normal"] = self._ListFontObj
li._Fonts["small"] = fonts["varela12"]
li._Fonts["small"] = MySkinManager.GiveFont("varela12")
if self._AList[u]["label"] != "":
li.Init( self._AList[u]["label"] )
@@ -248,14 +274,14 @@ class AboutPage(Page):
if self._Screen != None:
if self._Screen._CanvasHWND != None and self._CanvasHWND == None:
self._HWND = self._Screen._CanvasHWND
self._CanvasHWND = pygame.Surface( (self._Screen._Width,self._BGheight) )
self._CanvasHWND = pygame.Surface( (self._Screen._Width,self._BGheight+50) )
self._PosX = self._Index*self._Screen._Width
self._Width = self._Screen._Width ## equal to screen width
self._Height = self._Screen._Height
bgpng = IconItem()
bgpng._ImgSurf = MyIconPool._Icons["about_bg"]
bgpng = MultiIconItem()
bgpng._ImgSurf = MyIconPool.GiveIconSurface("about_bg")
bgpng._MyType = ICON_TYPES["STAT"]
bgpng._Parent = self
bgpng.Adjust(0,0,self._BGwidth,self._BGheight,0)
@@ -267,6 +293,9 @@ class AboutPage(Page):
self.CpuMhz()
self.Uname()
self.LauncherVersion()
self.OsImageVersion()
self.GenList()
self._Scroller = ListScroller()
@@ -278,7 +307,7 @@ class AboutPage(Page):
def ScrollDown(self):
dis = 10
if abs(self._Scrolled) < (self._BGheight - self._Height)/2 + 50:
if abs(self._Scrolled) < (self._BGheight - self._Height)/2 + 100:
self._PosY -= dis
self._Scrolled -= dis
@@ -300,7 +329,7 @@ class AboutPage(Page):
self._Screen.SwapAndShow()
def KeyDown(self,event):
if event.key == CurKeys["A"] or event.key == CurKeys["Menu"]:
if IsKeyMenuOrB(event.key):
self.ReturnToUpLevelPage()
self._Screen.Draw()
self._Screen.SwapAndShow()
@@ -321,16 +350,19 @@ class AboutPage(Page):
self.ClearCanvas()
#self._Ps.Draw()
self._Icons["bg"].NewCoord(self._Width/2,self._Height/2 + (self._BGheight - Height)/2 + self._Screen._TitleBar._Height)
self._Icons["bg"].Draw()
for i in self._MyList:
i.Draw()
self._DrawOnce = True
self._Icons["bg"].DrawRect((230,0,82,184),(228,0,82,184))
y = self._MyList[len(self._MyList)-1]._PosY+30
self._Icons["bg"].DrawRect(( (self._Width-191)/2,y,191,68),(65,232,191,68))
if self._HWND != None:
self._HWND.fill((255,255,255))
self._HWND.fill(MySkinManager.GiveColor("White"))
self._HWND.blit(self._CanvasHWND,(self._PosX,self._PosY,self._Width, self._Height ) )
+33 -71
View File
@@ -12,74 +12,20 @@ from libs.roundrects import aa_round_rect
from UI.constants import Width,Height,ICON_TYPES
from UI.page import Page,PageSelector
from UI.label import Label
from UI.fonts import fonts
from UI.util_funcs import midRect
from UI.keys_def import CurKeys
from UI.keys_def import CurKeys, IsKeyStartOrA, IsKeyMenuOrB
from UI.scroller import ListScroller
from UI.icon_pool import MyIconPool
from UI.icon_item import IconItem
from UI.multi_icon_item import MultiIconItem
from UI.lang_manager import MyLangManager
from UI.multilabel import MultiLabel
class InfoPageListItem(object):
_PosX = 0
_PosY = 0
_Width = 0
_Height = 20
_Labels = {}
_Icons = {}
_Fonts = {}
_LinkObj = None
def __init__(self):
self._Labels = {}
self._Icons = {}
self._Fonts = {}
def SetSmallText(self,text):
l = MultiLabel()
l.SetCanvasHWND(self._Parent._CanvasHWND)
l.Init(text,self._Fonts["small"])
self._Labels["Small"] = l
#if self._Labels["Small"]._Width > self._Width:
# self._Width = self._Labels["Small"]._Width
if self._Labels["Small"]._Height >= self._Height:
self._Height = self._Labels["Small"]._Height+10
def Init(self,text):
#self._Fonts["normal"] = fonts["veramono12"]
l = Label()
l._PosX = 10
l.SetCanvasHWND(self._Parent._CanvasHWND)
l.Init(text,self._Fonts["normal"])
self._Labels["Text"] = l
def Draw(self):
self._Labels["Text"]._PosY = self._PosY
self._Labels["Text"].Draw()
if "Small" in self._Labels:
self._Labels["Small"]._PosX = self._Labels["Text"]._Width + 16
self._Labels["Small"]._PosY = self._PosY
self._Labels["Small"].Draw()
class AirplanePage(Page):
_FootMsg = ["Nav.","","","Back","Toggle"]
_FootMsg = ["Nav","","Rescue","Back","Toggle"]
_MyList = []
_ListFontObj = fonts["varela13"]
_ListFontObj = MyLangManager.TrFont("varela13")
_AList = {}
@@ -119,21 +65,21 @@ class AirplanePage(Page):
airwire = IconItem()
airwire._ImgSurf = MyIconPool._Icons["airwire"]
airwire._ImgSurf = MyIconPool.GiveIconSurface("airwire")
airwire._MyType = ICON_TYPES["STAT"]
airwire._Parent = self
airwire.Adjust(0,0,5,43,0)
self._Icons["airwire"] = airwire
GS = IconItem()
GS._ImgSurf = MyIconPool._Icons["GS"]
GS._ImgSurf = MyIconPool.GiveIconSurface("GS")
GS._MyType = ICON_TYPES["STAT"]
GS._Parent = self
GS.Adjust(0,0,72,95,0)
self._Icons["GS"] = GS
DialogBoxs = MultiIconItem()
DialogBoxs._ImgSurf = MyIconPool._Icons["DialogBoxs"]
DialogBoxs._ImgSurf = MyIconPool.GiveIconSurface("DialogBoxs")
DialogBoxs._MyType = ICON_TYPES["STAT"]
DialogBoxs._Parent = self
DialogBoxs._IconWidth = 134
@@ -144,7 +90,7 @@ class AirplanePage(Page):
"""
bgpng = MultiIconItem()
bgpng._ImgSurf = MyIconPool._Icons["about_bg"]
bgpng._ImgSurf = MyIconPool.GiveIconSurface("about_bg")
bgpng._MyType = ICON_TYPES["STAT"]
bgpng._Parent = self
bgpng.Adjust(0,0,self._BGwidth,self._BGheight,0)
@@ -161,6 +107,8 @@ class AirplanePage(Page):
self._Scroller.Init()
self._Scroller.SetCanvasHWND(self._HWND)
self.OnLoadCb()
def ScrollDown(self):
dis = 10
if abs(self._Scrolled) < (self._BGheight - self._Height)/2 + 0:
@@ -175,7 +123,7 @@ class AirplanePage(Page):
def ToggleModeAni(self): ## with animation
out = commands.getstatusoutput('sudo rfkill list | grep yes | cut -d " " -f3')
if out[1] == "yes":
if "yes" in out[1]:
data = self.EasingData(0,43)
for _,v in enumerate(data):
self._airwire_y -= v
@@ -205,25 +153,31 @@ class AirplanePage(Page):
def ToggleMode(self):
out = commands.getstatusoutput('sudo rfkill list | grep yes | cut -d " " -f3')
print out
if out[1] == "yes":
self._Screen._MsgBox.SetText("Turning On")
if "yes" in out[1]:
self._Screen._MsgBox.SetText("TurningOn")
self._Screen._MsgBox.Draw()
commands.getstatusoutput("sudo rfkill unblock all")
self._Screen._TitleBar._InAirPlaneMode = False
else:
self._Screen._MsgBox.SetText("Turning Off")
self._Screen._MsgBox.SetText("TurningOff")
self._Screen._MsgBox.Draw()
commands.getstatusoutput("sudo rfkill block all")
self._Screen._TitleBar._InAirPlaneMode = True
def UnBlockAll(self):
self._Screen._MsgBox.SetText("TurningOn")
self._Screen._MsgBox.Draw()
commands.getstatusoutput("sudo rfkill unblock all")
self._Screen._TitleBar._InAirPlaneMode = False
def OnLoadCb(self):
self._Scrolled = 0
self._PosY = 0
self._DrawOnce = False
out = commands.getstatusoutput('sudo rfkill list | grep yes | cut -d " " -f3')
if out[1] == "yes":
if "yes" in out[1]:
self._Screen._TitleBar._InAirPlaneMode = True
self._airwire_y = 50+43
self._dialog_index = 1
@@ -239,12 +193,12 @@ class AirplanePage(Page):
self._Screen.SwapAndShow()
def KeyDown(self,event):
if event.key == CurKeys["A"] or event.key == CurKeys["Menu"]:
if IsKeyMenuOrB(event.key):
self.ReturnToUpLevelPage()
self._Screen.Draw()
self._Screen.SwapAndShow()
if event.key == CurKeys["B"]:
if IsKeyStartOrA(event.key):
self.ToggleModeAni()
"""
self.ToggleMode()
@@ -265,7 +219,15 @@ class AirplanePage(Page):
self._Screen.Draw()
self._Screen.SwapAndShow()
"""
if event.key == CurKeys["X"]:
self.UnBlockAll()
self._Screen.SwapAndShow()
pygame.time.delay(1000)
self._Screen.Draw()
self._Screen.SwapAndShow()
def Draw(self):
self.ClearCanvas()
@@ -0,0 +1,813 @@
# -*- coding: utf-8 -*-
import re
import pygame
#import math
import commands
import dbus
from beeprint import pp
from libs.roundrects import aa_round_rect
from libs.DBUS import bus, adapter,devices
#import gobject
#from wicd import misc
## local UI import
from UI.constants import Width,Height,ICON_TYPES
from UI.page import Page,PageSelector
from UI.label import Label
from UI.util_funcs import midRect
from UI.keys_def import CurKeys, IsKeyStartOrA, IsKeyMenuOrB
from UI.scroller import ListScroller
from UI.icon_pool import MyIconPool
from UI.icon_item import IconItem
from UI.multi_icon_item import MultiIconItem
from UI.skin_manager import MySkinManager
from UI.confirm_page import ConfirmPage
from UI.info_page_list_item import InfoPageListItem
from UI.multilabel import MultiLabel
from UI.lang_manager import MyLangManager
from UI.keyboard import Keyboard
from net_item import NetItem
from agent import BleAgent,BleAgentPairPage
class BleForgetConfirmPage(ConfirmPage):
_ConfirmText = MyLangManager.Tr("ConfirmForgetQ")
def KeyDown(self,event):
if IsKeyMenuOrB(event.key):
self.ReturnToUpLevelPage()
self._Screen.Draw()
self._Screen.SwapAndShow()
if IsKeyStartOrA(event.key):
self.SnapMsg(MyLangManager.Tr("Deleting"))
self._Screen.Draw()
self._Screen.SwapAndShow()
try:
#self._Parent._Adapter.RemoveDevice()
print("try to RemoveDevice")
except Exception,e:
print(str(e))
pygame.time.delay(400)
self.ReturnToUpLevelPage()
self._Screen.Draw()
self._Screen.SwapAndShow()
def Draw(self):
#self.ClearCanvas()
self.DrawBG()
for i in self._MyList:
i.Draw()
self.Reset()
class BleInfoPageSelector(PageSelector):
_BackgroundColor = MySkinManager.GiveColor('Front')
def __init__(self):
self._PosX = 0
self._PosY = 0
self._Height = 0
def AnimateDraw(self,x2,y2):
pass
def Draw(self):
idx = self._Parent._PsIndex
if idx < len( self._Parent._MyList):
x = self._PosX+2
y = self._Parent._MyList[idx]._PosY+1
h = self._Parent._MyList[idx]._Height -3
self._PosX = x
self._PosY = y
self._Height = h
aa_round_rect(self._Parent._CanvasHWND,
(x,y,self._Width-4,h),self._BackgroundColor,4,0,self._BackgroundColor)
class BleInfoPage(Page):
_FootMsg = ["Nav","Forget","Disconnect","Back",""]
_MyList = []
_ListFontObj = MyLangManager.TrFont("varela15")
_ListSmFontObj = MySkinManager.GiveFont("varela12") # small font
_ListSm2FontObj= MySkinManager.GiveFont("varela11")
_AList = {}
_Path = ""
def Init(self):
if self._Screen != None:
if self._Screen._CanvasHWND != None and self._CanvasHWND == None:
self._CanvasHWND = self._Screen._CanvasHWND
self._PosX = self._Index*self._Screen._Width
self._Width = self._Screen._Width ## equal to screen width
self._Height = self._Screen._Height
ps = BleInfoPageSelector()
ps._Parent = self
self._Ps = ps
self._PsIndex = 0
#_AList is an object
self.GenList()
self._Scroller = ListScroller()
self._Scroller._Parent = self
self._Scroller._PosX = 2
self._Scroller._PosY = 2
self._Scroller.Init()
self._ConfirmPage1 = BleForgetConfirmPage()
self._ConfirmPage1._Screen = self._Screen
self._ConfirmPage1._Name = "ConfirmForget"
self._ConfirmPage1._Parent = self
self._ConfirmPage1.Init()
def GenList(self):
if self._AList== None:
return
self._MyList = []
self._PsIndex = 0
start_x = 0
start_y = 0
for i,v in enumerate( self._AList):
#print(i,v) # (0, dbus.String(u'AddressType'))
li = InfoPageListItem()
li._Parent = self
li._PosX = start_x
li._PosY = start_y + i*InfoPageListItem._Height
li._Width = Width
li._Fonts["normal"] = self._ListFontObj
if v == "UUIDs":
li._Fonts["small"] = self._ListSm2FontObj
else:
li._Fonts["small"] = self._ListSmFontObj
li.Init( str(v) )
li._Flag = v
if v =="UUIDs":
if len(self._AList[v]) > 1:
pp(self._AList[v][0])
sm_text = str(self._AList[v][0])
else:
sm_text = "<empty>"
else:
sm_text = str(self._AList[v])
if sm_text == "0":
sm_text="No"
elif sm_text == "1":
sm_text="Yes"
sm_text = sm_text[:20]
li.SetSmallText(sm_text)
li._PosX = 2
self._MyList.append(li)
def TryToForget(self):
global adapter
proxy_obj = bus.get_object("org.bluez", self._Path)
dev = dbus.Interface(proxy_obj, "org.bluez.Device1")
self._Screen._MsgBox.SetText("Forgeting")
self._Screen._MsgBox.Draw()
self._Screen.SwapAndShow()
try:
adapter.RemoveDevice(dev)
except Exception,e:
err_name = e.get_dbus_name()
if err_name == "org.freedesktop.DBus.Error.NoReply":
self._Screen._MsgBox.SetText("DBus noreply")
else:
self._Screen._MsgBox.SetText("Forget failed")
self._Screen._MsgBox.Draw()
self._Screen.SwapAndShow()
pygame.time.delay(500)
self.ReturnToUpLevelPage()
self._Screen.Draw()
self._Screen.SwapAndShow()
def TryToDisconnect(self):
global bus
if "Connected" in self._AList:
if self._AList["Connected"] == 0:
return
proxy_obj = bus.get_object("org.bluez", self._Path)
dev = dbus.Interface(proxy_obj, "org.bluez.Device1")
self._Screen._FootBar.UpdateNavText("Disconnecting")
self._Screen._MsgBox.SetText("Disconnecting")
self._Screen._MsgBox.Draw()
self._Screen.SwapAndShow()
try:
dev.Disconnect()
except Exception,e:
err_name = e.get_dbus_name()
if err_name == "org.freedesktop.DBus.Error.NoReply":
self._Screen._MsgBox.SetText("DBus noreply")
else:
self._Screen._MsgBox.SetText("Disconnect failed")
self._Screen._MsgBox.Draw()
self._Screen.SwapAndShow()
pygame.time.delay(500)
self.ReturnToUpLevelPage()
self._Screen.Draw()
self._Screen.SwapAndShow()
self._Screen._FootBar.ResetNavText()
def Click(self):
if self._PsIndex >= len(self._MyList):
return
cur_li = self._MyList[self._PsIndex]
print(cur_li._Flag)
if cur_li._Flag in self._AList:
print(self._AList[ cur_li._Flag ])
def OnLoadCb(self):
if self._AList != None:
if "Connected" in self._AList:
if self._AList["Connected"] == 1:
self._FootMsg[1] = "Disconnect"
else:
self._FootMsg[1] = ""
self.GenList()
def OnReturnBackCb(self):
self.ReturnToUpLevelPage()
self._Screen.Draw()
self._Screen.SwapAndShow()
def KeyDown(self,event):
if IsKeyMenuOrB(event.key):
self.ReturnToUpLevelPage()
self._Screen.Draw()
self._Screen.SwapAndShow()
if event.key == CurKeys["Up"]:
self.ScrollUp()
self._Screen.Draw()
self._Screen.SwapAndShow()
if event.key == CurKeys["Down"]:
self.ScrollDown()
self._Screen.Draw()
self._Screen.SwapAndShow()
if IsKeyStartOrA(event.key):
self.Click()
if event.key == CurKeys["X"]:
self.TryToDisconnect()
if event.key == CurKeys["Y"]:
self.TryToForget()
def Draw(self):
if len(self._MyList) == 0:
return
self.ClearCanvas()
if len(self._MyList) * InfoPageListItem._Height > self._Height:
self._Ps._Width = self._Width - 10
self._Ps._PosX = 9
self._Ps.Draw()
for i in self._MyList:
i.Draw()
self._Scroller.UpdateSize(len(self._MyList)*InfoPageListItem._Height, self._PsIndex*InfoPageListItem._Height)
self._Scroller.Draw()
else:
self._Ps._Width = self._Width
self._Ps.Draw()
for i in self._MyList:
i.Draw()
class BleListSelector(PageSelector):
_BackgroundColor = MySkinManager.GiveColor('Front')
def __init__(self):
self._PosX = 0
self._PosY = 0
self._Height = 0
def AnimateDraw(self,x2,y2):
pass
def Draw(self):
idx = self._Parent._PsIndex
if idx < len( self._Parent._MyList):
x = self._Parent._MyList[idx]._PosX+2
y = self._Parent._MyList[idx]._PosY+1
h = self._Parent._MyList[idx]._Height -3
self._PosX = x
self._PosY = y
self._Height = h
aa_round_rect(self._Parent._CanvasHWND,
(x,y,self._Width-4,h),self._BackgroundColor,4,0,self._BackgroundColor)
class BleListMessageBox(Label):
_Parent = None
def Draw(self):
my_text = self._FontObj.render( self._Text,True,self._Color)
w = my_text.get_width()
h = my_text.get_height()
x = (self._Parent._Width - w)/2
y = (self._Parent._Height - h)/2
padding = 10
pygame.draw.rect(self._CanvasHWND,MySkinManager.GiveColor('White'),(x-padding,y-padding, w+padding*2,h+padding*2))
pygame.draw.rect(self._CanvasHWND,MySkinManager.GiveColor('Black'),(x-padding,y-padding, w+padding*2,h+padding*2),1)
self._CanvasHWND.blit(my_text,(x,y,w,h))
class BluetoothPage(Page):
_MyList = []
#Wicd dbus part
_Adapter = None
_Dbus = None
_Devices = None
_BlePassword = ""
_Connecting = False
_Scanning = False
_PrevState = None
_Selector = None
_ShowingMessageBox = False
_MsgBox = None
_ConnectTry = 0
_BlockCb = None
_LastStatusMsg = ""
_FootMsg = ["Nav","Info","Scan","Back","TryConnect"]
_Scroller = None
_ListFontObj = MyLangManager.TrFont("notosanscjk15")
_InfoPage = None
_ADAPTER_DEV = "hci0"
_Offline = False
_Leader = None
def __init__(self):
Page.__init__(self)
self._MyList = []
self._CanvasHWND = None
def ShowBox(self,msg):
self._MsgBox._Text = msg
self._ShowingMessageBox = True
self._Screen.Draw()
self._MsgBox.Draw()
self._Screen.SwapAndShow()
def HideBox(self):
self.Draw()
self._ShowingMessageBox = False
self._Screen.SwapAndShow()
def Init(self):
self._PosX = self._Index * self._Screen._Width
self._Width = self._Screen._Width
self._Height = self._Screen._Height
#self._CanvasHWND = pygame.Surface((self._Width,self._Height))
self._CanvasHWND = self._Screen._CanvasHWND
ps = BleListSelector()
ps._Parent = self
ps._Width = Width - 12
self._Ps = ps
self._PsIndex = 0
msgbox = BleListMessageBox()
msgbox._CanvasHWND = self._CanvasHWND
msgbox.Init(" ",MyLangManager.TrFont("veramono12"))
msgbox._Parent = self
self._MsgBox = msgbox
self._Scroller = ListScroller()
self._Scroller._Parent = self
self._Scroller._PosX = 2
self._Scroller._PosY = 2
self._Scroller.Init()
self.GenNetworkList()
self._InfoPage = BleInfoPage()
self._InfoPage._Screen = self._Screen
self._InfoPage._Name = "BluetoothInfo"
self._InfoPage.Init()
def print_normal(self,address, properties):
print("[ " + address + " ]")
for key in properties.keys():
value = properties[key]
if type(value) is dbus.String:
value = unicode(value).encode('ascii', 'replace')
if (key == "Class"):
print(" %s = 0x%06x" % (key, value))
else:
print(" %s = %s" % (key, value))
print()
properties["Logged"] = True
def skip_dev(self,old_dev, new_dev):
if not "Logged" in old_dev:
return False
if "Name" in old_dev:
return True
if not "Name" in new_dev:
return True
return False
def DbusPropertiesChanged(self, interface, changed, invalidated, path):
global devices
print("DbusPropertiesChanged")
if interface != "org.bluez.Device1":
return
if path in devices:
dev = devices[path]
if self.skip_dev(dev, changed):
return
devices[path] = dict(devices[path].items() + changed.items())
else:
devices[path] = changed
if "Address" in devices[path]:
address = devices[path]["Address"]
else:
address = "<unknown>"
self._Devices = devices
self.print_normal(address, devices[path])
self.RefreshDevices()
self.GenNetworkList()
self._Screen.Draw()
self._Screen.SwapAndShow()
def ShutDownConnecting(self):
print("Bluetooth Shutdown connecting...")
def AbortedAndReturnToUpLevel(self):
self.HideBox()
self._Screen._FootBar.ResetNavText()
self.ReturnToUpLevelPage()
self._Screen.Draw()
self._Screen.SwapAndShow()
def CheckIfBluetoothConnecting(self):
return True
def TryConnect(self):
global bus
if self._PsIndex >= len(self._MyList):
return
cur_li = self._MyList[self._PsIndex]
print(cur_li._Path)
if "Connected" in cur_li._Atts:
if cur_li._Atts["Connected"] == 1:
return
proxy_obj = bus.get_object("org.bluez", cur_li._Path)
dev = dbus.Interface(proxy_obj, "org.bluez.Device1")
self._Screen._FootBar.UpdateNavText("Connecting")
self.ShowBox(MyLangManager.Tr("Connecting"))
self._Leader._MyAgent.device_obj = dev
self._Leader._MyAgent.dev_path = cur_li._Path
try:
dev.Pair(reply_handler=self._Leader._MyAgent.pair_reply,
error_handler=self._Leader._MyAgent.pair_error,timeout=60000)
except Exception,e:
print(str(e))
#self.HideBox()
#self._Screen._FootBar.ResetNavText()
def RefreshDevices(self):
global devices
devices = {}
try:
proxy_obj = bus.get_object("org.bluez", "/")
manager = dbus.Interface(proxy_obj,"org.freedesktop.DBus.ObjectManager")
objects = manager.GetManagedObjects()
for path, interfaces in objects.iteritems():
if "org.bluez.Device1" in interfaces:
devices[path] = interfaces["org.bluez.Device1"] ## like /org/bluez/hci0/dev_xx_xx_xx_yy_yy_yy
except Exception,e:
print(str(e))
devices={}
self._Devices = devices
def GenNetworkList(self):
self._MyList = []
start_x = 0
start_y = 0
counter = 0
for i,v in enumerate(self._Devices):
if "Name" in self._Devices[v]:
if len(self._Devices[v]["Name"]) < 2:
continue
if re.match("[0-9a-f]{2}([-:]?)[0-9a-f]{2}(\\1[0-9a-f]{2}){4}$", self._Devices[v]["Name"].lower()): ## skip xx:xx:xx:xx:xx
continue
else:
continue
ni = NetItem()
ni._Parent = self
ni._PosX = start_x
ni._PosY = start_y + counter* NetItem._Height
ni._Width = Width
ni._FontObj = self._ListFontObj
ni.Init(v,self._Devices[v])
counter += 1
self._MyList.append(ni)
self._PsIndex = 0
def Rescan(self):
if self._Screen._CurrentPage != self:
return
self._Scanning = True
self.ShowBox(MyLangManager.Tr("BluetoothScanning"))
self._Screen._FootBar.UpdateNavText("Scanning")
proxy_obj = self._Dbus.get_object("org.bluez", "/org/bluez/" + self._ADAPTER_DEV)
adapter_props = dbus.Interface(proxy_obj,"org.freedesktop.DBus.Properties")
discoverying = adapter_props.Get("org.bluez.Adapter1", "Discovering")
print("discoverying", discoverying)
if self._Adapter!= None:
try:
self._Adapter.StopDiscovery()
except Exception,e:
print(str(e))
try:
self._Adapter.StartDiscovery()
except Exception,e:
err_name = e.get_dbus_name()
if err_name == "org.freedesktop.DBus.Error.NoReply":
print("start discovery timeout")
else:
print("start discovery unknown err: ", str(e))
def OnReturnBackCb(self):
self.RefreshDevices()
self.GenNetworkList()
def OnLoadCb(self):
self._Offline = False
if self._Screen._TitleBar._InAirPlaneMode == False:
out = commands.getstatusoutput("hcitool dev | grep hci0 |cut -f3") ## bluetooth maybe dead after airplane mode
if len(out[1]) < 17:
self._Offline = True
print("Bluetooth OnLoadCb ,can not find hci0 alive,try to reboot")
else:
self.RefreshDevices()
self.GenNetworkList()
else:
self._Offline = True
def KeyDown(self,event):
if IsKeyMenuOrB(event.key):
if self._Offline == True:
self.AbortedAndReturnToUpLevel()
return
if self._Adapter != None:
try:
self._Adapter.StopDiscovery()
except Exception,e:
print(str(e))
_connecting = self.CheckIfBluetoothConnecting()
if _connecting:
self.ShutDownConnecting()
self.ShowBox(MyLangManager.Tr("ShutDownConnecting"))
self.AbortedAndReturnToUpLevel()
else:
self.AbortedAndReturnToUpLevel()
else:
self.HideBox()
self.ReturnToUpLevelPage()
self._Screen.Draw()
self._Screen.SwapAndShow()
self._Screen._FootBar.ResetNavText()
if event.key == CurKeys["Up"]:
self.ScrollUp()
self._Screen.Draw()
self._Screen.SwapAndShow()
if event.key == CurKeys["Down"]:
self.ScrollDown()
self._Screen.Draw()
self._Screen.SwapAndShow()
if event.key == CurKeys["X"]:
if self._Offline == False:
self.Rescan()
if event.key == CurKeys["Y"]:
if len(self._MyList) == 0:
return
if self._Offline == True:
return
self._InfoPage._AList = self._MyList[self._PsIndex]._Atts
self._InfoPage._Path = self._MyList[self._PsIndex]._Path
self._Screen.PushPage(self._InfoPage)
self._Screen.Draw()
self._Screen.SwapAndShow()
if IsKeyStartOrA(event.key):
if self._Offline == False:
self.TryConnect()
def Draw(self):
self.ClearCanvas()
if len(self._MyList) == 0:
return
if len(self._MyList) * NetItem._Height > self._Height:
self._Ps._Width = self._Width - 11
self._Ps.Draw()
for i in self._MyList:
i.Draw()
self._Scroller.UpdateSize( len(self._MyList)*NetItem._Height, self._PsIndex*NetItem._Height)
self._Scroller.Draw()
else:
self._Ps._Width = self._Width
self._Ps.Draw()
for i in self._MyList:
i.Draw()
BUS_NAME = 'org.bluez'
AGENT_INTERFACE = 'org.bluez.Agent1'
AGENT_PATH = "/gameshell/bleagent"
class APIOBJ(object):
_Page = None
_PairPage = None
_Page3 = None
_Prompts = {} # string key,string value
_PromptType = None
_MyAgent = None
def __init__(self):
self._Prompts["PIN"]=""
self._Prompts["PASS"]=""
def OnKbdReturnBackCb(self):
if self._PromptType == None:
return
else:
if self._PromptType in self._Prompts:
inputed = "".join(self._Page3._Textarea._MyWords)
self._Prompts[self._PromptType] = inputed
self._PromptType = None ##clear
def Ask(self,prompt,prompt_type=None):
self._Screen.PushPage(self._Page3)
self._Page3.SetPassword("")
self._Page3._Name = prompt
self._Page3._Caller = self
self._Screen.Draw()
self._Screen.SwapAndShow()
if prompt_type != None:
self._PromptType = prompt_type
def RegisterMyAgent(self):
global AGENT_PATH, bus,devices,adapter
capability = "KeyboardDisplay"
self._MyAgent = BleAgent(bus, AGENT_PATH)
self._MyAgent._Leader = self
obj = bus.get_object(BUS_NAME, "/org/bluez");
manager = dbus.Interface(obj, "org.bluez.AgentManager1")
manager.RegisterAgent(AGENT_PATH, capability)
print("BleAgent %s registered" % AGENT_PATH)
def Init(self,main_screen):
global bus,devices,adapter
self._Page = BluetoothPage()
self._Page._Dbus = bus
self._Page._Devices = devices
self._Page._Adapter = adapter
self._Page._Screen = main_screen
self._Page._Name ="Bluetooth"
self._Page._Leader = self
self._Page.Init()
self._PairPage = BleAgentPairPage()
self._PairPage._Screen = main_screen
self._PairPage._Name = "Bluetooth"
self._PairPage.Init()
self._Page3= Keyboard()
self._Page3._Name = "Enter"
self._Page3._Screen = main_screen
self._Page3.Init()
bus.add_signal_receiver(self._Page.DbusPropertiesChanged,
dbus_interface = "org.freedesktop.DBus.Properties",
signal_name = "PropertiesChanged",
arg0 = "org.bluez.Device1",
path_keyword = "path")
self.RegisterMyAgent()
def API(self,main_screen):
if main_screen !=None:
main_screen.PushPage(self._Page)
main_screen.Draw()
main_screen.SwapAndShow()
OBJ = APIOBJ()
def Init(main_screen):
OBJ.Init(main_screen)
def API(main_screen):
OBJ.API(main_screen)
@@ -0,0 +1,224 @@
# -*- coding: utf-8 -*-
import pygame
#import math
#import commands
import dbus
#from beeprint import pp
from libs.roundrects import aa_round_rect
from UI.page import Page,PageSelector
from UI.keys_def import CurKeys, IsKeyMenuOrB
from libs.DBUS import bus, adapter,devices
BUS_NAME = 'org.bluez'
AGENT_INTERFACE = 'org.bluez.Agent1'
AGENT_PATH = "/gameshell/bleagent"
class Rejected(dbus.DBusException):
_dbus_error_name = "org.bluez.Error.Rejected"
class BleAgent(dbus.service.Object):
device_obj = None
_Leader = None
dev_path = ""
def set_trusted(self,path):
global BUS_NAME
props = dbus.Interface(bus.get_object(BUS_NAME, path),
"org.freedesktop.DBus.Properties")
props.Set("org.bluez.Device1", "Trusted", True)
def dev_connect(self,path):
global BUS_NAME
dev = dbus.Interface(bus.get_object(BUS_NAME, path),
"org.bluez.Device1")
print("dev_connect %s" % path)
try:
dev.Connect()
except Exception,e:
print(str(e))
@dbus.service.method(AGENT_INTERFACE,in_signature="", out_signature="")
def Release(self):
print("Agent release")
@dbus.service.method(AGENT_INTERFACE,in_signature="os", out_signature="")
def AuthorizeService(self, device, uuid):
print("AuthorizeService (%s, %s)" % (device, uuid)) ## directly authrized
return
@dbus.service.method(AGENT_INTERFACE,in_signature="o", out_signature="s")
def RequestPinCode(self, device):
print("RequestPinCode (%s)" % (device))
set_trusted(device)
return "0000"
@dbus.service.method(AGENT_INTERFACE,in_signature="o", out_signature="u")
def RequestPasskey(self, device):
print("RequestPasskey (%s)" % (device))
set_trusted(device)
passkey = "000000"
return dbus.UInt32(passkey)
@dbus.service.method(AGENT_INTERFACE,in_signature="ouq", out_signature="")
def DisplayPasskey(self, device, passkey, entered):
print("DisplayPasskey (%s, %06u entered %u)" % (device, passkey, entered))
self._Leader._PairPage.ShowPassKey(device,passkey,entered)
@dbus.service.method(AGENT_INTERFACE,in_signature="os", out_signature="")
def DisplayPinCode(self, device, pincode):
print("DisplayPinCode (%s, %s)" % (device, pincode))
self._Leader._PairPage.ShowPinCode(device,pincode)
@dbus.service.method(AGENT_INTERFACE,in_signature="ou", out_signature="")
def RequestConfirmation(self, device, passkey):
print("RequestConfirmation (%s, %06d)" % (device, passkey))
set_trusted(device)
return
@dbus.service.method(AGENT_INTERFACE,in_signature="o", out_signature="")
def RequestAuthorization(self, device):
print("RequestAuthorization (%s)" % (device))
return
@dbus.service.method(AGENT_INTERFACE,in_signature="", out_signature="")
def Cancel(self):
print("Cancel")
def pair_reply(self):
print("Device paired under Agent")
self.set_trusted(self.dev_path)
self.dev_connect(self.dev_path)
self._Leader._PairPage._dev_obj = self.device_obj
self._Leader._PairPage.PairReplyCb()
def pair_error(self,error):
global adapter
err_msg = ""
err_name = error.get_dbus_name()
print(err_name)
if err_name == "org.freedesktop.DBus.Error.NoReply" and self.device_obj:
err_msg = "Timed out. Cancelling pairing"
print(err_msg)
self.device_obj.CancelPairing()
elif err_name == "org.bluez.Error.AuthenticationCanceled":
err_msg = "Authentication Canceled"
elif err_name == "org.bluez.Error.ConnectionAttemptFailed":
err_msg = "Page Timeout"
elif err_name == "org.bluez.Error.AlreadyExists":
err_msg ="Already Exists"
try:
adapter.RemoveDevice(self.device_obj)
except Exception,e:
print("pair_error forget err:",str(e))
elif err_name == "org.bluez.Error.AuthenticationFailed":
err_msg = "Authentication Failed"
else:
err_msg = "Pair error"
print( err_name,str(error) )
self.device_obj = None
self._Leader._PairPage.PairErrorCb(err_msg)
class BleAgentPairPage(Page):
##show pin/password
##show prompt
_Pin = ""
_Pass = ""
_dev_obj = None
_FootMsg = ["Nav","","","Back",""]
def Init(self):
self._PosX = self._Index * self._Screen._Width
self._Width = self._Screen._Width
self._Height = self._Screen._Height
#self._CanvasHWND = pygame.Surface((self._Width,self._Height))
self._CanvasHWND = self._Screen._CanvasHWND
def ShowPinCode(self,device,pincode):
print("ShowPinCode %s %s" % (device,pincode))
if self._Screen.CurPage() != self:
self._Screen.PushPage(self)
self.ClearCanvas()
self._Screen.Draw()
self._Screen.SwapAndShow()
self._Pin = "%s" % pincode
txt = self.Pin
if len(self._Pin) > 0:
txt = "Pin code: %s" % self._Pin
self._Screen._MsgBox.SetText(txt)
self._Screen._MsgBox.Draw()
self._Screen.SwapAndShow()
def ShowPassKey(self,device,passkey,entered):
print("ShowPassKey %06u %u" % (passkey,entered))
if self._Screen.CurPage() != self:
self._Screen.PushPage(self)
self.ClearCanvas()
self._Screen.Draw()
self._Screen.SwapAndShow()
self._Pass = "%06u" % passkey
if len(self._Pass) > 0:
txt = "Pair code: %s" % self._Pass
self._Screen._MsgBox.SetText(txt)
self._Screen._MsgBox.Draw()
self._Screen.SwapAndShow()
def PairReplyCb(self):
self.ClearCanvas()
self._Screen.Draw()
self._Screen.SwapAndShow()
self._Screen._MsgBox.SetText("Device paired")
self._Screen._MsgBox.Draw()
self._Screen.SwapAndShow()
pygame.time.delay(1500)
self.ReturnToUpLevelPage()
self._Screen.Draw()
self._Screen.SwapAndShow()
self._Screen._FootBar.ResetNavText()
def PairErrorCb(self,error=None):
self.ClearCanvas()
self._Screen.Draw()
self._Screen.SwapAndShow()
self._Screen._MsgBox.SetText(error)
self._Screen._MsgBox.Draw()
self._Screen.SwapAndShow()
pygame.time.delay(1500)
self.ReturnToUpLevelPage()
self._Screen.Draw()
self._Screen.SwapAndShow()
self._Screen._FootBar.ResetNavText()
def KeyDown(self,event):
if IsKeyMenuOrB(event.key):
if self._dev_obj != None:
try:
self._dev_obj.CancelPairing()
except Exception,e:
print(str(e))
self.ReturnToUpLevelPage()
self._Screen.Draw()
self._Screen.SwapAndShow()
def Draw(self):
pass
#self.ClearCanvas()
@@ -0,0 +1,128 @@
# -*- coding: utf-8 -*-
import pygame
## local UI import
from UI.page import Page
from UI.label import Label
from UI.icon_item import IconItem
from UI.multi_icon_item import MultiIconItem
from UI.icon_pool import MyIconPool
from UI.skin_manager import MySkinManager
class NetItemMultiIcon(MultiIconItem):
_CanvasHWND = None
_Parent = None
_Width = 18
_Height = 18
def Draw(self):
self._CanvasHWND.blit(self._ImgSurf,(self._PosX,self._PosY+(self._Parent._Height-self._Height)/2,self._Width,self._Height),
(0,self._IconIndex*self._IconHeight,self._IconWidth,self._IconHeight))
class NetItemIcon(IconItem):
_CanvasHWND = None
_Parent = None
_Width = 18
_Height = 18
def Draw(self):
self._CanvasHWND.blit(self._ImgSurf,(self._PosX,self._PosY+(self._Parent._Height-self._Height)/2,self._Width,self._Height))
class NetItem(object):
_PosX = 0
_PosY = 0
_Width = 0
_Height = 30
_Atts = {}
_Channel="" # '10'
_Stren = "" ## 19%
_Parent = None
_IsActive = False
_Icons = {} ## wifi strength and security icons
_Labels = {}
_FontObj = None
_RSSI = 0
_MacAddr=""
_Path = "" #/org/bluez/hci0/dev_34_88_5D_97_FF_26
def __init__(self):
self._Labels = {}
self._Icons = {}
def SetActive(self,act):
self._IsActive = act
def Init(self, path, object):
self._Path = path
self._Atts = object
is_active=False
if "Address" in object:
self._MacAddr = object["Address"]
if "Connected" in object:
if object["Connected"] == 1:
is_active=True
if is_active:
self.SetActive(is_active)
name_label = Label()
name_label._PosX = 12
name_label._CanvasHWND = self._Parent._CanvasHWND
mac_addr = self._MacAddr
if "Name" in object:
if len(object["Name"]) > 3:
mac_addr = object["Name"]
if "RSSI" in object:
print(object["RSSI"])
self._RSSI = int(object["RSSI"])
mac_addr = mac_addr[:34]
name_label.Init(mac_addr,self._FontObj)
self._Labels["mac_addr"] = name_label
done_icon = NetItemIcon()
done_icon._ImgSurf = MyIconPool.GiveIconSurface("done")
done_icon._CanvasHWND = self._Parent._CanvasHWND
done_icon._Parent = self
self._Icons["done"] = done_icon
## reuse the resource from TitleBar
#pp(theString)
def Connect(self,notworkentry=None):
""" Execute connection. """
#dev = dbus.Interface(bus.get_object("org.bluez", "/org/bluez/hci0/dev_"+"34_88_5D_97_FF_26"), "org.bluez.Device1")
proxy_obj = self._Parent._Dbus.get_object("org.bluez",self._Path)
dev = self._Parent._Dbus.Interface(proxy_obj, "org.bluez.Device1")
dev.Connect()
def Draw(self):
#pygame.draw.line(self._Parent._CanvasHWND,(169,169,169),(self._PosX,self._PosY),(self._PosX+self._Width,self._PosY),1)
for i in self._Labels:
self._Labels[i]._PosY = self._PosY + (self._Height - self._Labels[i]._Height)/2
self._Labels[i].Draw()
if self._IsActive:
self._Icons["done"].NewCoord(320-22,self._PosY)
self._Icons["done"].Draw()
pygame.draw.line(self._Parent._CanvasHWND,MySkinManager.GiveColor('Line'),
(self._PosX,self._PosY+self._Height-1),(self._PosX+self._Width,self._PosY+self._Height-1),1)
@@ -10,9 +10,8 @@ from UI.constants import Width,Height,ICON_TYPES
from UI.page import Page,PageSelector
from UI.label import Label
from UI.icon_item import IconItem
from UI.fonts import fonts
from UI.util_funcs import midRect
from UI.keys_def import CurKeys
from UI.keys_def import CurKeys, IsKeyMenuOrB
from UI.slider import Slider
from UI.icon_pool import MyIconPool
from UI.multi_icon_item import MultiIconItem
@@ -40,7 +39,7 @@ class BSlider(Slider):
self._Height = self._Parent._Height
bgpng = IconItem()
bgpng._ImgSurf = MyIconPool._Icons["light"]
bgpng._ImgSurf = MyIconPool.GiveIconSurface("light")
bgpng._MyType = ICON_TYPES["STAT"]
bgpng._Parent = self
bgpng.Adjust(0,0,self._BGwidth,self._BGheight,0)
@@ -50,7 +49,7 @@ class BSlider(Slider):
scale = MultiIconItem()
scale._MyType = ICON_TYPES["STAT"]
scale._Parent = self
scale._ImgSurf = MyIconPool._Icons["scale"]
scale._ImgSurf = MyIconPool.GiveIconSurface("scale")
scale._IconWidth = 82
scale._IconHeight = 63
scale.Adjust(0,0,82,63,0)
@@ -161,7 +160,7 @@ class BrightnessPage(Page):
def KeyDown(self,event):
if event.key == CurKeys["Menu"] or event.key == CurKeys["A"]:
if IsKeyMenuOrB(event.key):
self.ReturnToUpLevelPage()
self._Screen.Draw()
self._Screen.SwapAndShow()
@@ -1,4 +1,4 @@
# -*- coding: utf-8 -*-
# -*- coding: utf-8 -*-
import pygame
import commands
@@ -9,9 +9,8 @@ from libs.roundrects import aa_round_rect
from UI.constants import Width,Height,ICON_TYPES
from UI.page import Page,PageSelector
from UI.label import Label
from UI.fonts import fonts
from UI.util_funcs import midRect
from UI.keys_def import CurKeys
from UI.keys_def import CurKeys, GetButtonsLayoutMode, SetButtonsLayoutMode, IsKeyStartOrA, IsKeyMenuOrB
from UI.scroller import ListScroller
from UI.icon_pool import MyIconPool
from UI.icon_item import IconItem
@@ -23,15 +22,15 @@ class UpdateConfirmPage(ConfirmPage):
_ConfirmText = "Apply to RetroArch?"
_RetroArchConf = "/home/cpi/.config/retroarch/retroarch.cfg"
_LayoutMode = "Unknown"
def ModifyRetroArchConf(self,keys):
try:
with open(self._RetroArchConf, mode="r") as f:
confarr = f.readlines()
except:
return "retroarch.cfg cannot open."
bka = bkb = bkx = bky = False
try:
for i, ln in enumerate(confarr):
@@ -50,35 +49,35 @@ class UpdateConfirmPage(ConfirmPage):
bky = True
except:
return "retroarch.cfg cannot parse."
if bka and bkb and bkx and bky:
None
else:
return "retroarch.cfg validation error."
try:
with open(self._RetroArchConf, mode="w") as f:
confarr = f.writelines(confarr)
except:
return "retroarch.cfg cannot write."
return "Completed! Your RA keymap: " + self._LayoutMode.upper()
def KeyDown(self,event):
def finalizeWithDialog(msg):
self._Screen._MsgBox.SetText(msg)
self._Screen._MsgBox.Draw()
self._Screen.SwapAndShow()
return
if event.key == CurKeys["Menu"] or event.key == CurKeys["A"]:
if IsKeyMenuOrB(event.key):
self.ReturnToUpLevelPage()
self._Screen.Draw()
self._Screen.SwapAndShow()
if event.key == CurKeys["B"]:
if IsKeyStartOrA(event.key):
if self._LayoutMode == "xbox":
keymap = ["j","k","u","i"]
elif self._LayoutMode == "snes":
@@ -87,17 +86,17 @@ class UpdateConfirmPage(ConfirmPage):
finalizeWithDialog("Internal error.")
return
print("mode: " + self._LayoutMode)
if not os.path.isfile(self._RetroArchConf):
finalizeWithDialog("retroarch.cfg was not found.")
return
try:
shutil.copyfile(self._RetroArchConf, self._RetroArchConf + ".blbak")
except:
finalizeWithDialog("Cannot create .blbak")
return
finalizeWithDialog(self.ModifyRetroArchConf(keymap))
return
@@ -105,24 +104,23 @@ class UpdateConfirmPage(ConfirmPage):
self.ReturnToUpLevelPage()
self._Screen.Draw()
self._Screen.SwapAndShow()
def Draw(self):
self.ClearCanvas()
self.DrawBG()
for i in self._MyList:
i.Draw()
self.Reset()
class ButtonsLayoutPage(Page):
_FootMsg = ["Nav.","UpdateRetroArch","","Back","Toggle"]
_FootMsg = ["Nav.","","UpdateRetroArch","Back","Toggle"]
_MyList = []
_ListFontObj = fonts["varela13"]
_AList = {}
_Scrolled = 0
_BGwidth = 320
_BGheight = 240-24-20
@@ -133,29 +131,29 @@ class ButtonsLayoutPage(Page):
_EasingDur = 30
_dialog_index = 0
def __init__(self):
Page.__init__(self)
self._Icons = {}
def GenList(self):
self._MyList = []
def Init(self):
if self._Screen != None:
if self._Screen._CanvasHWND != None and self._CanvasHWND == None:
self._HWND = self._Screen._CanvasHWND
self._CanvasHWND = pygame.Surface( (self._Screen._Width,self._BGheight) )
self._PosX = self._Index*self._Screen._Width
self._PosX = self._Index*self._Screen._Width
self._Width = self._Screen._Width ## equal to screen width
self._Height = self._Screen._Height
DialogBoxs = MultiIconItem()
DialogBoxs._ImgSurf = MyIconPool._Icons["buttonslayout"]
DialogBoxs._ImgSurf = MyIconPool.GiveIconSurface("buttonslayout")
DialogBoxs._MyType = ICON_TYPES["STAT"]
DialogBoxs._Parent = self
DialogBoxs._IconWidth = 300
@@ -172,7 +170,7 @@ class ButtonsLayoutPage(Page):
self._Scroller.SetCanvasHWND(self._HWND)
self._ConfirmPage = UpdateConfirmPage()
self._ConfirmPage._LayoutMode = self.GetButtonsLayoutMode()
self._ConfirmPage._LayoutMode = GetButtonsLayoutMode()
self._ConfirmPage._Screen = self._Screen
self._ConfirmPage._Name = "Overwrite RA conf"
self._ConfirmPage._Parent = self
@@ -184,38 +182,23 @@ class ButtonsLayoutPage(Page):
if abs(self._Scrolled) < (self._BGheight - self._Height)/2 + 0:
self._PosY -= dis
self._Scrolled -= dis
def ScrollUp(self):
dis = 10
if self._PosY < 0:
self._PosY += dis
self._Scrolled += dis
def GetButtonsLayoutMode(self):
lm = "xbox"
try:
with open(".buttonslayout", "r") as f:
lm = f.read()
except:
None
if lm not in ["xbox","snes"]:
lm = "xbox"
return lm
def ToggleMode(self):
if self.GetButtonsLayoutMode() == "xbox":
with open(".buttonslayout", "w") as f:
f.write("snes")
if GetButtonsLayoutMode() == "xbox":
SetButtonsLayoutMode("snes")
self._dialog_index = 1
self._Screen.Draw()
self._Screen.SwapAndShow()
else:
with open(".buttonslayout", "w") as f:
f.write("xbox")
SetButtonsLayoutMode("xbox")
self._dialog_index = 0
self._Screen.Draw()
@@ -225,39 +208,36 @@ class ButtonsLayoutPage(Page):
self._Scrolled = 0
self._PosY = 0
self._DrawOnce = False
if self.GetButtonsLayoutMode() == "xbox":
self._dialog_index = 0
else:
self._dialog_index = 1
self._dialog_index = 0 if GetButtonsLayoutMode() == "xbox" else 1
def OnReturnBackCb(self):
self.ReturnToUpLevelPage()
self._Screen.Draw()
self._Screen.SwapAndShow()
def KeyDown(self,event):
if event.key == CurKeys["A"] or event.key == CurKeys["Menu"]:
if IsKeyMenuOrB(event.key):
self.ReturnToUpLevelPage()
self._Screen.Draw()
self._Screen.SwapAndShow()
if event.key == CurKeys["B"]:
if IsKeyStartOrA(event.key):
self.ToggleMode()
if event.key == CurKeys["X"]:
self._ConfirmPage._LayoutMode = self.GetButtonsLayoutMode()
self._ConfirmPage._LayoutMode = GetButtonsLayoutMode()
self._Screen.PushPage(self._ConfirmPage)
self._Screen.Draw()
self._Screen.SwapAndShow()
def Draw(self):
self.ClearCanvas()
self._Icons["DialogBoxs"].NewCoord(0,30)
self._Icons["DialogBoxs"].NewCoord(0,30)
self._Icons["DialogBoxs"]._IconIndex = self._dialog_index
self._Icons["DialogBoxs"].DrawTopLeft()
if self._HWND != None:
self._HWND.fill((255,255,255))
self._HWND.blit(self._CanvasHWND,(self._PosX,self._PosY,self._Width, self._Height ) )
@@ -272,7 +252,7 @@ class APIOBJ(object):
self._Page._Screen = main_screen
self._Page._Name ="Buttons Layout"
self._Page.Init()
def API(self,main_screen):
if main_screen !=None:
main_screen.PushPage(self._Page)
@@ -280,8 +260,8 @@ class APIOBJ(object):
main_screen.SwapAndShow()
OBJ = APIOBJ()
def Init(main_screen):
def Init(main_screen):
OBJ.Init(main_screen)
def API(main_screen):
OBJ.API(main_screen)
@@ -0,0 +1,252 @@
# -*- coding: utf-8 -*-
import os
import platform
import pygame
import glob
#import math
import commands
#from beeprint import pp
from libs.roundrects import aa_round_rect
#import gobject
#from wicd import misc
## local UI import
from UI.constants import Width,Height,ICON_TYPES
from UI.page import Page,PageSelector
from UI.label import Label
from UI.util_funcs import midRect,FileExists,IsExecutable,ArmSystem,CmdClean
from UI.keys_def import CurKeys, IsKeyStartOrA, IsKeyMenuOrB
from UI.scroller import ListScroller
from UI.icon_pool import MyIconPool
from UI.icon_item import IconItem
from UI.confirm_page import ConfirmPage
from UI.multi_icon_item import MultiIconItem
from UI.lang_manager import MyLangManager
from UI.multilabel import MultiLabel
from UI.info_page_list_item import InfoPageListItem
from UI.info_page_selector import InfoPageSelector
from UI.skin_manager import MySkinManager
class DeleteCoreConfirmPage(ConfirmPage):
_ConfirmText = MyLangManager.Tr("Awaiting Input")
_FootMsg = ["Nav","","","Cancel","OK"]
CallbackA = None
def KeyDown(self,event):
if IsKeyMenuOrB(event.key):
self.ReturnToUpLevelPage()
self._Screen.Draw()
self._Screen.SwapAndShow()
if IsKeyStartOrA(event.key):
self._Screen._MsgBox.SetText("Applying")
self._Screen._MsgBox.Draw()
self._Screen.SwapAndShow()
pygame.time.delay(638)
self.CallbackA()
self.ReturnToUpLevelPage()
self._Screen.Draw()
self._Screen.SwapAndShow()
class CoresPage(Page):
_FootMsg = ["Nav","Del","Scan","Back",""]
_MyList = []
_ListFontObj = MyLangManager.TrFont("varela13")
_AList = {}
_Scrolled = 0
_BGwidth = 320
_BGheight = 240-24-20
_DrawOnce = False
_Scroller = None
_EasingDur = 30
_CORES_PATH = "%s/apps/emulators" % os.path.expanduser('~')
_Config =None
_AllowedExts = [".so",".bin"]
_HiddenSos = ["chailove_libretro.so","nxengine_libretro.so"]
def __init__(self):
Page.__init__(self)
self._Icons = {}
if "arm" in platform.machine():
pass
def GenList(self):
self._MyList = []
## map ini to self._AList
files_path = glob.glob(self._CORES_PATH+"/*")
start_x = 10
start_y = 0
counter = 0
for i,v in enumerate( files_path):
if os.path.basename(v) in self._HiddenSos:
continue
filename, file_extension = os.path.splitext(v)
alias_file = filename+file_extension + ".alias"
if file_extension in self._AllowedExts:
li = InfoPageListItem()
li._Parent = self
li._PosX = start_x
li._PosY = start_y + counter*InfoPageListItem._Height
li._Width = Width-10
li._Fonts["normal"] = self._ListFontObj
li._Fonts["small"] = MySkinManager.GiveFont("varela12")
li._ReadOnly = True
if os.path.isfile(alias_file):
fp = open(alias_file, "r")
alias = fp.read()
alias = alias.strip()
label_text = alias.decode("utf8")
li.Init( label_text )
fp.close()
else:
li.Init( os.path.basename(v) )
li._Flag = v
##li.SetSmallText( v )
self._MyList.append(li)
counter += 1
def Init(self):
if self._Screen != None:
if self._Screen._CanvasHWND != None and self._CanvasHWND == None:
self._CanvasHWND = self._Screen._CanvasHWND
self._PosX = self._Index*self._Screen._Width
self._Width = self._Screen._Width ## equal to screen width
self._Height = self._Screen._Height
ps = InfoPageSelector()
ps._PosX = 11
ps._Parent = self
ps._Width = self._Width-10
self._Ps = ps
self._PsIndex = 0
self._Scroller = ListScroller()
self._Scroller._Parent = self
self._Scroller._PosX = 2
self._Scroller._PosY = 2
self._Scroller.Init()
self._ConfirmBox = DeleteCoreConfirmPage()
self._ConfirmBox._Screen = self._Screen
self._ConfirmBox._Name = "Confirm to Delete?"
self._ConfirmBox._Parent = self
self._ConfirmBox.Init()
def ReScan(self):
self.GenList()
self.RefreshPsIndex()
def ConfirmBoxCallbackA(self):
if len(self._MyList) == 0:
return
cur_li = self._MyList[self._PsIndex]
os.system("rm %s" % CmdClean(cur_li._Flag))
self.GenList()
self.RefreshPsIndex()
def OnLoadCb(self):
self._Scrolled = 0
self._PosY = 0
self._DrawOnce = False
self.GenList()
def OnReturnBackCb(self):
pass
def KeyDown(self,event):
if IsKeyMenuOrB(event.key):
self.ReturnToUpLevelPage()
self._Screen.Draw()
self._Screen.SwapAndShow()
if event.key == CurKeys["X"]: #Scan current
self.ReScan()
self._Screen.Draw()
self._Screen.SwapAndShow()
if event.key == CurKeys["Y"]: #del
if len(self._MyList) == 0:
return
self._ConfirmBox.CallbackA = self.ConfirmBoxCallbackA
self._Screen.PushPage(self._ConfirmBox)
self._Screen.Draw()
self._Screen.SwapAndShow()
if event.key == CurKeys["Up"]:
self.ScrollUp()
self._Screen.Draw()
self._Screen.SwapAndShow()
if event.key == CurKeys["Down"]:
self.ScrollDown()
self._Screen.Draw()
self._Screen.SwapAndShow()
def Draw(self):
self.ClearCanvas()
if len(self._MyList) > 0:
self._Ps.Draw()
for i in self._MyList:
i.Draw()
self._Scroller.UpdateSize( len(self._MyList)*InfoPageListItem._Height,
self._PsIndex*InfoPageListItem._Height)
self._Scroller.Draw()
class APIOBJ(object):
_Page = None
def __init__(self):
pass
def Init(self,main_screen):
self._Page = CoresPage()
self._Page._Screen = main_screen
self._Page._Name ="Retroarch cores manager"
self._Page.Init()
def API(self,main_screen):
if main_screen !=None:
main_screen.PushPage(self._Page)
main_screen.Draw()
main_screen.SwapAndShow()
OBJ = APIOBJ()
def Init(main_screen):
OBJ.Init(main_screen)
def API(main_screen):
OBJ.API(main_screen)
@@ -0,0 +1,349 @@
# -*- coding: utf-8 -*-
import os
import pygame
import platform
import commands
#import glob
#from beeprint import pp
from libs.roundrects import aa_round_rect
## local UI import
from UI.constants import Width,Height,ICON_TYPES,RESTARTUI
from UI.page import Page,PageSelector
from UI.label import Label
from UI.util_funcs import midRect,FileExists
from UI.keys_def import CurKeys, IsKeyStartOrA, IsKeyMenuOrB
from UI.scroller import ListScroller
from UI.icon_pool import MyIconPool
from UI.icon_item import IconItem
from UI.multilabel import MultiLabel
from UI.skin_manager import MySkinManager
from UI.lang_manager import MyLangManager
from UI.info_page_list_item import InfoPageListItem
from UI.info_page_selector import InfoPageSelector
from libs.DBUS import is_wifi_connected_now
import config
class ListPageSelector(InfoPageSelector):
def Draw(self):
idx = self._Parent._PsIndex
if idx < len(self._Parent._MyList):
x = self._Parent._MyList[idx]._PosX+2 ## ++
y = self._Parent._MyList[idx]._PosY+1
h = self._Parent._MyList[idx]._Height -3
self._PosX = x
self._PosY = y
self._Height = h
aa_round_rect(self._Parent._CanvasHWND,
(x,y,self._Width-4,h),self._BackgroundColor,4,0,self._BackgroundColor)
class PageListItem(InfoPageListItem):
_PosX = 0
_PosY = 0
_Width = 0
_Height = 30
_Labels = {}
_Icons = {}
_Fonts = {}
_LinkObj = None
_Active = False
_Value = ""
def Draw(self):
self._Labels["Text"]._PosY = self._PosY+ (self._Height- self._Labels["Text"]._Height)/2
if self._Active == True:
self._Parent._Icons["done"].NewCoord( self._Parent._Width-30,self._PosY+5)
self._Parent._Icons["done"].Draw()
self._Labels["Text"].Draw(self._Active)
if "Small" in self._Labels:
self._Labels["Small"]._PosX = self._Width - self._Labels["Small"]._Width -10
self._Labels["Small"]._PosY = self._PosY + (self._Height- self._Labels["Small"]._Height)/2
self._Labels["Small"].Draw()
pygame.draw.line(self._Parent._CanvasHWND,MySkinManager.GiveColor('Line'),(self._PosX,self._PosY+self._Height-1),(self._PosX+self._Width,self._PosY+self._Height-1),1)
class GateWayPage(Page):
_FootMsg = ["Nav","Clear All","","Back","Select"]
_MyList = []
_ListFont = MyLangManager.TrFont("notosanscjk15")
_AList = {}
_Scrolled = 0
_BGwidth = 320
_BGheight = 240-24-20
_DrawOnce = False
_Scroller = None
_InfoPage = None
def __init__(self):
Page.__init__(self)
self._Icons = {}
def GenList(self):
self._MyList = []
start_x = 0
start_y = 0
last_height = 0
drivers = [["usb0","USB Ethernet"],
["wlan0","Wi-Fi"]]
for i,u in enumerate( drivers ):
#print(i,u)
li = PageListItem()
li._Parent = self
li._PosX = start_x
li._PosY = start_y + last_height
li._Width = Width
li._Fonts["normal"] = self._ListFont
li._Active = False
li._Value = u[0]
li.Init( u[1] )
last_height += li._Height
self._MyList.append(li)
def Init(self):
if self._Screen != None:
if self._Screen._CanvasHWND != None and self._CanvasHWND == None:
self._HWND = self._Screen._CanvasHWND
self._CanvasHWND = pygame.Surface( (self._Screen._Width,self._BGheight) )
self._PosX = self._Index*self._Screen._Width
self._Width = self._Screen._Width ## equal to screen width
self._Height = self._Screen._Height
done = IconItem()
done._ImgSurf = MyIconPool.GiveIconSurface("done")
done._MyType = ICON_TYPES["STAT"]
done._Parent = self
self._Icons["done"] = done
ps = ListPageSelector()
ps._Parent = self
self._Ps = ps
self._PsIndex = 0
self.GenList()
self._Scroller = ListScroller()
self._Scroller._Parent = self
self._Scroller._PosX = self._Width - 10
self._Scroller._PosY = 2
self._Scroller.Init()
self._Scroller.SetCanvasHWND(self._HWND)
def Click(self):
if len(self._MyList) == 0:
return
cur_li = self._MyList[self._PsIndex]
if cur_li._Active == True:
out = commands.getstatusoutput("sudo ip route | grep default | cut -d \" \" -f3")
if len(out[1]) > 7:
self._Screen._MsgBox.SetText(out[1])
self._Screen._MsgBox.Draw()
self._Screen.SwapAndShow()
return
print(cur_li._Value)
if "arm" in platform.machine():
for i in self._MyList:
i._Active = False
self._Screen._MsgBox.SetText("Applying")
self._Screen._MsgBox.Draw()
self._Screen.SwapAndShow()
cur_li._Active = self.ApplyGateWay(cur_li._Value)
pygame.time.delay(1000)
self._Screen.Draw()
self._Screen.SwapAndShow()
else:
self._Screen._MsgBox.SetText("Do it in GameShell")
self._Screen._MsgBox.Draw()
self._Screen.SwapAndShow()
def ClearAllGateways(self):
self._Screen._MsgBox.SetText("Cleaning up")
self._Screen._MsgBox.Draw()
self._Screen.SwapAndShow()
os.system("sudo ip route del 0/0")
pygame.time.delay(800)
for i in self._MyList:
i._Active = False
self._Screen.Draw()
self._Screen.SwapAndShow()
def ApplyGateWay(self,gateway):
os.system("sudo ip route del 0/0")
if gateway== "usb0":
out = commands.getstatusoutput("sudo ifconfig usb0 | grep inet | tr -s \" \"| cut -d \" \" -f3")
if len(out[1]) > 7:
if "error" not in out[1]:
parts = out[1].split(".")
if len(parts) == 4:##IPv4
tp3 = int(parts[3])
tmp = tp3
if tp3 == 0:
tmp = int(parts[3]) + 1
elif tp3 == 1:
tmp = int(parts[3]) + 1
elif tp3 > 1:
tmp = int(parts[3]) - 1
parts[3] = str(tmp)
ipaddress = ".".join(parts)
os.system("sudo route add default gw "+ipaddress)
return True
else:
if is_wifi_connected_now():
os.system("sudo dhclient wlan0")
return True
else:
self._Screen._MsgBox.SetText("Wi-Fi is not connected")
self._Screen._MsgBox.Draw()
self._Screen.SwapAndShow()
return False
return False
def OnLoadCb(self):
self._Scrolled = 0
self._PosY = 0
self._DrawOnce = False
## grep Driver /etc/xorg.conf | tr -s " " | cut -d " " -f3
## "fbturbo"
## "modesetting"
thedrv = ""
if "arm" in platform.machine():
out = commands.getstatusoutput("sudo ip route | grep default")
if len(out[1]) > 7:
if "usb0" in out[1]:
thedrv = "usb0"
elif "wlan0" in out[1]:
thedrv = "wlan0"
for i in self._MyList:
i._Active = False
if thedrv != "":
for i in self._MyList:
if thedrv in i._Value:
i._Active = True
## if usb0 and wlan0 all actived, clear all
def OnReturnBackCb(self):
pass
"""
self.ReturnToUpLevelPage()
self._Screen.Draw()
self._Screen.SwapAndShow()
"""
def KeyDown(self,event):
if IsKeyMenuOrB(event.key):
self.ReturnToUpLevelPage()
self._Screen.Draw()
self._Screen.SwapAndShow()
if IsKeyStartOrA(event.key):
self.Click()
if event.key == CurKeys["Y"]:
self.ClearAllGateways()
if event.key == CurKeys["Up"]:
self.ScrollUp()
self._Screen.Draw()
self._Screen.SwapAndShow()
if event.key == CurKeys["Down"]:
self.ScrollDown()
self._Screen.Draw()
self._Screen.SwapAndShow()
def Draw(self):
self.ClearCanvas()
if len(self._MyList) == 0:
return
else:
if len(self._MyList) * PageListItem._Height > self._Height:
self._Ps._Width = self._Width - 11
self._Ps.Draw()
for i in self._MyList:
if i._PosY > self._Height + self._Height/2:
break
if i._PosY < 0:
continue
i.Draw()
self._Scroller.UpdateSize( len(self._MyList)*PageListItem._Height, self._PsIndex*PageListItem._Height)
self._Scroller.Draw()
else:
self._Ps._Width = self._Width
self._Ps.Draw()
for i in self._MyList:
if i._PosY > self._Height + self._Height/2:
break
if i._PosY < 0:
continue
i.Draw()
if self._HWND != None:
self._HWND.fill(MySkinManager.GiveColor("White"))
self._HWND.blit(self._CanvasHWND,(self._PosX,self._PosY,self._Width, self._Height ) )
class APIOBJ(object):
_Page = None
def __init__(self):
pass
def Init(self,main_screen):
self._Page = GateWayPage()
self._Page._Screen = main_screen
self._Page._Name ="Gateway switch"
self._Page.Init()
def API(self,main_screen):
if main_screen !=None:
main_screen.PushPage(self._Page)
main_screen.Draw()
main_screen.SwapAndShow()
OBJ = APIOBJ()
def Init(main_screen):
OBJ.Init(main_screen)
def API(main_screen):
OBJ.API(main_screen)
@@ -0,0 +1,309 @@
# -*- coding: utf-8 -*-
import os
import pygame
#import math
#mport subprocess
import glob
#from beeprint import pp
from libs.roundrects import aa_round_rect
## local UI import
from UI.constants import Width,Height,ICON_TYPES,RESTARTUI
from UI.page import Page,PageSelector
from UI.label import Label
from UI.util_funcs import midRect
from UI.keys_def import CurKeys, IsKeyStartOrA, IsKeyMenuOrB
from UI.scroller import ListScroller
from UI.icon_pool import MyIconPool
from UI.icon_item import IconItem
from UI.multilabel import MultiLabel
from UI.skin_manager import MySkinManager
from UI.lang_manager import MyLangManager
from UI.info_page_list_item import InfoPageListItem
from UI.info_page_selector import InfoPageSelector
import config
class ListPageSelector(InfoPageSelector):
def Draw(self):
idx = self._Parent._PsIndex
if idx < len(self._Parent._MyList):
x = self._Parent._MyList[idx]._PosX+2 ## ++
y = self._Parent._MyList[idx]._PosY+1
h = self._Parent._MyList[idx]._Height -3
self._PosX = x
self._PosY = y
self._Height = h
aa_round_rect(self._Parent._CanvasHWND,
(x,y,self._Width-4,h),self._BackgroundColor,4,0,self._BackgroundColor)
class PageListItem(InfoPageListItem):
_PosX = 0
_PosY = 0
_Width = 0
_Height = 30
_Labels = {}
_Icons = {}
_Fonts = {}
_LinkObj = None
_Active = False
_Value = ""
def Draw(self):
self._Labels["Text"]._PosY = self._PosY+ (self._Height- self._Labels["Text"]._Height)/2
if self._Active == True:
self._Parent._Icons["done"].NewCoord( self._Parent._Width-30,self._PosY+5)
self._Parent._Icons["done"].Draw()
self._Labels["Text"].Draw(self._Active)
if "Small" in self._Labels:
self._Labels["Small"]._PosX = self._Width - self._Labels["Small"]._Width -10
self._Labels["Small"]._PosY = self._PosY + (self._Height- self._Labels["Small"]._Height)/2
self._Labels["Small"].Draw()
pygame.draw.line(self._Parent._CanvasHWND,MySkinManager.GiveColor('Line'),(self._PosX,self._PosY+self._Height-1),(self._PosX+self._Width,self._PosY+self._Height-1),1)
class LanguagesPage(Page):
_FootMsg = ["Nav","","","Back","Select"]
_MyList = []
_ListFont = MyLangManager.TrFont("notosanscjk15")
_AList = {}
_Scrolled = 0
_BGwidth = 320
_BGheight = 240-24-20
_DrawOnce = False
_Scroller = None
_InfoPage = None
def __init__(self):
Page.__init__(self)
self._Icons = {}
def GenList(self):
self._MyList = []
start_x = 0
start_y = 0
last_height = 0
files_path = [os.path.basename(x) for x in sorted(glob.glob('langs/*.ini'))]
for i,u in enumerate( files_path ):
#print(i,u)
li = PageListItem()
li._Parent = self
li._PosX = start_x
li._PosY = start_y + last_height
li._Width = Width
li._Fonts["normal"] = self._ListFont
li._Active = False
li._Value = u.decode("utf8")
lang_name = u.split("_")[1]
lang_name = lang_name.split(".")[0]
li.Init( lang_name.decode("utf8") )
last_height += li._Height
self._MyList.append(li)
def Init(self):
if self._Screen != None:
if self._Screen._CanvasHWND != None and self._CanvasHWND == None:
self._HWND = self._Screen._CanvasHWND
self._CanvasHWND = pygame.Surface( (self._Screen._Width,self._BGheight) )
self._PosX = self._Index*self._Screen._Width
self._Width = self._Screen._Width ## equal to screen width
self._Height = self._Screen._Height
done = IconItem()
done._ImgSurf = MyIconPool.GiveIconSurface("done")
done._MyType = ICON_TYPES["STAT"]
done._Parent = self
self._Icons["done"] = done
ps = ListPageSelector()
ps._Parent = self
self._Ps = ps
self._PsIndex = 0
self.GenList()
self._Scroller = ListScroller()
self._Scroller._Parent = self
self._Scroller._PosX = self._Width - 10
self._Scroller._PosY = 2
self._Scroller.Init()
self._Scroller.SetCanvasHWND(self._HWND)
def ScrollDown(self):
if len(self._MyList) == 0:
return
self._PsIndex +=1
if self._PsIndex >= len(self._MyList):
self._PsIndex = len(self._MyList) -1
cur_li = self._MyList[self._PsIndex]
if cur_li._PosY +cur_li._Height > self._Height:
for i in range(0,len(self._MyList)):
self._MyList[i]._PosY -= self._MyList[i]._Height
def ScrollUp(self):
if len(self._MyList) == 0:
return
self._PsIndex -= 1
if self._PsIndex < 0:
self._PsIndex = 0
cur_li = self._MyList[self._PsIndex]
if cur_li._PosY < 0:
for i in range(0, len(self._MyList)):
self._MyList[i]._PosY += self._MyList[i]._Height
def Click(self):
if len(self._MyList) == 0:
return
cur_li = self._MyList[self._PsIndex]
if cur_li._Active == True:
return
for i in self._MyList:
i._Active = False
cur_li._Active = True
print(cur_li._Value)
with open(".lang","w") as f:
f.write(cur_li._Value)
self._Screen._MsgBox.SetText("Applying")
self._Screen._MsgBox.Draw()
self._Screen.SwapAndShow()
MyLangManager.UpdateLang()
pygame.event.post( pygame.event.Event(RESTARTUI, message="")) ##Restart Launcher
pygame.time.delay(1000)
self._Screen.Draw()
self._Screen.SwapAndShow()
def OnLoadCb(self):
self._Scrolled = 0
self._PosY = 0
self._DrawOnce = False
with open(".lang", "r") as f:
thelang = f.read()
thelang = thelang.strip()
if thelang == "":
thelang = "English"
for i in self._MyList:
if thelang in i._Value:
i._Active = True
def OnReturnBackCb(self):
pass
"""
self.ReturnToUpLevelPage()
self._Screen.Draw()
self._Screen.SwapAndShow()
"""
def KeyDown(self,event):
if IsKeyMenuOrB(event.key):
self.ReturnToUpLevelPage()
self._Screen.Draw()
self._Screen.SwapAndShow()
if IsKeyStartOrA(event.key):
self.Click()
if event.key == CurKeys["Up"]:
self.ScrollUp()
self._Screen.Draw()
self._Screen.SwapAndShow()
if event.key == CurKeys["Down"]:
self.ScrollDown()
self._Screen.Draw()
self._Screen.SwapAndShow()
def Draw(self):
self.ClearCanvas()
if len(self._MyList) == 0:
return
else:
if len(self._MyList) * PageListItem._Height > self._Height:
self._Ps._Width = self._Width - 11
self._Ps.Draw()
for i in self._MyList:
if i._PosY > self._Height + self._Height/2:
break
if i._PosY < 0:
continue
i.Draw()
self._Scroller.UpdateSize( len(self._MyList)*PageListItem._Height, self._PsIndex*PageListItem._Height)
self._Scroller.Draw()
else:
self._Ps._Width = self._Width
self._Ps.Draw()
for i in self._MyList:
if i._PosY > self._Height + self._Height/2:
break
if i._PosY < 0:
continue
i.Draw()
if self._HWND != None:
self._HWND.fill(MySkinManager.GiveColor("White"))
self._HWND.blit(self._CanvasHWND,(self._PosX,self._PosY,self._Width, self._Height ) )
class APIOBJ(object):
_Page = None
def __init__(self):
pass
def Init(self,main_screen):
self._Page = LanguagesPage()
self._Page._Screen = main_screen
self._Page._Name ="Languages"
self._Page.Init()
def API(self,main_screen):
if main_screen !=None:
main_screen.PushPage(self._Page)
main_screen.Draw()
main_screen.SwapAndShow()
OBJ = APIOBJ()
def Init(main_screen):
OBJ.Init(main_screen)
def API(main_screen):
OBJ.API(main_screen)
@@ -0,0 +1,55 @@
# -*- coding: utf-8 -*-
import os
import pygame
#import math
#mport subprocess
#from beeprint import pp
from libs.roundrects import aa_round_rect
## local UI import
from UI.keys_def import CurKeys, IsKeyStartOrA, IsKeyMenuOrB
from UI.util_funcs import ArmSystem
from UI.lang_manager import MyLangManager
from UI.confirm_page import ConfirmPage
class SwitchToLauncherGoConfirmPage(ConfirmPage):
def KeyDown(self,event):
if IsKeyMenuOrB(event.key):
self.ReturnToUpLevelPage()
self._Screen.Draw()
self._Screen.SwapAndShow()
if IsKeyStartOrA(event.key):
self._Screen._MsgBox.SetText("Rebooting to LauncherGo")
self._Screen._MsgBox.Draw()
self._Screen.SwapAndShow()
pygame.time.delay(300)
ArmSystem("sed -i s/launcher/launchergo/g ~/.bashrc" )
ArmSystem("sudo reboot")
class APIOBJ(object):
_Page = None
def __init__(self):
pass
def Init(self,main_screen):
self._Page = SwitchToLauncherGoConfirmPage()
self._Page._Screen = main_screen
self._Page._Name ="Switch To LauncherGo"
self._Page.Init()
def API(self,main_screen):
if main_screen !=None:
main_screen.PushPage(self._Page)
main_screen.Draw()
main_screen.SwapAndShow()
OBJ = APIOBJ()
def Init(main_screen):
OBJ.Init(main_screen)
def API(main_screen):
OBJ.API(main_screen)
+302
View File
@@ -0,0 +1,302 @@
# -*- coding: utf-8 -*-
import os
import pygame
import platform
#import commands
import glob
#from beeprint import pp
from libs.roundrects import aa_round_rect
## local UI import
from UI.constants import Width,Height,ICON_TYPES,RESTARTUI
from UI.page import Page,PageSelector
from UI.label import Label
from UI.util_funcs import midRect,FileExists,ArmSystem
from UI.keys_def import CurKeys, IsKeyStartOrA, IsKeyMenuOrB
from UI.scroller import ListScroller
from UI.icon_pool import MyIconPool
from UI.icon_item import IconItem
from UI.multilabel import MultiLabel
from UI.skin_manager import MySkinManager
from UI.lang_manager import MyLangManager
from UI.info_page_list_item import InfoPageListItem
from UI.info_page_selector import InfoPageSelector
import config
class ListPageSelector(InfoPageSelector):
def Draw(self):
idx = self._Parent._PsIndex
if idx < len(self._Parent._MyList):
x = self._Parent._MyList[idx]._PosX+2 ## ++
y = self._Parent._MyList[idx]._PosY+1
h = self._Parent._MyList[idx]._Height -3
self._PosX = x
self._PosY = y
self._Height = h
aa_round_rect(self._Parent._CanvasHWND,
(x,y,self._Width-4,h),self._BackgroundColor,4,0,self._BackgroundColor)
class PageListItem(InfoPageListItem):
_PosX = 0
_PosY = 0
_Width = 0
_Height = 30
_Labels = {}
_Icons = {}
_Fonts = {}
_LinkObj = None
_Active = False
_Value = ""
def Draw(self):
self._Labels["Text"]._PosY = self._PosY+ (self._Height- self._Labels["Text"]._Height)/2
if self._Active == True:
self._Parent._Icons["done"].NewCoord( self._Parent._Width-30,self._PosY+5)
self._Parent._Icons["done"].Draw()
self._Labels["Text"].Draw(self._Active)
if "Small" in self._Labels:
self._Labels["Small"]._PosX = self._Width - self._Labels["Small"]._Width -10
self._Labels["Small"]._PosY = self._PosY + (self._Height- self._Labels["Small"]._Height)/2
self._Labels["Small"].Draw()
pygame.draw.line(self._Parent._CanvasHWND,MySkinManager.GiveColor('Line'),(self._PosX,self._PosY+self._Height-1),(self._PosX+self._Width,self._PosY+self._Height-1),1)
class GPUDriverPage(Page):
_FootMsg = ["Nav","","","Back","Select"]
_MyList = []
_ListFont = MyLangManager.TrFont("notosanscjk12")
_AList = {}
_Scrolled = 0
_BGwidth = 320
_BGheight = 240-24-20
_DrawOnce = False
_Scroller = None
_InfoPage = None
def __init__(self):
Page.__init__(self)
self._Icons = {}
def GenList(self):
self._MyList = []
start_x = 0
start_y = 0
last_height = 0
drivers = [["fbturbo","FBTURBO driver (Software Rendering)"],
["modesetting","LIMA driver (Experimental GPU Rendering)"]]
for i,u in enumerate( drivers ):
#print(i,u)
li = PageListItem()
li._Parent = self
li._PosX = start_x
li._PosY = start_y + last_height
li._Width = Width
li._Fonts["normal"] = self._ListFont
li._Active = False
li._Value = u[0]
li.Init( u[1] )
last_height += li._Height
self._MyList.append(li)
def Init(self):
if self._Screen != None:
if self._Screen._CanvasHWND != None and self._CanvasHWND == None:
self._HWND = self._Screen._CanvasHWND
self._CanvasHWND = pygame.Surface( (self._Screen._Width,self._BGheight) )
self._PosX = self._Index*self._Screen._Width
self._Width = self._Screen._Width ## equal to screen width
self._Height = self._Screen._Height
done = IconItem()
done._ImgSurf = MyIconPool.GiveIconSurface("done")
done._MyType = ICON_TYPES["STAT"]
done._Parent = self
self._Icons["done"] = done
ps = ListPageSelector()
ps._Parent = self
self._Ps = ps
self._PsIndex = 0
self.GenList()
self._Scroller = ListScroller()
self._Scroller._Parent = self
self._Scroller._PosX = self._Width - 10
self._Scroller._PosY = 2
self._Scroller.Init()
self._Scroller.SetCanvasHWND(self._HWND)
def Click(self):
if self._PsIndex > len(self._MyList) -1:
return
cur_li = self._MyList[self._PsIndex]
if cur_li._Active == True:
return
print(cur_li._Value)
if "arm" in platform.machine():
for i in self._MyList:
i._Active = False
cur_li._Active = True
self._Screen._MsgBox.SetText("Applying")
self._Screen._MsgBox.Draw()
self._Screen.SwapAndShow()
if "modesetting" in cur_li._Value: ## enable lima
os.system("touch %s/.lima" % os.path.expanduser('~') )
ArmSystem("sudo mv /usr/lib/xorg/modules/drivers/modesetting_drv.so.lima /usr/lib/xorg/modules/drivers/modesetting_drv.so")
ArmSystem("sudo sed -i '/^#.*lima/s/^#//' /etc/ld.so.conf.d/00-arm-linux-gnueabihf.conf")
ArmSystem("sudo ldconfig")
else: #disable lima
os.system("rm %s/.lima" % os.path.expanduser('~') )
ArmSystem("sudo mv /usr/lib/xorg/modules/drivers/modesetting_drv.so /usr/lib/xorg/modules/drivers/modesetting_drv.so.lima")
ArmSystem("sudo sed -i 's/^[^#]*lima/#&/' /etc/ld.so.conf.d/00-arm-linux-gnueabihf.conf")
ArmSystem("sudo ldconfig")
pygame.time.delay(800)
os.system("sudo reboot")
else:
self._Screen._MsgBox.SetText("Do it in GameShell")
self._Screen._MsgBox.Draw()
self._Screen.SwapAndShow()
def OnLoadCb(self):
self._Scrolled = 0
self._PosY = 0
self._DrawOnce = False
## grep Driver /etc/xorg.conf | tr -s " " | cut -d " " -f3
## "fbturbo"
## "modesetting"
thedrv = ""
if "arm" in platform.machine():
if FileExists("%s/.lima" % os.path.expanduser('~')):
thedrv = "modesetting"
else:
thedrv = "fbturbo"
if thedrv == "":
thedrv = "fbturbo"
for i in self._MyList:
i._Active = False
for i in self._MyList:
if thedrv in i._Value:
i._Active = True
def OnReturnBackCb(self):
pass
"""
self.ReturnToUpLevelPage()
self._Screen.Draw()
self._Screen.SwapAndShow()
"""
def KeyDown(self,event):
if IsKeyMenuOrB(event.key):
self.ReturnToUpLevelPage()
self._Screen.Draw()
self._Screen.SwapAndShow()
if IsKeyStartOrA(event.key):
self.Click()
if event.key == CurKeys["Up"]:
self.ScrollUp()
self._Screen.Draw()
self._Screen.SwapAndShow()
if event.key == CurKeys["Down"]:
self.ScrollDown()
self._Screen.Draw()
self._Screen.SwapAndShow()
def Draw(self):
self.ClearCanvas()
if len(self._MyList) == 0:
return
else:
if len(self._MyList) * PageListItem._Height > self._Height:
self._Ps._Width = self._Width - 11
self._Ps.Draw()
for i in self._MyList:
if i._PosY > self._Height + self._Height/2:
break
if i._PosY < 0:
continue
i.Draw()
self._Scroller.UpdateSize( len(self._MyList)*PageListItem._Height, self._PsIndex*PageListItem._Height)
self._Scroller.Draw()
else:
self._Ps._Width = self._Width
self._Ps.Draw()
for i in self._MyList:
if i._PosY > self._Height + self._Height/2:
break
if i._PosY < 0:
continue
i.Draw()
if self._HWND != None:
self._HWND.fill(MySkinManager.GiveColor("White"))
self._HWND.blit(self._CanvasHWND,(self._PosX,self._PosY,self._Width, self._Height ) )
class APIOBJ(object):
_Page = None
def __init__(self):
pass
def Init(self,main_screen):
self._Page = GPUDriverPage()
self._Page._Screen = main_screen
self._Page._Name ="GPU Driver Switch"
self._Page.Init()
def API(self,main_screen):
if main_screen !=None:
main_screen.PushPage(self._Page)
main_screen.Draw()
main_screen.SwapAndShow()
OBJ = APIOBJ()
def Init(main_screen):
OBJ.Init(main_screen)
def API(main_screen):
OBJ.API(main_screen)
@@ -0,0 +1,264 @@
# -*- coding: utf-8 -*-
import os
import platform
import pygame
import glob
#import math
import commands
#from beeprint import pp
from libs.roundrects import aa_round_rect
#import gobject
#from wicd import misc
## local UI import
from UI.constants import Width,Height,ICON_TYPES
from UI.page import Page,PageSelector
from UI.label import Label
from UI.util_funcs import midRect,FileExists,IsExecutable
from UI.keys_def import CurKeys, IsKeyStartOrA, IsKeyMenuOrB
from UI.scroller import ListScroller
from UI.icon_pool import MyIconPool
from UI.icon_item import IconItem
from UI.multi_icon_item import MultiIconItem
from UI.lang_manager import MyLangManager
from UI.multilabel import MultiLabel
from UI.info_page_list_item import InfoPageListItem
from UI.info_page_selector import InfoPageSelector
from UI.skin_manager import MySkinManager
class NotifyJobListItem(InfoPageListItem):
_CanvasHWND = None
def Init(self,text):
#self._Fonts["normal"] = fonts["veramono12"]
self._CanvasHWND = self._Parent._CanvasHWND
l = Label()
l._PosX = 10
l.SetCanvasHWND(self._Parent._CanvasHWND)
l.Init(text,self._Fonts["normal"])
self._Labels["Text"] = l
done_icon = IconItem()
done_icon._ImgSurf = MyIconPool.GiveIconSurface("done")
done_icon._CanvasHWND = self._Parent._CanvasHWND
done_icon._Parent = self
self._Icons["done"] = done_icon
def Draw(self):
if self._ReadOnly == False:
self._Labels["Text"].SetColor(MySkinManager.GiveColor("ReadOnlyText"))
else:
self._Labels["Text"].SetColor(MySkinManager.GiveColor("Text"))
self._Labels["Text"]._PosX = self._Labels["Text"]._PosX + self._PosX
self._Labels["Text"]._PosY = self._PosY + (self._Height - self._Labels["Text"]._Height)/2
self._Labels["Text"].Draw()
self._Labels["Text"]._PosX = self._Labels["Text"]._PosX - self._PosX
if "Small" in self._Labels:
self._Labels["Small"]._PosX = self._Width - self._Labels["Small"]._Width-5
self._Labels["Small"]._PosY = self._PosY + (self._Height - self._Labels["Small"]._Height)/2
self._Labels["Small"].Draw()
if self._ReadOnly:
self._Icons["done"].NewCoord(self._Width - 25,5)
self._Icons["done"].Draw()
pygame.draw.line(self._Parent._CanvasHWND,MySkinManager.GiveColor('Line'),(self._PosX,self._PosY+self._Height-1),(self._PosX+self._Width,self._PosY+self._Height-1),1)
class NotificationPage(Page):
_FootMsg = ["Nav","","","Back","Toggle"]
_MyList = []
_ListFontObj = MyLangManager.TrFont("varela13")
_AList = {}
_Scrolled = 0
_BGwidth = 320
_BGheight = 240-24-20
_DrawOnce = False
_Scroller = None
_EasingDur = 30
_GSNOTIFY_JOBS = "gsnotify/Jobs"
_GSNOTIFY_SOCKET="/tmp/gsnotify.sock"
_Config =None
_AllowedExts = [".sh",".lsp",".lua",".bin",".py",".js"]
def __init__(self):
Page.__init__(self)
self._Icons = {}
if "arm" in platform.machine():
os.system( "git config --global core.filemode false" )
def GenList(self):
self._MyList = []
## map ini to self._AList
files_path = glob.glob(self._GSNOTIFY_JOBS+"/*")
start_x = 10
start_y = 0
counter = 0
for i,v in enumerate( files_path):
filename, file_extension = os.path.splitext(v)
alias_file = filename + ".alias"
if file_extension in self._AllowedExts:
li = NotifyJobListItem()
li._Parent = self
li._PosX = start_x
li._PosY = start_y + counter*InfoPageListItem._Height
li._Width = Width-10
li._Fonts["normal"] = self._ListFontObj
li._Fonts["small"] = MySkinManager.GiveFont("varela12")
if IsExecutable(v):
li._ReadOnly = True
if os.path.isfile(alias_file):
fp = open(alias_file, "r")
alias = fp.read()
alias = alias.strip()
label_text = alias.decode("utf8")
li.Init( label_text )
fp.close()
else:
li.Init( os.path.basename(v) )
li._Flag = v
##li.SetSmallText( v )
self._MyList.append(li)
counter += 1
def Init(self):
if self._Screen != None:
if self._Screen._CanvasHWND != None and self._CanvasHWND == None:
self._CanvasHWND = self._Screen._CanvasHWND
self._PosX = self._Index*self._Screen._Width
self._Width = self._Screen._Width ## equal to screen width
self._Height = self._Screen._Height
ps = InfoPageSelector()
ps._PosX = 11
ps._Parent = self
ps._Width = self._Width-10
self._Ps = ps
self._PsIndex = 0
self._Scroller = ListScroller()
self._Scroller._Parent = self
self._Scroller._PosX = 2
self._Scroller._PosY = 2
self._Scroller.Init()
def Click(self):
if len(self._MyList) == 0:
return
cur_li = self._MyList[self._PsIndex]
#print("Click ",cur_li._Flag)
if IsExecutable(cur_li._Flag):
os.system("chmod -x "+cur_li._Flag)
else:
os.system("chmod +x "+cur_li._Flag)
self.GenList()
def OnLoadCb(self):
self._Scrolled = 0
self._PosY = 0
self._DrawOnce = False
self.GenList()
def OnReturnBackCb(self):
self.ReturnToUpLevelPage()
self._Screen.Draw()
self._Screen.SwapAndShow()
def KeyDown(self,event):
if IsKeyMenuOrB(event.key):
self.ReturnToUpLevelPage()
self._Screen.Draw()
self._Screen.SwapAndShow()
if IsKeyStartOrA(event.key):
self._Screen._MsgBox.SetText("Applying")
self._Screen._MsgBox.Draw()
self._Screen.SwapAndShow()
pygame.time.delay(638)
self.Click()
self._Screen.Draw()
self._Screen.SwapAndShow()
if event.key == CurKeys["Up"]:
self.ScrollUp()
self._Screen.Draw()
self._Screen.SwapAndShow()
if event.key == CurKeys["Down"]:
self.ScrollDown()
self._Screen.Draw()
self._Screen.SwapAndShow()
def Draw(self):
self.ClearCanvas()
self._Ps.Draw()
if len(self._MyList) > 0:
for i in self._MyList:
i.Draw()
self._Scroller.UpdateSize( len(self._MyList)*InfoPageListItem._Height,
self._PsIndex*InfoPageListItem._Height)
self._Scroller.Draw()
class APIOBJ(object):
_Page = None
def __init__(self):
pass
def Init(self,main_screen):
self._Page = NotificationPage()
self._Page._Screen = main_screen
self._Page._Name ="Notify"
self._Page.Init()
def API(self,main_screen):
if main_screen !=None:
main_screen.PushPage(self._Page)
main_screen.Draw()
main_screen.SwapAndShow()
OBJ = APIOBJ()
def Init(main_screen):
OBJ.Init(main_screen)
def API(main_screen):
OBJ.API(main_screen)
@@ -4,16 +4,17 @@ import pygame
#UI lib
from UI.constants import RUNSYS
from UI.keys_def import CurKeys
from UI.keys_def import CurKeys, IsKeyStartOrA, IsKeyMenuOrB
from UI.confirm_page import ConfirmPage
from UI.lang_manager import MyLangManager
from UI.skin_manager import MySkinManager
import config
class PowerOffConfirmPage(ConfirmPage):
_ConfirmText = "Confirm Power OFF?"
_ConfirmText = MyLangManager.Tr("Confirm Power OFF?")
def CheckBattery(self):
try:
f = open(config.Battery)
@@ -41,17 +42,17 @@ class PowerOffConfirmPage(ConfirmPage):
def KeyDown(self,event):
if event.key == CurKeys["Menu"] or event.key == CurKeys["A"]:
if IsKeyMenuOrB(event.key):
self.ReturnToUpLevelPage()
self._Screen.Draw()
self._Screen.SwapAndShow()
if event.key == CurKeys["B"]:
if IsKeyStartOrA(event.key):
if self.CheckBattery() < 20:
cmdpath = "feh --bg-center gameshell/wallpaper/gameover.png;"
cmdpath = "feh --bg-center %s;" % MySkinManager.GiveWallpaper("gameover.png")
else:
cmdpath = "feh --bg-center gameshell/wallpaper/seeyou.png;"
cmdpath = "feh --bg-center %s;" % MySkinManager.GiveWallpaper("seeyou.png")
cmdpath += "sleep 3;"
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
import os
import pygame
#import math
#mport subprocess
@@ -12,18 +12,19 @@ from libs.roundrects import aa_round_rect
from UI.constants import Width,Height,ICON_TYPES,POWEROPT
from UI.page import Page,PageSelector
from UI.label import Label
from UI.fonts import fonts
from UI.util_funcs import midRect
from UI.keys_def import CurKeys
from UI.keys_def import CurKeys, IsKeyStartOrA, IsKeyMenuOrB
from UI.scroller import ListScroller
from UI.icon_pool import MyIconPool
from UI.icon_item import IconItem
from UI.multilabel import MultiLabel
from UI.skin_manager import MySkinManager
from UI.lang_manager import MyLangManager
import config
class ListPageSelector(PageSelector):
_BackgroundColor = pygame.Color(131,199,219)
_BackgroundColor = MySkinManager.GiveColor('Front')
def __init__(self):
self._PosX = 0
@@ -83,7 +84,7 @@ class PageListItem(object):
l = Label()
l._PosX = 10
l.SetCanvasHWND(self._Parent._CanvasHWND)
text = MyLangManager.Tr(text)
l.Init(text,self._Fonts["normal"])
self._Labels["Text"] = l
@@ -102,13 +103,13 @@ class PageListItem(object):
self._Labels["Small"]._PosY = self._PosY + (self._Height- self._Labels["Small"]._Height)/2
self._Labels["Small"].Draw()
pygame.draw.line(self._Parent._CanvasHWND,(169,169,169),(self._PosX,self._PosY+self._Height-1),(self._PosX+self._Width,self._PosY+self._Height-1),1)
pygame.draw.line(self._Parent._CanvasHWND,MySkinManager.GiveColor('Line'),(self._PosX,self._PosY+self._Height-1),(self._PosX+self._Width,self._PosY+self._Height-1),1)
class InfoPage(Page):
_FootMsg = ["Nav.","","","Back",""]
_FootMsg = ["Nav","","","Back",""]
_MyList = []
_ListFontObj = fonts["varela15"]
_ListFontObj = MyLangManager.TrFont("varela15")
_AList = {}
_Time1 = 40
@@ -122,22 +123,22 @@ class InfoPage(Page):
m = int(secs/60)
s = secs % 60
if m > 1:
min_str = "%d minutes " % m
min_str = ("%d "+MyLangManager.Tr("minutes")+" ") % m
else:
min_str = "%d minute " % m
min_str = ("%d "+MyLangManager.Tr("minute")+" ") % m
if s == 1:
sec_str = "%d second" % s
sec_str = ("%d "+MyLangManager.Tr("second")) % s
elif s > 1:
sec_str = "%d seconds" % s
sec_str = ("%d "+MyLangManager.Tr("seconds")) % s
elif secs > 0:
if secs > 1:
sec_str = "%d seconds" % secs
sec_str = ("%d "+MyLangManager.Tr("seconds")) % secs
else:
sec_str = "%d second" % secs
sec_str = ("%d "+MyLangManager.Tr("second")) % secs
elif secs == 0:
sec_str = "Never"
sec_str = MyLangManager.Tr("Never")
return min_str + sec_str
@@ -155,7 +156,7 @@ class InfoPage(Page):
time1 = {}
time1["key"] = "time1"
if self._Time1 == 0:
time1["value"] = "Never"
time1["value"] = MyLangManager.Tr("Never")
else:
time1["value"] = "%d secs" % self._Time1
time1["label"] = "Screen dimming"
@@ -163,7 +164,7 @@ class InfoPage(Page):
time2 = {}
time2["key"] = "time2"
if self._Time2 == 0:
time2["value"] = "Never"
time2["value"] = MyLangManager.Tr("Never")
else:
time2["value"] = "%d secs" % self._Time2
@@ -173,7 +174,7 @@ class InfoPage(Page):
time3["key"] = "time3"
if self._Time3 == 0:
time3["value"] = "Never"
time3["value"] = MyLangManager.Tr("Never")
else:
time3["value"] = "%d secs" % self._Time3
time3["label"] = "Power OFF"
@@ -188,17 +189,17 @@ class InfoPage(Page):
start_y = 0
for i,v in enumerate( self._AList):
print(v)
#print(v)
li = PageListItem()
li._Parent = self
li._PosX = start_x
li._PosY = start_y + i*PageListItem._Height
li._Width = Width
li._Fonts["normal"] = self._ListFontObj
li._Fonts["small"] = fonts["varela12"]
li._Fonts["small"] = MyLangManager.TrFont("varela12")
if self._AList[v]["label"] != "":
li.Init( self._AList[v]["label"] )
li.Init( self._AList[v]["label"] )
else:
li.Init( self._AList[v]["key"] )
@@ -266,7 +267,7 @@ class InfoPage(Page):
"""
def KeyDown(self,event):
if event.key == CurKeys["A"] or event.key == CurKeys["Menu"]:
if IsKeyMenuOrB(event.key):
self.ReturnToUpLevelPage()
self._Screen.Draw()
self._Screen.SwapAndShow()
@@ -288,9 +289,9 @@ class InfoPage(Page):
i.Draw()
class PowerOptionsPage(Page):
_FootMsg = ["Nav.","","Detail","Back","Select"]
_FootMsg = ["Nav","Detail","","Back","Select"]
_MyList = []
_ListFont = fonts["notosanscjk15"]
_ListFont = MyLangManager.TrFont("notosanscjk15")
_AList = {}
@@ -377,7 +378,7 @@ class PowerOptionsPage(Page):
self._Height = self._Screen._Height
done = IconItem()
done._ImgSurf = MyIconPool._Icons["done"]
done._ImgSurf = MyIconPool.GiveIconSurface("done")
done._MyType = ICON_TYPES["STAT"]
done._Parent = self
self._Icons["done"] = done
@@ -400,30 +401,6 @@ class PowerOptionsPage(Page):
self._InfoPage._Screen = self._Screen
self._InfoPage._Name = "Power option detail"
self._InfoPage.Init()
def ScrollDown(self):
if len(self._MyList) == 0:
return
self._PsIndex +=1
if self._PsIndex >= len(self._MyList):
self._PsIndex = len(self._MyList) -1
cur_li = self._MyList[self._PsIndex]
if cur_li._PosY +cur_li._Height > self._Height:
for i in range(0,len(self._MyList)):
self._MyList[i]._PosY -= self._MyList[i]._Height
def ScrollUp(self):
if len(self._MyList) == 0:
return
self._PsIndex -= 1
if self._PsIndex < 0:
self._PsIndex = 0
cur_li = self._MyList[self._PsIndex]
if cur_li._PosY < 0:
for i in range(0, len(self._MyList)):
self._MyList[i]._PosY += self._MyList[i]._Height
def Click(self):
if len(self._MyList) == 0:
@@ -443,7 +420,12 @@ class PowerOptionsPage(Page):
config.PowerLevel = cur_li._Value
self._Screen._MsgBox.SetText("Applying...")
if config.PowerLevel!= "supersaving":
os.system("sudo iw wlan0 set power_save off > /dev/null")
else:
os.system("sudo iw wlan0 set power_save on > /dev/null")
self._Screen._MsgBox.SetText("Applying")
self._Screen._MsgBox.Draw()
self._Screen.SwapAndShow()
@@ -478,12 +460,12 @@ class PowerOptionsPage(Page):
self._Screen.SwapAndShow()
"""
def KeyDown(self,event):
if event.key == CurKeys["A"] or event.key == CurKeys["Menu"]:
if IsKeyMenuOrB(event.key):
self.ReturnToUpLevelPage()
self._Screen.Draw()
self._Screen.SwapAndShow()
if event.key == CurKeys["B"]:
if IsKeyStartOrA(event.key):
self.Click()
if event.key == CurKeys["Up"]:
@@ -539,7 +521,7 @@ class PowerOptionsPage(Page):
i.Draw()
if self._HWND != None:
self._HWND.fill((255,255,255))
self._HWND.fill(MySkinManager.GiveColor("White"))
self._HWND.blit(self._CanvasHWND,(self._PosX,self._PosY,self._Width, self._Height ) )
@@ -0,0 +1,294 @@
# -*- coding: utf-8 -*-
import os
import pygame
#import commands
import glob
#from beeprint import pp
from libs.roundrects import aa_round_rect
## local UI import
from UI.constants import Width,Height,ICON_TYPES,RESTARTUI
from UI.page import Page,PageSelector
from UI.label import Label
from UI.util_funcs import midRect,FileExists
from UI.keys_def import CurKeys, IsKeyStartOrA, IsKeyMenuOrB
from UI.scroller import ListScroller
from UI.icon_pool import MyIconPool
from UI.icon_item import IconItem
from UI.multilabel import MultiLabel
from UI.skin_manager import MySkinManager
from UI.lang_manager import MyLangManager
from UI.info_page_list_item import InfoPageListItem
from UI.info_page_selector import InfoPageSelector
import config
class ListPageSelector(InfoPageSelector):
def Draw(self):
idx = self._Parent._PsIndex
if idx < len(self._Parent._MyList):
x = self._Parent._MyList[idx]._PosX+2 ## ++
y = self._Parent._MyList[idx]._PosY+1
h = self._Parent._MyList[idx]._Height -3
self._PosX = x
self._PosY = y
self._Height = h
aa_round_rect(self._Parent._CanvasHWND,
(x,y,self._Width-4,h),self._BackgroundColor,4,0,self._BackgroundColor)
class PageListItem(InfoPageListItem):
_PosX = 0
_PosY = 0
_Width = 0
_Height = 30
_Labels = {}
_Icons = {}
_Fonts = {}
_LinkObj = None
_Active = False
_Value = ""
def Draw(self):
self._Labels["Text"]._PosY = self._PosY+ (self._Height- self._Labels["Text"]._Height)/2
if self._Active == True:
self._Parent._Icons["done"].NewCoord( self._Parent._Width-30,self._PosY+5)
self._Parent._Icons["done"].Draw()
self._Labels["Text"].Draw(self._Active)
if "Small" in self._Labels:
self._Labels["Small"]._PosX = self._Width - self._Labels["Small"]._Width -10
self._Labels["Small"]._PosY = self._PosY + (self._Height- self._Labels["Small"]._Height)/2
self._Labels["Small"].Draw()
pygame.draw.line(self._Parent._CanvasHWND,MySkinManager.GiveColor('Line'),(self._PosX,self._PosY+self._Height-1),(self._PosX+self._Width,self._PosY+self._Height-1),1)
class SkinsPage(Page):
_FootMsg = ["Nav","","Scan","Back","Select"]
_MyList = []
_ListFont = MyLangManager.TrFont("notosanscjk15")
_AList = {}
_Scrolled = 0
_BGwidth = 320
_BGheight = 240-24-20
_DrawOnce = False
_Scroller = None
_InfoPage = None
def __init__(self):
Page.__init__(self)
self._Icons = {}
def GenList(self):
self._MyList = []
start_x = 0
start_y = 0
last_height = 0
skins = [["../skin/default","Default"]]
files_path = glob.glob("/home/cpi/skins/*")
for i ,v in enumerate(files_path):
if os.path.isdir(v):
bname = os.path.basename(v)
print(v,bname)
skins.append([v,bname])
for i,u in enumerate( skins ):
#print(i,u)
li = PageListItem()
li._Parent = self
li._PosX = start_x
li._PosY = start_y + last_height
li._Width = Width
li._Fonts["normal"] = self._ListFont
li._Active = False
li._Value = u[0]
li.Init( u[1] )
last_height += li._Height
self._MyList.append(li)
def Init(self):
if self._Screen != None:
if self._Screen._CanvasHWND != None and self._CanvasHWND == None:
self._HWND = self._Screen._CanvasHWND
self._CanvasHWND = pygame.Surface( (self._Screen._Width,self._BGheight) )
self._PosX = self._Index*self._Screen._Width
self._Width = self._Screen._Width ## equal to screen width
self._Height = self._Screen._Height
done = IconItem()
done._ImgSurf = MyIconPool.GiveIconSurface("done")
done._MyType = ICON_TYPES["STAT"]
done._Parent = self
self._Icons["done"] = done
ps = ListPageSelector()
ps._Parent = self
self._Ps = ps
self._PsIndex = 0
self.GenList()
self._Scroller = ListScroller()
self._Scroller._Parent = self
self._Scroller._PosX = self._Width - 10
self._Scroller._PosY = 2
self._Scroller.Init()
self._Scroller.SetCanvasHWND(self._HWND)
def Click(self):
if len(self._MyList) == 0:
return
cur_li = self._MyList[self._PsIndex]
if cur_li._Active == True:
return
print(cur_li._Value)
for i in self._MyList:
i._Active = False
cur_li._Active = True
self._Screen._MsgBox.SetText("Applying")
self._Screen._MsgBox.Draw()
self._Screen.SwapAndShow()
if "../skin/default" in cur_li._Value:
os.system("rm %s/.gameshell_skin" % os.path.expanduser('~') )
else:
os.system("echo %s > %s/.gameshell_skin" % (cur_li._Value,os.path.expanduser('~') ))
pygame.time.delay(700)
pygame.event.post( pygame.event.Event(RESTARTUI, message=""))
def OnLoadCb(self):
self._Scrolled = 0
self._PosY = 0
self._DrawOnce = False
for i in self._MyList:
i._Active = False
for i in self._MyList:
if config.SKIN in i._Value:
i._Active = True
def OnReturnBackCb(self):
pass
"""
self.ReturnToUpLevelPage()
self._Screen.Draw()
self._Screen.SwapAndShow()
"""
def KeyDown(self,event):
if IsKeyMenuOrB(event.key):
self.ReturnToUpLevelPage()
self._Screen.Draw()
self._Screen.SwapAndShow()
if IsKeyStartOrA(event.key):
self.Click()
if event.key == CurKeys["Up"]:
self.ScrollUp()
self._Screen.Draw()
self._Screen.SwapAndShow()
if event.key == CurKeys["Down"]:
self.ScrollDown()
self._Screen.Draw()
self._Screen.SwapAndShow()
if event.key == CurKeys["X"]:
self.GenList()
for i in self._MyList:
i._Active = False
for i in self._MyList:
if config.SKIN in i._Value:
i._Active = True
self._Screen.Draw()
self._Screen.SwapAndShow()
def Draw(self):
self.ClearCanvas()
if len(self._MyList) == 0:
return
else:
if len(self._MyList) * PageListItem._Height > self._Height:
self._Ps._Width = self._Width - 11
self._Ps.Draw()
for i in self._MyList:
if i._PosY > self._Height + self._Height/2:
break
if i._PosY < 0:
continue
i.Draw()
self._Scroller.UpdateSize( len(self._MyList)*PageListItem._Height, self._PsIndex*PageListItem._Height)
self._Scroller.Draw()
else:
self._Ps._Width = self._Width
self._Ps.Draw()
for i in self._MyList:
if i._PosY > self._Height + self._Height/2:
break
if i._PosY < 0:
continue
i.Draw()
if self._HWND != None:
self._HWND.fill(MySkinManager.GiveColor("White"))
self._HWND.blit(self._CanvasHWND,(self._PosX,self._PosY,self._Width, self._Height ) )
class APIOBJ(object):
_Page = None
def __init__(self):
pass
def Init(self,main_screen):
self._Page = SkinsPage()
self._Page._Screen = main_screen
self._Page._Name ="Skin selection"
self._Page.Init()
def API(self,main_screen):
if main_screen !=None:
main_screen.PushPage(self._Page)
main_screen.Draw()
main_screen.SwapAndShow()
OBJ = APIOBJ()
def Init(main_screen):
OBJ.Init(main_screen)
def API(main_screen):
OBJ.API(main_screen)
+2 -2
View File
@@ -7,7 +7,7 @@ import myvars
def InitSoundPage(main_screen):
myvars.SoundPage = SoundPage()
myvars.SoundPage._Screen = main_screen
myvars.SoundPage._Name = "Sound volume"
myvars.SoundPage._Name = "Sound Volume"
myvars.SoundPage.Init()
+15 -17
View File
@@ -11,9 +11,8 @@ from UI.constants import Width,Height,ICON_TYPES
from UI.page import Page,PageSelector
from UI.icon_item import IconItem
from UI.label import Label
from UI.fonts import fonts
from UI.util_funcs import midRect
from UI.keys_def import CurKeys
from UI.keys_def import CurKeys, IsKeyMenuOrB
from UI.slider import Slider
from UI.multi_icon_item import MultiIconItem
@@ -44,7 +43,7 @@ class SoundSlider(Slider):
self._Height = self._Parent._Height
self._BGpng = IconItem()
self._BGpng._ImgSurf = MyIconPool._Icons["vol"]
self._BGpng._ImgSurf = MyIconPool.GiveIconSurface("vol")
self._BGpng._MyType = ICON_TYPES["STAT"]
self._BGpng._Parent = self
self._BGpng.Adjust(0,0,self._BGwidth,self._BGheight,0)
@@ -54,7 +53,7 @@ class SoundSlider(Slider):
self._Scale = MultiIconItem()
self._Scale._MyType = ICON_TYPES["STAT"]
self._Scale._Parent = self
self._Scale._ImgSurf = MyIconPool._Icons["scale"]
self._Scale._ImgSurf = MyIconPool.GiveIconSurface("scale")
self._Scale._IconWidth = 82
self._Scale._IconHeight = 63
self._Scale.Adjust(0,0,82,63,0)
@@ -83,7 +82,7 @@ class SoundSlider(Slider):
if self._Value < 0:
self._Value = 0
vol = self.snd_segs[self._Value][0]
vol = self.snd_segs[self._Value][0] + (self.snd_segs[self._Value][1] - self.snd_segs[self._Value][0])/2
if self.OnChangeCB != None:
if callable(self.OnChangeCB):
@@ -113,7 +112,6 @@ class SoundPage(Page):
self._Height = self._Screen._Height
self._MySlider = SoundSlider()
self._MySlider._Parent = self
self._MySlider.SetCanvasHWND(self._CanvasHWND)
@@ -123,19 +121,19 @@ class SoundPage(Page):
self._MySlider.Init()
try:
m = alsaaudio.Mixer()
self._MySlider.SetValue(m.getvolume()[0])
except Exception,e:
print(str(e))
self._MySlider.SetValue(0)
m = alsaaudio.Mixer()
self._MySlider.SetValue(m.getvolume()[0])
except Exception,e:
print(str(e))
self._MySlider.SetValue(0)
def OnLoadCb(self):
try:
m = alsaaudio.Mixer()
self._MySlider.SetValue(m.getvolume()[0])
except Exception,e:
print(str(e))
try:
m = alsaaudio.Mixer()
self._MySlider.SetValue(m.getvolume()[0])
except Exception,e:
print(str(e))
def WhenSliderDrag(self,value): ##value 0-100
if value < 0 or value > 100:
@@ -146,7 +144,7 @@ class SoundPage(Page):
def KeyDown(self,event):
if event.key == CurKeys["Menu"] or event.key == CurKeys["A"]:
if IsKeyMenuOrB(event.key):
self.ReturnToUpLevelPage()
self._Screen.Draw()
self._Screen.SwapAndShow()
@@ -6,11 +6,11 @@ import os
## local UI import
from UI.page import Page
from UI.skin_manager import MySkinManager
from UI.constants import ICON_TYPES,Width,Height
from UI.icon_item import IconItem
from UI.icon_pool import MyIconPool
from UI.label import Label
from UI.fonts import fonts
from UI.util_funcs import midRect
from libs.roundrects import aa_round_rect
@@ -27,7 +27,7 @@ class StoragePage(Page):
_BGmsg = "%.1fGB of %.1fGB Used"
_DskUsg = None
_HighColor = pygame.Color(51,166,255)
_HighColor = MySkinManager.GiveColor('High')
_FootMsg = ["Nav.","","","Back",""]
def __init__(self):
@@ -54,11 +54,11 @@ class StoragePage(Page):
self._Height = self._Screen._Height
self._BGpng = IconItem()
self._BGpng._ImgSurf = MyIconPool._Icons["icon_sd"]
self._BGpng._ImgSurf = MyIconPool.GiveIconSurface("icon_sd")
self._BGpng._MyType = ICON_TYPES["STAT"]
self._BGpng._Parent = self
self._BGpng.AddLabel(self._BGmsg % (self._DskUsg[1]-self._DskUsg[0], self._DskUsg[1]), fonts["varela15"])
self._BGpng.AddLabel(self._BGmsg % (self._DskUsg[1]-self._DskUsg[0], self._DskUsg[1]), MySkinManager.GiveFont("varela15"))
self._BGpng.Adjust(0,0,self._BGwidth,self._BGheight,0)
@@ -67,12 +67,12 @@ class StoragePage(Page):
usage_percent = (self._DskUsg[0]/self._DskUsg[1] )*100.0
self._BGlabel.Init("%d%%"% int(usage_percent),fonts["varela25"])
self._BGlabel.Init("%d%%"% int(usage_percent),MySkinManager.GiveFont("varela25"))
self._BGlabel.SetColor( self._HighColor )
self._FreeLabel = Label()
self._FreeLabel.SetCanvasHWND(self._CanvasHWND)
self._FreeLabel.Init("Free",fonts["varela13"])
self._FreeLabel.Init("Free",MySkinManager.GiveFont("varela13"))
self._FreeLabel.SetColor(self._BGlabel._Color)
@@ -98,7 +98,7 @@ class StoragePage(Page):
rect_ = midRect(self._Width/2,self._Height-30,170,17, Width,Height)
aa_round_rect(self._CanvasHWND,rect_, (193,193,193),5,0,(193,193,193))
aa_round_rect(self._CanvasHWND, rect_, MySkinManager.GiveColor('Line'), 5, 0, MySkinManager.GiveColor('Line'))
rect2 = midRect(self._Width/2,self._Height-30,int(170*(1.0-usage_percent)),17, Width,Height)
@@ -106,7 +106,7 @@ class StoragePage(Page):
rect2.left = rect_.left
rect2.top = rect_.top
aa_round_rect(self._CanvasHWND,rect2, (126,206,244),5,0,(126,206,244))
aa_round_rect(self._CanvasHWND,rect2, MySkinManager.GiveColor('Front'),5,0,MySkinManager.GiveColor('Front'))
class APIOBJ(object):
+3 -3
View File
@@ -7,9 +7,9 @@ from libs.roundrects import aa_round_rect
from UI.constants import ICON_TYPES
from UI.page import Page
from UI.label import Label
from UI.fonts import fonts
from UI.icon_item import IconItem
from UI.util_funcs import midRect
from UI.skin_manager import MySkinManager
# a item for List
# - - - - - - - - - - - --
@@ -31,7 +31,7 @@ class ListItemIcon(IconItem):
class ListItemLabel(Label):
_ActiveColor = pygame.Color(175,90,0)
_ActiveColor = MySkinManager.GiveColor('Active')
_Active = False
def Draw(self):
@@ -106,7 +106,7 @@ class ListItem(object):
self._Labels["Text"]._PosY = self._PosY + (self._Height - self._Labels["Text"]._Height)/2
pygame.draw.line(self._Parent._CanvasHWND,(169,169,169),(self._PosX,self._PosY+self._Height-1),(self._PosX+self._Width,self._PosY+self._Height-1),1)
pygame.draw.line(self._Parent._CanvasHWND,MySkinManager.GiveColor('Line'),(self._PosX,self._PosY+self._Height-1),(self._PosX+self._Width,self._PosY+self._Height-1),1)
self._Labels["Text"].Draw()
@@ -10,14 +10,14 @@ from libs.roundrects import aa_round_rect
from UI.constants import Width,Height,ICON_TYPES
from UI.page import Page,PageSelector
from UI.label import Label
from UI.fonts import fonts
from UI.icon_item import IconItem
from UI.util_funcs import midRect
from UI.keys_def import CurKeys
from UI.keys_def import CurKeys, IsKeyStartOrA, IsKeyMenuOrB
from UI.multi_icon_item import MultiIconItem
from UI.icon_pool import MyIconPool
from UI.scroller import ListScroller
from UI.skin_manager import MySkinManager
from UI.lang_manager import MyLangManager
from list_item import ListItem
@@ -50,7 +50,7 @@ class TimeLibStack:
return len(self.stack)
class ListPageSelector(PageSelector):
_BackgroundColor = pygame.Color(131,199,219)
_BackgroundColor = MySkinManager.GiveColor('Front')
def __init__(self):
self._PosX = 0
@@ -85,7 +85,7 @@ class TimezoneListPage(Page):
_FootMsg = ["Nav","","","Back","Select"]
_MyList = []
_SwapMyList = []
_ListFont = fonts["notosanscjk15"]
_ListFont = MyLangManager.TrFont("notosanscjk15")
_MyStack = None
_Scroller = None
@@ -176,7 +176,7 @@ class TimezoneListPage(Page):
self.SyncList("/usr/share/zoneinfo/posix")
icon_for_list = MultiIconItem()
icon_for_list._ImgSurf = MyIconPool._Icons["sys"]
icon_for_list._ImgSurf = MyIconPool.GiveIconSurface("sys")
icon_for_list._MyType = ICON_TYPES["STAT"]
icon_for_list._Parent = self
@@ -185,11 +185,11 @@ class TimezoneListPage(Page):
self._BGpng = IconItem()
self._BGpng._ImgSurf = MyIconPool._Icons["empty"]
self._BGpng._ImgSurf = MyIconPool.GiveIconSurface("empty")
self._BGpng._MyType = ICON_TYPES["STAT"]
self._BGpng._Parent = self
self._BGpng.AddLabel("No timezones found on system!", fonts["varela22"])
self._BGpng.SetLableColor(pygame.Color(204,204,204))
self._BGpng.AddLabel("No timezones found on system!", MyLangManager.TrFont("varela22"))
self._BGpng.SetLableColor(MySkinManager.GiveColor('Disabled'))
self._BGpng.Adjust(0,0,self._BGwidth,self._BGheight,0)
@@ -199,35 +199,6 @@ class TimezoneListPage(Page):
self._Scroller._PosY = 2
self._Scroller.Init()
def ScrollUp(self,Step=1):
if len(self._MyList) == 0:
return
tmp = self._PsIndex
self._PsIndex -= Step
if self._PsIndex < 0:
self._PsIndex = 0
dy = tmp-self._PsIndex
cur_li = self._MyList[self._PsIndex]
if cur_li._PosY < 0:
for i in range(0, len(self._MyList)):
self._MyList[i]._PosY += self._MyList[i]._Height*dy
def ScrollDown(self,Step=1):
if len(self._MyList) == 0:
return
tmp = self._PsIndex
self._PsIndex +=Step
if self._PsIndex >= len(self._MyList):
self._PsIndex = len(self._MyList) -1
dy = self._PsIndex - tmp
cur_li = self._MyList[self._PsIndex]
if cur_li._PosY +cur_li._Height > self._Height:
for i in range(0,len(self._MyList)):
self._MyList[i]._PosY -= self._MyList[i]._Height*dy
def Click(self):
if len(self._MyList) == 0:
return
@@ -258,7 +229,7 @@ class TimezoneListPage(Page):
def KeyDown(self,event):
if event.key == CurKeys["Menu"] or event.key == CurKeys["A"]:
if IsKeyMenuOrB(event.key):
self.ReturnToUpLevelPage()
self._Screen.Draw()
@@ -274,16 +245,16 @@ class TimezoneListPage(Page):
self._Screen.SwapAndShow()
if event.key == CurKeys["Right"]:
self.ScrollDown(Step=5)
self.FScrollDown(Step=5)
self._Screen.Draw()
self._Screen.SwapAndShow()
if event.key == CurKeys["Left"]:
self.ScrollUp(Step=5)
self.FScrollUp(Step=5)
self._Screen.Draw()
self._Screen.SwapAndShow()
if event.key == CurKeys["Enter"]:
if IsKeyStartOrA(event.key):
self.Click()
def Draw(self):
+29 -74
View File
@@ -9,22 +9,27 @@ import gobject
## local UI import
from UI.page import Page
from UI.constants import ICON_TYPES,Width,Height,RUNEVT
from UI.constants import ICON_TYPES,Width,Height,RUNEVT,RUNSH
from UI.icon_item import IconItem
from UI.icon_pool import MyIconPool
from UI.label import Label
from UI.fonts import fonts
from UI.util_funcs import midRect,CmdClean,get_git_revision_short_hash
from UI.keys_def import CurKeys
from UI.keys_def import CurKeys, IsKeyStartOrA, IsKeyMenuOrB
from UI.confirm_page import ConfirmPage
from UI.download import Download
from UI.download_process_page import DownloadProcessPage
from UI.skin_manager import MySkinManager
from UI.lang_manager import MyLangManager
from UI.info_page_list_item import InfoPageListItem
from libs.roundrects import aa_round_rect
from libs.DBUS import is_wifi_connected_now
import config
LauncherLoc = "/home/cpi/launcher"
class UpdateDownloadPage(DownloadProcessPage):
_MD5 = ""
@@ -38,7 +43,7 @@ class UpdateDownloadPage(DownloadProcessPage):
if filename.endswith(".tar.gz"):
#/home/cpi/apps/[launcher]
cmdpath = "tar zxf " + CmdClean(filename) + " -C /home/cpi/apps ;rm -rf "+ filename
cmdpath = "tar zxf " + CmdClean(filename) + " -C /home/cpi/ ;rm -rf "+ filename
pygame.event.post( pygame.event.Event(RUNEVT, message=cmdpath))
self.ReturnToUpLevelPage()
@@ -59,7 +64,7 @@ class UpdateDownloadPage(DownloadProcessPage):
print(filename)
os.system("rm -rf %s" % CmdClean(filename))
self._Screen._MsgBox.SetText("Download failed")
self._Screen._MsgBox.SetText("DownloadFailed")
self._Screen._MsgBox.Draw()
self._Screen.SwapAndShow()
return False
@@ -104,22 +109,22 @@ class UpdateConfirmPage(ConfirmPage):
_GIT = False
def KeyDown(self,event):
if event.key == CurKeys["Menu"] or event.key == CurKeys["A"]:
global LauncherLoc
if IsKeyMenuOrB(event.key):
self.ReturnToUpLevelPage()
self._Screen.Draw()
self._Screen.SwapAndShow()
if event.key == CurKeys["B"]:
if IsKeyStartOrA(event.key):
if self._GIT == True:
cmdpath = "feh --bg-center /home/cpi/apps/launcher/sys.py/gameshell/wallpaper/updating.png; cd /home/cpi/apps/launcher ;git pull; git reset --hard %s ; feh --bg-center /home/cpi/apps/launcher/sys.py/gameshell/wallpaper/loading.png " % self._Version
pygame.event.post( pygame.event.Event(RUNEVT, message=cmdpath))
self._GIT = False
cmdpath = "%s/update.sh %s" % (LauncherLoc,self._Version)
pygame.event.post( pygame.event.Event(RUNSH, message=cmdpath))
return
if self._DownloadPage == None:
self._DownloadPage = UpdateDownloadPage()
self._DownloadPage._Screen = self._Screen
self._DownloadPage._Name = "Downloading..."
self._DownloadPage._Name = "Downloading"
self._DownloadPage.Init()
self._DownloadPage._MD5 = self._MD5
@@ -147,65 +152,14 @@ class UpdateConfirmPage(ConfirmPage):
self.Reset()
class InfoPageListItem(object):
_PosX = 0
_PosY = 0
_Width = 0
_Height = 30
_Labels = {}
_Icons = {}
_Fonts = {}
_LinkObj = None
def __init__(self):
self._Labels = {}
self._Icons = {}
self._Fonts = {}
def SetSmallText(self,text):
l = Label()
l._PosX = 40
l.SetCanvasHWND(self._Parent._CanvasHWND)
l.Init(text,self._Fonts["small"])
self._Labels["Small"] = l
def Init(self,text):
#self._Fonts["normal"] = fonts["veramono12"]
l = Label()
l._PosX = 10
l.SetCanvasHWND(self._Parent._CanvasHWND)
l.Init(text,self._Fonts["normal"])
self._Labels["Text"] = l
def Draw(self):
self._Labels["Text"]._PosY = self._PosY + (self._Height - self._Labels["Text"]._Height)/2
self._Labels["Text"].Draw()
if "Small" in self._Labels:
self._Labels["Small"]._PosX = self._Width - self._Labels["Small"]._Width-5
self._Labels["Small"]._PosY = self._PosY + (self._Height - self._Labels["Small"]._Height)/2
self._Labels["Small"].Draw()
pygame.draw.line(self._Parent._CanvasHWND,(169,169,169),(self._PosX,self._PosY+self._Height-1),(self._PosX+self._Width,self._PosY+self._Height-1),1)
class UpdatePage(Page):
_Icons = {}
_FootMsg = ["Nav.","Check Update","","Back",""]
_FootMsg = ["Nav","","Check Update","Back",""]
_ListFontObj = fonts["varela15"]
_ListFontObj = MyLangManager.TrFont("varela15")
_ConfirmPage = None
_AList = {}
_MyList = []
def __init__(self):
Page.__init__(self)
self._Icons = {}
@@ -222,7 +176,7 @@ class UpdatePage(Page):
li._PosY = start_y + i*InfoPageListItem._Height
li._Width = Width
li._Fonts["normal"] = self._ListFontObj
li._Fonts["small"] = fonts["varela12"]
li._Fonts["small"] = MySkinManager.GiveFont("varela12")
if self._AList[v]["label"] != "":
li.Init( self._AList[v]["label"] )
@@ -255,7 +209,8 @@ class UpdatePage(Page):
self.GenList()
def CheckUpdate(self):
self._Screen._MsgBox.SetText("Checking update...")
global LauncherLoc
self._Screen._MsgBox.SetText("CheckingUpdate")
self._Screen._MsgBox.Draw()
self._Screen.SwapAndShow()
@@ -279,12 +234,12 @@ class UpdatePage(Page):
self._Screen.PushPage(self._ConfirmPage)
self._Screen.Draw()
self._ConfirmPage.SnapMsg("Confirm Update to %s ?" % json_["version"] )
self._ConfirmPage.SnapMsg(MyLangManager.Tr("ConfirmUpdateToFQ") % json_["version"] )
self._Screen.SwapAndShow()
elif "gitversion" in json_: ### just use git to run update
cur_dir = os.getcwd()
os.chdir("/home/cpi/apps/launcher")
os.chdir(LauncherLoc)
current_git_version = get_git_revision_short_hash()
current_git_version = current_git_version.strip("\n")
current_git_version = current_git_version.strip("\t")
@@ -298,11 +253,11 @@ class UpdatePage(Page):
self._Screen.PushPage(self._ConfirmPage)
self._Screen.Draw()
self._ConfirmPage.SnapMsg("Update to %s ?" % json_["gitversion"] )
self._ConfirmPage.SnapMsg(MyLangManager.Tr("UpdateToFQ") % json_["gitversion"] )
self._Screen.SwapAndShow()
else:
self._Screen.Draw()
self._Screen._MsgBox.SetText("Launcher is up to date")
self._Screen._MsgBox.SetText("LauncherIsUpToDate")
self._Screen._MsgBox.Draw()
self._Screen.SwapAndShow()
pygame.time.delay(765)
@@ -321,7 +276,7 @@ class UpdatePage(Page):
pass
def KeyDown(self,event):
if event.key == CurKeys["Menu"] or event.key == CurKeys["A"]:
if IsKeyMenuOrB(event.key):
self.ReturnToUpLevelPage()
self._Screen.Draw()
self._Screen.SwapAndShow()
@@ -333,12 +288,12 @@ class UpdatePage(Page):
self._Screen.SwapAndShow()
else:
self._Screen.Draw()
self._Screen._MsgBox.SetText("Checking update failed")
self._Screen._MsgBox.SetText("CheckingUpdateFailed")
self._Screen._MsgBox.Draw()
self._Screen.SwapAndShow()
else:
self._Screen.Draw()
self._Screen._MsgBox.SetText("Please Check your Wi-Fi connection")
self._Screen._MsgBox.SetText("CheckWifiConnection")
self._Screen._MsgBox.Draw()
self._Screen.SwapAndShow()
@@ -359,7 +314,7 @@ class APIOBJ(object):
self._UpdatePage = UpdatePage()
self._UpdatePage._Screen = main_screen
self._UpdatePage._Name ="Update"
self._UpdatePage._Name = "Update Launcher"
self._UpdatePage.Init()
def API(self,main_screen):
+2 -1
View File
@@ -13,7 +13,8 @@ except:
def Init(main_screen):
pages.InitPasswordPage(main_screen)
pages.InitScanPage(main_screen)
myvars.PasswordPage._Caller = myvars.ScanPage
def API(main_screen):
if main_screen != None:
+6 -9
View File
@@ -5,11 +5,11 @@ import pygame
## local UI import
from UI.page import Page
from UI.label import Label
from UI.fonts import fonts
from UI.icon_item import IconItem
from UI.multi_icon_item import MultiIconItem
from UI.icon_pool import MyIconPool
from UI.skin_manager import MySkinManager
from UI.widget import Widget
class NetItemMultiIcon(MultiIconItem):
_CanvasHWND = None
@@ -32,10 +32,7 @@ class NetItemIcon(IconItem):
self._CanvasHWND.blit(self._ImgSurf,(self._PosX,self._PosY+(self._Parent._Height-self._Height)/2,self._Width,self._Height))
class NetItem(object):
_PosX = 0
_PosY = 0
_Width = 0
class NetItem(Widget):
_Height = 30
_Bssid="" # 50:3A:A0:51:18:3C
@@ -140,13 +137,13 @@ class NetItem(object):
lock_icon = NetItemIcon()
lock_icon._ImgSurf = MyIconPool._Icons["lock"]
lock_icon._ImgSurf = MyIconPool.GiveIconSurface("lock")
lock_icon._CanvasHWND = self._Parent._CanvasHWND
lock_icon._Parent = self
self._Icons["lock"] = lock_icon
done_icon = NetItemIcon()
done_icon._ImgSurf = MyIconPool._Icons["done"]
done_icon._ImgSurf = MyIconPool.GiveIconSurface("done")
done_icon._CanvasHWND = self._Parent._CanvasHWND
done_icon._Parent = self
@@ -194,6 +191,6 @@ class NetItem(object):
self._Icons["wifistatus"].NewCoord(self._Width-23,self._PosY)
self._Icons["wifistatus"].Draw()
pygame.draw.line(self._Parent._CanvasHWND,(169,169,169),(self._PosX,self._PosY+self._Height-1),(self._PosX+self._Width,self._PosY+self._Height-1),1)
pygame.draw.line(self._Parent._CanvasHWND,MySkinManager.GiveColor('Line'),(self._PosX,self._PosY+self._Height-1),(self._PosX+self._Width,self._PosY+self._Height-1),1)
+1 -1
View File
@@ -16,7 +16,7 @@
## local UI import
from libs.DBUS import bus,daemon,wireless,wired
from keyboard import Keyboard
from UI.keyboard import Keyboard
from wifi_list import WifiList
import myvars
+107 -184
View File
@@ -10,80 +10,34 @@ from wicd import misc
from UI.constants import Width,Height
from UI.page import Page,PageSelector
from UI.label import Label
from UI.fonts import fonts
from UI.util_funcs import midRect,SwapAndShow
from UI.keys_def import CurKeys
from UI.util_funcs import midRect,SwapAndShow,FileExists,ReadTheFileContent
from UI.keys_def import CurKeys, IsKeyStartOrA, IsKeyMenuOrB
from UI.scroller import ListScroller
from UI.confirm_page import ConfirmPage
from UI.skin_manager import MySkinManager
from UI.lang_manager import MyLangManager
from UI.info_page_list_item import InfoPageListItem
from UI.info_page_selector import InfoPageSelector
from libs.DBUS import is_wifi_connected_now
from net_item import NetItem
import myvars
class InfoPageListItem(object):
_PosX = 0
_PosY = 0
_Width = 0
_Height = 30
_Labels = {}
_Icons = {}
_Fonts = {}
_LinkObj = None
def __init__(self):
self._Labels = {}
self._Icons = {}
self._Fonts = {}
def SetSmallText(self,text):
l = Label()
l._PosX = 40
l.SetCanvasHWND(self._Parent._CanvasHWND)
l.Init(text,self._Fonts["small"])
self._Labels["Small"] = l
def Init(self,text):
#self._Fonts["normal"] = fonts["veramono12"]
l = Label()
l._PosX = 10
l.SetCanvasHWND(self._Parent._CanvasHWND)
l.Init(text,self._Fonts["normal"])
self._Labels["Text"] = l
def Draw(self):
self._Labels["Text"]._PosY = self._PosY + (self._Height - self._Labels["Text"]._Height)/2
self._Labels["Text"].Draw()
if "Small" in self._Labels:
self._Labels["Small"]._PosX = self._Width - self._Labels["Small"]._Width-5
self._Labels["Small"]._PosY = self._PosY + (self._Height - self._Labels["Small"]._Height)/2
self._Labels["Small"].Draw()
pygame.draw.line(self._Parent._CanvasHWND,(169,169,169),(self._PosX,self._PosY+self._Height-1),(self._PosX+self._Width,self._PosY+self._Height-1),1)
class WifiDisconnectConfirmPage(ConfirmPage):
_ConfirmText = "Confirm Disconnect?"
_ConfirmText = MyLangManager.Tr("ConfirmDisconnectQ")
def KeyDown(self,event):
if event.key == CurKeys["Menu"] or event.key == CurKeys["A"]:
if IsKeyMenuOrB(event.key):
self.ReturnToUpLevelPage()
self._Screen.Draw()
self._Screen.SwapAndShow()
if event.key == CurKeys["B"]:
self.SnapMsg("Disconnecting...")
if IsKeyStartOrA(event.key):
self.SnapMsg(MyLangManager.Tr("Disconnecting"))
self._Screen.Draw()
self._Screen.SwapAndShow()
@@ -104,36 +58,10 @@ class WifiDisconnectConfirmPage(ConfirmPage):
self.Reset()
class WifiInfoPageSelector(PageSelector):
_BackgroundColor = pygame.Color(131,199,219)
def __init__(self):
self._PosX = 0
self._PosY = 0
self._Height = 0
self._Width = Width
def AnimateDraw(self,x2,y2):
pass
def Draw(self):
idx = self._Parent._PsIndex
if idx < len(self._Parent._MyList):
x = 2
y = self._Parent._MyList[idx]._PosY+1
h = self._Parent._MyList[idx]._Height -3
self._PosX = x
self._PosY = y
self._Height = h
aa_round_rect(self._Parent._CanvasHWND,
(x,y,self._Width-4,h),self._BackgroundColor,4,0,self._BackgroundColor)
class WifiInfoPage(Page):
_FootMsg = ["Nav.","Disconnect","","Back",""]
_FootMsg = ["Nav","","","Back",""]
_MyList = []
_ListFontObj = fonts["varela15"]
_ListFontObj = MyLangManager.TrFont("varela15")
_Wireless = None
_Daemon = None
@@ -154,7 +82,11 @@ class WifiInfoPage(Page):
self._AList["ip"]["value"] = ip
self._AList["bssid"]["value"] = self._Wireless.GetWirelessProperty(self._NetworkId,"bssid")
if FileExists("/sys/class/net/wlan0/address"):
self._AList["mac_addr"]["value"] = ReadTheFileContent("/sys/class/net/wlan0/address").strip().upper()
else:
self._AList["mac_addr"]["value"] = ""
start_x = 0
start_y = 0
@@ -165,7 +97,7 @@ class WifiInfoPage(Page):
li._PosY = start_y + i*InfoPageListItem._Height
li._Width = Width
li._Fonts["normal"] = self._ListFontObj
li._Fonts["small"] = fonts["varela12"]
li._Fonts["small"] = MyLangManager.TrFont("varela12")
if self._AList[v]["label"] != "":
li.Init( self._AList[v]["label"] )
@@ -187,8 +119,9 @@ class WifiInfoPage(Page):
self._Width = self._Screen._Width ## equal to screen width
self._Height = self._Screen._Height
ps = WifiInfoPageSelector()
ps = InfoPageSelector()
ps._Parent = self
ps._PosX = 2
self._Ps = ps
self._PsIndex = 0
@@ -201,10 +134,16 @@ class WifiInfoPage(Page):
bssid["key"] = "bssid"
bssid["label"] = "BSSID"
bssid["value"] = ""
mac_addr = {}
mac_addr["key"] = "mac_addr"
mac_addr["label"] = "MAC ADDR"
mac_addr["value"] = ""
self._AList["ip"] = ip
self._AList["bssid"] = bssid
self._AList["mac_addr"] = mac_addr
self.GenList()
self._DisconnectConfirmPage = WifiDisconnectConfirmPage()
@@ -212,30 +151,6 @@ class WifiInfoPage(Page):
self._DisconnectConfirmPage._Name = "Confirm Disconnect"
self._DisconnectConfirmPage._Parent = self
self._DisconnectConfirmPage.Init()
def ScrollUp(self):
if len(self._MyList) == 0:
return
self._PsIndex -= 1
if self._PsIndex < 0:
self._PsIndex = 0
cur_li = self._MyList[self._PsIndex]
if cur_li._PosY < 0:
for i in range(0, len(self._MyList)):
self._MyList[i]._PosY += self._MyList[i]._Height
def ScrollDown(self):
if len(self._MyList) == 0:
return
self._PsIndex +=1
if self._PsIndex >= len(self._MyList):
self._PsIndex = len(self._MyList) -1
cur_li = self._MyList[self._PsIndex]
if cur_li._PosY +cur_li._Height > self._Height:
for i in range(0,len(self._MyList)):
self._MyList[i]._PosY -= self._MyList[i]._Height
def Click(self):
cur_li = self._MyList[self._PsIndex]
@@ -253,9 +168,9 @@ class WifiInfoPage(Page):
def OnLoadCb(self):
if self._Wireless.GetCurrentNetworkID(self._Wireless.GetIwconfig()) == self._NetworkId \
and self._Wireless.GetWirelessIP('') is not None:
self._FootMsg[1] = "Disconnect"
self._FootMsg[2] = "Disconnect"
else:
self._FootMsg[1] = ""
self._FootMsg[2] = ""
self.GenList()
@@ -265,7 +180,7 @@ class WifiInfoPage(Page):
self._Screen.SwapAndShow()
def KeyDown(self,event):
if event.key == CurKeys["A"] or event.key == CurKeys["Menu"]:
if IsKeyMenuOrB(event.key):
self.ReturnToUpLevelPage()
self._Screen.Draw()
self._Screen.SwapAndShow()
@@ -280,7 +195,7 @@ class WifiInfoPage(Page):
self._Screen.SwapAndShow()
if event.key == CurKeys["Enter"]:
if IsKeyStartOrA(event.key):
self.Click()
if event.key == CurKeys["X"]:
@@ -297,12 +212,10 @@ class WifiInfoPage(Page):
class WifiListSelector(PageSelector):
_BackgroundColor = pygame.Color(131,199,219)
_BackgroundColor = MySkinManager.GiveColor('Front')
def __init__(self):
self._PosX = 0
self._PosY = 0
self._Height = 0
pass
def AnimateDraw(self,x2,y2):
pass
@@ -310,10 +223,10 @@ class WifiListSelector(PageSelector):
def Draw(self):
idx = self._Parent._PsIndex
if idx < len( self._Parent._WirelessList):
x = self._Parent._WirelessList[idx]._PosX+11
y = self._Parent._WirelessList[idx]._PosY+1
h = self._Parent._WirelessList[idx]._Height -3
if idx < len( self._Parent._MyList):
x = self._Parent._MyList[idx]._PosX+11
y = self._Parent._MyList[idx]._PosY+1
h = self._Parent._MyList[idx]._Height -3
self._PosX = x
self._PosY = y
@@ -333,14 +246,14 @@ class WifiListMessageBox(Label):
x = (self._Parent._Width - w)/2
y = (self._Parent._Height - h)/2
padding = 10
pygame.draw.rect(self._CanvasHWND,(255,255,255),(x-padding,y-padding, w+padding*2,h+padding*2))
pygame.draw.rect(self._CanvasHWND,MySkinManager.GiveColor('White'),(x-padding,y-padding, w+padding*2,h+padding*2))
pygame.draw.rect(self._CanvasHWND,(0,0,0),(x-padding,y-padding, w+padding*2,h+padding*2),1)
pygame.draw.rect(self._CanvasHWND,MySkinManager.GiveColor('Black'),(x-padding,y-padding, w+padding*2,h+padding*2),1)
self._CanvasHWND.blit(my_text,(x,y,w,h))
class WifiList(Page):
_WirelessList = []
_MyList = []
#Wicd dbus part
_Wireless = None
_Daemon = None
@@ -360,16 +273,17 @@ class WifiList(Page):
_BlockCb = None
_LastStatusMsg = ""
_FootMsg = ["Nav.","Scan","Info","Back","Enter"]
_FootMsg = ["Nav","Info","Scan","Back","Enter"]
_EncMethods = None
_Scroller = None
_ListFontObj = fonts["notosanscjk15"]
_ListFontObj = MyLangManager.TrFont("notosanscjk15")
_InfoPage = None
_CurBssid = ""
def __init__(self):
Page.__init__(self)
self._WirelessList = []
self._MyList = []
self._CanvasHWND = None
def ShowBox(self,msg):
@@ -386,7 +300,7 @@ class WifiList(Page):
self._Screen.SwapAndShow()
def GenNetworkList(self):
self._WirelessList = []
self._MyList = []
start_x = 0
start_y = 0
@@ -405,7 +319,7 @@ class WifiList(Page):
#ni._Bssid = self._Wireless.GetWirelessProperty(network_id,"bssid")
ni.Init(network_id,is_active)
self._WirelessList.append(ni)
self._MyList.append(ni)
self._PsIndex = 0
@@ -443,7 +357,7 @@ class WifiList(Page):
return
self._Scanning = True
self.ShowBox("Wifi scanning...")
self.ShowBox(MyLangManager.Tr("Wifi scanning"))
self._BlockingUI = True
print("dbus says start scan...")
@@ -466,8 +380,8 @@ class WifiList(Page):
if info != None:
if len(info) > 3:
_id = int(info[3])
if _id < len(self._WirelessList):
self._WirelessList[_id].UpdateStrenLabel( str(info[2]))
if _id < len(self._MyList):
self._MyList[_id].UpdateStrenLabel( str(info[2]))
self._PrevWicdState = state
@@ -485,6 +399,7 @@ class WifiList(Page):
"""
if wireless_connecting:
if not fast:
iwconfig = self._Wireless.GetIwconfig()
else:
@@ -498,7 +413,6 @@ class WifiList(Page):
self._Screen._FootBar.UpdateNavText(self._LastStatusMsg)
SwapAndShow()
#self._ConnectTry+=1
return True
@@ -536,7 +450,7 @@ class WifiList(Page):
dbus.UInt32(2L)
['192.168.31.141', 'TP-LINK4G', '88', '0', '72.2 Mb/s']
"""
pp(info)
# pp(info)
self.UpdateNetList(state,info)
if info != None:
self._Screen.Draw()
@@ -587,7 +501,14 @@ class WifiList(Page):
return True
def ConfigWireless(self,password):
netid = self._PsIndex
for i,v in enumerate(self._MyList):
if v._Bssid == self._CurBssid:
netid = i
break
print(netid," ", password)
"""
self._Wireless.SetWirelessProperty(netid,"dhcphostname","GameShell")
@@ -610,8 +531,9 @@ class WifiList(Page):
self._Wireless.SetWirelessProperty(netid,"apsk",password)
self._Wireless.SetWirelessProperty(netid,"automatic",1)
self.ShowBox(MyLangManager.Tr("Connecting"))
self._WirelessList[netid].Connect()
self._MyList[netid].Connect()
print("after Connect")
self.UpdateStatus()
@@ -645,50 +567,50 @@ class WifiList(Page):
"""
return results
def ScrollUp(self):
if len(self._WirelessList) == 0:
return
self._PsIndex-=1
if self._PsIndex < 0:
self._PsIndex = 0
cur_ni = self._WirelessList[self._PsIndex]
if cur_ni._PosY < 0:
for i in range(0,len(self._WirelessList)):
self._WirelessList[i]._PosY += self._WirelessList[i]._Height
def ScrollDown(self):
if len(self._WirelessList) == 0:
return
self._PsIndex+=1
if self._PsIndex >= len(self._WirelessList):
self._PsIndex = len(self._WirelessList) -1
cur_ni = self._WirelessList[self._PsIndex]
if cur_ni._PosY + cur_ni._Height > self._Height:
for i in range(0,len(self._WirelessList)):
self._WirelessList[i]._PosY -= self._WirelessList[i]._Height
def AbortedAndReturnToUpLevel(self):
self.HideBox()
self._Screen._FootBar.ResetNavText()
self.ReturnToUpLevelPage()
self._Screen.Draw()
self._Screen.SwapAndShow()
def OnKbdReturnBackCb(self):
password_inputed = "".join(myvars.PasswordPage._Textarea._MyWords)
if is_wifi_connected_now() == False:
self.ConfigWireless(password_inputed)
else:
for i in range(0,10):
if is_wifi_connected_now() == True:
self.ShowBox(MyLangManager.Tr("Launching"))
self._Daemon.Disconnect()
self._Daemon.SetForcedDisconnect(True)
self._Connecting = False
else:
break
pygame.time.delay(100)
if is_wifi_connected_now() == False:
self.ConfigWireless(password_inputed)
else:
self.ShowBox(MyLangManager.Tr("Disconnect first"))
def OnReturnBackCb(self):
pass
def KeyDown(self,event):
if self._BlockingUI == True:
print("UI blocking ...")
return
# if self._BlockingUI == True:
# print("UI blocking ...")
# return
if event.key == CurKeys["A"] or event.key == CurKeys["Menu"]:
if IsKeyMenuOrB(event.key):
if self._Wireless != None:
wireless_connecting = self._Wireless.CheckIfWirelessConnecting()
if wireless_connecting:
self.ShutDownConnecting()
self.ShowBox("ShutDownConnecting...")
self.ShowBox(MyLangManager.Tr("ShutDownConnecting"))
self._BlockingUI=True
self._BlockCb = self.AbortedAndReturnToUpLevel
else:
@@ -708,13 +630,14 @@ class WifiList(Page):
self._Screen.Draw()
self._Screen.SwapAndShow()
if event.key == CurKeys["Enter"]: ## enter to set password,enter is B on GM
if len(self._WirelessList) == 0:
if IsKeyStartOrA(event.key): ## enter to set password,enter is B on GM
if len(self._MyList) == 0:
return
wicd_wirelss_encrypt_pwd = self.GetWirelessEncrypt(self._PsIndex)
self._CurBssid = self._MyList[self._PsIndex]._Bssid
if self._WirelessList[self._PsIndex]._IsActive:
wicd_wirelss_encrypt_pwd = self.GetWirelessEncrypt(self._PsIndex)
if self._MyList[self._PsIndex]._IsActive:
self.ShowBox( self._Wireless.GetWirelessIP('') )
else:
self._Screen.PushCurPage()
@@ -724,8 +647,8 @@ class WifiList(Page):
for i in wicd_wirelss_encrypt_pwd:
if "preshared_key" in i:
if i["preshared_key"] != None:
if len(i["preshared_key"]) > 0:
thepass = i["preshared_key"]
if len(str(i["preshared_key"])) > 0:
thepass = str(i["preshared_key"])
break
myvars.PasswordPage.SetPassword(thepass)
@@ -744,7 +667,7 @@ class WifiList(Page):
self.Rescan(False)
if event.key == CurKeys["Y"]:
if len(self._WirelessList) == 0:
if len(self._MyList) == 0:
return
self._InfoPage._NetworkId = self._PsIndex
@@ -774,7 +697,7 @@ class WifiList(Page):
msgbox = WifiListMessageBox()
msgbox._CanvasHWND = self._CanvasHWND
msgbox.Init(" ",fonts["veramono12"])
msgbox.Init(" ",MyLangManager.TrFont("veramono12"))
msgbox._Parent = self
self._MsgBox = msgbox
@@ -807,19 +730,19 @@ class WifiList(Page):
self._InfoPage = WifiInfoPage()
self._InfoPage._Screen = self._Screen
self._InfoPage._Name = "Wifi info"
self._InfoPage._Name = MyLangManager.Tr("Wifi info")
self._InfoPage.Init()
def Draw(self):
self.ClearCanvas()
if len(self._WirelessList) == 0:
if len(self._MyList) == 0:
return
self._Ps.Draw()
for i in self._WirelessList:
for i in self._MyList:
i.Draw()
self._Scroller.UpdateSize( len(self._WirelessList)*NetItem._Height, self._PsIndex*NetItem._Height)
self._Scroller.UpdateSize( len(self._MyList)*NetItem._Height, self._PsIndex*NetItem._Height)
self._Scroller.Draw()
+2 -6
View File
@@ -7,8 +7,7 @@ import pygame
## local UI import
from UI.page import Page
from UI.label import Label
from UI.fonts import fonts
from UI.lang_manager import MyLangManager
# a item for List
# - - - - - - - - - - - --
# | Icon Text..... > |
@@ -34,9 +33,6 @@ class ListItem(object):
self._Icons = {}
self._Fonts = {}
def Init(self,text):
#self._Fonts["normal"] = fonts["veramono12"]
@@ -44,7 +40,7 @@ class ListItem(object):
l = Label()
l._PosX = 16
l.SetCanvasHWND(self._Parent._CanvasHWND)
text = MyLangManager.Tr(text)
l.Init(text,self._Fonts["normal"])
self._Labels["Text"] = l
+21 -62
View File
@@ -9,43 +9,17 @@ from libs.roundrects import aa_round_rect
from UI.constants import Width,Height
from UI.page import Page,PageSelector
from UI.label import Label
from UI.fonts import fonts
from UI.util_funcs import midRect,FileExists
from UI.keys_def import CurKeys
from UI.keys_def import CurKeys, IsKeyStartOrA, IsKeyMenuOrB
from UI.scroller import ListScroller
from UI.skin_manager import MySkinManager
from UI.lang_manager import MyLangManager
from UI.info_page_selector import InfoPageSelector
from list_item import ListItem
import myvars
class ListPageSelector(PageSelector):
_BackgroundColor = pygame.Color(131,199,219)
def __init__(self):
self._PosX = 0
self._PosY = 0
self._Height = 0
self._Width = Width
def AnimateDraw(self,x2,y2):
pass
def Draw(self):
idx = self._Parent._PsIndex
if idx < len(self._Parent._MyList):
x = 2
y = self._Parent._MyList[idx]._PosY+1
h = self._Parent._MyList[idx]._Height -3
self._PosX = x
self._PosY = y
self._Height = h
aa_round_rect(self._Parent._CanvasHWND,
(x,y,self._Width-4,h),self._BackgroundColor,4,0,self._BackgroundColor)
class ListPage(Page):
_Icons = {}
@@ -53,7 +27,7 @@ class ListPage(Page):
_FootMsg = ["Nav","","","Back","Enter"]
_MyList = []
_ListFontObj = fonts["varela15"]
_ListFontObj = MyLangManager.TrFont("varela15")
_Scroller = None
@@ -70,8 +44,9 @@ class ListPage(Page):
self._CanvasHWND = self._Screen._CanvasHWND
ps = ListPageSelector()
ps = InfoPageSelector()
ps._Parent = self
ps._PosX = 2
self._Ps = ps
self._PsIndex = 0
@@ -79,14 +54,22 @@ class ListPage(Page):
alist = [["","Airplane","Airplane Mode"],
["","PowerOptions","Power Options"],
["","Wifi","Wi-Fi"],
["","Sound","Sound Volume"],
["","Bluetooth","Bluetooth"],
["","Sound","Sound Volume"],
["","Brightness","BackLight Brightness"],
["","Storage",""],
["","Time","Timezone"],
["","Update", ""],
["","Languages","Languages"],
["","Notification","Notification"],
["","Update", "Update Launcher"],
["","Cores", "Retroarch cores manager"],
["","About", "About"],
["","PowerOFF","Power off"],
["","ButtonsLayout","Buttons Layout"],]
["","PowerOFF","Power OFF"],
["","ButtonsLayout","Buttons Layout"],
["","Skins","Theme Manager"],
["","LauncherGo","Switch to LauncherGo"],
["","Lima","GPU Driver Switch"],
["","GateWay","Network gateway switch"]]
start_x = 0
start_y = 0
@@ -122,30 +105,6 @@ class ListPage(Page):
self._Scroller._PosY = 2
self._Scroller.Init()
def ScrollUp(self):
if len(self._MyList) == 0:
return
self._PsIndex -= 1
if self._PsIndex < 0:
self._PsIndex = 0
cur_li = self._MyList[self._PsIndex]
if cur_li._PosY < 0:
for i in range(0, len(self._MyList)):
self._MyList[i]._PosY += self._MyList[i]._Height
def ScrollDown(self):
if len(self._MyList) == 0:
return
self._PsIndex +=1
if self._PsIndex >= len(self._MyList):
self._PsIndex = len(self._MyList) -1
cur_li = self._MyList[self._PsIndex]
if cur_li._PosY +cur_li._Height > self._Height:
for i in range(0,len(self._MyList)):
self._MyList[i]._PosY -= self._MyList[i]._Height
def Click(self):
cur_li = self._MyList[self._PsIndex]
if cur_li._LinkObj != None:
@@ -156,7 +115,7 @@ class ListPage(Page):
def KeyDown(self,event):
if event.key == CurKeys["A"] or event.key == CurKeys["Menu"]:
if IsKeyMenuOrB(event.key):
self.ReturnToUpLevelPage()
self._Screen.Draw()
self._Screen.SwapAndShow()
@@ -171,7 +130,7 @@ class ListPage(Page):
self._Screen.SwapAndShow()
if event.key == CurKeys["Enter"]:
if IsKeyStartOrA(event.key):
self.Click()
def Draw(self):
@@ -1,6 +0,0 @@
ROM=/home/cpi/games/MAME
ROM_SO=/home/cpi/apps/emulators/mame2003_plus_libretro.so
EXT=zip
LAUNCHER=retroarch -L
TITLE=MAME Roms
SO_URL=https://raw.githubusercontent.com/cuu/emulators/master/mame2003_plus_libretro.so.zip
@@ -1,6 +0,0 @@
ROM=/home/cpi/games/MGBA
ROM_SO=/home/cpi/apps/emulators/mgba_libretro.so
EXT=gba,gbx
LAUNCHER=retroarch -L
TITLE=MGBA Roms
SO_URL=https://raw.githubusercontent.com/cuu/emulators/master/mgba_libretro.so.zip
@@ -1,7 +0,0 @@
ROM=/home/cpi/games/NESTOPIA
ROM_SO=/home/cpi/apps/emulators/nestopia_libretro.so
EXT=zip,nes
LAUNCHER=retroarch -L
TITLE=NESTOPIA Roms
SO_URL=https://raw.githubusercontent.com/cuu/emulators/master/nestopia_libretro.so.zip
File diff suppressed because it is too large Load Diff
+2
View File
@@ -0,0 +1,2 @@
#!/bin/bash
retroarch
@@ -1 +1,2 @@
#!/bin/bash
retroarch -L /home/cpi/apps/emulators/nxengine_libretro.so /home/cpi/games/nxengine/cavestory/data
+6
View File
@@ -0,0 +1,6 @@
ROM=/home/cpi/games/ChocoDM
ROM_SO=
EXT=wad
LAUNCHER=chocolate-doom -iwad
TITLE=ChocoDM
SO_URL=
+4
View File
@@ -0,0 +1,4 @@
#!/bin/bash
cd /home/cpi/games/PICO-8/pico-8 || exit
SDL_VIDEODRIVER=x11 DISPLAY=:0 ./pico8_dyn -splore -draw_rect 32,0,256,240
+11
View File
@@ -0,0 +1,11 @@
#!/bin/bash
mkdir ~/.lexaloffle
cp -rf pico-8 ~/.lexaloffle
mkdir ~/.lexaloffle/pico-8/carts
ln -s ~/.lexaloffle/pico-8/carts/ ~/games/PICO-8/carts
touch .done
+19
View File
@@ -0,0 +1,19 @@
{
"GameDir": "/home/cpi/games/PICO-8/",
"InstallDir": "pico-8",
"NotFoundMsg": [
"Please purchase the PICO-8 \n|None|varela16",
"and copy it to the \"~/games/PICO-8\"|None|varela16"
],
"MD5": {
"pico-8_0.2.2_raspi.zip": "e2dba152bf507d337459e9316061411d",
"pico-8_0.1.11g_raspi.zip": "a3f2995cf117499f880bd964d6a0e1f2",
"pico-8_0.1.11g_amd64.zip": "6726141c784afd4a41be6b7414c1b932",
"pico-8_0.1.12_raspi.zip": "08eda95570e63089a2b9f5531503431e",
"pico-8_0.1.12c_raspi.zip": "1a62b0d7d4e4be65f89f23ec9757cb66",
"pico-8_0.1.12c2_raspi.zip": "7a878795472fa39304e9a10128c1f712",
"pico-8_0.2.0e_raspi.zip": "085edfecd111c2b195b878b2197afe7a",
"pico-8.zip": "whatever it takes"
},
"Post-Up": "bash Post-Up.sh"
}
@@ -0,0 +1,99 @@
// - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// Configuration for pico-8
//
// config.txt is read on startup and saved on exit.
// To generate the default config.txt, delete this file.
//
// - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// :: Video Settings
window_size 0 0 // window width, height
screen_size 0 0 // screen width, height (stretched to window)
show_fps 0 // Draw frames per second in the corner
// :: Window Settings
windowed 0 // 1 to start up in windowed mode
window_position -1 -1 // x and y position of window, or -1, -1 to let the window manager decide
frameless 0 // 1 to use a window with no frame
fullscreen_method 0 // 0 maximized window (linux) 1 borderless desktop-sized window 2 fullscreen
// :: System Settings
foreground_sleep_ms 1 // number of milliseconds to sleep each frame. Try 10 to conserve battery power
background_sleep_ms 20 // number of milliseconds to sleep each frame when running in the background
sessions 4 // number of times program has been run
// (scancode) hold this key down and left-click to simulate right-click
rmb_key 0 // 0 for none 226 for LALT
// 0:off 1: ignore SDL_TEXTINPUT and use SDL_GetKeyboardState instead (mapped to a US layout)
emulate_textinput 1
// Desktop for saving screenshots etc. Defaults to $HOME/Desktop
desktop_path
// :: Audio Settings
sound_volume 256 // 0..256
music_volume 256 // 0..256
mix_buffer_size 1024 // usually 1024. Try 2048 if you get choppy sound
// ::
version 0.1.11g
// Location of pico-8's root folder
root_path /home/cpi/.lexaloffle/pico-8/carts/
// Location of cartridge save data
cdata_path /home/cpi/.lexaloffle/pico-8/cdata/
// Specify which player index joystick control begins at (0..7)
joystick_index 0
// Custom keyboard scancodes for buttons. player0 0..6, player1 0..5
button_keys 0 0 0 0 13 14 0 0 0 0 0 0 0
// Play notes as they are plotted in frequency mode
live_notes 0
// iff 1: when using keyboard cursor, snap to closest pixel / map cel
cursor_snap 0
// maximum length of gif in seconds (1..120, default 8)
gif_len 8
// 0 classic 1 dark blue background in code editor
gui_theme 0
// scale of screenshots and gifs // 2 means 256x256
screenshot_scale 3
gif_scale 2
// when 1 can enter glyphs using shift-A..Z
shift_glyphs 1
// 0 for off. 1 to notify whenever unsaved changes are backed up
show_backup_messages 1
// 0 for off. 1 to allow control of a cart's framerate due to host machine's cpu capacity (recommended)
host_framerate_control 1
// filter splore content
// 0 for no filter (18+) 1 medium (13+) 2 maximum (kid-friendly)
content_filter 1
+90
View File
@@ -0,0 +1,90 @@
codo_init
platform: Linux
Found config.txt
01 window_size 0 0 // window width, height
02 screen_size 0 0 // screen width, height (stretched to window)
03 show_fps 0 // Draw frames per second in the corner
04 windowed 0 // 1 to start up in windowed mode
05 window_position -1 -1 // x and y position of window, or -1, -1 to let the window manager decide
new window position: -1, -1
06 frameless 0 // 1 to use a window with no frame
07 fullscreen_method 1 // 0 maximized window (linux) 1 borderless desktop-sized window 2 fullscreen
08 foreground_sleep_ms 1 // number of milliseconds to sleep each frame. Try 10 to conserve battery power
09 background_sleep_ms 20 // number of milliseconds to sleep each frame when running in the background
10 sessions 3 // number of times program has been run
11 rmb_key 0 // 0 for none 226 for LALT
12 emulate_textinput 1
13 desktop_path
14 sound_volume 256 // 0..256
15 music_volume 256 // 0..256
16 mix_buffer_size 1024 // usually 1024. Try 2048 if you get choppy sound
17 version 0.1.11g
18 root_path /home/cpi/.lexaloffle/pico-8/carts/
19 cdata_path /home/cpi/.lexaloffle/pico-8/cdata/
20 joystick_index 0
21 button_keys 0 0 0 0 0 0 0 0 0 0 0 0 0
22 live_notes 0
23 cursor_snap 0
24 gif_len 8
25 gui_theme 0
26 screenshot_scale 3
27 gif_scale 2
28 shift_glyphs 1
29 show_backup_messages 1
30 host_framerate_control 1
31 content_filter 1
codo_system_init
Compiled against SDL version: 2.0.7
Linked against SDL version: 2.0.5
Built-in video drivers: 0 x11 1 wayland 2 dummy
Current video driver: x11
Built-in render drivers:
Renderer opengl:
Flags: 0x0000000E ( | | )
Texture formats (1): ARGB8888
Renderer opengles2:
Flags: 0x0000000E ( | | )
Texture formats (4): ARGB8888, ABGR8888, RGB888, BGR888
Renderer software:
Flags: 0x00000009 ( | )
Texture formats (8): ARGB8888, ABGR8888, RGBA8888, BGRA8888, RGB888, BGR888, RGB565, RGB555
codo_reset_timer
codo_gui_init
codo_keys_init
codo_text_init
codo_video_init
codo_mouse_init
codo_joystick_init
Reading controller mappings: /home/cpi/.lexaloffle/pico-8/sdl_controllers.txt
searching for joysticks
found 0 joysticks
ok
ok
codo_load_pod: /home/cpi/apps/Menu/50_PICO-8/pico8.dat ok
codo_set_screen 128 128 8 100
set pixel_perfect 1
window size: 640 480
codo_plat_pi: forcing fullscreen mode
Current renderer:
Renderer opengl:
Flags: 0x0000000A ( | )
Texture formats (5): ARGB8888, YV12, IYUV, 0x3231564e, 0x3132564e
Max Texture Size: 8192x8192
codo_sound_init mix_buffer_size: 1024
codo_sound_init
SDL_INIT_AUDIO ok
SDL_OpenAudio ok
Built-in audio drivers: 0 pulseaudio 1 alsa 2 sndio 3 dsp 4 disk 5 dummy
Current audio driver: alsa
codo_exit
cmusic_stop
codo_main_exit
codo_config_save
codo_sound_exit
codo_video_exit
codo_joystick_exit
codo_system_exit
codo_items_created: 1023
ok
@@ -0,0 +1 @@
// add SDL2 game controller mappings to this file
+3
View File
@@ -0,0 +1,3 @@
#!/bin/bash
exit 0
@@ -7,9 +7,9 @@ from libs.roundrects import aa_round_rect
from UI.constants import ICON_TYPES
from UI.page import Page
from UI.label import Label
from UI.fonts import fonts
from UI.icon_item import IconItem
from UI.util_funcs import midRect
from UI.skin_manager import MySkinManager
# a item for List
# - - - - - - - - - - - --
@@ -31,7 +31,7 @@ class ListItemIcon(IconItem):
class ListItemLabel(Label):
_ActiveColor = pygame.Color(175,90,0)
_ActiveColor = MySkinManager.GiveColor('Active')
_Active = False
def Draw(self):
@@ -116,7 +116,7 @@ class ListItem(object):
self._Labels["Text"]._PosY = self._PosY + (self._Height - self._Labels["Text"]._Height)/2
pygame.draw.line(self._Parent._CanvasHWND,(169,169,169),(self._PosX,self._PosY+self._Height-1),(self._PosX+self._Width,self._PosY+self._Height-1),1)
pygame.draw.line(self._Parent._CanvasHWND,MySkinManager.GiveColor('Line'),(self._PosX,self._PosY+self._Height-1),(self._PosX+self._Width,self._PosY+self._Height-1),1)
if self._Playing == True:
self._Labels["Text"]._Active =True
@@ -127,7 +127,7 @@ class ListItem(object):
if self._PlayingProcess > 0:
seek_posx = int(self._Width * self._PlayingProcess/100.0)
pygame.draw.line(self._Parent._CanvasHWND,(255,169,169),(self._PosX,self._PosY+self._Height-2),(self._PosX+seek_posx,self._PosY+self._Height-2),2)
pygame.draw.line(self._Parent._CanvasHWND,MySkinManager.GiveColor('Active'),(self._PosX,self._PosY+self._Height-2),(self._PosX+seek_posx,self._PosY+self._Height-2),2)
else:
self._Labels["Text"].Draw()
@@ -15,11 +15,12 @@ from beeprint import pp
from UI.constants import Width,Height,ICON_TYPES
from UI.page import Page,PageSelector
from UI.label import Label
from UI.fonts import fonts
from UI.util_funcs import midRect
from UI.keys_def import CurKeys
from UI.keys_def import CurKeys, IsKeyStartOrA, IsKeyMenuOrB
from UI.icon_item import IconItem
from UI.icon_pool import MyIconPool
from UI.skin_manager import MySkinManager
from UI.lang_manager import MyLangManager
from threading import Thread
@@ -78,11 +79,11 @@ class MPDSpectrumPage(Page):
_Selector=None
_FootMsg = ["Nav","","","Back",""]
_MyList = []
_ListFont = fonts["veramono12"]
_SongFont = fonts["notosanscjk12"]
_ListFont = MyLangManager.TrFont("veramono12")
_SongFont = MyLangManager.TrFont("notosanscjk12")
_PIFI = None
_FIFO = None
_Color = pygame.Color(126,206,244)
_Color = MySkinManager.GiveColor('Front')
_GobjectIntervalId = -1
_Queue = None
_KeepReading = True
@@ -135,26 +136,26 @@ class MPDSpectrumPage(Page):
"""
self._BGpng = IconItem()
self._BGpng._ImgSurf = MyIconPool._Icons["sheep_bg"]
self._BGpng._ImgSurf = MyIconPool.GiveIconSurface("sheep_bg")
self._BGpng._MyType = ICON_TYPES["STAT"]
self._BGpng._Parent = self
self._BGpng.Adjust(0,0,self._BGwidth,self._BGheight,0)
self._SheepHead = IconItem()
self._SheepHead._ImgSurf = MyIconPool._Icons["sheep_head"]
self._SheepHead._ImgSurf = MyIconPool.GiveIconSurface("sheep_head")
self._SheepHead._MyType = ICON_TYPES["STAT"]
self._SheepHead._Parent = self
self._SheepHead.Adjust(0,0,self._SheepHeadW,self._SheepHeadH,0)
self._SheepBody = IconItem()
self._SheepBody._ImgSurf = MyIconPool._Icons["sheep_body"]
self._SheepBody._ImgSurf = MyIconPool.GiveIconSurface("sheep_body")
self._SheepBody._MyType = ICON_TYPES["STAT"]
self._SheepBody._Parent = self
self._SheepBody.Adjust(0,0,self._SheepBodyW,self._SheepBodyH,0)
"""
self._cwp_png = IconItem()
self._cwp_png._ImgSurf = MyIconPool._Icons["tape"]
self._cwp_png._ImgSurf = MyIconPool.GiveIconSurface("tape")
self._cwp_png._MyType = ICON_TYPES["STAT"]
self._cwp_png._Parent = self
self._cwp_png.Adjust(0,0,79,79,0)
@@ -162,21 +163,22 @@ class MPDSpectrumPage(Page):
self._song_title = Label()
self._song_title.SetCanvasHWND(self._RollCanvas)
self._song_title.Init("Untitled",self._SongFont,(255,255,255))
self._song_title.Init("Untitled",self._SongFont,MySkinManager.GiveColor('White'))
self._title = Label()
self._title.SetCanvasHWND(self._CanvasHWND)
self._title.Init("Title:",self._ListFont,(255,255,255))
self._title.Init("Title:",self._ListFont,MySkinManager.GiveColor('White'))
self._time = Label()
self._time.SetCanvasHWND(self._CanvasHWND)
self._time.Init("Time:",self._ListFont,(255,255,255))
self._time.Init("Time:",self._ListFont,MySkinManager.GiveColor('White'))
self._time2 = Label()
self._time2.SetCanvasHWND(self._CanvasHWND)
self._time2.Init("00:00-00:00",self._ListFont,(255,255,255))
self._time2.Init("00:00-00:00", self._ListFont,
MySkinManager.GiveColor('White'))
self.Start()
@@ -227,7 +229,7 @@ class MPDSpectrumPage(Page):
def ClearCanvas(self):
self._CanvasHWND.fill((0,0,0))
self._CanvasHWND.fill(MySkinManager.GiveColor('Black'))
def SgsSmooth(self):
passes = 1
@@ -263,7 +265,7 @@ class MPDSpectrumPage(Page):
def KeyDown(self,event):
if event.key == CurKeys["Menu"] or event.key == CurKeys["A"]:
if IsKeyMenuOrB(event.key):
try:
os.close(self._FIFO)
self._FIFO = None
@@ -279,13 +281,6 @@ class MPDSpectrumPage(Page):
self._Screen.Draw()
self._Screen.SwapAndShow()
if event.key == CurKeys["Start"]:
self._Screen.Draw()
self._Screen.SwapAndShow()
if event.key == CurKeys["Enter"]:
pass
def Draw(self):
self.ClearCanvas()
@@ -341,7 +336,7 @@ class MPDSpectrumPage(Page):
if self._RollCanvas != None:
# self._RollCanvas.fill((111,22,33))
self._RollCanvas.fill((0,0,0))
self._RollCanvas.fill(MySkinManager.GiveColor('Black'))
if self._song_title._Width > self._RollW:
if (self._song_title._PosX + self._song_title._Width) > self._RollW and self._frames % 30 == 0:
self._song_title._PosX -= 1
@@ -415,9 +410,9 @@ class MPDSpectrumPage(Page):
else:
self._capYPositionArray[i] = value
pygame.draw.rect(self._CanvasHWND,(255,255,255),(i*(bw+gap)+margin_left,self._Height-gap-self._capYPositionArray[i]-margin_bottom,bw,gap),0)
pygame.draw.rect(self._CanvasHWND,MySkinManager.GiveColor('White'),(i*(bw+gap)+margin_left,self._Height-gap-self._capYPositionArray[i]-margin_bottom,bw,gap),0)
pygame.draw.rect(self._CanvasHWND,(255,255,255),(i*(bw+gap)+margin_left,self._Height-value-gap-margin_bottom,bw,value+gap),0)
pygame.draw.rect(self._CanvasHWND,MySkinManager.GiveColor('White'),(i*(bw+gap)+margin_left,self._Height-value-gap-margin_bottom,bw,value+gap),0)
self._vis_values[i] -= 2
@@ -8,13 +8,14 @@ from libs.roundrects import aa_round_rect
from UI.constants import Width,Height,ICON_TYPES
from UI.page import Page,PageSelector
from UI.label import Label
from UI.fonts import fonts
from UI.icon_item import IconItem
from UI.util_funcs import midRect
from UI.keys_def import CurKeys
from UI.keys_def import CurKeys, IsKeyStartOrA, IsKeyMenuOrB
from UI.multi_icon_item import MultiIconItem
from UI.icon_pool import MyIconPool
from UI.scroller import ListScroller
from UI.skin_manager import MySkinManager
from UI.lang_manager import MyLangManager
from list_item import ListItem
@@ -48,7 +49,7 @@ class MusicLibStack:
return len(self.stack)
class ListPageSelector(PageSelector):
_BackgroundColor = pygame.Color(131,199,219)
_BackgroundColor = MySkinManager.GiveColor('Front')
def __init__(self):
self._PosX = 0
@@ -80,10 +81,10 @@ class MusicLibListPage(Page):
_Icons = {}
_Selector=None
_FootMsg = ["Nav","Scan","","Back","Add to Playlist"]
_FootMsg = ["Nav","","Scan","Back","Add to Playlist"]
_MyList = []
_SwapMyList = []
_ListFont = fonts["notosanscjk15"]
_ListFont = MyLangManager.TrFont("notosanscjk15")
_MyStack = None
_Scroller = None
@@ -171,7 +172,7 @@ class MusicLibListPage(Page):
self.SyncList("/")
icon_for_list = MultiIconItem()
icon_for_list._ImgSurf = MyIconPool._Icons["sys"]
icon_for_list._ImgSurf = MyIconPool.GiveIconSurface("sys")
icon_for_list._MyType = ICON_TYPES["STAT"]
icon_for_list._Parent = self
@@ -180,11 +181,11 @@ class MusicLibListPage(Page):
self._BGpng = IconItem()
self._BGpng._ImgSurf = MyIconPool._Icons["empty"]
self._BGpng._ImgSurf = MyIconPool.GiveIconSurface("empty")
self._BGpng._MyType = ICON_TYPES["STAT"]
self._BGpng._Parent = self
self._BGpng.AddLabel("Please upload data over Wi-Fi", fonts["varela22"])
self._BGpng.SetLableColor(pygame.Color(204,204,204))
self._BGpng.AddLabel(MyLangManager.Tr("Please upload data over Wi-Fi"), MyLangManager.TrFont("varela22"))
self._BGpng.SetLableColor(MySkinManager.GiveColor('Disabled'))
self._BGpng.Adjust(0,0,self._BGwidth,self._BGheight,0)
@@ -194,36 +195,8 @@ class MusicLibListPage(Page):
self._Scroller._PosY = 2
self._Scroller.Init()
def ScrollUp(self,Step=1):
if len(self._MyList) == 0:
return
tmp = self._PsIndex
self._PsIndex -= Step
if self._PsIndex < 0:
self._PsIndex = 0
dy = tmp-self._PsIndex
cur_li = self._MyList[self._PsIndex]
if cur_li._PosY < 0:
for i in range(0, len(self._MyList)):
self._MyList[i]._PosY += self._MyList[i]._Height*dy
def ScrollDown(self,Step=1):
if len(self._MyList) == 0:
return
tmp = self._PsIndex
self._PsIndex +=Step
if self._PsIndex >= len(self._MyList):
self._PsIndex = len(self._MyList) -1
dy = self._PsIndex - tmp
cur_li = self._MyList[self._PsIndex]
if cur_li._PosY +cur_li._Height > self._Height:
for i in range(0,len(self._MyList)):
self._MyList[i]._PosY -= self._MyList[i]._Height*dy
def Click(self):
self.RefreshPsIndex()
if len(self._MyList) == 0:
return
@@ -253,7 +226,7 @@ class MusicLibListPage(Page):
def KeyDown(self,event):
if event.key == CurKeys["Menu"] or event.key == CurKeys["Left"] or event.key == CurKeys["A"]:
if IsKeyMenuOrB(event.key) or event.key == CurKeys["Left"]:
self.ReturnToUpLevelPage()
self._Screen.Draw()
@@ -270,12 +243,12 @@ class MusicLibListPage(Page):
"""
if event.key == CurKeys["Right"]:
self.ScrollDown(Step=5)
self.FScrollDown(Step=5)
self._Screen.Draw()
self._Screen.SwapAndShow()
if event.key == CurKeys["Left"]:
self.ScrollUp(Step=5)
self.FScrollUp(Step=5)
self._Screen.Draw()
self._Screen.SwapAndShow()
"""
@@ -285,7 +258,7 @@ class MusicLibListPage(Page):
self._Screen.Draw()
self._Screen.SwapAndShow()
if event.key == CurKeys["Enter"]:
if IsKeyStartOrA(event.key):
self.Click()
def Draw(self):
@@ -10,10 +10,11 @@ from UI.constants import Width,Height,ICON_TYPES
from UI.page import Page,PageSelector
from UI.icon_item import IconItem
from UI.label import Label
from UI.fonts import fonts
from UI.util_funcs import midRect
from UI.keys_def import CurKeys
from UI.keys_def import CurKeys, IsKeyStartOrA, IsKeyMenuOrB
from UI.icon_pool import MyIconPool
from UI.skin_manager import MySkinManager
from UI.lang_manager import MyLangManager
from UI.scroller import ListScroller
@@ -22,7 +23,7 @@ from list_item import ListItem
import myvars
class ListPageSelector(PageSelector):
_BackgroundColor = pygame.Color(131,199,219)
_BackgroundColor = MySkinManager.GiveColor('Front')
def __init__(self):
self._PosX = 0
@@ -59,9 +60,9 @@ class PlayListPage(Page):
_Icons = {}
_Selector=None
_FootMsg = ["Nav","RTA","Remove","Back","Play/Pause"]
_FootMsg = ["Nav","Remove","RTA","Back","Play/Pause"]
_MyList = []
_ListFont = fonts["notosanscjk15"]
_ListFont = MyLangManager.TrFont("notosanscjk15")
_Scroller = None
_CurSongTime="0:0"
@@ -97,7 +98,11 @@ class PlayListPage(Page):
li._Fonts["normal"] = self._ListFont
if "title" in v:
li.Init( v["title"])
if isinstance(v["title"], (list,)):
li.Init(" | ".join(v["title"]))
else:
li.Init( v["title"])
if "file" in v:
li._Path = v["file"]
@@ -175,11 +180,11 @@ class PlayListPage(Page):
gobject.timeout_add(850,self.GObjectInterval)
self._BGpng = IconItem()
self._BGpng._ImgSurf = MyIconPool._Icons["heart"]
self._BGpng._ImgSurf = MyIconPool.GiveIconSurface("heart")
self._BGpng._MyType = ICON_TYPES["STAT"]
self._BGpng._Parent = self
self._BGpng.AddLabel("my favourites", fonts["varela18"])
self._BGpng.SetLableColor(pygame.Color(204,204,204))
self._BGpng.AddLabel(MyLangManager.Tr("my favorite music"), MyLangManager.TrFont("varela18"))
self._BGpng.SetLableColor(MySkinManager.GiveColor('Disabled'))
self._BGpng.Adjust(0,0,self._BGwidth,self._BGheight,0)
self._Scroller = ListScroller()
@@ -230,9 +235,10 @@ class PlayListPage(Page):
self._MyList[i]._PosY += self._Scrolled * self._MyList[i]._Height
def Click(self):
self.RefreshPsIndex()
if len(self._MyList) == 0:
return
cur_li = self._MyList[self._PsIndex]
play_pos_id = myvars.Poller.play(self._PsIndex)
@@ -246,7 +252,7 @@ class PlayListPage(Page):
self.SyncScroll()
def KeyDown(self,event):
if event.key == CurKeys["A"] or event.key == CurKeys["Menu"]:
if IsKeyMenuOrB(event.key):
if myvars.Poller != None:
myvars.Poller.stop()
self._CurSongTime=""
@@ -277,7 +283,7 @@ class PlayListPage(Page):
self._Screen.Draw()
self._Screen.SwapAndShow()
if event.key == CurKeys["Enter"]:
if IsKeyStartOrA(event.key):
self.Click()
if event.key == CurKeys["X"]: # start spectrum
@@ -1,31 +1,33 @@
# -*- coding: utf-8 -*-
import pygame
import validators
import commands
from UI.constants import Width,Height,ICON_TYPES
from UI.simple_name_space import SimpleNamespace
from UI.page import Page
from UI.label import Label
from UI.fonts import fonts
from UI.icon_item import IconItem
from UI.icon_pool import MyIconPool
from UI.keys_def import CurKeys
from UI.keys_def import CurKeys, IsKeyMenuOrB
from UI.skin_manager import MySkinManager
from UI.lang_manager import MyLangManager
from libs.DBUS import is_wifi_connected_now,get_wifi_ip
class TinyCloudPage(Page):
_FootMsg = ["Nav.","","","Back",""]
_FootMsg = ["Nav","","","Back",""]
_MyList = []
_ListFontObj = fonts["varela13"]
_ListFontObj = MyLangManager.TrFont("varela13")
_AList = {}
_Labels = {}
_Coords = {}
_URLColor = pygame.Color(51,166,255)
_TextColor = pygame.Color(83,83,83)
_URLColor = MySkinManager.GiveColor('URL')
_TextColor = MySkinManager.GiveColor('Text')
_Scrolled = 0
_PngSize = {}
@@ -59,32 +61,39 @@ class TinyCloudPage(Page):
self._Coords["forssh"] = SimpleNamespace()
self._Coords["forssh"].x = self._Coords["forID"].x
self._Coords["forssh"].y = 47
self._Coords["forssh"].y = 36
self._Coords["ssh_addr"] = SimpleNamespace()
self._Coords["ssh_addr"].x = self._Coords["forID"].x
self._Coords["ssh_addr"].y = 65
self._Coords["ssh_addr"].y = 54
self._Coords["forwin"] = SimpleNamespace()
self._Coords["forwin"].x = self._Coords["forID"].x
self._Coords["forwin"].y = 101
self._Coords["forwin"].y = 80
self._Coords["samba_games"] = SimpleNamespace()
self._Coords["samba_games"].x = self._Coords["forID"].x
self._Coords["samba_games"].y = 118
self._Coords["samba_games"].y = 97
self._Coords["samba_music"] = SimpleNamespace()
self._Coords["samba_music"].x = self._Coords["samba_games"].x
self._Coords["samba_music"].y = 136
self._Coords["samba_music"].y = 115
self._Coords["for_airplay"] = SimpleNamespace()
self._Coords["for_airplay"].x = self._Coords["forID"].x
self._Coords["for_airplay"].y = 173
self._Coords["for_airplay"].y = 140
self._Coords["airplay_name"] = SimpleNamespace()
self._Coords["airplay_name"].x = 68
self._Coords["airplay_name"].y = self._Coords["for_airplay"].y
self._Coords["for-usb-eth"] = SimpleNamespace()
self._Coords["for-usb-eth"].x = self._Coords["forID"].x
self._Coords["for-usb-eth"].y = 163
self._Coords["usb-eth-addr"] = SimpleNamespace()
self._Coords["usb-eth-addr"].x = 112
self._Coords["usb-eth-addr"].y = self._Coords["for-usb-eth"].y
self._Coords["bg"] = SimpleNamespace()
self._Coords["bg"].x = self._Width/2
@@ -108,6 +117,10 @@ class TinyCloudPage(Page):
else:
self._IP = "xxx.xxx.xxx.xxx"
hostname = commands.getstatusoutput("hostname")[1]
if hostname == "":
hostname = "clockworkpi"
labels = \
[["forssh","For ssh and scp:",self._ListFontObj,self._TextColor],
["ssh_addr","ssh cpi@%s" % self._IP, self._ListFontObj,self._URLColor],
@@ -118,7 +131,9 @@ class TinyCloudPage(Page):
["forKey", "Key:", self._ListFontObj, self._TextColor],
["key_and_pass", "cpi", self._ListFontObj, self._URLColor],
["for_airplay", "Airplay:", self._ListFontObj, self._TextColor],
["airplay_name","clockworkpi", self._ListFontObj, self._URLColor]]
["airplay_name",hostname, self._ListFontObj, self._URLColor],
["for-usb-eth","USB-Ethernet:", self._ListFontObj, self._TextColor],
["usb-eth-addr","192.168.10.1", self._ListFontObj, self._URLColor]]
for i in labels:
l = Label()
@@ -141,11 +156,11 @@ class TinyCloudPage(Page):
self._Width = self._Screen._Width ## equal to screen width
self._Height = self._Screen._Height
self._PngSize["bg"] = (253,132)
self._PngSize["bg"] = (253,114)
self._PngSize["online"] = (75,122)
bgpng = IconItem()
bgpng._ImgSurf = MyIconPool._Icons["needwifi_bg"]
bgpng._ImgSurf = MyIconPool.GiveIconSurface("needwifi_bg")
bgpng._MyType = ICON_TYPES["STAT"]
bgpng._Parent = self
bgpng.Adjust(0,0,self._PngSize["bg"][0],self._PngSize["bg"][1],0)
@@ -153,7 +168,7 @@ class TinyCloudPage(Page):
self._Icons["bg"] = bgpng
onlinepng = IconItem()
onlinepng._ImgSurf = MyIconPool._Icons["online"]
onlinepng._ImgSurf = MyIconPool.GiveIconSurface("online")
onlinepng._MyType = ICON_TYPES["STAT"]
onlinepng._Parent = self
onlinepng.Adjust(0,0,self._PngSize["online"][0], self._PngSize["online"][1],0)
@@ -163,12 +178,10 @@ class TinyCloudPage(Page):
self.SetLabels()
def KeyDown(self,event):
if event.key == CurKeys["A"] or event.key == CurKeys["Menu"]:
if self._FootMsg[3] == "Back":
self.ReturnToUpLevelPage()
self._Screen.Draw()
self._Screen.SwapAndShow()
return
if IsKeyMenuOrB(event.key):
self.ReturnToUpLevelPage()
self._Screen.Draw()
self._Screen.SwapAndShow()
def Draw(self):
if self._DrawOnce == False:
@@ -190,6 +203,12 @@ class TinyCloudPage(Page):
self._Labels["key_and_pass"].Draw()
else:
self._Labels["for-usb-eth"].NewCoord(self._Coords["for-usb-eth"].x+55, self._Coords["for-usb-eth"].y)
self._Labels["for-usb-eth"].Draw()
self._Labels["usb-eth-addr"].NewCoord(self._Coords["usb-eth-addr"].x+55, self._Coords["usb-eth-addr"].y)
self._Labels["usb-eth-addr"].Draw()
self._Icons["bg"].NewCoord(self._Coords["bg"].x, self._Coords["bg"].y)
self._Icons["bg"].Draw()
@@ -197,7 +216,7 @@ class TinyCloudPage(Page):
self._DrawOnce = True
if self._HWND != None:
self._HWND.fill((255,255,255))
self._HWND.fill(MySkinManager.GiveColor('White'))
self._HWND.blit(self._CanvasHWND,(self._PosX,self._PosY,self._Width, self._Height ) )
@@ -4,15 +4,17 @@ import pygame
#UI lib
from UI.constants import RUNSYS
from UI.keys_def import CurKeys
from UI.keys_def import CurKeys, IsKeyStartOrA, IsKeyMenuOrB
from UI.confirm_page import ConfirmPage
from UI.lang_manager import MyLangManager
from UI.skin_manager import MySkinManager
import config
class PowerOffConfirmPage(ConfirmPage):
_ConfirmText = "Awaiting Input"
_FootMsg = ["Nav","Reboot","","Cancel","Shutdown"]
_ConfirmText = MyLangManager.Tr("Awaiting Input")
_FootMsg = ["Nav","","Reboot","Cancel","Shutdown"]
def CheckBattery(self):
try:
@@ -41,17 +43,16 @@ class PowerOffConfirmPage(ConfirmPage):
def KeyDown(self,event):
if event.key == CurKeys["Menu"] or event.key == CurKeys["A"]:
if IsKeyMenuOrB(event.key):
self.ReturnToUpLevelPage()
self._Screen.Draw()
self._Screen.SwapAndShow()
if event.key == CurKeys["B"]:
if IsKeyStartOrA(event.key):
if self.CheckBattery() < 20:
cmdpath = "feh --bg-center gameshell/wallpaper/gameover.png;"
cmdpath = "feh --bg-center %s;" % MySkinManager.GiveWallpaper("gameover.png")
else:
cmdpath = "feh --bg-center gameshell/wallpaper/seeyou.png;"
cmdpath = "feh --bg-center %s;" % MySkinManager.GiveWallpaper("seeyou.png")
cmdpath += "sleep 3;"
@@ -61,7 +62,7 @@ class PowerOffConfirmPage(ConfirmPage):
pygame.event.post( pygame.event.Event(RUNSYS, message=cmdpath))
if event.key == CurKeys["X"]:
cmdpath = "feh --bg-center gameshell/wallpaper/seeyou.png;"
cmdpath = "feh --bg-center %s;" % MySkinManager.GiveWallpaper("seeyou.png")
cmdpath += "sleep 3;"
cmdpath += "sudo reboot"
pygame.event.post( pygame.event.Event(RUNSYS, message=cmdpath))
-1
View File
@@ -1 +0,0 @@
retroarch
-1
View File
@@ -1 +0,0 @@
chocolate-doom -iwad /home/cpi/games/FreeDM/freedoom1.wad
+10 -1
View File
@@ -46,7 +46,14 @@ sudo apt-get -y install mpd ncmpcpp git libuser
sudo apt-get -y install python-wicd wicd wicd-curses python-pycurl python-alsaaudio python-pygame python-gobject python-xlib
sudo apt-get -y install python-pip
sudo pip install validators numpy requests python-mpd2
sudo pip install validators numpy requests python-mpd2 beeprint
```
### With pip install and virtualenv
```
mkvirtualenv launcher
pip install -r requirements.txt
```
# Create “.mpd_cpi.conf” config
@@ -83,3 +90,5 @@ audio_output {
filesystem_charset "UTF-8"
```
+18
View File
@@ -0,0 +1,18 @@
max-connection-per-server=5
enable-rpc=true
rpc-allow-origin-all=true
rpc-listen-all=true
log-level=error
log=/tmp/aria.log
dir=/home/cpi/aria2download
daemon=true
allow-overwrite=true
split=1
max-concurrent-downloads=100
disk-cache=15M
timeout=600
retry-wait=30
max-tries=50
save-session-interval=10
disable-ipv6=true
save-session=/home/cpi/aria2download/aria.session.txt
Executable
BIN
View File
Binary file not shown.
+499
View File
@@ -0,0 +1,499 @@
-- Standard awesome library
local gears = require("gears")
local awful = require("awful")
require("awful.autofocus")
-- Widget and layout library
local wibox = require("wibox")
-- Theme handling library
local beautiful = require("beautiful")
-- Notification library
local naughty = require("naughty")
local menubar = require("menubar")
local hotkeys_popup = require("awful.hotkeys_popup").widget
-- Load Debian menu entries
-- require("debian.menu")
local capi = { screen = screen,
client = client }
local ipairs = ipairs
-- {{{ Error handling
-- Check if awesome encountered an error during startup and fell back to
-- another config (This code will only ever execute for the fallback config)
if awesome.startup_errors then
naughty.notify({ preset = naughty.config.presets.critical,
title = "Oops, there were errors during startup!",
text = awesome.startup_errors,timeout=3 })
end
-- Handle runtime errors after startup
do
local in_error = false
awesome.connect_signal("debug::error", function (err)
-- Make sure we don't go into an endless error loop
if in_error then return end
in_error = true
naughty.notify({ preset = naughty.config.presets.critical,
title = "Oops, an error happened!",
text = tostring(err),timeout=3 })
in_error = false
end)
end
-- }}}
theme_base = "/home/cpi/launcher/awesome"
-- Themes define colours, icons, font and wallpapers.
beautiful.init(theme_base .. "/themes/default/theme.lua")
-- This is used later as the default terminal and editor to run.
terminal = "xterm"
editor = os.getenv("EDITOR") or "editor"
editor_cmd = terminal .. " -e " .. editor
-- Default modkey.
-- Usually, Mod4 is the key with a logo between Control and Alt.
-- If you do not like this or do not have such a key,
-- I suggest you to remap Mod4 to another key using xmodmap or other tools.
-- However, you can use another modifier like Mod1, but it may interact with others.
modkey = "Mod4"
-- Table of layouts to cover with awful.layout.inc, order matters.
awful.layout.layouts = {
awful.layout.suit.floating,
awful.layout.suit.tile,
awful.layout.suit.tile.left,
awful.layout.suit.tile.bottom,
awful.layout.suit.tile.top,
awful.layout.suit.fair,
awful.layout.suit.fair.horizontal,
-- awful.layout.suit.spiral,
-- awful.layout.suit.spiral.dwindle,
--awful.layout.suit.max,
--awful.layout.suit.max.fullscreen,
awful.layout.suit.magnifier,
awful.layout.suit.corner.nw,
-- awful.layout.suit.corner.ne,
-- awful.layout.suit.corner.sw,
-- awful.layout.suit.corner.se,
}
-- }}}
-- {{{ Helper functions
local function tableHasKey(table,key)
return table[key] ~= nil
end
local function client_menu_toggle_fn()
local instance = nil
return function ()
if instance and instance.wibox.visible then
instance:hide()
instance = nil
else
instance = awful.menu.clients({ theme = { width = 250 } })
end
end
end
-- }}}
-- {{{ Menu
-- Create a launcher widget and a main menu
myawesomemenu = {
{ "edit config", editor_cmd .. " " .. awesome.conffile },
{ "restart", awesome.restart },
{ "quit", function() awesome.quit() end}
}
mymenu = {
{ "xterm" , "xterm"},
{ "xclock", "xclock"}
}
mymainmenu = awful.menu({ items = { { "awesome", myawesomemenu, beautiful.awesome_icon },
{ "MyStuff", mymenu },
{ "open terminal", terminal }
}
})
mylauncher = awful.widget.launcher({ image = beautiful.awesome_icon,
menu = mymainmenu })
-- Menubar configuration
menubar.utils.terminal = terminal -- Set the terminal for applications that require it
-- }}}
-- Keyboard map indicator and switcher
mykeyboardlayout = awful.widget.keyboardlayout()
-- Create a textclock widget
mytextclock = wibox.widget.textclock()
-- Create a wibox for each screen and add it
local taglist_buttons = awful.util.table.join(
awful.button({ }, 1, function(t) t:view_only() end),
awful.button({ modkey }, 1, function(t)
if client.focus then
client.focus:move_to_tag(t)
end
end),
awful.button({ }, 3, awful.tag.viewtoggle),
awful.button({ modkey }, 3, function(t)
if client.focus then
client.focus:toggle_tag(t)
end
end),
awful.button({ }, 4, function(t) awful.tag.viewnext(t.screen) end),
awful.button({ }, 5, function(t) awful.tag.viewprev(t.screen) end)
)
local tasklist_buttons = awful.util.table.join(
awful.button({ }, 1, function (c)
if c == client.focus then
c.minimized = true
else
-- Without this, the following
-- :isvisible() makes no sense
c.minimized = false
if not c:isvisible() and c.first_tag then
c.first_tag:view_only()
end
-- This will also un-minimize
-- the client, if needed
client.focus = c
c:raise()
end
end),
awful.button({ }, 3, client_menu_toggle_fn()),
awful.button({ }, 4, function ()
awful.client.focus.byidx(1)
end),
awful.button({ }, 5, function ()
awful.client.focus.byidx(-1)
end))
local function set_wallpaper(s)
-- Wallpaper
if beautiful.wallpaper then
local wallpaper = beautiful.wallpaper
local wallpaperpc = beautiful.wallpaperpc
-- If wallpaper is a function, call it with the screen
if type(wallpaper) == "function" then
wallpaper = wallpaper(s)
end
-- wallpaper only in PC
if s.geometry.width > 320 then
gears.wallpaper.centered(wallpaperpc, s, 1)
end
end
end
local function get_screen(s)
return s and screen[s]
end
function awful.widget.tasklist.filter.currenttags_without_gs(c, screen)
screen = get_screen(screen)
-- Only print client on the same screen as this widget
if get_screen(c.screen) ~= screen then return false end
-- Include sticky client too
if c.sticky then return true end
local tags = screen.tags
for _, t in ipairs(tags) do
if t.selected then
local ctags = c:tags()
for _, v in ipairs(ctags) do
if v == t then
if c.class:lower() == "run.py" or c.class:lower() == "gsnotify-arm" or c.class:lower() == "main" then
return false
else
return true
end
end
end
end
end
return false
end
screen.connect_signal("property::geometry", set_wallpaper)
awful.screen.connect_for_each_screen(function(s)
-- Wallpaper
set_wallpaper(s)
-- Each screen has its own tag table.
awful.tag({ "GameShell" }, s, awful.layout.layouts[1])
-- Create a promptbox for each screen
s.mypromptbox = awful.widget.prompt()
-- Create an imagebox widget which will contains an icon indicating which layout we're using.
-- We need one layoutbox per screen.
s.mylayoutbox = awful.widget.layoutbox(s)
s.mylayoutbox:buttons(awful.util.table.join(
awful.button({ }, 1, function () awful.layout.inc( 1) end),
awful.button({ }, 3, function () awful.layout.inc(-1) end),
awful.button({ }, 4, function () awful.layout.inc( 1) end),
awful.button({ }, 5, function () awful.layout.inc(-1) end)))
-- Create a taglist widget
s.mytaglist = awful.widget.taglist(s, awful.widget.taglist.filter.all, taglist_buttons)
-- Create a tasklist widget
s.mytasklist = awful.widget.tasklist(s, awful.widget.tasklist.filter.currenttags_without_gs, tasklist_buttons)
-- Create the wibox
if s.geometry.width > 320 then
s.mywibox = awful.wibar({ position = "bottom", screen = s,visible=true })
else
s.mywibox = awful.wibar({ position = "bottom", screen = s,visible=false })
end
-- Add widgets to the wibox
s.mywibox:setup {
layout = wibox.layout.align.horizontal,
{ -- Left widgets
layout = wibox.layout.fixed.horizontal,
mylauncher,
s.mytaglist,
s.mypromptbox,
},
s.mytasklist, -- Middle widget
{ -- Right widgets
layout = wibox.layout.fixed.horizontal,
mykeyboardlayout,
wibox.widget.systray(),
mytextclock,
s.mylayoutbox,
},
}
end)
-- }}}
-- {{{ Mouse bindings
root.buttons(awful.util.table.join(
awful.button({ }, 3, function () mymainmenu:toggle() end),
awful.button({ }, 4, awful.tag.viewnext),
awful.button({ }, 5, awful.tag.viewprev)
))
-- }}}
-- Bind all key numbers to tags.
-- Be careful: we use keycodes to make it works on any keyboard layout.
-- This should map on the top row of your keyboard, usually 1 to 9.
clientbuttons = awful.util.table.join(
awful.button({ }, 1, function (c) client.focus = c; c:raise() end),
awful.button({ modkey }, 1, awful.mouse.client.move),
awful.button({ modkey }, 3, awful.mouse.client.resize))
function titlebar_add_with_settings(c)
awful.titlebar.add(c, { modkey = modkey, height = 16, font = "Terminus 6"})
end
-- {{{ Rules
-- Rules to apply to new clients (through the "manage" signal).
awful.rules.rules = {
-- All clients will match this rule.
{ rule = { },
properties = {
size_hints_honor = false,
border_width = 0,
border_color = beautiful.border_normal,
focus = awful.client.focus.filter,
raise = true,
keys = clientkeys,
buttons = clientbuttons,
screen = awful.screen.preferred,
placement = awful.placement.no_overlap+awful.placement.no_offscreen
--placement = awful.placement.no_overlap+awful.placement.centered+awful.placement.no_offscreen
}
},
{ rule_any = {type = { "normal", "dialog"}
}, properties = { titlebars_enabled = true }
},
-- Floating clients.
{ rule_any = {
instance = {
"DTA", -- Firefox addon DownThemAll.
"copyq", -- Includes session name in class.
},
class = {
"Arandr",
"Gpick",
"Kruler",
"MessageWin", -- kalarm.
"Sxiv",
"Wpa_gui",
"pinentry",
"veromix",
"xtightvncviewer",
"xclock"
},
name = {
"Event Tester", -- xev.
},
role = {
"AlarmWindow", -- Thunderbird's calendar.
"pop-up", -- e.g. Google Chrome's (detached) Developer Tools.
}
}, properties = { ontop=false,floating = true,titlebars_enabled=false }},
}
-- }}}
local gs_class = {"run.py","gsnotify","gsnotify-arm","retroarch","GSPLauncher","main"}
-- {{{ Signals
-- Signal function to execute when a new client appears.
client.connect_signal("manage", function (c)
-- Set the windows at the slave,
-- i.e. put it at the end of others instead of setting it master.
-- if not awesome.startup then awful.client.setslave(c) end
if awesome.startup and
not c.size_hints.user_position
and not c.size_hints.program_position then
-- Prevent clients from being unreachable after screen count changes.
awful.placement.no_offscreen(c)
end
c.ontop=false
c.above=false
c.below=true
c.fullscreen=false
if tableHasKey(c,"class") and c.class:lower() == "gsnotify-arm" then
-- naughty.notify({text = "launched!",timeout = 2,position = "top_center"})
c.ontop = true
c.above = true
c.focusable=false
c.type = "notification"
c.floating = true
c:raise()
end
for s in capi.screen do
if s.geometry.width > 320 then
for _,v in pairs(gs_class) do
if tableHasKey(c,"class") and c.class:lower() == v then
awful.titlebar.hide(c)
if v ~= "gsnotify-arm" then
awful.placement.centered(c)
end
break
end
end
-- centered bg with offset of tasklist_bar's height
-- c.y= c.y + s.mywibox.height
else
-- hide all titlebars in GS
awful.titlebar.hide(c)
end
end
end)
-- Add a titlebar if titlebars_enabled is set to true in the rules.
client.connect_signal("request::titlebars", function(c)
-- buttons for the titlebar
local buttons = awful.util.table.join(
awful.button({ }, 1, function()
client.focus = c
c:raise()
awful.mouse.client.move(c)
end),
awful.button({ }, 3, function()
client.focus = c
c:raise()
awful.mouse.client.resize(c)
end)
)
awful.titlebar(c) : setup {
{ -- Left
awful.titlebar.widget.closebutton(c),
-- buttons = buttons,
layout = wibox.layout.fixed.horizontal
},
{ -- Middle
{ -- Title
align = "left",
widget = awful.titlebar.widget.titlewidget(c)
},
buttons = buttons,
layout = wibox.layout.flex.horizontal
},
{ -- Right
align="right",
awful.titlebar.widget.floatingbutton (c),
awful.titlebar.widget.maximizedbutton(c),
-- awful.titlebar.widget.stickybutton (c),
-- awful.titlebar.widget.ontopbutton (c),
-- awful.titlebar.widget.closebutton (c),
layout = wibox.layout.fixed.horizontal()
},
layout = wibox.layout.align.horizontal
}
end)
-- Enable sloppy focus, so that focus follows mouse.
client.connect_signal("focus",
function(c)
c.border_color = beautiful.border_normal
end)
client.connect_signal("unfocus", function(c) c.border_color = beautiful.border_normal end)
-- }}}
client.disconnect_signal("request::activate", awful.ewmh.activate)
function awful.ewmh.activate(c)
if tableHasKey(c,"class") == false then
return
end
if c:isvisible() then
if c.class:lower() ~= "gsnotify-arm" then
client.focus = c
end
if c.class:lower() == "retroarch" then
c:lower()
end
end
end
client.connect_signal("request::activate", awful.ewmh.activate)
client.connect_signal("property::fullscreen", function (c)
c.fullscreen = false
c.ontop = false
c.focus=false
c:lower()
end)
+3
View File
@@ -0,0 +1,3 @@
Background images:
Mikael Eriksson <mikael_eriksson@miffe.org>
Licensed under CC-BY-SA-3.0
Binary file not shown.

After

Width:  |  Height:  |  Size: 403 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 403 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 451 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 409 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 439 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 381 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 424 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 411 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 424 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 423 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 425 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 444 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 312 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 314 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 323 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 323 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 361 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 365 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 866 B

Some files were not shown because too many files have changed in this diff Show More