Get VLC to do fullscreen float in Xmonad

Hi,
Short background: I have started to use XBMC for watching and organizing videos. Everything works great except playing the videos. I have a constant stutter about every 3-4 seconds and from time to time the picture freeze but the movie running in the background with sound OK, moving the mouse take away the freeze.
I do not have thous problems with VLC. I have configured XBMC to use VLC to play videos.
I have two monitors, one for movies. Using a Nvidia-card in TwinView.
My problem is that when I start a movie VLC starts and XMONAD tiling it as it should. But of cause I do not want VLC and XBMC side by side on the monitor. I would like VLC fullscreen on top of XBMC.
I have tried to solve it by using  XMonad.Hooks.ManageHelpers but no luck.
My xmonad.hs looks like this.
-- xmonad example config file.
-- A template showing all available configuration hooks,
-- and how to override the defaults in your own xmonad.hs conf file.
-- Normally, you'd only override those defaults you care about.
import XMonad
import Data.Monoid
import System.Exit
import XMonad.Hooks.ManageDocks
import XMonad.Util.Run(spawnPipe)
import XMonad.Hooks.DynamicLog
import System.IO
import XMonad.Hooks.ManageHelpers
import qualified XMonad.StackSet as W
import qualified Data.Map as M
main = do
xmproc <- spawnPipe "/usr/bin/xmobar /home/christer/.xmonad/xmobarrc"
xmonad defaults
-- { manageHook = manageDocks <+> manageHook defaultConfig
{ manageHook = myManageHook
, layoutHook = avoidStruts $ layoutHook defaultConfig
, logHook = dynamicLogWithPP xmobarPP
{ ppOutput = hPutStrLn xmproc
, ppTitle = xmobarColor "green" "" . shorten 100
myManageHook = composeOne
[ className =? "vlc" -?> doFullFloat
, className =? "skype" -?> doFloat
, resource =? "desktop_window" -?> doIgnore
, resource =? "kdesktop" -?> doIgnore ]
-- The preferred terminal program, which is used in a binding below and by
-- certain contrib modules.
-- myTerminal = "xterm"
myTerminal = "urxvt"
-- Whether focus follows the mouse pointer.
myFocusFollowsMouse :: Bool
myFocusFollowsMouse = True
-- Width of the window border in pixels.
myBorderWidth = 3
-- modMask lets you specify which modkey you want to use. The default
-- is mod1Mask ("left alt"). You may also consider using mod3Mask
-- ("right alt"), which does not conflict with emacs keybindings. The
-- "windows key" is usually mod4Mask.
myModMask = mod4Mask
-- The default number of workspaces (virtual screens) and their names.
-- By default we use numeric strings, but any string may be used as a
-- workspace name. The number of workspaces is determined by the length
-- of this list.
-- A tagging example:
-- > workspaces = ["web", "irc", "code" ] ++ map show [4..9]
myWorkspaces = ["1","2","3","4","5","6","7","8","9"]
-- Border colors for unfocused and focused windows, respectively.
-- myNormalBorderColor = "#dddddd"
myNormalBorderColor = "#000000"
myFocusedBorderColor = "#ff0000"
-- Key bindings. Add, modify or remove key bindings here.
myKeys conf@(XConfig {XMonad.modMask = modm}) = M.fromList $
-- launch a terminal
[ ((modm .|. shiftMask, xK_Return), spawn $ XMonad.terminal conf)
-- launch dmenu
, ((modm, xK_p ), spawn "dmenu_run -b")
-- launch gmrun
, ((modm .|. shiftMask, xK_p ), spawn "gmrun")
-- close focused window
, ((modm .|. shiftMask, xK_c ), kill)
-- Rotate through the available layout algorithms
, ((modm, xK_space ), sendMessage NextLayout)
-- Reset the layouts on the current workspace to default
, ((modm .|. shiftMask, xK_space ), setLayout $ XMonad.layoutHook conf)
-- Resize viewed windows to the correct size
, ((modm, xK_n ), refresh)
-- Move focus to the next window
, ((modm, xK_Tab ), windows W.focusDown)
-- Move focus to the next window
, ((modm, xK_j ), windows W.focusDown)
-- Move focus to the previous window
, ((modm, xK_k ), windows W.focusUp )
-- Move focus to the master window
, ((modm, xK_m ), windows W.focusMaster )
-- Swap the focused window and the master window
, ((modm, xK_Return), windows W.swapMaster)
-- Swap the focused window with the next window
, ((modm .|. shiftMask, xK_j ), windows W.swapDown )
-- Swap the focused window with the previous window
, ((modm .|. shiftMask, xK_k ), windows W.swapUp )
-- Shrink the master area
, ((modm, xK_h ), sendMessage Shrink)
-- Expand the master area
, ((modm, xK_l ), sendMessage Expand)
-- Push window back into tiling
, ((modm, xK_t ), withFocused $ windows . W.sink)
-- Increment the number of windows in the master area
, ((modm , xK_comma ), sendMessage (IncMasterN 1))
-- Deincrement the number of windows in the master area
, ((modm , xK_period), sendMessage (IncMasterN (-1)))
-- Toggle the status bar gap
-- Use this binding with avoidStruts from Hooks.ManageDocks.
-- See also the statusBar function from Hooks.DynamicLog.
-- , ((modm , xK_b ), sendMessage ToggleStruts)
-- Quit xmonad
, ((modm .|. shiftMask, xK_q ), io (exitWith ExitSuccess))
-- Restart xmonad
, ((modm , xK_q ), spawn "xmonad --recompile; xmonad --restart")
-- mod-[1..9], Switch to workspace N
-- mod-shift-[1..9], Move client to workspace N
[((m .|. modm, k), windows $ f i)
| (i, k) <- zip (XMonad.workspaces conf) [xK_1 .. xK_9]
, (f, m) <- [(W.greedyView, 0), (W.shift, shiftMask)]]
++
-- mod-{w,e,r}, Switch to physical/Xinerama screens 1, 2, or 3
-- mod-shift-{w,e,r}, Move client to screen 1, 2, or 3
[((m .|. modm, key), screenWorkspace sc >>= flip whenJust (windows . f))
| (key, sc) <- zip [xK_w, xK_e, xK_r] [0..]
, (f, m) <- [(W.view, 0), (W.shift, shiftMask)]]
-- Mouse bindings: default actions bound to mouse events
myMouseBindings (XConfig {XMonad.modMask = modm}) = M.fromList $
-- mod-button1, Set the window to floating mode and move by dragging
[ ((modm, button1), (\w -> focus w >> mouseMoveWindow w
>> windows W.shiftMaster))
-- mod-button2, Raise the window to the top of the stack
, ((modm, button2), (\w -> focus w >> windows W.shiftMaster))
-- mod-button3, Set the window to floating mode and resize by dragging
, ((modm, button3), (\w -> focus w >> mouseResizeWindow w
>> windows W.shiftMaster))
-- you may also bind events to the mouse scroll wheel (button4 and button5)
-- Layouts:
-- You can specify and transform your layouts by modifying these values.
-- If you change layout bindings be sure to use 'mod-shift-space' after
-- restarting (with 'mod-q') to reset your layout state to the new
-- defaults, as xmonad preserves your old layout settings by default.
-- The available layouts. Note that each layout is separated by |||,
-- which denotes layout choice.
myLayout = tiled ||| Mirror tiled ||| Full
where
-- default tiling algorithm partitions the screen into two panes
tiled = Tall nmaster delta ratio
-- The default number of windows in the master pane
nmaster = 1
-- Default proportion of screen occupied by master pane
ratio = 1/4
-- Percent of screen to increment by when resizing panes
delta = 3/100
-- Window rules:
-- Execute arbitrary actions and WindowSet manipulations when managing
-- a new window. You can use this to, for example, always float a
-- particular program, or have a client always appear on a particular
-- workspace.
-- To find the property name associated with a program, use
-- > xprop | grep WM_CLASS
-- and click on the client you're interested in.
-- To match on the WM_NAME, you can use 'title' in the same way that
-- 'className' and 'resource' are used below.
-- Event handling
-- * EwmhDesktops users should change this to ewmhDesktopsEventHook
-- Defines a custom handler function for X Events. The function should
-- return (All True) if the default handler is to be run afterwards. To
-- combine event hooks use mappend or mconcat from Data.Monoid.
myEventHook = mempty
-- Status bars and logging
-- Perform an arbitrary action on each internal state change or X event.
-- See the 'XMonad.Hooks.DynamicLog' extension for examples.
myLogHook = return ()
-- Startup hook
-- Perform an arbitrary action each time xmonad starts or is restarted
-- with mod-q. Used by, e.g., XMonad.Layout.PerWorkspace to initialize
-- per-workspace layout choices.
-- By default, do nothing.
myStartupHook = return ()
-- Now run xmonad with all the defaults we set up.
-- Run xmonad with the settings you specify. No need to modify this.
-- main = xmonad defaults
-- A structure containing your configuration settings, overriding
-- fields in the default config. Any you don't override, will
-- use the defaults defined in xmonad/XMonad/Config.hs
-- No need to modify this.
defaults = defaultConfig {
-- simple stuff
terminal = myTerminal,
focusFollowsMouse = myFocusFollowsMouse,
borderWidth = myBorderWidth,
modMask = myModMask,
workspaces = myWorkspaces,
normalBorderColor = myNormalBorderColor,
focusedBorderColor = myFocusedBorderColor,
-- key bindings
keys = myKeys,
mouseBindings = myMouseBindings,
-- hooks, layouts
layoutHook = myLayout,
manageHook = myManageHook,
handleEventHook = myEventHook,
logHook = myLogHook,
startupHook = myStartupHook
Any idea what I missed?
Best regards.
Christer

Try this, it works very well for me.
import XMonad.Hooks.ManageHelpers (composeOne, isFullscreen, isDialog, doFullFloat, doCenterFloat)
myManageHook = composeAll. concat $
[ [ className =? c --> doCenterFloat| c <- floats]
, [ resource =? r --> doIgnore | r <- ignore]
, [ resource =? "gecko" --> doF (W.shift "net") ]
, [ isFullscreen --> doFullFloat]
, [ isDialog --> doCenterFloat]]
where floats = ["sdlpal", "MPlayer", "Gimp", "qemu-system-x86_64", "Gnome-typing-monitor", "Vlc", "Dia", "DDMS", "Audacious", "Wine"]
ignore = []
myLayout = tall ||| Mirror tall||| Full ||| tab ||| float
where
tall = named "Tall" $ limitWindows 4 $ minimize $ Tall 1 (3/100) (1/2)
tab = named "Tab" simpleTabbedBottom
float = named "Float" simpleFloat
main = do
myStatusBarPipe <- spawnPipe myBar
conkyBarProc <- spawnPipe conkyBar
trayproc <- spawnPipe myTrayer
xmonad $ ewmh $ withUrgencyHook NoUrgencyHook $ defaultConfig {
terminal = "urxvt"
, manageHook = manageDocks <+> myManageHook <+> manageHook defaultConfig
Last edited by helloworld1 (2012-08-14 05:20:56)

Similar Messages

  • Presentatsion with videos, can't get it working on fullscreen.

    Hi
    Happy new year guys:)
    I made a flash presentatsion and because i'm using FlashEff components it has to be in as3. I'm a total newbie in coding, particularly in as3. I have made my presentatsion in as3 before and got everything working fine. This time my presentation contains videos. And this becomes a problem when going on fullscreen mode. My project size is 1024x768, I made a html and use a brauser to open it. I wan't my project to go fullscreen so that there aren't borders.
    If the stage goes fullscreen i don't want my movies to go fullscreen. When playing a video on fullscreen mode everything just goes black. Soo finally i figured out that i have to tell the videos not to scale.
    My project is set up as follows:
    1. MAIN TIMELINE
    On the first layer i have all the frames converted to movieclips and inside each movieclip is the content.
    On the as layers first frame i have this code. This is for navicating on the presentatsion slides with arrow keys.
    stage.addEventListener(KeyboardEvent.KEY_UP, goNextFrame);
    function goNextFrame(event:KeyboardEvent):void
    if (event.keyCode == Keyboard.UP)
    this.nextFrame();
    stage.addEventListener(KeyboardEvent.KEY_DOWN, goPrevFrame);
    function goPrevFrame(event:KeyboardEvent):void
    if (event.keyCode == Keyboard.DOWN)
    this.prevFrame();
    2. INSIDE THE MOVIECLIP
    On each slide there is some content that is called with a mouse click.
    //On the fist frame
    bg_mc2.addEventListener(MouseEvent.CLICK, playSlide);
    bg_mc2.buttonMode = true;
    function playSlide(event:Event):void
    play();
    //On the last frame
    stop();
    bg_mc2.mouseEnabled = false;
    I have tried so many fullscreenmode - don't scale the video codes.
    I have tried so many ways but every time i play a video i get the typeerror 1009 Can't access a property of method.
    What does this mean?
    Is there a

    Hi
    Happy new year guys
    I managed to get the flvs on fullscreen and running. This code prevents it from taking over the screen: myPlayer.fullScreenTakeOver = false;. But when i try to move this code(keyframe) along with the flv(keyframe) farther, the code doesn't work anymore. Why is that? This is really a problem, beacause i have some animation before the video starts to play.
    For going fullscreen i found this toggle on/off button code
    function toggleFullScreen(event:MouseEvent):void
    if (this.stage.displayState == StageDisplayState.FULL_SCREEN)
    this.stage.displayState=StageDisplayState.NORMAL;
    else
    this.stage.displayState=StageDisplayState.FULL_SCREEN;
    myButton.addEventListener(MouseEvent.CLICK, toggleFullScreen);
    function onFullScreen(fullScreenEvent:FullScreenEvent):void
      var bFullScreen=fullScreenEvent.fullScreen;
      if (bFullScreen)
      else
      this.textField.text=this.stage.displayState;
    myButton.stage.addEventListener(FullScreenEvent.FULL_SCREEN, onFullScreen);
    But i get this error
    TypeError: Error #1010: A term is undefined and has no properties.
        at PRESENTATSIOOn_fla::MainTimeline/onFullScreen()
        at flash.display::Stage/set displayState()
        at PRESENTATSIOOn_fla::MainTimeline/toggleFullScreen()

  • How do I get out of the fullscreen of death?

    Hi,
    Hoping someone alse has experienced this and come up with a solution:
    I've lost control of Aperture and don't know what to do. I'm running Aperture 3.3.2 and Mac OSX 10.7.5(11G56) on a 15 inch mid-2010 MBP.
    I inadvertently pressed some combination of keys and here's where I am now. It's a black screen with just the Aperture toolbar popping in and out as I movet he mouse cursor to the top. Tool tips appear, but buttons are non responsive.
    Pressing 'F' doesn't do any thing and I cannot press the double arrow button on the upper right to exit full screen. Left/right keys don't switch pictures as I'd expect. Only two keys provide response:
    The [ESC] key brings me to a blank textil- textured screen where 'F' toggles between this and a screenfull of thumbnails.
    The Aperture menu appears on the left part of this thumbnail screen(along with my widgets and the date, time and log in name on the right side), but is inaccessible(no mouse response). Only the widgets on the upper right of the menu bar react to mouse clicks.
    'F' toggles between this and the first screen.
    I can only get out of these screens by swiping four fingers to move to another desktop.
    So how do I get out of this full screen of death?
    Hoping for a solution
    Fullscreened to death,
    Benny

    Benny,
    Where do I find the plist file? It's not in HD/library/prferences?
    you have to look in the user preferences, not the system preferences:
    The user preferences are hidden by default; reveal them from the Finder's "Go" menu:
    Quit Aperture, if it is running:
    Open the user library by using the Finder's "Go > Go to Folder" menu and hold down the options-key, until "Library" appears in the drop down menu. Select it.
    In the widow that will open, scroll down to "Preferences"
    From the "Preferences" folder  remove "com.apple.Aperture.plist".
    Then try to launch Aperture again.
    Regards
    Léonie

  • PS CC 2014 gets stuck while going fullscreen (F key) with color plugins(eg. magicpicker/coolorus/kuler) enabled. Please Help.

    Hello,
    I am using Photoshop version 2014.2.2 (20141204.r.310x64) and Extension Manager version 7.3.2.39 running on a Windows 7 64-bit operating system with a Quadro K3000m graphics card and 16gb ram.
    I have a very peculiar problem which I am not able to find the solution for.
    If I have a color plugin enabled and I go fullscreen using the F key, photoshop gets stuck and it will only close when forcefully shut down using the task manager. No amount of waiting restores photoshop back. I first thought it was just one plugin - Magicpicker but then I removed it and installed Coolorus and still the same thing happened. Finally I tried Adobe Color and the same thing happens.
    I am unable to find a solution anywhere. It would be of great help if anybody can shine a light on this issue.
    Warmly.

    To rule out third party plugins, hold Shift while starting Photoshop. If that fails to help, try turning off GPU acceleration in the preferences and restarting Photoshop,
    Benjamin

  • Get get games to run Fullscreen in low Res Y70 70 Touch

    Hi everyone, I've owened my laptop for about 3 months now, during all of this time I have searched the internet hopelessly for a fix about this issue. So most of the games (not all) won't run in fullscreen on any other res then Full HD 1920x1080, I have tried everything, reinstall of the system included, nothing helped. Also I wanted to ask about the temperatures of the GPU. Sometimes it gets above 85 C, and I do experience lag because of it, is this normal? Because everywhere I've read the laptop has no issue with overheating.

    hi Georgianguy,
    Welcome to the Forums.
    May I know some of the games that won't run in fullscreen? In addition, if your Y70-70 Touch have a native resolution of 1920x1080, have you tried enabling Disable display scaling on high DPI settings or run the game in compatibility view (i.e., If the game was made for WinXP, enable WinXP Compatibility) ?
       - Sample image
       - Sample image
    As for the high temps readings, were you experiencing this out of the box or just recently? If it's just recently, it's possible that the CPU/GPU is throttling due to heat causing the lag (you can verify by monitoring the CPU/GPU frequency while gaming).
    In addition, you may also want to consider updating the BIOS to 9ECN37WW(V2.01) as it list modification on the thermal table (fan control).
    Regards

  • Get kicked out of fullscreen for "disc mount" messages

    Whether I am on safari, watching a movie, on itunes I get booted from full screen for these randon disc mounted messages. Is there any way to stop this?

    1. Close all inactive apps in the Task Bar. Double-click the Home button and hold apps down for a second or two and tap the minus sign to close app.
    2. Try a reset. Hold the Sleep and Home button down for about 10 seconds until you see the Apple Logo

  • VLC fullscreen sometimes makes screen stay black after video ends

    like the subject says, sometimes the screen just stays black when a video ends while VLC is in fullscreen mode.
    I'm using VLC 2.0.8.a-1. I got the laptop in April, just in time for Revision 2013, had the problem more or less from the start, so that's since version 2.0.5 or 2.0.6
    So far I haven't found a way to get things back to normal when it happens. I've tried
    press f
    press ESC
    close and reopen lid
    switch to console (screen just stays black, even on consoles)
    Apparently the only thing I can do is pop up a terminal window via shortcut and reboot.
    As far as I can tell /var/log/Xorg.[0,1].log doesn't tell what's going on.
    In case it's important, I've only experienced this on my Thinkpad T430, it never happend on my old ASUS laptop or on my desktop pc. An Intel issue maybe? The other two run on nvidia cards, the T430 does have an nvidia card in addition to the on-chip HD 4000 but I don't use it (I'd love to since the DP port is only usable with the nvidia card, haven't been able to make it work with bumblebee yet but that's a different issue).
    Any ideas? Which log and config files do you need?

    like the subject says, sometimes the screen just stays black when a video ends while VLC is in fullscreen mode.
    I'm using VLC 2.0.8.a-1. I got the laptop in April, just in time for Revision 2013, had the problem more or less from the start, so that's since version 2.0.5 or 2.0.6
    So far I haven't found a way to get things back to normal when it happens. I've tried
    press f
    press ESC
    close and reopen lid
    switch to console (screen just stays black, even on consoles)
    Apparently the only thing I can do is pop up a terminal window via shortcut and reboot.
    As far as I can tell /var/log/Xorg.[0,1].log doesn't tell what's going on.
    In case it's important, I've only experienced this on my Thinkpad T430, it never happend on my old ASUS laptop or on my desktop pc. An Intel issue maybe? The other two run on nvidia cards, the T430 does have an nvidia card in addition to the on-chip HD 4000 but I don't use it (I'd love to since the DP port is only usable with the nvidia card, haven't been able to make it work with bumblebee yet but that's a different issue).
    Any ideas? Which log and config files do you need?

  • Hi I need VLC player for my touch ipod , tried a lot but not getting on net for download can anyone help me in getting this. THanks

    Can some one help me in getting VLC player for my touch ipod.

    It's not possible, because VLC is not in apple market
    You can use AcePlayer to view different types of film
    Best Regards

  • How to get real fullscreen on Mac (Yosemite / Mavericks) ?

    Hello all,
    I got an 11" macbook air a little while back and until that Firefox always was my go to browser.
    It seems that getting a real firefox fullscreen (with auto-hiding toolbars) on mac currently is either impossible or really hard. I did my research and tried things but couldn't get it to work for me... And this got to the point where it was "dealbreaker" for me for two reasons :
    - On this small screen, the toolbars take a bit less than 10% of the area, which is quite a bit. Plus I really like to navigate fullscreen, I feel I can immerse way better in the websites with no toolbars (that sometimes are at high contrast with the page colors etc...)
    - I'm developing a webpage-based psychology experiment that I want to be able to pass on this macbook air (at least for the first tests), and as it involves some immersion in the content, it would benefit from fullscreen.
    So I switched to Chrome (which does this "real" fullscreen) for these reasons, but I generally prefer Firefox and would be glad to switch back if real fullscreen was an option. My question is, have you found a way for it to work ? If not, can this be turned into a feature request (is it relevant, how do I do that) ?
    Here is some of my research :
    - relevant ticket : https://bugzilla.mozilla.org/show_bug.cgi?id=740148
    - 2014 forum question : https://support.mozilla.org/en-US/questions/998118
    (links to the "Old Lion Fullscreen" addon, that does not work for me, leaves empty space where the dock was and the menu are)
    - 2012 forum question : https://support.mozilla.org/en-US/questions/932384
    I'm currently on OS X 10.10.2, Firefox 37, but was also unable to get it to work back on OS X 10.9. Also it seems that this issue has been around for a long time, I would love to just have an option for the type of fullscreen I want, not having to rely on a temp fix (which I haven't found anyway)...
    Thanks for your help !

    I use it for extra windows that aren't full screen that have a media player, so I do not want to open new tabs.
    I also have a shortcut key (I use the code in PrefBar) to toggle the toolbox area on/off and can thus make the toolbars quickly appear.
    If you can't hide toolbar on Mac in full screen mode then this could be a possibility.
    I don't know if there are extensions for Mac that can hide (toggle) toolbar and possibly toggle the Tab bar.
    If you change the selector then you can toggle individual toolbars instead of currently toggle the entire navigator toolbox.
    <pre><nowiki>var {classes:Cc,interfaces:Ci} = Components;
    var wm = Cc["@mozilla.org/appshell/window-mediator;1"].getService(Ci.nsIWindowMediator);
    var gB = wm.getMostRecentWindow("navigator:browser").window.document;
    var nt = gB.querySelectorAll("#nav-bar,#PersonalToolbar,#TabsToolbar");
    for(i=0;NT=nt[i];i++){
    var ds = NT.style.getPropertyValue("display") == "none";
    NT.style.setProperty("display",ds?"-moz-box":"none","important");
    }</nowiki></pre>

  • Getting the integer part of a float?

    This sure is a simple problem, but i couldn't find an appropriate methode or class so i just like to aks you, wheter you have an idea:^
    how do i get the integer part of a float? i mean, how do i get the "14" from the float "14.45698"?

    Sounds like you need to explicitly cast it to an integer, like this:
    double      number1 = 14.45698;
              int     number2 = 0;
              number2 = (int) number1;
    Hope this helps.

  • Images in fullscreen?

    Judging from the Multitouch Books already available, it's should be possible to pinch open many (if not all) images to fullscreen.
    When I insert images in iBooks Author though, they cannot be opened to fullscreen on the iPad. Doesn't matter whether i insert them inline with the text or not. (When they are not inline with the text, to make it worse, they won't even show up in portrait mode.)
    I did try to use the image gallery widget populated with only one image, but it iBooks crashes every time i open the page containing it.
    What are your experiences?
    Thanks.

    Furthermore for those that tndom's answer wont work, i finally figured out what we are missing.
    If you are in the case of Daniel Gardner1 (see above), that it was the same problem i had, try and go to
    Inspector-> Wrap (it is the third choice from the left) -> and Floating or Anchored for your image!
    This should do the trick finally!
    edit: i also managed to get a picture into FullScreen mode using Interactive Image from Widgets and deleting all the explanatory bubbles from inside. You can also have Title this way and furthermore that swirly effect when you go in and out of fullscreen,

  • Watch fullscreen movie on 2nd monitor & work on my MBP @ the same time?

    I hooked up a 2nd monitor to my MBP (mini to VGA) and figured out how to have an extended desktop. It's a little tricky adjusting where the pointer will be (I don't totally understand it, but with trial and error and lots of persistence, I finally got it to ALMOST be set up the way I'd like).
    I have a movie (.avi file) playing on the 2nd monitor and I'm able to work on my MBP, but I can't figure out how to view the movie fullscreen because when I get the 2nd monitor fullscreen, my MBP screen goes fullscreen as well (and of course the dock and any form of control disappear as my MBP screen is just dark and blank).
    Does anyone know the trick to getting the setup that I want? FULLSCREEN 2nd monitor to watch .avi files while working on my MBP???
    I could really use some help on this one! THANK YOU, oh knowledgeable one(s) who reply!!!

    You won't be able to do it with the included QuickTime media player. But it can be done with other media players like MPlayer or VLC I am pretty sure. Haven't had this exact need myself but have seen other similar threads and recall the above being recommended. Good luck.

  • Why cannot i get the window class ?

    %cat test.R
    x <- read.csv("000301.csv")
    matplot(x[,1],x[,-1],type="l")
    In R
    > source("test.R")
    The drawing windows is displayed but not floating in xmonad. So i want to get its window class using xprop
    %xprop| grep -i class
    When clicking the drawing window, xprop outputs nothing ! (BTW, The drawing window can be floated by using mouse+modKey)
    Sincerely!

    Using xprop, i can get its wm_name
    %xprop|grep -i wm_name
    WM_NAME(STRING) = "R Graphics: Device 2 (ACTIVE)"
    In myManageHook, i add the following line:
    [name  =? n  --> doCenterFloat | n <- myNames]
    name = stringProperty "WM_NAME"
    myNames   = ["bashrun","Google Chrome Options","R Graphics: Device 2 (ACTIVE)"]
    But it doesnot work

  • Float Conversion

    I am passing 2 strings of data Social Security Number and a string to be parsed
    1) SSN 123456789
    2)String PH80.00 170915.76 AAE
    The string is parsed PH is extracted, 80.00 is extracted and 170915.76 is converted, however, it is converted to 170916.77. .01 is added to the value. Why does this occur? I think it has to do with the float. The code is as follows
    * Created on Jun 13, 2007
    * To change the template for this generated file go to
    * Window>Preferences>Java>Code Generation>Code and Comments
    package com.abbott.HRT.US018;
    * @author Administrator
    * To change the template for this generated type comment go to
    * Window>Preferences>Java>Code Generation>Code and Comments
    public class TransformData {
         * The below Function is for handling Compensation Update Records
         */ 2 examples of string passed MI80.00 242050.00 AAE Output produced is 242050.00
    PH80.00 170915.76 AAE Output produced is 170915.77
         private String compensationUpdate(String sRecord) {
              //1.Map directly the source data to target data and make changes to below lengths.
              StringBuffer sBuf = new StringBuffer(sRecord);
              //          Correction : Make the length of sBuf equal to 21 in order to reduce the risk of runtime exception
              if (sBuf.length() < 21) {
                   while (sBuf.length() != 21) {
                        sBuf.append(' ');
              //2.     Schedule Hours : Format the data into "ZZ9.99" at position 3-8
              String substring = sBuf.substring(2, 8);
              substring = formatNumber(substring, 4, 6, 2);
              sBuf.replace(2, 8, substring);
              //3.     Base Rate : Format the data into "ZZZZZZ9.99" at position 9-29. The target position will be 9-18
              substring = null;
              substring = sBuf.substring(8, 29);
              substring = formatNumber(substring, 8, 10, 2);
              sBuf.replace(8, 18, substring.substring(0, 10));
              sBuf.delete(18, 29);
              //4.     Performance Rating : For now no mapping is defined
              //At last append 434 spaces to the record
              sBuf = appendSpaces(sBuf, 434);
              return sBuf.toString();
         * The below Function is for formatting numbers Records
         private String formatNumber(
              String input,
              int position,
              int length,
              int decPlaces)
              throws NumberFormatException {
              //17.08.2007 : If empty string has come, send back the same
              int int1 = input.lastIndexOf(' ');
              int int2 = input.length();
              if (int1 == int2) {
                   return input;
              // position = actual position of dec place (e.g.4 for ZZ9.99)
              //length = actual length (e.g. 6 for ZZ9.99)
              //decPlaces = (e.g. 2 for ZZ9.99)
              //First get the input converted into float and back so as to add a decimal sign if it does not exist
              float f;
              try {
                   f = Float.parseFloat(input);
              } catch (NumberFormatException ex) {
                   throw new NumberFormatException(
                        "Exception Occurred:" + ex.getMessage());
              StringBuffer sb = new StringBuffer(length);
              sb.insert(0, f);
              //Identify the position of decimal sign and then shift it gradually
              int index = sb.indexOf(".");
              if (index < position && index != -1) {
                   while (index < (position - 1)) {
                        sb.insert(0, " ");
                        index = sb.indexOf(".");
                   /*If there is no decimal sign, put one at the desired position                         
                                            if(index == -1){
                                                 int int1 = Integer.parseInt(input);
                                                 sb.ins;
                                                 sb.insert(position,".");
              //Fill blank spaces after decimal sign with zero
              while (sb.length() < length) {
                   sb.append("0");
              return sb.toString();
    The code is as follows

    Volume is not precision. You need to be precise and informative. This end is not served by simply dumping huge volumes of code or data into a help request. If you have a large, complicated test case that is breaking a program, try to trim it and make it as small as possible.
    This is useful for at least three reasons. One: being seen to invest effort in simplifying the question makes it more likely that you'll get an answer, Two: simplifying the question makes it more likely you'll get a useful answer. Three: In the process of refining your bug report, you may develop a fix or workaround yourself.
    -- http://www.catb.org/~esr/faqs/smart-questions.html
    Example:
    assert 170915.77F == Float.parseFloat("170915.76"); // why?And here's the answer:
    http://en.wikipedia.org/wiki/Floating_point
    http://java.sun.com/developer/JDCTechTips/2003/tt0204.html#2
    http://docs.sun.com/source/806-3568/ncg_goldberg.html
    Cheers!
    ~

  • Dreamweaver cs5.5 - div tags won't float next to eachother

    I have being trying to get 2 div tags to float next to eachother for hours! I've been messing with the float and messing with margins, but what ever i do the div is always somewhat under my other div tag. I want them completely side by side. I have tried changing the top and bottom margins but that doesn't work either. how can i get them side by side? One is called 'textbox' and the other 'imagewrapper'. The code is:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Untitled Document</title>
    <script src="SpryAssets/SpryMenuBar.js" type="text/javascript"></script>
    <link href="SpryMenuBarHorizontal.css" rel="stylesheet" type="text/css" />
    <link href="main.css" rel="stylesheet" type="text/css" />
    <link href="style2.css" rel="stylesheet" type="text/css" />
    <!--embedded styles for this page only-->
    <style type="text/css">
    body {
    margin:0;
    padding:0;
    font: 1em/1.5 "Lucida Sans", "Lucida Sans Unicode";
    #wrapper {
    width: 1064px;
    margin: 0 auto; /**with width, this centers page on screen**/
    background: #FFF;
    text-align:center;
    /**this styles image container**/
    #thumbs p {
              float:center;
              width: 50px;
              height: 75px;
              /**this styles caption text**/
    font: italic 14px/1.5 Geneva, Arial, Helvetica, sans-serif;
              color: #666;
              text-align:center;
              border: 1px solid silver;
              margin-top: 10px;
              margin-right: 5px;
              margin-bottom: 18px;
              margin-left: 5px;
    /**recommend using same size images**/
    #thumbs img {
              width:  50px; /**adjust width to photo**/
              height: 75px; /**adjust height to photo**/
              /**CSS3 drop shadows**/
    -moz-box-shadow: 5px 5px 5px #666;
              -webkit-box-shadow: 5px 5px 5px #666;
              -khtml-box-shadow: 5px 5px 5px #666;
              box-shadow: 5px 5px 5px #666;
    /**float clearing**/
    #thumbs:after{
              display:block;
              visibility:hidden;
              height:0;
              font-size:0;
              content: " ";
              clear: left;
    #wrapper #thumbs #imagewrapper {
              height: 362px;
              width: 280px;
              float: right;
              margin-right: 720px;
    #wrapper #thumbs #imagewrapper img {
              height: 362px;
              width: 280px;
    #wrapper #textbox {
              float: right;
              height: 300px;
              width: 600px;
              margin-right: 70px;
    .clearing {
    clear:left;
    height:px;
    width: 100%;
    </style>
    </head>
    <body>
    <div id="wrapper">
    <img src="product and website photos/header.png" width="1064" height="116" alt="header" />
    <!--begin menu -->
    <ul id="MenuBar1" class="MenuBarHorizontal">
    <li><a href="#home.html">Home</a></li>
    <li><a href="#" class="MenuBarItemSubmenu">Boutique</a><ul>
    <li><a href="#" class="MenuBarItemSubmenu">Women</a><ul>
    <li><a href="bwt.html">Tops</a></li>
    <li><a href="bws.html">Skirts/Shorts</a></li>
    <li><a href="bwl.html">Trousers/Leggings</a></li>
    <li><a href="bwa.html">Accessories</a></li>
    <li><a href="bwd.html">Dresses</a></li></ul></li>
    <li><a href="#" class="MenuBarItemSubmenu">Men</a>
    <ul>
    <li><a href="#">Tops</a></li>
    <li><a href="#">Bottoms</a></li>
    <li><a href="#">Accessories</a></li>
    </ul>
    </li>
    <li><a href="#">Semi-Unique</a></li>
    </ul>
    </li>
    <li><a class="MenuBarItemSubmenu" href="#">T-shirt Shop</a><ul>
    <li><a href="t-shirt shop.html">Men</a></li>
    <li><a href="t-shirt shop.html">Women</a></li>
    <li><a href="t-shirt shop.html">Unique</a></li>
    </ul></li>
    <li><a href="clearance.html">Clearance</a></li>
    <li><a href="#">About</a></li>
    </ul>
    <h2> </h2>
    <div id="textbox"></div>
    <div id="thumbs">
      <div id="imagewrapper"></div>
      <p> </p>
    <p> </p>
    <p> </p>
    <p> </p>
    <!--end wrapper --></div>
    <hr align="center" size="10" noshade="noshade" class="clearing" color="#999999" />
    <div align="left">&copy; 2012 your footer text goes here</div>
    </div>
    <script type="text/javascript">
    var MenuBar1 = new Spry.Widget.MenuBar("MenuBar1", {imgDown:"SpryAssets/SpryMenuBarDownHover.gif", imgRight:"SpryAssets/SpryMenuBarRightHover.gif"});
    </script>
    </body>
    </html>

    If you want to position 2 divs - one on left and other on right, the float for your left div should say float: left; and for the one on the right the CSS should say float:right;
    In your code, I see you want imagewrapper to come on right and textbox to come on left. But your float for BOTH these say right. This is where the issue lies.
    You can combine float:left and float:right to achieve side by side divs provided the overall width (container width+padding+margin) of both divs is less than or equal to the width of the wrapper div.
    In the OP's example:
    #wrapper = 1064+0+0 = 1064px
    #textbox + #imagewrapper = 600+70+280+720 = 1670px = float drop

Maybe you are looking for