/[scripts]/trunk/awesome-client.pl
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Contents of /trunk/awesome-client.pl

Parent Directory Parent Directory | Revision Log Revision Log


Revision 72 - (show annotations)
Mon Mar 24 13:16:57 2008 UTC (16 years ago) by dpavlin
File MIME type: text/plain
File size: 498 byte(s)
fix client to work with recent awesome

1 #!/usr/bin/perl
2 use warnings;
3 use strict;
4
5 use IO::Socket;
6
7 my $d = $ENV{DISPLAY};
8 $d =~ s/^:(\d+).*$/$1/;
9 my $path = "$ENV{HOME}/.awesome_ctl.$d";
10
11 die "$path doesn't exist!\n" unless -e $path;
12
13 warn "# using sock $path\n";
14
15 my $msg = '0 widget_tell dwm-status text foobar';
16
17 my $sock = IO::Socket::UNIX->new(
18 Type => SOCK_DGRAM,
19 Peer => $path,
20 ) or die "Socket: $!";
21
22 my $peer = sockaddr_un($path);
23
24 $msg .= "\n" . 0x00;
25
26 send($sock, $msg,0,$peer) or die "Couldn't send(): $!";
27
28 close($sock);

Properties

Name Value
svn:executable *

  ViewVC Help
Powered by ViewVC 1.1.26