Commit 86292a9e authored by B Stack's avatar B Stack

Merge branch 'monitor-bump' into 'master'

add move-to-next-monitor

See merge request !19
parents 7b319bc8 dc81fab7
# Readme for move-to-next-monitor
To take full advantage of move-to-next-monitor, set it up on a keyboard shortcut in your display manager settings.
A certain non-free operating system uses Super+Shift+Left and Super+Shift+Right.
| Command | Shortcut key |
| ------------------------------ | ----------------- |
| move-to-next-monitor | Super+Shift+right |
| move-to-next-monitor --reverse | Super+Shift+left |
### Alternatives
Alternative includes: [](
### Dependencies
Several dependencies are needed for this script to operate correctly.
* python
* wmctrl
* xdotool
* xprop
* xrandr
### Sources
The original concept was written by [jcOOke]( A reiteration in python was provided by [vanaoff](
The upstream package for this rpm is [](
# File: Makefile for move-to-next-monitor
# Location: bgscripts source package
# Author: bgstack15
# Startdate: 2018-11-30
# Title: Makefile for move-to-next-monitor source package
# Purpose: To use traditional Unix make utility
# History:
# Usage:
# Reference:
# Improve:
# Document:
# Dependencies:
APPNAME = move-to-next-monitor
prefix = /usr
BINDIR = $(DESTDIR)$(prefix)/bin
LICENSEDIR = $(DESTDIR)$(prefix)/share/licenses/$(APPNAME)
awkbin :=$(shell which awk)
cpbin :=$(shell which cp)
echobin :=$(shell which echo)
findbin :=$(shell which find)
grepbin :=$(shell which grep)
installbin :=$(shell which install)
rmbin :=$(shell which rm)
sedbin :=$(shell which sed)
sortbin :=$(shell which sort)
truebin :=$(shell which true)
${echobin} "No compilation in this package."
.PHONY: clean install install_files uninstall list
@$(MAKE) -pRrq -f $(lastword $(MAKEFILE_LIST)) : 2>/dev/null | ${awkbin} -v RS= -F: '/^# File/,/^# Finished Make data base/ {if ($$1 !~ "^[#.]") {print $$1}}' | ${sortbin} | ${grepbin} -E -v -e '^[^[:alnum:]]' -e '^$@$$'
install: install_files
${echobin} Installing files to ${DESTDIR}
${installbin} -d ${BINDIR} ${LICENSEDIR}
ls -l ${SRCDIR}
${installbin} -m '0755' ${SRCDIR}/move-to-next-monitor ${BINDIR}/
${installbin} -m '0644' ${SRCDIR}/LICENSE ${LICENSEDIR}/
${echobin} SRCDIR=${SRCDIR}
${rmbin} -f ${BINDIR}/move-to-next-monitor
# remove all installed directories that are now blank.
for word in $$( ${findbin} ${DESTDIR} -mindepth 1 -type d -printf '%p\n' | ${awkbin} '{print length, $$0 }' | ${sortbin} -rn | ${awkbin} '{print $$2}' ) ; do ${findbin} $${word} -mindepth 1 1>/dev/null 2>&1 | read 1>/dev/null 2>&1 || { rmdir "$${word}" 2>/dev/null || ${truebin} ; } ; done
-${echobin} "target $@ not implemented yet! Gotta say unh."
%global dummy_package 0
%global use_git 1
%if 0%{use_git}
%global tarballdir %{name}-master
%global tarballdir %{name}-%{version}
%define license_files %{srcdir}/License.txt
# turn off debug package
%define debug_package %{nil}
Name: move-to-next-monitor
Version: 0.0.1
Release: 1
BuildArch: noarch
Summary: Script that facilitates moving a window to the next monitor
Group: Utility
License: GPL-3.0
%if 0%{use_git}
# Source0:
Source1: move-to-next-monitor.Makefile
#Patch1: none.patch
Packager: Bgstack15 <>
BuildRequires: coreutils
Requires: python3
Requires: wmctrl
Requires: xdotool
Requires: xorg-x11-server-utils
Requires: xorg-x11-utils
move-to-next-monitor is a small script that makes it easy for display managers without this native functionality to provide it. You can assign a shortcut key in the display manager settings to the script to use it.
%setup -q -c
# copy in custom Makefile and adjust to use tarball directory as source directory
%{__cp} -p %{SOURCE1} ./Makefile
%{__sed} -i -r -e '/^SRCDIR\s*=/s:\$\(CURDIR\)\s*$:$(CURDIR)/'"%{tarballdir}"':;' ./Makefile
#pushd %{tarballdir}
#%patch0 -p1
# man page
%{__mkdir_p} %{buildroot}%{_pkgdocdir}
%{__cp} -p "%{SOURCE2}" %{buildroot}%{_pkgdocdir}/
%{__rm} -rf %{buildroot} || :
# is it a final removal?
#if test "$1" = "0" ;
%license LICENSE
%doc %{_pkgdocdir}/*
* Fri Nov 30 2018 B Stack <> 0.0.1-1
- initial package built
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment