Code Monkey home page Code Monkey logo

ocelot's Introduction

Readme: ocelot

  • forked from monsterwm
  • "monsterwm" is similar to catwm and was forked from "dwm"

ocelot: "ocelot" is a minimal tiling window manager bundle forked from "monsterwm" with a customized "config_scale1.h"/"config_scale2.h" with HiDPI-support and a side-panel instead of a top-panel. Furthermore it has extra features for Gentoo-users.

ocelot2

ocelot

Dependencies

  • X11-header files to compile ocelot

Following dependencies are required to get the intended look and feel:

  • ocelot-dzen for side-panel, see ocelot-dzen
  • slock to lock your screen (see “tweaks“ for color-customizations)
  • xsri to set default background color or custom image
  • dmenu to run stuff
  • urxvt to have a terminal
  • xss-lock and xset to lock screen after some idle time and on hibernate/sleep
  • xbacklight to control backlight of your notebook screen
  • amixer from alsa to control volume
  • xrandr to guess display height
  • xsetroot to set a different default xcursor
  • jq if you want to use the suspended particulate matter open sense map side-panel element (see “config/.ocelotrc“ for further configuration)
  • eix and glsa-check to check for Gentoo world and security updates
  • battery.sh if you want to check battery on a PocketChip (see below)

Following is optional:

  • font recommendations: Monoid L 12px/9pt for terminal and side-panel; Gidole 11pt for everything else

Things to come (order is priority):

  • take screenshot, using scrot

Things NOT to come:

  • Powermanagement: please use your existing setup; ocelot should have no impact on it.
  • save session and restore open application, etc: please use hibernate (suspend to disk) or standby (suspend).

Clone, Configure and Compile

cd /home/$USER
mkdir gits
cd gits
git clone https://gitlab.com/poinck/ocelot.git
cd ocelot
SCALE=2 make    # omit SCALE-var if ocelot-wm should not scale for HiDPI; has
                # no effect if ~/.ocelot.h already exists
vim config.h    # look, (change) and :wq (config.h is a symlink to ~/.ocelot.h)
make            # if you have changed config.h

Local Install

  • it is recommended to NOT install ocelot system-wide because every user might want to have their own configuration
  • in the future Gentoo-users may get "savedconfig"-useflag support
make local_install

Configuration

"ocelot" has one user config-file; create it if you want to change default behavior:

~/.ocelotrc for general settings: See "config/.ocelotrc" for help adjusting the variables.

  • set ocelot_path to /home/$USER/gits/ocelot (location of the git-repository)
  • set scale=2 if you compiled ocelot with "SCALE=2 make"

Check for Gentoo world and security updates with ochup (check updates) ochup handles syncing the portage tree using eix. It comes with systemd.timer and .unit for daily checks. Furthermore it uses glsa-check to report important security updates. Follow these steps to install as root (this is not yet part of the Makefile):

ln -s ${OCELOT_PATH}bin/chup /root/bin/chup
ln -s ${OCELOT_PATH}bin/ochup /root/bin/ochup
cp ${OCELOT_PATH}config/systemd/system/chup.* /etc/systemd/system/
systemctl daemon-reload
systemctl enable chup.timer
  • first start (as root):
systemctl start chup.service
chup
  • check only (as root) after some updates were applied to refresh side-panel elements:
chup checkonly

check battery on a PocketChip Checking the battery status on this arm device is different, so ochipbattery is used as root instead of obattery. Install as root:

# backup and override existing version of "battery.sh"
cp /usr/bin/battery.sh /usr/bin/battery_bak.sh
cd ${OCELOT_PATH}
cp config/bin/battery.sh /usr/bin/
ln -s ${OCELOT_PATH}bin/ochipbattery /root/bin/ochipbattery
ln -s ${OCELOT_PATH}bin/ochipbattery /root/bin/ochipbattery
cp config/systemd/system/chipbattery.service /etc/systemd/system/
vim /etc/systemd/system/chipbattery.service  # adjust OCELOT_PATH here
systemctl daemon-reload
systemctl enable chipbattery
systemctl start chipbattery

Start ocelot

The preferred method to start ocelot is to use "~/.xinitrc".

~/.xinitrc, start with startx:

[[ -f ~/.Xresources ]] && xrdb -merge ~/.Xresources
exec startocelot

Security

This section will describe configurations to enhance security of ocelot.

autostart with login from tty; ~/.bashrc: See X without display manager. exec will make sure, that the shell cannot be used after ocelot quit or crashed:

if [[ ! ${DISPLAY} && ${XDG_VTNR} == 1 ]]; then
    exec startx
fi

Tweaks

Many thanks go to the Gentoo- and Arch-wiki:

tweaks you can put in ~/.xinitrc: Copy paste from "tweaks/.xinitrc" for following:

  • improve keyboard rate
  • set different X-cursor and size
  • GDK/GTK HiDPI-scaling
  • load different ICC-profile from colord
  • natural scrolling (for synaptics and libxinput),
  • disable right-click on touchpad (for synaptics and libxinput)

better reading with ~/.Xresources: Copy paste from "tweaks/.Xresources": This will lighten font colors in the terminal and adds hinting and antialiasing to all applications.

adjust and preserve keyrate in ~/.bashrc: use exec startx -- -ardelay 300 -arinterval 50 to start X, see this question at UNIX-stackexchange

still using gtk-apps and want ocelot-colors? this is for you Copy "tweaks/gtk-3.0/gtk.css" to "~/.config/gtk-3.0/" or add it's content to your existing theme style-sheet.

slock colors If you want a ocelot color theme for your lock screen, you can use the config from “tweaks/slock-1.4_config.h“.

sxiv config If you want a ocelot theme for your sxiv, you can use the config from “tweaks/sxiv-24_config.h“ as a template or inspiration.

Keys

How to use ocelot? All keyboard-shortcuts can be changed in config.h (needs recompile and restart):

  • open dark terminal SUPER+SHIFT+ENTER
  • open light terminal SUPER+CONTROL+ENTER
  • open menu ALT+F2, SUPER+MOUSE_RIGHT
  • switch desktop SUPER+LEFT|RIGHT, SUPER+UP|DOWN, SUPER+1|2|3|4|5|6|7|8|9|0
  • switch desktop with windows SUPER+SHIFT+LEFT|RIGHT, SUPER+SHIFT+UP|DOWN
  • switch to last desktop SUPER+TAB
  • lock screen SUPER+l
  • disable screen locker SUPER+CTRL+l
  • enable screen locker SUPER+SHIFT+l
  • move window SUPER+w|a|s|d
  • resize window SUPER+SHIFT+w|a|s|d, ALT+MOUSE_RIGHT+MOUSE_MOVE
  • choose as new primary window SUPER+ENTER
  • resize primary window SUPER+u|i
  • resize first secondary window SUPER+o|p
  • select window on current desktop SUPER+j|k, ALT+TAB (last), MOUSE_RIGHT
  • move window on current desktop SUPER+SHIFT+j|k, SUPER+MOUSE_LEFT+MOUSE_MOVE
  • move selected window to another desktop SUPER+SHIFT+1|2|3|4|5|6|7|8|9
  • change window-mode SUPER+SHIFT+f|t|b|g|m
  • close window SUPER+SHIFT+s
  • change display brightness XF86MonBrightnessUp|XF86MonBrightnessDown (FN-Keys)
  • change speaker volume (FN-Keys)
  • quit ocelot SUPER+SHIFT+r|q

FAQ

Does ocelot support multiple monitors? No, and it is not planned as long as Xorg is being used. Here is an example on how to use xrandr for mirroring screen output:

  • if output does not support native resolution of LVDS1
xrandr --output HDMI2 --mode 1280x720 --fb 1366x768 --panning 1366x768 --same-as LVDS1 # --dryrun
  • if output supports the native resolution of LVDS1
xrandr --output HDMI2 --mode 1366x768 --same-as LVDS1 # --dryrun

License

All new files added after the fork are licensed under CC0. Changed and unchanged files are still licensed under the MIT/X Consortium License, see LICENSE file for more copyright and license information.

Thanks

ASCII-Logo

   ^   ^
 +-------+
 |  o_O  |
 |  >.<  |__/
 +-------+

ocelot's People

Contributors

poinck avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

ocelot's Issues

side-panel: artifacts on last line when reducing used desktops

Steps to reproduce:

  • open at least one window on 5 distinct desktops
  • close windows, so that one desktop is free again and elements below the desktop-graphs jump up one line

Problem:

  • last graphs will stay on side-panel on their original position and don't get updated (artifacts)

Solution:

  • draw a blank line after all side-panel-elements

ocollector: new element-style

ocollector should simplify box-elements (no sharing of lines of neighboring boxes). If possible panel-width should be decreased to 64 pixel for better scaling.

Inspiration should be gathered from good pixel art.

  • new api for elements (generic types which can be ordered seperatly)
  • create mockups of new element-style
  • implement new style for odisks, see #12
  • implement new style for all existing elements.
  • depricate old boxes

change window-manager name

I don't like the current name of my forked window-manager, although ocelots are cute animals.

  • decide
  • refactor everything

scale on TVs and HDPI-displays

support additional parameter to scale the side-panel if used on a TV

  • oterminal
  • omenu
  • side-panel with depending elements

not in scope: "config.h" used by ocelot. The user has to configure window-borders and recompile.

otime produces glitch at the end of side-panel

otime produces a glitch by printing day and week number at the end of side-panel. This is because ocelot-dzen2 sometimes does not wait until "^p1()" or "^tw()" is finished before drawing text.

proposed solution:

  • leave title window blank or static and redraw the child-window only. "^p1()" will still be neccessary.

support additional window-modes

  • minimize focused window on current desktop (and option to restore all minimized windows on current desktop)
  • horizontal stacking without master window
+--+--+--+
|  |  |  |
|  |  |  |
+--+--+--+
  • vertical stacking without master window
+----+
|    |
+----+
|    |
+----+
|    |
+----+
  • or: Maybe stacking can be achieved with just one new option: enable/disable master window.

odisks: allocation of mountpoints

implement status-element odisks in redesigned side-panel to show allocation of partitions/volumes mounted here:

  • /
  • /home

odisk should use new api to ocollector

ochecks: new element for nagios check plugins

The aim of this issue is to generalize system state in side panel.

  • parameters for nagios-checks should be configurable in "~/.ocelotrc", maybe in the following way:
checks["http"]="/usr/lib/nagios/plugins/check_http -H localhost"
element_order=( .. "check_http" .. )
  • evaluate performance-data

wm: special border colors for terminal

if a focused window has title "bash" use FOCUS_BASH and UNFOCUS_BASH from config.h.

  • use seperate color defines in config.h
  • do not refresh window title after it is set for the first time

olock: let user choose the lockscreen in .ocelotrc

The user should be able to set lockscreen commands in ".ocelotrc". Motivation: Someone maybe dislikes PAM and wants to use slock or back to the previous default i3lock:

  • reuse $lockscreen and remove image-support in olock (reason: each screen locker has their own set of parameters)
  • add parameter hibernate wich can be set at $lockscreen_hibernate, default will be ocelot-slock systemctl hibernate -i
  • add parameter suspend, can be set at $lockscreen_suspend and
  • add parameter ask wich asks with an ocelot-dzen dialog whether hibernate, suspend or poweroff ($poweroff) should be done. Additionally olock ask should have a configurable key-combination at "config.h"

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.