Skip to content
/ cwmrc Public

Configuration of the Calm Window Manager (CWM)

Notifications You must be signed in to change notification settings

pguerin3/cwmrc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

The Calm Window Manager (CWM)

A minimalist floating window manager that also tiles

tiled windows

tiled windows

tiled windows

tiled windows

This repository showcases configuration of the Calm Window Manager (CWM) to keep the minimal asthetic, but at the same time make more practical.

CWM is a minimalist floating window manager:

x [x] float windows by default. x [x] snap any window into a corner, or edge of the screen. x [x] snap the floating windows into a tiling configuration. eg either x [x] horizontal master/stack, or vertical master/stack. x [x] retain gaps between the windows and the edge of the screen.

Also there is also a native application launcher that you can drive with the mouse or touchpad. eg use the keyboard to launch applications.

If the native application launcher is not to your liking, then it’s easy to add 3rd-party lanchers and status bars. eg Polybar.

As CWM doesn’t feature multi-monitor support, the ideal use-case is that you are just using a single monitor.


Screenshots of floating windows that are snapped into tiles

To create a few terminal windows, use alt+cntrl+enter for each terminal.

Without a Polybar:

For example, 4 floating windows can be snapped into tiles.

Then alt+cntrl+minus to tile the 4 windows, into a master window on the left and 3 stacked windows on the right.

Then in the tiled layout, to switch the active window (in the non-primary) with the primary position - simply alt-cntrl-minus again.

4 tiled windows snapped with alt+cntrl+minus

Use alt+cntrl+enter to create another terminal.

It will float on top of the 4 other windows for a total of 5 windows.

5 windows

Then alt+cntrl+minus to restacck the 5 windows into the tiled layout with the focused window placed in the master position on the left.

5 tiled windows

So now 4 windows have been snapped into the stack on the right, and the focused window at that time was snapped into the master position on the left.

The tiled windows can also be restacked with alt+cntrl+shift+minus, so the master is now on top.

tiled windows

Screenshots of floating windows (without tiling)

screenshot1

screenshot2

screenshot3

screenshot4

screenshot5

screenshot6

screenshot7

Screenshots with the native application launcher

The application laucher can be run with a mouse click.

native-luancher1

native-luancher2

Or you may run applications from the shell. For example:

chromium-browser&

or to ignore any run-time errors:

chromium-browser > /dev/null 2>&1 &

Add the disown command to detach the application from the terminal:

chromium-browser > /dev/null 2>&1 & disown

As systemd is used, managing the host from the shell can also be achieved with the following commands:

systemctl suspend
systemctl reboot
systemctl poweroff

Installation and configuration of CWM

The official repo for CWM is here:

Most Linux distributions have the CWM in their repository. So installing CWM is extremely easy. For example, to install in Fedora:

sudo dnf install cwm

For Debian:

sudo apt-get install cwm

For Arch:

sudo pacman -S cwm

FreeBSD also has CWM in their repository, and is installed as follows:

sudo pkg install cwm

The ~/.cwmrc configuration file used in the screen shots is similar to this:

# CMS-r = restart
# these fonts are for the application launcher menu
#fontname fixed-13
fontname fixed-11

moveamount 10	# granularity of finest movement
vtile 50
htile 75
gap 1 1 1 1
color activeborder red
color inactiveborder black
snapdist 3

bind-key CM-Return  "kitty"
bind-key CM-minus   window-vtile
bind-key CMS-minus  window-htile

autogroup 1 kitty,kitty
autogroup 2 urxvt,URxvt
autogroup 3 brave-browser, Brave-browser
autogroup 4 chromium-browser,Chromium-browser
autogroup 6 "VirtualBox Manager", "VirtualBox Manager"
autogroup 7 "VirtualBox Machine", "VirtualBox Machine"
autogroup 8 "vncviewer", "Vncviewer"

bind-key M-1 group-toggle-1
bind-key M-2 group-toggle-2
bind-key M-3 group-toggle-3
bind-key M-4 group-toggle-4
bind-key M-5 group-toggle-5
bind-key M-6 group-toggle-6
bind-key M-7 group-toggle-7
bind-key M-8 group-toggle-8
bind-key M-0 group-toggle-all

#ignore polybar

# for the native application menu
command xscreensaver	"xscreensaver"
command urxvt   "urxvt"
command kitty   "kitty"
command top-green   "urxvt +sb -depth 32 -bg rgba:1111/1111/1111/9999 -fg [100]green -e top"
command top     "urxvt +sb -depth 32 -bg rgba:0000/0000/0000/6666 -fg [100]cyan -e top"
command vim		"urxvt -e vim ."

Inspect the CWM manual for all the default key bindings:

man cwm

Then inspect the CWM configuration manual for the other possibilities for the ~/.cwmrc file:

man cwmrc

Applications

System information with Fastfetch

Also as an option, install Fastfetch for some bling when a terminal is started. The source is here: github.com/LinusDierheimer/fastfetch

Fastfetch is present in the Fedora repo:

sudo dnf install fastfetch

This is what Fastfetch looks like on Fedora.

image

However I can also use an actual image for the graphic, if I download a suitable image like as follows:

Then I can call Fastfetch to use the image.

fastfetch --logo-type kitty --logo-width 60 --logo ~/Downloads/Fedora_logo.png

image

The virtual terminal with Urxvt

Urxvt is present in the Fedora repo:

sudo dnf install rxvt-unicode

My urxvt terminal is configured without scroll bars. Also use shift-pageup to scroll up, and shift-pagedown to scroll down. The +ssr parameter of urxvt turns off secondary screen scroll, so for example text inside the Vim editor will not be shown in the primary window after Vim has exited. The same setting is set with secondaryScroll.

Create a ~/.Xdefaults file for the configuration of the urxvt terminal. Place the following configuration in it:

URxvt.scrollBar: off
# turn off the secondary screen scrolling for a pager. eg less.
URxvt.secondaryScroll: off
URxvt.depth: 32
# black (0000/0000/0000) with no transparency (ffff)
# grey (1111/1111/1111) with no transparency (ffff)
URxvt.background: rgba:0000/0000/0000/ffff
URxvt.foreground: [100]grey
URxvt.font: xft:monospace:pixelsize=12
URxvt.geometry: 132x50
URxvt.visualBell: on

The virtual terminal with Kitty

Kitty is in the Fedora repo:

sudo dnf install kitty

My Kitty terminal is configured without scroll bars. Also use cntrl-shift-pageup to scroll up, and cntrl-shift-pagedown to scroll down. In Kitty, secondary screen scrolling is off by default.

Also define the font and font size you want to use with the Fish shell. In the config above I’m using FiraCode: github.com/tonsky/FiraCode

sudo dnf install fira-code-fonts

Kitty can autocreate a default configuration file in ~/.config/kitty/kitty.conf by using ctrl+shft+f2. Or you can maually create a configuration file yourself in the same location.

Then you can add configurations to the head of the file similar to as follows:

remember_window_size no
initial_window_width  1000
initial_window_height 1000
hide_window_decorations yes
background_opacity 0.9
dynamic_background_opacity yes
scrollback_fill_enlarged_window yes
focus_follows_mouse yes
# dnf install fira-code-fonts
font_family Fira Code Regular
font_size 10
enable_audio_bell no
visual_bell_duration 0.1
editor nvim

Terminal multiplexing with Tmux

Handy to have, so install it:

sudo dnf install tmux

Create a default ~/.tmux.conf file with the following contents:

# theme
#set -g @plugin 'catppuccin/tmux'
# ...alongside
set -g @plugin 'tmux-plugins/tpm'

#set -g @catppuccin_flavour 'latte' # or frappe, macchiato, mocha

set -g status-position top
# status bar
set -g status-style "bg=black"
set -ag status-style "fg=yellow"
# inactive status bar
set -g window-status-style bg=yellow
# active status bar
set -g window-status-current-style bg=red,fg=white

set -g mode-keys vi
set -g mouse

# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'

Terminal shell with Zsh

The Zsh shell is pretty plain out-of-the box but can be configured easily enough.

Unlike Fish, Zsh as a vim mode so you can escape and then use the vim key bindings to help you edit a command.

Install the Zsh shell as follows:

sudo dnf install zsh zsh-autosuggestions zsh-syntax-highlighting

We will use a Zsh plugin manager:

Install it as follows:

zsh <(curl -s https://raw.githubusercontent.com/zap-zsh/zap/master/install.zsh) --branch release-v1

Compared with Fish, there are less features out-of-the-box, so Zsh should be setup with a configuration file up-front. Create a default ~/.zshrc file with the following contents:

# Created by Zap installer
[ -f "${XDG_DATA_HOME:-$HOME/.local/share}/zap/zap.zsh" ] && source "${XDG_DATA_HOME:-$HOME/.local/share}/zap/zap.zsh"
plug "zsh-users/zsh-autosuggestions"
#plug "zap-zsh/supercharge"
#plug "zap-zsh/zap-prompt"
#plug "zsh-users/zsh-syntax-highlighting"
#plug "zsh-zsh/vim"

plug 'zdharma-continuum/fast-syntax-highlighting'
plug 'zsh-users/zsh-history-substring-search'

################################################################
# environment variables
################################################################
# Show the man page in Neovim
export MANPAGER='nvim +Man!'

alias ls='ls --color=auto --group-directories-first -v'
# for Tmux, set the mode for key bindings
EDITOR=nvim

# execute fastfetch only on the zsh login shell
# Will be named: /dev/tty1
if [[ $0 = -zsh ]]; then
  fastfetch
fi

# execute only on the first TTY created
# /dev/pts/0
# download image: https://fedoraproject.org/wiki/File:Fedora_logo.png
if [[ $TTY = /dev/pts/0 ]]; then
  fastfetch --logo-type kitty --logo-width 60 --logo ~/Downloads/Fedora_logo.png
  redshift -l manual -l -34.43:150.85 -t 6500:3000&
  ~/./battery.sh&
  jobs
  cd ~/me; ls -lhalr; git pull
fi

# execute only on the second TTY created
# /dev/pts/1
if [[ $TTY = /dev/pts/1 ]]; then
    tmux
fi

################################################################
# Autoload functions and themes
# Note - needs to be set before the prompt is shown in the terminal
################################################################
# Created by newuser for 5.8
autoload -Uz compinit promptinit
compinit
# a prompt theme system for changing prompts easily
promptinit

# This will set the default prompt to the walters theme
prompt walters

##################################################
# shell parameters
##################################################
# keep the history file independent from the Bash history file.
# Note: stores interactive history only
HISTFILE=~/.histfile
# max number of events stored
# Immediately before execution, each command is saved in the history list, the size of which is
# controlled by the HISTSIZE parameter.
HISTSIZE=1000
SAVEHIST=$HISTSIZE

# The default editor for the fc builtin.
# Note: will follow EDITOR, if blank.
FCEDIT='nvim'

# output to the terminal instead of beeping.
# eg flashing reverse video on and off.
ZBEEP='\e[?5h\e[?5l'

# The primary prompt string, printed before a command is read.
# Note: same as PS1
PROMPT='%F{green}%n%f@%F{magenta}%m%f %F{blue}%B%~%b%f %# '
# This prompt is displayed on the right-hand side of the screen when the primary
# prompt is being displayed on the left.
# note; same as RPS1
RPROMPT='[%F{yellow}%?%f]'

##################################################
# options
##################################################
# Note: before execution, each command is saved in the history list
# Beep in ZLE when a widget attempts to access a history entry which isn’t there.
setopt HIST_BEEP
# removes copies of lines still in the history list, keeping the newly added one
setopt HIST_IGNORE_ALL_DUPS
# zsh sessions will append their history list to the history file, rather than replace it.
setopt APPEND_HISTORY
# both imports new commands from the history file, and also causes your typed commands to be appended to the history file
setopt SHARE_HISTORY
# Remove command lines from the history list when the first character on the line is a space.
setopt HIST_IGNORE_SPACE
# If a new command line being added to the history list duplicates an older one, the older command is removed from the list
setopt HIST_IGNORE_ALL_DUPS
# When writing out the history file, older commands that duplicate newer ones are omitted.
setopt HIST_SAVE_NO_DUPS
# Do not enter command lines into the history list if they are duplicates of the previous event.
setopt HIST_IGNORE_DUPS
# When searching for history entries in the line editor, do not display duplicates of a line previously found.
setopt HIST_FIND_NO_DUPS

# if not a command, then assume a directory and do a cd against it.
setopt AUTO_CD
# Beep on error in ZLE.
setopt BEEP
# Treat the #, ~ and ^ characters as part of patterns for filename generation, etc.
setopt EXTENDED_GLOB
# If a pattern for filename generation has no matches, print an error, instead of leaving it unchanged
setopt NOMATCH
# Report the status of background jobs immediately, rather than waiting until just before printing a prompt.
setopt NOTIFY
# Try to correct the spelling of all arguments in a line.
setopt CORRECT_all


##################################################
# ZSH Line Editor
##################################################
# Selects keymap ‘viins’ for any operations by the current command
bindkey -v

# use ^p and ^n to search through history more precisely with a starting prefix.
bindkey '^p' history-search-backward
bindkey '^n' history-search-forward

##################################################
# Shell built in commands
##################################################
zstyle ':completion::complete:*' gain-privileges 1
# make the search case insensitive for the auto-completion
zstyle ':completion:*' matcher-list 'm:{a-z}={A-Za-z}'
# add colour to the auto-completions too
zstyle ':completion:*' list-colors "${(s,:,)LS_COLORS}"

# create a zkbd compatible hash;
# to add other keys to this hash, see: man 5 terminfo
typeset -g -A key

# The following lines were added by compinstall
#zstyle :compinstall filename '/home/me/.zshrc'

# Finally, make sure the terminal is in application mode, when zle is
# active. Only then are the values from $terminfo valid.
if (( ${+terminfo[smkx]} && ${+terminfo[rmkx]} )); then
	autoload -Uz add-zle-hook-widget
	function zle_application_mode_start { echoti smkx }
	function zle_application_mode_stop { echoti rmkx }
	add-zle-hook-widget -Uz zle-line-init zle_application_mode_start
	add-zle-hook-widget -Uz zle-line-finish zle_application_mode_stop
fi


# man zshzle
# A zle widget is a synonym for zle command. Everything is a widget.
# List bindkeys: bindkey
# List widgets: zle -l
# And in Bash can use cntrl-x cntrl-e (by default)
# Can setup the same key bindings for ZLE
# Note: for this to work correctly, need to still be in insert mode at the command line.
autoload -U edit-command-line;
zle -N edit-command-line;
bindkey '^x^e' edit-command-line;

################################################################
# other
################################################################
#source /usr/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
#source /usr/share/zsh-autosuggestions/zsh-autosuggestions.zsh
#source /etc/profile.d/fzf-completion.zsh
#source /etc/profile.d/fzf.zsh

There are a number of native command prompt themes available, and they can be listed with :

prompt -p

image

An example of a basic Zsh command prompt theme (eg walters) is below:

image

An interactive shell with Fish

The Fish shell has syntax highlighting out-of-the box with a selection of prompts and colour themes. Install the Fish shell as follows:

sudo dnf install fish

The ~/.config/fish/config.fish file is like this:

if status is-interactive
    # Commands to run in interactive sessions can go here
    # add color to the less pager in Fish, not Bash does this differently using export.
    set -gx LESS_TERMCAP_mb (printf '\e[01;31m') # enter blinking mode - red
    set -gx LESS_TERMCAP_md (printf '\e[01;35m') # enter double-bright mode - bold, magenta
    set -gx LESS_TERMCAP_me (printf '\e[0m') # turn off all appearance modes (mb, md, so, us)
    set -gx LESS_TERMCAP_se (printf '\e[0m') # leave standout mode
    set -gx LESS_TERMCAP_so (printf '\e[01;33m') # enter standout mode - yellow
    set -gx LESS_TERMCAP_ue (printf '\e[0m') # leave underline mode
    set -gx LESS_TERMCAP_us (printf '\e[04;36m') # enter underline mode - cyan
end
#Note - same what may be found in a Bash configuration file except the $ is removed.

#Add your favourite keyboard layout here for X11
#setxkbmap -layout us -variant <name>

# Now it's your choice of fastfetch for every terminal
#fastfetch
# or fastfetch just for the 1st terminal (fish syntax)
set -l LIVE_COUNTER $(ps a -o tty $(pgrep $(echo $TERM)) | uniq --unique | wc -l)
if [ $LIVE_COUNTER -eq 1 ]
     fastfetch
end

The theme and prompt can also be selected from the native configurations. Display a list of Fish themes with:

fish_config theme show

image

Then choose a Fish theme like this:

fish_config theme choose 'ayu Dark'
fish_config theme save 'ayu Dark'

Similarly display a list of Fish prompts with:

fish_config prompt show

And choose a Fish prompt like this:

fish_config prompt choose nim
fish_config prompt save

An example of the 'ayu Dark' theme with a 'nim' prompt is below:

image

If you are running a job in the background then it will be shown.

image

When no jobs are present then the normal prompt returns.

Window transparency with Picom

Transparency in the terminal is enabled in the terminal, but the transparency itself is performed by Picom:

sudo dnf install picom

Status bar with Polybar

Status bar can be provided by Polybar:

sudo dnf install polybar

In the Fedora repo there is an example config file installed by default: /usr/share/doc/polybar/examples/config.ini

However this file can be copied to: ~/.config/polybar/config.ini

mkdir ~/.config/polybar/
cp /usr/share/doc/polybar/examples/config.ini ~/.config/polybar/config.ini

By default, this is what it looks like (need the prerequisite fonts installed - see below)

image

However, the bar is easy to customise to your liking, and edit the configuration file to remove any components that you don’t want to use.

For Fedora, you may need to install the right fonts (eg siji, and NotoColorEmoji) for the Polybar config file. Also need the xset app for the siji font below:

sudo dnf install xset

Then follow the instructions in github to install the siji font:

Now ensure the Polybar config.ini file refers to the google-noto-emoji font:

font-0 = fixed:pixelsize=10;1
;font-1 = unifont:fontformat=truetype:size=8:antialias=false;0
;then edit the font-1 line in the config look like this (uses the google-noto-emoji font)
font-1 = NotoColorEmoji:fontformat=truetype:scale=8;0
font-2 = siji:pixelsize=10;1

Then run the example bar with:

polybar example&

Or place the above command in the CWM configuration file (shown below).

Now the Polybar will look something like this:

image

Tiled windows with a Polybar (top right corner):

An modified version of the example Polybar, with the bar at 50% of the screen width, is shown below:

image

Text editing with Neovim and Lua

Neovim can be thought of as an enhanced Vim editor, with the advantage that the Lua language can be used for configuration.

Install Neovim in Fedora like this:

sudo dnf install neovim

Neovim can reuse a Vim configuration file (with Vimscript), but for those that want to use Lua, then the starting point is to do the following steps.

Create a Lua directory for Neovim:

mkdir -p ~/.config/nvim/lua

Now create a settings file using Lua in ~/.config/nvim/lua/settings.lua The settings file will be based on your current vim.init file, but now the Lua syntax will be used instead.

local o = vim.o
local wo = vim.wo
local bo = vim.bo

-- global options
o.termguicolors = true
o.ignorecase = true
o.smartcase = true
o.mouse='n'
o.foldclose='all'
o.linebreak=true
o.visualbell = true
o.mousefocus = true
o.behave = 'xterm'
-- Note: default termpastefilter is 'BS,HT,ESC,DEL'
o.termpastefilter = o.termpastefilter..',C0,C1'
-- The minimal width of a window, when it's not the current window.
o.winminwidth = 12
-- for everforest
o.background='dark'
-- for the cursor for each mode
o.guicursor='n-v-c:block,'..
    'i-ci-ve:ver25,'..
    'r-cr:hor20,'..
    'o:hor50,'..
    'a:blinkwait700-blinkoff400-blinkon250-Cursor/lCursor,'..
    'sm:block-blinkwait175-blinkoff150-blinkon175'

o.wrapscan = true
o.autochdir = true
o.colorcolumn = '81'

-- window-local options
wo.number = true
wo.relativenumber = true
wo.cursorline = true
-- Enables pseudo-transparency for a floating window.
wo.winblend = 20

-- buffer-local options
--bo.tabstop = 4
vim.o.shiftwidth = 4
bo.autoindent = true
-- for the increment cntrl-a and decrement cntrl-x.
vim.o.nrformats = vim.o.nrformats..',octal,alpha'
vim.o.matchpairs = vim.o.matchpairs..',<:>'

-- set the key map to create the () combination everytime the ( is entered
vim.api.nvim_set_keymap('i', '(', '()<left>', { noremap = true, silent = true })
-- disable the ZZ combination
vim.api.nvim_set_keymap('n', 'ZZ', '<Nop>', { noremap = true, silent = true })

-- highlight the vertical split, and the whole line the cursor is on.
vim.api.nvim_exec(
[[
    highlight vertsplit cterm=none gui=none
    highlight cursorline guibg=Grey20
]], false
)

-- Short-hand for vim.api.nvim_exec
-- set the format for NETRW
vim.cmd([[
    let g:netrw_liststyle=3
    let g:netrw_keepdir=0
    let g:netrw_sizestyle='H'
]])

-- for highlight on yank
vim.cmd([[
    au TextYankPost * silent! lua vim.highlight.on_yank {higroup="IncSearch", timeout=150}
]])


--set the colorscheme from the core selections.
--vim.api.nvim_command('colorscheme darkblue')
-- https://github.com/neanias/everforest-nvim
vim.cmd([[colorscheme everforest]])

Now create a reference to the settings file in ~/.config/nvim/init.lua file like this:

-- lua/plugins.lua
require('plugins')
require('packer')
require('neoscroll').setup()
require'shade'.setup({
  overlay_opacity = 50,
  opacity_step = 1,
  keys = {
    brightness_up    = '<C-Up>',
    brightness_down  = '<C-Down>',
    toggle           = '<Leader>s',
  }
})
require('base16-colorscheme')

-- https://github.com/neanias/everforest-nvim
require("everforest").setup({
  -- Controls the "hardness" of the background. Options are "soft", "medium" or "hard".
  -- Default is "medium".
  background = "hard",
  -- How much of the background should be transparent. Options are 0, 1 or 2.
  -- Default is 0.
  --
  -- 2 will have more UI components be transparent (e.g. status line
  -- background).
  transparent_background_level = 0,
  -- Whether italics should be used for keywords, builtin types and more.
  italics = false,
  -- Disable italic fonts for comments. Comments are in italics by default, set
  -- this to `true` to make them _not_ italic!
  disable_italic_comments = false,
})

-- Environment settings in lua/settings.lua
require('settings')

Now edit the ~/config/nvim/lua/plugins.lua

-- automatically install and set up packer.nvim on any machine you clone your configuration to
local fn = vim.fn
local install_path = fn.stdpath('data')..'/site/pack/packer/start/packer.nvim'
if fn.empty(fn.glob(install_path)) > 0 then
  packer_bootstrap = fn.system({'git', 'clone', '--depth', '1', 'https://github.com/wbthomason/packer.nvim', install_path})
end

-- configure Neovim to automatically run :PackerCompile whenever plugins.lua is updated with an autocommand:
vim.cmd([[
  augroup packer_user_config
    autocmd!
    autocmd BufWritePost plugins.lua source <afile> | PackerCompile
  augroup end
]])

return require('packer').startup({function()
  -- My plugins here
  -- use 'foo1/bar1.nvim'
  -- use 'foo2/bar2.nvim'

  -- Packer can manage itself
  use {'wbthomason/packer.nvim'}

  -- Neoscroll: a smooth scrolling neovim plugin written in lua
  -- https://github.com/karb94/neoscroll.nvim
  use {'karb94/neoscroll.nvim'}

  -- Shade is a Neovim plugin that dims your inactive windows, making it easier to see the active window at a glance.
  -- https://github.com/sunjon/Shade.nvim
  use {'sunjon/shade.nvim'}

  -- https://github.com/RRethy/nvim-base16
  use {'RRethy/nvim-base16'}

  -- https://github.com/neanias/everforest-nvim
  use({
  "neanias/everforest-nvim",
  -- Optional; default configuration will be used if setup isn't called.
  config = function()
    require("everforest").setup()
  end,
  })

-- Automatically set up your configuration after cloning packer.nvim
  -- Put this at the end after all plugins
  if packer_bootstrap then
    require('packer').sync()
  end
end,
-- use a floating window with single borders for command outputs
config = {
  display = {
    --open_fn = require('packer.util').float,
	open_fn = function()
      return require('packer.util').float({ border = 'single' })
    end
  }
}
})

Now install and resync the plugin like this: :PackerInstall :PackerSync :PackerCompile

The following screenshot uses the everforest color scheme.

image

PDF document viewer with Zathura

It’s possible to view PDFs with your browser, but a dedicated PDF viewer can be more convenient.

sudo dnf install zathura zathura-plugins-all
sudo dnf install zathura-fish-completion

Some of the key bindings are the same as Vim, with the basics as:

  • j = down

  • k = up

  • g = top of document

  • G = bottom of document

  • minus = zoom in

  • plus = zoom out

  • equals = original size

  • q = quit

Viewing a PDF is as easy as:

zathura <name of pdf>

image

Other applications

Use of other packages can be seen in the screenshots, and they are:

  • chromium - browser

  • exa - a modern replacement for ls

  • feh - wallpaper launcher

  • xclip - copy between the clipboard and the primary selection

  • git - version control

  • sysstat - for the sar utility

  • redshift - adjusts the color temperature of your screen

  • flameshot - for screenshots

Install those from DNF

sudo dnf install chromium exa feh xclip vim-X11 git sysstat redshift flameshot

So using xsel or xclip you can copy selections as follows:

xsel -o --primary| xsel -i --clipboard

xclip -o -selection primary| xclip -i -selection clipboard

Flameshot can be used like this:

flameshot gui

Other configurations

Enhance the touchpad

If you are using a laptop, then the touchpad may not have full functionality. For example, a drag selection is possible, but a double-tap selection is not. So to enable a double-tap selection, create the following file as the root user: /etc/X11/xorg.conf.d/10-touchpad.conf

Section "InputClass"
    Identifier "tap-by-default"
    Driver "libinput"
    Option "Tapping" "on"
EndSection

Rectify any screen tearing and freezing

If you are using the native X11 drivers for your GPU, then it’s possible you may encounter abnormal video. The same problems may not exist with the vendor supplied drivers.

For the native X11 drivers, you may experience screen tearing and freezing for the Intel GPU that you’re using. If so, then try the following.

Create the following file as the root user: /etc/X11/xorg.conf.d/20-intel.conf

Section "Device"
    Identifier  "Intel Graphics"
    Driver      "intel"
    # stop screen tearing
    Option "TearFree" "true"
    Option "TripleBuffer" "true"
    # stop screen freezing
    Option "DRI" "2"
EndSection

Package management with DNF

Optimise dnf for performance, by adding the following to /etc/dnf/dnf.conf

max_parallel_downloads=10
fastestmirror=True

X11 startx configuration

Can use ~/.xinitrc to start the default the applications, before starting CWM:

xrandr --output VGA-0 --auto

#feh --no-fehbg --bg-fill --randomize /usr/share/backgrounds/wallpapers-master&
#Fedora wallpaper is here:
feh --no-fehbg --bg-fill /usr/share/backgrounds/images/default-16_10.png&

picom&

#uncomment to execute by default
#polybar example&

dunst&

redshift -l manual -l -34.43:150.85 -t 6500:3000&

exec cwm

Now start the Calm Window Manager with:

startx

Releases

No releases published

Packages

No packages published

Languages