Compare commits
No commits in common. "33d836ae4736458db89a4f9644182cfbcfa56822" and "258408945f253f36bc4fc96877c50c331bddf8d1" have entirely different histories.
33d836ae47
...
258408945f
@ -1,47 +0,0 @@
|
|||||||
font_size 8.0
|
|
||||||
background_opacity 0.75
|
|
||||||
|
|
||||||
# Create a new window splitting the space used by the existing one so that the two windows are placed one above the other
|
|
||||||
map f5 launch --location=hsplit
|
|
||||||
|
|
||||||
# Create a new window splitting the space used by the existing one so that the two windows are placed side by side
|
|
||||||
map f6 launch --location=vsplit
|
|
||||||
|
|
||||||
# Create a new window splitting the space used by the existing one so that the two windows are placed side by side if the existing window is wide or one above the other if the existing window is tall.
|
|
||||||
# map f4 launch --location=split
|
|
||||||
|
|
||||||
# Rotate the current split, chaging its split axis from vertical to horizontal or vice versa
|
|
||||||
map f7 layout_action rotate
|
|
||||||
|
|
||||||
# Move the active window in the indicated direction
|
|
||||||
# map shift+up move_window up
|
|
||||||
# map shift+left move_window left
|
|
||||||
# map shift+right move_window right
|
|
||||||
# map shift+down move_window down
|
|
||||||
|
|
||||||
# Move the active window to the indicated screen edge
|
|
||||||
# map ctrl+shift+up layout_action move_to_screen_edge top
|
|
||||||
# map ctrl+shift+left layout_action move_to_screen_edge left
|
|
||||||
# map ctrl+shift+right layout_action move_to_screen_edge right
|
|
||||||
# map ctrl+shift+down layout_action move_to_screen_edge bottom
|
|
||||||
|
|
||||||
# Switch focus to the neighboring window in the indicated direction
|
|
||||||
# map ctrl+left neighboring_window left
|
|
||||||
# map ctrl+right neighboring_window right
|
|
||||||
# map ctrl+up neighboring_window up
|
|
||||||
# map ctrl+down neighboring_window down
|
|
||||||
|
|
||||||
enabled_layouts splits:split_axis=horizontal
|
|
||||||
|
|
||||||
# map ctrl+left resize_window narrower
|
|
||||||
# map ctrl+right resize_window wider
|
|
||||||
# map ctrl+up resize_window taller
|
|
||||||
# map ctrl+down resize_window shorter 3
|
|
||||||
# Reset all windows in the tab to default sizes
|
|
||||||
# map ctrl+home resize_window reset
|
|
||||||
|
|
||||||
map ctrl+home resize_window narrower 10
|
|
||||||
map ctrl+end resize_window wider 10
|
|
||||||
map ctrl+up resize_window taller 10
|
|
||||||
map ctrl+down resize_window shorter 10
|
|
||||||
|
|
@ -1,14 +0,0 @@
|
|||||||
lxpolkit &
|
|
||||||
nitrogen --restore &
|
|
||||||
volumeicon &
|
|
||||||
xcompmgr &
|
|
||||||
tint2 -c ~/.config/tint2/aji.tint2rc &
|
|
||||||
|
|
||||||
# To disable the beep for all X applications:
|
|
||||||
xset b off &
|
|
||||||
|
|
||||||
# Unused app:
|
|
||||||
# plank &
|
|
||||||
# xscreensaver -no-splash &
|
|
||||||
# pidgin &
|
|
||||||
|
|
@ -1,889 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<!-- Do not edit this file, it will be overwritten on install.
|
|
||||||
Copy the file to $HOME/.config/openbox/ instead. -->
|
|
||||||
<openbox_config xmlns="http://openbox.org/3.4/rc" xmlns:xi="http://www.w3.org/2001/XInclude">
|
|
||||||
<resistance>
|
|
||||||
<strength>10</strength>
|
|
||||||
<screen_edge_strength>20</screen_edge_strength>
|
|
||||||
</resistance>
|
|
||||||
<focus>
|
|
||||||
<focusNew>yes</focusNew>
|
|
||||||
<!-- always try to focus new windows when they appear. other rules do
|
|
||||||
apply -->
|
|
||||||
<followMouse>no</followMouse>
|
|
||||||
<!-- move focus to a window when you move the mouse into it -->
|
|
||||||
<focusLast>yes</focusLast>
|
|
||||||
<!-- focus the last used window when changing desktops, instead of the one
|
|
||||||
under the mouse pointer. when followMouse is enabled -->
|
|
||||||
<underMouse>no</underMouse>
|
|
||||||
<!-- move focus under the mouse, even when the mouse is not moving -->
|
|
||||||
<focusDelay>200</focusDelay>
|
|
||||||
<!-- when followMouse is enabled, the mouse must be inside the window for
|
|
||||||
this many milliseconds (1000 = 1 sec) before moving focus to it -->
|
|
||||||
<raiseOnFocus>no</raiseOnFocus>
|
|
||||||
<!-- when followMouse is enabled, and a window is given focus by moving the
|
|
||||||
mouse into it, also raise the window -->
|
|
||||||
</focus>
|
|
||||||
<placement>
|
|
||||||
<policy>Smart</policy>
|
|
||||||
<!-- 'Smart' or 'UnderMouse' -->
|
|
||||||
<center>yes</center>
|
|
||||||
<!-- whether to place windows in the center of the free area found or
|
|
||||||
the top left corner -->
|
|
||||||
<monitor>Primary</monitor>
|
|
||||||
<!-- with Smart placement on a multi-monitor system, try to place new windows
|
|
||||||
on: 'Any' - any monitor, 'Mouse' - where the mouse is, 'Active' - where
|
|
||||||
the active window is, 'Primary' - only on the primary monitor -->
|
|
||||||
<primaryMonitor>1</primaryMonitor>
|
|
||||||
<!-- The monitor where Openbox should place popup dialogs such as the
|
|
||||||
focus cycling popup, or the desktop switch popup. It can be an index
|
|
||||||
from 1, specifying a particular monitor. Or it can be one of the
|
|
||||||
following: 'Mouse' - where the mouse is, or
|
|
||||||
'Active' - where the active window is -->
|
|
||||||
</placement>
|
|
||||||
<theme>
|
|
||||||
<name>Afterpiece</name>
|
|
||||||
<titleLayout>NLIMC</titleLayout>
|
|
||||||
<!--
|
|
||||||
available characters are NDSLIMC, each can occur at most once.
|
|
||||||
N: window icon
|
|
||||||
L: window label (AKA title).
|
|
||||||
I: iconify
|
|
||||||
M: maximize
|
|
||||||
C: close
|
|
||||||
S: shade (roll up/down)
|
|
||||||
D: omnipresent (on all desktops).
|
|
||||||
-->
|
|
||||||
<keepBorder>yes</keepBorder>
|
|
||||||
<animateIconify>yes</animateIconify>
|
|
||||||
<font place="ActiveWindow">
|
|
||||||
<name>sans</name>
|
|
||||||
<size>8</size>
|
|
||||||
<!-- font size in points -->
|
|
||||||
<weight>bold</weight>
|
|
||||||
<!-- 'bold' or 'normal' -->
|
|
||||||
<slant>normal</slant>
|
|
||||||
<!-- 'italic' or 'normal' -->
|
|
||||||
</font>
|
|
||||||
<font place="InactiveWindow">
|
|
||||||
<name>sans</name>
|
|
||||||
<size>8</size>
|
|
||||||
<!-- font size in points -->
|
|
||||||
<weight>bold</weight>
|
|
||||||
<!-- 'bold' or 'normal' -->
|
|
||||||
<slant>normal</slant>
|
|
||||||
<!-- 'italic' or 'normal' -->
|
|
||||||
</font>
|
|
||||||
<font place="MenuHeader">
|
|
||||||
<name>sans</name>
|
|
||||||
<size>9</size>
|
|
||||||
<!-- font size in points -->
|
|
||||||
<weight>normal</weight>
|
|
||||||
<!-- 'bold' or 'normal' -->
|
|
||||||
<slant>normal</slant>
|
|
||||||
<!-- 'italic' or 'normal' -->
|
|
||||||
</font>
|
|
||||||
<font place="MenuItem">
|
|
||||||
<name>sans</name>
|
|
||||||
<size>9</size>
|
|
||||||
<!-- font size in points -->
|
|
||||||
<weight>normal</weight>
|
|
||||||
<!-- 'bold' or 'normal' -->
|
|
||||||
<slant>normal</slant>
|
|
||||||
<!-- 'italic' or 'normal' -->
|
|
||||||
</font>
|
|
||||||
<font place="ActiveOnScreenDisplay">
|
|
||||||
<name>sans</name>
|
|
||||||
<size>9</size>
|
|
||||||
<!-- font size in points -->
|
|
||||||
<weight>bold</weight>
|
|
||||||
<!-- 'bold' or 'normal' -->
|
|
||||||
<slant>normal</slant>
|
|
||||||
<!-- 'italic' or 'normal' -->
|
|
||||||
</font>
|
|
||||||
<font place="InactiveOnScreenDisplay">
|
|
||||||
<name>sans</name>
|
|
||||||
<size>9</size>
|
|
||||||
<!-- font size in points -->
|
|
||||||
<weight>bold</weight>
|
|
||||||
<!-- 'bold' or 'normal' -->
|
|
||||||
<slant>normal</slant>
|
|
||||||
<!-- 'italic' or 'normal' -->
|
|
||||||
</font>
|
|
||||||
</theme>
|
|
||||||
<desktops>
|
|
||||||
<!-- this stuff is only used at startup, pagers allow you to change them
|
|
||||||
during a session
|
|
||||||
|
|
||||||
these are default values to use when other ones are not already set
|
|
||||||
by other applications, or saved in your session
|
|
||||||
|
|
||||||
use obconf if you want to change these without having to log out
|
|
||||||
and back in -->
|
|
||||||
<number>5</number>
|
|
||||||
<firstdesk>1</firstdesk>
|
|
||||||
<names>
|
|
||||||
<name>1</name>
|
|
||||||
<name>2</name>
|
|
||||||
<name>3</name>
|
|
||||||
<name>4</name>
|
|
||||||
<name>5</name>
|
|
||||||
</names>
|
|
||||||
<popupTime>875</popupTime>
|
|
||||||
<!-- The number of milliseconds to show the popup for when switching
|
|
||||||
desktops. Set this to 0 to disable the popup. -->
|
|
||||||
</desktops>
|
|
||||||
<resize>
|
|
||||||
<drawContents>yes</drawContents>
|
|
||||||
<popupShow>Nonpixel</popupShow>
|
|
||||||
<!-- 'Always', 'Never', or 'Nonpixel' (xterms and such) -->
|
|
||||||
<popupPosition>Center</popupPosition>
|
|
||||||
<!-- 'Center', 'Top', or 'Fixed' -->
|
|
||||||
<popupFixedPosition>
|
|
||||||
<!-- these are used if popupPosition is set to 'Fixed' -->
|
|
||||||
<x>10</x>
|
|
||||||
<!-- positive number for distance from left edge, negative number for
|
|
||||||
distance from right edge, or 'Center' -->
|
|
||||||
<y>10</y>
|
|
||||||
<!-- positive number for distance from top edge, negative number for
|
|
||||||
distance from bottom edge, or 'Center' -->
|
|
||||||
</popupFixedPosition>
|
|
||||||
</resize>
|
|
||||||
<!-- You can reserve a portion of your screen where windows will not cover when
|
|
||||||
they are maximized, or when they are initially placed.
|
|
||||||
Many programs reserve space automatically, but you can use this in other
|
|
||||||
cases. -->
|
|
||||||
<margins>
|
|
||||||
<top>0</top>
|
|
||||||
<bottom>0</bottom>
|
|
||||||
<left>0</left>
|
|
||||||
<right>0</right>
|
|
||||||
</margins>
|
|
||||||
<dock>
|
|
||||||
<position>TopLeft</position>
|
|
||||||
<!-- (Top|Bottom)(Left|Right|)|Top|Bottom|Left|Right|Floating -->
|
|
||||||
<floatingX>0</floatingX>
|
|
||||||
<floatingY>0</floatingY>
|
|
||||||
<noStrut>no</noStrut>
|
|
||||||
<stacking>Above</stacking>
|
|
||||||
<!-- 'Above', 'Normal', or 'Below' -->
|
|
||||||
<direction>Vertical</direction>
|
|
||||||
<!-- 'Vertical' or 'Horizontal' -->
|
|
||||||
<autoHide>no</autoHide>
|
|
||||||
<hideDelay>300</hideDelay>
|
|
||||||
<!-- in milliseconds (1000 = 1 second) -->
|
|
||||||
<showDelay>300</showDelay>
|
|
||||||
<!-- in milliseconds (1000 = 1 second) -->
|
|
||||||
<moveButton>Middle</moveButton>
|
|
||||||
<!-- 'Left', 'Middle', 'Right' -->
|
|
||||||
</dock>
|
|
||||||
<keyboard>
|
|
||||||
<chainQuitKey>C-g</chainQuitKey>
|
|
||||||
<!-- Keybindings for desktop switching -->
|
|
||||||
<keybind key="W-C-Left">
|
|
||||||
<action name="GoToDesktop">
|
|
||||||
<to>left</to>
|
|
||||||
<wrap>no</wrap>
|
|
||||||
</action>
|
|
||||||
</keybind>
|
|
||||||
<keybind key="W-C-Right">
|
|
||||||
<action name="GoToDesktop">
|
|
||||||
<to>right</to>
|
|
||||||
<wrap>no</wrap>
|
|
||||||
</action>
|
|
||||||
</keybind>
|
|
||||||
<keybind key="W-C-Up">
|
|
||||||
<action name="GoToDesktop">
|
|
||||||
<to>up</to>
|
|
||||||
<wrap>no</wrap>
|
|
||||||
</action>
|
|
||||||
</keybind>
|
|
||||||
<keybind key="W-C-Down">
|
|
||||||
<action name="GoToDesktop">
|
|
||||||
<to>down</to>
|
|
||||||
<wrap>no</wrap>
|
|
||||||
</action>
|
|
||||||
</keybind>
|
|
||||||
<keybind key="W-C-S-Left">
|
|
||||||
<action name="SendToDesktop">
|
|
||||||
<to>left</to>
|
|
||||||
<wrap>no</wrap>
|
|
||||||
</action>
|
|
||||||
</keybind>
|
|
||||||
<keybind key="W-C-S-Right">
|
|
||||||
<action name="SendToDesktop">
|
|
||||||
<to>right</to>
|
|
||||||
<wrap>no</wrap>
|
|
||||||
</action>
|
|
||||||
</keybind>
|
|
||||||
<keybind key="W-C-S-Up">
|
|
||||||
<action name="SendToDesktop">
|
|
||||||
<to>up</to>
|
|
||||||
<wrap>no</wrap>
|
|
||||||
</action>
|
|
||||||
</keybind>
|
|
||||||
<keybind key="W-C-S-Down">
|
|
||||||
<action name="SendToDesktop">
|
|
||||||
<to>down</to>
|
|
||||||
<wrap>no</wrap>
|
|
||||||
</action>
|
|
||||||
</keybind>
|
|
||||||
<keybind key="W-1">
|
|
||||||
<action name="GoToDesktop">
|
|
||||||
<to>1</to>
|
|
||||||
</action>
|
|
||||||
</keybind>
|
|
||||||
<keybind key="W-2">
|
|
||||||
<action name="GoToDesktop">
|
|
||||||
<to>2</to>
|
|
||||||
</action>
|
|
||||||
</keybind>
|
|
||||||
<keybind key="W-3">
|
|
||||||
<action name="GoToDesktop">
|
|
||||||
<to>3</to>
|
|
||||||
</action>
|
|
||||||
</keybind>
|
|
||||||
<keybind key="W-4">
|
|
||||||
<action name="GoToDesktop">
|
|
||||||
<to>4</to>
|
|
||||||
</action>
|
|
||||||
</keybind>
|
|
||||||
<keybind key="W-d">
|
|
||||||
<action name="ToggleShowDesktop"/>
|
|
||||||
</keybind>
|
|
||||||
<!-- Keybindings for windows -->
|
|
||||||
<keybind key="A-F4">
|
|
||||||
<action name="Close"/>
|
|
||||||
</keybind>
|
|
||||||
<keybind key="W-w">
|
|
||||||
<action name="Close"/>
|
|
||||||
</keybind>
|
|
||||||
<keybind key="A-Escape">
|
|
||||||
<action name="Lower"/>
|
|
||||||
<action name="FocusToBottom"/>
|
|
||||||
<action name="Unfocus"/>
|
|
||||||
</keybind>
|
|
||||||
<keybind key="A-space">
|
|
||||||
<action name="ShowMenu">
|
|
||||||
<menu>client-menu</menu>
|
|
||||||
</action>
|
|
||||||
</keybind>
|
|
||||||
<!-- Take a screenshot of the current window with scrot when Alt+Print are pressed -->
|
|
||||||
<keybind key="W-S-s">
|
|
||||||
<action name="Execute">
|
|
||||||
<command>scrot -s</command>
|
|
||||||
</action>
|
|
||||||
</keybind>
|
|
||||||
<!--
|
|
||||||
<keybind key="Print">
|
|
||||||
<action name="Execute">
|
|
||||||
<command>scrot</command>
|
|
||||||
</action>
|
|
||||||
</keybind>
|
|
||||||
-->
|
|
||||||
<!-- Keybindings for window switching -->
|
|
||||||
<keybind key="A-Tab">
|
|
||||||
<action name="NextWindow">
|
|
||||||
<finalactions>
|
|
||||||
<action name="Focus"/>
|
|
||||||
<action name="Raise"/>
|
|
||||||
<action name="Unshade"/>
|
|
||||||
</finalactions>
|
|
||||||
</action>
|
|
||||||
</keybind>
|
|
||||||
<keybind key="A-S-Tab">
|
|
||||||
<action name="PreviousWindow">
|
|
||||||
<finalactions>
|
|
||||||
<action name="Focus"/>
|
|
||||||
<action name="Raise"/>
|
|
||||||
<action name="Unshade"/>
|
|
||||||
</finalactions>
|
|
||||||
</action>
|
|
||||||
</keybind>
|
|
||||||
<keybind key="C-A-Tab">
|
|
||||||
<action name="NextWindow">
|
|
||||||
<panels>yes</panels>
|
|
||||||
<desktop>yes</desktop>
|
|
||||||
<finalactions>
|
|
||||||
<action name="Focus"/>
|
|
||||||
<action name="Raise"/>
|
|
||||||
<action name="Unshade"/>
|
|
||||||
</finalactions>
|
|
||||||
</action>
|
|
||||||
</keybind>
|
|
||||||
<keybind key="W-S-Left">
|
|
||||||
<action name="MoveResizeTo">
|
|
||||||
<monitor>1</monitor>
|
|
||||||
</action>
|
|
||||||
</keybind>
|
|
||||||
<keybind key="W-S-Right">
|
|
||||||
<action name="MoveResizeTo">
|
|
||||||
<monitor>2</monitor>
|
|
||||||
</action>
|
|
||||||
</keybind>
|
|
||||||
<!-- Keybindings for window switching with the arrow keys -->
|
|
||||||
<!--
|
|
||||||
<keybind key="W-Right">
|
|
||||||
<action name="DirectionalCycleWindows">
|
|
||||||
<direction>right</direction>
|
|
||||||
</action>
|
|
||||||
</keybind>
|
|
||||||
<keybind key="W-Left">
|
|
||||||
<action name="DirectionalCycleWindows">
|
|
||||||
<direction>left</direction>
|
|
||||||
</action>
|
|
||||||
</keybind>
|
|
||||||
<keybind key="W-Up">
|
|
||||||
<action name="DirectionalCycleWindows">
|
|
||||||
<direction>up</direction>
|
|
||||||
</action>
|
|
||||||
</keybind>
|
|
||||||
<keybind key="W-Down">
|
|
||||||
<action name="DirectionalCycleWindows">
|
|
||||||
<direction>down</direction>
|
|
||||||
</action>
|
|
||||||
</keybind>
|
|
||||||
-->
|
|
||||||
<!--
|
|
||||||
<keybind key="W-Left">
|
|
||||||
<action name="UnmaximizeFull"/>
|
|
||||||
<action name="MaximizeVert"/>
|
|
||||||
<action name="MoveReziseTo">
|
|
||||||
<width>50%</width>
|
|
||||||
</action>
|
|
||||||
<action name="MoveToEdgeWest"/>
|
|
||||||
</keybind>
|
|
||||||
|
|
||||||
<keybind key="W-Right">
|
|
||||||
<action name="UnmaximizeFull"/>
|
|
||||||
<action name="MaximizeVert"/>
|
|
||||||
<action name="MoveReziseTo">
|
|
||||||
<width>50%</width>
|
|
||||||
</action>
|
|
||||||
<action name="MoveToEdgeEast"/>
|
|
||||||
</keybind>
|
|
||||||
-->
|
|
||||||
<!-- Keybindings for running applications -->
|
|
||||||
<!--
|
|
||||||
<keybind key="W-e">
|
|
||||||
<action name="Execute">
|
|
||||||
<startupnotify>
|
|
||||||
<enabled>true</enabled>
|
|
||||||
<name>Konqueror</name>
|
|
||||||
</startupnotify>
|
|
||||||
<command>kfmclient openProfile filemanagement</command>
|
|
||||||
</action>
|
|
||||||
</keybind>
|
|
||||||
-->
|
|
||||||
<!-- Launch scrot when Print is pressed -->
|
|
||||||
<keybind key="Print">
|
|
||||||
<action name="Execute">
|
|
||||||
<command>scrot</command>
|
|
||||||
</action>
|
|
||||||
</keybind>
|
|
||||||
<keybind key="W-p">
|
|
||||||
<action name="Execute">
|
|
||||||
<command>rofi -modi drun,power:~/.config/rofi/power-menu -show drun -show-icons -theme Arc-Dark.rasi -columns 2 -lines 10 -window-thumbnail -font "Open Sans 18" -opacity -width 80 -sidebar-mode</command>
|
|
||||||
</action>
|
|
||||||
</keybind>
|
|
||||||
<keybind key="W-o">
|
|
||||||
<action name="Execute">
|
|
||||||
<command>rofi -modi drun,power:~/.config/rofi/power-menu -show power -show-icons -theme Arc-Dark.rasi -columns 2 -lines 10 -window-thumbnail -font "Open Sans 18" -opacity -width 80 -sidebar-mode</command>
|
|
||||||
</action>
|
|
||||||
</keybind>
|
|
||||||
<keybind key="W-l">
|
|
||||||
<action name="Execute">
|
|
||||||
<command>xscreensaver-command -lock</command>
|
|
||||||
</action>
|
|
||||||
</keybind>
|
|
||||||
<keybind key="W-k">
|
|
||||||
<action name="Execute">
|
|
||||||
<command>kitty</command>
|
|
||||||
</action>
|
|
||||||
</keybind>
|
|
||||||
<keybind key="W-e">
|
|
||||||
<action name="Execute">
|
|
||||||
<command>thunar</command>
|
|
||||||
</action>
|
|
||||||
</keybind>
|
|
||||||
<keybind key="W-i">
|
|
||||||
<action name="Execute">
|
|
||||||
<command>icecat</command>
|
|
||||||
</action>
|
|
||||||
</keybind>
|
|
||||||
<keybind key="W-comma">
|
|
||||||
<action name="Execute">
|
|
||||||
<command>pactl set-sink-volume @DEFAULT_SINK@ -5%</command>
|
|
||||||
</action>
|
|
||||||
</keybind>
|
|
||||||
<keybind key="W-period">
|
|
||||||
<action name="Execute">
|
|
||||||
<command>pactl set-sink-volume @DEFAULT_SINK@ +5%</command>
|
|
||||||
</action>
|
|
||||||
</keybind>
|
|
||||||
<!--
|
|
||||||
<keybind key="A-F2">
|
|
||||||
<action name="Execute">
|
|
||||||
<command>synapse</command>
|
|
||||||
</action>
|
|
||||||
</keybind>
|
|
||||||
-->
|
|
||||||
</keyboard>
|
|
||||||
<mouse>
|
|
||||||
<dragThreshold>1</dragThreshold>
|
|
||||||
<!-- number of pixels the mouse must move before a drag begins -->
|
|
||||||
<doubleClickTime>500</doubleClickTime>
|
|
||||||
<!-- in milliseconds (1000 = 1 second) -->
|
|
||||||
<screenEdgeWarpTime>400</screenEdgeWarpTime>
|
|
||||||
<!-- Time before changing desktops when the pointer touches the edge of the
|
|
||||||
screen while moving a window, in milliseconds (1000 = 1 second).
|
|
||||||
Set this to 0 to disable warping -->
|
|
||||||
<screenEdgeWarpMouse>false</screenEdgeWarpMouse>
|
|
||||||
<!-- Set this to TRUE to move the mouse pointer across the desktop when
|
|
||||||
switching due to hitting the edge of the screen -->
|
|
||||||
<context name="Frame">
|
|
||||||
<mousebind button="A-Left" action="Press">
|
|
||||||
<action name="Focus"/>
|
|
||||||
<action name="Raise"/>
|
|
||||||
</mousebind>
|
|
||||||
<mousebind button="A-Left" action="Click">
|
|
||||||
<action name="Unshade"/>
|
|
||||||
</mousebind>
|
|
||||||
<mousebind button="A-Left" action="Drag">
|
|
||||||
<action name="Move"/>
|
|
||||||
</mousebind>
|
|
||||||
<mousebind button="A-Right" action="Press">
|
|
||||||
<action name="Focus"/>
|
|
||||||
<action name="Raise"/>
|
|
||||||
<action name="Unshade"/>
|
|
||||||
</mousebind>
|
|
||||||
<mousebind button="A-Right" action="Drag">
|
|
||||||
<action name="Resize"/>
|
|
||||||
</mousebind>
|
|
||||||
<mousebind button="A-Middle" action="Press">
|
|
||||||
<action name="Lower"/>
|
|
||||||
<action name="FocusToBottom"/>
|
|
||||||
<action name="Unfocus"/>
|
|
||||||
</mousebind>
|
|
||||||
<mousebind button="A-Up" action="Click">
|
|
||||||
<action name="GoToDesktop">
|
|
||||||
<to>previous</to>
|
|
||||||
</action>
|
|
||||||
</mousebind>
|
|
||||||
<mousebind button="A-Down" action="Click">
|
|
||||||
<action name="GoToDesktop">
|
|
||||||
<to>next</to>
|
|
||||||
</action>
|
|
||||||
</mousebind>
|
|
||||||
<mousebind button="C-A-Up" action="Click">
|
|
||||||
<action name="GoToDesktop">
|
|
||||||
<to>previous</to>
|
|
||||||
</action>
|
|
||||||
</mousebind>
|
|
||||||
<mousebind button="C-A-Down" action="Click">
|
|
||||||
<action name="GoToDesktop">
|
|
||||||
<to>next</to>
|
|
||||||
</action>
|
|
||||||
</mousebind>
|
|
||||||
<mousebind button="A-S-Up" action="Click">
|
|
||||||
<action name="SendToDesktop">
|
|
||||||
<to>previous</to>
|
|
||||||
</action>
|
|
||||||
</mousebind>
|
|
||||||
<mousebind button="A-S-Down" action="Click">
|
|
||||||
<action name="SendToDesktop">
|
|
||||||
<to>next</to>
|
|
||||||
</action>
|
|
||||||
</mousebind>
|
|
||||||
</context>
|
|
||||||
<context name="Titlebar">
|
|
||||||
<mousebind button="Left" action="Drag">
|
|
||||||
<action name="Move"/>
|
|
||||||
</mousebind>
|
|
||||||
<mousebind button="Left" action="DoubleClick">
|
|
||||||
<action name="ToggleMaximize"/>
|
|
||||||
</mousebind>
|
|
||||||
<mousebind button="Up" action="Click">
|
|
||||||
<action name="if">
|
|
||||||
<shaded>no</shaded>
|
|
||||||
<then>
|
|
||||||
<action name="Shade"/>
|
|
||||||
<action name="FocusToBottom"/>
|
|
||||||
<action name="Unfocus"/>
|
|
||||||
<action name="Lower"/>
|
|
||||||
</then>
|
|
||||||
</action>
|
|
||||||
</mousebind>
|
|
||||||
<mousebind button="Down" action="Click">
|
|
||||||
<action name="if">
|
|
||||||
<shaded>yes</shaded>
|
|
||||||
<then>
|
|
||||||
<action name="Unshade"/>
|
|
||||||
<action name="Raise"/>
|
|
||||||
</then>
|
|
||||||
</action>
|
|
||||||
</mousebind>
|
|
||||||
</context>
|
|
||||||
<context name="Titlebar Top Right Bottom Left TLCorner TRCorner BRCorner BLCorner">
|
|
||||||
<mousebind button="Left" action="Press">
|
|
||||||
<action name="Focus"/>
|
|
||||||
<action name="Raise"/>
|
|
||||||
<action name="Unshade"/>
|
|
||||||
</mousebind>
|
|
||||||
<mousebind button="Middle" action="Press">
|
|
||||||
<action name="Lower"/>
|
|
||||||
<action name="FocusToBottom"/>
|
|
||||||
<action name="Unfocus"/>
|
|
||||||
</mousebind>
|
|
||||||
<mousebind button="Right" action="Press">
|
|
||||||
<action name="Focus"/>
|
|
||||||
<action name="Raise"/>
|
|
||||||
<action name="ShowMenu">
|
|
||||||
<menu>client-menu</menu>
|
|
||||||
</action>
|
|
||||||
</mousebind>
|
|
||||||
</context>
|
|
||||||
<context name="Top">
|
|
||||||
<mousebind button="Left" action="Drag">
|
|
||||||
<action name="Resize">
|
|
||||||
<edge>top</edge>
|
|
||||||
</action>
|
|
||||||
</mousebind>
|
|
||||||
</context>
|
|
||||||
<context name="Left">
|
|
||||||
<mousebind button="Left" action="Drag">
|
|
||||||
<action name="Resize">
|
|
||||||
<edge>left</edge>
|
|
||||||
</action>
|
|
||||||
</mousebind>
|
|
||||||
</context>
|
|
||||||
<context name="Right">
|
|
||||||
<mousebind button="Left" action="Drag">
|
|
||||||
<action name="Resize">
|
|
||||||
<edge>right</edge>
|
|
||||||
</action>
|
|
||||||
</mousebind>
|
|
||||||
</context>
|
|
||||||
<context name="Bottom">
|
|
||||||
<mousebind button="Left" action="Drag">
|
|
||||||
<action name="Resize">
|
|
||||||
<edge>bottom</edge>
|
|
||||||
</action>
|
|
||||||
</mousebind>
|
|
||||||
<mousebind button="Right" action="Press">
|
|
||||||
<action name="Focus"/>
|
|
||||||
<action name="Raise"/>
|
|
||||||
<action name="ShowMenu">
|
|
||||||
<menu>client-menu</menu>
|
|
||||||
</action>
|
|
||||||
</mousebind>
|
|
||||||
</context>
|
|
||||||
<context name="TRCorner BRCorner TLCorner BLCorner">
|
|
||||||
<mousebind button="Left" action="Press">
|
|
||||||
<action name="Focus"/>
|
|
||||||
<action name="Raise"/>
|
|
||||||
<action name="Unshade"/>
|
|
||||||
</mousebind>
|
|
||||||
<mousebind button="Left" action="Drag">
|
|
||||||
<action name="Resize"/>
|
|
||||||
</mousebind>
|
|
||||||
</context>
|
|
||||||
<context name="Client">
|
|
||||||
<mousebind button="Left" action="Press">
|
|
||||||
<action name="Focus"/>
|
|
||||||
<action name="Raise"/>
|
|
||||||
</mousebind>
|
|
||||||
<mousebind button="Middle" action="Press">
|
|
||||||
<action name="Focus"/>
|
|
||||||
<action name="Raise"/>
|
|
||||||
</mousebind>
|
|
||||||
<mousebind button="Right" action="Press">
|
|
||||||
<action name="Focus"/>
|
|
||||||
<action name="Raise"/>
|
|
||||||
</mousebind>
|
|
||||||
</context>
|
|
||||||
<context name="Icon">
|
|
||||||
<mousebind button="Left" action="Press">
|
|
||||||
<action name="Focus"/>
|
|
||||||
<action name="Raise"/>
|
|
||||||
<action name="Unshade"/>
|
|
||||||
<action name="ShowMenu">
|
|
||||||
<menu>client-menu</menu>
|
|
||||||
</action>
|
|
||||||
</mousebind>
|
|
||||||
<mousebind button="Right" action="Press">
|
|
||||||
<action name="Focus"/>
|
|
||||||
<action name="Raise"/>
|
|
||||||
<action name="ShowMenu">
|
|
||||||
<menu>client-menu</menu>
|
|
||||||
</action>
|
|
||||||
</mousebind>
|
|
||||||
</context>
|
|
||||||
<context name="AllDesktops">
|
|
||||||
<mousebind button="Left" action="Press">
|
|
||||||
<action name="Focus"/>
|
|
||||||
<action name="Raise"/>
|
|
||||||
<action name="Unshade"/>
|
|
||||||
</mousebind>
|
|
||||||
<mousebind button="Left" action="Click">
|
|
||||||
<action name="ToggleOmnipresent"/>
|
|
||||||
</mousebind>
|
|
||||||
</context>
|
|
||||||
<context name="Shade">
|
|
||||||
<mousebind button="Left" action="Press">
|
|
||||||
<action name="Focus"/>
|
|
||||||
<action name="Raise"/>
|
|
||||||
</mousebind>
|
|
||||||
<mousebind button="Left" action="Click">
|
|
||||||
<action name="ToggleShade"/>
|
|
||||||
</mousebind>
|
|
||||||
</context>
|
|
||||||
<context name="Iconify">
|
|
||||||
<mousebind button="Left" action="Press">
|
|
||||||
<action name="Focus"/>
|
|
||||||
<action name="Raise"/>
|
|
||||||
</mousebind>
|
|
||||||
<mousebind button="Left" action="Click">
|
|
||||||
<action name="Iconify"/>
|
|
||||||
</mousebind>
|
|
||||||
</context>
|
|
||||||
<context name="Maximize">
|
|
||||||
<mousebind button="Left" action="Press">
|
|
||||||
<action name="Focus"/>
|
|
||||||
<action name="Raise"/>
|
|
||||||
<action name="Unshade"/>
|
|
||||||
</mousebind>
|
|
||||||
<mousebind button="Middle" action="Press">
|
|
||||||
<action name="Focus"/>
|
|
||||||
<action name="Raise"/>
|
|
||||||
<action name="Unshade"/>
|
|
||||||
</mousebind>
|
|
||||||
<mousebind button="Right" action="Press">
|
|
||||||
<action name="Focus"/>
|
|
||||||
<action name="Raise"/>
|
|
||||||
<action name="Unshade"/>
|
|
||||||
</mousebind>
|
|
||||||
<mousebind button="Left" action="Click">
|
|
||||||
<action name="ToggleMaximize"/>
|
|
||||||
</mousebind>
|
|
||||||
<mousebind button="Middle" action="Click">
|
|
||||||
<action name="ToggleMaximize">
|
|
||||||
<direction>vertical</direction>
|
|
||||||
</action>
|
|
||||||
</mousebind>
|
|
||||||
<mousebind button="Right" action="Click">
|
|
||||||
<action name="ToggleMaximize">
|
|
||||||
<direction>horizontal</direction>
|
|
||||||
</action>
|
|
||||||
</mousebind>
|
|
||||||
</context>
|
|
||||||
<context name="Close">
|
|
||||||
<mousebind button="Left" action="Press">
|
|
||||||
<action name="Focus"/>
|
|
||||||
<action name="Raise"/>
|
|
||||||
<action name="Unshade"/>
|
|
||||||
</mousebind>
|
|
||||||
<mousebind button="Left" action="Click">
|
|
||||||
<action name="Close"/>
|
|
||||||
</mousebind>
|
|
||||||
</context>
|
|
||||||
<context name="Desktop">
|
|
||||||
<mousebind button="Up" action="Click">
|
|
||||||
<action name="GoToDesktop">
|
|
||||||
<to>previous</to>
|
|
||||||
</action>
|
|
||||||
</mousebind>
|
|
||||||
<mousebind button="Down" action="Click">
|
|
||||||
<action name="GoToDesktop">
|
|
||||||
<to>next</to>
|
|
||||||
</action>
|
|
||||||
</mousebind>
|
|
||||||
<mousebind button="A-Up" action="Click">
|
|
||||||
<action name="GoToDesktop">
|
|
||||||
<to>previous</to>
|
|
||||||
</action>
|
|
||||||
</mousebind>
|
|
||||||
<mousebind button="A-Down" action="Click">
|
|
||||||
<action name="GoToDesktop">
|
|
||||||
<to>next</to>
|
|
||||||
</action>
|
|
||||||
</mousebind>
|
|
||||||
<mousebind button="C-A-Up" action="Click">
|
|
||||||
<action name="GoToDesktop">
|
|
||||||
<to>previous</to>
|
|
||||||
</action>
|
|
||||||
</mousebind>
|
|
||||||
<mousebind button="C-A-Down" action="Click">
|
|
||||||
<action name="GoToDesktop">
|
|
||||||
<to>next</to>
|
|
||||||
</action>
|
|
||||||
</mousebind>
|
|
||||||
<mousebind button="Left" action="Press">
|
|
||||||
<action name="Focus"/>
|
|
||||||
<action name="Raise"/>
|
|
||||||
</mousebind>
|
|
||||||
<mousebind button="Right" action="Press">
|
|
||||||
<action name="Focus"/>
|
|
||||||
<action name="Raise"/>
|
|
||||||
</mousebind>
|
|
||||||
</context>
|
|
||||||
<context name="Root">
|
|
||||||
<!-- Menus -->
|
|
||||||
<mousebind button="Middle" action="Press">
|
|
||||||
<action name="ShowMenu">
|
|
||||||
<menu>client-list-combined-menu</menu>
|
|
||||||
</action>
|
|
||||||
</mousebind>
|
|
||||||
<mousebind button="Right" action="Press">
|
|
||||||
<action name="ShowMenu">
|
|
||||||
<menu>root-menu</menu>
|
|
||||||
</action>
|
|
||||||
</mousebind>
|
|
||||||
</context>
|
|
||||||
<context name="MoveResize">
|
|
||||||
<mousebind button="Up" action="Click">
|
|
||||||
<action name="GoToDesktop">
|
|
||||||
<to>previous</to>
|
|
||||||
</action>
|
|
||||||
</mousebind>
|
|
||||||
<mousebind button="Down" action="Click">
|
|
||||||
<action name="GoToDesktop">
|
|
||||||
<to>next</to>
|
|
||||||
</action>
|
|
||||||
</mousebind>
|
|
||||||
<mousebind button="A-Up" action="Click">
|
|
||||||
<action name="GoToDesktop">
|
|
||||||
<to>previous</to>
|
|
||||||
</action>
|
|
||||||
</mousebind>
|
|
||||||
<mousebind button="A-Down" action="Click">
|
|
||||||
<action name="GoToDesktop">
|
|
||||||
<to>next</to>
|
|
||||||
</action>
|
|
||||||
</mousebind>
|
|
||||||
</context>
|
|
||||||
</mouse>
|
|
||||||
<menu>
|
|
||||||
<!-- You can specify more than one menu file in here and they are all loaded,
|
|
||||||
just don't make menu ids clash or, well, it'll be kind of pointless -->
|
|
||||||
<!-- default menu file (or custom one in $HOME/.config/openbox/) -->
|
|
||||||
<!-- system menu files on Debian systems -->
|
|
||||||
<file>/var/lib/openbox/debian-menu.xml</file>
|
|
||||||
<file>menu.xml</file>
|
|
||||||
<hideDelay>200</hideDelay>
|
|
||||||
<!-- if a press-release lasts longer than this setting (in milliseconds), the
|
|
||||||
menu is hidden again -->
|
|
||||||
<middle>no</middle>
|
|
||||||
<!-- center submenus vertically about the parent entry -->
|
|
||||||
<submenuShowDelay>100</submenuShowDelay>
|
|
||||||
<!-- time to delay before showing a submenu after hovering over the parent
|
|
||||||
entry.
|
|
||||||
if this is a negative value, then the delay is infinite and the
|
|
||||||
submenu will not be shown until it is clicked on -->
|
|
||||||
<submenuHideDelay>400</submenuHideDelay>
|
|
||||||
<!-- time to delay before hiding a submenu when selecting another
|
|
||||||
entry in parent menu
|
|
||||||
if this is a negative value, then the delay is infinite and the
|
|
||||||
submenu will not be hidden until a different submenu is opened -->
|
|
||||||
<showIcons>yes</showIcons>
|
|
||||||
<!-- controls if icons appear in the client-list-(combined-)menu -->
|
|
||||||
<manageDesktops>yes</manageDesktops>
|
|
||||||
<!-- show the manage desktops section in the client-list-(combined-)menu -->
|
|
||||||
</menu>
|
|
||||||
<applications>
|
|
||||||
<!--
|
|
||||||
# this is an example with comments through out. use these to make your
|
|
||||||
# own rules, but without the comments of course.
|
|
||||||
# you may use one or more of the name/class/role/title/type rules to specify
|
|
||||||
# windows to match
|
|
||||||
|
|
||||||
<application name="the window's _OB_APP_NAME property (see obxprop)"
|
|
||||||
class="the window's _OB_APP_CLASS property (see obxprop)"
|
|
||||||
groupname="the window's _OB_APP_GROUP_NAME property (see obxprop)"
|
|
||||||
groupclass="the window's _OB_APP_GROUP_CLASS property (see obxprop)"
|
|
||||||
role="the window's _OB_APP_ROLE property (see obxprop)"
|
|
||||||
title="the window's _OB_APP_TITLE property (see obxprop)"
|
|
||||||
type="the window's _OB_APP_TYPE property (see obxprob)..
|
|
||||||
(if unspecified, then it is 'dialog' for child windows)">
|
|
||||||
# you may set only one of name/class/role/title/type, or you may use more
|
|
||||||
# than one together to restrict your matches.
|
|
||||||
|
|
||||||
# the name, class, role, and title use simple wildcard matching such as those
|
|
||||||
# used by a shell. you can use * to match any characters and ? to match
|
|
||||||
# any single character.
|
|
||||||
|
|
||||||
# the type is one of: normal, dialog, splash, utility, menu, toolbar, dock,
|
|
||||||
# or desktop
|
|
||||||
|
|
||||||
# when multiple rules match a window, they will all be applied, in the
|
|
||||||
# order that they appear in this list
|
|
||||||
|
|
||||||
|
|
||||||
# each rule element can be left out or set to 'default' to specify to not
|
|
||||||
# change that attribute of the window
|
|
||||||
|
|
||||||
<decor>yes</decor>
|
|
||||||
# enable or disable window decorations
|
|
||||||
|
|
||||||
<shade>no</shade>
|
|
||||||
# make the window shaded when it appears, or not
|
|
||||||
|
|
||||||
<position force="no">
|
|
||||||
# the position is only used if both an x and y coordinate are provided
|
|
||||||
# (and not set to 'default')
|
|
||||||
# when force is "yes", then the window will be placed here even if it
|
|
||||||
# says you want it placed elsewhere. this is to override buggy
|
|
||||||
# applications who refuse to behave
|
|
||||||
<x>center</x>
|
|
||||||
# a number like 50, or 'center' to center on screen. use a negative number
|
|
||||||
# to start from the right (or bottom for <y>), ie -50 is 50 pixels from
|
|
||||||
# the right edge (or bottom). use 'default' to specify using value
|
|
||||||
# provided by the application, or chosen by openbox, instead.
|
|
||||||
<y>200</y>
|
|
||||||
<monitor>1</monitor>
|
|
||||||
# specifies the monitor in a xinerama setup.
|
|
||||||
# 1 is the first head, or 'mouse' for wherever the mouse is
|
|
||||||
</position>
|
|
||||||
|
|
||||||
<size>
|
|
||||||
# the size to make the window.
|
|
||||||
<width>20</width>
|
|
||||||
# a number like 20, or 'default' to use the size given by the application.
|
|
||||||
# you can use fractions such as 1/2 or percentages such as 75% in which
|
|
||||||
# case the value is relative to the size of the monitor that the window
|
|
||||||
# appears on.
|
|
||||||
<height>30%</height>
|
|
||||||
</size>
|
|
||||||
|
|
||||||
<focus>yes</focus>
|
|
||||||
# if the window should try be given focus when it appears. if this is set
|
|
||||||
# to yes it doesn't guarantee the window will be given focus. some
|
|
||||||
# restrictions may apply, but Openbox will try to
|
|
||||||
|
|
||||||
<desktop>1</desktop>
|
|
||||||
# 1 is the first desktop, 'all' for all desktops
|
|
||||||
|
|
||||||
<layer>normal</layer>
|
|
||||||
# 'above', 'normal', or 'below'
|
|
||||||
|
|
||||||
<iconic>no</iconic>
|
|
||||||
# make the window iconified when it appears, or not
|
|
||||||
|
|
||||||
<skip_pager>no</skip_pager>
|
|
||||||
# asks to not be shown in pagers
|
|
||||||
|
|
||||||
<skip_taskbar>no</skip_taskbar>
|
|
||||||
# asks to not be shown in taskbars. window cycling actions will also
|
|
||||||
# skip past such windows
|
|
||||||
|
|
||||||
<fullscreen>yes</fullscreen>
|
|
||||||
# make the window in fullscreen mode when it appears
|
|
||||||
|
|
||||||
<maximized>true</maximized>
|
|
||||||
# 'Horizontal', 'Vertical' or boolean (yes/no)
|
|
||||||
</application>
|
|
||||||
|
|
||||||
# end of the example
|
|
||||||
-->
|
|
||||||
</applications>
|
|
||||||
</openbox_config>
|
|
@ -1,280 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
# This script defines just a mode for rofi instead of being a self-contained
|
|
||||||
# executable that launches rofi by itself. This makes it more flexible than
|
|
||||||
# running rofi inside this script as now the user can call rofi as one pleases.
|
|
||||||
# For instance:
|
|
||||||
#
|
|
||||||
# rofi -show powermenu -modi powermenu:./rofi-power-menu
|
|
||||||
#
|
|
||||||
# See README.md for more information.
|
|
||||||
|
|
||||||
set -e
|
|
||||||
set -u
|
|
||||||
|
|
||||||
# All supported choices
|
|
||||||
all=(shutdown reboot suspend hibernate logout lockscreen)
|
|
||||||
|
|
||||||
# By default, show all (i.e., just copy the array)
|
|
||||||
show=("${all[@]}")
|
|
||||||
|
|
||||||
declare -A texts
|
|
||||||
texts[lockscreen]="lock screen"
|
|
||||||
texts[switchuser]="switch user"
|
|
||||||
texts[logout]="log out"
|
|
||||||
texts[suspend]="suspend"
|
|
||||||
texts[hibernate]="hibernate"
|
|
||||||
texts[reboot]="reboot"
|
|
||||||
texts[shutdown]="shut down"
|
|
||||||
|
|
||||||
declare -A icons
|
|
||||||
icons[lockscreen]="\Uf033e"
|
|
||||||
icons[switchuser]="\Uf0019"
|
|
||||||
icons[logout]="\Uf0343"
|
|
||||||
icons[suspend]="\Uf04b2"
|
|
||||||
icons[hibernate]="\Uf02ca"
|
|
||||||
icons[reboot]="\Uf0709"
|
|
||||||
icons[shutdown]="\Uf0425"
|
|
||||||
icons[cancel]="\Uf0156"
|
|
||||||
|
|
||||||
declare -A actions
|
|
||||||
actions[lockscreen]="loginctl lock-session ${XDG_SESSION_ID-}"
|
|
||||||
#actions[switchuser]="???"
|
|
||||||
actions[logout]="loginctl terminate-session ${XDG_SESSION_ID-}"
|
|
||||||
actions[suspend]="systemctl suspend"
|
|
||||||
actions[hibernate]="systemctl hibernate"
|
|
||||||
actions[reboot]="systemctl reboot"
|
|
||||||
actions[shutdown]="systemctl poweroff"
|
|
||||||
|
|
||||||
# By default, ask for confirmation for actions that are irreversible
|
|
||||||
confirmations=(reboot shutdown logout)
|
|
||||||
|
|
||||||
# By default, no dry run
|
|
||||||
dryrun=false
|
|
||||||
showsymbols=true
|
|
||||||
showtext=true
|
|
||||||
|
|
||||||
function check_valid {
|
|
||||||
option="$1"
|
|
||||||
shift 1
|
|
||||||
for entry in "${@}"
|
|
||||||
do
|
|
||||||
if [ -z "${actions[$entry]+x}" ]
|
|
||||||
then
|
|
||||||
echo "Invalid choice in $1: $entry" >&2
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
}
|
|
||||||
|
|
||||||
# Parse command-line options
|
|
||||||
parsed=$(getopt --options=h --longoptions=help,dry-run,confirm:,choices:,choose:,symbols,no-symbols,text,no-text,symbols-font: --name "$0" -- "$@")
|
|
||||||
if [ $? -ne 0 ]; then
|
|
||||||
echo 'Terminating...' >&2
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
eval set -- "$parsed"
|
|
||||||
unset parsed
|
|
||||||
while true; do
|
|
||||||
case "$1" in
|
|
||||||
"-h"|"--help")
|
|
||||||
echo "rofi-power-menu - a power menu mode for Rofi"
|
|
||||||
echo
|
|
||||||
echo "Usage: rofi-power-menu [--choices CHOICES] [--confirm CHOICES]"
|
|
||||||
echo " [--choose CHOICE] [--dry-run] [--symbols|--no-symbols]"
|
|
||||||
echo
|
|
||||||
echo "Use with Rofi in script mode. For instance, to ask for shutdown or reboot:"
|
|
||||||
echo
|
|
||||||
echo " rofi -show menu -modi \"menu:rofi-power-menu --choices=shutdown/reboot\""
|
|
||||||
echo
|
|
||||||
echo "Available options:"
|
|
||||||
echo " --dry-run Don't perform the selected action but print it to stderr."
|
|
||||||
echo " --choices CHOICES Show only the selected choices in the given order. Use /"
|
|
||||||
echo " as the separator. Available choices are lockscreen,"
|
|
||||||
echo " logout,suspend, hibernate, reboot and shutdown. By"
|
|
||||||
echo " default, all available choices are shown."
|
|
||||||
echo " --confirm CHOICES Require confirmation for the gives choices only. Use / as"
|
|
||||||
echo " the separator. Available choices are lockscreen, logout,"
|
|
||||||
echo " suspend, hibernate, reboot and shutdown. By default, only"
|
|
||||||
echo " irreversible actions logout, reboot and shutdown require"
|
|
||||||
echo " confirmation."
|
|
||||||
echo " --choose CHOICE Preselect the given choice and only ask for a"
|
|
||||||
echo " confirmation (if confirmation is set to be requested). It"
|
|
||||||
echo " is strongly recommended to combine this option with"
|
|
||||||
echo " --confirm=CHOICE if the choice wouldn't require"
|
|
||||||
echo " confirmation by default. Available choices are"
|
|
||||||
echo " lockscreen, logout, suspend, hibernate, reboot and"
|
|
||||||
echo " shutdown."
|
|
||||||
echo " --[no-]symbols Show Unicode symbols or not. Requires a font with support"
|
|
||||||
echo " for the symbols. Use, for instance, fonts from the"
|
|
||||||
echo " Nerdfonts collection. By default, they are shown"
|
|
||||||
echo " --[no-]text Show text description or not."
|
|
||||||
echo " --symbols-font FONT Use the given font for symbols. By default, the symbols"
|
|
||||||
echo " use the same font as the text. That font is configured"
|
|
||||||
echo " with rofi."
|
|
||||||
echo " -h,--help Show this help text."
|
|
||||||
exit 0
|
|
||||||
;;
|
|
||||||
"--dry-run")
|
|
||||||
dryrun=true
|
|
||||||
shift 1
|
|
||||||
;;
|
|
||||||
"--confirm")
|
|
||||||
IFS='/' read -ra confirmations <<< "$2"
|
|
||||||
check_valid "$1" "${confirmations[@]}"
|
|
||||||
shift 2
|
|
||||||
;;
|
|
||||||
"--choices")
|
|
||||||
IFS='/' read -ra show <<< "$2"
|
|
||||||
check_valid "$1" "${show[@]}"
|
|
||||||
shift 2
|
|
||||||
;;
|
|
||||||
"--choose")
|
|
||||||
# Check that the choice is valid
|
|
||||||
check_valid "$1" "$2"
|
|
||||||
selectionID="$2"
|
|
||||||
shift 2
|
|
||||||
;;
|
|
||||||
"--symbols")
|
|
||||||
showsymbols=true
|
|
||||||
shift 1
|
|
||||||
;;
|
|
||||||
"--no-symbols")
|
|
||||||
showsymbols=false
|
|
||||||
shift 1
|
|
||||||
;;
|
|
||||||
"--text")
|
|
||||||
showtext=true
|
|
||||||
shift 1
|
|
||||||
;;
|
|
||||||
"--no-text")
|
|
||||||
showtext=false
|
|
||||||
shift 1
|
|
||||||
;;
|
|
||||||
"--symbols-font")
|
|
||||||
symbols_font="$2"
|
|
||||||
shift 2
|
|
||||||
;;
|
|
||||||
"--")
|
|
||||||
shift
|
|
||||||
break
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
echo "Internal error" >&2
|
|
||||||
exit 1
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
|
|
||||||
if [ "$showsymbols" = "false" -a "$showtext" = "false" ]
|
|
||||||
then
|
|
||||||
echo "Invalid options: cannot have --no-symbols and --no-text enabled at the same time." >&2
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Define the messages after parsing the CLI options so that it is possible to
|
|
||||||
# configure them in the future.
|
|
||||||
|
|
||||||
function write_message {
|
|
||||||
if [ -z ${symbols_font+x} ];
|
|
||||||
then
|
|
||||||
icon="<span font_size=\"medium\">$1</span>"
|
|
||||||
else
|
|
||||||
icon="<span font=\"${symbols_font}\" font_size=\"medium\">$1</span>"
|
|
||||||
fi
|
|
||||||
text="<span font_size=\"medium\">$2</span>"
|
|
||||||
if [ "$showsymbols" = "true" ]
|
|
||||||
then
|
|
||||||
if [ "$showtext" = "true" ]
|
|
||||||
then
|
|
||||||
echo -n "\u200e$icon \u2068$text\u2069"
|
|
||||||
else
|
|
||||||
echo -n "\u200e$icon"
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
echo -n "$text"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
function print_selection {
|
|
||||||
echo -e "$1" | $(read -r -d '' entry; echo "echo $entry")
|
|
||||||
}
|
|
||||||
|
|
||||||
declare -A messages
|
|
||||||
declare -A confirmationMessages
|
|
||||||
for entry in "${all[@]}"
|
|
||||||
do
|
|
||||||
messages[$entry]=$(write_message "${icons[$entry]}" "${texts[$entry]^}")
|
|
||||||
done
|
|
||||||
for entry in "${all[@]}"
|
|
||||||
do
|
|
||||||
confirmationMessages[$entry]=$(write_message "${icons[$entry]}" "Yes, ${texts[$entry]}")
|
|
||||||
done
|
|
||||||
confirmationMessages[cancel]=$(write_message "${icons[cancel]}" "No, cancel")
|
|
||||||
|
|
||||||
if [ $# -gt 0 ]
|
|
||||||
then
|
|
||||||
# If arguments given, use those as the selection
|
|
||||||
selection="${@}"
|
|
||||||
else
|
|
||||||
# Otherwise, use the CLI passed choice if given
|
|
||||||
if [ -n "${selectionID+x}" ]
|
|
||||||
then
|
|
||||||
selection="${messages[$selectionID]}"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Don't allow custom entries
|
|
||||||
echo -e "\0no-custom\x1ftrue"
|
|
||||||
# Use markup
|
|
||||||
echo -e "\0markup-rows\x1ftrue"
|
|
||||||
|
|
||||||
if [ -z "${selection+x}" ]
|
|
||||||
then
|
|
||||||
echo -e "\0prompt\x1fPower Menu"
|
|
||||||
for entry in "${show[@]}"
|
|
||||||
do
|
|
||||||
echo -e "${messages[$entry]}\0icon\x1f${icons[$entry]}"
|
|
||||||
done
|
|
||||||
else
|
|
||||||
for entry in "${show[@]}"
|
|
||||||
do
|
|
||||||
if [ "$selection" = "$(print_selection "${messages[$entry]}")" ]
|
|
||||||
then
|
|
||||||
# Check if the selected entry is listed in confirmation requirements
|
|
||||||
for confirmation in "${confirmations[@]}"
|
|
||||||
do
|
|
||||||
if [ "$entry" = "$confirmation" ]
|
|
||||||
then
|
|
||||||
# Ask for confirmation
|
|
||||||
echo -e "\0prompt\x1fAre you sure"
|
|
||||||
echo -e "${confirmationMessages[$entry]}\0icon\x1f${icons[$entry]}"
|
|
||||||
echo -e "${confirmationMessages[cancel]}\0icon\x1f${icons[cancel]}"
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
# If not, then no confirmation is required, so mark confirmed
|
|
||||||
selection=$(print_selection "${confirmationMessages[$entry]}")
|
|
||||||
fi
|
|
||||||
if [ "$selection" = "$(print_selection "${confirmationMessages[$entry]}")" ]
|
|
||||||
then
|
|
||||||
if [ $dryrun = true ]
|
|
||||||
then
|
|
||||||
# Tell what would have been done
|
|
||||||
echo "Selected: $entry" >&2
|
|
||||||
else
|
|
||||||
# Perform the action
|
|
||||||
${actions[$entry]}
|
|
||||||
fi
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
if [ "$selection" = "$(print_selection "${confirmationMessages[cancel]}")" ]
|
|
||||||
then
|
|
||||||
# Do nothing
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
# The selection didn't match anything, so raise an error
|
|
||||||
echo "Invalid selection: $selection" >&2
|
|
||||||
exit 1
|
|
||||||
fi
|
|
@ -1,275 +0,0 @@
|
|||||||
#---- Generated by tint2conf f53b ----
|
|
||||||
# See https://gitlab.com/o9000/tint2/wikis/Configure for
|
|
||||||
# full documentation of the configuration options.
|
|
||||||
#-------------------------------------
|
|
||||||
# Gradients
|
|
||||||
#-------------------------------------
|
|
||||||
# Backgrounds
|
|
||||||
# Background 1: Panel
|
|
||||||
rounded = 0
|
|
||||||
border_width = 0
|
|
||||||
border_sides = TBLR
|
|
||||||
border_content_tint_weight = 0
|
|
||||||
background_content_tint_weight = 0
|
|
||||||
background_color = #000000 63
|
|
||||||
border_color = #555555 80
|
|
||||||
background_color_hover = #000000 80
|
|
||||||
border_color_hover = #555555 80
|
|
||||||
background_color_pressed = #000000 80
|
|
||||||
border_color_pressed = #555555 80
|
|
||||||
|
|
||||||
# Background 2: Default task, Iconified task
|
|
||||||
rounded = 0
|
|
||||||
border_width = 0
|
|
||||||
border_sides = TBLR
|
|
||||||
border_content_tint_weight = 0
|
|
||||||
background_content_tint_weight = 0
|
|
||||||
background_color = #777777 0
|
|
||||||
border_color = #777777 0
|
|
||||||
background_color_hover = #777777 4
|
|
||||||
border_color_hover = #cccccc 30
|
|
||||||
background_color_pressed = #989898 21
|
|
||||||
border_color_pressed = #777777 30
|
|
||||||
|
|
||||||
# Background 3: Active task
|
|
||||||
rounded = 0
|
|
||||||
border_width = 0
|
|
||||||
border_sides = TBLR
|
|
||||||
border_content_tint_weight = 0
|
|
||||||
background_content_tint_weight = 0
|
|
||||||
background_color = #ffffff 21
|
|
||||||
border_color = #ffffff 60
|
|
||||||
background_color_hover = #ffffff 21
|
|
||||||
border_color_hover = #ffffff 60
|
|
||||||
background_color_pressed = #989898 21
|
|
||||||
border_color_pressed = #ffffff 60
|
|
||||||
|
|
||||||
# Background 4: Urgent task
|
|
||||||
rounded = 0
|
|
||||||
border_width = 0
|
|
||||||
border_sides = TBLR
|
|
||||||
border_content_tint_weight = 0
|
|
||||||
background_content_tint_weight = 0
|
|
||||||
background_color = #aa4400 100
|
|
||||||
border_color = #aa7733 100
|
|
||||||
background_color_hover = #aa4400 100
|
|
||||||
border_color_hover = #aa7733 100
|
|
||||||
background_color_pressed = #aa4400 100
|
|
||||||
border_color_pressed = #aa7733 100
|
|
||||||
|
|
||||||
# Background 5: Tooltip
|
|
||||||
rounded = 2
|
|
||||||
border_width = 1
|
|
||||||
border_sides = TBLR
|
|
||||||
border_content_tint_weight = 0
|
|
||||||
background_content_tint_weight = 0
|
|
||||||
background_color = #ffffaa 100
|
|
||||||
border_color = #999999 100
|
|
||||||
background_color_hover = #ffffaa 100
|
|
||||||
border_color_hover = #999999 100
|
|
||||||
background_color_pressed = #ffffaa 100
|
|
||||||
border_color_pressed = #999999 100
|
|
||||||
|
|
||||||
# Background 6: Inactive desktop name
|
|
||||||
rounded = 0
|
|
||||||
border_width = 0
|
|
||||||
border_sides = TBLR
|
|
||||||
border_content_tint_weight = 0
|
|
||||||
background_content_tint_weight = 0
|
|
||||||
background_color = #777777 0
|
|
||||||
border_color = #777777 30
|
|
||||||
background_color_hover = #bdbdbd 21
|
|
||||||
border_color_hover = #cccccc 30
|
|
||||||
background_color_pressed = #777777 21
|
|
||||||
border_color_pressed = #777777 30
|
|
||||||
|
|
||||||
# Background 7: Active desktop name
|
|
||||||
rounded = 0
|
|
||||||
border_width = 0
|
|
||||||
border_sides = TBLR
|
|
||||||
border_content_tint_weight = 0
|
|
||||||
background_content_tint_weight = 0
|
|
||||||
background_color = #ffffff 21
|
|
||||||
border_color = #ffffff 60
|
|
||||||
background_color_hover = #ffffff 21
|
|
||||||
border_color_hover = #ffffff 60
|
|
||||||
background_color_pressed = #a9a9a9 21
|
|
||||||
border_color_pressed = #ffffff 60
|
|
||||||
|
|
||||||
#-------------------------------------
|
|
||||||
# Panel
|
|
||||||
panel_items = P:TSC
|
|
||||||
panel_size = 100% 32
|
|
||||||
panel_margin = 0 0
|
|
||||||
panel_padding = 4 0 4
|
|
||||||
panel_background_id = 1
|
|
||||||
wm_menu = 1
|
|
||||||
panel_dock = 0
|
|
||||||
panel_pivot_struts = 0
|
|
||||||
panel_position = top center horizontal
|
|
||||||
panel_layer = normal
|
|
||||||
panel_monitor = all
|
|
||||||
panel_shrink = 0
|
|
||||||
autohide = 0
|
|
||||||
autohide_show_timeout = 0
|
|
||||||
autohide_hide_timeout = 0.5
|
|
||||||
autohide_height = 2
|
|
||||||
strut_policy = follow_size
|
|
||||||
panel_window_name = aji-custom
|
|
||||||
disable_transparency = 0
|
|
||||||
mouse_effects = 1
|
|
||||||
font_shadow = 0
|
|
||||||
mouse_hover_icon_asb = 100 0 10
|
|
||||||
mouse_pressed_icon_asb = 100 0 0
|
|
||||||
scale_relative_to_dpi = 0
|
|
||||||
scale_relative_to_screen_height = 0
|
|
||||||
|
|
||||||
#-------------------------------------
|
|
||||||
# Taskbar
|
|
||||||
taskbar_mode = single_desktop
|
|
||||||
taskbar_hide_if_empty = 0
|
|
||||||
taskbar_padding = 0 0 0
|
|
||||||
taskbar_background_id = 0
|
|
||||||
taskbar_active_background_id = 0
|
|
||||||
taskbar_name = 0
|
|
||||||
taskbar_hide_inactive_tasks = 0
|
|
||||||
taskbar_hide_different_monitor = 0
|
|
||||||
taskbar_hide_different_desktop = 0
|
|
||||||
taskbar_always_show_all_desktop_tasks = 0
|
|
||||||
taskbar_name_padding = 4 0
|
|
||||||
taskbar_name_background_id = 6
|
|
||||||
taskbar_name_active_background_id = 7
|
|
||||||
taskbar_name_font = sans bold 9
|
|
||||||
taskbar_name_font_color = #dddddd 100
|
|
||||||
taskbar_name_active_font_color = #dddddd 100
|
|
||||||
taskbar_distribute_size = 1
|
|
||||||
taskbar_sort_order = none
|
|
||||||
task_align = left
|
|
||||||
|
|
||||||
#-------------------------------------
|
|
||||||
# Task
|
|
||||||
task_text = 0
|
|
||||||
task_icon = 1
|
|
||||||
task_centered = 1
|
|
||||||
urgent_nb_of_blink = 100000
|
|
||||||
task_maximum_size = 35 35
|
|
||||||
task_padding = 4 3 4
|
|
||||||
task_font = sans 8
|
|
||||||
task_tooltip = 1
|
|
||||||
task_thumbnail = 0
|
|
||||||
task_thumbnail_size = 210
|
|
||||||
task_font_color = #eeeeee 100
|
|
||||||
task_icon_asb = 100 0 0
|
|
||||||
task_background_id = 2
|
|
||||||
task_active_background_id = 3
|
|
||||||
task_urgent_background_id = 4
|
|
||||||
task_iconified_background_id = 2
|
|
||||||
mouse_left = toggle_iconify
|
|
||||||
mouse_middle = none
|
|
||||||
mouse_right = close
|
|
||||||
mouse_scroll_up = prev_task
|
|
||||||
mouse_scroll_down = next_task
|
|
||||||
|
|
||||||
#-------------------------------------
|
|
||||||
# System tray (notification area)
|
|
||||||
systray_padding = 0 0 2
|
|
||||||
systray_background_id = 0
|
|
||||||
systray_sort = ascending
|
|
||||||
systray_icon_size = 22
|
|
||||||
systray_icon_asb = 100 0 0
|
|
||||||
systray_monitor = 1
|
|
||||||
systray_name_filter =
|
|
||||||
|
|
||||||
#-------------------------------------
|
|
||||||
# Launcher
|
|
||||||
launcher_padding = 0 0 2
|
|
||||||
launcher_background_id = 0
|
|
||||||
launcher_icon_background_id = 0
|
|
||||||
launcher_icon_size = 22
|
|
||||||
launcher_icon_asb = 100 0 0
|
|
||||||
launcher_icon_theme_override = 0
|
|
||||||
startup_notifications = 1
|
|
||||||
launcher_tooltip = 1
|
|
||||||
launcher_item_app = tint2conf.desktop
|
|
||||||
launcher_item_app = firefox.desktop
|
|
||||||
launcher_item_app = iceweasel.desktop
|
|
||||||
launcher_item_app = chromium-browser.desktop
|
|
||||||
launcher_item_app = google-chrome.desktop
|
|
||||||
launcher_item_app = x-terminal-emulator.desktop
|
|
||||||
|
|
||||||
#-------------------------------------
|
|
||||||
# Clock
|
|
||||||
time1_format = %H:%M
|
|
||||||
time2_format = %Y/%m/%d
|
|
||||||
time1_font = sans bold 8
|
|
||||||
time1_timezone =
|
|
||||||
time2_timezone =
|
|
||||||
time2_font = Sans Bold 7
|
|
||||||
clock_font_color = #eeeeee 100
|
|
||||||
clock_padding = 1 0
|
|
||||||
clock_background_id = 0
|
|
||||||
clock_tooltip =
|
|
||||||
clock_tooltip_timezone =
|
|
||||||
clock_lclick_command = zenity --calendar --text ""
|
|
||||||
clock_rclick_command = orage
|
|
||||||
clock_mclick_command =
|
|
||||||
clock_uwheel_command =
|
|
||||||
clock_dwheel_command =
|
|
||||||
|
|
||||||
#-------------------------------------
|
|
||||||
# Battery
|
|
||||||
battery_tooltip = 1
|
|
||||||
battery_low_status = 10
|
|
||||||
battery_low_cmd = notify-send "battery low"
|
|
||||||
battery_full_cmd =
|
|
||||||
bat1_font = Sans Bold 8
|
|
||||||
bat2_font = Sans Bold 7
|
|
||||||
battery_font_color = #eeeeee 100
|
|
||||||
bat1_format =
|
|
||||||
bat2_format =
|
|
||||||
battery_padding = 1 0
|
|
||||||
battery_background_id = 0
|
|
||||||
battery_hide = 101
|
|
||||||
battery_lclick_command =
|
|
||||||
battery_rclick_command =
|
|
||||||
battery_mclick_command =
|
|
||||||
battery_uwheel_command =
|
|
||||||
battery_dwheel_command =
|
|
||||||
ac_connected_cmd =
|
|
||||||
ac_disconnected_cmd =
|
|
||||||
|
|
||||||
#-------------------------------------
|
|
||||||
# Separator 1
|
|
||||||
separator = new
|
|
||||||
separator_background_id = 0
|
|
||||||
separator_color = #252525 33
|
|
||||||
separator_style = line
|
|
||||||
separator_size = 3
|
|
||||||
separator_padding = 1 0
|
|
||||||
|
|
||||||
#-------------------------------------
|
|
||||||
# Button 1
|
|
||||||
button = new
|
|
||||||
button_text = 🍔 Start
|
|
||||||
button_tooltip = Application Menu
|
|
||||||
button_lclick_command = rofi -modi drun,power:~/.config/rofi/power-menu -show drun -show-icons -theme Arc-Dark.rasi -columns 2 -lines 10 -window-thumbnail -font "Open Sans 18" -opacity -width 80 -sidebar-mode
|
|
||||||
button_rclick_command =
|
|
||||||
button_mclick_command =
|
|
||||||
button_uwheel_command =
|
|
||||||
button_dwheel_command =
|
|
||||||
button_font = Sans Bold 10
|
|
||||||
button_font_color = #ffffff 100
|
|
||||||
button_padding = 0 0
|
|
||||||
button_background_id = 0
|
|
||||||
button_centered = 0
|
|
||||||
button_max_icon_size = 0
|
|
||||||
|
|
||||||
#-------------------------------------
|
|
||||||
# Tooltip
|
|
||||||
tooltip_show_timeout = 0.5
|
|
||||||
tooltip_hide_timeout = 0.1
|
|
||||||
tooltip_padding = 2 2
|
|
||||||
tooltip_background_id = 5
|
|
||||||
tooltip_font_color = #222222 100
|
|
||||||
tooltip_font = sans 9
|
|
||||||
|
|
@ -1,25 +0,0 @@
|
|||||||
; make backup to a designated dir, mirroring the full path
|
|
||||||
(defun xah-backup-nested-dir-file-path (Fpath)
|
|
||||||
"Return a new file path and create dirs.
|
|
||||||
If the new path's directories does not exist, create them.
|
|
||||||
version 2022-06-09"
|
|
||||||
(let* ($backupRoot $backupFilePath)
|
|
||||||
(setq $backupRoot "~/.emacs.d/backup/")
|
|
||||||
;; remove Windows driver letter in path, e.g. C:
|
|
||||||
(setq $backupFilePath
|
|
||||||
(format "%s%s~" $backupRoot (replace-regexp-in-string "^[A-Za-z]:/" "" Fpath)))
|
|
||||||
(make-directory
|
|
||||||
(file-name-directory $backupFilePath)
|
|
||||||
(file-name-directory $backupFilePath))
|
|
||||||
$backupFilePath
|
|
||||||
))
|
|
||||||
(setq make-backup-file-name-function 'xah-backup-nested-dir-file-path)
|
|
||||||
|
|
||||||
; disable backup
|
|
||||||
; (setq backup-inhibited t)
|
|
||||||
|
|
||||||
; disable auto save
|
|
||||||
; (setq auto-save-default nil)
|
|
||||||
|
|
||||||
(custom-set-variables '(custom-enabled-themes '(tango-dark)))
|
|
||||||
(custom-set-faces)
|
|
Binary file not shown.
Binary file not shown.
@ -1,201 +0,0 @@
|
|||||||
Apache License
|
|
||||||
Version 2.0, January 2004
|
|
||||||
http://www.apache.org/licenses/
|
|
||||||
|
|
||||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
||||||
|
|
||||||
1. Definitions.
|
|
||||||
|
|
||||||
"License" shall mean the terms and conditions for use, reproduction,
|
|
||||||
and distribution as defined by Sections 1 through 9 of this document.
|
|
||||||
|
|
||||||
"Licensor" shall mean the copyright owner or entity authorized by
|
|
||||||
the copyright owner that is granting the License.
|
|
||||||
|
|
||||||
"Legal Entity" shall mean the union of the acting entity and all
|
|
||||||
other entities that control, are controlled by, or are under common
|
|
||||||
control with that entity. For the purposes of this definition,
|
|
||||||
"control" means (i) the power, direct or indirect, to cause the
|
|
||||||
direction or management of such entity, whether by contract or
|
|
||||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
||||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
||||||
|
|
||||||
"You" (or "Your") shall mean an individual or Legal Entity
|
|
||||||
exercising permissions granted by this License.
|
|
||||||
|
|
||||||
"Source" form shall mean the preferred form for making modifications,
|
|
||||||
including but not limited to software source code, documentation
|
|
||||||
source, and configuration files.
|
|
||||||
|
|
||||||
"Object" form shall mean any form resulting from mechanical
|
|
||||||
transformation or translation of a Source form, including but
|
|
||||||
not limited to compiled object code, generated documentation,
|
|
||||||
and conversions to other media types.
|
|
||||||
|
|
||||||
"Work" shall mean the work of authorship, whether in Source or
|
|
||||||
Object form, made available under the License, as indicated by a
|
|
||||||
copyright notice that is included in or attached to the work
|
|
||||||
(an example is provided in the Appendix below).
|
|
||||||
|
|
||||||
"Derivative Works" shall mean any work, whether in Source or Object
|
|
||||||
form, that is based on (or derived from) the Work and for which the
|
|
||||||
editorial revisions, annotations, elaborations, or other modifications
|
|
||||||
represent, as a whole, an original work of authorship. For the purposes
|
|
||||||
of this License, Derivative Works shall not include works that remain
|
|
||||||
separable from, or merely link (or bind by name) to the interfaces of,
|
|
||||||
the Work and Derivative Works thereof.
|
|
||||||
|
|
||||||
"Contribution" shall mean any work of authorship, including
|
|
||||||
the original version of the Work and any modifications or additions
|
|
||||||
to that Work or Derivative Works thereof, that is intentionally
|
|
||||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
||||||
or by an individual or Legal Entity authorized to submit on behalf of
|
|
||||||
the copyright owner. For the purposes of this definition, "submitted"
|
|
||||||
means any form of electronic, verbal, or written communication sent
|
|
||||||
to the Licensor or its representatives, including but not limited to
|
|
||||||
communication on electronic mailing lists, source code control systems,
|
|
||||||
and issue tracking systems that are managed by, or on behalf of, the
|
|
||||||
Licensor for the purpose of discussing and improving the Work, but
|
|
||||||
excluding communication that is conspicuously marked or otherwise
|
|
||||||
designated in writing by the copyright owner as "Not a Contribution."
|
|
||||||
|
|
||||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
||||||
on behalf of whom a Contribution has been received by Licensor and
|
|
||||||
subsequently incorporated within the Work.
|
|
||||||
|
|
||||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
||||||
this License, each Contributor hereby grants to You a perpetual,
|
|
||||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
||||||
copyright license to reproduce, prepare Derivative Works of,
|
|
||||||
publicly display, publicly perform, sublicense, and distribute the
|
|
||||||
Work and such Derivative Works in Source or Object form.
|
|
||||||
|
|
||||||
3. Grant of Patent License. Subject to the terms and conditions of
|
|
||||||
this License, each Contributor hereby grants to You a perpetual,
|
|
||||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
||||||
(except as stated in this section) patent license to make, have made,
|
|
||||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
||||||
where such license applies only to those patent claims licensable
|
|
||||||
by such Contributor that are necessarily infringed by their
|
|
||||||
Contribution(s) alone or by combination of their Contribution(s)
|
|
||||||
with the Work to which such Contribution(s) was submitted. If You
|
|
||||||
institute patent litigation against any entity (including a
|
|
||||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
||||||
or a Contribution incorporated within the Work constitutes direct
|
|
||||||
or contributory patent infringement, then any patent licenses
|
|
||||||
granted to You under this License for that Work shall terminate
|
|
||||||
as of the date such litigation is filed.
|
|
||||||
|
|
||||||
4. Redistribution. You may reproduce and distribute copies of the
|
|
||||||
Work or Derivative Works thereof in any medium, with or without
|
|
||||||
modifications, and in Source or Object form, provided that You
|
|
||||||
meet the following conditions:
|
|
||||||
|
|
||||||
(a) You must give any other recipients of the Work or
|
|
||||||
Derivative Works a copy of this License; and
|
|
||||||
|
|
||||||
(b) You must cause any modified files to carry prominent notices
|
|
||||||
stating that You changed the files; and
|
|
||||||
|
|
||||||
(c) You must retain, in the Source form of any Derivative Works
|
|
||||||
that You distribute, all copyright, patent, trademark, and
|
|
||||||
attribution notices from the Source form of the Work,
|
|
||||||
excluding those notices that do not pertain to any part of
|
|
||||||
the Derivative Works; and
|
|
||||||
|
|
||||||
(d) If the Work includes a "NOTICE" text file as part of its
|
|
||||||
distribution, then any Derivative Works that You distribute must
|
|
||||||
include a readable copy of the attribution notices contained
|
|
||||||
within such NOTICE file, excluding those notices that do not
|
|
||||||
pertain to any part of the Derivative Works, in at least one
|
|
||||||
of the following places: within a NOTICE text file distributed
|
|
||||||
as part of the Derivative Works; within the Source form or
|
|
||||||
documentation, if provided along with the Derivative Works; or,
|
|
||||||
within a display generated by the Derivative Works, if and
|
|
||||||
wherever such third-party notices normally appear. The contents
|
|
||||||
of the NOTICE file are for informational purposes only and
|
|
||||||
do not modify the License. You may add Your own attribution
|
|
||||||
notices within Derivative Works that You distribute, alongside
|
|
||||||
or as an addendum to the NOTICE text from the Work, provided
|
|
||||||
that such additional attribution notices cannot be construed
|
|
||||||
as modifying the License.
|
|
||||||
|
|
||||||
You may add Your own copyright statement to Your modifications and
|
|
||||||
may provide additional or different license terms and conditions
|
|
||||||
for use, reproduction, or distribution of Your modifications, or
|
|
||||||
for any such Derivative Works as a whole, provided Your use,
|
|
||||||
reproduction, and distribution of the Work otherwise complies with
|
|
||||||
the conditions stated in this License.
|
|
||||||
|
|
||||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
||||||
any Contribution intentionally submitted for inclusion in the Work
|
|
||||||
by You to the Licensor shall be under the terms and conditions of
|
|
||||||
this License, without any additional terms or conditions.
|
|
||||||
Notwithstanding the above, nothing herein shall supersede or modify
|
|
||||||
the terms of any separate license agreement you may have executed
|
|
||||||
with Licensor regarding such Contributions.
|
|
||||||
|
|
||||||
6. Trademarks. This License does not grant permission to use the trade
|
|
||||||
names, trademarks, service marks, or product names of the Licensor,
|
|
||||||
except as required for reasonable and customary use in describing the
|
|
||||||
origin of the Work and reproducing the content of the NOTICE file.
|
|
||||||
|
|
||||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
||||||
agreed to in writing, Licensor provides the Work (and each
|
|
||||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
||||||
implied, including, without limitation, any warranties or conditions
|
|
||||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
||||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
||||||
appropriateness of using or redistributing the Work and assume any
|
|
||||||
risks associated with Your exercise of permissions under this License.
|
|
||||||
|
|
||||||
8. Limitation of Liability. In no event and under no legal theory,
|
|
||||||
whether in tort (including negligence), contract, or otherwise,
|
|
||||||
unless required by applicable law (such as deliberate and grossly
|
|
||||||
negligent acts) or agreed to in writing, shall any Contributor be
|
|
||||||
liable to You for damages, including any direct, indirect, special,
|
|
||||||
incidental, or consequential damages of any character arising as a
|
|
||||||
result of this License or out of the use or inability to use the
|
|
||||||
Work (including but not limited to damages for loss of goodwill,
|
|
||||||
work stoppage, computer failure or malfunction, or any and all
|
|
||||||
other commercial damages or losses), even if such Contributor
|
|
||||||
has been advised of the possibility of such damages.
|
|
||||||
|
|
||||||
9. Accepting Warranty or Additional Liability. While redistributing
|
|
||||||
the Work or Derivative Works thereof, You may choose to offer,
|
|
||||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
||||||
or other liability obligations and/or rights consistent with this
|
|
||||||
License. However, in accepting such obligations, You may act only
|
|
||||||
on Your own behalf and on Your sole responsibility, not on behalf
|
|
||||||
of any other Contributor, and only if You agree to indemnify,
|
|
||||||
defend, and hold each Contributor harmless for any liability
|
|
||||||
incurred by, or claims asserted against, such Contributor by reason
|
|
||||||
of your accepting any such warranty or additional liability.
|
|
||||||
|
|
||||||
END OF TERMS AND CONDITIONS
|
|
||||||
|
|
||||||
APPENDIX: How to apply the Apache License to your work.
|
|
||||||
|
|
||||||
To apply the Apache License to your work, attach the following
|
|
||||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
||||||
replaced with your own identifying information. (Don't include
|
|
||||||
the brackets!) The text should be enclosed in the appropriate
|
|
||||||
comment syntax for the file format. We also recommend that a
|
|
||||||
file or class name and description of purpose be included on the
|
|
||||||
same "printed page" as the copyright notice for easier
|
|
||||||
identification within third-party archives.
|
|
||||||
|
|
||||||
Copyright [yyyy] [name of copyright owner]
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue
Block a user