This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This is how to trim some fat to make Linux slim: | |
1) Use Debian, Slackware or Arch as the Base distribution | |
2) Use LXDE, IceWM or JWM | |
3) Clear the boot services, 90% of them are not needed | |
4) Use kernel framebuffer and xfbdev instead of Xorg* | |
5) Swtich the shell from Bash to Dash | |
6) Use busybox to boot the system instead of coreutils | |
7) Trim the kernel to < 1.5mb | |
8) Remove the splash screen | |
9) Use RAMdisks |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local setmetatable = setmetatable | |
local print , pairs = print , pairs | |
local ipairs , type = ipairs , type | |
local string = string | |
local debug = debug | |
local awful = require("awful") | |
local capi = {client = client , tag = tag , | |
screen = screen , mouse = mouse } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local setmetatable = setmetatable | |
local print = print | |
local math = math | |
local beautiful = require( "beautiful" ) | |
local wibox = require( "wibox" ) | |
local cairo = require( "lgi" ).cairo | |
local capi = { screen = screen , | |
mouse = mouse } | |
module("widgets.tooltip2") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local ic = cairo.Surface(c.icon) | |
local icp = cairo.Pattern.create_for_surface(ic) | |
local sw,sh = ic:get_width(),ic:get_height() | |
-- Create matrix | |
local ratio = (theme.default_height-4) / ((sw > sh) and sw or sh) | |
local matrix = cairo.Matrix() | |
cairo.Matrix.init_scale(matrix,ratio,ratio) | |
matrix:translate(theme.default_height/2 - 6,-2) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local lgi = require 'lgi' | |
local Gio = lgi.require 'Gio' | |
local core = require 'lgi.core' | |
local introspection_data = Gio.DBusNodeInfo.new_for_xml([=[<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object | |
Introspection 1.0//EN" | |
"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd"> | |
<node> | |
<interface name="org.freedesktop.DBus.Introspectable"> | |
<method name="Introspect"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local capi = { client = client, mouse = mouse , | |
screen = screen, keygrabber = keygrabber} | |
local ipairs,print = ipairs,print | |
local wibox,color = require( "wibox" ) , require( "gears.color" ) | |
local cairo,beautiful = require( "lgi").cairo , require( "beautiful" ) | |
local awful = require("awful") | |
local module,indicators,cur_c = {},nil,nil | |
local values = {"top" , "top_right" , "right" , "bottom_right" , | |
"bottom" , "bottom_left", "left" , "top_left" } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/lib/awful/util.lua.in b/lib/awful/util.lua.in | |
index ff94e0e..d5f589e 100644 | |
--- a/lib/awful/util.lua.in | |
+++ b/lib/awful/util.lua.in | |
@@ -73,7 +73,8 @@ end | |
-- @param cmd The command. | |
-- @param sn Enable startup-notification. | |
-- @param screen The screen where to spawn window. | |
--- @return The awesome.spawn return value. | |
+-- @return The forked PID. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/lib/wibox/layout/align.lua.in b/lib/wibox/layout/align.lua.in | |
index 1631c68..8465560 100644 | |
--- a/lib/wibox/layout/align.lua.in | |
+++ b/lib/wibox/layout/align.lua.in | |
@@ -28,10 +28,10 @@ function align:draw(wibox, cr, width, height) | |
if self.first then | |
local w, h, _ = width, height, nil | |
if self.dir == "y" then | |
- _, h = self.first:fit(w, h) | |
+ _, h = base.fit_widget(self.first, w, h) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local lgi = require 'lgi' | |
local Gio = lgi.require 'Gio' | |
local core = require 'lgi.core' | |
local GLib = lgi.GLib | |
local introspection_data = Gio.DBusNodeInfo.new_for_xml([=[<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object | |
Introspection 1.0//EN" | |
"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd"> | |
<node> | |
<interface name="org.freedesktop.DBus.Introspectable"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function module.download_text_async(url) | |
local req = create_request() | |
print("starting",url) | |
gio.File.new_for_uri(url):load_contents_async(nil,function(file,task,c) | |
local content = file:load_contents_finish(task) | |
print("called",content) | |
if content then | |
req:emit_signal("request::completed",tostring(content)) | |
end | |
end) |