Commit Graph

51 Commits

Author SHA1 Message Date
Aaron LI 2cf3ba8713 Fix ioctl issues on DragonFly BSD and FreeBSD
* Include the correct headers on DragonFly BSD and FreeBSD.

* Use UTF-8 characters to draw border on Linux.

* Use ioctl 'KDGETLED' to get the keyboard LED states, which is supported
  on both Linux and BSD.

* Use macros 'LED_NUM' and 'LED_CAP' instead of hard-coded magic numbers.

NOTE:
This patch only allows 'ly' to build fine on DragonFly BSD and FreeBSD
(other *BSD not tested), and more works are needed to make 'ly' working
fine on BSD.
2018-10-07 16:29:14 +08:00
Aaron LI f2f3d7ca3d sub/termbox-next: Update to the latest version (#74)
The latest commit in termbox-next added BSD support, allowing
to add BSD support in ly.
2018-10-06 18:02:59 +00:00
Aaron LI 360bcb941a fixed gethostname() and freeaddrinfo() calls (#73)
* util: Fix gethostname() and freeaddrinfo() calls

I was passing the wrong size to the 'gethostname()' call because the
'hostname' is now dynamically allocated and cannot use 'sizeof' to get
its size.  This mistake causes that the obtained hostname is empty.

The 'freeaddrinfo()' was placed at the wrong place.  Fix it.

Fallback to '_POSIX_HOST_NAME_MAX' if 'sysconf()' fails.

Always null-terminate the 'hostname'.

* util: Simplify hostname() as no need to call getaddrinfo()

There is no need to call 'getaddrinfo()' to determine the hostname of
the machine, gethostname() is enough.  This simplify the 'hostname()'
a lot.

Trim a trailing whitespace by the way.
2018-10-06 15:06:21 +00:00
cylgom 9b2b6fd70b syntax and typos 2018-10-06 14:28:32 +02:00
cylgom c13ca1ceaa fixed linking flags 2018-10-06 12:46:44 +02:00
cylgom 4dee666dcf added version flag support 2018-10-05 17:42:20 +02:00
Aaron LI b0ce2ed635 login: pam_misc is not needed (#72)
The pam_misc header and library, as well as the pam_{modules,modutil}.h,
are not needed.  Meanwhile add the necessary headers.

Builds fine on both Linux and DragonFly BSD.
2018-10-05 15:23:57 +00:00
Aaron LI 04580c6ff0 makefile: Use $(MAKE) (#71)
This software requires GNU make to build, which is installed as "gmake"
on *BSD.  Therefore, use $(MAKE) to make sure that the same GNU make is
invoked to build the sub-project.
2018-10-05 15:22:27 +00:00
Aaron LI dcd0aa6de2 makefile: Also clean sub/termbox-next (#68) 2018-10-05 15:05:47 +00:00
Aaron LI 0476fa64b8 Do not use the non-standard clearenv() (#69)
The clearenv() is not POSIX-standard, and doesn't exist on *BSD.
Directly manipulate the 'environ' instead.
2018-10-05 15:04:58 +00:00
Aaron LI e2ed1e654b Use sysconf(_SC_HOST_NAME_MAX) to determine maximum hostname length (#70) 2018-10-05 15:03:24 +00:00
Aaron LI bd724eae93 Define feature macros only on Linux (#67)
In preparation for the BSD support.
See https://github.com/cylgom/termbox-next/pull/1
2018-10-05 14:57:47 +00:00
NamedKitten 51fb790578 Minor fixes to spelling and filenames. (#64)
Fix Additional Information
2018-09-27 11:40:43 +00:00
cylgom 7557e0fae1 removed config duplicate and added better defaults and documentation 2018-09-24 06:08:03 +00:00
Cylgom ce56ce4313
updated readme 2018-09-23 20:41:17 +00:00
cylgom 2c972e3f81 completed 2018-09-23 18:03:00 +00:00
cylgom 4714640096 restarted from scratch 2018-09-23 18:00:33 +00:00
Giuseppe Masino 87e46f3cc8 Ignore keystrokes that are not associated with a keysym (#45)
The system maps these to a keysym with value 0, causing ly to terminate.
With this fix it shouldn't happen anymore

Fixes #21
2018-08-11 14:04:56 +02:00
Cylgom 46e7ba70fe
removed version number from readme 2018-08-09 21:47:24 +02:00
cylgom 1b80551a72 updated screenshot 2018-07-09 19:32:43 +02:00
cylgom 260fac9fa2 fixed segfault at startup 2018-07-09 19:23:03 +02:00
cylgom 060184bcb4 initial work on wayland 2018-06-30 15:48:05 +02:00
cylgom c5f0d28481 changed the default greeting to hostname 2018-06-30 11:43:05 +02:00
cylgom 80080026db disabled manual editing of desktop field 2018-06-30 10:54:37 +02:00
cylgom 50fdfb036b added arrows around desktop field 2018-06-30 10:45:03 +02:00
Fnux fe6fb1d84f Better handling of the creation of LY_CFG_SAVE and normalization of exit codes (#35)
* Handle the creation of LY_CFG_SAVE before ncurses initialization

* Normalize exit codes
2018-06-29 20:35:58 +02:00
Devin J. Pohly d9a5768af2 don't switch fields on backspace (#27) 2018-05-05 18:56:28 +02:00
Devin J. Pohly d7b0251274 navigate fields with tab/backtab (#26) 2018-05-05 18:52:41 +02:00
Devin J. Pohly fddfd461ce have ncurses handle interrupt characters (#25)
As it was, didn't handle ^\ SIGQUIT or ^Z SIGTSTP.
2018-05-05 18:42:49 +02:00
Devin J. Pohly 44603c436e fix kernel_log() and add error-checking (#24)
execl requires a full path to the executable, and the arguments begin
with argv[0], not argv[1].
2018-05-05 18:37:24 +02:00
Devin J. Pohly efefdaf216 don't assume home is in /home/$USER (#23)
Adjustment of original fix by @abdullahibnnadjo
2018-05-05 18:34:04 +02:00
David Glanzman 5a01a6e38f added cc and make as dependencies in the README (#19) 2018-02-02 12:13:02 +01:00
cylgom af9302255e cleaned file perms 2017-11-26 11:52:54 +01:00
cylgom 53eba7a901 removed static libs option in micmak 2017-11-26 11:51:29 +01:00
cylgom bc68be81f0 used the micmak makefile for ly 2017-11-26 11:34:51 +01:00
cylgom 206901aeb5 finally fixed environment variables handling 2017-10-11 21:55:53 +02:00
Nathan JANCZEWSKI 603bd36ce6 Little explain if you have logs all across the screen (#10) 2017-10-11 06:37:13 +02:00
cylgom 53d147c4e2 added .xsession/display-setup support 2017-09-27 22:48:44 +02:00
cylgom 24ab6ed55f removed dbus launch and added required xdg runtime env var 2017-09-27 21:18:57 +02:00
cylgom beb6ef975c fixed linking flags position 2017-09-13 08:38:30 +02:00
cylgom 7d60509f77 included signal header 2017-09-13 08:37:10 +02:00
cylgom e50e90b7eb added controls section in readme 2017-09-05 09:05:21 +02:00
Niverton 4ae67ec1a0 savefile and group init fixes
Fixed truncated username
Init user groups before PAM credentials
2017-09-02 16:08:36 +02:00
cylgom ed477e61e3 added dbus support 2017-08-23 10:56:44 +02:00
cylgom 23aa373f27 fixed potential (harmless) error in desktop.c 2017-08-20 15:15:23 +02:00
cylgom 22f906bc3e fixed .xinitrc support 2017-08-20 15:07:07 +02:00
cylgom f521202310 updated makefile 2017-08-20 14:59:59 +02:00
cylgom 97ee90d34d removed ascii art 2017-06-03 16:49:26 +02:00
cylgom 2a4c4c28b1 removed strdup implementation 2017-06-01 18:46:50 +02:00
cylgom 7b82fbf22d changed installation path and method 2017-05-23 23:57:57 +02:00