]> git.lizzy.rs Git - bspwm.git/commitdiff
Rename lightdm contrib stuff to freedesktop and install it
authorSven-Hendrik Haase <sh@lutzhaase.com>
Sat, 31 Jan 2015 03:43:12 +0000 (04:43 +0100)
committerSven-Hendrik Haase <sh@lutzhaase.com>
Sat, 31 Jan 2015 03:43:12 +0000 (04:43 +0100)
Makefile
contrib/freedesktop/bspwm-session [new file with mode: 0755]
contrib/freedesktop/bspwm.desktop [new file with mode: 0644]
contrib/lightdm/bspwm-session [deleted file]
contrib/lightdm/bspwm.desktop [deleted file]

index 85865ef4fb96d7b125c7990c6b7c45e861b646ea..7cd420a38dedb3f9aa6a20f40b2321cc2729fa4a 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -11,6 +11,7 @@ BINPREFIX = $(PREFIX)/bin
 MANPREFIX = $(PREFIX)/share/man
 BASHCPL = $(PREFIX)/share/bash-completion/completions
 ZSHCPL = $(PREFIX)/share/zsh/site-functions
+XSESSIONS = $(PREFIX)/share/xsessions
 
 WM_SRC = bspwm.c helpers.c settings.c monitor.c desktop.c tree.c stack.c history.c \
         events.c pointer.c window.c messages.c query.c restore.c rule.c ewmh.c subscribe.c
@@ -42,6 +43,7 @@ install:
        mkdir -p "$(DESTDIR)$(BINPREFIX)"
        cp -p bspwm "$(DESTDIR)$(BINPREFIX)"
        cp -p bspc "$(DESTDIR)$(BINPREFIX)"
+       cp -p contrib/freedesktop/bspwm-session "$(DESTDIR)$(BINPREFIX)"
        mkdir -p "$(DESTDIR)$(MANPREFIX)"/man1
        cp -p doc/bspwm.1 "$(DESTDIR)$(MANPREFIX)"/man1
        cp -Pp doc/bspc.1 "$(DESTDIR)$(MANPREFIX)"/man1
@@ -49,14 +51,18 @@ install:
        cp -p contrib/bash_completion "$(DESTDIR)$(BASHCPL)"/bspc
        mkdir -p "$(DESTDIR)$(ZSHCPL)"
        cp -p contrib/zsh_completion "$(DESTDIR)$(ZSHCPL)"/_bspc
+       mkdir -p "$(DESTDIR)$(XSESSIONS)"
+       cp -p contrib/freedesktop/bspwm.desktop "$(DESTDIR)$(XSESSIONS)"
 
 uninstall:
        rm -f "$(DESTDIR)$(BINPREFIX)"/bspwm
        rm -f "$(DESTDIR)$(BINPREFIX)"/bspc
+       rm -f "$(DESTDIR)$(BINPREFIX)"/bspwm-session
        rm -f "$(DESTDIR)$(MANPREFIX)"/man1/bspwm.1
        rm -f "$(DESTDIR)$(MANPREFIX)"/man1/bspc.1
        rm -f "$(DESTDIR)$(BASHCPL)"/bspc
        rm -f "$(DESTDIR)$(ZSHCPL)"/_bspc
+       rm -f "$(DESTDIR)$(XSESSIONS)"/bspwm.desktop
 
 doc:
        a2x -v -d manpage -f manpage -a revnumber=$(VERSION) doc/bspwm.1.txt
diff --git a/contrib/freedesktop/bspwm-session b/contrib/freedesktop/bspwm-session
new file mode 100755 (executable)
index 0000000..7167d85
--- /dev/null
@@ -0,0 +1,65 @@
+#! /bin/bash
+#
+# bspwm-session
+#
+# This script is a session launcher for bspwm.
+# It is based on similar scripts included with Openbox.
+
+if [ -n "$1" ]; then
+       echo "Usage: bspwm-session"
+       echo
+       exit 1
+fi
+
+# Multi-user support:
+state_prefix=${XDG_CACHE_HOME:-"$HOME/.cache"}
+mkdir -p "${state_prefix}"
+
+if [ ! -d "${state_prefix}" ]; then
+       echo "bspwm-session: cache directory ‘${state_prefix}‘ is missing."
+       echo
+       exit 1
+elif [ ! -w "${state_prefix}" ]; then
+       echo "bspwm-session: cache directory ‘${state_prefix}‘ is not writable."
+       echo
+       exit 1
+fi
+
+state_path=$(mktemp -d "${state_prefix}/bspwm-session.XXXXXX")
+
+if [ $? -ne 0 ]; then
+       echo "bspwm-session: failed to create state directory ‘${state_path}‘."
+       echo
+       exit 1
+fi
+
+export BSPWM_SOCKET=${state_path}/bspwm-socket
+
+# Trap: make sure everything started in ~/.config/bspwm/autostart is
+# signalled when this script exits or dies. Also clean up $state_path.
+function on_exit {
+       for child in $(jobs -p); do
+               jobs -p | grep -q $child && kill $child
+       done
+       # Extra paranoia
+       [[ -d "${state_path}" && -w "${state_path}" ]] && rm -rf -- "${state_path}"
+}
+
+trap on_exit EXIT SIGHUP SIGINT SIGTERM
+
+# Environment and autostart:
+source_these=(
+       "/etc/profile"
+       "${HOME}/.profile"
+       "${XDG_CONFIG_HOME:-"$HOME/.config"}/bspwm/autostart"
+)
+
+for file in "${source_these[@]}"; do
+       [ -r "${file}" ] && . "${file}"
+done
+
+# Launch sxhkd:
+sxhkd &
+
+# Launch bspwm:
+bspwm
diff --git a/contrib/freedesktop/bspwm.desktop b/contrib/freedesktop/bspwm.desktop
new file mode 100644 (file)
index 0000000..ec29cb3
--- /dev/null
@@ -0,0 +1,6 @@
+[Desktop Entry]
+Encoding=UTF-8
+Name=bspwm
+Comment=Launch a bspwm session
+Exec=/usr/bin/bspwm-session
+Type=XSession
diff --git a/contrib/lightdm/bspwm-session b/contrib/lightdm/bspwm-session
deleted file mode 100755 (executable)
index 7167d85..0000000
+++ /dev/null
@@ -1,65 +0,0 @@
-#! /bin/bash
-#
-# bspwm-session
-#
-# This script is a session launcher for bspwm.
-# It is based on similar scripts included with Openbox.
-
-if [ -n "$1" ]; then
-       echo "Usage: bspwm-session"
-       echo
-       exit 1
-fi
-
-# Multi-user support:
-state_prefix=${XDG_CACHE_HOME:-"$HOME/.cache"}
-mkdir -p "${state_prefix}"
-
-if [ ! -d "${state_prefix}" ]; then
-       echo "bspwm-session: cache directory ‘${state_prefix}‘ is missing."
-       echo
-       exit 1
-elif [ ! -w "${state_prefix}" ]; then
-       echo "bspwm-session: cache directory ‘${state_prefix}‘ is not writable."
-       echo
-       exit 1
-fi
-
-state_path=$(mktemp -d "${state_prefix}/bspwm-session.XXXXXX")
-
-if [ $? -ne 0 ]; then
-       echo "bspwm-session: failed to create state directory ‘${state_path}‘."
-       echo
-       exit 1
-fi
-
-export BSPWM_SOCKET=${state_path}/bspwm-socket
-
-# Trap: make sure everything started in ~/.config/bspwm/autostart is
-# signalled when this script exits or dies. Also clean up $state_path.
-function on_exit {
-       for child in $(jobs -p); do
-               jobs -p | grep -q $child && kill $child
-       done
-       # Extra paranoia
-       [[ -d "${state_path}" && -w "${state_path}" ]] && rm -rf -- "${state_path}"
-}
-
-trap on_exit EXIT SIGHUP SIGINT SIGTERM
-
-# Environment and autostart:
-source_these=(
-       "/etc/profile"
-       "${HOME}/.profile"
-       "${XDG_CONFIG_HOME:-"$HOME/.config"}/bspwm/autostart"
-)
-
-for file in "${source_these[@]}"; do
-       [ -r "${file}" ] && . "${file}"
-done
-
-# Launch sxhkd:
-sxhkd &
-
-# Launch bspwm:
-bspwm
diff --git a/contrib/lightdm/bspwm.desktop b/contrib/lightdm/bspwm.desktop
deleted file mode 100644 (file)
index ec29cb3..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-[Desktop Entry]
-Encoding=UTF-8
-Name=bspwm
-Comment=Launch a bspwm session
-Exec=/usr/bin/bspwm-session
-Type=XSession