mirror of
https://github.com/gwenhael-le-moine/sway-patched-tray-menu.git
synced 2024-12-28 22:23:42 +01:00
Merge branch 'master' of git://github.com/SirCmpwn/sway into new-command-aliases
This commit is contained in:
commit
b507462d1c
86 changed files with 147 additions and 57 deletions
|
@ -7,9 +7,6 @@ set(CMAKE_C_STANDARD 99)
|
||||||
set(CMAKE_C_EXTENSIONS OFF)
|
set(CMAKE_C_EXTENSIONS OFF)
|
||||||
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
|
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
|
||||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/bin)
|
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/bin)
|
||||||
add_definitions(
|
|
||||||
-D_GNU_SOURCE
|
|
||||||
)
|
|
||||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall")
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall")
|
||||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wextra")
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wextra")
|
||||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unused-parameter")
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unused-parameter")
|
||||||
|
@ -70,14 +67,6 @@ find_package(PAM)
|
||||||
|
|
||||||
find_package(LibInput REQUIRED)
|
find_package(LibInput REQUIRED)
|
||||||
|
|
||||||
find_package(Backtrace)
|
|
||||||
if(Backtrace_FOUND)
|
|
||||||
include_directories("${Backtrace_INCLUDE_DIRS}")
|
|
||||||
add_definitions(-DSWAY_Backtrace_FOUND=1)
|
|
||||||
set(LINK_LIBRARIES, "${LINK_LIBRARIES} ${Backtrace_LIBRARIES}")
|
|
||||||
set(SWAY_Backtrace_HEADER "${Backtrace_HEADER}")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if (CMAKE_SYSTEM_NAME STREQUAL FreeBSD)
|
if (CMAKE_SYSTEM_NAME STREQUAL FreeBSD)
|
||||||
find_package(EpollShim REQUIRED)
|
find_package(EpollShim REQUIRED)
|
||||||
endif (CMAKE_SYSTEM_NAME STREQUAL FreeBSD)
|
endif (CMAKE_SYSTEM_NAME STREQUAL FreeBSD)
|
||||||
|
|
|
@ -13,10 +13,3 @@ add_library(sway-common STATIC
|
||||||
)
|
)
|
||||||
|
|
||||||
target_link_libraries(sway-common m)
|
target_link_libraries(sway-common m)
|
||||||
|
|
||||||
if(Backtrace_FOUND)
|
|
||||||
set_target_properties(sway-common
|
|
||||||
PROPERTIES
|
|
||||||
COMPILE_FLAGS "-include ${Backtrace_HEADER}"
|
|
||||||
)
|
|
||||||
endif()
|
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
#include <stdint.h>
|
#define _POSIX_C_SOURCE 2
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
#include <stdint.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <sys/socket.h>
|
#include <sys/socket.h>
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
#define _POSIX_C_SOURCE 1
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <libgen.h>
|
#include <libgen.h>
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
#define _XOPEN_SOURCE 500
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <strings.h>
|
||||||
#include <wlc/wlc.h>
|
#include <wlc/wlc.h>
|
||||||
#include <xkbcommon/xkbcommon-names.h>
|
#include <xkbcommon/xkbcommon-names.h>
|
||||||
#include "log.h"
|
#include "log.h"
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
#define _XOPEN_SOURCE 500
|
||||||
#include <xkbcommon/xkbcommon.h>
|
#include <xkbcommon/xkbcommon.h>
|
||||||
#include <xkbcommon/xkbcommon-names.h>
|
#include <xkbcommon/xkbcommon-names.h>
|
||||||
#include <wlc/wlc.h>
|
#include <wlc/wlc.h>
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
#define _XOPEN_SOURCE 500
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include "sway/commands.h"
|
#include "sway/commands.h"
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <strings.h>
|
||||||
#include "sway/commands.h"
|
#include "sway/commands.h"
|
||||||
#include "sway/config.h"
|
#include "sway/config.h"
|
||||||
#include "log.h"
|
#include "log.h"
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <strings.h>
|
||||||
#include "sway/commands.h"
|
#include "sway/commands.h"
|
||||||
#include "log.h"
|
#include "log.h"
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
|
#define _XOPEN_SOURCE 500
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <strings.h>
|
||||||
#include "sway/commands.h"
|
#include "sway/commands.h"
|
||||||
#include "sway/config.h"
|
#include "sway/config.h"
|
||||||
#include "sway/ipc-server.h"
|
#include "sway/ipc-server.h"
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
#define _XOPEN_SOURCE 500
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include "sway/commands.h"
|
#include "sway/commands.h"
|
||||||
#include "log.h"
|
#include "log.h"
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
|
#define _XOPEN_SOURCE 500
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <strings.h>
|
||||||
#include "sway/commands.h"
|
#include "sway/commands.h"
|
||||||
#include "sway/config.h"
|
#include "sway/config.h"
|
||||||
#include "sway/ipc-server.h"
|
#include "sway/ipc-server.h"
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
#define _XOPEN_SOURCE 500
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include "sway/commands.h"
|
#include "sway/commands.h"
|
||||||
#include "list.h"
|
#include "list.h"
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <strings.h>
|
||||||
#include "sway/commands.h"
|
#include "sway/commands.h"
|
||||||
#include "log.h"
|
#include "log.h"
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <strings.h>
|
||||||
#include "sway/commands.h"
|
#include "sway/commands.h"
|
||||||
#include "log.h"
|
#include "log.h"
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
#define _XOPEN_SOURCE 500
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include "sway/commands.h"
|
#include "sway/commands.h"
|
||||||
#include "log.h"
|
#include "log.h"
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <strings.h>
|
||||||
#include "sway/commands.h"
|
#include "sway/commands.h"
|
||||||
#include "log.h"
|
#include "log.h"
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <strings.h>
|
||||||
#include "sway/commands.h"
|
#include "sway/commands.h"
|
||||||
#include "log.h"
|
#include "log.h"
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <strings.h>
|
||||||
#include "sway/commands.h"
|
#include "sway/commands.h"
|
||||||
#include "log.h"
|
#include "log.h"
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <strings.h>
|
||||||
#include "sway/commands.h"
|
#include "sway/commands.h"
|
||||||
#include "log.h"
|
#include "log.h"
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <strings.h>
|
||||||
#include "sway/commands.h"
|
#include "sway/commands.h"
|
||||||
#include "sway/container.h"
|
#include "sway/container.h"
|
||||||
#include "sway/focus.h"
|
#include "sway/focus.h"
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <strings.h>
|
||||||
#include "sway/commands.h"
|
#include "sway/commands.h"
|
||||||
#include "log.h"
|
#include "log.h"
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <strings.h>
|
||||||
#include "sway/commands.h"
|
#include "sway/commands.h"
|
||||||
#include "sway/container.h"
|
#include "sway/container.h"
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <strings.h>
|
||||||
#include "sway/commands.h"
|
#include "sway/commands.h"
|
||||||
#include "sway/container.h"
|
#include "sway/container.h"
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
#define _XOPEN_SOURCE 500
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <sys/wait.h>
|
#include <sys/wait.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <strings.h>
|
||||||
#include "sway/commands.h"
|
#include "sway/commands.h"
|
||||||
#include "sway/container.h"
|
#include "sway/container.h"
|
||||||
#include "sway/ipc-server.h"
|
#include "sway/ipc-server.h"
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <strings.h>
|
||||||
#include "sway/commands.h"
|
#include "sway/commands.h"
|
||||||
#include "sway/input_state.h"
|
#include "sway/input_state.h"
|
||||||
#include "list.h"
|
#include "list.h"
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
|
#define _XOPEN_SOURCE 500
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <strings.h>
|
||||||
#include "sway/commands.h"
|
#include "sway/commands.h"
|
||||||
#include "log.h"
|
#include "log.h"
|
||||||
#include "stringop.h"
|
#include "stringop.h"
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <strings.h>
|
||||||
#include <wlc/wlc.h>
|
#include <wlc/wlc.h>
|
||||||
#include "sway/commands.h"
|
#include "sway/commands.h"
|
||||||
#include "sway/container.h"
|
#include "sway/container.h"
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <strings.h>
|
||||||
#include "sway/commands.h"
|
#include "sway/commands.h"
|
||||||
|
|
||||||
struct cmd_results *cmd_focus_follows_mouse(int argc, char **argv) {
|
struct cmd_results *cmd_focus_follows_mouse(int argc, char **argv) {
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
#define _XOPEN_SOURCE 500
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include "sway/border.h"
|
#include "sway/border.h"
|
||||||
#include "sway/commands.h"
|
#include "sway/commands.h"
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
#define _XOPEN_SOURCE 500
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include "sway/commands.h"
|
#include "sway/commands.h"
|
||||||
#include "sway/criteria.h"
|
#include "sway/criteria.h"
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <strings.h>
|
||||||
#include "sway/commands.h"
|
#include "sway/commands.h"
|
||||||
|
|
||||||
struct cmd_results *cmd_force_focus_wrapping(int argc, char **argv) {
|
struct cmd_results *cmd_force_focus_wrapping(int argc, char **argv) {
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <strings.h>
|
||||||
#include "sway/commands.h"
|
#include "sway/commands.h"
|
||||||
#include "sway/container.h"
|
#include "sway/container.h"
|
||||||
#include "sway/focus.h"
|
#include "sway/focus.h"
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <strings.h>
|
||||||
#include "sway/commands.h"
|
#include "sway/commands.h"
|
||||||
|
|
||||||
struct cmd_results *cmd_hide_edge_borders(int argc, char **argv) {
|
struct cmd_results *cmd_hide_edge_borders(int argc, char **argv) {
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <strings.h>
|
||||||
#include "sway/commands.h"
|
#include "sway/commands.h"
|
||||||
#include "sway/input.h"
|
#include "sway/input.h"
|
||||||
#include "log.h"
|
#include "log.h"
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <strings.h>
|
||||||
#include "sway/commands.h"
|
#include "sway/commands.h"
|
||||||
#include "sway/input.h"
|
#include "sway/input.h"
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <strings.h>
|
||||||
#include "sway/commands.h"
|
#include "sway/commands.h"
|
||||||
#include "sway/input.h"
|
#include "sway/input.h"
|
||||||
#include "log.h"
|
#include "log.h"
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <strings.h>
|
||||||
#include "sway/commands.h"
|
#include "sway/commands.h"
|
||||||
#include "sway/input.h"
|
#include "sway/input.h"
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <strings.h>
|
||||||
#include "sway/commands.h"
|
#include "sway/commands.h"
|
||||||
#include "sway/input.h"
|
#include "sway/input.h"
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <strings.h>
|
||||||
#include "sway/commands.h"
|
#include "sway/commands.h"
|
||||||
#include "sway/input.h"
|
#include "sway/input.h"
|
||||||
#include "log.h"
|
#include "log.h"
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <strings.h>
|
||||||
#include "sway/commands.h"
|
#include "sway/commands.h"
|
||||||
#include "sway/input.h"
|
#include "sway/input.h"
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <strings.h>
|
||||||
#include "sway/commands.h"
|
#include "sway/commands.h"
|
||||||
#include "sway/input.h"
|
#include "sway/input.h"
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <strings.h>
|
||||||
#include "sway/commands.h"
|
#include "sway/commands.h"
|
||||||
#include "sway/input.h"
|
#include "sway/input.h"
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <strings.h>
|
||||||
#include "sway/commands.h"
|
#include "sway/commands.h"
|
||||||
#include "sway/input.h"
|
#include "sway/input.h"
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <strings.h>
|
||||||
#include "sway/commands.h"
|
#include "sway/commands.h"
|
||||||
#include "sway/input.h"
|
#include "sway/input.h"
|
||||||
#include "log.h"
|
#include "log.h"
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <strings.h>
|
||||||
#include "sway/commands.h"
|
#include "sway/commands.h"
|
||||||
#include "sway/container.h"
|
#include "sway/container.h"
|
||||||
#include "sway/layout.h"
|
#include "sway/layout.h"
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <strings.h>
|
||||||
#include "sway/commands.h"
|
#include "sway/commands.h"
|
||||||
#include "log.h"
|
#include "log.h"
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
|
#define _XOPEN_SOURCE 500
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <strings.h>
|
||||||
#include "sway/commands.h"
|
#include "sway/commands.h"
|
||||||
#include "sway/config.h"
|
#include "sway/config.h"
|
||||||
#include "sway/ipc-server.h"
|
#include "sway/ipc-server.h"
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <strings.h>
|
||||||
#include "sway/commands.h"
|
#include "sway/commands.h"
|
||||||
|
|
||||||
struct cmd_results *cmd_mouse_warping(int argc, char **argv) {
|
struct cmd_results *cmd_mouse_warping(int argc, char **argv) {
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <strings.h>
|
||||||
#include <wlc/wlc.h>
|
#include <wlc/wlc.h>
|
||||||
#include "sway/commands.h"
|
#include "sway/commands.h"
|
||||||
#include "sway/container.h"
|
#include "sway/container.h"
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <strings.h>
|
||||||
#include "sway/commands.h"
|
#include "sway/commands.h"
|
||||||
|
|
||||||
struct cmd_results *cmd_orientation(int argc, char **argv) {
|
struct cmd_results *cmd_orientation(int argc, char **argv) {
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
|
#define _XOPEN_SOURCE 500
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#include <libgen.h>
|
#include <libgen.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <strings.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <wordexp.h>
|
#include <wordexp.h>
|
||||||
#include "sway/commands.h"
|
#include "sway/commands.h"
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <strings.h>
|
||||||
#include <wlc/wlc.h>
|
#include <wlc/wlc.h>
|
||||||
#include "sway/commands.h"
|
#include "sway/commands.h"
|
||||||
#include "sway/layout.h"
|
#include "sway/layout.h"
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <strings.h>
|
||||||
#include <wlc/wlc.h>
|
#include <wlc/wlc.h>
|
||||||
#include "sway/commands.h"
|
#include "sway/commands.h"
|
||||||
#include "sway/container.h"
|
#include "sway/container.h"
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <strings.h>
|
||||||
#include "sway/commands.h"
|
#include "sway/commands.h"
|
||||||
|
|
||||||
struct cmd_results *cmd_seamless_mouse(int argc, char **argv) {
|
struct cmd_results *cmd_seamless_mouse(int argc, char **argv) {
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
|
#define _XOPEN_SOURCE 500
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <strings.h>
|
||||||
#include "sway/commands.h"
|
#include "sway/commands.h"
|
||||||
#include "sway/config.h"
|
#include "sway/config.h"
|
||||||
#include "list.h"
|
#include "list.h"
|
||||||
|
@ -14,7 +16,6 @@ static int compare_set_qsort(const void *_l, const void *_r) {
|
||||||
|
|
||||||
struct cmd_results *cmd_set(int argc, char **argv) {
|
struct cmd_results *cmd_set(int argc, char **argv) {
|
||||||
char *tmp;
|
char *tmp;
|
||||||
int size;
|
|
||||||
struct cmd_results *error = NULL;
|
struct cmd_results *error = NULL;
|
||||||
if (!config->reading) return cmd_results_new(CMD_FAILURE, "set", "Can only be used in config file.");
|
if (!config->reading) return cmd_results_new(CMD_FAILURE, "set", "Can only be used in config file.");
|
||||||
if ((error = checkarg(argc, "set", EXPECTED_AT_LEAST, 2))) {
|
if ((error = checkarg(argc, "set", EXPECTED_AT_LEAST, 2))) {
|
||||||
|
@ -24,13 +25,14 @@ struct cmd_results *cmd_set(int argc, char **argv) {
|
||||||
if (argv[0][0] != '$') {
|
if (argv[0][0] != '$') {
|
||||||
sway_log(L_INFO, "Warning: variable '%s' doesn't start with $", argv[0]);
|
sway_log(L_INFO, "Warning: variable '%s' doesn't start with $", argv[0]);
|
||||||
|
|
||||||
size = asprintf(&tmp, "%s%s", "$", argv[0]);
|
size_t size = snprintf(NULL, 0, "$%s", argv[0]);
|
||||||
if (size == -1) {
|
tmp = malloc(size + 1);
|
||||||
|
if (!tmp) {
|
||||||
return cmd_results_new(CMD_FAILURE, "set", "Not possible to create variable $'%s'", argv[0]);
|
return cmd_results_new(CMD_FAILURE, "set", "Not possible to create variable $'%s'", argv[0]);
|
||||||
}
|
}
|
||||||
|
snprintf(tmp, size, "$%s", argv[0]);
|
||||||
|
|
||||||
argv[0] = strdup(tmp);
|
argv[0] = tmp;
|
||||||
free(tmp);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
struct sway_variable *var = NULL;
|
struct sway_variable *var = NULL;
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <strings.h>
|
||||||
#include "sway/commands.h"
|
#include "sway/commands.h"
|
||||||
|
|
||||||
struct cmd_results *cmd_smart_gaps(int argc, char **argv) {
|
struct cmd_results *cmd_smart_gaps(int argc, char **argv) {
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <strings.h>
|
||||||
#include <wlc/wlc-render.h>
|
#include <wlc/wlc-render.h>
|
||||||
#include "sway/border.h"
|
#include "sway/border.h"
|
||||||
#include "sway/commands.h"
|
#include "sway/commands.h"
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
|
#define _XOPEN_SOURCE 500
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <strings.h>
|
||||||
#include "sway/commands.h"
|
#include "sway/commands.h"
|
||||||
#include "sway/config.h"
|
#include "sway/config.h"
|
||||||
#include "sway/input_state.h"
|
#include "sway/input_state.h"
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <strings.h>
|
||||||
#include "sway/commands.h"
|
#include "sway/commands.h"
|
||||||
|
|
||||||
struct cmd_results *cmd_ws_auto_back_and_forth(int argc, char **argv) {
|
struct cmd_results *cmd_ws_auto_back_and_forth(int argc, char **argv) {
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <strings.h>
|
||||||
#include "sway/commands.h"
|
#include "sway/commands.h"
|
||||||
|
|
||||||
struct cmd_results *cmd_workspace_layout(int argc, char **argv) {
|
struct cmd_results *cmd_workspace_layout(int argc, char **argv) {
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
#define _POSIX_C_SOURCE 200809L
|
||||||
|
#define _XOPEN_SOURCE 500
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
@ -12,6 +14,7 @@
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
#include <float.h>
|
#include <float.h>
|
||||||
#include <dirent.h>
|
#include <dirent.h>
|
||||||
|
#include <strings.h>
|
||||||
#include "wayland-desktop-shell-server-protocol.h"
|
#include "wayland-desktop-shell-server-protocol.h"
|
||||||
#include "sway/commands.h"
|
#include "sway/commands.h"
|
||||||
#include "sway/config.h"
|
#include "sway/config.h"
|
||||||
|
@ -528,11 +531,13 @@ bool load_main_config(const char *file, bool is_active) {
|
||||||
list_t *secconfigs = create_list();
|
list_t *secconfigs = create_list();
|
||||||
char *base = SYSCONFDIR "/sway/security.d/";
|
char *base = SYSCONFDIR "/sway/security.d/";
|
||||||
struct dirent *ent = readdir(dir);
|
struct dirent *ent = readdir(dir);
|
||||||
|
struct stat s;
|
||||||
while (ent != NULL) {
|
while (ent != NULL) {
|
||||||
if (ent->d_type == DT_REG) {
|
|
||||||
char *_path = malloc(strlen(ent->d_name) + strlen(base) + 1);
|
char *_path = malloc(strlen(ent->d_name) + strlen(base) + 1);
|
||||||
strcpy(_path, base);
|
strcpy(_path, base);
|
||||||
strcat(_path, ent->d_name);
|
strcat(_path, ent->d_name);
|
||||||
|
lstat(_path, &s);
|
||||||
|
if (S_ISREG(s.st_mode)) {
|
||||||
list_add(secconfigs, _path);
|
list_add(secconfigs, _path);
|
||||||
}
|
}
|
||||||
ent = readdir(dir);
|
ent = readdir(dir);
|
||||||
|
@ -542,7 +547,6 @@ bool load_main_config(const char *file, bool is_active) {
|
||||||
list_qsort(secconfigs, qstrcmp);
|
list_qsort(secconfigs, qstrcmp);
|
||||||
for (int i = 0; i < secconfigs->length; ++i) {
|
for (int i = 0; i < secconfigs->length; ++i) {
|
||||||
char *_path = secconfigs->items[i];
|
char *_path = secconfigs->items[i];
|
||||||
struct stat s;
|
|
||||||
if (stat(_path, &s) || s.st_uid != 0 || s.st_gid != 0 || (s.st_mode & 0777) != 0644) {
|
if (stat(_path, &s) || s.st_uid != 0 || s.st_gid != 0 || (s.st_mode & 0777) != 0644) {
|
||||||
sway_log(L_ERROR, "Refusing to load %s - it must be owned by root and mode 644", _path);
|
sway_log(L_ERROR, "Refusing to load %s - it must be owned by root and mode 644", _path);
|
||||||
success = false;
|
success = false;
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
#define _XOPEN_SOURCE 500
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
|
@ -18,7 +19,6 @@
|
||||||
#define ASSERT_NONNULL(PTR) \
|
#define ASSERT_NONNULL(PTR) \
|
||||||
sway_assert (PTR, #PTR "must be non-null")
|
sway_assert (PTR, #PTR "must be non-null")
|
||||||
|
|
||||||
|
|
||||||
static swayc_t *new_swayc(enum swayc_types type) {
|
static swayc_t *new_swayc(enum swayc_types type) {
|
||||||
// next id starts at 1 because 0 is assigned to root_container in layout.c
|
// next id starts at 1 because 0 is assigned to root_container in layout.c
|
||||||
static size_t next_id = 1;
|
static size_t next_id = 1;
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
#define _XOPEN_SOURCE 500
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
|
#define _XOPEN_SOURCE 500
|
||||||
#include <xkbcommon/xkbcommon.h>
|
#include <xkbcommon/xkbcommon.h>
|
||||||
|
#include <strings.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include <libinput.h>
|
#include <libinput.h>
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
#define _XOPEN_SOURCE 500
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#include <float.h>
|
#include <float.h>
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
|
|
|
@ -13,6 +13,13 @@
|
||||||
#include <json-c/json.h>
|
#include <json-c/json.h>
|
||||||
#include <list.h>
|
#include <list.h>
|
||||||
#include <libinput.h>
|
#include <libinput.h>
|
||||||
|
#ifdef __linux__
|
||||||
|
struct ucred {
|
||||||
|
pid_t pid;
|
||||||
|
uid_t uid;
|
||||||
|
gid_t gid;
|
||||||
|
};
|
||||||
|
#endif
|
||||||
#include "sway/ipc-json.h"
|
#include "sway/ipc-json.h"
|
||||||
#include "sway/ipc-server.h"
|
#include "sway/ipc-server.h"
|
||||||
#include "sway/security.h"
|
#include "sway/security.h"
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
#define _XOPEN_SOURCE 500
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
#define _XOPEN_SOURCE 500
|
||||||
|
#define _POSIX_C_SOURCE 200112L
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
#define _XOPEN_SOURCE 500
|
||||||
|
#include <string.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include "sway/config.h"
|
#include "sway/config.h"
|
||||||
|
|
|
@ -86,7 +86,7 @@ They are expected to be used with **bindsym** or at runtime through **swaymsg**(
|
||||||
_splitv_, _toggle split_, _stacking_, _tabbed_.
|
_splitv_, _toggle split_, _stacking_, _tabbed_.
|
||||||
|
|
||||||
**layout** auto <mode>::
|
**layout** auto <mode>::
|
||||||
Sets layout to one of the auto modes, i.e. one of _left_, right_, _top_,
|
Sets layout to one of the auto modes, i.e. one of _left_, _right_, _top_,
|
||||||
or _bottom_.
|
or _bottom_.
|
||||||
|
|
||||||
**layout** auto <next|prev>::
|
**layout** auto <next|prev>::
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
#define _XOPEN_SOURCE 500
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
|
|
|
@ -1,9 +1,11 @@
|
||||||
|
#define _XOPEN_SOURCE 500
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <sys/wait.h>
|
#include <sys/wait.h>
|
||||||
|
#include <signal.h>
|
||||||
#include <poll.h>
|
#include <poll.h>
|
||||||
#include "swaybar/ipc.h"
|
#include "swaybar/ipc.h"
|
||||||
#include "swaybar/render.h"
|
#include "swaybar/render.h"
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
|
#define _XOPEN_SOURCE 500
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include "wayland-desktop-shell-client-protocol.h"
|
#include "wayland-desktop-shell-client-protocol.h"
|
||||||
#include "log.h"
|
#include "log.h"
|
||||||
#include "swaybar/config.h"
|
#include "swaybar/config.h"
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
|
#define _XOPEN_SOURCE 500
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <strings.h>
|
||||||
#include <json-c/json.h>
|
#include <json-c/json.h>
|
||||||
#include "swaybar/config.h"
|
#include "swaybar/config.h"
|
||||||
#include "swaybar/ipc.h"
|
#include "swaybar/ipc.h"
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
#define _XOPEN_SOURCE 500
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
#define _XOPEN_SOURCE 500
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
#define _XOPEN_SOURCE 500
|
||||||
|
#include <string.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
#define _XOPEN_SOURCE 500
|
||||||
|
#define _POSIX_C_SOURCE 199309L
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
#define _XOPEN_SOURCE 500
|
||||||
#include "wayland-swaylock-client-protocol.h"
|
#include "wayland-swaylock-client-protocol.h"
|
||||||
#include <xkbcommon/xkbcommon.h>
|
#include <xkbcommon/xkbcommon.h>
|
||||||
#include <xkbcommon/xkbcommon-names.h>
|
#include <xkbcommon/xkbcommon-names.h>
|
||||||
|
@ -460,12 +461,16 @@ int main(int argc, char **argv) {
|
||||||
case 'u':
|
case 'u':
|
||||||
show_indicator = false;
|
show_indicator = false;
|
||||||
break;
|
break;
|
||||||
case 'f':
|
case 'f': {
|
||||||
if (daemon(0, 0) != 0) {
|
pid_t t = fork();
|
||||||
|
if (t == -1) {
|
||||||
sway_log(L_ERROR, "daemon call failed");
|
sway_log(L_ERROR, "daemon call failed");
|
||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
|
} else if (t > 0) {
|
||||||
|
exit(0);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
case 'r':
|
case 'r':
|
||||||
if (line_source != LINE_SOURCE_DEFAULT) {
|
if (line_source != LINE_SOURCE_DEFAULT) {
|
||||||
sway_log(L_ERROR, "line source options conflict");
|
sway_log(L_ERROR, "line source options conflict");
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
|
#define _XOPEN_SOURCE 500
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <strings.h>
|
||||||
#include <getopt.h>
|
#include <getopt.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <sys/un.h>
|
#include <sys/un.h>
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
#define _XOPEN_SOURCE 500
|
||||||
#include <wayland-client.h>
|
#include <wayland-client.h>
|
||||||
#include <cairo/cairo.h>
|
#include <cairo/cairo.h>
|
||||||
#include <pango/pangocairo.h>
|
#include <pango/pangocairo.h>
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <sys/mman.h>
|
#include <sys/mman.h>
|
||||||
|
#include <sys/types.h>
|
||||||
#include <sys/timerfd.h>
|
#include <sys/timerfd.h>
|
||||||
#include "wayland-desktop-shell-client-protocol.h"
|
#include "wayland-desktop-shell-client-protocol.h"
|
||||||
#include "wayland-swaylock-client-protocol.h"
|
#include "wayland-swaylock-client-protocol.h"
|
||||||
|
|
Loading…
Reference in a new issue