cleanup, st has its own repo now
This commit is contained in:
parent
6d394a1be3
commit
6237ee1294
8 changed files with 0 additions and 1809 deletions
|
@ -1,27 +0,0 @@
|
||||||
#! /bin/sh
|
|
||||||
export _JAVA_AWT_WM_NONREPARENTING=1
|
|
||||||
|
|
||||||
bspc config border_width 2
|
|
||||||
bspc config window_gap 2
|
|
||||||
|
|
||||||
bspc config split_ratio 0.50
|
|
||||||
bspc config borderless_monocle true
|
|
||||||
bspc config gapless_monocle true
|
|
||||||
bspc config focus_by_distance true
|
|
||||||
bspc config focus_follows_pointer true
|
|
||||||
bspc config pointer_follows_monitor true
|
|
||||||
bspc config top_padding 16
|
|
||||||
|
|
||||||
screens=$(xrandr|grep ' connected')
|
|
||||||
primary=$(awk '{if ($3 == "primary") print $1}' <<< $screens)
|
|
||||||
secondary=$(awk '{if ($3 != "primary") print $1}' <<< $screens)
|
|
||||||
bspc monitor $primary -d 1 2 3
|
|
||||||
bspc monitor $secondary -d q w e
|
|
||||||
|
|
||||||
wmname "LG3D"
|
|
||||||
|
|
||||||
#bspc rule -a Gimp desktop=^8 follow=on floating=on
|
|
||||||
#bspc rule -a Chromium desktop=^2
|
|
||||||
#bspc rule -a mplayer2 floating=on
|
|
||||||
#bspc rule -a Kupfer.py focus=on
|
|
||||||
#bspc rule -a Screenkey manage=off
|
|
827
defunct/rc.lua
827
defunct/rc.lua
|
@ -1,827 +0,0 @@
|
||||||
-- {{{ Includes
|
|
||||||
-- Standard awesome library
|
|
||||||
local gears = require('gears')
|
|
||||||
local awful = require('awful')
|
|
||||||
awful.rules = require('awful.rules')
|
|
||||||
require('awful.autofocus')
|
|
||||||
-- Widget and layout library
|
|
||||||
local wibox = require('wibox')
|
|
||||||
-- Theme handling library
|
|
||||||
local beautiful = require('beautiful')
|
|
||||||
-- Notification library
|
|
||||||
local naughty = require('naughty')
|
|
||||||
local menubar = require('menubar')
|
|
||||||
-- }}}
|
|
||||||
-- {{{ Custom functions
|
|
||||||
-- test if file exists
|
|
||||||
function exists(name)
|
|
||||||
local f=io.open(name,'r')
|
|
||||||
if f ~= nil then
|
|
||||||
io.close(f)
|
|
||||||
return true
|
|
||||||
else
|
|
||||||
return false
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
-- verify if element is part of the table
|
|
||||||
function enters(element, table)
|
|
||||||
for key, value in pairs(table) do
|
|
||||||
if value == element then
|
|
||||||
return true
|
|
||||||
end
|
|
||||||
end
|
|
||||||
return false
|
|
||||||
end
|
|
||||||
|
|
||||||
-- update wallpapers, useful when attaching screens
|
|
||||||
function update_wallpapers(wallpaper)
|
|
||||||
for s = 1, screen.count() do
|
|
||||||
gears.wallpaper.centered(wallpaper, s)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
-- battery indicator
|
|
||||||
function battery_status ()
|
|
||||||
local batt_status = "/sys/class/power_supply/BAT0/status"
|
|
||||||
local batt_capacity = "/sys/class/power_supply/BAT0/capacity"
|
|
||||||
local fd = io.open(batt_status, "r")
|
|
||||||
if not fd then
|
|
||||||
do return "" end
|
|
||||||
end
|
|
||||||
local text = fd:read("*a")
|
|
||||||
io.close(fd)
|
|
||||||
local fd = io.open(batt_capacity, "r")
|
|
||||||
if not fd then
|
|
||||||
do return "" end
|
|
||||||
end
|
|
||||||
local battery = string.match(fd:read("*a"), "%d+")
|
|
||||||
io.close(fd)
|
|
||||||
local icon
|
|
||||||
if string.match(text, "Charging") then
|
|
||||||
icon = "↑"
|
|
||||||
elseif string.match(text, "Discharging") then
|
|
||||||
icon = "↓"
|
|
||||||
else
|
|
||||||
icon = "•"
|
|
||||||
end
|
|
||||||
return ' ' .. battery .. icon
|
|
||||||
end
|
|
||||||
-- }}}
|
|
||||||
-- {{{ Error handling
|
|
||||||
-- Check if awesome encountered an error during startup and fell back to
|
|
||||||
-- another config (This code will only ever execute for the fallback config)
|
|
||||||
if awesome.startup_errors then
|
|
||||||
naughty.notify({
|
|
||||||
preset = naughty.config.presets.critical,
|
|
||||||
title = 'Oops, there were errors during startup!',
|
|
||||||
text = awesome.startup_errors
|
|
||||||
})
|
|
||||||
end
|
|
||||||
|
|
||||||
-- Handle runtime errors after startup
|
|
||||||
do
|
|
||||||
local in_error = false
|
|
||||||
awesome.connect_signal(
|
|
||||||
'debug::error',
|
|
||||||
function (err)
|
|
||||||
-- Make sure we don't go into an endless error loop
|
|
||||||
if in_error then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
in_error = true
|
|
||||||
|
|
||||||
naughty.notify({
|
|
||||||
preset = naughty.config.presets.critical,
|
|
||||||
title = 'Oops, an error happened!',
|
|
||||||
text = err
|
|
||||||
})
|
|
||||||
in_error = false
|
|
||||||
end
|
|
||||||
)
|
|
||||||
end
|
|
||||||
-- }}}
|
|
||||||
-- {{{ Variable definitions
|
|
||||||
-- Themes define colours, icons, and wallpapers
|
|
||||||
beautiful.init('/usr/share/awesome/themes/default/theme.lua')
|
|
||||||
theme.font = 'Terminus 9'
|
|
||||||
theme.taglist_font = 'Terminus 11'
|
|
||||||
theme.taglist_squares_sel = nil
|
|
||||||
theme.taglist_squares_unsel = nil
|
|
||||||
|
|
||||||
theme.border_width = 2
|
|
||||||
|
|
||||||
-- amount of pixels to snap windows from
|
|
||||||
snap = 7
|
|
||||||
|
|
||||||
-- set wallpaper
|
|
||||||
local wallpaper = '/home/von/.wallpaper.png'
|
|
||||||
if exists(wallpaper) then
|
|
||||||
theme.wallpaper = wallpaper
|
|
||||||
end
|
|
||||||
|
|
||||||
-- This is used later as the default terminal and editor to run.
|
|
||||||
terminal = 'urxvt'
|
|
||||||
editor = 'gvim'
|
|
||||||
editor_cmd = editor
|
|
||||||
|
|
||||||
-- Default modkey.
|
|
||||||
-- Usually, Mod4 is the key with a logo between Control and Alt.
|
|
||||||
-- If you do not like this or do not have such a key,
|
|
||||||
-- I suggest you to remap Mod4 to another key using xmodmap or other tools.
|
|
||||||
-- However, you can use another modifier like Mod1, but it may interact with others.
|
|
||||||
modkey = 'Mod4'
|
|
||||||
|
|
||||||
-- Tables of layouts to cover with awful.layout.inc, order matters.
|
|
||||||
local layouts = {
|
|
||||||
tiled = {
|
|
||||||
awful.layout.suit.tile,
|
|
||||||
awful.layout.suit.tile.top,
|
|
||||||
awful.layout.suit.tile.left,
|
|
||||||
awful.layout.suit.tile.bottom
|
|
||||||
},
|
|
||||||
max = {
|
|
||||||
awful.layout.suit.max,
|
|
||||||
awful.layout.suit.max.fullscreen
|
|
||||||
},
|
|
||||||
float = {
|
|
||||||
awful.layout.suit.floating
|
|
||||||
},
|
|
||||||
magnifier = {
|
|
||||||
awful.layout.suit.magnifier
|
|
||||||
},
|
|
||||||
|
|
||||||
-- Some weird shit I don't use, but it still exists:
|
|
||||||
|
|
||||||
fair = {
|
|
||||||
awful.layout.suit.fair,
|
|
||||||
awful.layout.suit.fair.horizontal
|
|
||||||
},
|
|
||||||
spiral = {
|
|
||||||
awful.layout.suit.spiral,
|
|
||||||
awful.layout.suit.spiral.dwindle
|
|
||||||
}
|
|
||||||
}
|
|
||||||
-- }}}
|
|
||||||
-- {{{ Wallpaper
|
|
||||||
if beautiful.wallpaper then
|
|
||||||
update_wallpapers(beautiful.wallpaper)
|
|
||||||
end
|
|
||||||
-- }}}
|
|
||||||
-- {{{ Tags
|
|
||||||
-- Provide tag names and layout settings if we wish to define them
|
|
||||||
tags = {}
|
|
||||||
saved_layouts = {}
|
|
||||||
for s = 1, screen.count() do
|
|
||||||
tags[s] = { name = {}, layout = {} }
|
|
||||||
saved_layouts[s] = { tiled = {}, max = {} }
|
|
||||||
end
|
|
||||||
-- screen 1
|
|
||||||
--tags[1].name = {
|
|
||||||
-- [1] = 'example',
|
|
||||||
-- [9] = 'example2'
|
|
||||||
--}
|
|
||||||
tags[1].layout = {
|
|
||||||
[1] = layouts.max[1],
|
|
||||||
[4] = layouts.float[1]
|
|
||||||
}
|
|
||||||
-- screens 2+
|
|
||||||
if screen.count() >= 2 then
|
|
||||||
tags[2].layout = {
|
|
||||||
}
|
|
||||||
end
|
|
||||||
-- Fill the missing values with defaults
|
|
||||||
for s = 1, screen.count() do
|
|
||||||
-- Set default tiled layout for all the screens
|
|
||||||
-- if s == 1 and screen.count() ~= 1 then -- in case I ever want to have default for less than 2 screens
|
|
||||||
--if s == 1 then
|
|
||||||
-- default_tiled = layouts.tiled[1]
|
|
||||||
--else
|
|
||||||
-- default_tiled = layouts.tiled[3]
|
|
||||||
--end
|
|
||||||
default_tiled = layouts.tiled[1]
|
|
||||||
for tag = 1, 9 do
|
|
||||||
local name = tags[s].name[tag] or tostring(tag)
|
|
||||||
local layout = tags[s].layout[tag] or default_tiled
|
|
||||||
tags[s].name[tag] = name
|
|
||||||
tags[s].layout[tag] = layout
|
|
||||||
-- Assign saved tiled layout so that we can use it right away
|
|
||||||
if enters(layout, layouts.tiled) then
|
|
||||||
saved_layouts[s].tiled[name] = layout
|
|
||||||
else
|
|
||||||
saved_layouts[s].tiled[name] = default_tiled
|
|
||||||
end
|
|
||||||
saved_layouts[s].max[name] = layouts.max[1]
|
|
||||||
end
|
|
||||||
end
|
|
||||||
-- Set tags instances in wm
|
|
||||||
for s = 1, screen.count() do
|
|
||||||
tags[s] = awful.tag(tags[s].name, s, tags[s].layout)
|
|
||||||
end
|
|
||||||
-- }}}
|
|
||||||
-- {{{ Menu
|
|
||||||
-- Create a laucher widget and a main menu
|
|
||||||
mymainmenu_restart = {
|
|
||||||
{ 'restart', awesome.restart }
|
|
||||||
}
|
|
||||||
mymainmenu_screens = {
|
|
||||||
{ 'one', function() awful.util.spawn_with_shell('1monitor') end },
|
|
||||||
{ 'two', function() awful.util.spawn_with_shell('2monitors') end }
|
|
||||||
}
|
|
||||||
--mymainmenu_quit = {
|
|
||||||
-- { 'quit', awesome.quit }
|
|
||||||
--}
|
|
||||||
|
|
||||||
mymainmenu = awful.menu({
|
|
||||||
items = {
|
|
||||||
{ 'restart', mymainmenu_restart, beautiful.awesome_icon },
|
|
||||||
{ 'screens', mymainmenu_screens, beautiful.awesome_icon }
|
|
||||||
-- { 'quit', mymainmenu_quit, beautiful.awesome_icon }
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
-- Menubar configuration
|
|
||||||
menubar.utils.terminal = terminal -- Set the terminal for applications that require it
|
|
||||||
-- }}}
|
|
||||||
-- {{{ Menu for layoutbox
|
|
||||||
mylbmenu = awful.menu({
|
|
||||||
items = {
|
|
||||||
{ 'Tiled',
|
|
||||||
function ()
|
|
||||||
local screen = mouse.screen
|
|
||||||
local tag = awful.tag.selected(screen).name
|
|
||||||
awful.layout.set(saved_layouts[screen].tiled[tag])
|
|
||||||
end
|
|
||||||
},
|
|
||||||
{ 'Maximized', function () awful.layout.set(layouts.max[1]) end },
|
|
||||||
{ 'Floating', function () awful.layout.set(layouts.float[1]) end },
|
|
||||||
{ 'Spiral', function () awful.layout.set(layouts.spiral[1]) end }
|
|
||||||
}
|
|
||||||
})
|
|
||||||
-- }}}
|
|
||||||
-- {{{ Wibox
|
|
||||||
-- Create a textclock widget
|
|
||||||
mytextclock = awful.widget.textclock(' %a %d %H:%M ')
|
|
||||||
mytextclock:set_font('Terminus Bold 11')
|
|
||||||
-- Create a mail notification widget
|
|
||||||
mytextbox = wibox.widget.textbox()
|
|
||||||
mytextbox:set_text('')
|
|
||||||
mytextbox:set_font('Terminus 9')
|
|
||||||
-- A box to show info about new mail, temporary unneeded
|
|
||||||
--mytextbox_bg = wibox.widget.background()
|
|
||||||
--mytextbox_bg:set_widget(mytextbox)
|
|
||||||
--mytextbox_bg:set_bg(theme.bg_minimize)
|
|
||||||
--mytextbox_bg:set_fg(theme.fg_minimize)
|
|
||||||
-- Create keyboard layout indicator widget
|
|
||||||
--mykblayout = wibox.widget.textbox()
|
|
||||||
--mykblayout:set_text('US')
|
|
||||||
--mykblayout:set_font('Terminus Bold 11')
|
|
||||||
|
|
||||||
-- Battery indicator
|
|
||||||
mybattstatus = wibox.widget.textbox()
|
|
||||||
mybattstatus:set_font('Terminus Bold 11')
|
|
||||||
|
|
||||||
-- Create a wibox for each screen and add it
|
|
||||||
mywibox = {}
|
|
||||||
mypromptbox = {}
|
|
||||||
mylayoutbox = {}
|
|
||||||
mytaglist = {}
|
|
||||||
mytaglist.buttons = awful.util.table.join(
|
|
||||||
awful.button({ }, 1, awful.tag.viewonly),
|
|
||||||
awful.button({ modkey }, 1, awful.client.movetotag),
|
|
||||||
awful.button({ }, 3, awful.tag.viewtoggle),
|
|
||||||
awful.button({ modkey }, 3, awful.client.toggletag)
|
|
||||||
)
|
|
||||||
mytasklist = {}
|
|
||||||
mytasklist.buttons = awful.util.table.join(
|
|
||||||
awful.button({ }, 1,
|
|
||||||
function (c)
|
|
||||||
if c ~= client.focus then
|
|
||||||
-- Without this, the following
|
|
||||||
-- :isvisible() makes no sense
|
|
||||||
c.minimized = false
|
|
||||||
if not c:isvisible() then
|
|
||||||
awful.tag.viewonly(c:tags()[1])
|
|
||||||
end
|
|
||||||
-- This will also un-minimize
|
|
||||||
-- the client, if needed
|
|
||||||
client.focus = c
|
|
||||||
c:raise()
|
|
||||||
end
|
|
||||||
end),
|
|
||||||
awful.button({ }, 3,
|
|
||||||
function ()
|
|
||||||
if instance then
|
|
||||||
instance:hide()
|
|
||||||
instance = nil
|
|
||||||
else
|
|
||||||
instance = awful.menu.clients({ width=250 })
|
|
||||||
end
|
|
||||||
end),
|
|
||||||
awful.button({ }, 4,
|
|
||||||
function ()
|
|
||||||
awful.client.focus.byidx(1)
|
|
||||||
if client.focus then
|
|
||||||
client.focus:raise()
|
|
||||||
end
|
|
||||||
end),
|
|
||||||
awful.button({ }, 5,
|
|
||||||
function ()
|
|
||||||
awful.client.focus.byidx(-1)
|
|
||||||
if client.focus then
|
|
||||||
client.focus:raise()
|
|
||||||
end
|
|
||||||
end)
|
|
||||||
)
|
|
||||||
|
|
||||||
for s = 1, screen.count() do
|
|
||||||
-- Create a promptbox for each screen
|
|
||||||
mypromptbox[s] = awful.widget.prompt()
|
|
||||||
-- Create an imagebox widget which will contains an icon indicating which layout we're using.
|
|
||||||
-- We need one layoutbox per screen.
|
|
||||||
mylayoutbox[s] = awful.widget.layoutbox(s)
|
|
||||||
mylayoutbox[s]:buttons(
|
|
||||||
awful.util.table.join(
|
|
||||||
awful.button({ }, 1,
|
|
||||||
function ()
|
|
||||||
local screen = mouse.screen
|
|
||||||
local current_layout = awful.layout.get(screen)
|
|
||||||
if enters(current_layout, layouts.tiled) then
|
|
||||||
local tag = awful.tag.selected(screen).name
|
|
||||||
awful.layout.inc(layouts.tiled, 1)
|
|
||||||
saved_layouts[screen].tiled[tag] = awful.layout.get(screen)
|
|
||||||
end
|
|
||||||
end),
|
|
||||||
awful.button({ }, 3, function () mylbmenu:toggle() end)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
-- Create a taglist widget
|
|
||||||
mytaglist[s] = awful.widget.taglist(s, awful.widget.taglist.filter.noempty, mytaglist.buttons)
|
|
||||||
|
|
||||||
-- Create a tasklist widget
|
|
||||||
mytasklist[s] = awful.widget.tasklist(s, awful.widget.tasklist.filter.currenttags, mytasklist.buttons)
|
|
||||||
|
|
||||||
-- Create the wibox
|
|
||||||
mywibox[s] = awful.wibox({ position = 'top', height = '18', screen = s })
|
|
||||||
|
|
||||||
local left_layout = wibox.layout.fixed.horizontal()
|
|
||||||
local right_layout = wibox.layout.fixed.horizontal()
|
|
||||||
if s == 1 then
|
|
||||||
right_layout:add(mypromptbox[s])
|
|
||||||
--right_layout:add(mytextbox_bg)
|
|
||||||
right_layout:add(mytaglist[s])
|
|
||||||
right_layout:add(wibox.widget.systray())
|
|
||||||
right_layout:add(mybattstatus)
|
|
||||||
right_layout:add(mytextclock)
|
|
||||||
right_layout:add(mylayoutbox[s])
|
|
||||||
elseif s == 2 then
|
|
||||||
--left_layout:add(mylayoutbox[s])
|
|
||||||
--left_layout:add(mytextclock)
|
|
||||||
--left_layout:add(mytaglist[s])
|
|
||||||
--left_layout:add(mypromptbox[s])
|
|
||||||
right_layout:add(mypromptbox[s])
|
|
||||||
right_layout:add(mytaglist[s])
|
|
||||||
right_layout:add(mytextclock)
|
|
||||||
right_layout:add(mylayoutbox[s])
|
|
||||||
else
|
|
||||||
left_layout:add(mytaglist[s])
|
|
||||||
left_layout:add(mypromptbox[s])
|
|
||||||
right_layout:add(mylayoutbox[s])
|
|
||||||
end
|
|
||||||
|
|
||||||
-- Now bring it all together (with the tasklist in the middle)
|
|
||||||
local layout = wibox.layout.align.horizontal()
|
|
||||||
layout:set_left(left_layout)
|
|
||||||
layout:set_middle(mytasklist[s])
|
|
||||||
layout:set_right(right_layout)
|
|
||||||
|
|
||||||
mywibox[s]:set_widget(layout)
|
|
||||||
end
|
|
||||||
-- }}}
|
|
||||||
-- {{{ Mouse bindings
|
|
||||||
root.buttons(
|
|
||||||
awful.util.table.join(
|
|
||||||
awful.button({ }, 3, function () mymainmenu:toggle() end)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
-- }}}
|
|
||||||
-- {{{ Key bindings
|
|
||||||
globalkeys = awful.util.table.join(
|
|
||||||
awful.key({ modkey, }, 'Up', function () awful.screen.focus_relative( 1) end),
|
|
||||||
awful.key({ modkey, }, 'Down', function () awful.screen.focus_relative(-1) end),
|
|
||||||
awful.key({ modkey, }, 'Left', awful.tag.viewprev),
|
|
||||||
awful.key({ modkey, }, 'Right', awful.tag.viewnext),
|
|
||||||
awful.key({ modkey, }, 'Escape', awful.tag.history.restore),
|
|
||||||
|
|
||||||
-- Switch between windows
|
|
||||||
awful.key({ modkey, }, 'j', function () awful.client.focus.byidx( 1) client.focus:raise() end),
|
|
||||||
awful.key({ modkey, }, 'k', function () awful.client.focus.byidx(-1) client.focus:raise() end),
|
|
||||||
awful.key({ modkey, }, 'i', function () client.focus:raise() end),
|
|
||||||
awful.key({ modkey, }, 'w', function () mymainmenu:show() end),
|
|
||||||
|
|
||||||
-- Switch between screens
|
|
||||||
awful.key({ modkey, }, 'o', function () awful.screen.focus_relative(1) end),
|
|
||||||
|
|
||||||
-- Layout manipulation
|
|
||||||
awful.key({ modkey, 'Shift' }, 'j', function () awful.client.swap.byidx( 1) end),
|
|
||||||
awful.key({ modkey, 'Shift' }, 'k', function () awful.client.swap.byidx(-1) end),
|
|
||||||
awful.key({ modkey, }, 'u', awful.client.urgent.jumpto),
|
|
||||||
|
|
||||||
-- Mod#+Tab hotkeys
|
|
||||||
awful.key({ modkey, }, 'Tab',
|
|
||||||
function ()
|
|
||||||
awful.client.focus.history.previous()
|
|
||||||
if client.focus then
|
|
||||||
client.focus:raise()
|
|
||||||
end
|
|
||||||
end),
|
|
||||||
awful.key({ 'Mod1', }, 'Tab',
|
|
||||||
function ()
|
|
||||||
awful.client.focus.byidx(-1)
|
|
||||||
if client.focus then
|
|
||||||
client.focus:raise()
|
|
||||||
end
|
|
||||||
end),
|
|
||||||
awful.key({ 'Mod1', 'Shift' }, 'Tab',
|
|
||||||
function ()
|
|
||||||
awful.client.focus.byidx(1)
|
|
||||||
if client.focus then
|
|
||||||
client.focus:raise()
|
|
||||||
end
|
|
||||||
end),
|
|
||||||
|
|
||||||
awful.key({ modkey, }, 'l', function () awful.tag.incmwfact( 0.05) end),
|
|
||||||
awful.key({ modkey, }, 'h', function () awful.tag.incmwfact(-0.05) end),
|
|
||||||
awful.key({ modkey, 'Shift' }, 'h', function () awful.tag.incnmaster( 1) end),
|
|
||||||
awful.key({ modkey, 'Shift' }, 'l', function () awful.tag.incnmaster(-1) end),
|
|
||||||
awful.key({ modkey, 'Control' }, 'h', function () awful.tag.incncol( 1) end),
|
|
||||||
awful.key({ modkey, 'Control' }, 'l', function () awful.tag.incncol(-1) end),
|
|
||||||
awful.key({ modkey, }, 'f', function () awful.layout.set(layouts.float[1]) end),
|
|
||||||
awful.key({ modkey, }, 'g', function () awful.layout.set(layouts.magnifier[1]) end),
|
|
||||||
awful.key({ modkey, }, 'm',
|
|
||||||
function ()
|
|
||||||
local screen = mouse.screen
|
|
||||||
local current_layout = awful.layout.get(screen)
|
|
||||||
local tag = awful.tag.selected(screen).name
|
|
||||||
if not enters(current_layout, layouts.max) then
|
|
||||||
awful.layout.set(saved_layouts[screen].max[tag])
|
|
||||||
else
|
|
||||||
awful.layout.inc(layouts.max, 1)
|
|
||||||
saved_layouts[screen].max[tag] = awful.layout.get(screen)
|
|
||||||
end
|
|
||||||
end),
|
|
||||||
awful.key({ modkey, }, 't',
|
|
||||||
function ()
|
|
||||||
local screen = mouse.screen
|
|
||||||
local current_layout = awful.layout.get(screen)
|
|
||||||
local tag = awful.tag.selected(screen).name
|
|
||||||
if not enters(current_layout, layouts.tiled) then
|
|
||||||
awful.layout.set(saved_layouts[screen].tiled[tag])
|
|
||||||
else
|
|
||||||
awful.layout.inc(layouts.tiled, 1)
|
|
||||||
saved_layouts[screen].tiled[tag] = awful.layout.get(screen)
|
|
||||||
end
|
|
||||||
end),
|
|
||||||
awful.key({ modkey, }, 's',
|
|
||||||
function ()
|
|
||||||
local screen = mouse.screen
|
|
||||||
local current_layout = awful.layout.get(screen)
|
|
||||||
if not enters(current_layout, layouts.spiral) then
|
|
||||||
awful.layout.set(layouts.spiral[1])
|
|
||||||
else
|
|
||||||
awful.layout.inc(layouts.spiral, 1)
|
|
||||||
end
|
|
||||||
end),
|
|
||||||
|
|
||||||
awful.key({ modkey, 'Control' }, 'n', awful.client.restore),
|
|
||||||
|
|
||||||
-- Prompt
|
|
||||||
awful.key({ modkey, }, 'r', function () mypromptbox[mouse.screen]:run() end),
|
|
||||||
|
|
||||||
awful.key({ modkey, }, 'e',
|
|
||||||
function ()
|
|
||||||
awful.prompt.run(
|
|
||||||
{ prompt = 'Run Lua code: ' },
|
|
||||||
mypromptbox[mouse.screen].widget,
|
|
||||||
awful.util.eval, nil,
|
|
||||||
awful.util.getdir('cache') .. '/history_eval'
|
|
||||||
)
|
|
||||||
end),
|
|
||||||
-- Menubar
|
|
||||||
awful.key({ modkey, }, 'p', function () menubar.show() end),
|
|
||||||
-- Glbal commands
|
|
||||||
awful.key({ modkey, 'Shift' }, '\\', function () awful.util.spawn('/home/von/vscripts/compton_toggle', false) end),
|
|
||||||
awful.key({ modkey, }, 'x', function () awful.util.spawn(terminal) end),
|
|
||||||
awful.key({ modkey, }, 'q', function () awful.util.spawn('/home/von/.local/bin/ticket_watch', false) end),
|
|
||||||
awful.key({ modkey, }, 'z', function () awful.util.spawn('bash -c "until i3lock -entc 661111 -i /home/von/.wallpaper.png; do :; done"') end),
|
|
||||||
awful.key({ modkey, }, 'F6', function () awful.util.spawn('/home/von/touchpad_hotkey.sh', false) end),
|
|
||||||
awful.key({ }, 'Print', function () awful.util.spawn('xfce4-screenshooter -ws /home/von/screenshots') end),
|
|
||||||
awful.key({ modkey, }, 'Print', function () awful.util.spawn('xfce4-screenshooter -fs /home/von/screenshots') end)
|
|
||||||
)
|
|
||||||
|
|
||||||
clientkeys = awful.util.table.join(
|
|
||||||
awful.key({ modkey, 'Shift' }, 'c', function (c) c:kill() end),
|
|
||||||
awful.key({ modkey, }, 'Return', function (c) c:swap(awful.client.getmaster()) end),
|
|
||||||
awful.key({ modkey, 'Shift' }, 'o', awful.client.movetoscreen ),
|
|
||||||
awful.key({ modkey, }, 'n', function (c) c.minimized = true end),
|
|
||||||
|
|
||||||
-- Window properties
|
|
||||||
awful.key({ modkey, 'Shift' }, 'Return', function (c) c.fullscreen = not c.fullscreen end),
|
|
||||||
awful.key({ modkey, }, 'b',
|
|
||||||
function (c)
|
|
||||||
if c.border_width ~= 0 then
|
|
||||||
c.border_width = 0
|
|
||||||
else
|
|
||||||
c.border_width = beautiful.border_width
|
|
||||||
end
|
|
||||||
end),
|
|
||||||
awful.key({ modkey, 'Shift' }, 't', function (c) c.ontop = not c.ontop end),
|
|
||||||
awful.key({ modkey, 'Shift' }, 's', function (c) c.sticky = not c.sticky end),
|
|
||||||
awful.key({ modkey, }, '`', awful.client.floating.toggle ),
|
|
||||||
awful.key({ modkey, 'Shift' }, 'm',
|
|
||||||
function (c)
|
|
||||||
c.maximized_horizontal = not c.maximized_horizontal
|
|
||||||
c.maximized_vertical = not c.maximized_vertical
|
|
||||||
if c.maximized_horizontal == true and c.maximized_vertical == true then
|
|
||||||
c.border_width = 0
|
|
||||||
client.focus:raise()
|
|
||||||
else
|
|
||||||
c.border_width = beautiful.border_width
|
|
||||||
end
|
|
||||||
end)
|
|
||||||
)
|
|
||||||
|
|
||||||
-- Bind all key numbers to tags.
|
|
||||||
-- Be careful: we use keycodes to make it works on any keyboard layout.
|
|
||||||
-- This should map on the top row of your keyboard, usually 1 to 9.
|
|
||||||
for i = 1, 9 do
|
|
||||||
globalkeys = awful.util.table.join(globalkeys,
|
|
||||||
awful.key({ modkey }, '#' .. i + 9,
|
|
||||||
function ()
|
|
||||||
local screen = mouse.screen
|
|
||||||
local tag = awful.tag.gettags(screen)[i]
|
|
||||||
if tag then
|
|
||||||
if awful.tag.selected(screen) == tag and awful.tag.selectedlist(screen)[2] == nil then
|
|
||||||
awful.tag.history.restore()
|
|
||||||
else
|
|
||||||
awful.tag.viewonly(tag)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end),
|
|
||||||
awful.key({ modkey, 'Control' }, '#' .. i + 9,
|
|
||||||
function ()
|
|
||||||
local screen = mouse.screen
|
|
||||||
local tag = awful.tag.gettags(screen)[i]
|
|
||||||
if tag then
|
|
||||||
awful.tag.viewtoggle(tag)
|
|
||||||
end
|
|
||||||
end),
|
|
||||||
awful.key({ modkey, 'Shift' }, '#' .. i + 9,
|
|
||||||
function ()
|
|
||||||
if client.focus then
|
|
||||||
local tag = awful.tag.gettags(client.focus.screen)[i]
|
|
||||||
if tag then
|
|
||||||
awful.client.movetotag(tag)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end),
|
|
||||||
awful.key({ modkey, 'Control', 'Shift' }, '#' .. i + 9,
|
|
||||||
function ()
|
|
||||||
if client.focus then
|
|
||||||
local tag = awful.tag.gettags(client.focus.screen)[i]
|
|
||||||
if tag then
|
|
||||||
awful.client.toggletag(tag)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end)
|
|
||||||
)
|
|
||||||
end
|
|
||||||
|
|
||||||
clientbuttons = awful.util.table.join(
|
|
||||||
awful.button({ }, 1, function (c) client.focus = c; c:raise() end),
|
|
||||||
awful.button({ modkey }, 1, function (c) client.focus = c; awful.mouse.client.move(c, snap) end),
|
|
||||||
awful.button({ modkey }, 3, awful.mouse.client.resize)
|
|
||||||
)
|
|
||||||
|
|
||||||
-- Set keys
|
|
||||||
root.keys(globalkeys)
|
|
||||||
-- }}}
|
|
||||||
-- {{{ Rules
|
|
||||||
awful.rules.rules = {
|
|
||||||
-- All clients will match this rule.
|
|
||||||
{
|
|
||||||
rule = { },
|
|
||||||
properties = {
|
|
||||||
border_width = beautiful.border_width,
|
|
||||||
border_color = beautiful.border_normal,
|
|
||||||
focus = awful.client.focus.filter,
|
|
||||||
keys = clientkeys,
|
|
||||||
buttons = clientbuttons
|
|
||||||
}
|
|
||||||
},
|
|
||||||
-- Floating only rules:
|
|
||||||
{
|
|
||||||
rule_any = {
|
|
||||||
class = {
|
|
||||||
'Deadbeef',
|
|
||||||
'Google-musicmanager',
|
|
||||||
'mpv',
|
|
||||||
'Pavucontrol',
|
|
||||||
'pinentry',
|
|
||||||
'plugin-container',
|
|
||||||
'Skype',
|
|
||||||
'Vncviewer'
|
|
||||||
},
|
|
||||||
instance = {
|
|
||||||
'sun-awt-X11-XFramePeer'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
properties = {
|
|
||||||
floating = true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
-- Floating borderless, because winamp nostalgia:
|
|
||||||
{
|
|
||||||
rule_any = {
|
|
||||||
class = {
|
|
||||||
'Audacious',
|
|
||||||
'Qmmp'
|
|
||||||
},
|
|
||||||
role = {
|
|
||||||
'bubble'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
properties = {
|
|
||||||
border_width = 0,
|
|
||||||
floating = true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
-- Per app rules
|
|
||||||
-- firefox
|
|
||||||
{
|
|
||||||
rule = { class = 'Firefox' },
|
|
||||||
except = { instance = 'Navigator' },
|
|
||||||
properties = { floating = true }
|
|
||||||
},
|
|
||||||
-- ardour3
|
|
||||||
{
|
|
||||||
rule = { class = 'Ardour' },
|
|
||||||
except = { instance = 'ardour_editor' },
|
|
||||||
properties = { floating = true }
|
|
||||||
},
|
|
||||||
-- Specific desktops rules: place windows only on specific tags by default
|
|
||||||
-- tag 4: games = maximized
|
|
||||||
{
|
|
||||||
rule_any = {
|
|
||||||
class = {
|
|
||||||
'BaldursGate',
|
|
||||||
'BaldursGateII',
|
|
||||||
'IcewindDale',
|
|
||||||
'starbound',
|
|
||||||
'Terraria.bin.x86',
|
|
||||||
'Terraria.bin.x86_64'
|
|
||||||
},
|
|
||||||
name = {
|
|
||||||
'Pillars of Eternity'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
properties = {
|
|
||||||
border_width = 0,
|
|
||||||
maximized = true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
-- tag 4: steam and games
|
|
||||||
{
|
|
||||||
rule_any = {
|
|
||||||
class = { 'Steam' },
|
|
||||||
instance = { 'Steam.exe' }
|
|
||||||
},
|
|
||||||
properties = { tag = tags[1][4] }
|
|
||||||
},
|
|
||||||
{
|
|
||||||
rule_any = {
|
|
||||||
class = {
|
|
||||||
'Awesomenauts.bin.x86',
|
|
||||||
'Civ5XP',
|
|
||||||
'CivBE',
|
|
||||||
'Cities In Motion.bin',
|
|
||||||
'ck2',
|
|
||||||
'csgo_linux',
|
|
||||||
'DefenseGrid2',
|
|
||||||
'deponia_tcj',
|
|
||||||
'dota_linux',
|
|
||||||
'dota2',
|
|
||||||
'game.x86_64',
|
|
||||||
'hl2_linux',
|
|
||||||
'Pandora',
|
|
||||||
'Strife',
|
|
||||||
'Symphony.bin.x86_64',
|
|
||||||
'eu4',
|
|
||||||
'witcher2'
|
|
||||||
},
|
|
||||||
instance = {
|
|
||||||
'Civ4BeyondSword.exe',
|
|
||||||
'GameApp.exe',
|
|
||||||
'KB.exe',
|
|
||||||
'nwn2main.exe'
|
|
||||||
},
|
|
||||||
name = {
|
|
||||||
'Cities in Motion 2',
|
|
||||||
'GunsOfIcarusOnline',
|
|
||||||
'Hand of Fate',
|
|
||||||
'Serious Sam 3 - Linux'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
properties = {
|
|
||||||
border_width = 0,
|
|
||||||
floating = true,
|
|
||||||
tag = tags[1][4]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
-- }}}
|
|
||||||
-- {{{ Signals
|
|
||||||
-- Signal function to execute when a new client appears.
|
|
||||||
client.connect_signal(
|
|
||||||
'manage',
|
|
||||||
function (c, startup)
|
|
||||||
-- Enable sloppy focus
|
|
||||||
c:connect_signal(
|
|
||||||
'mouse::enter',
|
|
||||||
function(c)
|
|
||||||
if awful.layout.get(c.screen) ~= layouts.magnifier[1] and awful.client.focus.filter(c) then
|
|
||||||
client.focus = c
|
|
||||||
end
|
|
||||||
end
|
|
||||||
)
|
|
||||||
|
|
||||||
if not startup then
|
|
||||||
-- Set the windows at the slave,
|
|
||||||
-- i.e. put it at the end of others instead of setting it master.
|
|
||||||
awful.client.setslave(c)
|
|
||||||
|
|
||||||
-- Put windows in a smart way, only if they do not set an initial position.
|
|
||||||
if not c.size_hints.user_position and not c.size_hints.program_position then
|
|
||||||
awful.placement.no_overlap(c)
|
|
||||||
awful.placement.no_offscreen(c)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
)
|
|
||||||
|
|
||||||
client.connect_signal('focus', function(c) c.border_color = beautiful.border_focus end)
|
|
||||||
client.connect_signal('unfocus', function(c) c.border_color = beautiful.border_normal end)
|
|
||||||
|
|
||||||
-- save floating layout parameters for windows created and managed during the current session
|
|
||||||
tag.connect_signal(
|
|
||||||
'property::layout',
|
|
||||||
function(t)
|
|
||||||
for k, c in ipairs(t:clients()) do
|
|
||||||
if awful.layout.get(mouse.screen) == awful.layout.suit.floating then
|
|
||||||
c:geometry(awful.client.property.get(c, 'floating_geometry'))
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
)
|
|
||||||
|
|
||||||
client.connect_signal(
|
|
||||||
'manage',
|
|
||||||
function(c)
|
|
||||||
if awful.layout.get(mouse.screen) == awful.layout.suit.floating then
|
|
||||||
awful.client.property.set(c, 'floating_geometry', c:geometry())
|
|
||||||
end
|
|
||||||
end
|
|
||||||
)
|
|
||||||
|
|
||||||
client.connect_signal(
|
|
||||||
'property::geometry',
|
|
||||||
function(c)
|
|
||||||
if awful.layout.get(mouse.screen) == awful.layout.suit.floating then
|
|
||||||
awful.client.property.set(c, 'floating_geometry', c:geometry())
|
|
||||||
end
|
|
||||||
end
|
|
||||||
)
|
|
||||||
|
|
||||||
-- timers
|
|
||||||
if exists("/sys/class/power_supply/BAT0") then
|
|
||||||
mytimer = timer({ timeout = 1 })
|
|
||||||
mybattstatus:set_text('•••')
|
|
||||||
mytimer:connect_signal("timeout", function() mybattstatus:set_text(battery_status()) end)
|
|
||||||
mytimer:start()
|
|
||||||
end
|
|
||||||
-- }}}
|
|
||||||
-- {{{ Autostart
|
|
||||||
-- don't forget you sync this file
|
|
||||||
-- this shit runs every time you restart your wm, dumbass.
|
|
||||||
---- set keyboard layouts (fixkb.zsh is made to fix that)
|
|
||||||
--awful.util.spawn_with_shell('setxkbmap -layout us,ru -variant altgr-intl,typewriter -option ctrl:nocaps,grp:win_space_toggle,grp_led:caps,compose:menu')
|
|
||||||
--awful.util.spawn_with_shell('xkbcomp $DISPLAY - | egrep -v "group . = AltGr;" | xkbcomp - $DISPLAY')
|
|
||||||
---- populate xrdb with .Xresources config
|
|
||||||
if exists('/home/von/.Xresources') then
|
|
||||||
awful.util.spawn_with_shell('xrdb /home/von/.Xresources')
|
|
||||||
end
|
|
||||||
---- execute all the other shit, installation specific
|
|
||||||
if exists('/home/von/.autostart') then
|
|
||||||
awful.util.spawn_with_shell('/home/von/.autostart')
|
|
||||||
end
|
|
||||||
-- }}}
|
|
358
defunct/shellrc
358
defunct/shellrc
|
@ -1,358 +0,0 @@
|
||||||
# vim: ft=zsh
|
|
||||||
# If not running interactively, don't do anything
|
|
||||||
[[ $- != *i* ]] && return
|
|
||||||
|
|
||||||
# {{{ environment
|
|
||||||
# a bunch of functions and vars to make this whole thing work
|
|
||||||
is_zsh() [[ -n ${ZSH_VERSION} ]]
|
|
||||||
is_bash() [[ -n ${BASH_VERSION} ]]
|
|
||||||
|
|
||||||
if is_zsh; then
|
|
||||||
is_exec() [[ -x $(whence ${1}) ]]
|
|
||||||
export HOSTNAME=${HOST}
|
|
||||||
else
|
|
||||||
is_exec() [[ -x $(type -P ${1}) ]]
|
|
||||||
alias whence='type -P'
|
|
||||||
fi
|
|
||||||
|
|
||||||
newline="
|
|
||||||
"
|
|
||||||
vscripts="${HOME}/vscripts"
|
|
||||||
local_bin="${HOME}/.local/bin"
|
|
||||||
gem_bin="${HOME}/.local/gem-bin"
|
|
||||||
[[ -d ${vscripts} && ${PATH} != *${vscripts}* ]] && export PATH=${PATH}:${vscripts}
|
|
||||||
[[ -d ${local_bin} && ${PATH} != *${local_bin}* ]] && export PATH=${PATH}:${local_bin}
|
|
||||||
[[ -h ${gem_bin} && ${PATH} != *${gem_bin}* ]] && export PATH=${PATH}:${gem_bin}
|
|
||||||
unset local_bin vscripts
|
|
||||||
|
|
||||||
dotfiles="${HOME}/vdotfiles"
|
|
||||||
comp_enabled=true
|
|
||||||
vcs_enabled=true
|
|
||||||
|
|
||||||
export MYSQL_PS1="mysql [\d]> "
|
|
||||||
export SSH_AUTH_SOCK="${HOME}/.ssh/ssh_auth_sock"
|
|
||||||
export TIME_STYLE='long-iso'
|
|
||||||
if [[ ${LANG} != 'ru_RU.KOI8-R' ]]; then
|
|
||||||
export LANG='en_US.utf8'
|
|
||||||
export LANGUAGE="$LANG"
|
|
||||||
if [[ ${OSTYPE} != 'cygwin' ]]; then
|
|
||||||
export LC_TIME='en_DK.utf8'
|
|
||||||
export LC_MEASUREMENT='en_DK.utf8'
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
export EDITOR='vim'
|
|
||||||
export PAGER='less -R'
|
|
||||||
export LS_COLORS='no=00:fi=00:di=34:ow=34;40:ln=35:pi=30;44:so=35;44:do=35;44:bd=33;44:cd=37;44:or=05;37;41:mi=05;37;41:ex=01;31:*.cmd=01;31:*.exe=01;31:*.com=01;31:*.bat=01;31:*.reg=01;31:*.app=01;31:*.txt=32:*.org=32:*.md=32:*.mkd=32:*.h=32:*.c=32:*.C=32:*.cc=32:*.cpp=32:*.cxx=32:*.objc=32:*.sh=32:*.csh=32:*.zsh=32:*.el=32:*.vim=32:*.java=32:*.pl=32:*.pm=32:*.py=32:*.rb=32:*.hs=32:*.php=32:*.htm=32:*.html=32:*.shtml=32:*.erb=32:*.haml=32:*.xml=32:*.rdf=32:*.css=32:*.sass=32:*.scss=32:*.less=32:*.js=32:*.coffee=32:*.man=32:*.0=32:*.1=32:*.2=32:*.3=32:*.4=32:*.5=32:*.6=32:*.7=32:*.8=32:*.9=32:*.l=32:*.n=32:*.p=32:*.pod=32:*.tex=32:*.bmp=33:*.cgm=33:*.dl=33:*.dvi=33:*.emf=33:*.eps=33:*.gif=33:*.jpeg=33:*.jpg=33:*.JPG=33:*.mng=33:*.pbm=33:*.pcx=33:*.pdf=33:*.pgm=33:*.png=33:*.ppm=33:*.pps=33:*.ppsx=33:*.ps=33:*.svg=33:*.svgz=33:*.tga=33:*.tif=33:*.tiff=33:*.xbm=33:*.xcf=33:*.xpm=33:*.xwd=33:*.xwd=33:*.yuv=33:*.aac=33:*.au=33:*.flac=33:*.mid=33:*.midi=33:*.mka=33:*.mp3=33:*.mpa=33:*.mpeg=33:*.mpg=33:*.ogg=33:*.ra=33:*.wav=33:*.anx=33:*.asf=33:*.avi=33:*.axv=33:*.flc=33:*.fli=33:*.flv=33:*.gl=33:*.m2v=33:*.m4v=33:*.mkv=33:*.mov=33:*.mp4=33:*.mp4v=33:*.mpeg=33:*.mpg=33:*.nuv=33:*.ogm=33:*.ogv=33:*.ogx=33:*.qt=33:*.rm=33:*.rmvb=33:*.swf=33:*.vob=33:*.wmv=33:*.doc=31:*.docx=31:*.rtf=31:*.dot=31:*.dotx=31:*.xls=31:*.xlsx=31:*.ppt=31:*.pptx=31:*.fla=31:*.psd=31:*.7z=1;35:*.apk=1;35:*.arj=1;35:*.bin=1;35:*.bz=1;35:*.bz2=1;35:*.cab=1;35:*.deb=1;35:*.dmg=1;35:*.gem=1;35:*.gz=1;35:*.iso=1;35:*.jar=1;35:*.msi=1;35:*.rar=1;35:*.rpm=1;35:*.tar=1;35:*.tbz=1;35:*.tbz2=1;35:*.tgz=1;35:*.tx=1;35:*.war=1;35:*.xpi=1;35:*.xz=1;35:*.z=1;35:*.Z=1;35:*.zip=1;35:*.ANSI-30-black=30:*.ANSI-01;30-brblack=01;30:*.ANSI-31-red=31:*.ANSI-01;31-brred=01;31:*.ANSI-32-green=32:*.ANSI-01;32-brgreen=01;32:*.ANSI-33-yellow=33:*.ANSI-01;33-bryellow=01;33:*.ANSI-34-blue=34:*.ANSI-01;34-brblue=01;34:*.ANSI-35-magenta=35:*.ANSI-01;35-brmagenta=01;35:*.ANSI-36-cyan=36:*.ANSI-01;36-brcyan=01;36:*.ANSI-37-white=37:*.ANSI-01;37-brwhite=01;37:*.log=01;32:*~=01;32:*#=01;32:*.bak=01;33:*.BAK=01;33:*.old=01;33:*.OLD=01;33:*.org_archive=01;33:*.off=01;33:*.OFF=01;33:*.dist=01;33:*.DIST=01;33:*.orig=01;33:*.ORIG=01;33:*.swp=01;33:*.swo=01;33:*,v=01;33:*.gpg=34:*.gpg=34:*.pgp=34:*.asc=34:*.3des=34:*.aes=34:*.enc=34:'
|
|
||||||
|
|
||||||
# }}}
|
|
||||||
# {{{ common aliases
|
|
||||||
alias less='command less -R'
|
|
||||||
alias cower='command cower -c'
|
|
||||||
alias pacman='command pacman --color=auto'
|
|
||||||
alias rscreen='command screen -Dr'
|
|
||||||
alias rdesktop='command rdesktop -g1580x860'
|
|
||||||
alias rgrep='command grep --exclude-dir=\.git -R'
|
|
||||||
alias hist='fc -l 1'
|
|
||||||
alias beep='printf "\007"'
|
|
||||||
alias fixterm='printf "c"'
|
|
||||||
alias vi='command vim'
|
|
||||||
alias pg-linux-client='command sudo -u postgres psql'
|
|
||||||
alias mysql='mysql --sigint-ignore'
|
|
||||||
|
|
||||||
# iconv
|
|
||||||
alias iconvwk='command iconv -c -f cp1251 -t koi8-r'
|
|
||||||
alias iconvuk='command iconv -c -f utf-8 -t koi8-r'
|
|
||||||
alias iconvku='command iconv -c -f koi8-r -t utf-8'
|
|
||||||
alias iconvwu='command iconv -c -f cp1251 -t utf-8'
|
|
||||||
|
|
||||||
# grc
|
|
||||||
if is_exec grc; then
|
|
||||||
alias ping='command grc --colour=auto ping'
|
|
||||||
alias ping6='command grc --colour=auto ping'
|
|
||||||
alias traceroute='command grc --colour=auto traceroute'
|
|
||||||
alias traceroute6='command grc --colour=auto traceroute'
|
|
||||||
alias make='command grc --colour=auto make'
|
|
||||||
alias diff='command grc --colour=auto diff'
|
|
||||||
alias cvs='command grc --colour=auto cvs'
|
|
||||||
alias netstat='command grc --colour=auto netstat'
|
|
||||||
fi
|
|
||||||
|
|
||||||
# ls
|
|
||||||
alias ls='command ls --color=auto --group-directories-first '
|
|
||||||
alias la='ls -FA'
|
|
||||||
alias ll='ls -lha'
|
|
||||||
alias ld='ls -lhda'
|
|
||||||
|
|
||||||
# diff and colordiff
|
|
||||||
if is_exec colordiff; then
|
|
||||||
alias diff='command colordiff -u'
|
|
||||||
fi
|
|
||||||
alias rdiff='diff -urx.svn'
|
|
||||||
|
|
||||||
# mount
|
|
||||||
alias mountiso='sudo mount -t iso9660 -o loop'
|
|
||||||
alias mountmdf='sudo mount -o loop'
|
|
||||||
alias mountnrg='sudo mount -o loop,offset=307200'
|
|
||||||
|
|
||||||
# git
|
|
||||||
alias gss='command git status -s'
|
|
||||||
alias gdf='command git diff'
|
|
||||||
alias gci='command git commit -a'
|
|
||||||
alias gup='command git pull'
|
|
||||||
|
|
||||||
# svn
|
|
||||||
alias sss='command svn status'
|
|
||||||
alias sdf='command svn diff'
|
|
||||||
alias sci='command svn commit'
|
|
||||||
alias sup='command svn up'
|
|
||||||
|
|
||||||
# tmux
|
|
||||||
alias tmux='command tmux -2'
|
|
||||||
alias atmux='command tmux -2 attach'
|
|
||||||
# }}}
|
|
||||||
# {{{ common functions
|
|
||||||
screenoff-disable() { xset -dpms; xset s off; }
|
|
||||||
screenoff-enable() { xset +dpms; xset s on; }
|
|
||||||
dotfiles-update() { git --work-tree="${dotfiles}" --git-dir="${dotfiles}/.git" pull; }
|
|
||||||
|
|
||||||
hide-info() { hide_info=true; }
|
|
||||||
unhide-info() { unset hide_info; }
|
|
||||||
|
|
||||||
tmuxrc() { tmux source-file "${HOME}/.tmux.conf"; tmux display-message "Config reloaded."; }
|
|
||||||
|
|
||||||
if [[ -z "${DISPLAY}" ]]; then
|
|
||||||
x() { exec xinit -- :0 -nolisten tcp vt$XDG_VTNR; }
|
|
||||||
else
|
|
||||||
fixkb() {
|
|
||||||
setxkbmap -layout us,ru -variant altgr-intl,typewriter -option ctrl:nocaps,grp:win_space_toggle,grp_led:caps,compose:menu
|
|
||||||
xkbcomp $DISPLAY - | egrep -v "group . = AltGr;" | xkbcomp - $DISPLAY 2>/dev/null
|
|
||||||
}
|
|
||||||
fi
|
|
||||||
|
|
||||||
# }}}
|
|
||||||
if is_zsh; then # {{{
|
|
||||||
# {{{ ~ options
|
|
||||||
setopt APPEND_HISTORY EXTENDED_HISTORY HIST_IGNORE_DUPS EXTENDED_GLOB AUTO_CD AUTO_PUSHD PRINT_EXIT_VALUE
|
|
||||||
unsetopt BEEP NO_MATCH NOTIFY
|
|
||||||
|
|
||||||
SAVEHIST=1000
|
|
||||||
HISTSIZE=1000
|
|
||||||
HISTFILE="${HOME}/.histfile"
|
|
||||||
|
|
||||||
#hl_script='/usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh'
|
|
||||||
extras=( "${HOME}/.zshrc.extras" )
|
|
||||||
|
|
||||||
# completion
|
|
||||||
if [[ -n ${comp_enabled} ]]; then
|
|
||||||
autoload -Uz compinit zsh/terminfo
|
|
||||||
compinit
|
|
||||||
setopt MENU_COMPLETE
|
|
||||||
zstyle ':completion:*' completer _list _complete _ignored
|
|
||||||
zstyle ':completion:*' insert-unambiguous true
|
|
||||||
zstyle ':completion:*' file-sort name
|
|
||||||
zstyle ':completion:*' format 'Completing %d'
|
|
||||||
zstyle ':completion:*' group-name ''
|
|
||||||
zstyle ':completion:*' list-colors ''
|
|
||||||
zstyle ':completion:*' list-prompt '%SAt %p: Hit TAB for more, or the character to insert%s'
|
|
||||||
zstyle ':completion:*' list-suffixes true
|
|
||||||
zstyle ':completion:*' menu select=long-list select=0
|
|
||||||
zstyle ':completion:*' original true
|
|
||||||
zstyle ':completion:*' select-prompt '%SScrolling active: current selection at %p%s'
|
|
||||||
zstyle ':completion:*' matcher-list 'm:{[:lower:][:upper:]}={[:upper:][:lower:]}'
|
|
||||||
zstyle ':completion:*' rehash true
|
|
||||||
zstyle ':completion:*:kill:*:processes' command 'ps --forest -A -o pid,user,cmd'
|
|
||||||
zstyle ':completion:*:processes-names' command 'ps axho command'
|
|
||||||
zstyle ':completion:*:default' list-colors ${(s.:.)LS_COLORS}
|
|
||||||
fi
|
|
||||||
if [[ -n ${vcs_enabled} ]]; then
|
|
||||||
autoload -Uz vcs_info
|
|
||||||
zstyle ':vcs_info:*' enable git svn
|
|
||||||
zstyle ':vcs_info:*' check-for-changes true
|
|
||||||
zstyle ':vcs_info:*' stagedstr " %F{green}v%f"
|
|
||||||
zstyle ':vcs_info:*' unstagedstr " %F{red}x%f"
|
|
||||||
zstyle ':vcs_info:svn*' branchformat '%r'
|
|
||||||
zstyle ':vcs_info:*' formats " %s:%B%F{magenta}%r%f%%b %F{yellow}%b%f%u%c"
|
|
||||||
fi
|
|
||||||
# }}}
|
|
||||||
# {{{ ~ prompt
|
|
||||||
lb='[ '
|
|
||||||
rb=' ]'
|
|
||||||
bb=':'
|
|
||||||
prompt_user='%(1000#..%(1205#..%F{red}%n%f%b ))'
|
|
||||||
prompt_host=${HOSTNAME}
|
|
||||||
prompt_cwd='%B%d%b'
|
|
||||||
prompt_bang='%(!.%F{red}>%f.%B>%b)'
|
|
||||||
prompt_jobs='%(1j. jobs:%B%F{red}%j%f%b.)'
|
|
||||||
precmd() {
|
|
||||||
[[ -n ${vcs_enabled} ]] && vcs_info
|
|
||||||
if [[ -z ${hide_info} ]]; then
|
|
||||||
prompt_info="${lb}${prompt_user}${prompt_host}${bb}${prompt_cwd}${prompt_jobs}${vcs_info_msg_0_}${rb}"
|
|
||||||
else
|
|
||||||
prompt_info=''
|
|
||||||
fi
|
|
||||||
PROMPT="${prompt_info}${newline}${prompt_bang} "
|
|
||||||
}
|
|
||||||
PROMPT2='%b%f%_%B%F{green}>%f%b '
|
|
||||||
PROMPT3='%b%f?%B%F{green}#%f%b '
|
|
||||||
PROMPT4='%b%f+%N:%i%B%F{green}>%f%b '
|
|
||||||
# }}}
|
|
||||||
# {{{ ~ key bindings
|
|
||||||
bindkey -e
|
|
||||||
# urxvt
|
|
||||||
bindkey '^[[7~' beginning-of-line # home
|
|
||||||
bindkey '^[[8~' end-of-line # end
|
|
||||||
bindkey '^[Oc' forward-word # ctrl + right
|
|
||||||
bindkey '^[Od' backward-word # ctrl + left
|
|
||||||
bindkey '^[[3^' delete-word # ctrl + del
|
|
||||||
# screen
|
|
||||||
bindkey '^[[1~' beginning-of-line # home
|
|
||||||
bindkey '^[[4~' end-of-line # end
|
|
||||||
# xterm
|
|
||||||
bindkey '^[[H' beginning-of-line # home
|
|
||||||
bindkey '^[[F' end-of-line # end
|
|
||||||
# most of them (but not urxvt)
|
|
||||||
bindkey '^[[1;5C' forward-word # ctrl + right
|
|
||||||
bindkey '^[[1;5D' backward-word # ctrl + left
|
|
||||||
bindkey '^[[3;5~' delete-word # ctrl + del
|
|
||||||
# all of them
|
|
||||||
bindkey '^[[5~' backward-word # page up
|
|
||||||
bindkey '^[[6~' forward-word # page down
|
|
||||||
bindkey '^[[3~' delete-char # del
|
|
||||||
bindkey '^R' history-incremental-search-backward # ctrl + r
|
|
||||||
bindkey '^[m' copy-prev-shell-word # alt + m
|
|
||||||
bindkey -s '^j' '^atime ^m' # ctrl + j
|
|
||||||
# }}}
|
|
||||||
# {{{ ~ global aliases
|
|
||||||
alias -g L='| less -R'
|
|
||||||
alias -g H='| head'
|
|
||||||
alias -g T='| tail'
|
|
||||||
alias -g G='| grep'
|
|
||||||
alias -g PV='| pv |'
|
|
||||||
alias -g WCL='| wc -l'
|
|
||||||
alias -g NCL='| nc -l 17777'
|
|
||||||
|
|
||||||
# redirection
|
|
||||||
alias -g NO='1> /dev/null'
|
|
||||||
alias -g NE='2> /dev/null'
|
|
||||||
alias -g EO='2> &1'
|
|
||||||
alias -g OE='1> &2'
|
|
||||||
alias -g TEE='>&1 >>'
|
|
||||||
|
|
||||||
# iconv
|
|
||||||
alias -g WK='| iconvwk'
|
|
||||||
alias -g UK='| iconvuk'
|
|
||||||
alias -g KU='| iconvku'
|
|
||||||
alias -g WU='| iconvwu'
|
|
||||||
# }}}
|
|
||||||
# {{{ ~ suffix aliases
|
|
||||||
editor=${EDITOR}
|
|
||||||
text=( 'txt' 'xml' 'cfg' 'cnf' 'conf' 'ini' 'erb' 'pp' )
|
|
||||||
for i in ${text[@]}; do
|
|
||||||
alias -s ${i}=${editor}
|
|
||||||
done
|
|
||||||
|
|
||||||
player='mpv'
|
|
||||||
media=( 'mkv' 'mp4' 'avi' 'mpg' 'mp3' 'ogg' 'mpeg' 'mov' 'webm' 'flv' )
|
|
||||||
for i in ${media[@]}; do
|
|
||||||
alias -s ${i}=${player}
|
|
||||||
done
|
|
||||||
|
|
||||||
viewer='eog'
|
|
||||||
image=( 'jpg' 'png' 'gif' 'bmp' 'jpeg' )
|
|
||||||
for i in ${image[@]}; do
|
|
||||||
alias -s ${i}=${viewer}
|
|
||||||
done
|
|
||||||
|
|
||||||
# wine:
|
|
||||||
if [[ ${OSTYPE} != 'cygwin' ]]; then
|
|
||||||
alias -s exe=wine
|
|
||||||
fi
|
|
||||||
# }}}
|
|
||||||
# {{{ ~ plugins
|
|
||||||
# command line syntax highlight from https://github.com/zsh-users/zsh-syntax-highlighting
|
|
||||||
if [[ -r ${hl_script} ]]; then
|
|
||||||
source ${hl_script}
|
|
||||||
ZSH_HIGHLIGHT_HIGHLIGHTERS=(main brackets pattern)
|
|
||||||
ZSH_HIGHLIGHT_STYLES[path]='fg=black,bold'
|
|
||||||
ZSH_HIGHLIGHT_STYLES[path_prefix]='fg=black,bold'
|
|
||||||
fi
|
|
||||||
# }}}
|
|
||||||
fi # }}}
|
|
||||||
if is_bash; then # {{{
|
|
||||||
# {{{ ~ options
|
|
||||||
HISTSIZE=1000
|
|
||||||
HISTCONTROL=ignoredups:ignorespace
|
|
||||||
shopt -s histappend checkwinsize
|
|
||||||
[[ ${BASH_VERSINFO} -ge 4 ]] && shopt -s autocd
|
|
||||||
|
|
||||||
extras=( "${HOME}/.bashrc.extras" )
|
|
||||||
# }}}
|
|
||||||
# {{{ ~ prompt
|
|
||||||
colors=('black' 'red' 'green' 'yellow' 'blue' 'magenta' 'cyan' 'white')
|
|
||||||
for i in 0 1 2 3 4 5 6 7; do
|
|
||||||
eval "n${colors[$i]}='\[\e[0;3${i}m\]'"
|
|
||||||
eval "b${colors[$i]}='\[\e[1;3${i}m\]'"
|
|
||||||
done
|
|
||||||
reset='\[\e[0m\]'
|
|
||||||
bold='\[\e[1m\]'
|
|
||||||
lb="[ "
|
|
||||||
rb=" ]"
|
|
||||||
bb=":"
|
|
||||||
prompt_host="${HOSTNAME}"
|
|
||||||
prompt_bang=">${reset}"
|
|
||||||
precmd() {
|
|
||||||
if [[ -z ${hide_info} ]]; then
|
|
||||||
prompt_cwd="${bold}${PWD}${reset}"
|
|
||||||
if [[ ${UID} -eq 1000 || ${UID} -eq 1205 ]]; then
|
|
||||||
prompt_user=''
|
|
||||||
else
|
|
||||||
prompt_user="${nred}\u${reset} "
|
|
||||||
fi
|
|
||||||
prompt_info="${lb}${prompt_user}${prompt_host}${bb}${prompt_cwd} bash:${nyellow}\v${reset}${rb}"
|
|
||||||
else
|
|
||||||
prompt_info=''
|
|
||||||
fi
|
|
||||||
if [[ $UID -eq 0 ]]; then
|
|
||||||
prompt_bang_color="${nred}"
|
|
||||||
else
|
|
||||||
prompt_bang_color="${bold}"
|
|
||||||
fi
|
|
||||||
PS1="${prompt_info}${newline}${prompt_bang_color}${prompt_bang} "
|
|
||||||
}
|
|
||||||
PROMPT_COMMAND='precmd'
|
|
||||||
# }}}
|
|
||||||
# {{{ ~ key bindings
|
|
||||||
# time $command bind
|
|
||||||
bind '"\C-j":"\C-atime \C-m"'
|
|
||||||
# urxvt
|
|
||||||
bind '"\e[7~"':beginning-of-line # home
|
|
||||||
bind '"\e[8~"':end-of-line # end
|
|
||||||
# screen
|
|
||||||
bind '"\e[1~"':beginning-of-line # home
|
|
||||||
bind '"\e[4~"':end-of-line # end
|
|
||||||
# xterm
|
|
||||||
bind '"\e[H~"':beginning-of-line # home
|
|
||||||
bind '"\e[F~"':end-of-line # end
|
|
||||||
# all of them
|
|
||||||
bind '"\e[5~"':backward-word # page up
|
|
||||||
bind '"\e[6~"':forward-word # page down
|
|
||||||
# }}}
|
|
||||||
# {{{ ~ plugins
|
|
||||||
completion_path='/usr/share/bash-completion/bash_completion'
|
|
||||||
if [[ -n ${comp_enabled} && -r ${completion_path} ]]; then
|
|
||||||
source ${completion_path}
|
|
||||||
fi
|
|
||||||
unset completion_path
|
|
||||||
# }}}
|
|
||||||
# {{{ ~ traps
|
|
||||||
# we want to see exit code on error (it also has to be the last entry here)
|
|
||||||
trap 'printf "\e[0m>> exit \e[1;37m%s\e[0m\n" $?' ERR
|
|
||||||
# }}}
|
|
||||||
fi # }}}
|
|
||||||
# {{{ source extras
|
|
||||||
for i in ${extras[@]}; do
|
|
||||||
if [[ -r ${i} ]]; then
|
|
||||||
source ${i}
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
# }}}
|
|
111
defunct/sxhkdrc
111
defunct/sxhkdrc
|
@ -1,111 +0,0 @@
|
||||||
#
|
|
||||||
# bspwm hotkeys
|
|
||||||
#
|
|
||||||
|
|
||||||
super + alt + Escape
|
|
||||||
bspc quit
|
|
||||||
|
|
||||||
super + shift + c
|
|
||||||
bspc window -c
|
|
||||||
|
|
||||||
super + t
|
|
||||||
bspc desktop -l next
|
|
||||||
|
|
||||||
super + b
|
|
||||||
bspc desktop -B
|
|
||||||
|
|
||||||
super + {s,f}
|
|
||||||
bspc window -t {floating,fullscreen}
|
|
||||||
|
|
||||||
super + {o,Tab}
|
|
||||||
bspc {monitor,window} -f next
|
|
||||||
|
|
||||||
super + shift + {o,Tab}
|
|
||||||
bspc {monitor,window} -f prev
|
|
||||||
|
|
||||||
super + apostrophe
|
|
||||||
bspc window -s last
|
|
||||||
|
|
||||||
#super + {o,i}
|
|
||||||
# bspc control --record-history off; \
|
|
||||||
# bspc window {older,newer} -f; \
|
|
||||||
# bspc control --record-history on
|
|
||||||
|
|
||||||
super + y
|
|
||||||
bspc window -w last.manual
|
|
||||||
|
|
||||||
super + m
|
|
||||||
bspc window -s biggest
|
|
||||||
|
|
||||||
super + {_,shift + }{h,j,k,l}
|
|
||||||
bspc window -{f,s} {left,down,up,right}
|
|
||||||
|
|
||||||
super + {_,shift + }c
|
|
||||||
bspc window -f {next,prev}
|
|
||||||
|
|
||||||
super + {comma,period}
|
|
||||||
bspc desktop -C {backward,forward}
|
|
||||||
|
|
||||||
super + bracket{left,right}
|
|
||||||
bspc desktop -f {prev,next}
|
|
||||||
|
|
||||||
super + ctrl + {h,j,k,l}
|
|
||||||
bspc window -p {left,down,up,right}
|
|
||||||
|
|
||||||
super + ctrl + {_,shift + }space
|
|
||||||
bspc {window -p cancel,desktop -c}
|
|
||||||
|
|
||||||
super + alt + {j,l}
|
|
||||||
bspc window -e {down,right} +32
|
|
||||||
|
|
||||||
super + alt + {k,h}
|
|
||||||
bspc window -e {down,right} -32
|
|
||||||
|
|
||||||
#super + alt + {h,j,k,l}
|
|
||||||
# bspc window -e {left -10,down +10,up -10,right +10}
|
|
||||||
|
|
||||||
#super + alt + shift + {h,j,k,l}
|
|
||||||
# bspc window -e {right -10,up +10,down -10,left +10}
|
|
||||||
|
|
||||||
super + ctrl + {1-9}
|
|
||||||
bspc window -r 0.{1-9}
|
|
||||||
|
|
||||||
#super + {_,shift + }{1-9,0}
|
|
||||||
# bspc {desktop -f,window -d} ^{1-9,10}
|
|
||||||
|
|
||||||
super + {_,shift + }{1-3}
|
|
||||||
bspc {desktop -f,window -d} ^{1-3}
|
|
||||||
|
|
||||||
super + {_,shift + }{q,w,e}
|
|
||||||
bspc {desktop -f,window -d} ^{4,5,6}
|
|
||||||
|
|
||||||
~button1
|
|
||||||
bspc pointer -g focus
|
|
||||||
|
|
||||||
super + button{1-3}
|
|
||||||
bspc pointer -g {move,resize_side,resize_corner}
|
|
||||||
|
|
||||||
super + !button{1-3}
|
|
||||||
bspc pointer -t %i %i
|
|
||||||
|
|
||||||
super + @button{1-3}
|
|
||||||
bspc pointer -u
|
|
||||||
|
|
||||||
#
|
|
||||||
# wm independent hotkeys
|
|
||||||
#
|
|
||||||
super + z
|
|
||||||
i3lock -entc 661111 -i /home/von/.wallpaper.png
|
|
||||||
|
|
||||||
super + x
|
|
||||||
urxvt
|
|
||||||
|
|
||||||
super + r
|
|
||||||
gmrun
|
|
||||||
|
|
||||||
super + a
|
|
||||||
/home/von/.local/bin/ticket_watch
|
|
||||||
|
|
||||||
# make sxhkd reload its configuration files:
|
|
||||||
super + Escape
|
|
||||||
pkill -USR1 -x sxhkd
|
|
|
@ -1,4 +0,0 @@
|
||||||
" vim: set ft=vimperator:
|
|
||||||
|
|
||||||
set hintchars="qwertyuiop[]asdfghjkl;'zxcvbnm,./"
|
|
||||||
set toolbars=addons,nobookmarks,nomenu,nonavigation,tabs
|
|
462
st_config.h
462
st_config.h
|
@ -1,462 +0,0 @@
|
||||||
/* See LICENSE file for copyright and license details. */
|
|
||||||
|
|
||||||
/*
|
|
||||||
* appearance
|
|
||||||
*
|
|
||||||
* font: see http://freedesktop.org/software/fontconfig/fontconfig-user.html
|
|
||||||
*/
|
|
||||||
char font[] = "xos4 Terminus:bold:pixelsize=14";
|
|
||||||
int borderpx = 1;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* What program is execed by st depends of these precedence rules:
|
|
||||||
* 1: program passed with -e
|
|
||||||
* 2: utmp option
|
|
||||||
* 3: SHELL environment variable
|
|
||||||
* 4: value of shell in /etc/passwd
|
|
||||||
* 5: value of shell in config.h
|
|
||||||
*/
|
|
||||||
static char shell[] = "/bin/sh";
|
|
||||||
static char *utmp = NULL;
|
|
||||||
static char stty_args[] = "stty raw pass8 nl -echo -iexten -cstopb 38400";
|
|
||||||
|
|
||||||
/* identification sequence returned in DA and DECID */
|
|
||||||
static char vtiden[] = "\033[?6c";
|
|
||||||
|
|
||||||
/* Kerning / character bounding-box multipliers */
|
|
||||||
float cwscale = 1.0;
|
|
||||||
float chscale = 1.0;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* word delimiter string
|
|
||||||
*
|
|
||||||
* More advanced example: " `'\"()[]{}"
|
|
||||||
*/
|
|
||||||
static char worddelimiters[] = " ";
|
|
||||||
|
|
||||||
/* selection timeouts (in milliseconds) */
|
|
||||||
unsigned int doubleclicktimeout = 300;
|
|
||||||
unsigned int tripleclicktimeout = 600;
|
|
||||||
|
|
||||||
/* alt screens */
|
|
||||||
int allowaltscreen = 1;
|
|
||||||
|
|
||||||
/* frames per second st should at maximum draw to the screen */
|
|
||||||
unsigned int xfps = 120;
|
|
||||||
unsigned int actionfps = 30;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* blinking timeout (set to 0 to disable blinking) for the terminal blinking
|
|
||||||
* attribute.
|
|
||||||
*/
|
|
||||||
unsigned int blinktimeout = 800;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* thickness of underline and bar cursors
|
|
||||||
*/
|
|
||||||
unsigned int cursorthickness = 2;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* bell volume. It must be a value between -100 and 100. Use 0 for disabling
|
|
||||||
* it
|
|
||||||
*/
|
|
||||||
static int bellvolume = 0;
|
|
||||||
|
|
||||||
/* default TERM value */
|
|
||||||
char termname[] = "st-256color";
|
|
||||||
|
|
||||||
/*
|
|
||||||
* spaces per tab
|
|
||||||
*
|
|
||||||
* When you are changing this value, don't forget to adapt the »it« value in
|
|
||||||
* the st.info and appropriately install the st.info in the environment where
|
|
||||||
* you use this st version.
|
|
||||||
*
|
|
||||||
* it#$tabspaces,
|
|
||||||
*
|
|
||||||
* Secondly make sure your kernel is not expanding tabs. When running `stty
|
|
||||||
* -a` »tab0« should appear. You can tell the terminal to not expand tabs by
|
|
||||||
* running following command:
|
|
||||||
*
|
|
||||||
* stty tabs
|
|
||||||
*/
|
|
||||||
static unsigned int tabspaces = 8;
|
|
||||||
|
|
||||||
/* Terminal colors (16 first used in escape sequence) */
|
|
||||||
const char *colorname[] = {
|
|
||||||
/* 8 normal colors */
|
|
||||||
"#073642", /* 0: black */
|
|
||||||
"#dc322f", /* 1: red */
|
|
||||||
"#859900", /* 2: green */
|
|
||||||
"#b58900", /* 3: yellow */
|
|
||||||
"#268bd2", /* 4: blue */
|
|
||||||
"#d33682", /* 5: magenta */
|
|
||||||
"#2aa198", /* 6: cyan */
|
|
||||||
"#eee8d5", /* 7: white */
|
|
||||||
|
|
||||||
/* 8 bright colors */
|
|
||||||
"#002b36", /* 8: brblack */
|
|
||||||
"#cb4b16", /* 9: brred */
|
|
||||||
"#586e75", /* 10: brgreen */
|
|
||||||
"#657b83", /* 11: bryellow */
|
|
||||||
"#839496", /* 12: brblue */
|
|
||||||
"#6c71c4", /* 13: brmagenta*/
|
|
||||||
"#93a1a1", /* 14: brcyan */
|
|
||||||
"#fdf6e3", /* 15: brwhite */
|
|
||||||
|
|
||||||
[255] = 0,
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Default colors (colorname index)
|
|
||||||
* foreground, background, cursor, reverse cursor
|
|
||||||
*/
|
|
||||||
unsigned int defaultfg = 11;
|
|
||||||
unsigned int defaultbg = 15;
|
|
||||||
unsigned int defaultcs = 1;
|
|
||||||
unsigned int defaultrcs = 11;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Default shape of cursor
|
|
||||||
* 2: Block ("█")
|
|
||||||
* 4: Underline ("_")
|
|
||||||
* 6: Bar ("|")
|
|
||||||
* 7: Snowman ("☃")
|
|
||||||
*/
|
|
||||||
unsigned int cursorshape = 2;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Default columns and rows numbers
|
|
||||||
*/
|
|
||||||
|
|
||||||
unsigned int cols = 80;
|
|
||||||
unsigned int rows = 24;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Default colour and shape of the mouse cursor
|
|
||||||
*/
|
|
||||||
unsigned int mouseshape = XC_xterm;
|
|
||||||
unsigned int mousefg = 7;
|
|
||||||
unsigned int mousebg = 0;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Color used to display font attributes when fontconfig selected a font which
|
|
||||||
* doesn't match the ones requested.
|
|
||||||
*/
|
|
||||||
unsigned int defaultattr = 11;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Internal mouse shortcuts.
|
|
||||||
* Beware that overloading Button1 will disable the selection.
|
|
||||||
*/
|
|
||||||
MouseShortcut mshortcuts[] = {
|
|
||||||
/* button mask string */
|
|
||||||
{ Button4, XK_ANY_MOD, "\031" },
|
|
||||||
{ Button5, XK_ANY_MOD, "\005" },
|
|
||||||
};
|
|
||||||
|
|
||||||
/* Internal keyboard shortcuts. */
|
|
||||||
#define MODKEY Mod1Mask
|
|
||||||
#define TERMMOD (ControlMask|ShiftMask)
|
|
||||||
|
|
||||||
Shortcut shortcuts[] = {
|
|
||||||
/* mask keysym function argument */
|
|
||||||
{ XK_ANY_MOD, XK_Break, sendbreak, {.i = 0} },
|
|
||||||
{ ControlMask, XK_Print, toggleprinter, {.i = 0} },
|
|
||||||
{ ShiftMask, XK_Print, printscreen, {.i = 0} },
|
|
||||||
{ XK_ANY_MOD, XK_Print, printsel, {.i = 0} },
|
|
||||||
{ TERMMOD, XK_Prior, zoom, {.f = +1} },
|
|
||||||
{ TERMMOD, XK_Next, zoom, {.f = -1} },
|
|
||||||
{ TERMMOD, XK_Home, zoomreset, {.f = 0} },
|
|
||||||
{ TERMMOD, XK_C, clipcopy, {.i = 0} },
|
|
||||||
{ TERMMOD, XK_V, clippaste, {.i = 0} },
|
|
||||||
{ TERMMOD, XK_Y, selpaste, {.i = 0} },
|
|
||||||
{ TERMMOD, XK_Num_Lock, numlock, {.i = 0} },
|
|
||||||
{ TERMMOD, XK_I, iso14755, {.i = 0} },
|
|
||||||
};
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Special keys (change & recompile st.info accordingly)
|
|
||||||
*
|
|
||||||
* Mask value:
|
|
||||||
* * Use XK_ANY_MOD to match the key no matter modifiers state
|
|
||||||
* * Use XK_NO_MOD to match the key alone (no modifiers)
|
|
||||||
* appkey value:
|
|
||||||
* * 0: no value
|
|
||||||
* * > 0: keypad application mode enabled
|
|
||||||
* * = 2: term.numlock = 1
|
|
||||||
* * < 0: keypad application mode disabled
|
|
||||||
* appcursor value:
|
|
||||||
* * 0: no value
|
|
||||||
* * > 0: cursor application mode enabled
|
|
||||||
* * < 0: cursor application mode disabled
|
|
||||||
* crlf value
|
|
||||||
* * 0: no value
|
|
||||||
* * > 0: crlf mode is enabled
|
|
||||||
* * < 0: crlf mode is disabled
|
|
||||||
*
|
|
||||||
* Be careful with the order of the definitions because st searches in
|
|
||||||
* this table sequentially, so any XK_ANY_MOD must be in the last
|
|
||||||
* position for a key.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
* If you want keys other than the X11 function keys (0xFD00 - 0xFFFF)
|
|
||||||
* to be mapped below, add them to this array.
|
|
||||||
*/
|
|
||||||
static KeySym mappedkeys[] = { -1 };
|
|
||||||
|
|
||||||
/*
|
|
||||||
* State bits to ignore when matching key or button events. By default,
|
|
||||||
* numlock (Mod2Mask) and keyboard layout (XK_SWITCH_MOD) are ignored.
|
|
||||||
*/
|
|
||||||
static uint ignoremod = Mod2Mask|XK_SWITCH_MOD;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Override mouse-select while mask is active (when MODE_MOUSE is set).
|
|
||||||
* Note that if you want to use ShiftMask with selmasks, set this to an other
|
|
||||||
* modifier, set to 0 to not use it.
|
|
||||||
*/
|
|
||||||
uint forceselmod = ShiftMask;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* This is the huge key array which defines all compatibility to the Linux
|
|
||||||
* world. Please decide about changes wisely.
|
|
||||||
*/
|
|
||||||
static Key key[] = {
|
|
||||||
/* keysym mask string appkey appcursor crlf */
|
|
||||||
{ XK_KP_Home, ShiftMask, "\033[2J", 0, -1, 0},
|
|
||||||
{ XK_KP_Home, ShiftMask, "\033[1;2H", 0, +1, 0},
|
|
||||||
{ XK_KP_Home, XK_ANY_MOD, "\033[H", 0, -1, 0},
|
|
||||||
{ XK_KP_Home, XK_ANY_MOD, "\033[1~", 0, +1, 0},
|
|
||||||
{ XK_KP_Up, XK_ANY_MOD, "\033Ox", +1, 0, 0},
|
|
||||||
{ XK_KP_Up, XK_ANY_MOD, "\033[A", 0, -1, 0},
|
|
||||||
{ XK_KP_Up, XK_ANY_MOD, "\033OA", 0, +1, 0},
|
|
||||||
{ XK_KP_Down, XK_ANY_MOD, "\033Or", +1, 0, 0},
|
|
||||||
{ XK_KP_Down, XK_ANY_MOD, "\033[B", 0, -1, 0},
|
|
||||||
{ XK_KP_Down, XK_ANY_MOD, "\033OB", 0, +1, 0},
|
|
||||||
{ XK_KP_Left, XK_ANY_MOD, "\033Ot", +1, 0, 0},
|
|
||||||
{ XK_KP_Left, XK_ANY_MOD, "\033[D", 0, -1, 0},
|
|
||||||
{ XK_KP_Left, XK_ANY_MOD, "\033OD", 0, +1, 0},
|
|
||||||
{ XK_KP_Right, XK_ANY_MOD, "\033Ov", +1, 0, 0},
|
|
||||||
{ XK_KP_Right, XK_ANY_MOD, "\033[C", 0, -1, 0},
|
|
||||||
{ XK_KP_Right, XK_ANY_MOD, "\033OC", 0, +1, 0},
|
|
||||||
{ XK_KP_Prior, ShiftMask, "\033[5;2~", 0, 0, 0},
|
|
||||||
{ XK_KP_Prior, XK_ANY_MOD, "\033[5~", 0, 0, 0},
|
|
||||||
{ XK_KP_Begin, XK_ANY_MOD, "\033[E", 0, 0, 0},
|
|
||||||
{ XK_KP_End, ControlMask, "\033[J", -1, 0, 0},
|
|
||||||
{ XK_KP_End, ControlMask, "\033[1;5F", +1, 0, 0},
|
|
||||||
{ XK_KP_End, ShiftMask, "\033[K", -1, 0, 0},
|
|
||||||
{ XK_KP_End, ShiftMask, "\033[1;2F", +1, 0, 0},
|
|
||||||
{ XK_KP_End, XK_ANY_MOD, "\033[4~", 0, 0, 0},
|
|
||||||
{ XK_KP_Next, ShiftMask, "\033[6;2~", 0, 0, 0},
|
|
||||||
{ XK_KP_Next, XK_ANY_MOD, "\033[6~", 0, 0, 0},
|
|
||||||
{ XK_KP_Insert, ShiftMask, "\033[2;2~", +1, 0, 0},
|
|
||||||
{ XK_KP_Insert, ShiftMask, "\033[4l", -1, 0, 0},
|
|
||||||
{ XK_KP_Insert, ControlMask, "\033[L", -1, 0, 0},
|
|
||||||
{ XK_KP_Insert, ControlMask, "\033[2;5~", +1, 0, 0},
|
|
||||||
{ XK_KP_Insert, XK_ANY_MOD, "\033[4h", -1, 0, 0},
|
|
||||||
{ XK_KP_Insert, XK_ANY_MOD, "\033[2~", +1, 0, 0},
|
|
||||||
{ XK_KP_Delete, ControlMask, "\033[M", -1, 0, 0},
|
|
||||||
{ XK_KP_Delete, ControlMask, "\033[3;5~", +1, 0, 0},
|
|
||||||
{ XK_KP_Delete, ShiftMask, "\033[2K", -1, 0, 0},
|
|
||||||
{ XK_KP_Delete, ShiftMask, "\033[3;2~", +1, 0, 0},
|
|
||||||
{ XK_KP_Delete, XK_ANY_MOD, "\033[P", -1, 0, 0},
|
|
||||||
{ XK_KP_Delete, XK_ANY_MOD, "\033[3~", +1, 0, 0},
|
|
||||||
{ XK_KP_Multiply, XK_ANY_MOD, "\033Oj", +2, 0, 0},
|
|
||||||
{ XK_KP_Add, XK_ANY_MOD, "\033Ok", +2, 0, 0},
|
|
||||||
{ XK_KP_Enter, XK_ANY_MOD, "\033OM", +2, 0, 0},
|
|
||||||
{ XK_KP_Enter, XK_ANY_MOD, "\r", -1, 0, -1},
|
|
||||||
{ XK_KP_Enter, XK_ANY_MOD, "\r\n", -1, 0, +1},
|
|
||||||
{ XK_KP_Subtract, XK_ANY_MOD, "\033Om", +2, 0, 0},
|
|
||||||
{ XK_KP_Decimal, XK_ANY_MOD, "\033On", +2, 0, 0},
|
|
||||||
{ XK_KP_Divide, XK_ANY_MOD, "\033Oo", +2, 0, 0},
|
|
||||||
{ XK_KP_0, XK_ANY_MOD, "\033Op", +2, 0, 0},
|
|
||||||
{ XK_KP_1, XK_ANY_MOD, "\033Oq", +2, 0, 0},
|
|
||||||
{ XK_KP_2, XK_ANY_MOD, "\033Or", +2, 0, 0},
|
|
||||||
{ XK_KP_3, XK_ANY_MOD, "\033Os", +2, 0, 0},
|
|
||||||
{ XK_KP_4, XK_ANY_MOD, "\033Ot", +2, 0, 0},
|
|
||||||
{ XK_KP_5, XK_ANY_MOD, "\033Ou", +2, 0, 0},
|
|
||||||
{ XK_KP_6, XK_ANY_MOD, "\033Ov", +2, 0, 0},
|
|
||||||
{ XK_KP_7, XK_ANY_MOD, "\033Ow", +2, 0, 0},
|
|
||||||
{ XK_KP_8, XK_ANY_MOD, "\033Ox", +2, 0, 0},
|
|
||||||
{ XK_KP_9, XK_ANY_MOD, "\033Oy", +2, 0, 0},
|
|
||||||
{ XK_Up, ShiftMask, "\033[1;2A", 0, 0, 0},
|
|
||||||
{ XK_Up, Mod1Mask, "\033[1;3A", 0, 0, 0},
|
|
||||||
{ XK_Up, ShiftMask|Mod1Mask,"\033[1;4A", 0, 0, 0},
|
|
||||||
{ XK_Up, ControlMask, "\033[1;5A", 0, 0, 0},
|
|
||||||
{ XK_Up, ShiftMask|ControlMask,"\033[1;6A", 0, 0, 0},
|
|
||||||
{ XK_Up, ControlMask|Mod1Mask,"\033[1;7A", 0, 0, 0},
|
|
||||||
{ XK_Up,ShiftMask|ControlMask|Mod1Mask,"\033[1;8A", 0, 0, 0},
|
|
||||||
{ XK_Up, XK_ANY_MOD, "\033[A", 0, -1, 0},
|
|
||||||
{ XK_Up, XK_ANY_MOD, "\033OA", 0, +1, 0},
|
|
||||||
{ XK_Down, ShiftMask, "\033[1;2B", 0, 0, 0},
|
|
||||||
{ XK_Down, Mod1Mask, "\033[1;3B", 0, 0, 0},
|
|
||||||
{ XK_Down, ShiftMask|Mod1Mask,"\033[1;4B", 0, 0, 0},
|
|
||||||
{ XK_Down, ControlMask, "\033[1;5B", 0, 0, 0},
|
|
||||||
{ XK_Down, ShiftMask|ControlMask,"\033[1;6B", 0, 0, 0},
|
|
||||||
{ XK_Down, ControlMask|Mod1Mask,"\033[1;7B", 0, 0, 0},
|
|
||||||
{ XK_Down,ShiftMask|ControlMask|Mod1Mask,"\033[1;8B",0, 0, 0},
|
|
||||||
{ XK_Down, XK_ANY_MOD, "\033[B", 0, -1, 0},
|
|
||||||
{ XK_Down, XK_ANY_MOD, "\033OB", 0, +1, 0},
|
|
||||||
{ XK_Left, ShiftMask, "\033[1;2D", 0, 0, 0},
|
|
||||||
{ XK_Left, Mod1Mask, "\033[1;3D", 0, 0, 0},
|
|
||||||
{ XK_Left, ShiftMask|Mod1Mask,"\033[1;4D", 0, 0, 0},
|
|
||||||
{ XK_Left, ControlMask, "\033[1;5D", 0, 0, 0},
|
|
||||||
{ XK_Left, ShiftMask|ControlMask,"\033[1;6D", 0, 0, 0},
|
|
||||||
{ XK_Left, ControlMask|Mod1Mask,"\033[1;7D", 0, 0, 0},
|
|
||||||
{ XK_Left,ShiftMask|ControlMask|Mod1Mask,"\033[1;8D",0, 0, 0},
|
|
||||||
{ XK_Left, XK_ANY_MOD, "\033[D", 0, -1, 0},
|
|
||||||
{ XK_Left, XK_ANY_MOD, "\033OD", 0, +1, 0},
|
|
||||||
{ XK_Right, ShiftMask, "\033[1;2C", 0, 0, 0},
|
|
||||||
{ XK_Right, Mod1Mask, "\033[1;3C", 0, 0, 0},
|
|
||||||
{ XK_Right, ShiftMask|Mod1Mask,"\033[1;4C", 0, 0, 0},
|
|
||||||
{ XK_Right, ControlMask, "\033[1;5C", 0, 0, 0},
|
|
||||||
{ XK_Right, ShiftMask|ControlMask,"\033[1;6C", 0, 0, 0},
|
|
||||||
{ XK_Right, ControlMask|Mod1Mask,"\033[1;7C", 0, 0, 0},
|
|
||||||
{ XK_Right,ShiftMask|ControlMask|Mod1Mask,"\033[1;8C",0, 0, 0},
|
|
||||||
{ XK_Right, XK_ANY_MOD, "\033[C", 0, -1, 0},
|
|
||||||
{ XK_Right, XK_ANY_MOD, "\033OC", 0, +1, 0},
|
|
||||||
{ XK_ISO_Left_Tab, ShiftMask, "\033[Z", 0, 0, 0},
|
|
||||||
{ XK_Return, Mod1Mask, "\033\r", 0, 0, -1},
|
|
||||||
{ XK_Return, Mod1Mask, "\033\r\n", 0, 0, +1},
|
|
||||||
{ XK_Return, XK_ANY_MOD, "\r", 0, 0, -1},
|
|
||||||
{ XK_Return, XK_ANY_MOD, "\r\n", 0, 0, +1},
|
|
||||||
{ XK_Insert, ShiftMask, "\033[4l", -1, 0, 0},
|
|
||||||
{ XK_Insert, ShiftMask, "\033[2;2~", +1, 0, 0},
|
|
||||||
{ XK_Insert, ControlMask, "\033[L", -1, 0, 0},
|
|
||||||
{ XK_Insert, ControlMask, "\033[2;5~", +1, 0, 0},
|
|
||||||
{ XK_Insert, XK_ANY_MOD, "\033[4h", -1, 0, 0},
|
|
||||||
{ XK_Insert, XK_ANY_MOD, "\033[2~", +1, 0, 0},
|
|
||||||
{ XK_Delete, ControlMask, "\033[M", -1, 0, 0},
|
|
||||||
{ XK_Delete, ControlMask, "\033[3;5~", +1, 0, 0},
|
|
||||||
{ XK_Delete, ShiftMask, "\033[2K", -1, 0, 0},
|
|
||||||
{ XK_Delete, ShiftMask, "\033[3;2~", +1, 0, 0},
|
|
||||||
{ XK_Delete, XK_ANY_MOD, "\033[P", -1, 0, 0},
|
|
||||||
{ XK_Delete, XK_ANY_MOD, "\033[3~", +1, 0, 0},
|
|
||||||
{ XK_BackSpace, XK_NO_MOD, "\177", 0, 0, 0},
|
|
||||||
{ XK_BackSpace, Mod1Mask, "\033\177", 0, 0, 0},
|
|
||||||
{ XK_Home, ShiftMask, "\033[2J", 0, -1, 0},
|
|
||||||
{ XK_Home, ShiftMask, "\033[1;2H", 0, +1, 0},
|
|
||||||
{ XK_Home, XK_ANY_MOD, "\033[H", 0, -1, 0},
|
|
||||||
{ XK_Home, XK_ANY_MOD, "\033[1~", 0, +1, 0},
|
|
||||||
{ XK_End, ControlMask, "\033[J", -1, 0, 0},
|
|
||||||
{ XK_End, ControlMask, "\033[1;5F", +1, 0, 0},
|
|
||||||
{ XK_End, ShiftMask, "\033[K", -1, 0, 0},
|
|
||||||
{ XK_End, ShiftMask, "\033[1;2F", +1, 0, 0},
|
|
||||||
{ XK_End, XK_ANY_MOD, "\033[4~", 0, 0, 0},
|
|
||||||
{ XK_Prior, ControlMask, "\033[5;5~", 0, 0, 0},
|
|
||||||
{ XK_Prior, ShiftMask, "\033[5;2~", 0, 0, 0},
|
|
||||||
{ XK_Prior, XK_ANY_MOD, "\033[5~", 0, 0, 0},
|
|
||||||
{ XK_Next, ControlMask, "\033[6;5~", 0, 0, 0},
|
|
||||||
{ XK_Next, ShiftMask, "\033[6;2~", 0, 0, 0},
|
|
||||||
{ XK_Next, XK_ANY_MOD, "\033[6~", 0, 0, 0},
|
|
||||||
{ XK_F1, XK_NO_MOD, "\033OP" , 0, 0, 0},
|
|
||||||
{ XK_F1, /* F13 */ ShiftMask, "\033[1;2P", 0, 0, 0},
|
|
||||||
{ XK_F1, /* F25 */ ControlMask, "\033[1;5P", 0, 0, 0},
|
|
||||||
{ XK_F1, /* F37 */ Mod4Mask, "\033[1;6P", 0, 0, 0},
|
|
||||||
{ XK_F1, /* F49 */ Mod1Mask, "\033[1;3P", 0, 0, 0},
|
|
||||||
{ XK_F1, /* F61 */ Mod3Mask, "\033[1;4P", 0, 0, 0},
|
|
||||||
{ XK_F2, XK_NO_MOD, "\033OQ" , 0, 0, 0},
|
|
||||||
{ XK_F2, /* F14 */ ShiftMask, "\033[1;2Q", 0, 0, 0},
|
|
||||||
{ XK_F2, /* F26 */ ControlMask, "\033[1;5Q", 0, 0, 0},
|
|
||||||
{ XK_F2, /* F38 */ Mod4Mask, "\033[1;6Q", 0, 0, 0},
|
|
||||||
{ XK_F2, /* F50 */ Mod1Mask, "\033[1;3Q", 0, 0, 0},
|
|
||||||
{ XK_F2, /* F62 */ Mod3Mask, "\033[1;4Q", 0, 0, 0},
|
|
||||||
{ XK_F3, XK_NO_MOD, "\033OR" , 0, 0, 0},
|
|
||||||
{ XK_F3, /* F15 */ ShiftMask, "\033[1;2R", 0, 0, 0},
|
|
||||||
{ XK_F3, /* F27 */ ControlMask, "\033[1;5R", 0, 0, 0},
|
|
||||||
{ XK_F3, /* F39 */ Mod4Mask, "\033[1;6R", 0, 0, 0},
|
|
||||||
{ XK_F3, /* F51 */ Mod1Mask, "\033[1;3R", 0, 0, 0},
|
|
||||||
{ XK_F3, /* F63 */ Mod3Mask, "\033[1;4R", 0, 0, 0},
|
|
||||||
{ XK_F4, XK_NO_MOD, "\033OS" , 0, 0, 0},
|
|
||||||
{ XK_F4, /* F16 */ ShiftMask, "\033[1;2S", 0, 0, 0},
|
|
||||||
{ XK_F4, /* F28 */ ControlMask, "\033[1;5S", 0, 0, 0},
|
|
||||||
{ XK_F4, /* F40 */ Mod4Mask, "\033[1;6S", 0, 0, 0},
|
|
||||||
{ XK_F4, /* F52 */ Mod1Mask, "\033[1;3S", 0, 0, 0},
|
|
||||||
{ XK_F5, XK_NO_MOD, "\033[15~", 0, 0, 0},
|
|
||||||
{ XK_F5, /* F17 */ ShiftMask, "\033[15;2~", 0, 0, 0},
|
|
||||||
{ XK_F5, /* F29 */ ControlMask, "\033[15;5~", 0, 0, 0},
|
|
||||||
{ XK_F5, /* F41 */ Mod4Mask, "\033[15;6~", 0, 0, 0},
|
|
||||||
{ XK_F5, /* F53 */ Mod1Mask, "\033[15;3~", 0, 0, 0},
|
|
||||||
{ XK_F6, XK_NO_MOD, "\033[17~", 0, 0, 0},
|
|
||||||
{ XK_F6, /* F18 */ ShiftMask, "\033[17;2~", 0, 0, 0},
|
|
||||||
{ XK_F6, /* F30 */ ControlMask, "\033[17;5~", 0, 0, 0},
|
|
||||||
{ XK_F6, /* F42 */ Mod4Mask, "\033[17;6~", 0, 0, 0},
|
|
||||||
{ XK_F6, /* F54 */ Mod1Mask, "\033[17;3~", 0, 0, 0},
|
|
||||||
{ XK_F7, XK_NO_MOD, "\033[18~", 0, 0, 0},
|
|
||||||
{ XK_F7, /* F19 */ ShiftMask, "\033[18;2~", 0, 0, 0},
|
|
||||||
{ XK_F7, /* F31 */ ControlMask, "\033[18;5~", 0, 0, 0},
|
|
||||||
{ XK_F7, /* F43 */ Mod4Mask, "\033[18;6~", 0, 0, 0},
|
|
||||||
{ XK_F7, /* F55 */ Mod1Mask, "\033[18;3~", 0, 0, 0},
|
|
||||||
{ XK_F8, XK_NO_MOD, "\033[19~", 0, 0, 0},
|
|
||||||
{ XK_F8, /* F20 */ ShiftMask, "\033[19;2~", 0, 0, 0},
|
|
||||||
{ XK_F8, /* F32 */ ControlMask, "\033[19;5~", 0, 0, 0},
|
|
||||||
{ XK_F8, /* F44 */ Mod4Mask, "\033[19;6~", 0, 0, 0},
|
|
||||||
{ XK_F8, /* F56 */ Mod1Mask, "\033[19;3~", 0, 0, 0},
|
|
||||||
{ XK_F9, XK_NO_MOD, "\033[20~", 0, 0, 0},
|
|
||||||
{ XK_F9, /* F21 */ ShiftMask, "\033[20;2~", 0, 0, 0},
|
|
||||||
{ XK_F9, /* F33 */ ControlMask, "\033[20;5~", 0, 0, 0},
|
|
||||||
{ XK_F9, /* F45 */ Mod4Mask, "\033[20;6~", 0, 0, 0},
|
|
||||||
{ XK_F9, /* F57 */ Mod1Mask, "\033[20;3~", 0, 0, 0},
|
|
||||||
{ XK_F10, XK_NO_MOD, "\033[21~", 0, 0, 0},
|
|
||||||
{ XK_F10, /* F22 */ ShiftMask, "\033[21;2~", 0, 0, 0},
|
|
||||||
{ XK_F10, /* F34 */ ControlMask, "\033[21;5~", 0, 0, 0},
|
|
||||||
{ XK_F10, /* F46 */ Mod4Mask, "\033[21;6~", 0, 0, 0},
|
|
||||||
{ XK_F10, /* F58 */ Mod1Mask, "\033[21;3~", 0, 0, 0},
|
|
||||||
{ XK_F11, XK_NO_MOD, "\033[23~", 0, 0, 0},
|
|
||||||
{ XK_F11, /* F23 */ ShiftMask, "\033[23;2~", 0, 0, 0},
|
|
||||||
{ XK_F11, /* F35 */ ControlMask, "\033[23;5~", 0, 0, 0},
|
|
||||||
{ XK_F11, /* F47 */ Mod4Mask, "\033[23;6~", 0, 0, 0},
|
|
||||||
{ XK_F11, /* F59 */ Mod1Mask, "\033[23;3~", 0, 0, 0},
|
|
||||||
{ XK_F12, XK_NO_MOD, "\033[24~", 0, 0, 0},
|
|
||||||
{ XK_F12, /* F24 */ ShiftMask, "\033[24;2~", 0, 0, 0},
|
|
||||||
{ XK_F12, /* F36 */ ControlMask, "\033[24;5~", 0, 0, 0},
|
|
||||||
{ XK_F12, /* F48 */ Mod4Mask, "\033[24;6~", 0, 0, 0},
|
|
||||||
{ XK_F12, /* F60 */ Mod1Mask, "\033[24;3~", 0, 0, 0},
|
|
||||||
{ XK_F13, XK_NO_MOD, "\033[1;2P", 0, 0, 0},
|
|
||||||
{ XK_F14, XK_NO_MOD, "\033[1;2Q", 0, 0, 0},
|
|
||||||
{ XK_F15, XK_NO_MOD, "\033[1;2R", 0, 0, 0},
|
|
||||||
{ XK_F16, XK_NO_MOD, "\033[1;2S", 0, 0, 0},
|
|
||||||
{ XK_F17, XK_NO_MOD, "\033[15;2~", 0, 0, 0},
|
|
||||||
{ XK_F18, XK_NO_MOD, "\033[17;2~", 0, 0, 0},
|
|
||||||
{ XK_F19, XK_NO_MOD, "\033[18;2~", 0, 0, 0},
|
|
||||||
{ XK_F20, XK_NO_MOD, "\033[19;2~", 0, 0, 0},
|
|
||||||
{ XK_F21, XK_NO_MOD, "\033[20;2~", 0, 0, 0},
|
|
||||||
{ XK_F22, XK_NO_MOD, "\033[21;2~", 0, 0, 0},
|
|
||||||
{ XK_F23, XK_NO_MOD, "\033[23;2~", 0, 0, 0},
|
|
||||||
{ XK_F24, XK_NO_MOD, "\033[24;2~", 0, 0, 0},
|
|
||||||
{ XK_F25, XK_NO_MOD, "\033[1;5P", 0, 0, 0},
|
|
||||||
{ XK_F26, XK_NO_MOD, "\033[1;5Q", 0, 0, 0},
|
|
||||||
{ XK_F27, XK_NO_MOD, "\033[1;5R", 0, 0, 0},
|
|
||||||
{ XK_F28, XK_NO_MOD, "\033[1;5S", 0, 0, 0},
|
|
||||||
{ XK_F29, XK_NO_MOD, "\033[15;5~", 0, 0, 0},
|
|
||||||
{ XK_F30, XK_NO_MOD, "\033[17;5~", 0, 0, 0},
|
|
||||||
{ XK_F31, XK_NO_MOD, "\033[18;5~", 0, 0, 0},
|
|
||||||
{ XK_F32, XK_NO_MOD, "\033[19;5~", 0, 0, 0},
|
|
||||||
{ XK_F33, XK_NO_MOD, "\033[20;5~", 0, 0, 0},
|
|
||||||
{ XK_F34, XK_NO_MOD, "\033[21;5~", 0, 0, 0},
|
|
||||||
{ XK_F35, XK_NO_MOD, "\033[23;5~", 0, 0, 0},
|
|
||||||
};
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Selection types' masks.
|
|
||||||
* Use the same masks as usual.
|
|
||||||
* Button1Mask is always unset, to make masks match between ButtonPress.
|
|
||||||
* ButtonRelease and MotionNotify.
|
|
||||||
* If no match is found, regular selection is used.
|
|
||||||
*/
|
|
||||||
uint selmasks[] = {
|
|
||||||
[SEL_RECTANGULAR] = Mod1Mask,
|
|
||||||
};
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Printable characters in ASCII, used to estimate the advance width
|
|
||||||
* of single wide characters.
|
|
||||||
*/
|
|
||||||
char ascii_printable[] =
|
|
||||||
" !\"#$%&'()*+,-./0123456789:;<=>?"
|
|
||||||
"@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_"
|
|
||||||
"`abcdefghijklmnopqrstuvwxyz{|}~";
|
|
||||||
|
|
|
@ -1,11 +0,0 @@
|
||||||
--- a/x.c 2017-05-26 19:18:55.524852792 +0300
|
|
||||||
+++ b/x.c 2017-05-26 19:19:07.114958908 +0300
|
|
||||||
@@ -1158,7 +1158,7 @@
|
|
||||||
|
|
||||||
/* Change basic system colors [0-7] to bright system colors [8-15] */
|
|
||||||
if ((base.mode & ATTR_BOLD_FAINT) == ATTR_BOLD && BETWEEN(base.fg, 0, 7))
|
|
||||||
- fg = &dc.col[base.fg + 8];
|
|
||||||
+ fg = &dc.col[base.fg];
|
|
||||||
|
|
||||||
if (IS_SET(MODE_REVERSE)) {
|
|
||||||
if (fg == &dc.col[defaultfg]) {
|
|
9
xxkbrc
9
xxkbrc
|
@ -1,9 +0,0 @@
|
||||||
XXkb.image.path: /usr/share/xxkb
|
|
||||||
XXkb.mainwindow.image.1: en15.xpm
|
|
||||||
XXkb.mainwindow.image.2: ru15.xpm
|
|
||||||
XXkb.mainwindow.image.3: by15.xpm
|
|
||||||
XXkb.mainwindow.image.4: by15.xpm
|
|
||||||
XXkb.mainwindow.enable: yes
|
|
||||||
XXkb.mainwindow.type: tray
|
|
||||||
XXkb.mainwindow.geometry: 16x16+0+0
|
|
||||||
XXkb.mainwindow.label.enable: false
|
|
Loading…
Reference in a new issue